0% found this document useful (0 votes)
36 views

MC Ex10 Notes

The document is an exercise sheet for a course on model checking. It provides instructions for submitting exercise solutions and notes that exercises cover lectures 19-21. It also presents Exercise 1 on Boolean function representation using ROBDDs, Exercise 2 on operations on ROBDDs, and Exercise 3 on encoding a transition system using propositional logic over state variables.

Uploaded by

Coping Forever
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

MC Ex10 Notes

The document is an exercise sheet for a course on model checking. It provides instructions for submitting exercise solutions and notes that exercises cover lectures 19-21. It also presents Exercise 1 on Boolean function representation using ROBDDs, Exercise 2 on operations on ROBDDs, and Exercise 3 on encoding a transition system using propositional logic over state variables.

Uploaded by

Coping Forever
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Lehrstuhl für Informatik 2 Model Checking Summer Semester 2022

Softwaremodellierung und Verifikation Exercise Sheet 10 (Submission until 13.07.2022)


Prof.aa
Dr. Ir. Dr. h. c. Joost-Pieter Katoen, Tim Quatmann Alexander Bork, Jip Spel

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.

• This sheet covers lectures 19-21.

1
Lehrstuhl für Informatik 2 Model Checking Summer Semester 2022
Softwaremodellierung und Verifikation Exercise Sheet 10 (Submission until 13.07.2022)

Exercise 1 (Boolean Function Representation): 15+5=20 Points


Consider the ROBDD depicted below.

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)

Exercise 2 (Operations on ROBDDS): 8+8+14=30 Points


Perform the following operations on ROBDDs. Your result should always be a reduced OBDD. Provide the
intermediate steps of your computations. In particular, indicate which of the three rules for reducing OBDDs
(slide 29) you apply. The variable ordering is given by a < b < c < d.
a) Compute F _ G for the following ROBDDs F and G.

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)

b) Compute H|b=1 for the ROBDD H given below

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.

Hint: 9a.g(a, . . . ) ⌘ g(0, . . . ) _ g(1, . . . )

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.

Hint: 9a.g(a, . . . ) ⌘ g(0, . . . ) _ g(1, . . . )

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)

Exercise 3 (Transition System Encoding): 10+10=20 Points


Consider the following transition system.

s1 ;

{a}
s0 s3
{b}

s2 {a, b}

(a) TS (b) Legend

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.

fa (x̄) = (x0 ^ ¬x1 ) _ (x0 ^ x1 ) (= x0 )

fb (x̄) = (¬x0 ^ x1 ) _ (x0 ^ x1 ) (= x1 )

(x̄, x̄ 0 ) =(¬x0 ^ ¬x1 ^ ¬x00 ^ x10 ) _ (¬x0 ^ ¬x1 ^ x00 ^ ¬x10 )


_(¬x0 ^ x1 ^ ¬x00 ^ x10 )
_(x0 ^ ¬x1 ^ ¬x00 ^ x10 ) _ (x0 ^ ¬x1 ^ x00 ^ x10 )
_(x0 ^ x1 ^ ¬x00 ^ x10 ) _ (x0 ^ x1 ^ x00 ^ x10 )

(=(¬x0 ^ ¬x00 ^ x10 ) _ (¬x0 ^ ¬x1 ^ x00 ^ ¬x10 ) _ (x0 ^ x10 ))

8
Lehrstuhl für Informatik 2 Model Checking Summer Semester 2022
Softwaremodellierung und Verifikation Exercise Sheet 10 (Submission until 13.07.2022)

Exercise 4 (Bounded Model Checking): 10+15+5=30 Points


Perform bounded model checking on the following transition system T S.

00 11 ;

{a}
01 10

(c) TS (d) Legend

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

You might also like