Semantics & Verification Lecture 13 Gerd Behrmann Outline of - - PowerPoint PPT Presentation

semantics verification
SMART_READER_LITE
LIVE PREVIEW

Semantics & Verification Lecture 13 Gerd Behrmann Outline of - - PowerPoint PPT Presentation

Semantics & Verification Lecture 13 Gerd Behrmann Outline of remaining lectures Lecture 9: Modelling real time system Lecture 10: More on Uppaal + mini projects Lecture 11: Mini projects Lecture 12: Verification of timed


slide-1
SLIDE 1

Semantics & Verification

Lecture 13

Gerd Behrmann

slide-2
SLIDE 2

Outline of remaining lectures

  • Lecture 9: Modelling real time system
  • Lecture 10: More on Uppaal + mini projects
  • Lecture 11: Mini projects
  • Lecture 12: Verification of timed automata
  • Lecture 13: Binary Decision Diagrams
  • Lecture 14: Using BDDs for the purpose of verification
  • Lecture 15: Round-up of course
slide-3
SLIDE 3

Reduced Ordered Binary Decision Diagrams

[Bryant’86]

  • Compact represetation of boolean functions

allowing effective manipulation (satisfiability, validity,….)

  • Compact representation of sets over finite

universe allowing effective manipulations.

slide-4
SLIDE 4

Use of ROBDDs

  • Comibatorial circuits
  • Sequential circuits
  • Automata
  • Combinatorial problems
  • Temporal logic model checking
  • Program analysis
  • …..
slide-5
SLIDE 5

Boolean Functions

slide-6
SLIDE 6

Truth Tables

2n entries in table!

slide-7
SLIDE 7

Combinatorial Circuits

Are these two circuits equivalent?

slide-8
SLIDE 8

Control Programs

A Train Simulator, visualSTATE (VVS)

1421 machines 11102 transitions 2981 inputs 2667 outputs 3204 local states Declared state sp.: 10^476

BUGS ?

“Ideal” presentation: 1 bit/state will clearly NOT work!

slide-9
SLIDE 9

“Good” Representations of Boolean Functions

Normalforms

– Disjunctive NF – Conjunctive NF – If-then-else NF – …….

THEOREM (Cook’s theorem) Satisfiability of Boolean expressions is NP-complete

Compact representations are

  • compact and
  • efficient
  • n real-life examples

Always perfect representations are hopeless

slide-10
SLIDE 10

Binary Decision Trees

Variable is set to 0 Variable is set to 1 Each path determines a partial (set of) truth assignments. Result of the boolean expression under the given assigment found in value of terminal.

slide-11
SLIDE 11

Binary Decision Diagrams

allow NODES to be shared

Equivalence ~ on nodes: n ~ m iff either both n and m are terminals and have the same value

  • r both are non-terminals with var(n) = var(m) and
  • 1. n’ ~ m’ when n -0-> n’ , m-0->m’ , and
  • 2. n’ ~ m’ when n -1-> n’ , m-1->m’

Have you seen this somewhere before?

slide-12
SLIDE 12

Orderedness & Reducedness TESTS

slide-13
SLIDE 13

Orderedness & Reducedness

x y z x x x

x<y x<z

slide-14
SLIDE 14

Reduced Ordered Binary Decision Diagrams

IBEN

Edges to 0 implicit

slide-15
SLIDE 15

ROBDDs formally

slide-16
SLIDE 16

Ordering does matter!

Variable ordering

slide-17
SLIDE 17

Canonicity of ROBDDs

slide-18
SLIDE 18

Canonicity of ROBDDs

slide-19
SLIDE 19

Array implementation

b

slide-20
SLIDE 20

Makenode and Hashing

slide-21
SLIDE 21

BUILD

Run time?

slide-22
SLIDE 22

Boolean operations on ROBDDs

slide-23
SLIDE 23

Boolean operations on ROBDDs

slide-24
SLIDE 24

APPLY example

slide-25
SLIDE 25

APPLY operation

slide-26
SLIDE 26

APPLY with dynamic programming

slide-27
SLIDE 27

Other operations

slide-28
SLIDE 28

Mia’s skema

geo bio 13-14 bio 14-15 gym gym fys fys fys gym 12-13 gym mat bio dan dan 11-12 tys dan tys dan eng 10-11 tys geo dan tys mat 9-10 eng tys dan eng mat 8-9

Sun Sat Fri Thu Wed Tue Mon

slide-29
SLIDE 29

ROBDD encoding of transition system

00 10 01 11

Trans(x1,x2,y1,y2):= !x1 & !x2 & !y1 & y2 + !x1 & !x2 & y1 & y2 + x1 & !x2 & !y1 & y2 + x1 & !x2 & y1 & y2 + x1 & x2 & y1 & !y2;

Encoding of states using binary variables (here x1 and x2). Encoding of transition relation using source and target variables (here x1, x2, y1, and y2)

slide-30
SLIDE 30

ROBDD representation (cont.)

Trans(x1,x2,y1,y2):= !x1 & !x2 & !y1 & y2 + !x1 & !x2 & y1 & y2 + x1 & !x2 & !y1 & y2 + x1 & !x2 & y1 & y2 + x1 & x2 & y1 & !y2;

00 10 01 11

slide-31
SLIDE 31

Reachable States

Reach(x) := Init(x); REPEAT Old(x) := Reach(x); New(y) := Exists x.(Reach(x) & Trans(x,y)); Reach(x) := Old(x) + New(x) UNTIL Old(x) = Reach(x)

00 10 01 11 Reach0 Reach1 Reach2 Reach1 Relational Product: May be constructed without building intermediate (often large) &-BDD.