Decision Procedures and Verifjcation NAIL094 Petr Kuera Charles - - PowerPoint PPT Presentation

decision procedures and verifjcation
SMART_READER_LITE
LIVE PREVIEW

Decision Procedures and Verifjcation NAIL094 Petr Kuera Charles - - PowerPoint PPT Presentation

Decision Procedures and Verifjcation NAIL094 Petr Kuera Charles University 2019/20 (5th lecture) Petr Kuera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 1 / 47 Solvers based on stochastic (local)


slide-1
SLIDE 1

Decision Procedures and Verifjcation

NAIL094 Petr Kučera

Charles University

2019/20 (5th lecture)

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 1 / 47

slide-2
SLIDE 2

Solvers based on stochastic (local) search

slide-3
SLIDE 3

Walking Around the Cube

Common idea: Pick a random assignment If it is not satisfying, pick a variable and fmip its value Restart with another assignment after a number of fmips Stops after a restart limit is reached — incomplete GSAT greedily fmip a variable which satisfjes the biggest number

  • f clauses

Selman, Leveque, and Mitchell, 1992 Last version 1st April, 2019 WalkSat alternate between greedy and random choices Bart Selman, Kautz, Cohen, et al., 1993 Both available at https://www.cs.rochester.edu/u/kautz/walksat

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 3 / 47

slide-4
SLIDE 4

GSAT (Selman, Leveque, and Mitchell, 1992)

Function GSAT(ϕ, t, f ) Input: CNF ϕ, max number of tries t, max number of fmips f Output: SAT or UNKNOWN for i = 1 to t do α ← random full assignment for j = 1 to f do if α satisfjes all clauses of ϕ then return SAT x ← variable whose fmipping gives the greatest decrease (possibly negative) in the number of unsatisfjed clauses α(x) ← ¬α(x) // fmip the value of x return UNKNOWN

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 4 / 47

slide-5
SLIDE 5

GSAT Example

Number of unsatisfjed clauses: 4 ϕ = ( x1 ∨ x2 ∨ ¬x3 ) ∧ ( x2 ∨ x3 ∨ x6 ) ∧ ( ¬x1 ∨ ¬x3 ∨ ¬x4 ) ∧ ( ¬x3 ∨ x4 ∨ x6 ) ∧ ( ¬x1 ∨ x4 ∨ ¬x5 ) ∧ ( x2 ∨ ¬x3 ∨ ¬x6 ) ∧ ( x1 ∨ ¬x3 ∨ ¬x5 ) ∧ ( ¬x2 ∨ x4 ∨ x6 ) ∧ ( x2 ∨ x4 ∨ ¬x5 ) x 1 2 3 4 5 6 α 1 1 unsatisfjed decrease

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 5 / 47

slide-6
SLIDE 6

GSAT Example

Number of unsatisfjed clauses: 4 ϕ = ( x1 ∨ x2 ∨ ¬x3 ) ∧ ( x2 ∨ x3 ∨ x6 ) ∧ ( ¬x1 ∨ ¬x3 ∨ ¬x4 ) ∧ ( ¬x3 ∨ x4 ∨ x6 ) ∧ ( ¬x1 ∨ x4 ∨ ¬x5 ) ∧ ( x2 ∨ ¬x3 ∨ ¬x6 ) ∧ ( x1 ∨ ¬x3 ∨ ¬x5 ) ∧ ( ¬x2 ∨ x4 ∨ x6 ) ∧ ( x2 ∨ x4 ∨ ¬x5 ) x 1 2 3 4 5 6 α 1 1 1 unsatisfjed 3 decrease 1

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 5 / 47

slide-7
SLIDE 7

GSAT Example

Number of unsatisfjed clauses: 4 ϕ = ( x1 ∨ x2 ∨ ¬x3 ) ∧ ( x2 ∨ x3 ∨ x6 ) ∧ ( ¬x1 ∨ ¬x3 ∨ ¬x4 ) ∧ ( ¬x3 ∨ x4 ∨ x6 ) ∧ ( ¬x1 ∨ x4 ∨ ¬x5 ) ∧ ( x2 ∨ ¬x3 ∨ ¬x6 ) ∧ ( x1 ∨ ¬x3 ∨ ¬x5 ) ∧ ( ¬x2 ∨ x4 ∨ x6 ) ∧ ( x2 ∨ x4 ∨ ¬x5 ) x 1 2 3 4 5 6 α 1 1 1 unsatisfjed 3 3 decrease 1 1

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 5 / 47

slide-8
SLIDE 8

GSAT Example

Number of unsatisfjed clauses: 4 ϕ = ( x1 ∨ x2 ∨ ¬x3 ) ∧ ( x2 ∨ x3 ∨ x6 ) ∧ ( ¬x1 ∨ ¬x3 ∨ ¬x4 ) ∧ ( ¬x3 ∨ x4 ∨ x6 ) ∧ ( ¬x1 ∨ x4 ∨ ¬x5 ) ∧ ( x2 ∨ ¬x3 ∨ ¬x6 ) ∧ ( x1 ∨ ¬x3 ∨ ¬x5 ) ∧ ( ¬x2 ∨ x4 ∨ x6 ) ∧ ( x2 ∨ x4 ∨ ¬x5 ) x 1 2 3 4 5 6 α 1 unsatisfjed 3 3 2 decrease 1 1 2

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 5 / 47

slide-9
SLIDE 9

GSAT Example

Number of unsatisfjed clauses: 4 ϕ = ( x1 ∨ x2 ∨ ¬x3 ) ∧ ( x2 ∨ x3 ∨ x6 ) ∧ ( ¬x1 ∨ ¬x3 ∨ ¬x4 ) ∧ ( ¬x3 ∨ x4 ∨ x6 ) ∧ ( ¬x1 ∨ x4 ∨ ¬x5 ) ∧ ( x2 ∨ ¬x3 ∨ ¬x6 ) ∧ ( x1 ∨ ¬x3 ∨ ¬x5 ) ∧ ( ¬x2 ∨ x4 ∨ x6 ) ∧ ( x2 ∨ x4 ∨ ¬x5 ) x 1 2 3 4 5 6 α 1 1 1 unsatisfjed 3 3 2 2 decrease 1 1 2 2

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 5 / 47

slide-10
SLIDE 10

GSAT Example

Number of unsatisfjed clauses: 4 ϕ = ( x1 ∨ x2 ∨ ¬x3 ) ∧ ( x2 ∨ x3 ∨ x6 ) ∧ ( ¬x1 ∨ ¬x3 ∨ ¬x4 ) ∧ ( ¬x3 ∨ x4 ∨ x6 ) ∧ ( ¬x1 ∨ x4 ∨ ¬x5 ) ∧ ( x2 ∨ ¬x3 ∨ ¬x6 ) ∧ ( x1 ∨ ¬x3 ∨ ¬x5 ) ∧ ( ¬x2 ∨ x4 ∨ x6 ) ∧ ( x2 ∨ x4 ∨ ¬x5 ) x 1 2 3 4 5 6 α 1 unsatisfjed 3 3 2 2 2 decrease 1 1 2 2 2

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 5 / 47

