Presentation is loading. Please wait.

Presentation is loading. Please wait.

Reachability Analysis using AIGs (instead of BDDs?) 290N: The Unknown Component Problem Lecture 23.

Similar presentations


Presentation on theme: "Reachability Analysis using AIGs (instead of BDDs?) 290N: The Unknown Component Problem Lecture 23."— Presentation transcript:

1 Reachability Analysis using AIGs (instead of BDDs?) 290N: The Unknown Component Problem Lecture 23

2 Outline  AND-INV graphs (AIGs) Non-canonicity Non-canonicity Structural hashing Structural hashing Applications Applications  Reachability analysis (implementation using AIGs) Image computation Image computation Boolean operations Boolean operations Structural fixed point Structural fixed point  Discussion (advantages and disadvantages compared to BDDs) Delayed Boolean operations Delayed Boolean operations Need efficient logic synthesis for highly redundant AIGs Need efficient logic synthesis for highly redundant AIGs  Developing a hybrid approach (combining AIGs and BDDs) Collapsing Collapsing Sliding boundary Sliding boundary Other methods? Other methods?

3 And/Inverter Graphs (AIGs)  Example  Non-canonicity  Structural hashing  Typical applications

4 Example cd ab 00011110 000010 010011 110110 100010 F(a,b,c,d) = ab + d(ac’+bc) F(a,b,c,d) = ac’(b’d’)’ + c(a’d’)’ = ac’(b+d) + bc(a+d) cd ab 00011110000010 010011 110110 100010 ac’bdbcad bca a b d

5 Structural Hashing  No structural hashing Always add a new AND-node Always add a new AND-node  One-level structural hashing When a new AND-node is to be added, check a hash table for an existence of a node with the same pair of inputs; if it exists, return it; otherwise, create a new node When a new AND-node is to be added, check a hash table for an existence of a node with the same pair of inputs; if it exists, return it; otherwise, create a new node  Two-level structural hashing When a new AND-node is to be added, consider its predecessors, and hash the three AND-gates into a canonical form (two-level canonicity) When a new AND-node is to be added, consider its predecessors, and hash the three AND-gates into a canonical form (two-level canonicity)

6 Applications of AIGs  A data structure for circuit-based SAT  A data structure for EC and BMC  A alternative representation of functionality of a node in the Boolean network  A uniform representation for both algebraic factored forms, and algebraic factored forms, and the result of Boolean decomposition the result of Boolean decomposition

7 Reachability Analysis using AIGs  Computation using AIGs  Reachability pseudo-code  Using AIGs for reachability  Example  Structural fixed point  Consequences

8 Using AIGs for Computation  Boolean operations Express an operation in terms of ANDs and INVs Express an operation in terms of ANDs and INVs  Cofactoring Propagate a constant Propagate a constant  Quantification Propagate two constants and OR the results Propagate two constants and OR the results  Variable replacement Reconstruct a graph in terms of different variables Reconstruct a graph in terms of different variables

9 Reachable State Computation Relation(cs,ns) =  i  k [ ns k  NS k ( i, cs ) ]; Relation(cs,ns) =  i  k [ ns k  NS k ( i, cs ) ]; Reached(cs) = 0; Front(cs) = InitState(cs); Reached(cs) = 0; Front(cs) = InitState(cs); do { Reached = Reached + Front; Next(cs) =  cs [ Relation(cs,ns) & Front(cs) ]  ns  cs ; do { Reached = Reached + Front; Next(cs) =  cs [ Relation(cs,ns) & Front(cs) ]  ns  cs ; Front = Next & Reached; } while ( Front  0 ); Front = Next & Reached; } while ( Front  0 );

