TU Wien:Programm- und Systemverifikation VU (diverse)/Exam-2016S
Zur Navigation springen
Zur Suche springen
1.) Coverage (7 + 7 Points)[Bearbeiten | Quelltext bearbeiten]
(a)[Bearbeiten | Quelltext bearbeiten]
| statisfied | ||
|---|---|---|
| Criterion | yes | no |
| path coverage | x | |
| statement coverage | x | |
| branch coverage | x | |
| decision coverage | x | |
| condition/decision coverage | x | |
path coverage: The while loop can have many more paths, it is only executed at most once. (can have infinite paths)
(b)[Bearbeiten | Quelltext bearbeiten]
| statisfied | ||
|---|---|---|
| Criterion | yes | no |
| all-defs | x | |
| all-c-uses | x | |
| all-p-uses | x | |
| all-c-uses/some-p-uses | x | |
| all-p-uses/some-c-uses | x | |
all-c-uses: The definition i = i + 1; within the while loop is not used in the subsequent loop iteration. The path from result = result + i to result = result + i (one loop iteration later) is never executed by the test suite.
all-c-uses/some-p-uses: If all-c-uses is not satisfied this criterion can also not be satisfied.