slide-11
SLIDE 11

GSAT Example

Number of unsatisfjed clauses: 4 ϕ = ( x1 ∨ x2 ∨ ¬x3 ) ∧ ( x2 ∨ x3 ∨ x6 ) ∧ ( ¬x1 ∨ ¬x3 ∨ ¬x4 ) ∧ ( ¬x3 ∨ x4 ∨ x6 ) ∧ ( ¬x1 ∨ x4 ∨ ¬x5 ) ∧ ( x2 ∨ ¬x3 ∨ ¬x6 ) ∧ ( x1 ∨ ¬x3 ∨ ¬x5 ) ∧ ( ¬x2 ∨ x4 ∨ x6 ) ∧ ( x2 ∨ x4 ∨ ¬x5 ) x 1 2 3 4 5 6 α 1 1 1 unsatisfjed 3 3 2 2 2 4 decrease 1 1 2 2 2

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 5 / 47

slide-12
SLIDE 12

GSAT Example

Number of unsatisfjed clauses: 4 ϕ = ( x1 ∨ x2 ∨ ¬x3 ) ∧ ( x2 ∨ x3 ∨ x6 ) ∧ ( ¬x1 ∨ ¬x3 ∨ ¬x4 ) ∧ ( ¬x3 ∨ x4 ∨ x6 ) ∧ ( ¬x1 ∨ x4 ∨ ¬x5 ) ∧ ( x2 ∨ ¬x3 ∨ ¬x6 ) ∧ ( x1 ∨ ¬x3 ∨ ¬x5 ) ∧ ( ¬x2 ∨ x4 ∨ x6 ) ∧ ( x2 ∨ x4 ∨ ¬x5 ) x 1 2 3 4 5 6 α 1 1 unsatisfjed 3 3 2 2 2 4 decrease 1 1 2 2 2 Flip variable x3 Variables x4 or x5 could have been chosen as well

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 5 / 47

slide-13
SLIDE 13

GSAT Example

Flipped x3 ϕ = ( x1 ∨ x2 ∨ ¬x3 ) ∧ ( x2 ∨ x3 ∨ x6 ) ∧ ( ¬x1 ∨ ¬x3 ∨ ¬x4 ) ∧ ( ¬x3 ∨ x4 ∨ x6 ) ∧ ( ¬x1 ∨ x4 ∨ ¬x5 ) ∧ ( x2 ∨ ¬x3 ∨ ¬x6 ) ∧ ( x1 ∨ ¬x3 ∨ ¬x5 ) ∧ ( ¬x2 ∨ x4 ∨ x6 ) ∧ ( x2 ∨ x4 ∨ ¬x5 ) x 1 2 3 4 5 6 α 1 Next, fmip x2 decrease 1 in the number of unsatisfjed clauses)

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 6 / 47

slide-14
SLIDE 14

GSAT Example

Flipped x2 ϕ = ( x1 ∨ x2 ∨ ¬x3 ) ∧ ( x2 ∨ x3 ∨ x6 ) ∧ ( ¬x1 ∨ ¬x3 ∨ ¬x4 ) ∧ ( ¬x3 ∨ x4 ∨ x6 ) ∧ ( ¬x1 ∨ x4 ∨ ¬x5 ) ∧ ( x2 ∨ ¬x3 ∨ ¬x6 ) ∧ ( x1 ∨ ¬x3 ∨ ¬x5 ) ∧ ( ¬x2 ∨ x4 ∨ x6 ) ∧ ( x2 ∨ x4 ∨ ¬x5 ) x 1 2 3 4 5 6 α 1 1 Next, fmip x4 decrease 1 in the number of unsatisfjed clauses)

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 7 / 47

slide-15
SLIDE 15

GSAT Example

Flipped x4 ϕ = ( x1 ∨ x2 ∨ ¬x3 ) ∧ ( x2 ∨ x3 ∨ x6 ) ∧ ( ¬x1 ∨ ¬x3 ∨ ¬x4 ) ∧ ( ¬x3 ∨ x4 ∨ x6 ) ∧ ( ¬x1 ∨ x4 ∨ ¬x5 ) ∧ ( x2 ∨ ¬x3 ∨ ¬x6 ) ∧ ( x1 ∨ ¬x3 ∨ ¬x5 ) ∧ ( ¬x2 ∨ x4 ∨ x6 ) ∧ ( x2 ∨ x4 ∨ ¬x5 ) x 1 2 3 4 5 6 α 1 1 1 All clauses are satisfjed

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 8 / 47

slide-16
SLIDE 16

WalkSAT (Bart Selman, Kautz, Cohen, et al., 1993)

Focused random walk with noise Noise p gives the probability of a random fmip Random walk with probability p

for instance 0.57 for random 3-CNFs

Greedy step with probablity 1 − p break-count of a variable x number of satisfjed clauses which become unsatisfjed after fmipping the value of x

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 9 / 47

slide-17
SLIDE 17

WalkSAT (Bart Selman, Kautz, Cohen, et al., 1993)

Function WalkSAT(ϕ, t, f )

Input: CNF ϕ, max number of tries t, max number of fmips f Output: SAT or UNKNOWN for i = 1 to t do α ← random full assignment for j = 1 to f do if α satisfjes all clauses of ϕ then return SAT C ← an unsatisfjed clause of ϕ chosen at random if C contains a variable x with break-count 0 then v ← x // freebie move else if rand(0,1) < p then // random walk move x ← a randomly chosen variable in C else // greedy move x ← variable in C with the smallest break-count α(v) ← ¬α(v) // fmip the value of v return UNKNOWN

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 10 / 47

slide-18
SLIDE 18

Stochastic search

Hard to add completeness to local search solvers efgectively CDCL solvers are getting closer to local search solvers with rapid restarts. Other approaches:

Message passing algorithms — iteratively change value of a variable according to efgect of related clauses Warning propagation (Feige, Mossel, and Vilenchik, 2006) Survey propagation

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 11 / 47

slide-19
SLIDE 19

Hardness of Random 3-CNF Formulas

500 1000 1500 2000 2500 3000 3500 4000 2 3 4 5 6 7 8 # of DP calls Ratio of clauses-to-variables 20--variable formulas 40--variable formulas 50--variable formulas

Peak at ratio α ≈ 4.26

Graph from the Handbook of Satisfjability (Biere et al., 2009) Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 12 / 47

slide-20
SLIDE 20

Phase Transition in Random 3-CNF Formulas

0.2 0.4 0.6 0.8 1 3 3.5 4 4.5 5 5.5 6 6.5 7 Fraction of unsatisfiable formulae M/N Threshold for 3SAT N = 12 N = 20 N = 24 N = 40 N = 50 N = 100

Graph from the Handbook of Satisfjability (Biere et al., 2009) Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 13 / 47

slide-21
SLIDE 21

Binary Decision Diagrams (BDDs)

slide-22
SLIDE 22

Binary Decision Diagrams (BDDs)

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 15 / 47

slide-23
SLIDE 23

Boolean Functions and their Representations

