Fast Computation of Symmetries in Boolean Functions Alan Mishchenko

Slides:



Advertisements
Similar presentations
Hybrid BDD and All-SAT Method for Model Checking Orna Grumberg Joint work with Assaf Schuster and Avi Yadgar Technion – Israel Institute of Technology.
Advertisements

Representing Boolean Functions for Symbolic Model Checking Supratik Chakraborty IIT Bombay.
CS357 Lecture: BDD basics David Dill 1. 2 BDDs (Boolean/binary decision diagrams) BDDs are a very successful representation for Boolean functions. A BDD.
© 2011 Carnegie Mellon University Binary Decision Diagrams Part Bug Catching: Automated Program Verification and Testing Sagar Chaki September.
Spring 07, Feb 13 ELEC 7770: Advanced VLSI Design (Agrawal) 1 ELEC 7770 Advanced VLSI Design Spring 2007 Binary Decision Diagrams Vishwani D. Agrawal James.
A New Approach to Structural Analysis and Transformation of Networks Alan Mishchenko November 29, 1999.
Graph Coloring Algorithms for Fast Evaluation of Curtis Decomposition Marek Perkowski, Rahul Malvi, Stan Grygiel, Mike Burns, and Alan Mishchenko Portland.
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.
Reachability Analysis using AIGs (instead of BDDs?) 290N: The Unknown Component Problem Lecture 23.
DAG-Aware AIG Rewriting Alan Mishchenko, Satrajit Chatterjee, Robert Brayton Department of EECS, University of California Berkeley Presented by Rozana.
Boolean Matching in Logic Synthesis. Equivalence of Functions Equivalence of two functions defined under l Negation of input variables l Permutation of.
Exact State Minimization of Non-Deterministic FSMs 290N: The Unknown Component Problem Lecture 17.
ECE 667 Synthesis and Verification of Digital Systems
Logic Decomposition ECE1769 Jianwen Zhu (Courtesy Dennis Wu)
Digitaalsüsteemide verifitseerimise kursus1 Formal verification: BDD BDDs applied in equivalence checking.
Faster Logic Manipulation for Large Designs Alan Mishchenko Robert Brayton University of California, Berkeley.
Identifying Reversible Functions From an ROBDD Adam MacDonald.
Binary Decision Diagrams (BDDs)
1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
Kuo-Hua Wang, Chung-Ming Chan, Jung-Chang Liu Dept. of CSIE Fu Jen Catholic University Slide: Chih-Fan Lai Simulation and SAT-Based Boolean Matching for.
On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda Rolf Drechsler Alex Orailoglu Computer Science & Engineering Dept. University.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
NP-Completeness (Nondeterministic Polynomial Completeness) Sushanth Sivaram Vallath & Z. Joseph.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Binary Decision Diagrams Prof. Shobha Vasudevan ECE, UIUC ECE 462.
Presented By Anna Fariha Roll : SN – 213 MS, 1 st Semester Session: Boolean Matching.
Speaker: Nansen Huang VLSI Design and Test Seminar (ELEC ) March 9, 2016 Simulation-Based Equivalence Checking.
BDD-based Synthesis of Reversible Logic for Large Functions Robert Wille Rolf Drechsler DAC’09 Presenter: Meng-yen Li.
Certifying and Synthesizing Membership Equational Proofs Patrick Lincoln (SRI) joint work with Steven Eker (SRI), Jose Meseguer (Urbana) and Grigore Rosu.
Global Delay Optimization using Structural Choices Alan Mishchenko Robert Brayton UC Berkeley Stephen Jang Xilinx Inc.
The NP class. NP-completeness
Lecture 3: Incompletely Specified Functions and K Maps
Hybrid BDD and All-SAT Method for Model Checking
Chih-Fan Lai1, J.-H. Roland Jiang1, and Kuo-Hua Wang2
The Analysis of Cyclic Circuits with Boolean Satisfiability
Synthesis for Verification
Alan Mishchenko UC Berkeley
Mapping into LUT Structures
Delay Optimization using SOP Balancing
Faster Logic Manipulation for Large Designs
Specialized Applications of Decision Diagrams Alan Mishchenko
Alan Mishchenko Satrajit Chatterjee Robert Brayton UC Berkeley
Versatile SAT-based Remapping for Standard Cells
Example of application: Decomposition
A Boolean Paradigm in Multi-Valued Logic Synthesis
Lecture 3: Incompletely Specified Functions and K Maps
To SAT or Not to SAT: Ashenhurst Decomposition in a Large Scale
Faster Logic Manipulation for Large Designs
Alan Mishchenko University of California, Berkeley
Canonical Computation without Canonical Data Structure
Binary Decision Diagrams
ECE 667 Synthesis and Verification of Digital Circuits
SAT-Based Optimization with Don’t-Cares Revisited
Canonical Computation Without Canonical Data Structure
Improvements to Combinational Equivalence Checking
SAT-based Methods for Scalable Synthesis and Verification
A Primal-Dual Solution to Minimal Test Generation Problem
Heuristic Minimization of Two Level Circuits
Combinational Problems: Unate Covering, Binate Covering, Graph Coloring and Maximum Cliques Unit 6 part B.
Haitao Wang Utah State University WADS 2017, St. John’s, Canada
A logic function f in n inputs x1, x2, ...xn and
Canonical Computation without Canonical Data Structure
Delay Optimization using SOP Balancing
Canonical Computation without Canonical Data Structure
A logic function f in n inputs x1, x2, ...xn and
To SAT or Not to SAT: Ashenhurst Decomposition in a Large Scale
Lecture 3: Incompletely Specified Functions and K Maps
Integrating AIG Package, Simulator, and SAT Solver
Presentation transcript:

