Exercises Binary decision diagrams ROBDD generation Shannon expansion

Exercises • Binary decision diagrams • ROBDD generation. Shannon expansion • Finding an optimal ordering • Dynamic node reordering • SAT • Creating the SAT instance: characteristic formula • SAT solving Digitaalsüsteemide verifitseerimise kursus 1

Exercises • Equivalence checking • Using ROBDDs • Using SAT • Code Coverage • Generate minimal tests for 100% statement, branch and path coverage • Assertions • Evaluate operations on SVA sequences Digitaalsüsteemide verifitseerimise kursus 2

Binary decision diagrams • ROBDD generation. Shannon expansion f = ¬a¬bcd + a¬bc + ¬abc + ab¬cd + a¬b¬cd 1) Generate the binary decision tree 2) Reduce it to an ROBDD 3) Derive the function from the BDD Digitaalsüsteemide verifitseerimise kursus 3

Binary decision diagrams • ROBDD generation. Find the optimal ordering f = ab + a¬b¬c¬d + a¬bcd + ¬abc + ¬ab¬cd + ¬a¬bcd Reorder dynamically the 2. and 3. variable Digitaalsüsteemide verifitseerimise kursus 4

SAT • Create a characteristic formula for f = ¬ac + b¬c + a¬b Digitaalsüsteemide verifitseerimise kursus 5

Equivalence checking • Whether f and g are equivalent? f = ¬ac + b¬c + a¬b g = a¬c + ¬bc + ¬ab 1) Check with SAT 2) Check with ROBDDs Digitaalsüsteemide verifitseerimise kursus 6

void Function(int x, y, z, w) { int a, b, c; a=0; if(x) { a = 1; } else { if(a==0) { a = 1; } else { a = a + 1; } } if(y) { if(z) { a = 2; } } if(w) { b=c; } Code Coverage 1) Generate the minimum test for the full statement coverage (inputs w, x, y & z) 2) Generate the minimum test for the full branch coverage 3) Generate the minimum test for the full path coverage 4) Which statements/branches are unreachable (i. e. dead code)? } Digitaalsüsteemide verifitseerimise kursus 7

Assertions 1) When is a sequence S 1|=>S 2 true? S 1=##1 INT ##[0, 3] TASK; S 2=HDLR ##[1, 4] DONE a) b) c) Digitaalsüsteemide verifitseerimise kursus 8
- Slides: 8