A boolean function f (x) on variables x = (x1, . . . , xn) is a mapping f ∶ {0, 1}n → {0, 1} Many possible representations Propositional formulas

Many equivalent formulas representing the same function For instance, all unsatisfjable formulas represent the constant 0 function f (x) = 0

(Reduced Ordered) Binary Decision Diagrams (OBDD)

Each function with a fjxed ordering of variables has a unique representation with a OBDD Effjcient query answering (consistency, equivalence, entailment) Effjcient manipulation (combination, conditioning, forgetting)

First step — Binary Decision Tree

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 16 / 47

slide-24
SLIDE 24

Boolean Functions and their Representations

A boolean function f (x) on variables x = (x1, . . . , xn) is a mapping f ∶ {0, 1}n → {0, 1} Many possible representations Propositional formulas

Many equivalent formulas representing the same function For instance, all unsatisfjable formulas represent the constant 0 function f (x) = 0

(Reduced Ordered) Binary Decision Diagrams (OBDD)

Each function with a fjxed ordering of variables has a unique representation with a OBDD Effjcient query answering (consistency, equivalence, entailment) Effjcient manipulation (combination, conditioning, forgetting)

First step — Binary Decision Tree

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 16 / 47

slide-25
SLIDE 25

Boolean Functions and their Representations

A boolean function f (x) on variables x = (x1, . . . , xn) is a mapping f ∶ {0, 1}n → {0, 1} Many possible representations Propositional formulas

Many equivalent formulas representing the same function For instance, all unsatisfjable formulas represent the constant 0 function f (x) = 0

(Reduced Ordered) Binary Decision Diagrams (OBDD)

Each function with a fjxed ordering of variables has a unique representation with a OBDD Effjcient query answering (consistency, equivalence, entailment) Effjcient manipulation (combination, conditioning, forgetting)

First step — Binary Decision Tree

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 16 / 47

slide-26
SLIDE 26

Boolean Functions and their Representations

A boolean function f (x) on variables x = (x1, . . . , xn) is a mapping f ∶ {0, 1}n → {0, 1} Many possible representations Propositional formulas

Many equivalent formulas representing the same function For instance, all unsatisfjable formulas represent the constant 0 function f (x) = 0

(Reduced Ordered) Binary Decision Diagrams (OBDD)

Each function with a fjxed ordering of variables has a unique representation with a OBDD Effjcient query answering (consistency, equivalence, entailment) Effjcient manipulation (combination, conditioning, forgetting)

First step — Binary Decision Tree

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 16 / 47

slide-27
SLIDE 27

Boolean Functions and their Representations

A boolean function f (x) on variables x = (x1, . . . , xn) is a mapping f ∶ {0, 1}n → {0, 1} Many possible representations Propositional formulas

Many equivalent formulas representing the same function For instance, all unsatisfjable formulas represent the constant 0 function f (x) = 0

(Reduced Ordered) Binary Decision Diagrams (OBDD)

Each function with a fjxed ordering of variables has a unique representation with a OBDD Effjcient query answering (consistency, equivalence, entailment) Effjcient manipulation (combination, conditioning, forgetting)

First step — Binary Decision Tree

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 16 / 47

slide-28
SLIDE 28

Boolean Functions and their Representations

A boolean function f (x) on variables x = (x1, . . . , xn) is a mapping f ∶ {0, 1}n → {0, 1} Many possible representations Propositional formulas

Many equivalent formulas representing the same function For instance, all unsatisfjable formulas represent the constant 0 function f (x) = 0

(Reduced Ordered) Binary Decision Diagrams (OBDD)

Each function with a fjxed ordering of variables has a unique representation with a OBDD Effjcient query answering (consistency, equivalence, entailment) Effjcient manipulation (combination, conditioning, forgetting)

First step — Binary Decision Tree

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 16 / 47

slide-29
SLIDE 29

Boolean Functions and their Representations

A boolean function f (x) on variables x = (x1, . . . , xn) is a mapping f ∶ {0, 1}n → {0, 1} Many possible representations Propositional formulas

Many equivalent formulas representing the same function For instance, all unsatisfjable formulas represent the constant 0 function f (x) = 0

(Reduced Ordered) Binary Decision Diagrams (OBDD)

Each function with a fjxed ordering of variables has a unique representation with a OBDD Effjcient query answering (consistency, equivalence, entailment) Effjcient manipulation (combination, conditioning, forgetting)

First step — Binary Decision Tree

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 16 / 47

slide-30
SLIDE 30

Boolean Functions and their Representations

A boolean function f (x) on variables x = (x1, . . . , xn) is a mapping f ∶ {0, 1}n → {0, 1} Many possible representations Propositional formulas

Many equivalent formulas representing the same function For instance, all unsatisfjable formulas represent the constant 0 function f (x) = 0

(Reduced Ordered) Binary Decision Diagrams (OBDD)

Each function with a fjxed ordering of variables has a unique representation with a OBDD Effjcient query answering (consistency, equivalence, entailment) Effjcient manipulation (combination, conditioning, forgetting)

First step — Binary Decision Tree

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 16 / 47

slide-31
SLIDE 31

Binary Decision Tree

Defjnition (Binary Decision Tree)

Let f (x) be a boolean function on variables x = (x1, . . . , xn). Assume fjxed ordering of variables: x1, x2, . . . , xn. Binary decision tree for f w.r.t. a given ordering of variables is a complete ordered binary tree with n + 1 levels where Nodes at level i are associated with variable xi. Leaves are labeled either 0 or 1 (false or true). Each inner node xi has two successors The two edges leading to successors of xi are labeled with 0 and 1, they represent assignments a(xi) = 0 and a(xi) = 1 respectively A path from the root to a leaf determines a complete valuation a ∶ x → {0, 1} and the leaf is labeled with truth value f (a)

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 17 / 47

slide-32
SLIDE 32

Binary Decision Tree (Example)

Consider function f (x1, x2, x3) defjned as (x1 ∧ x2) ∨ (¬x1 ∧ x3) with ordering of the variables x1, x2, x3 x1 x2 x2

1

x3 x3 x3 x3

1 1

1 1 1 1

1 1 1 1

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 18 / 47

slide-33
SLIDE 33

Reducing Binary Decision Trees

Node at level i represents a function on variables xi, . . . , xn Node at level n + 1 (a leaf) represents a constant function 0 or 1

Reduction Ideas

Merge isomorphic nodes

nodes representing the same function

Remove redundant nodes

left and right successor are the same node

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 19 / 47

slide-34
SLIDE 34

Reducing Binary Decision Trees

Node at level i represents a function on variables xi, . . . , xn Node at level n + 1 (a leaf) represents a constant function 0 or 1

Reduction Ideas

Merge isomorphic nodes

nodes representing the same function

Remove redundant nodes

left and right successor are the same node

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 19 / 47

slide-35
SLIDE 35

Reducing Binary Decision Trees

Node at level i represents a function on variables xi, . . . , xn Node at level n + 1 (a leaf) represents a constant function 0 or 1

Reduction Ideas

Merge isomorphic nodes

nodes representing the same function

Remove redundant nodes

