Presentation is loading. Please wait.

Presentation is loading. Please wait.

Decision heuristics based on an Abstraction/Refinement model

Similar presentations


Presentation on theme: "Decision heuristics based on an Abstraction/Refinement model"— Presentation transcript:

1 Decision heuristics based on an Abstraction/Refinement model
(HaifaSat) Ofer Strichman Roman Gershman Technion

2 SAT solving “Naïve” point of view:
Searches in the decision tree, prunes subspaces. Creates “blocking clauses” that restrain the solver from choosing the same bad path again. This point of view fails to explain why We can solve many formulas with 105 variables, We cannot solve other formulas with 103 variables

3 A different point of view
Modern solvers act as proof engines based on resolution, rather than as search engines, with structured problems. Evidence: adding the shortest conflict clauses is not the best strategy [R04]. Furthermore: certain strategies resemble a proof by abstraction-refinement.

4 Abstraction of models and formulas
Model is an (over approximating) abstraction of M if: A degenerated case: Formula is an (over-approximation) abstraction of F if: F ! or simply:

5 Abstraction of formulas
Now consider Binary Resolution: (AÇ x) Æ (B Ç :x) ! (A Ç B) F ! over-approximates

6 Resolution Graph Binary DAG with intermediate and conflict clauses. Collapsed DAG with multi-degree nodes C-1 C-3 C-2 O1 O2 O3 O4 O5 O6 O7 O1 O2 O3 O4 O6 O7 i1 c-1 i2 i3 O5 c-2 C-3 i4 Each node in the graph is an abstraction of its descendants

7 Refinement of models and formulas
An intermediate model is a refinement of if: An intermediate formula is a refinement of if: F ! , ! or simply:

8 Why all this theory? … Because Conflict Clauses are derived through a process of resolution. Several modern Decision Heuristics are guided by the Conflict Clauses (e.g. Berkmin) Hence, we can analyze them with the Abstraction/Refinement model.

9 Berkmin’s heuristic Push conflict clauses to a stack.
Find the first unsatisfied clause and choose a variable from this clause. If all conflict clauses are satisfied, choose a variable according to the VSIDS (Zchaff) heuristic.

10 Berkmin heuristic A new conflict clause tail- first conflict clause
Berkmin satisfies all the clauses until c. This is current abstract model M of formula f. After a conflict, Berkmin retreats with a new conflict clause. When it comes back and satisfies again all clauses until c, it creates an refinement of M.

11 Check of abstract assignment fails
Berkmin heuristic Let φ denote the original formula F abstracts φ (φ ! F ) is a refinement of F with respect to φ (φ ! , ! F ) Berkmin satisfies all the clauses until c. This is current abstract model M of formula f. After a conflict, Berkmin retreats with a new conflict clause. When it comes back and satisfies again all clauses until c, it creates an refinement of M. tail- first conflict clause F Check of abstract assignment fails

12 Berkmin heuristic Does not focus on a specific Abstraction/Refinement path. Generally: hundreds of clauses can be between a clause and its resolving clauses. C-3 C-2 C-1

13 A General Heuristic for choosing the next clause
Mark all roots. Choose an unresolved marked clause V (If there are none - exit) Decide a variable from V until it is satisfied. Mark V’s children

14 The Clause-Move-To-Front (CMTF) heuristic
Is an instantiation of the general heuristic Does not need to store the whole graph. More focused than Berkmin.

15 Progressing on the resolve graph
Progress with “Best-First” according to some criterion. Must store the whole resolve graph in memory – this is frequently infeasible. HaifaSat’s strategy: Do not store graph Be more abstraction-focused than Berkmin

16 The CMTF heuristic Position conflict clauses together with their resolving clauses in the end of a list. Find the first unsatisfied clause and choose a variable from this clause. If all conflict clauses are satisfied, choose a variable according to the VMTF (Siege) heuristic. Gives us the ‘first-layer approximation’ of the graph.

17 CMTF C-3 C-2 C-1 C-0 When C-3 is created, C-0, C-1 are moved to the head of the list together with C-3. C-2 is left in place.

18 Given a clause: choose a variable.
The Activity of a variable v: Activity score of a variable increases when it is a resolution variable, but… only when the clause it helped resolving is currently relevant, and… it happened recently A recursive computation embedded in the First-UIP scheme.

19 Activity Score work invested in refuting x=1 (some of it seems wasted)
Refutation of x=1 C5 C2 Decision Level C1 C4 C3 Decision Time Conflict

20 Activity Score Weight is given to variables
resolved-on in the process of resolving C C5 C C2 C0 C x=1 Refutation of x=1 C5 C2 Decision Level C1 C4 C3 Decision Time Conflict

21 Results (sec., average) Benchmark (#) Berkmin+VSIDS CMTF+RBS Hanoi (5)
530 130 IP (4) 395 203 Hanoi03 (4) 1342 426 Check-int (4) 3323 681 Bmc2 (6) 1030 1261 Fifo8 (4) 3944 1832 Fvp2 (22) 8638 1995 W08 (3) 5347 2680 Ibm02 (9) 9710 3875 01_rule (20) 33642 19171 11_rule_2 (20) 34006 22974

22 (CMTF + RBS) Vs. Berkmin (both implemented inside HaifaSat)

23 HaifaSat Vs. zChaff 2004

24 Results –SAT05 (Industrial)

25 Results –SAT05 (Industrial)
Sorted by what ?

26 Competition... Independently, very similar principles were discovered by Dershowitz, Hana and Nadel [SAT’05] Reached very similar conclusions Their ‘black-box’ Eureka SAT solver took several first and second places in last year’s competition.

27 And now... Two research directions Better refinement strategies.
Hints.

28 Recall the general framework:
Mark all roots. Choose an unresolved marked clause V (If there are none - exit) Decide a variable from V until it is satisfied. Mark V’s children

29 But, HaifaSat does not really traverse the resolution graph.
The assumption is: the graph is too large to store in memory. But, there are news: A new technique developed in IBM-Haifa allows to shrink the graph stored in memory by two orders of magnitude. The search for new refinement strategies is now open...

30 Refinement-driven Vs. Conflict-driven search.
W(c) = ci 2 antecedents(c) W(ci) How should we balance between refinement-driven and conflict-driven strategies ? O-1 O-2 O-3 O-4 O-5 O-6 O-7 O-8

31 Hints An (unpublished) idea by (Kroening, Yorav, Shacham)
Hints are constraints (clauses) that are conjectured to be true. A separate BCP processes the set of conjectured clauses. An implied literal becomes the next decision. A conflict is ignored.

32 Hints (cont.) The original use of hints: high-level knowledge.
We suggest: prune ‘seemingly hopeless branches (SHB)’ Define a monotonically decreasing function f: decision-level  time-interval If time at decision level dl > f(dl) prune the branch. This branch is seemingly hopeless.

33 Hints: Example A hint clause: (:l1 :l2 :l3) Perhaps a better idea:
SHB A hint clause: (:l1 :l2 :l3) Perhaps a better idea: Keep track on which subset S of l1 ... l3 were used in the SHB. The negation of literals in S is a better hint.

34 Hints vs. restarts Not entirely orthogonal techniques.
A restart is effective because of randomization and/or learning. Hints are more directed: they push the solver away from seemingly hopeless branches. Also: it is activated due to local consideration, and not a global clock. Bart Selman: “You can not restart too much” Perhaps now: “You can not hint too much”


Download ppt "Decision heuristics based on an Abstraction/Refinement model"

Similar presentations


Ads by Google