Download presentation
Presentation is loading. Please wait.
Published byBernadete de Almeida Rios Modified over 6 years ago
1
Fast Computation of Symmetries in Boolean Functions Alan Mishchenko
Electrical and Computer Engineering Portland State University February 8, 2002
2
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
3
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
4
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 ( ) Generalized multiple-variable symmetries Mohnke/Molitor/Malik (1995) Kravets/Sakallah (2000) November 28, 2018 Seminar at Cadence Berkeley Lab
5
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
6
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
7
Detecting Classical Symmetries
Naïve approach: For each variable pair, derive the cofactors and compare them November 28, 2018 Seminar at Cadence Berkeley Lab
8
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
9
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
10
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
11
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
12
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
13
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
14
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
15
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
16
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
17
Seminar at Cadence Berkeley Lab
Experimental Results November 28, 2018 Seminar at Cadence Berkeley Lab
18
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
19
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 , November 1993. [2] Ch. Scholl, D. Möller, P. Molitor, and R. Drechsler. BDD Minimization Using Symmetries. IEEE Trans. CAD, 18(2), pp , 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 , Jan1996. November 28, 2018 Seminar at Cadence Berkeley Lab
20
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
21
Seminar at Cadence Berkeley Lab
Additional Slides November 28, 2018 Seminar at Cadence Berkeley Lab
22
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
23
Generalized Symmetries (I)
November 28, 2018 Seminar at Cadence Berkeley Lab
24
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
25
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
26
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
27
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
28
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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.