left and right successor are the same node

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 19 / 47

slide-36
SLIDE 36

Reducing Binary Decision Trees

Node at level i represents a function on variables xi, . . . , xn Node at level n + 1 (a leaf) represents a constant function 0 or 1

Reduction Ideas

Merge isomorphic nodes

nodes representing the same function

Remove redundant nodes

left and right successor are the same node

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 19 / 47

slide-37
SLIDE 37

Merge Isomorphic Leaves

Merge leaves into two unique leaves: 0 and 1 f (x1, x2, x3) = (x1 ∧ x2) ∨ (¬x1 ∧ x3) x1 x2 x2

1

x3 x3 x3 x3 1

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 20 / 47

slide-38
SLIDE 38

Isomorphic Subtrees

Defjnition (Isomorphic subtrees)

Leaves representing the same value are isomorphic subtrees. Subtrees whose roots represent the same variable and their left and right subtrees respectively are isomorphic, are isomorphic as well.

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 21 / 47

slide-39
SLIDE 39

Isomorphic Subtrees

f (x1, x2, x3) = (x1 ∧ x2) ∨ (¬x1 ∧ x3) x1 x2 x2

1

x3 x3 x3 x3 1

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 22 / 47

slide-40
SLIDE 40

Merge Isomorphic Subtrees

f (x1, x2, x3) = (x1 ∧ x2) ∨ (¬x1 ∧ x3) x1 x2 x2

1

x3 x3 x3 1

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 23 / 47

slide-41
SLIDE 41

Remove Redundant Nodes

Defjnition (Redundant node)

Node v in a binary decision tree is redundant if its successor nodes are isomorphic After merging the isomorphic subtrees, a redundant node has a single successor (both left and right)

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 24 / 47

slide-42
SLIDE 42

Remove Redundant Nodes

f (x1, x2, x3) = (x1 ∧ x2) ∨ (¬x1 ∧ x3) x1 x2 x2

1

x3 x3 x3 1

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 25 / 47

slide-43
SLIDE 43

Remove Redundant Nodes

f (x1, x2, x3) = (x1 ∧ x2) ∨ (¬x1 ∧ x3) x1 x2

1

x3 x3 x3 1

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 25 / 47

slide-44
SLIDE 44

Remove Redundant Nodes

f (x1, x2, x3) = (x1 ∧ x2) ∨ (¬x1 ∧ x3) x1 x2

1

x3 x3 1

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 25 / 47

slide-45
SLIDE 45

Remove Redundant Nodes

f (x1, x2, x3) = (x1 ∧ x2) ∨ (¬x1 ∧ x3) x1 x2

1

x3 1

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 25 / 47

slide-46
SLIDE 46

Reductions of BDT

Reduction algorithm: Algorithm 1: Reducing a BDT Input: A Binary Decision Tree B repeat if B contains isomorphic nodes v1 and v2 then Merge v1 and v2 into a single node if B contains a redundant node v then Remove v from B until no reduction is possible Result is a (reduced) ordered binary decision diagram ((R)OBDD)

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 26 / 47

slide-47
SLIDE 47

Uniqueness of OBDDs

Lemma

Any boolean function f (x) has a unique OBDD. Namely, if B1 and B2 are two OBDDs which both represent f (x), then B1 = B2. Compact structure for representing all the satisfying and falsifying valuations of a formula. OBDD is similar to a fjnite automaton which simultaneously represents the languages T( f ) = {a ∈ {0, 1}n ∣ f (a) = 1} F( f ) = {a ∈ {0, 1}n ∣ f (a) = 0}

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 27 / 47

slide-48
SLIDE 48

Parity

Consider function of parity parityn(x1, . . . , xn) =

n

i=1

xi mod 2 True if odd number of inputs is true parityn has

a unique CNF with 2n−1 a unique DNF with 2n−1 an OBDD with Θ(n) nodes

OBDDs can be exponentially smaller than a CNF or DNF

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 28 / 47

slide-49
SLIDE 49

DNF for parity4(x1, x2, x3, x4)

parity4(x1, x2, x3, x4) = ( ¬x1 ∧ x2 ∧ x3 ∧ x4 ) ∨ ( x1 ∧ ¬x2 ∧ x3 ∧ x4 ) ∨ ( x1 ∧ x2 ∧ ¬x3 ∧ x4 ) ∨ ( x1 ∧ x2 ∧ x3 ∧ ¬x4 ) ∨ ( x1 ∧ ¬x2 ∧ ¬x3 ∧ ¬x4 ) ∨ ( ¬x1 ∧ x2 ∧ ¬x3 ∧ ¬x4 ) ∨ ( ¬x1 ∧ ¬x2 ∧ x3 ∧ ¬x4 ) ∨ ( ¬x1 ∧ ¬x2 ∧ ¬x3 ∧ x4 ) Describes the set of models (with odd number of 1’s) Size 24−1 = 8

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 29 / 47

slide-50
SLIDE 50

CNF for parity4(x1, x2, x3, x4)

parity4(x1, x2, x3, x4) = ( x1 ∨ x2 ∨ x3 ∨ x4 ) ∧ ( x1 ∨ x2 ∨ ¬x3 ∨ ¬x4 ) ∧ ( x1 ∨ ¬x2 ∨ x3 ∨ ¬x4 ) ∧ ( x1 ∨ ¬x2 ∨ ¬x3 ∨ x4 ) ∧ ( ¬x1 ∨ x2 ∨ x3 ∨ ¬x4 ) ∧ ( ¬x1 ∨ x2 ∨ ¬x3 ∨ x4 ) ∧ ( ¬x1 ∨ ¬x2 ∨ x3 ∨ x4 ) ∧ ( ¬x1 ∨ ¬x2 ∨ ¬x3 ∨ ¬x4 ) Describes the set of false assignments (with even number of 1’s) Size 24−1 = 8

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 30 / 47

slide-51
SLIDE 51

OBDD for parity3(x1, x2, x3)

x1 x2 x2

1

x3 x3 x4 x4 1

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 31 / 47

slide-52
SLIDE 52

Comparing OBDDs and CNFs

OBDD for parityn is exponentially smaller than CNF There are CNF formulas representing functions which have exponentially bigger OBDDs Sizes of OBDDs and CNF formulas are incomparable

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 32 / 47

slide-53
SLIDE 53

Inductive Construction of an OBDD

Given a propositional formula ϕ, we want to construct an OBDD for the function represented by ϕ Assuming a fjxed order of variables Inductive construction according to the structure of the formula

Construct OBDD for the formula from OBDDs of its subformulas.

Notation: Given a CNF ϕ, we use Bϕ to denote both the function represented by ϕ and its OBDD.

Defjnition (Boolean function restriction)

For v ∈ {0, 1} we denote Bϕ∣x=v the Boolean function Bϕ after assigning v to variable x. Bϕ∣x=0 and Bϕ∣x=1 are restrictions of Bϕ w.r.t. variable x.

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 33 / 47

slide-54
SLIDE 54

Inductive Construction of an OBDD

