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

Slides:



Advertisements
Similar presentations
Model Checking Lecture 4. Outline 1 Specifications: logic vs. automata, linear vs. branching, safety vs. liveness 2 Graph algorithms for model checking.
Advertisements

Hybrid BDD and All-SAT Method for Model Checking Orna Grumberg Joint work with Assaf Schuster and Avi Yadgar Technion – Israel Institute of Technology.
FRAIGs - A Unifying Representation for Logic Synthesis and Verification - Alan Mishchenko, Satrajit Chatterjee, Roland Jiang, Robert Brayton ERL Technical.
Representing Boolean Functions for Symbolic Model Checking Supratik Chakraborty IIT Bombay.
Hardware and Petri nets Symbolic methods for analysis and verification.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
CS357 Lecture: BDD basics David Dill 1. 2 BDDs (Boolean/binary decision diagrams) BDDs are a very successful representation for Boolean functions. A BDD.
Aaron Bradley University of Colorado, Boulder
Efficient Reachability Analysis for Verification of Asynchronous Systems Nishant Sinha.
ECE 667 Synthesis and Verification of Digital Systems
SAT and Model Checking. Bounded Model Checking (BMC) A.I. Planning problems: can we reach a desired state in k steps? Verification of safety properties:
© 2011 Carnegie Mellon University Binary Decision Diagrams Part Bug Catching: Automated Program Verification and Testing Sagar Chaki September.
ECE Synthesis & Verification 1 ECE 667 Spring 2011 ECE 667 Spring 2011 Synthesis and Verification of Digital Circuits Introduction to Logic Synthesis.
ECE 667 Synthesis & Verification - Boolean Functions 1 ECE 667 Spring 2013 ECE 667 Spring 2013 Synthesis and Verification of Digital Circuits Boolean Functions.
ECE Synthesis & Verification - Lecture 8 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Circuits Introduction.
Combining Technology Mapping and Retiming EECS 290A Sequential Logic Synthesis and Verification.
Subset Construction 290N: The Unknown Component Problem Lecture 13.
Boolean Functions and their Representations
1 BDS: A BDD-Based Logic Optimization System “BDS: A BDD-Based Logic Optimization System”, by Congguang Yang and Maciej Ciesielski, 2000 By Chang Seok.
A New Approach to Structural Analysis and Transformation of Networks Alan Mishchenko November 29, 1999.
Introduction to Logic Synthesis Alan Mishchenko UC Berkeley.
EE290A 1 Retiming of AND- INVERTER graphs with latches Juliet Holwill 290A Project 10 May 2005.
ECE Synthesis & Verification - Lecture 19 1 ECE 667 Spring 2009 ECE 667 Spring 2009 Synthesis and Verification of Digital Systems Functional Decomposition.
Computation Engines: BDDs and SAT (part 2) 290N: The Unknown Component Problem Lecture 8.
1 FRAIGs: Functionally Reduced And-Inverter Graphs Adapted from the paper “FRAIGs: A Unifying Representation for Logic Synthesis and Verification”, by.
ECE Synthesis & Verification - L211 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Verification Equivalence checking.
DAG-Aware AIG Rewriting Alan Mishchenko, Satrajit Chatterjee, Robert Brayton Department of EECS, University of California Berkeley Presented by Rozana.
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 4-1 Chapter #2: Two-Level Combinational Logic Section 2.3, Switches and Tools.
5/6/2004J.-H. R. Jiang1 Functional Dependency for Verification Reduction & Logic Minimization EE290N, Spring 2004.
ECE Synthesis & Verification - Lecture 10 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Binary.
ECE 667 Synthesis & Verification - BDD 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Binary Decision Diagrams (BDD)
ECE 667 Synthesis and Verification of Digital Systems
Computing with Finite Automata (part 2) 290N: The Unknown Component Problem Lecture 10.
CS150 Newton5.2.1 Outline mLast time: ÜImplementation of logic functions: TTL, CMOS ÜDelay models: Transition time, propagation delay ÜHazards and "Glitches"
ECE Synthesis & Verification, Lecture 17 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Technology.
State Minimization and Determinization EECS 290A Sequential Logic Synthesis and Verification.
Logic Decomposition ECE1769 Jianwen Zhu (Courtesy Dennis Wu)
ECE Synthesis & Verification - Lecture 8 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Multi-level.
Faster Logic Manipulation for Large Designs Alan Mishchenko Robert Brayton University of California, Berkeley.
Binary Decision Diagrams (BDDs)
Electrical and Computer Engineering Archana Rengaraj ABC Logic Synthesis basics ECE 667 Synthesis and Verification of Digital Systems Spring 2011.
Copyright © 2004 by Miguel A. Marin1 COMBINATIONAL CIRCUIT SYNTHESIS CLASSIC TWO-LEVEL CIRCUIT SYNTHESIS MULTILEVEL-CIRCUIT SYNTHESIS FACTORIZATION DECOMPOSITION.
BoolTool: A Tool for Manipulation of Boolean Functions Petr Fišer, David Toman Czech Technical University in Prague Dept. of Computer Science and Engineering.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
Logic Functions: XOR, XNOR
Logic Synthesis: Past and Future Alan Mishchenko UC Berkeley.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
1 Stephen Jang Kevin Chung Xilinx Inc. Alan Mishchenko Robert Brayton UC Berkeley Power Optimization Toolbox for Logic Synthesis and Mapping.
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Multi-Level Logic Synthesis.
A Decomposition Algorithm to Structure Arithmetic Circuits Ajay K. Verma, Philip Brisk, Paolo Ienne Ecole Polytechnique Fédérale de Lausanne (EPFL) International.
BDDs1 Binary Tree Representation The recursive Shannon expansion corresponds to a binary tree Example: Each path from the root to a leaf corresponds to.
Research Roadmap Past – Present – Future Robert Brayton Alan Mishchenko Logic Synthesis and Verification Group UC Berkeley.
Standard & Canonical Forms COE 202 Digital Logic Design Dr. Aiman El-Maleh College of Computer Sciences and Engineering King Fahd University of Petroleum.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
2009/6/30 CAV Quantifier Elimination via Functional Composition Jie-Hong Roland Jiang Dept. of Electrical Eng. / Grad. Inst. of Electronics Eng.
A Semi-Canonical Form for Sequential Circuits Alan Mishchenko Niklas Een Robert Brayton UC Berkeley Michael Case Pankaj Chauhan Nikhil Sharma Calypto Design.
Binary Decision Diagrams Prof. Shobha Vasudevan ECE, UIUC ECE 462.
Hybrid BDD and All-SAT Method for Model Checking
Boolean Expressions Lecture No. 10.
Delay Optimization using SOP Balancing
Robert Brayton Alan Mishchenko Niklas Een
Optimal Redundancy Removal without Fixedpoint Computation
Fast Computation of Symmetries in Boolean Functions Alan Mishchenko
Alan Mishchenko University of California, Berkeley
Introduction to Logic Synthesis
Recording Synthesis History for Sequential Verification
Delay Optimization using SOP Balancing
Logic Synthesis: Past and Future
Robert Brayton Alan Mishchenko Niklas Een
Presentation transcript:

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

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?

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

Example cd ab 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 ac’bdbcad bca a b d

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)

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

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

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

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 );

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

Example: s27, initial state

Example: s27, transition relation

Example: s27, quantified relation

Example: s27, reached 1

Example: s27, reached 2

Example: s27, reached 1

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

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

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.

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.

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.

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 );

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)

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

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

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