Download presentation

Presentation is loading. Please wait.

Published byBenjamin Archer Modified over 2 years ago

1
From Propositional SAT to SMT Hossein M. Sheini and Karem A. Sakallah SAT 2006 August 13, 2006 Seattle

2
Propositional Satisfiability DPLL: systematic backtracking search Branch [Pure literal rule] Propagate Unit propagation Boolean Constraint Propagation (BCP) Backtrack Modern implementations of DPLL Conflict analysis Clause learning Non-chronological backtracking Efficient propagation Two watched literals per clause Adaptive branching VSIDS Restarts

3
Quantifier-Free First-Order Logic Boolean combination of atoms from background theories

4
Decidable Quantifier-Free FOL Theories Empty QF_UF: uninterpreted functions with equality (aka EUF) Linear Real Arithmetic QF_LRA QF_RDL: real difference logic UTVPI Linear Integer Arithmetic QF_LIA QF_IDL: integer difference logic Data Structures QF_A: arrays QF_BV: bit vectors Lists, etc.

5
QF_UF Atoms

6
Linear Real Arithmetic Atoms QF_LRA: QF_RDL: UTVPI:

7
Linear Integer Arithmetic Atoms QF_LIA: QF_IDL: IUTVPI:

8
Chronology of SAT for Quantifier-Free FOL Late 70s to mid 80s Congruence closure algorithms Combination strategies for disjoint theories Mid 80s to mid 90s Not much! Mid to late 90s Initial attempts at improved propositional reasoning Early 21st Century Significant activity across many fields

9
Reasoning About Equality To prove validity of EUF formula Construct disjunctive normal form (DNF) of ¬ Prove unsatisfiability of each conjunct of ¬ using congruence closure [Shostak 78] [NelsonOppen 80] Logic of equality with uninterpreted functions and predicates (EUF)

10
Congruence Closure a b f f [NelsonOppen 80]

11
Reasoning About Integer Arithmetic To prove validity of QF Presburger formula Construct disjunctive normal form (DNF) of ¬ Prove unsatisfiability of each conjunct of ¬ using integer linear programming (ILP) Quantifier-Free Presburger Arithmetic [Shostak 79]

12
QF Presburger Arithmetic Example Negate Invalid! Normalize Convert to DNFSolve ILPs [Shostak 79]

13
Deciding Combinations of Theories Eliminate UFs and UPs using Ackermanns reduction (adding consistency axioms) to get a pure equality formula Convert complement to DNF Solve each conjunct as an integer linear program (ILP) Formula explodes [Shostak 79] Quantifier-Free Presburger Arithmetic + EUF Add all functional consistency axioms (aka substitutivity axioms of equality)

14
QF Presburger Arithmetic + EUF Example Add functional consistency axioms Eliminate function symbols [Shostak 79]

15
Alternatively … Add all functional consistency axioms Eliminate UFs and UPs using Ackermanns reduction (adding consistency axioms) to get a pure equality formula Convert complement to DNF Solve each conjunct as an integer linear program (ILP) Formula explodes Add functional consistency axioms as needed Ignore functional consistency and solve as before Check functional consistency for symbols with different values; if violated, add axiom and repeat Has the flavor of learning on demand ILPs can be solved incrementally [Shostak 79]

16
Deciding Combinations of Theories Convert negation to DNF Add variables to purify different theory conjuncts Solve separately Propagate equalities Split in case no equalities can be inferred Supported theories: Real numbers under + and leq: Simplex Arrays under store and select List structures with car, cdr, cons, and atom: congruence closure Equality with UF: congruence closure [NelsonOppen 79]

17
Example of Nelson-Oppen Procedure Lists EUF LRA [NelsonOppen 79]

18
Example of Nelson-Oppen Procedure [NelsonOppen 79]

19
Deciding Combinations of Theories Generalizes Nelson-Oppen method by eliminating the need for extra variables Congruence closure is extended to handle different theories as long as they have canonizers and solvers Found to be buggy and not as general as N-O [Shostak 84]

20
Disadvantages of Old Combination Methods Need to convert to DNF Inefficient handling of Boolean structure Can be viewed as lazy integration with an open feedback loop between a propositional enumerator and the theory solvers

21
Disadvantages of Old Combination Methods SAT No SMT Instance DNF Converter DNF Instance Yes More Conjuncts? Conjunction of Theory Atoms Theory Solvers UNSAT

22
Improved Propositional Reasoning Convert SMT instance to equi-satisfiable propositional form and apply Boolean reasoning techniques (BDDs or SAT) Small-domain encoding Per-constraint encoding Add more sophisticated Boolean reasoning, but keep background theories intact Re-write rules and better Boolean splits Add full-fledged SAT or BDD solvers to handle the Boolean skeleton Very Lazy: theory solver returns a conflict clause to SAT solver Lazy: theory solver invoked incrementally but does not propagate Eager: theory solver propagates and learns etc. Variants Layered

23
Reasoning About Equality: Revisited More Conjuncts? Congruence Closure SAT No Yes UNSAT EUF Formula DNF Converter DNF of = and Conjuncts Conjunction of = and

