TU Wien:Programm- und Systemverifikation VU (diverse)/Suggested-Solution-Exam-SS14
Zur Navigation springen
Zur Suche springen
1.) Coverage (5 + 7 + 5 + 3 Points)[Bearbeiten | Quelltext bearbeiten]
a)[Bearbeiten | Quelltext bearbeiten]
satisfied | ||
---|---|---|
Criterion | yes | no |
path coverage | x | |
statement coverage | x | |
branch coverage | x | |
decision coverage | x | |
condition/decision coverage | x |
b)[Bearbeiten | Quelltext bearbeiten]
satisfied | ||
---|---|---|
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-uses | x | |
all-du-paths | x |
c)[Bearbeiten | Quelltext bearbeiten]
MC/DC | |||
---|---|---|---|
Inputs | Outputs | ||
a | b | c | result |
3 | 4 | 6 | 6 |
7 | 3 | 8 | -1 |
18 | 7 | 8 | -1 |
all-p-uses/some-c-uses | |||
---|---|---|---|
Inputs | Outputs | ||
a | b | c | result |
3 | 4 | 6 | 6 |
d)[Bearbeiten | Quelltext bearbeiten]
Input | Output | ||
---|---|---|---|
a | b | c | result |
0 | 0 | 0 | false |
1 | 0 | 0 | true |
0 | 1 | 0 | true |
3.) Invariants (10 Points)[Bearbeiten | Quelltext bearbeiten]
a)[Bearbeiten | Quelltext bearbeiten]
i.) yes
ii.) yes
iii.)
n | 0 | n' | 1 |
y | 0 | y' | 13 |
a | 13 | a' | 13 |
iv.)
n | 0 | n' | 1 |
y | 0 | y' | 13 |
a | 13 | a' | 13 |
x | 0 | x' | 13 |
v.) yes