Given a propositional formula ϕ, we want to construct an OBDD for the function represented by ϕ Assuming a fjxed order of variables Inductive construction according to the structure of the formula

Construct OBDD for the formula from OBDDs of its subformulas.

Notation: Given a CNF ϕ, we use Bϕ to denote both the function represented by ϕ and its OBDD.

Defjnition (Boolean function restriction)

For v ∈ {0, 1} we denote Bϕ∣x=v the Boolean function Bϕ after assigning v to variable x. Bϕ∣x=0 and Bϕ∣x=1 are restrictions of Bϕ w.r.t. variable x.

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 33 / 47

slide-55
SLIDE 55

Inductive Construction of an OBDD

Given a propositional formula ϕ, we want to construct an OBDD for the function represented by ϕ Assuming a fjxed order of variables Inductive construction according to the structure of the formula

Construct OBDD for the formula from OBDDs of its subformulas.

Notation: Given a CNF ϕ, we use Bϕ to denote both the function represented by ϕ and its OBDD.

Defjnition (Boolean function restriction)

For v ∈ {0, 1} we denote Bϕ∣x=v the Boolean function Bϕ after assigning v to variable x. Bϕ∣x=0 and Bϕ∣x=1 are restrictions of Bϕ w.r.t. variable x.

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 33 / 47

slide-56
SLIDE 56

Inductive Construction of an OBDD

Given a propositional formula ϕ, we want to construct an OBDD for the function represented by ϕ Assuming a fjxed order of variables Inductive construction according to the structure of the formula

Construct OBDD for the formula from OBDDs of its subformulas.

Notation: Given a CNF ϕ, we use Bϕ to denote both the function represented by ϕ and its OBDD.

Defjnition (Boolean function restriction)

For v ∈ {0, 1} we denote Bϕ∣x=v the Boolean function Bϕ after assigning v to variable x. Bϕ∣x=0 and Bϕ∣x=1 are restrictions of Bϕ w.r.t. variable x.

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 33 / 47

slide-57
SLIDE 57

Inductive Construction of an OBDD

Given a propositional formula ϕ, we want to construct an OBDD for the function represented by ϕ Assuming a fjxed order of variables Inductive construction according to the structure of the formula

Construct OBDD for the formula from OBDDs of its subformulas.

Notation: Given a CNF ϕ, we use Bϕ to denote both the function represented by ϕ and its OBDD.

Defjnition (Boolean function restriction)

For v ∈ {0, 1} we denote Bϕ∣x=v the Boolean function Bϕ after assigning v to variable x. Bϕ∣x=0 and Bϕ∣x=1 are restrictions of Bϕ w.r.t. variable x.

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 33 / 47

slide-58
SLIDE 58

Inductive Construction of an OBDD

Given a propositional formula ϕ, we want to construct an OBDD for the function represented by ϕ Assuming a fjxed order of variables Inductive construction according to the structure of the formula

Construct OBDD for the formula from OBDDs of its subformulas.

Notation: Given a CNF ϕ, we use Bϕ to denote both the function represented by ϕ and its OBDD.

Defjnition (Boolean function restriction)

For v ∈ {0, 1} we denote Bϕ∣x=v the Boolean function Bϕ after assigning v to variable x. Bϕ∣x=0 and Bϕ∣x=1 are restrictions of Bϕ w.r.t. variable x.

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 33 / 47

slide-59
SLIDE 59

Inductive Construction of an OBDD

Given a propositional formula ϕ, we want to construct an OBDD for the function represented by ϕ Assuming a fjxed order of variables Inductive construction according to the structure of the formula

Construct OBDD for the formula from OBDDs of its subformulas.

Notation: Given a CNF ϕ, we use Bϕ to denote both the function represented by ϕ and its OBDD.

Defjnition (Boolean function restriction)

For v ∈ {0, 1} we denote Bϕ∣x=v the Boolean function Bϕ after assigning v to variable x. Bϕ∣x=0 and Bϕ∣x=1 are restrictions of Bϕ w.r.t. variable x.

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 33 / 47

slide-60
SLIDE 60

Construction of a Restriction in OBDD

x1

x2 x3 1 x1

Bϕ∣x2=0

x3 1 x1

Bϕ∣x2=1

x3 1

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 34 / 47

slide-61
SLIDE 61

Inductive Construction of OBDD

Let u be the root of OBDD Bϕ and v be a root of OBDD Bψ. Let ⊗ stand for a binary connective (∧, ∨). Then OBDD for ϕ ⊗ ψ is defjned recursively as follows:

1 If u and v are both leaves then OBDD Bϕ ⊗ Bψ is a leaf with value

val(u) ⊗ val(v)

2 If var(u) = var(v) = x, use Shannon expansion:

Bϕ ⊗ Bψ = (¬x ∧ (Bϕ∣x=0 ⊗ Bψ∣x=0)) ∨ (x ∧ (Bϕ∣x=1 ⊗ Bψ∣x=1))

3 If var(u) ≠ var(v) (and w.l.o.g. var(u) = x precedes var(v)) then

use a modifjed Shannon expansion: Bϕ ⊗ Bψ = (¬x ∧ (Bϕ∣x=0 ⊗ Bψ)) ∨ (x ∧ (Bϕ∣x=1 ⊗ Bψ))

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 35 / 47

slide-62
SLIDE 62

Inductive Construction of OBDD

Let u be the root of OBDD Bϕ and v be a root of OBDD Bψ. Let ⊗ stand for a binary connective (∧, ∨). Then OBDD for ϕ ⊗ ψ is defjned recursively as follows:

1 If u and v are both leaves then OBDD Bϕ ⊗ Bψ is a leaf with value

val(u) ⊗ val(v)

2 If var(u) = var(v) = x, use Shannon expansion:

Bϕ ⊗ Bψ = (¬x ∧ (Bϕ∣x=0 ⊗ Bψ∣x=0)) ∨ (x ∧ (Bϕ∣x=1 ⊗ Bψ∣x=1))

3 If var(u) ≠ var(v) (and w.l.o.g. var(u) = x precedes var(v)) then

use a modifjed Shannon expansion: Bϕ ⊗ Bψ = (¬x ∧ (Bϕ∣x=0 ⊗ Bψ)) ∨ (x ∧ (Bϕ∣x=1 ⊗ Bψ))

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 35 / 47

slide-63
SLIDE 63

Inductive Construction of OBDD

Let u be the root of OBDD Bϕ and v be a root of OBDD Bψ. Let ⊗ stand for a binary connective (∧, ∨). Then OBDD for ϕ ⊗ ψ is defjned recursively as follows:

1 If u and v are both leaves then OBDD Bϕ ⊗ Bψ is a leaf with value

val(u) ⊗ val(v)

2 If var(u) = var(v) = x, use Shannon expansion:

Bϕ ⊗ Bψ = (¬x ∧ (Bϕ∣x=0 ⊗ Bψ∣x=0)) ∨ (x ∧ (Bϕ∣x=1 ⊗ Bψ∣x=1))

3 If var(u) ≠ var(v) (and w.l.o.g. var(u) = x precedes var(v)) then