24
Reasoning About Equality: Revisited SAT/BDD Solver SATUNSAT EUF Formula Reduction E Formula Range Analysis & Boolean Encoding

25
Bryants ite Reduction Reasoning About Equality: Revisited Congruence Closure xy F1F1 F4F4 F3F3 F2F2 Ackermanns Reduction

26
Pros/Cons of SMT-to-SAT Conversion Loss of theory semantics (e.g., arithmetic) Black-box use of modern SAT solvers Leveraging of performance/capacity improvements in SAT solvers Increase of instance sizes

27
Combine SAT and Theory Solvers SAT UNSAT SMT Instance SAT Solver Propositional Abstraction SAT Instance SAT Theory Atoms Theory Solvers Abstraction Refinement UNSAT

28
Propositional Abstraction

29
Spectrum of Integration Very lazily: theory solver does not feedback any info to SAT solver; no refinement Lazily: theory solver returns a small explanation of infeasibility to SAT solver Eagerly: theory solver participates in value propagation (implications) and in conflict analysis Very eagerly: direct encoding of all theory semantics in propositional formula; no abstraction How aggressively is refinement done?

30
Very Lazy Integration Boolean Solver

31
Very Lazy Integration Integer Solver UNSAT

32
Spectrum of Integration Very lazily: theory solver does not feedback any info to SAT solver; no refinement Lazily: theory solver returns a small explanation of infeasibility to SAT solver Eagerly: theory solver participates in value propagation (implications) and in conflict analysis Very eagerly: direct encoding of all theory semantics in propositional formula; no abstraction How aggressively is refinement done?

33
Lazy Integration Boolean Solver

34
Lazy Integration Integer Solver Create conflict clause and return to Boolean solver

35
Spectrum of Integration Very lazily: theory solver does not feedback any info to SAT solver; no refinement Lazily: theory solver returns a small explanation of infeasibility to SAT solver Eagerly: theory solver participates in value propagation (implications) and in conflict analysis Very eagerly: direct encoding of all theory semantics in propositional formula; no abstraction How aggressively is refinement done?

36
Eager Integration: Incremental Propagation

37
Eager Integration: Incremental Propagation

38
Integration Trade-offs Must balance cost of generating new facts against utility of such facts in pruning the search space E.g., a priori generation of transitivity constraints for all possible equalities is overkill Suggests an on-demand learning strategy analogous to conflict analysis in modern SAT solvers On-demand learning requires incremental backtrackable theory solvers that maintain state Cost of propagation for various theories and sub- theories: EUF: congruence closure is O(n log n) Difference constraints: negative cycle detection is O(nm) UTVPI: transitive closure is O(n 3 ) Real arithmetic: incremental Simplex

39
Offline Integration of LRA Solver

40
Offline Integration of LRA Solver

41
Offline Integration of LRA Solver

42
Learning Strategies CNF clauses: disjunctions of existing atoms (in terms of their indicator variables) Introduction of new theory atoms: cutting planes

43
Introduction of New Atoms NEW

44
Offline Integration of LRA Solver

45
DPLL(T) Framework Declarative calculus for tight integration of a solver for theory T within a propositional DPLL solver Inspired by CLP(X) Defines Solver T as an abstract data type with the following methods: Initialize(L: Literal set) SetTrue(l: L-literal): L-literal set IsTrue?(l: L-literal): Boolean Backtrack(n: Natural) Explanation(l: L-literal): L-literal set [Tinelli 02] [Nieuwenhuis-Oliveras 03]

46
GETFOL 1993 KSAT 1996 MATH-SAT 2001 MATH-SAT 2002 MATH-SAT 2005 LPSAT 1999 CVC Lite 2004 Nelson-Oppen 1979 Shostak 1984 SVC 1996 CVC 2002/2004 Verifun 2003 Simplify 1998? ICS 2001 ICS+Chaff 2002 Simplics 2005 DPLL(T) 2002 Sammy 2005 BarcelogicTools 2005 Yices 2006 Ario 2005

47
Nelson-Oppen 1979 MATH-SAT 2001 KSAT 1996 GETFOL 1993 MATH-SAT 2002 MATH-SAT 2005 LPSAT 1999 SVC 1996 CVC 2002/2004 CVC Lite 2004 Shostak 1984 Simplify 1998? Verifun 2003 ICS 2001 Simplics 2005 ICS+Chaff 2002 DPLL(T) 2002 Sammy 2005 BarcelogicTools 2005 Yices 2006 Ario 2005

48
Competition Results: QF_UF

49
Competition Results: QF_RDL

50
Competition Results: QF_IDL

51
Competition Results: QF_UFIDL

52
Competition Results: QF_LRA

53
Competition Results: QF_LIA

54
Competition Results: QF_AUFLIA

55
Conclusions SAT does it again! Modern SAT technology critical enabler of SMT solvers Clear winner: tight integration of SAT and Theory solvers Incremental propagation Incremental conflict analysis and learning Careful tuning SMT is bringing different communities together (SAT, CP, AI, OR) Competition is good

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google