Presentation is loading. Please wait.

Presentation is loading. Please wait.

Inference and search for the propositional satisfiability problem

Similar presentations


Presentation on theme: "Inference and search for the propositional satisfiability problem"— Presentation transcript:

1 Inference and search for the propositional satisfiability problem
Lyndon Drake University of York July 2003 Swansea University

2 Inference and search for SAT
Introduction Propositional satisfiability (SAT) Theoretical interest Archetypal NP-complete problem (Cook 1971) Practical applications Hardware verification Often solved using a search procedure, which can be augmented with inference July 2003 Inference and search for SAT

3 Inference and search for SAT
Outline Overview of SAT and my thesis Neighbour resolution during search Preprocessing techniques Interaction between inference and branching heuristics Conclusions July 2003 Inference and search for SAT

4 Satisfiable SAT instance
Example: Alternative form: Satisfying assignment: July 2003 Inference and search for SAT

5 Inference and search for SAT
CNF SAT instances Boolean variable Literal Positive or negative occurrence of a variable Clause Disjunctions of literals Formula Conjunction of clauses July 2003 Inference and search for SAT

6 Inference and search for SAT
Assignments Mapping from variables to values Can be partial Applying an assignment to a formula modifies the formula Deletes false literals Deletes true clauses July 2003 Inference and search for SAT

7 Example application: BMC
Bounded model checking (Biere 1999) Used for verification, especially of hardware circuit designs Model encodes the circuit design Specification of necessary properties Map both model and specification into a SAT formula If a satisfying assignment exists, there is probably a bug in the model July 2003 Inference and search for SAT

8 Solving SAT: resolution
The Davis-Putnam method (1960) Uses resolution to eliminate variables Resolution is intractable E.g. best case exponential space complexity on pigeon-hole problems July 2003 Inference and search for SAT

9 Solving SAT: backtracking search
F c c a a a d d d July 2003 Inference and search for SAT

10 Combining inference and search : Unit propagation
Given: We know that: We must assign c true in order for the clause to be satisfied July 2003 Inference and search for SAT

11 Effect of unit propagation
b T F a c c d d July 2003 Inference and search for SAT

12 Inference and search for SAT
Unit propagation During search, if a clause contains exactly one unassigned literal, that literal must be assigned true if a satisfying assignment exists Unit propagations typically outnumber branches by 3:1 July 2003 Inference and search for SAT

13 Evaluating unit propagation
Unit propagation is an effective inference technique to add to search Benefit: Substantial pruning Cost: Performing simple reasoning Implementation details have a massive impact on performance July 2003 Inference and search for SAT

14 Inference and search for SAT
Thesis The performance of backtracking search-based SAT solvers can be improved by adding more inference to the search procedure The effect of inference depends on: Branching heuristic Other inference in the search procedure Problem class July 2003 Inference and search for SAT

15 Evaluating inference techniques
We need to consider: Benefit: How much the search space will be pruned Cost: How much time and space the inference technique requires Implementation details cannot be avoided July 2003 Inference and search for SAT

16 Inference and search for SAT
Outline Overview of SAT and my thesis Neighbour resolution during search Preprocessing techniques Interaction between inference and branching heuristics Conclusions July 2003 Inference and search for SAT

17 Inference and search for SAT
Neighbour resolution July 2003 Inference and search for SAT

18 Neighbour resolution during search
Two clauses are neighbours if: All but one of the literals are identical The differing literal is a variable which appears positively in one clause and negatively in the other At each decision node in the search space, do all neighbour resolutions July 2003 Inference and search for SAT

19 Inference and search for SAT
Results On many problems, the search space is significantly pruned Identifying the neighbouring clauses to resolve on takes a long time The time cost outweighs the benefit This implementation of neighbour resolution during search is not an effective technique for improving performance July 2003 Inference and search for SAT

20 Preprocessing neighbour resolution
Binary resolution before search produces the same resolvents as neighbour resolution during search Much cheaper to do a single stage of resolution before search Less pruning, as no subsumption is carried out July 2003 Inference and search for SAT

21 Inference and search for SAT
Results: pruning July 2003 Inference and search for SAT

22 Inference and search for SAT
Results: runtime July 2003 Inference and search for SAT

23 Neighbour resolution: Conclusions
Neighbour resolution during search Can result in substantial pruning In its current implementation is too expensive to be effective Preprocessing resolution Can be effective July 2003 Inference and search for SAT

24 Inference and search for SAT
Outline Overview of SAT and my thesis Neighbour resolution during search Preprocessing techniques Interaction between inference and branching heuristics Conclusions July 2003 Inference and search for SAT

25 Inference and search for SAT
Preprocessing Inference before search has two main advantages Implementation is simpler Conflict recording can be used during search July 2003 Inference and search for SAT

26 Two preprocessing techniques
Length-bounded resolution Binary equivalence finding Effective when possible, but rarely possible July 2003 Inference and search for SAT

27 Length-bounded resolution
Short clauses are more likely to unit propagate Can perform resolution to closure on the binary clauses in the formula During search (van Gelder 2001) Can do a single stage of resolution with the resolvent limited to at most three literals July 2003 Inference and search for SAT