use a modifjed Shannon expansion: Bϕ ⊗ Bψ = (¬x ∧ (Bϕ∣x=0 ⊗ Bψ)) ∨ (x ∧ (Bϕ∣x=1 ⊗ Bψ))

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 35 / 47

slide-64
SLIDE 64

Shannon Expansion

Bϕ ⊗ Bψ = (¬x ∧ (Bϕ∣x=0 ⊗ Bψ∣x=0)) ∨ (x ∧ (Bϕ∣x=1 ⊗ Bψ∣x=1)) Bϕ ⊗ Bψ x Bϕ∣x=0 ⊗ Bψ∣x=0 Bϕ∣x=1 ⊗ Bψ∣x=1

1

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 36 / 47

slide-65
SLIDE 65

Modifjed Shannon Expansion

Bϕ ⊗ Bψ = (¬x ∧ (Bϕ∣x=0 ⊗ Bψ)) ∨ (x ∧ (Bϕ∣x=1 ⊗ Bψ)) Bϕ ⊗ Bψ x Bϕ∣x=0 ⊗ Bψ Bϕ∣x=1 ⊗ Bψ

1

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 37 / 47

slide-66
SLIDE 66

Inductive Construction of OBDD (Example)

Assume

OBDD Bϕ for ϕ = (¬x1 ∨ x2) ∧ (x1 ∨ ¬x2) and OBDD Bψ for ψ = ¬x2.

Construct OBDD for ϕ ∨ ψ with variable ordering x1, x2. x1

x2 x2 1 x2

1

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 38 / 47

slide-67
SLIDE 67

Inductive Construction of OBDD (Example)

Bϕ ∨ Bψ = (¬x1 ∧ (Bϕ∣x1=0 ∨ Bψ) ∨ (x1 ∧ (Bϕ∣x1=1 ∨ Bψ))) x1

Bϕ ∨ Bψ

OBDD Bϕ∣x1=0 ∨ Bψ OBDD Bϕ∣x1=1 ∨ Bψ OBDD

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 39 / 47

slide-68
SLIDE 68

Inductive Construction of OBDD (Example)

Bϕ ∨ Bψ = (¬x1 ∧ (Bϕ∣x1=0 ∨ Bψ) ∨ (x1 ∧ (Bϕ∣x1=1 ∨ Bψ))) x1

Bϕ ∨ Bψ

OBDD Bϕ∣x1=0 ∨ Bψ OBDD Bϕ∣x1=1 ∨ Bψ OBDD Bϕ∣x1=0 ∨ Bψ x2

Bϕ∣x1=0

1 x2

1 x2

Bϕ∣x1=0 ∨ Bψ

1

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 39 / 47

slide-69
SLIDE 69

Inductive Construction of OBDD (Example)

OBDD Bϕ∣x1=1 ∨ Bψ x2

Bϕ∣x1=1

1 x2

1 1

Bϕ∣x1=1 ∨ Bψ

Resulting OBDD

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 40 / 47

slide-70
SLIDE 70

Inductive Construction of OBDD (Example)

OBDD Bϕ∣x1=1 ∨ Bψ x2

Bϕ∣x1=1

1 x2

1 1

Bϕ∣x1=1 ∨ Bψ

Resulting OBDD x1

Bϕ ∨ Bψ

x2 1

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 40 / 47

slide-71
SLIDE 71

OBDD Sizes

∥B∥ denotes the size of OBDD B (number of nodes) ∥Bϕ ⊗ Bψ∥ = O(∥Bϕ∥ ⋅ ∥Bψ∥) Size of OBDDs can be exponential w.r.t. the number of variables

Depends on the variable ordering f (x1, . . . , x2n) = (x1 ∧ x2) ∨ ⋅⋅⋅ ∨ (x2n−1 ∧ x2n)

2n+1 nodes for x1 < x3 < . . . x2n−1 < x2 < x4 < ⋅ ⋅ ⋅ < x2n 2n + 2 nodes for x1 < x2 < x3 < ⋅ ⋅ ⋅ < x2n−1 < x2n

Finding the best variable ordering is NP-hard Good heuristics exist

Applications: circuit synthesis, formal verifjcation, … CUDD — library for working with OBDDs

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 41 / 47

slide-72
SLIDE 72

OBDD Sizes

∥B∥ denotes the size of OBDD B (number of nodes) ∥Bϕ ⊗ Bψ∥ = O(∥Bϕ∥ ⋅ ∥Bψ∥) Size of OBDDs can be exponential w.r.t. the number of variables

Depends on the variable ordering f (x1, . . . , x2n) = (x1 ∧ x2) ∨ ⋅⋅⋅ ∨ (x2n−1 ∧ x2n)

2n+1 nodes for x1 < x3 < . . . x2n−1 < x2 < x4 < ⋅ ⋅ ⋅ < x2n 2n + 2 nodes for x1 < x2 < x3 < ⋅ ⋅ ⋅ < x2n−1 < x2n

Finding the best variable ordering is NP-hard Good heuristics exist

Applications: circuit synthesis, formal verifjcation, … CUDD — library for working with OBDDs

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 41 / 47

slide-73
SLIDE 73

OBDD Sizes

∥B∥ denotes the size of OBDD B (number of nodes) ∥Bϕ ⊗ Bψ∥ = O(∥Bϕ∥ ⋅ ∥Bψ∥) Size of OBDDs can be exponential w.r.t. the number of variables

Depends on the variable ordering f (x1, . . . , x2n) = (x1 ∧ x2) ∨ ⋅⋅⋅ ∨ (x2n−1 ∧ x2n)

2n+1 nodes for x1 < x3 < . . . x2n−1 < x2 < x4 < ⋅ ⋅ ⋅ < x2n 2n + 2 nodes for x1 < x2 < x3 < ⋅ ⋅ ⋅ < x2n−1 < x2n

Finding the best variable ordering is NP-hard Good heuristics exist

Applications: circuit synthesis, formal verifjcation, … CUDD — library for working with OBDDs

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 41 / 47

slide-74
SLIDE 74

OBDD Sizes

∥B∥ denotes the size of OBDD B (number of nodes) ∥Bϕ ⊗ Bψ∥ = O(∥Bϕ∥ ⋅ ∥Bψ∥) Size of OBDDs can be exponential w.r.t. the number of variables

Depends on the variable ordering f (x1, . . . , x2n) = (x1 ∧ x2) ∨ ⋅⋅⋅ ∨ (x2n−1 ∧ x2n)

2n+1 nodes for x1 < x3 < . . . x2n−1 < x2 < x4 < ⋅ ⋅ ⋅ < x2n 2n + 2 nodes for x1 < x2 < x3 < ⋅ ⋅ ⋅ < x2n−1 < x2n

Finding the best variable ordering is NP-hard Good heuristics exist

Applications: circuit synthesis, formal verifjcation, … CUDD — library for working with OBDDs

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 41 / 47

slide-75
SLIDE 75

OBDD Sizes

∥B∥ denotes the size of OBDD B (number of nodes) ∥Bϕ ⊗ Bψ∥ = O(∥Bϕ∥ ⋅ ∥Bψ∥) Size of OBDDs can be exponential w.r.t. the number of variables

