1 / 17

A failed attempt to optimize variable ordering with tools for Constraints Solving

A failed attempt to optimize variable ordering with tools for Constraints Solving. Edmund Clarke Ofer Strichman Carnegie Mellon University. Outline. What is the minimal cut-width problem ? Why is it relevant to verification ? Modeling min cut-width as CSP Experimental results.

renate
Télécharger la présentation

A failed attempt to optimize variable ordering with tools for Constraints Solving

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A failed attempt to optimize variable ordering with tools for Constraints Solving Edmund Clarke Ofer 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. Edges crossing vi: e e vi vi Minimal Cut-width problem (1/3) • Let G(V,E) be a hyper-graph, where |V| = n. • An edge ecrosses variable vi in a given variable order if vie or if e contains vertices both to the left and right of vi.

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

  5. Minimal Cut-width problem (3/3) • Variable Order affects the cut-width: e1 e1 e2 e3 e3 e2 v5 v1 v2 v3 v4 v1 v2 v3 v4 v5 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*2c • Wang, Clarke, Zhu, Kukula [2001]: CNF-SAT time complexity is bounded by O(n*2c) • ....

  7. DNF-Cutwidth O1 : 1 x1 x2 x3 x4 x5 x6 DNF-Cutwidth O2 : n x1 x3 x5 ... x2 x4 Cut-width and BDD’s Bryant, 1986: : (x1 x2)  (x3 x4) ...  (x2n-1 x2n) O1: x1, x2, ... ,x2n-1,x2nBDD size: 2n+2 O2: x1, x3, ... x2n-1, x2, x4, ... x2nBDD size: 2n+1

  8. v Relevance to SAT • CNF-SAT time complexity is bounded by O(n*2c) • 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(2c)

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

  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: k lci= ‘a’ a x1a x2a x3a x4a x5a x6a 0 0 1 0 0 0

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

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

  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

More Related