10 Using AIGs for Reachability  General idea Take any BDD-based computation and perform it using AIGs, instead of BDDs Take any BDD-based computation and perform it using AIGs, instead of BDDs  Consequences Prevents unexpected “BDD blow-ups” Prevents unexpected “BDD blow-ups” Instead, creates AIGs monotonically growing from one iteration to another Instead, creates AIGs monotonically growing from one iteration to another  Requires efficient reduction procedures A good test for logic synthesis algorithms and tools A good test for logic synthesis algorithms and tools

11 Example: s27, initial state

12 Example: s27, transition relation

13 Example: s27, quantified relation

14 Example: s27, reached 1

15 Example: s27, reached 2

16 Example: s27, reached 1

17 Reduction Procedures Tried  Merging functionally-equivalent nodes (up to complementation)  AIG rewriting using pre-computed table  Applying optimization scripts in SIS/MVSIS  BDD-based collapsing  BDD-based partial collapsing

18 Reduction Procedures To Try  Key insight AIGs record delayed BDD computations! AIGs record delayed BDD computations!  BDD-based partial collapsing  Using a shifting BDD/AIG boundary

19 Structural Fixed Point  Definition. The functional fixed point is reached when in the above computation Front = Constant-0 Boolean function Front = Constant-0 Boolean function  Definition. The structural fixed point is reached when in the above computation Front = Constant-0 AIG Front = Constant-0 AIG  Theorem. Suppose BDD-based reachable state computation reaches the functional fixed point after n iterations. Then, a similar AIG-based computation reaches the structural fixed point after n or n+1 iterations.

20 Proof  After n iterations, Next contains only visited states and Front is Constant 0 Boolean function.  If Front is also Constant 0 AIG, the structural fixed point is reached after n iterations.  If Front is not Constant-0 AIG, then we show that, after the next image computation, Next becomes Constant-0 AIG (see Lemma). In this case, the fixed point is reached after n+1 iterations.

21 Lemma  Lemma. If Front is Constant-0 Boolean function but not Constant-0 AIG, the result of image computation is always Constant-0 AIG. Proof:  Each cofactor of Product w.r.t. the cs variables is Constant 0 AIG.  Quantification is performed by ORing all of the cofactors of Product w.r.t. the cs variables.  ORing any number of Constant 0 AIGs gives Constant 0 AIG. Q.E.D.

22 Reachable State Computation Relation(cs,ns) =  i  k [ ns k  NS k ( i, cs ) ]; Relation(cs,ns) =  i  k [ ns k  NS k ( i, cs ) ]; Reached(cs) = 0; Front(cs) = InitState(cs); Reached(cs) = 0; Front(cs) = InitState(cs); do { Reached = Reached + Front; Next(cs) =  cs [ Relation(cs,ns) & Front(cs) ]  ns  cs ; do { Reached = Reached + Front; Next(cs) =  cs [ Relation(cs,ns) & Front(cs) ]  ns  cs ; Front = Next & Reached; } while ( Front  0 ); Front = Next & Reached; } while ( Front  0 );

23 Proof Illustration cs ns cs P(cs,ns) = Relation(cs,ns) & Front(cs)  Quantification Relation Front P PPP ns 00 ns 01 ns 10 ns 11  csP(cs,ns)  cs P(cs,ns)

24 Discussion  It would be nice if AIGs could beat BDDs for reachable state computation  In practice, this did not happen (so far)

25 Towards a Hybrid Approach  Perhaps AIGs alone cannot beat BDDs  A hybrid approach should exploit respective strengths of these data structures BDDs: canonicity, non-redundancy BDDs: canonicity, non-redundancy AIGs: no blow-up, structural fixed point AIGs: no blow-up, structural fixed point  The sliding boundary idea  AIGs represent delayed BDD computation

26 Conclusion  Reviewed AIG data structure  Presented AIG-based computation  Proved an existence of structural fixed point in the AIG-based reachable state computation  Reported on preliminary experimental results  Outlined future research


Download ppt "Reachability Analysis using AIGs (instead of BDDs?) 290N: The Unknown Component Problem Lecture 23."

Similar presentations


Ads by Google