Depends on the variable ordering f (x1, . . . , x2n) = (x1 ∧ x2) ∨ ⋅⋅⋅ ∨ (x2n−1 ∧ x2n)

2n+1 nodes for x1 < x3 < . . . x2n−1 < x2 < x4 < ⋅ ⋅ ⋅ < x2n 2n + 2 nodes for x1 < x2 < x3 < ⋅ ⋅ ⋅ < x2n−1 < x2n

Finding the best variable ordering is NP-hard Good heuristics exist

Applications: circuit synthesis, formal verifjcation, … CUDD — library for working with OBDDs

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 41 / 47

slide-76
SLIDE 76

Transformations

OBDD allow following polytime transformations all OBDDs must have the same ordering of variables Conditioning Apply a partial assignment to an OBDD Singleton Forgetting Given an OBDD B(x) and a variable x, compute OBDD for (∃x)[B(x)] Bounded Conjunction Given two OBDDs B1 and B2 compute the OBDD B representing B1 ∧ B2 Bounded Disjunction Given two OBDDs B1 and B2 compute the OBDD B representing B1 ∨ B2 Negation Given OBDD B, compute OBDD for ¬B

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 42 / 47

slide-77
SLIDE 77

Transformations

OBDD allow following polytime transformations all OBDDs must have the same ordering of variables Conditioning Apply a partial assignment to an OBDD Singleton Forgetting Given an OBDD B(x) and a variable x, compute OBDD for (∃x)[B(x)] Bounded Conjunction Given two OBDDs B1 and B2 compute the OBDD B representing B1 ∧ B2 Bounded Disjunction Given two OBDDs B1 and B2 compute the OBDD B representing B1 ∨ B2 Negation Given OBDD B, compute OBDD for ¬B

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 42 / 47

slide-78
SLIDE 78

Transformations

OBDD allow following polytime transformations all OBDDs must have the same ordering of variables Conditioning Apply a partial assignment to an OBDD Singleton Forgetting Given an OBDD B(x) and a variable x, compute OBDD for (∃x)[B(x)] Bounded Conjunction Given two OBDDs B1 and B2 compute the OBDD B representing B1 ∧ B2 Bounded Disjunction Given two OBDDs B1 and B2 compute the OBDD B representing B1 ∨ B2 Negation Given OBDD B, compute OBDD for ¬B

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 42 / 47

slide-79
SLIDE 79

Transformations

OBDD allow following polytime transformations all OBDDs must have the same ordering of variables Conditioning Apply a partial assignment to an OBDD Singleton Forgetting Given an OBDD B(x) and a variable x, compute OBDD for (∃x)[B(x)] Bounded Conjunction Given two OBDDs B1 and B2 compute the OBDD B representing B1 ∧ B2 Bounded Disjunction Given two OBDDs B1 and B2 compute the OBDD B representing B1 ∨ B2 Negation Given OBDD B, compute OBDD for ¬B

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 42 / 47

slide-80
SLIDE 80

Transformations

OBDD allow following polytime transformations all OBDDs must have the same ordering of variables Conditioning Apply a partial assignment to an OBDD Singleton Forgetting Given an OBDD B(x) and a variable x, compute OBDD for (∃x)[B(x)] Bounded Conjunction Given two OBDDs B1 and B2 compute the OBDD B representing B1 ∧ B2 Bounded Disjunction Given two OBDDs B1 and B2 compute the OBDD B representing B1 ∨ B2 Negation Given OBDD B, compute OBDD for ¬B

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 42 / 47

slide-81
SLIDE 81

Query Answering

OBDD allow to answer the following queries in polytime all OBDDs must have the same ordering of variables Consistency Check Does a given OBDD B admit a model? Validity Check Is a given OBDD B valid/tautology? Clausal Entailment Is a clause C implied by OBDD B? B ⊧ C Equivalence Are two OBDDs B1 and B2 equivalent? Sentential Entailment Does an OBDD B1 imply another OBDD B2? B1 ⊧ B2? Model Counting How many models does an OBDD B have? Model Enumeration List all models of an OBDD B with poly delay

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 43 / 47

slide-82
SLIDE 82

Query Answering

OBDD allow to answer the following queries in polytime all OBDDs must have the same ordering of variables Consistency Check Does a given OBDD B admit a model? Validity Check Is a given OBDD B valid/tautology? Clausal Entailment Is a clause C implied by OBDD B? B ⊧ C Equivalence Are two OBDDs B1 and B2 equivalent? Sentential Entailment Does an OBDD B1 imply another OBDD B2? B1 ⊧ B2? Model Counting How many models does an OBDD B have? Model Enumeration List all models of an OBDD B with poly delay

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 43 / 47

slide-83
SLIDE 83

Query Answering

OBDD allow to answer the following queries in polytime all OBDDs must have the same ordering of variables Consistency Check Does a given OBDD B admit a model? Validity Check Is a given OBDD B valid/tautology? Clausal Entailment Is a clause C implied by OBDD B? B ⊧ C Equivalence Are two OBDDs B1 and B2 equivalent? Sentential Entailment Does an OBDD B1 imply another OBDD B2? B1 ⊧ B2? Model Counting How many models does an OBDD B have? Model Enumeration List all models of an OBDD B with poly delay

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 43 / 47

slide-84
SLIDE 84

Query Answering

OBDD allow to answer the following queries in polytime all OBDDs must have the same ordering of variables Consistency Check Does a given OBDD B admit a model? Validity Check Is a given OBDD B valid/tautology? Clausal Entailment Is a clause C implied by OBDD B? B ⊧ C Equivalence Are two OBDDs B1 and B2 equivalent? Sentential Entailment Does an OBDD B1 imply another OBDD B2? B1 ⊧ B2? Model Counting How many models does an OBDD B have? Model Enumeration List all models of an OBDD B with poly delay

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 43 / 47

slide-85
SLIDE 85

Query Answering

OBDD allow to answer the following queries in polytime all OBDDs must have the same ordering of variables Consistency Check Does a given OBDD B admit a model? Validity Check Is a given OBDD B valid/tautology? Clausal Entailment Is a clause C implied by OBDD B? B ⊧ C Equivalence Are two OBDDs B1 and B2 equivalent? Sentential Entailment Does an OBDD B1 imply another OBDD B2? B1 ⊧ B2? Model Counting How many models does an OBDD B have? Model Enumeration List all models of an OBDD B with poly delay

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 43 / 47

slide-86
SLIDE 86

Query Answering

OBDD allow to answer the following queries in polytime all OBDDs must have the same ordering of variables Consistency Check Does a given OBDD B admit a model? Validity Check Is a given OBDD B valid/tautology? Clausal Entailment Is a clause C implied by OBDD B? B ⊧ C Equivalence Are two OBDDs B1 and B2 equivalent? Sentential Entailment Does an OBDD B1 imply another OBDD B2? B1 ⊧ B2? Model Counting How many models does an OBDD B have? Model Enumeration List all models of an OBDD B with poly delay

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 43 / 47