Fast Computation of Symmetries in Boolean Functions Alan Mishchenko Electrical and Computer Engineering Portland State University February 8, 2002

Seminar at Cadence Berkeley Lab Overview Motivation Symmetry types Known symmetry detection algorithms The new algorithm Computational core Specialized operators Implementation Experimental results Conclusions November 28, 2018 Seminar at Cadence Berkeley Lab

Seminar at Cadence Berkeley Lab Motivation In logic synthesis, if a variable group is symmetric, it can be easily decomposed out. In technology mapping, symmetries allow for fast boolean matching. In BDD minimization, SAT solving, etc, symmetries limit the search space. In verification, symmetries can be used as invariants. Any other applications? November 28, 2018 Seminar at Cadence Berkeley Lab

Seminar at Cadence Berkeley Lab Symmetry Types Classical two-variable symmetry Four basic two-variable symmetry types Edward/Hurst (1978) Tsai/Marek-Sadowska (1996) Generalized two-variable symmetries Research group at PSU (1998-2000) Generalized multiple-variable symmetries Mohnke/Molitor/Malik (1995) Kravets/Sakallah (2000) November 28, 2018 Seminar at Cadence Berkeley Lab

Classical Two-Variable Symmetry The function F has a non-skew non-equivalence symmetry in variables xi and xj iff November 28, 2018 Seminar at Cadence Berkeley Lab

Four Basic Two-Variable Symmetries Non-skew non-equivalence symmetry Non-skew equivalence symmetry Skew non-equivalence symmetry Skew equivalence symmetry November 28, 2018 Seminar at Cadence Berkeley Lab

Detecting Classical Symmetries Naïve approach: For each variable pair, derive the cofactors and compare them November 28, 2018 Seminar at Cadence Berkeley Lab

Detecting Classical Symmetries A better approach: Start by detecting as many non-symmetric pairs as possible Idea 1: Check if and Idea 2: Check if or depends on xj; and vice versa Idea 3: Check if it is true that the cofactor sets for xi and xj in the shared BDD are the same D.Moller et al. “Detection of Symmetry of Boolean Functions Represented by ROBDDs”. ICCAD’93 November 28, 2018 Seminar at Cadence Berkeley Lab

Naïve vs. Better Symmetry Detection D.Moller et al. “Detection of Symmetry of Boolean Functions Represented by ROBDDs”. ICCAD’93 November 28, 2018 Seminar at Cadence Berkeley Lab

Seminar at Cadence Berkeley Lab Disadvantages Requires multiple BDD traversals Uses naïve method to check a relatively large number of cofactors Takes long time for functions that have no symmetries at all Detects only one type of “classical” two-variable symmetry November 28, 2018 Seminar at Cadence Berkeley Lab

New Symmetry Detection Algorithm Overcomes the above disadvantages Requires only one traversal Does not use the naïve checking method Quickly detects functions w/o symmetries Detects four basic symmetry types Achieves significant speed-up Can be extended to other symmetry types November 28, 2018 Seminar at Cadence Berkeley Lab

Seminar at Cadence Berkeley Lab Symmetry Graphs Symmetries form a symmetry graph Vertices correspond to variables Edges correspond to pair-wise symmetries Graph operations Union () and intersection () of graphs is the graph with the union or intersection of all edges The product () of a variable by a variabe set is a graph with edges connecting the variable with all variables in the set November 28, 2018 Seminar at Cadence Berkeley Lab

Generic Recursive Algorithm solution RecursiveProcedure( problem P ) { Step 1: If P is a trivial case, return the solution. Step 2: Cofactor P w.r.t. a variable into P0 and P1. Step 3: Get solutions, S0 and S1, of P0 and P1. Step 4: Derive S, the solution of P, from S0 and S1. Step 5: Return S. } November 28, 2018 Seminar at Cadence Berkeley Lab

Symmetry Computation Core symmgraph ComputeSymmetries( function F, varset V ) { Step 1: if ( F is a constant function ) return CompleteGraph( V ); Step 2: x = Var( V ); ( F0, F1 ) = Cofactors( F, x ); Step 3: RemainingVars = supp( F ) – x; S0 = ComputeSymmetries( F0, RemainingVars ); if ( S0 =  ) S1 = ; else S1 = ComputeSymmetries( F1, RemainingVars ); Step 4: Y = SymmetricVars( F0, F1, RemainingVars ); S2 = x  Y; S3 = CompleteGraph( V – supp( F ) ); S = (S0  S1)  S2  S3; Step 5: return R; } November 28, 2018 Seminar at Cadence Berkeley Lab