28 Binary equivalence finding
Given a  b and b  a We can replace all occurrences of b with a Delete duplicate literals (a  a) Delete tautologies (a  a) Simplifies the formula Low cost inference July 2003 Inference and search for SAT

29 Binary equivalence chains
Can find loops of binary implications Tarjan’s SCC algorithm finds these equivalence chains in linear time a b c e d e f July 2003 Inference and search for SAT

30 Two preprocessing techniques: Conclusions
Both methods are cheap to apply Both can result in significant pruning Length-bounded resolution Can generate too many clauses Binary equivalence finding Rare to find many before search July 2003 Inference and search for SAT

31 Hyper-binary resolution
HypBinRes for short Resolution rule first defined by Bacchus (2002) Generates only binary clauses Binary clauses are likely to propagate July 2003 Inference and search for SAT

32 Inference and search for SAT
HypBinRes example From: Infer: July 2003 Inference and search for SAT

33 HypBinRes preprocessing
Apply HypBinRes before search HypBinRes during search is effective HypBinRes can add support clauses to a directly encoded CSP Expectation is that HypBinRes preprocessing will result in improved performance July 2003 Inference and search for SAT

34 Inference and search for SAT
Results Runtime in seconds, before and after preprocessing Points are all on the line No real improvement in performance July 2003 Inference and search for SAT

35 Inference and search for SAT
Results Tested on several benchmark sets Using ZChaff as the solver Efficient preprocessing algorithm No significant runtime required No significant performance improvement Often much worse after preprocessing Search space correspondingly larger July 2003 Inference and search for SAT

36 Preprocessing: Conclusions
Many preprocessing techniques are generally fast enough to apply Some have nice worst-case bounds Their effectiveness in improving performance depends on the problem class July 2003 Inference and search for SAT

37 Inference and search for SAT
Outline Overview of SAT and my thesis Neighbour resolution during search Preprocessing techniques Interaction between inference and branching heuristics Conclusions July 2003 Inference and search for SAT

38 Interaction between inference and heuristics
HypBinRes preprocessing Adding implied clauses can cause poor decisions by the branching heuristic When implied clauses added by HypBinRes improve performance, they do so by guiding the heuristic July 2003 Inference and search for SAT

39 Inference and search for SAT
Solver 1: ZChaff Runtime in seconds, before and after preprocessing Points are all on the line No real improvement in performance July 2003 Inference and search for SAT

40 Inference and search for SAT
Analysis ZChaff uses: VSIDS heuristic Conflict recording Additional clauses could result in a larger search space because: Heuristic is confused Different conflict clauses generated July 2003 Inference and search for SAT

41 Inference and search for SAT
Solver 2: Swan Lots of points below the line Nice performance improvement July 2003 Inference and search for SAT

42 Inference and search for SAT
Analysis Swan uses: Static version of the VSIDS heuristic No conflict recording Intuition for poor ZChaff results: Heuristic at fault July 2003 Inference and search for SAT

43 Adding implied clauses
Before preproc After preproc July 2003 Inference and search for SAT

44 Inference and search for SAT
Conflict recording Before search During search July 2003 Inference and search for SAT

45 Inference and search for SAT
VSIDS heuristic Distinguishes between clauses in the formula before search and those added by conflict recording Gives higher priority to literals in conflict clauses July 2003 Inference and search for SAT

46 Isolating implied clauses
Tag the implied clauses Optionally prevent the heuristic counting literals in the implied clauses Conflict recording is complicated, so done in Swan July 2003 Inference and search for SAT

47 Results: implied clauses visible
Lots of points below the line Nice performance improvement July 2003 Inference and search for SAT

48 Results: implied clauses hidden
No performance improvement These results look very similar to those obtained in ZChaff July 2003 Inference and search for SAT

49 Implied clauses visible Implied clauses hidden
Results Implied clauses visible Implied clauses hidden 50% improvement No improvement July 2003 Inference and search for SAT

50 Inference and search for SAT
Analysis Intuition at least partially correct Heuristic strongly affected by implied clause visibility Heuristic operates best when implied clauses are visible VSIDS will discount literals in the implied clauses July 2003 Inference and search for SAT

51 Inference and search for SAT
Pruning or guiding? Do implied clauses prune branches? Modified solver that gives statistics on branch pruning Implied clauses rarely prune Extra conflict clauses will not be generated Pruned branches are rarely large Need to do more experiments July 2003 Inference and search for SAT

52 Heuristic interaction: Conclusions
Adding implied clauses can result in the branching heuristic making poor decisions Tentative: implied clauses improve performance primarily by guiding the heuristic July 2003 Inference and search for SAT

53 Inference and search for SAT
Outline Overview of SAT and my thesis Neighbour resolution during search Preprocessing techniques Interaction between inference and branching heuristics Conclusions July 2003 Inference and search for SAT

54 Inference and search for SAT
Future work Extending the work on interaction between inference and heuristics to other inference techniques The interaction between inference and conflict recording July 2003 Inference and search for SAT

55 Inference and search for SAT
Conclusions Neighbour resolution is effective as a preprocessing method, but not during search Other preprocessing methods can also be effective Effectiveness depends strongly on interactions with the branching heuristic July 2003 Inference and search for SAT


Download ppt "Inference and search for the propositional satisfiability problem"

Similar presentations


Ads by Google