slide-87
SLIDE 87

Query Answering

OBDD allow to answer the following queries in polytime all OBDDs must have the same ordering of variables Consistency Check Does a given OBDD B admit a model? Validity Check Is a given OBDD B valid/tautology? Clausal Entailment Is a clause C implied by OBDD B? B ⊧ C Equivalence Are two OBDDs B1 and B2 equivalent? Sentential Entailment Does an OBDD B1 imply another OBDD B2? B1 ⊧ B2? Model Counting How many models does an OBDD B have? Model Enumeration List all models of an OBDD B with poly delay

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 43 / 47

slide-88
SLIDE 88

Query Answering

OBDD allow to answer the following queries in polytime all OBDDs must have the same ordering of variables Consistency Check Does a given OBDD B admit a model? Validity Check Is a given OBDD B valid/tautology? Clausal Entailment Is a clause C implied by OBDD B? B ⊧ C Equivalence Are two OBDDs B1 and B2 equivalent? Sentential Entailment Does an OBDD B1 imply another OBDD B2? B1 ⊧ B2? Model Counting How many models does an OBDD B have? Model Enumeration List all models of an OBDD B with poly delay

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 43 / 47

slide-89
SLIDE 89

Query Answering

OBDD allow to answer the following queries in polytime all OBDDs must have the same ordering of variables Consistency Check Does a given OBDD B admit a model? Validity Check Is a given OBDD B valid/tautology? Clausal Entailment Is a clause C implied by OBDD B? B ⊧ C Equivalence Are two OBDDs B1 and B2 equivalent? Sentential Entailment Does an OBDD B1 imply another OBDD B2? B1 ⊧ B2? Model Counting How many models does an OBDD B have? Model Enumeration List all models of an OBDD B with poly delay

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 43 / 47

slide-90
SLIDE 90

Related structures

Free BDD (FBDD) difgerent branches can have difgerent orders of variables Decomposable NNF (DNNF) ∧ nodes have to satisfy decomposability property deterministic DNNF (d-DNNF) ∨ nodes have to be deterministic, allows model counting Decision NNF decision (if-then-else) nodes like in a decision diagrams, in addition to decomposable conjunction nodes Sentential Decision Diagram (SDD) Decision in a node based on a set

  • f formulas, not a single variable

similar properties to OBDDs (Darwiche, 2011) SDD library for manipulating SDDs PySDD Python library for manipulating SDDs See (Darwiche and Marquis, 2002) for more variants

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 44 / 47

slide-91
SLIDE 91

Related structures

Free BDD (FBDD) difgerent branches can have difgerent orders of variables Decomposable NNF (DNNF) ∧ nodes have to satisfy decomposability property deterministic DNNF (d-DNNF) ∨ nodes have to be deterministic, allows model counting Decision NNF decision (if-then-else) nodes like in a decision diagrams, in addition to decomposable conjunction nodes Sentential Decision Diagram (SDD) Decision in a node based on a set

  • f formulas, not a single variable

similar properties to OBDDs (Darwiche, 2011) SDD library for manipulating SDDs PySDD Python library for manipulating SDDs See (Darwiche and Marquis, 2002) for more variants

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 44 / 47

slide-92
SLIDE 92

Related structures

Free BDD (FBDD) difgerent branches can have difgerent orders of variables Decomposable NNF (DNNF) ∧ nodes have to satisfy decomposability property deterministic DNNF (d-DNNF) ∨ nodes have to be deterministic, allows model counting Decision NNF decision (if-then-else) nodes like in a decision diagrams, in addition to decomposable conjunction nodes Sentential Decision Diagram (SDD) Decision in a node based on a set

  • f formulas, not a single variable

similar properties to OBDDs (Darwiche, 2011) SDD library for manipulating SDDs PySDD Python library for manipulating SDDs See (Darwiche and Marquis, 2002) for more variants

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 44 / 47

slide-93
SLIDE 93

Related structures

Free BDD (FBDD) difgerent branches can have difgerent orders of variables Decomposable NNF (DNNF) ∧ nodes have to satisfy decomposability property deterministic DNNF (d-DNNF) ∨ nodes have to be deterministic, allows model counting Decision NNF decision (if-then-else) nodes like in a decision diagrams, in addition to decomposable conjunction nodes Sentential Decision Diagram (SDD) Decision in a node based on a set

  • f formulas, not a single variable

similar properties to OBDDs (Darwiche, 2011) SDD library for manipulating SDDs PySDD Python library for manipulating SDDs See (Darwiche and Marquis, 2002) for more variants

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 44 / 47

slide-94
SLIDE 94

Related structures

Free BDD (FBDD) difgerent branches can have difgerent orders of variables Decomposable NNF (DNNF) ∧ nodes have to satisfy decomposability property deterministic DNNF (d-DNNF) ∨ nodes have to be deterministic, allows model counting Decision NNF decision (if-then-else) nodes like in a decision diagrams, in addition to decomposable conjunction nodes Sentential Decision Diagram (SDD) Decision in a node based on a set

  • f formulas, not a single variable

similar properties to OBDDs (Darwiche, 2011) SDD library for manipulating SDDs PySDD Python library for manipulating SDDs See (Darwiche and Marquis, 2002) for more variants

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 44 / 47

slide-95
SLIDE 95

References

slide-96
SLIDE 96

References I

Biere, A. et al. (2009). Handbook of Satisfjability. Vol. 185. Frontiers in Artifjcial Intelligence and Applications. Amsterdam, The Netherlands: IOS Press. isbn: 1586039296, 9781586039295. Darwiche, Adnan (2011). “SDD: A New Canonical Representation of Propositional Knowledge Bases”. In: Proceedings of the Twenty-Second International Joint Conference on Artifjcial Intelligence - Volume Volume Two. IJCAI’11. Barcelona, Catalonia, Spain: AAAI Press, pp. 819–826. isbn: 978-1-57735-514-4. doi: 10.5591/978-1-57735-516-8/IJCAI11-143. Darwiche, Adnan and Pierre Marquis (2002). “A Knowledge Compilation Map”. In: Journal of Artifjcial Intelligence Research 17,

  • pp. 229–264.

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 46 / 47

slide-97
SLIDE 97

References II

Feige, Uriel, Elchanan Mossel, and Dan Vilenchik (2006). “Complete Convergence of Message Passing Algorithms for Some Satisfjability Problems”. In: Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques.

  • Ed. by Josep Díaz et al. Berlin, Heidelberg: Springer Berlin

Heidelberg, pp. 339–350. isbn: 978-3-540-38045-0. Selman, B, H Leveque, and D Mitchell (1992). “A new method for solving hard satisfjability problems”. In: Proceedings of the Tenth National Conference on Artifjcial Intelligence (AAAI-92),

  • pp. 440–446.

Selman, Bart, Henry A Kautz, Bram Cohen, et al. (1993). “Local search strategies for satisfjability testing.”. In: Cliques, coloring, and satisfjability 26, pp. 521–532.

Petr Kučera (Charles University) Decision Procedures and Verifjcation 2019/20 (5th lecture) 47 / 47