Symmetry Computation Core varset SymmetricVars( function G, function H, varset Y ) { Step 1: if ( G = H ) return Y; Step 2: x = Var( Y ); ( G0, G1 ) = Cofactors( G, x ); ( H0, H1 ) = Cofactors( H, x ); Step 3: R0 = SymmetricVars( G0, H0, Y – x ); if ( R0 =  ) R1 = ; else R1 = SymmetricVars( G1, H1, Y – x ); Step 4: R = R0  R1; if ( G1 = H0 ) R = R  x; Step 5: return R; } November 28, 2018 Seminar at Cadence Berkeley Lab

Seminar at Cadence Berkeley Lab Computing Tuples tuples Tuples( varset V, int i ) /* Tuples are the set of subsets of i elements out of V */ { Step 1: if ( |V| < i ) return ; if ( i = 0 ) return {}; Step 2: x = Var( V ); Step 3: S0 = Tuples( V – x, i ); S1 = Tuples( V – x, i –1); Step 4: S = (add x to all subsets in S1)  S0; Step 5: return S; } November 28, 2018 Seminar at Cadence Berkeley Lab

Seminar at Cadence Berkeley Lab Experimental Results November 28, 2018 Seminar at Cadence Berkeley Lab

Notations Used in the Table ins and outs – the number of input and outputs of the benchmarks |BDD| – the number of nodes in the shared BDD after variable reordering pairs – the number of pairs of symmetric variables, for all outputs ratio – the ratio of the number of symmetric pairs to the number of all pairs reading – time needed to read in the benchmark and build shared BDDs naive – time of naïve method which derives and compares the cofactors slow – time of our implementation of [1] based on BDD analysis fast – time of the presented algorithm [1], [2], [3] – time reported in the literature (see the next slide) November 28, 2018 Seminar at Cadence Berkeley Lab

Seminar at Cadence Berkeley Lab Methods Compared [1] D. Möller, J. Mohnke, and M. Weber. Detection of Symmetry of Boolean Functions Represented by ROBDDs. Proc. Intl. Conf. Computer Aided Design, pp. 680-684, November 1993. [2] Ch. Scholl, D. Möller, P. Molitor, and R. Drechsler. BDD Minimization Using Symmetries. IEEE Trans. CAD, 18(2), pp. 81-100, February 1999. [3] C.-C. Tsai and M. Marek-Sadowska. Generalized Reed-Muller Forms as a Tool to Detect Symmetries. IEEE Trans. Computers, C-45(1), pp. 33-40, Jan1996. November 28, 2018 Seminar at Cadence Berkeley Lab

Seminar at Cadence Berkeley Lab Conclusions Defined two-variable symmetries Reviews the known algorithms Presented the new algorithm Showed the new algorithm is at least 10 times faster than the known algorithms November 28, 2018 Seminar at Cadence Berkeley Lab

Seminar at Cadence Berkeley Lab Additional Slides November 28, 2018 Seminar at Cadence Berkeley Lab

Generalized Symmetries (I) Consider all cofactors of the function F w.r.t. two variables: F00, F01, F10, F11 Equal cofactor symmetries = classical symmetries F01 = F10 (non-equivalent classical symmetry) F00 = F11 (equivalent classical symmetry) Other symmetries are derived from other relations between the cofactors November 28, 2018 Seminar at Cadence Berkeley Lab

Generalized Symmetries (I) November 28, 2018 Seminar at Cadence Berkeley Lab

Application: Regular Layout Synthesis The upper part of the decision diagram of a function that has the classical non-equivalent symmetry (left) and equivalent symmetry (right). November 28, 2018 Seminar at Cadence Berkeley Lab

Seminar at Cadence Berkeley Lab W. Wang, M. Chrzanowska-Jeske. “Optimizing Pseudo-Symmetric Binary Decision Diagrams Using Multiple Symmetries”. IWLS'98. November 28, 2018 Seminar at Cadence Berkeley Lab

Generalized Symmetries (II) First-order symmetries = classical symmetries Higher-order symmetries = symmetries that involve a hierarchy of variable groups <group> means that the ordering of “group” is fixed {group} means that the ordering of “group” is free For example, function F = x(ab(c+d) + cd(a+b)) a second-order symmetry { <a,b>, <c,d> } November 28, 2018 Seminar at Cadence Berkeley Lab

Seminar at Cadence Berkeley Lab Computation Theorem. Function F has symmetry {<s>,<t>} iff the cofactor matrix F<s>,<t> = [Fmi(s),mj(t) ] is symmetric: FT<s>,<t> = F<s>,<t>. Example. Suppose F has symmetry {<a,b>,<c,d>}. Then FT<ab>,<cd>=F<ab>,<cd> F<ab>,<cd> = November 28, 2018 Seminar at Cadence Berkeley Lab

Higher-Order Symmetries in Benchmark Functions V.Kravets, K.Sakallah. “Generalized Symmetries in Boolean Functions”. ICCAD’00. November 28, 2018 Seminar at Cadence Berkeley Lab