MC Ex10 Notes
MC Ex10 Notes
Exercise Sheet 10
Hints:
• The exercise sheet can be submitted until 13.07.2022 at 16:30 online via RWTHmoodle.
• The exercise sheets have to be solved in groups of 3-4. Submissions with other group sizes might not be
corrected. Use the forum in RWTHmoodle to find group-mates.
• Submissions will be graded only for the sake of giving feedback to you. The points are not a precondition
for admittance to the exam.
• However, we strongly advice you to solve the exercises and submit your solutions.
• Sample solutions will be presented in the exercise class and published in RWTHmoodle.
• Questions can be asked either during the lecture or exercise class or in the general discussion board on
RWTHmoodle.
1
Lehrstuhl für Informatik 2 Model Checking Summer Semester 2022
Softwaremodellierung und Verifikation Exercise Sheet 10 (Submission until 13.07.2022)
x1
x2 x2
x3 x3 x3 x3
y3 y3 y3 y3 y3
y2 y2
y1
0 1
a) We consider a new variable ordering } given by y3 <} x3 <} x2 <} y2 <} x1 <} y1 . Give the resulting
}-ROBDD.
2
Lehrstuhl für Informatik 2 Model Checking Summer Semester 2022
Softwaremodellierung und Verifikation Exercise Sheet 10 (Submission until 13.07.2022)
b) Determine the boolean function f (x1 , x2 , x3 , y1 , y2 , y3 ) that the ROBDD represents as a propositional for-
mula.
No. x1 x2 x3 y3 y2 y1 f
33. 1 0 0 x x 0 0
No. x1 x2 x3 y3 y2 y1 f
37. 1 0 0 x x 1 1
1. 0 0 0 x x x 0
41. 1 0 1 0 x 0 0
9. 0 0 1 0 x x 0
43. 1 0 1 0 x 1 1
13. 0 0 1 1 x x 1
45. 1 0 1 1 x x 0
17. 0 1 0 1 x x 0
49. 1 1 0 x 0 0 0
21. 0 1 0 0 0 x 0
51. 1 1 0 x 0 1 1
23. 0 1 0 0 1 x 1
53. 1 1 0 x 1 x 1
25. 0 1 1 0 0 x 0
57. 1 1 1 0 0 0 0
27. 0 1 1 0 1 x 1
58. 1 1 1 0 0 1 1
29. 0 1 1 1 x x 1
59. 1 1 1 0 1 x 1
61. 1 1 1 1 x x 1
3
Lehrstuhl für Informatik 2 Model Checking Summer Semester 2022
Softwaremodellierung und Verifikation Exercise Sheet 10 (Submission until 13.07.2022)
Hint: Recall the similarities between ROBDDs and DFAs. A (possibly non-reduced) OBDD for F _ G
can be constructed similarly to the well-known product construction for DFAs.
F : a G: a
c c
d d
0 1 0 1
4
Lehrstuhl für Informatik 2 Model Checking Summer Semester 2022
Softwaremodellierung und Verifikation Exercise Sheet 10 (Submission until 13.07.2022)
H: a
b b
c c
0 1
5
Lehrstuhl für Informatik 2 Model Checking Summer Semester 2022
Softwaremodellierung und Verifikation Exercise Sheet 10 (Submission until 13.07.2022)
c) Compute 9a.(9d.f (a, b, c, d)) in the form of an ROBDD for the function f defined by the ROBDD below.
f : a
b b
d d
0 1
6
Lehrstuhl für Informatik 2 Model Checking Summer Semester 2022
Softwaremodellierung und Verifikation Exercise Sheet 10 (Submission until 13.07.2022)
c) Compute 9a.(9d.f (a, b, c, d)) in the form of an ROBDD for the function f defined by the ROBDD below.
f : a
b b
d d
0 1
6
Lehrstuhl für Informatik 2 Model Checking Summer Semester 2022
Softwaremodellierung und Verifikation Exercise Sheet 10 (Submission until 13.07.2022)
s1 ;
{a}
s0 s3
{b}
s2 {a, b}
a) Define the switching functions that represent the transition system using propositional logic over variables
x̄ = (x0 , x1 ). More precisely, provide
• (x̄, x̄ 0 ) for the transition function, and
• fa (x̄) for the satisfaction sets for each atomic proposition a 2 AP
States are encoded according to the binary representation of their index, e.g., enc(s1 ) = (x0 , x1 ) = (0, 1).
7
Lehrstuhl für Informatik 2 Model Checking Summer Semester 2022
Softwaremodellierung und Verifikation Exercise Sheet 10 (Submission until 13.07.2022)
b) Encode the switching functions from part (a) using ROBDDs. Use variable ordering x0 < x1 for the
satisfaction sets and interleave it (x0 < x00 < x1 < x10 ) for the transition relation.
8
Lehrstuhl für Informatik 2 Model Checking Summer Semester 2022
Softwaremodellierung und Verifikation Exercise Sheet 10 (Submission until 13.07.2022)
00 11 ;
{a}
01 10
a) Let a state s be represented as s = (s[0], s[1]). Give the SAT representation of the transition relation
T (s, s 0 ), the initial state(s) I(s) and the atomic proposition a(s).
9
Lehrstuhl für Informatik 2 Model Checking Summer Semester 2022
Softwaremodellierung und Verifikation Exercise Sheet 10 (Submission until 13.07.2022)
b) Given the property p := ⇤ (¬a _ ¬a) and the bound k := 3 generate the SAT encoding for the bounded
model checking problem JT S, ¬pK3 by especially specifying:
• The unfolding of the transition relation: JT SK3
• The loop condition: L3
• The translation for paths without loops: J¬pK03
• The translation for paths with loops: J¬pK0`,3 (for variable `)
10
Lehrstuhl für Informatik 2 Model Checking Summer Semester 2022
Softwaremodellierung und Verifikation Exercise Sheet 10 (Submission until 13.07.2022)
b) Given the property p := ⇤ (¬a _ ¬a) and the bound k := 3 generate the SAT encoding for the bounded
model checking problem JT S, ¬pK3 by especially specifying:
• The unfolding of the transition relation: JT SK3
• The loop condition: L3
• The translation for paths without loops: J¬pK03
• The translation for paths with loops: J¬pK0`,3 (for variable `)
10
Lehrstuhl für Informatik 2 Model Checking Summer Semester 2022
Softwaremodellierung und Verifikation Exercise Sheet 10 (Submission until 13.07.2022)
c) Try to find a satisfying assigment for the SAT encoding and give the resulting counterexample if one can
be found.
11