Presentation is loading. Please wait.

Presentation is loading. Please wait.

A failed attempt to optimize variable ordering with tools for Constraints Solving Edmund ClarkeOfer Strichman Carnegie Mellon University.

Similar presentations


Presentation on theme: "A failed attempt to optimize variable ordering with tools for Constraints Solving Edmund ClarkeOfer Strichman Carnegie Mellon University."— Presentation transcript:

1 A failed attempt to optimize variable ordering with tools for Constraints Solving Edmund ClarkeOfer Strichman Carnegie Mellon University

2 Outline  What is the minimal cut-width problem ?  Why is it relevant to verification ?  Modeling min cut-width as CSP  Experimental results

3 Minimal Cut-width problem (1/3)  Let G(V,E) be a hyper-graph, where |V| = n.  An edge e crosses variable v i in a given variable order if v i  e or if e contains vertices both to the left and right of v i. vivi vivi e e Edges crossing v i :

4 Minimal Cut-width problem (2/3)  Definition: The cut-width of G at v i (1  i  n) with respect to a given order is the number of edges crossing v i Cut-width: 1 1 2 2 1  Definition: The cut-width of G with respect to a given order is the maximal cut-width of G among all v i  V

5 Minimal Cut-width problem (3/3)  Variable Order affects the cut-width: e1e1 e2e2 e3e3 e1e1 e2e2 e3e3 v 1 v 2 v 3 v 4 v 5 v 5 v 1 v 2 v 3 v 4 Cut-width = 2 Cut-width = 3  The min cut-width problem: Given a hyper-graph G(V,E), find a variable order which minimizes the cut-width of G.

6 Relevance to Verification  Definitions: n = # input variables c = cut-width  Berman [1991]: The size of a BDD representing a circuit is bounded by n*2 c  Wang, Clarke, Zhu, Kukula [2001]: CNF-SAT time complexity is bounded by O(n*2 c ) ....

7 Cut-width and BDD’s  : (x 1  x 2 )  (x 3  x 4 )...  (x 2n-1  x 2n ) O 1 : x 1, x 2,...,x 2n-1,x 2n BDD size: 2n+2 O 2 : x 1, x 3,... x 2n-1, x 2, x 4,... x 2n BDD size: 2 n+1 Bryant, 1986: DNF-Cutwidth O 1 : 1 x 1 x 2 x 3 x 4 x 5 x 6 DNF-Cutwidth O 2 : n x 1 x 3 x 5... x 2 x 4

8 Relevance to SAT  CNF-SAT time complexity is bounded by O(n*2 c ) n is the number of variables; c is the cut-width  The reason: Assume the number of literals in each clause is fixed. Assume we backtrack over a cut v We must change at least one variable in cutset(v) Conclusion: we will not cross v more than 2 cutset(v), or, O(2 c ) v

9 x = T y 1 = F y 2 = F y 3 = T Small cut-width means that related variables are kept close to each other. x = T y 1 = F y 2 = F y 3 = T  : (x = y 1  y 2  y 3 ) ..... Suppose  is sat only if x=y 1 =T In a standard SAT solver: Relevance to SAT

10 Min Cut-width as CSP (1/5) Input:

11 Min Cut-width as CSP (2/5)  Every variable is positioned in one location:  Every location is assigned one variable: indicates whether variable j is located in position i

12 Min Cut-width as CSP (3/5)  indicates whether literal i of clause c is positioned in the left (-1) or right (1) to position k: x 1a x 2a x 3a x 4a x 5a x 6a 0 0 1 0 0 0 k a l c i = ‘a’

13 Min Cut-width as CSP (4/5)  indicates whether clause c crosses location k: 2 2 1 -1 -2

14 Min Cut-width as CSP (4/5)  indicates whether clause c crosses location k: 2 1 0 -1 -2

15 Min Cut-width as CSP (5/5)  CutWidth is the largest no. of clauses crossing any location: Objective:

16 Complexity of formulation  Overall No. of constraints: n is the number of variables l is the number of literals Cl is the number of clauses  # Binary variables:

17 Results  OPLstudio / ‘Solver’:  B-Prolog: similar 2-CNF formulas


Download ppt "A failed attempt to optimize variable ordering with tools for Constraints Solving Edmund ClarkeOfer Strichman Carnegie Mellon University."

Similar presentations


Ads by Google