Building Bridges between Symbolic Computation and Satisfiability Checking
Erika Abrah´ am´ RWTH Aachen University, Germany in cooperation with Florian Corzilius, Gereon Kremer, Stefan Schupp and others
ISSAC’15, 7 July 2015
Photo: Prior Park, Bath / flickr Liam Gladdy What is this talk about?
Satisfiability problem The satisfiability problem is the problem of deciding whether a logical formula is satisfiable.
We focus on the automated solution of the satisfiability problem for first-order logic over arithmetic theories, especially on similarities and differences in symbolic computation and SAT and SMT solving.
Erika Abrah´ am´ - SMT solving and Symbolic Computation 2 / 39 CAS SAT SMT (propositional logic) (SAT modulo theories) Enumeration Computer algebra DP (resolution) systems [Davis, Putnam’60] DPLL (propagation) [Davis,Putnam,Logemann,Loveland’62] Decision procedures NP-completeness [Cook’71] for combined theories CAD Conflict-directed [Shostak’79] [Nelson, Oppen’79] backjumping Partial CAD
Virtual CDCL [GRASP’97] [zChaff’04] DPLL(T) substitution Watched literals Equalities and uninterpreted Clause learning/forgetting functions Variable ordering heuristics Bit-vectors Restarts Array theory Arithmetic
Decision procedures for first-order logic over arithmetic theories in mathematical logic
1940 Computer architecture development
1960
1970
1980
2000
2010
Erika Abrah´ am´ - SMT solving and Symbolic Computation 3 / 39 SAT SMT (propositional logic) (SAT modulo theories) Enumeration
DP (resolution) [Davis, Putnam’60] DPLL (propagation) [Davis,Putnam,Logemann,Loveland’62] Decision procedures NP-completeness [Cook’71] for combined theories Conflict-directed [Shostak’79] [Nelson, Oppen’79] backjumping
CDCL [GRASP’97] [zChaff’04] DPLL(T) Watched literals Equalities and uninterpreted Clause learning/forgetting functions Variable ordering heuristics Bit-vectors Restarts Array theory Arithmetic
Decision procedures for first-order logic over arithmetic theories in mathematical logic
1940 Computer architecture development CAS
Computer algebra 1960 systems
1970 CAD 1980
Partial CAD Virtual 2000 substitution
2010
Erika Abrah´ am´ - SMT solving and Symbolic Computation 3 / 39 SMT (SAT modulo theories)
Decision procedures for combined theories [Shostak’79] [Nelson, Oppen’79]
DPLL(T) Equalities and uninterpreted functions Bit-vectors Array theory Arithmetic
Decision procedures for first-order logic over arithmetic theories in mathematical logic
1940 Computer architecture development CAS SAT (propositional logic) Enumeration Computer algebra 1960 DP (resolution) systems [Davis, Putnam’60] DPLL (propagation) [Davis,Putnam,Logemann,Loveland’62] 1970 NP-completeness [Cook’71] CAD Conflict-directed 1980 backjumping Partial CAD
Virtual CDCL [GRASP’97] [zChaff’04] 2000 substitution Watched literals Clause learning/forgetting Variable ordering heuristics 2010 Restarts
Erika Abrah´ am´ - SMT solving and Symbolic Computation 3 / 39 Decision procedures for first-order logic over arithmetic theories in mathematical logic
1940 Computer architecture development CAS SAT SMT (propositional logic) (SAT modulo theories) Enumeration Computer algebra 1960 DP (resolution) systems [Davis, Putnam’60] DPLL (propagation) [Davis,Putnam,Logemann,Loveland’62] Decision procedures 1970 NP-completeness [Cook’71] for combined theories CAD Conflict-directed [Shostak’79] [Nelson, Oppen’79] 1980 backjumping Partial CAD
Virtual CDCL [GRASP’97] [zChaff’04] DPLL(T) 2000 substitution Watched literals Equalities and uninterpreted Clause learning/forgetting functions Variable ordering heuristics Bit-vectors 2010 Restarts Array theory Arithmetic
Erika Abrah´ am´ - SMT solving and Symbolic Computation 3 / 39 WalkSATSATO GRASPChaff MiniSATBCSAT BerkminBacelogic zChaffHyperSat HySAT/iSAT SiegeYices RSat CVCSat4jZ3MathSATAlt-Ergo BoolectorABsolverBeaver ArgoSatDPTPicoSAT MiniSmt GlucoseSpearveriT LingelingOpenCogCryptoMiniSat SMT-RATUBCSATFast STP SATSMCHR Solver UCLID Clasp
OpenSMTSatEEn SWORD SAT
raSAT SMTInterpol SMT SONOLAR
Tool development
CAS
SchoonschipMATHLAB Reduce AltranScratchpad/AxiomMacsymaSMP muMATHMaple MathcadCoCoA SAC Mathematica MathHandbookGAPKASH/KANT DeriveMagma MathomaticPARI/GP Singular FermatFORMMaxima ErableSymbolicC++Xcas/Giac YacasMacaulay2SAGE CadabraSMath MATLAB StudioSymPyWolfram MuPAD OpenAxiomMathics AlphaCalcinator TI-NspireSymbolism SyMATCASFxSolver
1960 1970 1980 1990 2000 2010 2020
Erika Abrah´ am´ - SMT solving and Symbolic Computation 4 / 39 BacelogicHySAT/iSAT YicesCVCZ3MathSATAlt-Ergo BoolectorABsolverBeaver DPTPicoSAT MiniSmt SpearveriT OpenCog SMT-RATSTPSMCHR UCLID Clasp
OpenSMTSatEEn SWORD
raSAT SMTInterpol SMT SONOLAR
Tool development
CAS
SchoonschipMATHLAB Reduce AltranScratchpad/AxiomMacsymaSMP muMATHMaple MathcadCoCoA SAC Mathematica MathHandbookGAPKASH/KANT DeriveMagma MathomaticPARI/GP Singular FermatFORMMaxima ErableSymbolicC++Xcas/Giac YacasMacaulay2SAGE CadabraSMath MATLAB StudioSymPyWolfram MuPAD OpenAxiomMathics AlphaCalcinator TI-NspireSymbolism SyMATCASFxSolver
1960 1970 1980 1990 2000 2010 2020 WalkSATSATO GRASPChaff MiniSATBCSAT Berkmin zChaffHyperSat Siege RSat Sat4j ArgoSat GlucoseLingelingCryptoMiniSat UBCSATFast SAT Solver
SAT
Erika Abrah´ am´ - SMT solving and Symbolic Computation 4 / 39 BacelogicHySAT/iSAT YicesCVCZ3MathSATAlt-Ergo BoolectorABsolverBeaver DPTPicoSAT MiniSmt SpearveriT OpenCog SMT-RATSTPSMCHR UCLID Clasp
OpenSMTSatEEn SWORD
raSAT SMTInterpol SMT SONOLAR
Tool development
CAS
SchoonschipMATHLAB Reduce AltranScratchpad/AxiomMacsymaSMP muMATHMaple MathcadCoCoA SAC Mathematica MathHandbookGAPKASH/KANT DeriveMagma MathomaticPARI/GP Singular FermatFORMMaxima ErableSymbolicC++Xcas/Giac YacasMacaulay2SAGE CadabraSMath MATLAB StudioSymPyWolfram MuPAD OpenAxiomMathics AlphaCalcinator TI-NspireSymbolism SyMATCASFxSolver
1960 1970 1980 1990 2000 2010 2020 WalkSATSATO GRASPChaff MiniSATBCSAT Berkmin zChaffHyperSat Siege RSat Sat4j ArgoSat GlucoseLingelingCryptoMiniSat UBCSATFast SAT Solver
“We have success stories of using zChaff to solve problems with more SAT than one million variables and 10 million clauses. (Of course, it can’t solve every such problem!).” [zChaff web page]
Erika Abrah´ am´ - SMT solving and Symbolic Computation 4 / 39 BacelogicHySAT/iSAT YicesCVCZ3MathSATAlt-Ergo BoolectorABsolverBeaver DPTPicoSAT MiniSmt SpearveriT OpenCog SMT-RATSTPSMCHR UCLID Clasp
OpenSMTSatEEn SWORD
raSAT SMTInterpol SMT SONOLAR
Tool development
CAS
SchoonschipMATHLAB Reduce AltranScratchpad/AxiomMacsymaSMP muMATHMaple MathcadCoCoA SAC Mathematica MathHandbookGAPKASH/KANT DeriveMagma MathomaticPARI/GP Singular FermatFORMMaxima ErableSymbolicC++Xcas/Giac YacasMacaulay2SAGE CadabraSMath MATLAB StudioSymPyWolfram MuPAD OpenAxiomMathics AlphaCalcinator TI-NspireSymbolism SyMATCASFxSolver
1960 1970 1980 1990 2000 2010 2020 WalkSATSATO GRASPChaff MiniSATBCSAT Berkmin zChaffHyperSat Siege RSat Sat4j ArgoSat GlucoseLingelingCryptoMiniSat UBCSATFast SAT Solver
“We have success stories of using zChaff to solve problems with more SAT than one million variables and 10 million clauses. (Of course, it can’t solve every such problem!).” [zChaff web page]
“ The efficiency of our programs allowed us to solve over one hundred open quasigroup problems in design theory.” [SATO web page]
Erika Abrah´ am´ - SMT solving and Symbolic Computation 4 / 39 BacelogicHySAT/iSAT YicesCVCZ3MathSATAlt-Ergo BoolectorABsolverBeaver DPTPicoSAT MiniSmt SpearveriT OpenCog SMT-RATSTPSMCHR UCLID Clasp
OpenSMTSatEEn SWORD
raSAT SMTInterpol SMT SONOLAR
Tool development
CAS
SchoonschipMATHLAB Reduce AltranScratchpad/AxiomMacsymaSMP muMATHMaple MathcadCoCoA SAC Mathematica MathHandbookGAPKASH/KANT DeriveMagma MathomaticPARI/GP Singular FermatFORMMaxima ErableSymbolicC++Xcas/Giac YacasMacaulay2SAGE CadabraSMath MATLAB StudioSymPyWolfram MuPAD OpenAxiomMathics AlphaCalcinator TI-NspireSymbolism SyMATCASFxSolver
1960 1970 1980 1990 2000 2010 2020 WalkSATSATO GRASPChaff MiniSATBCSAT Berkmin zChaffHyperSat Siege RSat Sat4j ArgoSat GlucoseLingelingCryptoMiniSat UBCSATFast SAT Solver
SAT
Erika Abrah´ am´ - SMT solving and Symbolic Computation 4 / 39 Tool development
CAS
SchoonschipMATHLAB Reduce AltranScratchpad/AxiomMacsymaSMP muMATHMaple MathcadCoCoA SAC Mathematica MathHandbookGAPKASH/KANT DeriveMagma MathomaticPARI/GP Singular FermatFORMMaxima ErableSymbolicC++Xcas/Giac YacasMacaulay2SAGE CadabraSMath MATLAB StudioSymPyWolfram MuPAD OpenAxiomMathics AlphaCalcinator TI-NspireSymbolism SyMATCASFxSolver
1960 1970 1980 1990 2000 2010 2020 WalkSATSATO GRASPChaff MiniSATBCSAT BerkminBacelogic zChaffHyperSat HySAT/iSAT SiegeYices RSat CVCSat4jZ3MathSATAlt-Ergo BoolectorABsolverBeaver ArgoSatDPTPicoSAT MiniSmt GlucoseSpearveriT LingelingOpenCogCryptoMiniSat SMT-RATUBCSATFast STP SATSMCHR Solver UCLID Clasp
OpenSMTSatEEn SWORD SAT
raSAT SMTInterpol SMT SONOLAR
Erika Abrah´ am´ - SMT solving and Symbolic Computation 4 / 39 Community support: Standardised input language, lots of benchmarks available. Competitions since 2002. 2014 SAT Competition: 3 categories, 79 participants with 137 solvers. SAT Live! forum as community platform, dedicated conferences, journals, etc.
Satisfiability checking for propositional logic
Success story: SAT-solving Practical problems with millions of variables are solvable. Frequently used in different research areas for, e.g., analysis, synthesis and optimisation. Also massively used in industry for, e.g., digital circuit design and verification.
Erika Abrah´ am´ - SMT solving and Symbolic Computation 5 / 39 Satisfiability checking for propositional logic
Success story: SAT-solving Practical problems with millions of variables are solvable. Frequently used in different research areas for, e.g., analysis, synthesis and optimisation. Also massively used in industry for, e.g., digital circuit design and verification. Community support: Standardised input language, lots of benchmarks available. Competitions since 2002. 2014 SAT Competition: 3 categories, 79 participants with 137 solvers. SAT Live! forum as community platform, dedicated conferences, journals, etc.
Erika Abrah´ am´ - SMT solving and Symbolic Computation 5 / 39 (a → (b ∧ c)) (h1 ↔ (a → h2))
∧ (h2 ↔ (b ∧ c)) → h1 ∧ (h1)
a ∧ h2
b c
Input in CNF: Tseitin’s encoding
Every formula can be converted to an equi-satisfiable formula in conjunctive normal form (CNF) in linear time and space if (a linear number of) new variables are admitted.
Erika Abrah´ am´ - SMT solving and Symbolic Computation 6 / 39 (h1 ↔ (a → h2))
∧ (h2 ↔ (b ∧ c)) → h1 ∧ (h1)
a ∧ h2
b c
Input in CNF: Tseitin’s encoding
Every formula can be converted to an equi-satisfiable formula in conjunctive normal form (CNF) in linear time and space if (a linear number of) new variables are admitted.
(a → (b ∧ c))
Erika Abrah´ am´ - SMT solving and Symbolic Computation 6 / 39 (h1 ↔ (a → h2))
∧ (h2 ↔ (b ∧ c))
∧ (h1)
Input in CNF: Tseitin’s encoding
Every formula can be converted to an equi-satisfiable formula in conjunctive normal form (CNF) in linear time and space if (a linear number of) new variables are admitted.
(a → (b ∧ c))
→ h1
a ∧ h2
b c
Erika Abrah´ am´ - SMT solving and Symbolic Computation 6 / 39 Input in CNF: Tseitin’s encoding
Every formula can be converted to an equi-satisfiable formula in conjunctive normal form (CNF) in linear time and space if (a linear number of) new variables are admitted.
(a → (b ∧ c)) (h1 ↔ (a → h2))
∧ (h2 ↔ (b ∧ c)) → h1 ∧ (h1)
a ∧ h2
b c
Erika Abrah´ am´ - SMT solving and Symbolic Computation 6 / 39 Assumption: conjunctive normal form (CNF)
Derivation rule form:
antecendent1 ... antecendentn Rule name consequent
0 0 (l1 ∨ ... ∨ ln ∨ x)(l1 ∨ ... ∨ lm ∨¬ x) 0 0 Ruleres (l1 ∨ ... ∨ ln ∨ l1 ∨ ... ∨ lm)
Cx ∨ C¬x ∨ C is equi-satisfiable to
Resolvents(Cx, C¬x) ∨ C
SAT solving: Resolution
Assumption: conjunctive normal form (CNF)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 7 / 39 Assumption: conjunctive normal form (CNF)
0 0 (l1 ∨ ... ∨ ln ∨ x)(l1 ∨ ... ∨ lm ∨¬ x) 0 0 Ruleres (l1 ∨ ... ∨ ln ∨ l1 ∨ ... ∨ lm)
Cx ∨ C¬x ∨ C is equi-satisfiable to
Resolvents(Cx, C¬x) ∨ C
SAT solving: Resolution
Assumption: conjunctive normal form (CNF)
Derivation rule form:
antecendent1 ... antecendentn Rule name consequent
Erika Abrah´ am´ - SMT solving and Symbolic Computation 7 / 39 Assumption: conjunctive normal form (CNF)
Cx ∨ C¬x ∨ C is equi-satisfiable to
Resolvents(Cx, C¬x) ∨ C
SAT solving: Resolution
Assumption: conjunctive normal form (CNF)
Derivation rule form:
antecendent1 ... antecendentn Rule name consequent
0 0 (l1 ∨ ... ∨ ln ∨ x)(l1 ∨ ... ∨ lm ∨¬ x) 0 0 Ruleres (l1 ∨ ... ∨ ln ∨ l1 ∨ ... ∨ lm)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 7 / 39 Assumption: conjunctive normal form (CNF)
SAT solving: Resolution
Assumption: conjunctive normal form (CNF)
Derivation rule form:
antecendent1 ... antecendentn Rule name consequent
0 0 (l1 ∨ ... ∨ ln ∨ x)(l1 ∨ ... ∨ lm ∨¬ x) 0 0 Ruleres (l1 ∨ ... ∨ ln ∨ l1 ∨ ... ∨ lm)
Cx ∨ C¬x ∨ C is equi-satisfiable to
Resolvents(Cx, C¬x) ∨ C
Erika Abrah´ am´ - SMT solving and Symbolic Computation 7 / 39 Problem: combinatorial blowup
c1 :(¬a ∨ d ∨ e) c3 :(¬a ∨ ¬d ∨ e) c2 :(¬a ∨ d ∨¬ e) c4 :(¬a ∨ ¬d ∨¬ e) c5 :(a ∨ b) (¬a ∨ d) (¬a ∨¬ d) c6 :(a ∨¬ b) (¬a) (a) ()
SAT solving: Resolution
c1 :( ¬a ∨ d ∨ e )
c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e )
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 8 / 39 Problem: combinatorial blowup
SAT solving: Resolution
c1 :( ¬a ∨ d ∨ e )
c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e )
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
c1 :(¬a ∨ d ∨ e) c3 :(¬a ∨ ¬d ∨ e) c2 :(¬a ∨ d ∨¬ e) c4 :(¬a ∨ ¬d ∨¬ e) c5 :(a ∨ b) (¬a ∨ d) (¬a ∨¬ d) c6 :(a ∨¬ b) (¬a) (a) ()
Erika Abrah´ am´ - SMT solving and Symbolic Computation 8 / 39 SAT solving: Resolution
c1 :( ¬a ∨ d ∨ e )
c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e )
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
c1 :(¬a ∨ d ∨ e) c3 :(¬a ∨ ¬d ∨ e) c2 :(¬a ∨ d ∨¬ e) c4 :(¬a ∨ ¬d ∨¬ e) c5 :(a ∨ b) (¬a ∨ d) (¬a ∨¬ d) c6 :(a ∨¬ b) (¬a) (a) ()
Problem: combinatorial blowup
Erika Abrah´ am´ - SMT solving and Symbolic Computation 8 / 39 a b c
d e
ConflictDecisionBackjumping
SAT solving: Enumeration
c1 :( ¬a ∨ d ∨ e ) ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 9 / 39 a b c
d e
ConflictDecisionBackjumping
SAT solving: Enumeration
c1 :( ¬a ∨ d ∨ e ) ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Decision
Erika Abrah´ am´ - SMT solving and Symbolic Computation 9 / 39 b c
d e
ConflictDecisionBackjumping
SAT solving: Enumeration
c1 :( ¬a ∨ d ∨ e ) a ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 9 / 39 b c
d e
ConflictDecisionBackjumping
SAT solving: Enumeration
c1 :( ¬a ∨ d ∨ e ) a ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Decision
Erika Abrah´ am´ - SMT solving and Symbolic Computation 9 / 39 c
d e
ConflictDecisionBackjumping
SAT solving: Enumeration
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 9 / 39 c
d e
ConflictDecisionBackjumping
SAT solving: Enumeration
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Decision
Erika Abrah´ am´ - SMT solving and Symbolic Computation 9 / 39 d e
ConflictDecisionBackjumping
SAT solving: Enumeration
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 9 / 39 d e
ConflictDecisionBackjumping
SAT solving: Enumeration
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Decision
Erika Abrah´ am´ - SMT solving and Symbolic Computation 9 / 39 d e
ConflictDecisionBackjumping
SAT solving: Enumeration
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 9 / 39 d e
ConflictDecisionBackjumping
SAT solving: Enumeration
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Decision
Erika Abrah´ am´ - SMT solving and Symbolic Computation 9 / 39 d e
ConflictDecisionBackjumping
SAT solving: Enumeration
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b ) e c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 9 / 39 d e
ConflictDecisionBackjumping
SAT solving: Enumeration
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b ) e c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Conflict
Erika Abrah´ am´ - SMT solving and Symbolic Computation 9 / 39 d e
ConflictDecisionBackjumping
SAT solving: Enumeration
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b ) e c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Backjumping
Erika Abrah´ am´ - SMT solving and Symbolic Computation 9 / 39 d e
ConflictDecisionBackjumping
SAT solving: Enumeration
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b ) e c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 9 / 39 d e
ConflictDecisionBackjumping
SAT solving: Enumeration
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b ) e c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Conflict
Erika Abrah´ am´ - SMT solving and Symbolic Computation 9 / 39 d e
ConflictDecisionBackjumping
SAT solving: Enumeration
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b ) e c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Backjumping
Erika Abrah´ am´ - SMT solving and Symbolic Computation 9 / 39 d e
ConflictDecisionBackjumping
SAT solving: Enumeration
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 9 / 39 a b c
d e e
ConflictDecisionPureBooleanBackjumping literal constraint detection propagation
SAT solving: The DPLL algorithm
c1 :( ¬a ∨ d ∨ e ) ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 10 / 39 a b c
d e e
ConflictDecisionPureBooleanBackjumping literal constraint detection propagation
SAT solving: The DPLL algorithm
c1 :( ¬a ∨ d ∨ e ) ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Decision
Erika Abrah´ am´ - SMT solving and Symbolic Computation 10 / 39 b c
d e e
ConflictDecisionPureBooleanBackjumping literal constraint detection propagation
SAT solving: The DPLL algorithm
c1 :( ¬a ∨ d ∨ e ) a ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 10 / 39 b c
d e e
ConflictDecisionPureBooleanBackjumping literal constraint detection propagation
SAT solving: The DPLL algorithm
c1 :( ¬a ∨ d ∨ e ) a ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Decision
Erika Abrah´ am´ - SMT solving and Symbolic Computation 10 / 39 b c
d e e
ConflictDecisionPureBooleanBackjumping literal constraint detection propagation
SAT solving: The DPLL algorithm
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 10 / 39 b c
d e e
ConflictDecisionBooleanBackjumping constraint propagation
SAT solving: The DPLL algorithm
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Pure literal detection
Erika Abrah´ am´ - SMT solving and Symbolic Computation 10 / 39 b
d e e
ConflictDecisionPureBooleanBackjumping literal constraint detection propagation
SAT solving: The DPLL algorithm
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 10 / 39 b
d e e
ConflictDecisionPureBooleanBackjumping literal constraint detection propagation
SAT solving: The DPLL algorithm
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Decision
Erika Abrah´ am´ - SMT solving and Symbolic Computation 10 / 39 b
d e e
ConflictDecisionPureBooleanBackjumping literal constraint detection propagation
SAT solving: The DPLL algorithm
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 10 / 39 b
d e e
ConflictDecisionPureBackjumpingBoolean literal constraint detection propagation
SAT solving: The DPLL algorithm
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Boolean constraint propagation
Erika Abrah´ am´ - SMT solving and Symbolic Computation 10 / 39 b
d e
ConflictDecisionPureBooleanBackjumping literal constraint detection propagation
SAT solving: The DPLL algorithm
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b ) e c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 10 / 39 b
d e
ConflictDecisionPureBooleanBackjumping literal constraint detection propagation
SAT solving: The DPLL algorithm
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b ) e c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Conflict
Erika Abrah´ am´ - SMT solving and Symbolic Computation 10 / 39 b
d e
ConflictDecisionPureBooleanBackjumping literal constraint detection propagation
SAT solving: The DPLL algorithm
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b ) e c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Backjumping
Erika Abrah´ am´ - SMT solving and Symbolic Computation 10 / 39 b
d e e
ConflictDecisionPureBooleanBackjumping literal constraint detection propagation
SAT solving: The DPLL algorithm
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 10 / 39 b
d e e
ConflictDecisionPureBooleanBackjumping literal constraint detection propagation
SAT solving: The DPLL algorithm
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Boolean constraint propagation
Erika Abrah´ am´ - SMT solving and Symbolic Computation 10 / 39 b
d e
ConflictDecisionPureBooleanBackjumping literal constraint detection propagation
SAT solving: The DPLL algorithm
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b ) e c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 10 / 39 b
d e
ConflictDecisionPureBooleanBackjumping literal constraint detection propagation
SAT solving: The DPLL algorithm
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b ) e c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Conflict
Erika Abrah´ am´ - SMT solving and Symbolic Computation 10 / 39 b
d e
ConflictDecisionPureBooleanBackjumping literal constraint detection propagation
SAT solving: The DPLL algorithm
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ...
c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b ) e c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Backjumping
Erika Abrah´ am´ - SMT solving and Symbolic Computation 10 / 39 b c
d e e
ConflictDecisionPureBooleanBackjumping literal constraint detection propagation
SAT solving: The DPLL algorithm
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 10 / 39 a db c9 c c8 d e c3
c4
c9 :( ¬a ∨ ¬d )
ConflictDecisionBoolean resolution constraint and propagation backtracking c4 :(¬a ∨ ¬d ∨¬ e) c3 :(¬a ∨ ¬d ∨ e) c9 :(¬a ∨ ¬d)
SAT solving: Conflict-directed clause learning
c1 :( ¬a ∨ d ∨ e ) ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 11 / 39 a db c9 c c8 d e c3
c4
c9 :( ¬a ∨ ¬d )
ConflictDecisionBoolean resolution constraint and propagation backtracking c4 :(¬a ∨ ¬d ∨¬ e) c3 :(¬a ∨ ¬d ∨ e) c9 :(¬a ∨ ¬d)
SAT solving: Conflict-directed clause learning
c1 :( ¬a ∨ d ∨ e ) ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Decision
Erika Abrah´ am´ - SMT solving and Symbolic Computation 11 / 39 db c9 c c8 d e c3
c4
c9 :( ¬a ∨ ¬d )
ConflictDecisionBoolean resolution constraint and propagation backtracking c4 :(¬a ∨ ¬d ∨¬ e) c3 :(¬a ∨ ¬d ∨ e) c9 :(¬a ∨ ¬d)
SAT solving: Conflict-directed clause learning
c1 :( ¬a ∨ d ∨ e ) a ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 11 / 39 db c9 c c8 d e c3
c4
c9 :( ¬a ∨ ¬d )
ConflictDecisionBoolean resolution constraint and propagation backtracking c4 :(¬a ∨ ¬d ∨¬ e) c3 :(¬a ∨ ¬d ∨ e) c9 :(¬a ∨ ¬d)
SAT solving: Conflict-directed clause learning
c1 :( ¬a ∨ d ∨ e ) a ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Decision
Erika Abrah´ am´ - SMT solving and Symbolic Computation 11 / 39 d c9 c c8 d e c3
c4
c9 :( ¬a ∨ ¬d )
ConflictDecisionBoolean resolution constraint and propagation backtracking c4 :(¬a ∨ ¬d ∨¬ e) c3 :(¬a ∨ ¬d ∨ e) c9 :(¬a ∨ ¬d)
SAT solving: Conflict-directed clause learning
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 11 / 39 d c9 c c8 d e c3
c4
c9 :( ¬a ∨ ¬d )
ConflictDecisionBoolean resolution constraint and propagation backtracking c4 :(¬a ∨ ¬d ∨¬ e) c3 :(¬a ∨ ¬d ∨ e) c9 :(¬a ∨ ¬d)
SAT solving: Conflict-directed clause learning
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Boolean constraint propagation
Erika Abrah´ am´ - SMT solving and Symbolic Computation 11 / 39 d c9
d e c3
c4
c9 :( ¬a ∨ ¬d )
ConflictDecisionBoolean resolution constraint and propagation backtracking c4 :(¬a ∨ ¬d ∨¬ e) c3 :(¬a ∨ ¬d ∨ e) c9 :(¬a ∨ ¬d)
SAT solving: Conflict-directed clause learning
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ... c8 c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 11 / 39 d c9
d e c3
c4
c9 :( ¬a ∨ ¬d )
ConflictDecisionBoolean resolution constraint and propagation backtracking c4 :(¬a ∨ ¬d ∨¬ e) c3 :(¬a ∨ ¬d ∨ e) c9 :(¬a ∨ ¬d)
SAT solving: Conflict-directed clause learning
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ... c8 c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Decision
Erika Abrah´ am´ - SMT solving and Symbolic Computation 11 / 39 d c9
e c3
c4
c9 :( ¬a ∨ ¬d )
ConflictDecisionBoolean resolution constraint and propagation backtracking c4 :(¬a ∨ ¬d ∨¬ e) c3 :(¬a ∨ ¬d ∨ e) c9 :(¬a ∨ ¬d)
SAT solving: Conflict-directed clause learning
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ... c8 c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 11 / 39 d c9
e c3
c4
c9 :( ¬a ∨ ¬d )
ConflictDecisionBoolean resolution constraint and propagation backtracking c4 :(¬a ∨ ¬d ∨¬ e) c3 :(¬a ∨ ¬d ∨ e) c9 :(¬a ∨ ¬d)
SAT solving: Conflict-directed clause learning
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ... c8 c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Boolean constraint propagation
Erika Abrah´ am´ - SMT solving and Symbolic Computation 11 / 39 d c9
c4
c9 :( ¬a ∨ ¬d )
ConflictDecisionBoolean resolution constraint and propagation backtracking c4 :(¬a ∨ ¬d ∨¬ e) c3 :(¬a ∨ ¬d ∨ e) c9 :(¬a ∨ ¬d)
SAT solving: Conflict-directed clause learning
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ... c8 c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b ) e c6 :( a ∨ ¬b ) c3 c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 11 / 39 d c9
c9 :( ¬a ∨ ¬d )
DecisionConflictBoolean resolution constraint and propagation backtracking c4 :(¬a ∨ ¬d ∨¬ e) c3 :(¬a ∨ ¬d ∨ e) c9 :(¬a ∨ ¬d)
SAT solving: Conflict-directed clause learning
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ... c8 c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b ) e c6 :( a ∨ ¬b ) c3 c7 :( b ∨ c ) c4 c8 :( ¬b ∨ ¬c )
Conflict
Erika Abrah´ am´ - SMT solving and Symbolic Computation 11 / 39 d c9
c9 :( ¬a ∨ ¬d )
ConflictDecisionBoolean constraint propagation c4 :(¬a ∨ ¬d ∨¬ e) c3 :(¬a ∨ ¬d ∨ e) c9 :(¬a ∨ ¬d)
SAT solving: Conflict-directed clause learning
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ... c8 c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b ) e c6 :( a ∨ ¬b ) c3 c7 :( b ∨ c ) c4 c8 :( ¬b ∨ ¬c )
Conflict resolution and backtracking
Erika Abrah´ am´ - SMT solving and Symbolic Computation 11 / 39 d c9
c9 :( ¬a ∨ ¬d )
ConflictDecisionBoolean resolution constraint and propagation backtracking
SAT solving: Conflict-directed clause learning
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ... c8 c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b ) e c6 :( a ∨ ¬b ) c3 c7 :( b ∨ c ) c4 c8 :( ¬b ∨ ¬c )
c4 :(¬a ∨ ¬d ∨¬ e) c3 :(¬a ∨ ¬d ∨ e) c9 :(¬a ∨ ¬d)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 11 / 39 d c9
ConflictDecisionBoolean resolution constraint and propagation backtracking
SAT solving: Conflict-directed clause learning
c1 :( ¬a ∨ d ∨ e ) a b ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) c ... c8 c4 :( ¬a ∨ ¬d ∨ ¬e ) d c5 :( a ∨ b ) e c6 :( a ∨ ¬b ) c3 c7 :( b ∨ c ) c4 c8 :( ¬b ∨ ¬c ) c9 :( ¬a ∨ ¬d )
c4 :(¬a ∨ ¬d ∨¬ e) c3 :(¬a ∨ ¬d ∨ e) c9 :(¬a ∨ ¬d)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 11 / 39 db c9 c c8 d e c3
c4
ConflictDecisionBoolean resolution constraint and propagation backtracking
SAT solving: Conflict-directed clause learning
c1 :( ¬a ∨ d ∨ e ) a ... c2 :( ¬a ∨ d ∨ ¬e )
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
c9 :( ¬a ∨ ¬d )
c4 :(¬a ∨ ¬d ∨¬ e) c3 :(¬a ∨ ¬d ∨ e) c9 :(¬a ∨ ¬d)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 11 / 39 b c c8 d e c3
c4
ConflictDecisionBoolean resolution constraint and propagation backtracking
SAT solving: Conflict-directed clause learning
c1 :( ¬a ∨ d ∨ e ) a d ... c2 :( ¬a ∨ d ∨ ¬e ) c9
c3 :( ¬a ∨ ¬d ∨ e ) ...
c4 :( ¬a ∨ ¬d ∨ ¬e )
c5 :( a ∨ b )
c6 :( a ∨ ¬b )
c7 :( b ∨ c )
c8 :( ¬b ∨ ¬c )
c9 :( ¬a ∨ ¬d )
c4 :(¬a ∨ ¬d ∨¬ e) c3 :(¬a ∨ ¬d ∨ e) c9 :(¬a ∨ ¬d)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 11 / 39 SMT-LIB as standard input language since 2004. Competitions since 2005. SMT-COMP 2014 competition: 32 logical categories, 20 solvers. Linear real arithmetic (since 2005): 6 solvers. Non-linear real arithmetic (since 2010): 4 solvers. 67426 benchmark instances. SMT applications: verification (model checking, static analysis, termination analysis); test case generation; controller synthesis; predicate abstraction; equivalence checking; scheduling; planning; product design automation and optimisation, . . .
Satisfiability modulo theories solving
Propositional logic is sometimes too weak for modelling. We need more expressive logics and decision procedures for them. Logics: quantifier-free fragments of first-order logic over various theories. Our focus: SAT-modulo-theories (SMT) solving.
Erika Abrah´ am´ - SMT solving and Symbolic Computation 12 / 39 SMT applications: verification (model checking, static analysis, termination analysis); test case generation; controller synthesis; predicate abstraction; equivalence checking; scheduling; planning; product design automation and optimisation, . . .
Satisfiability modulo theories solving
Propositional logic is sometimes too weak for modelling. We need more expressive logics and decision procedures for them. Logics: quantifier-free fragments of first-order logic over various theories. Our focus: SAT-modulo-theories (SMT) solving. SMT-LIB as standard input language since 2004. Competitions since 2005. SMT-COMP 2014 competition: 32 logical categories, 20 solvers. Linear real arithmetic (since 2005): 6 solvers. Non-linear real arithmetic (since 2010): 4 solvers. 67426 benchmark instances.
Erika Abrah´ am´ - SMT solving and Symbolic Computation 12 / 39 Satisfiability modulo theories solving
Propositional logic is sometimes too weak for modelling. We need more expressive logics and decision procedures for them. Logics: quantifier-free fragments of first-order logic over various theories. Our focus: SAT-modulo-theories (SMT) solving. SMT-LIB as standard input language since 2004. Competitions since 2005. SMT-COMP 2014 competition: 32 logical categories, 20 solvers. Linear real arithmetic (since 2005): 6 solvers. Non-linear real arithmetic (since 2010): 4 solvers. 67426 benchmark instances. SMT applications: verification (model checking, static analysis, termination analysis); test case generation; controller synthesis; predicate abstraction; equivalence checking; scheduling; planning; product design automation and optimisation, . . .
Erika Abrah´ am´ - SMT solving and Symbolic Computation 12 / 39 Quantifier-free(Quantifier-free)Quantifier-free(Quantifier-free)Quantifier-freeQuantifier-free equalityCombined real/integerinteger/rational real/integer logic bit-vector with theoriesarray non-linear uninterpreted linear theory arithmeticdifference arithmetic arithmetic logic functions ( ai ==xjc−→∧ybx∼(2read2=a0+f3|(,bxdx2∼∈)+)(xywrite+≤→7 {+y5(<,ya=yf(&2≤>(aa8≥,b,0i=b),0,v)≥)=,,j >)f (}=c,vd)
SMT-LIB theories
Source: http://smtlib.cs.uiowa.edu/logics.shtml
Erika Abrah´ am´ - SMT solving and Symbolic Computation 13 / 39 (Quantifier-free)Quantifier-free(Quantifier-free)Quantifier-freeQuantifier-freeCombined real/integerinteger/rational real/integer bit-vector theoriesarray non-linear linear theory arithmeticdifference arithmetic arithmetic logic i =xj−→yx∼(2read2a0+f3|(,bxx2∼∈)+(xywrite+≤7 {+y5(<,ya=y(&2≤>a8≥,b0i=),0,v≥),,j >) }= v
SMT-LIB theories
Quantifier-free equality logic with uninterpreted functions ( a = c ∧ b = d ) → f (a, b) = f (c, d)
Source: http://smtlib.cs.uiowa.edu/logics.shtml
Erika Abrah´ am´ - SMT solving and Symbolic Computation 13 / 39 Quantifier-free(Quantifier-free)Quantifier-free(Quantifier-free)Quantifier-free equalityCombined real/integerinteger/rational real/integer logic with theoriesarray non-linear uninterpreted linear theory difference arithmetic arithmetic logic functions ( ai ==xjc−→∧ybx∼2read2=0+f3(,xdx2∼∈)+(xywrite+→7 {+y5<,y=yf(2≤>(aa8≥,,0i=b,0,v)≥)=,,j >)f (}=c,vd)
SMT-LIB theories
Quantifier-free bit-vector arithmetic ( a|b ) ≤ ( a&b )
Source: http://smtlib.cs.uiowa.edu/logics.shtml
Erika Abrah´ am´ - SMT solving and Symbolic Computation 13 / 39 Quantifier-free(Quantifier-free)Quantifier-free(Quantifier-free)Quantifier-free equalityCombined real/integerinteger/rational real/integer logic bit-vector with theories non-linear uninterpreted linear arithmeticdifference arithmetic arithmetic logic functions ( a =xc−∧ybx∼(22=a0+f3|(,bxdx2∼∈)+)xy+≤→7 {+y5(<,ya=yf&2≤>(a8≥b,,0=b)0,)≥=, >f (}c, d)
SMT-LIB theories
Quantifier-free array theory i = j → read(write(a, i, v), j) = v
Source: http://smtlib.cs.uiowa.edu/logics.shtml
Erika Abrah´ am´ - SMT solving and Symbolic Computation 13 / 39 Quantifier-free(Quantifier-free)(Quantifier-free)Quantifier-freeQuantifier-free equalityCombined real/integer real/integer logic bit-vector with theoriesarray non-linear uninterpreted linear theory arithmetic arithmetic arithmetic functions ( ai == jc →∧ bx(2read2=a+f3|(bxdx2)+)(xywrite+≤→7+y5(ya=yf(&2>(aa8≥,b,0ib),0v))=, j)f (=c,vd)
SMT-LIB theories
Quantifier-free integer/rational difference logic x − y ∼ 0, ∼∈ {<, ≤, =, ≥, >}
Source: http://smtlib.cs.uiowa.edu/logics.shtml
Erika Abrah´ am´ - SMT solving and Symbolic Computation 13 / 39 Quantifier-free(Quantifier-free)Quantifier-freeQuantifier-freeQuantifier-free equalityCombined real/integerinteger/rational logic bit-vector with theoriesarray non-linear uninterpreted theory arithmeticdifference arithmetic logic functions ( ai ==xjc−→∧ybx∼(2read2=a0+f|(,bdx2∼∈))(xywrite+≤→ {+5(<,yayf(&2≤>(aa≥,b,0i=b),0,v)≥)=,,j >)f (}=c,vd)
SMT-LIB theories
(Quantifier-free) real/integer linear arithmetic 3x + 7y = 8
Source: http://smtlib.cs.uiowa.edu/logics.shtml
Erika Abrah´ am´ - SMT solving and Symbolic Computation 13 / 39 Quantifier-freeQuantifier-free(Quantifier-free)Quantifier-freeQuantifier-free equalityCombined integer/rational real/integer logic bit-vector with theoriesarray uninterpreted linear theory arithmeticdifference arithmetic logic functions ( ai ==xjc−→∧yb∼(read2=a0f3|(,bxdx∼∈)+)(write+≤→7 {y5(<,ya=f(&≤>(aa8,b,0i=b),,v)≥)=,,j >)f (}=c,vd)
SMT-LIB theories
(Quantifier-free) real/integer non-linear arithmetic x2 + 2xy + y2 ≥ 0
Source: http://smtlib.cs.uiowa.edu/logics.shtml
Erika Abrah´ am´ - SMT solving and Symbolic Computation 13 / 39 Quantifier-free(Quantifier-free)Quantifier-free(Quantifier-free)Quantifier-freeQuantifier-free equality real/integerinteger/rational real/integer logic bit-vector with array non-linear uninterpreted linear theory arithmeticdifference arithmetic arithmetic logic functions ( ai ==xjc−→∧ybx∼(2read=a0+3|,bxd2∼∈)+)(xywrite≤→7 {+y(<,a=yf(&2≤(aa8≥,b,i=b),0,v)≥)=,,j >)f (}=c,vd)
SMT-LIB theories
Combined theories 2f (x) + 5y > 0
Source: http://smtlib.cs.uiowa.edu/logics.shtml
Erika Abrah´ am´ - SMT solving and Symbolic Computation 13 / 39 Eager vs. lazy SMT solving
We focus on lazy SMT solving. Alternative eager approach: transform problems into propositional logic and use SAT solving for satisfiability checking. Condition: Logic is not more expressive than propositional logic.
Erika Abrah´ am´ - SMT solving and Symbolic Computation 14 / 39 (Full/less) lazy SMT solving
Erika Abrah´ am´ - SMT solving and Symbolic Computation 15 / 39 (Full/less) lazy SMT solving
ϕ quantifier-free FO formula
Erika Abrah´ am´ - SMT solving and Symbolic Computation 15 / 39 (Full/less) lazy SMT solving
ϕ quantifier-free FO formula Boolean abstraction Tseitin’s transformation ϕ0 propositional logic formula in CNF
Erika Abrah´ am´ - SMT solving and Symbolic Computation 15 / 39 (Full/less) lazy SMT solving
ϕ quantifier-free FO formula Boolean abstraction Tseitin’s transformation ϕ0 propositional logic formula in CNF
SAT solver
Erika Abrah´ am´ - SMT solving and Symbolic Computation 15 / 39 (Full/less) lazy SMT solving
ϕ quantifier-free FO formula Boolean abstraction Tseitin’s transformation ϕ0 propositional logic formula in CNF
SAT solver
theory constraints
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 15 / 39 (Full/less) lazy SMT solving
ϕ quantifier-free FO formula Boolean abstraction Tseitin’s transformation ϕ0 propositional logic formula in CNF
SAT solver
SAT theory constraints or + lemmas UNSAT
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 15 / 39 (Full/less) lazy SMT solving
ϕ quantifier-free FO formula Boolean abstraction Tseitin’s transformation ϕ0 propositional logic formula in CNF
SAT solver SAT or UNSAT
SAT theory constraints or + lemmas UNSAT
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 15 / 39 Less lazy SMT solving
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d )
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d )
SAT solver
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d )
SAT solver ¬a
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d )
SAT solver ¬a, b
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d )
SAT solver ¬a, b
x ≥ 0, x > 2
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d )
SAT solver ¬a, b
x ≥ 0, x > 2 SAT
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d )
SAT solver ¬a, b, ¬c
x ≥ 0, x > 2
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d )
SAT solver ¬a, b, ¬c, d
x ≥ 0, x > 2
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d )
SAT solver ¬a, b, ¬c, d
x ≥ 0, x > 2 , x2 , 1, x2 < 0
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d )
SAT solver ¬a, b, ¬c, d
x ≥ 0, x > 2 , x2 , 1, x2 < 0 UNSAT: ¬(x2 < 0)
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d ) ∧ (¬d)
SAT solver ¬a, b, ¬c, d
x ≥ 0, x > 2 , x2 , 1, x2 < 0 UNSAT: ¬(x2 < 0)
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d ) ∧ (¬d)
SAT solver
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d ) ∧ (¬d)
SAT solver ¬d
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d ) ∧ (¬d)
SAT solver ¬d, c
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d ) ∧ (¬d)
SAT solver ¬d, c
x2 ≥ 0, x2 = 1
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d ) ∧ (¬d)
SAT solver ¬d, c
x2 ≥ 0, x2 = 1 SAT
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d ) ∧ (¬d)
SAT solver ¬d, c, ¬a
x2 ≥ 0, x2 = 1
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d ) ∧ (¬d)
SAT solver ¬d, c, ¬a, b
x2 ≥ 0, x2 = 1
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d ) ∧ (¬d)
SAT solver ¬d, c, ¬a, b
x2 ≥ 0, x2 = 1 , x ≥ 0, x > 2
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d ) ∧ (¬d)
SAT solver ¬d, c, ¬a, b
x2 ≥ 0, x2 = 1 , x ≥ 0, x > 2 UNSAT: ¬(x2 = 1 ∧ x > 2)
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d ) ∧ (¬d) ∧ (¬c ∨¬ b)
SAT solver ¬d, c, ¬a, b
x2 ≥ 0, x2 = 1 , x ≥ 0, x > 2 UNSAT: ¬(x2 = 1 ∧ x > 2)
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d ) ∧ (¬d) ∧ (¬c ∨¬ b)
SAT solver ¬d, c
x2 ≥ 0, x2 = 1
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d ) ∧ (¬d) ∧ (¬c ∨¬ b)
SAT solver ¬d, c, ¬b
x2 ≥ 0, x2 = 1
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d ) ∧ (¬d) ∧ (¬c ∨¬ b)
SAT solver ¬d, c, ¬b, a
x2 ≥ 0, x2 = 1
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d ) ∧ (¬d) ∧ (¬c ∨¬ b)
SAT solver ¬d, c, ¬b, a
x2 ≥ 0, x2 = 1 , x ≤ 2, x < 0
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d ) ∧ (¬d) ∧ (¬c ∨¬ b)
SAT solver ¬d, c, ¬b, a
x2 ≥ 0, x2 = 1 , x ≤ 2, x < 0 SAT
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Less lazy SMT solving
(x < 0 ∨ x > 2) ∧ (x2 = 1 ∨ x2 < 0)
( a ∨ b ) ∧ ( c ∨ d ) ∧ (¬d) ∧ (¬c ∨¬ b)
SAT solver SAT
Theory solver(s)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 16 / 39 Some theory solver candidates for arithmetic theories Linear real arithmetic: Linear integer arithmetic: Simplex Cutting planes, Gomory cuts Ellipsoid method Branch-and-bound (incomplete) Fourier-Motzkin variable elimination Bit-blasting (eager) (mostly preprocessing) Interval constraint propagation Interval constraint propagation (incomplete) (incomplete) SMT solvers: Alt-Ergo, CVC4, iSAT3, MathSAT5, OpenSMT2, SMT-RAT, veriT, Yices2, Z3 Non-linear real arithmetic: Non-linear integer arithmetic: Cylindrical algebraic decomposition Generalised branch-and-bound Grobner¨ bases (incomplete) (mostly preprocessing/simplification) Bit-blasting (eager, incomplete) Virtual substitution (focus on low degrees) Interval constraint propagation (incomplete) SMT solvers: Alt-Ergo, AProVE, iSAT3, MiniSmt, SMT-RAT, Z3
Erika Abrah´ am´ - SMT solving and Symbolic Computation 17 / 39 So why don’t we just plug in an algebraic decision procedure as theory solver into an SMT solver?
Some corresponding implementations in CAS
Grobner¨ bases
CoCoA, F4, Maple, Mathematica, Maxima, Singular, Reduce,...
Cylindrical algebraic decomposition (CAD)
Mathematica, QEPCAD, Reduce,...
Virtual substitution (VS)
Reduce,...
Strength: Efficient for conjunctions of real constraints.
Erika Abrah´ am´ - SMT solving and Symbolic Computation 18 / 39 Some corresponding implementations in CAS
Grobner¨ bases
CoCoA, F4, Maple, Mathematica, Maxima, Singular, Reduce,...
Cylindrical algebraic decomposition (CAD)
Mathematica, QEPCAD, Reduce,...
Virtual substitution (VS)
Reduce,...
Strength: Efficient for conjunctions of real constraints. So why don’t we just plug in an algebraic decision procedure as theory solver into an SMT solver?
Erika Abrah´ am´ - SMT solving and Symbolic Computation 18 / 39 Originally, the mentioned methods are not SMT-compliant, they are seldomly available as libraries, and are usually not thread-safe.
Usually, SMT-adaptations are tricky. For illustration, let us have a high-level look at some solutions.
Why not use CAS out of the box?
Theory solvers should be SMT-compliant, i.e., they should work incrementally, generate lemmas explaining inconsistencies, and be able to backtrack.
Erika Abrah´ am´ - SMT solving and Symbolic Computation 19 / 39 Usually, SMT-adaptations are tricky. For illustration, let us have a high-level look at some solutions.
Why not use CAS out of the box?
Theory solvers should be SMT-compliant, i.e., they should work incrementally, generate lemmas explaining inconsistencies, and be able to backtrack.
Originally, the mentioned methods are not SMT-compliant, they are seldomly available as libraries, and are usually not thread-safe.
Erika Abrah´ am´ - SMT solving and Symbolic Computation 19 / 39 Why not use CAS out of the box?
Theory solvers should be SMT-compliant, i.e., they should work incrementally, generate lemmas explaining inconsistencies, and be able to backtrack.
Originally, the mentioned methods are not SMT-compliant, they are seldomly available as libraries, and are usually not thread-safe.
Usually, SMT-adaptations are tricky. For illustration, let us have a high-level look at some solutions.
Erika Abrah´ am´ - SMT solving and Symbolic Computation 19 / 39 Our SMT-RAT library
We have developed the SMT-RAT library of theory modules. [SAT’12, SAT’15] A new release came out in June 2015.
https://github.com/smtrat/smtrat/wiki
Erika Abrah´ am´ - SMT solving and Symbolic Computation 20 / 39 Our SMT-RAT library
SMT Solver Strategic composition of SMT-RAT modules
SMT-RAT (SMT real-algebraic toolbox) preprocessing, SAT and theory solver modules
CArL real-arithmetic computations
gmp, Eigen3, boost
Erika Abrah´ am´ - SMT solving and Symbolic Computation 21 / 39 Solver modules in SMT-RAT
Libraries for basic computations [NFM’11, CAI’11] SAT solver CNF converter Preprocessing/simplifying modules Interval constraint propagation Simplex Virtual substitution [FCT’11, PhD Corzilius] CAD [CADE-24, PhD Loup, PhD Kremer] Grobner¨ bases [CAI’13] Generalised branch-and-bound Under construction: equality, uninterpreted functions, bit-vector arithmetic
Erika Abrah´ am´ - SMT solving and Symbolic Computation 22 / 39 Strategic composition of solver modules in SMT-RAT
SMT solver Manager Strategy ... SAT Condition Condition Condition solver Module Module Module Module ...
Erika Abrah´ am´ - SMT solving and Symbolic Computation 23 / 39 The key idea of the virtual substitution
Eliminate one existential quantifier in favour of a finite disjunction over parametric test points.
∃x, y :(y = 0 ∨ y2 + 1 < 0) ∧ x − 3 ≤ 0 ∧ xy + 1 < 0
Test candidates eliminate⇔ x
∃y :((y = 0 ∨ y2 + 1 < 0) ∧ x − 3 ≤ 0 ∧ xy + 1 < 0 )[−∞/x]
∨ ((y = 0 ∨ y2 + 1 < 0) ∧ x − 3 ≤ 0 ∧ xy + 1 < 0 )[3/x])
2 1 ∨ ( y , 0 ∧ ((y = 0 ∨ y + 1 < 0) ∧ x − 3 ≤ 0 ∧ xy + 1 < 0 )[− y + /x]) eliminate⇔ y Side condition ...
Erika Abrah´ am´ - SMT solving and Symbolic Computation 24 / 39 xy + 1 < 0
SMT solver
∃x, y :( y = 0 ∨ y2 + 1 < 0 ) ∧ x − 3 ≤ 0 ∧ xy + 1 < 0
Boolean abstraction ( a ∨ b ) ∧ c ∧ d
SAT-solver
Theory solver (virtual substitution)
∧ x − 3 ≤ 0 ∧ y2 + 1 < 0
Erika Abrah´ am´ - SMT solving and Symbolic Computation 25 / 39 xy + 1 < 0
SMT solver
∃x, y :( y = 0 ∨ y2 + 1 < 0 ) ∧ x − 3 ≤ 0 ∧ xy + 1 < 0
Boolean abstraction ( a ∨ b ) ∧ c ∧ d
SAT-solver c
Theory solver (virtual substitution)
∧ x − 3 ≤ 0 ∧ y2 + 1 < 0
Erika Abrah´ am´ - SMT solving and Symbolic Computation 25 / 39 SMT solver
∃x, y :( y = 0 ∨ y2 + 1 < 0 ) ∧ x − 3 ≤ 0 ∧ xy + 1 < 0
Boolean abstraction ( a ∨ b ) ∧ c ∧ d
SAT-solver c
add xy + 1 < 0
Theory solver (virtual substitution)
xy + 1 < 0 ∧ x − 3 ≤ 0 ∧ y2 + 1 < 0
Erika Abrah´ am´ - SMT solving and Symbolic Computation 25 / 39 SMT solver
∃x, y :( y = 0 ∨ y2 + 1 < 0 ) ∧ x − 3 ≤ 0 ∧ xy + 1 < 0
Boolean abstraction ( a ∨ b ) ∧ c ∧ d
SAT-solver c d
add x − 3 ≤ 0
Theory solver (virtual substitution)
xy + 1 < 0 ∧ x − 3 ≤ 0 ∧ y2 + 1 < 0
Erika Abrah´ am´ - SMT solving and Symbolic Computation 25 / 39 SMT solver
∃x, y :( y = 0 ∨ y2 + 1 < 0 ) ∧ x − 3 ≤ 0 ∧ xy + 1 < 0
Boolean abstraction ( a ∨ b ) ∧ c ∧ d
SAT-solver c d
check consistency answer: consistent
Theory solver (virtual substitution)
xy + 1 < 0 consistency Theory solver ∧ x − 3 ≤ 0 check state A ∧ y2 + 1 < 0
Erika Abrah´ am´ - SMT solving and Symbolic Computation 25 / 39 Theory solver: add xy + 1 < 0, add x − 3 ≤ 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 26 / 39 Theory solver: add xy + 1 < 0, add x − 3 ≤ 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c01 c01
[−∞/x] [3/x]
Erika Abrah´ am´ - SMT solving and Symbolic Computation 26 / 39 Theory solver: add xy + 1 < 0, add x − 3 ≤ 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c01 c01
[−∞/x] [3/x]
c10 :(y > 0)c00
Erika Abrah´ am´ - SMT solving and Symbolic Computation 26 / 39 Theory solver: add xy + 1 < 0, add x − 3 ≤ 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c01 c01
[−∞/x] [3/x]
c10 :(y > 0)c00
10 c c10
[−∞/y] [0 + /y]
Erika Abrah´ am´ - SMT solving and Symbolic Computation 26 / 39 Theory solver: add xy + 1 < 0, add x − 3 ≤ 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c01 c01
[−∞/x] [3/x]
c10 :(y > 0)c00
10 c c10
[−∞/y] [0 + /y]
c10
Erika Abrah´ am´ - SMT solving and Symbolic Computation 26 / 39 Theory solver: add xy + 1 < 0, add x − 3 ≤ 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c01 c01
[−∞/x] [3/x]
c10 :(y > 0)c00
10 c c10
[−∞/y] [0 + /y]
c10 true
Erika Abrah´ am´ - SMT solving and Symbolic Computation 26 / 39 SMT solver
∃x, y :( y = 0 ∨ y2 + 1 < 0 ) ∧ x − 3 ≤ 0 ∧ xy + 1 < 0
Boolean abstraction ( a ∨ b ) ∧ c ∧ d
SAT-solver c d
check consistency answer: consistent
Theory solver (virtual substitution)
xy + 1 < 0 consistency Theory solver ∧ x − 3 ≤ 0 check state A ∧ y2 + 1 < 0
Erika Abrah´ am´ - SMT solving and Symbolic Computation 27 / 39 SMT solver
∃x, y :( y = 0 ∨ y2 + 1 < 0 ) ∧ x − 3 ≤ 0 ∧ xy + 1 < 0
Boolean abstraction ( a ∨ b ) ∧ c ∧ d
SAT-solver c d b
add y2 + 1 < 0
Theory solver (virtual substitution)
xy + 1 < 0 Theory solver ∧ x − 3 ≤ 0 state A ∧ y2 + 1 < 0
Erika Abrah´ am´ - SMT solving and Symbolic Computation 27 / 39 SMT solver
∃x, y :( y = 0 ∨ y2 + 1 < 0 ) ∧ x − 3 ≤ 0 ∧ xy + 1 < 0
Boolean abstraction ( a ∨ b ) ∧ c ∧ d
SAT-solver c d b
check consistency answer: inconsistent reason: y2 + 1 < 0
Theory solver (virtual substitution)
xy + 1 < 0 consistency Theory solver ∧ x − 3 ≤ 0 check state B ∧ y2 + 1 < 0
Erika Abrah´ am´ - SMT solving and Symbolic Computation 27 / 39 Theory solver: add y2 + 1 < 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c01 c01
[−∞/x] [3/x]
c10 :(y > 0)c00
10 c c10
[−∞/y] [0 + /y]
c10 true
Erika Abrah´ am´ - SMT solving and Symbolic Computation 28 / 39 Theory solver: add y2 + 1 < 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0) 2 c02 :(y + 1 < 0) c01 c01 [−∞/x] [3/x]
c10 :(y > 0)c00
10 c c10
[−∞/y] [0 + /y]
c10 true
Erika Abrah´ am´ - SMT solving and Symbolic Computation 28 / 39 Theory solver: add y2 + 1 < 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0) 2 c02 :(y + 1 < 0) c01 c01 [−∞/x] [3/x]
c10 :(y > 0)c00 2 c11 :(y + 1 < 0)c02
10 c c10
[−∞/y] [0 + /y]
c10 true
Erika Abrah´ am´ - SMT solving and Symbolic Computation 28 / 39 Theory solver: add y2 + 1 < 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0) 2 c02 :(y + 1 < 0) c01 c01 [−∞/x] [3/x]
c10 :(y > 0)c00 2 c11 :(y + 1 < 0)c02
10 c c10
[−∞/y] [0 + /y]
c10 ∨ c11 true
Erika Abrah´ am´ - SMT solving and Symbolic Computation 28 / 39 Theory solver: add y2 + 1 < 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0) 2 c02 :(y + 1 < 0) c01 c01 [−∞/x] [3/x]
c10 :(y > 0)c00 2 c11 :(y + 1 < 0)c02
10 c c10
[−∞/y] [0 + /y]
c10 ∨ c11 c11
Erika Abrah´ am´ - SMT solving and Symbolic Computation 28 / 39 Theory solver: add y2 + 1 < 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0) 2 c02 :(y + 1 < 0) c01 c01 [−∞/x] [3/x]
c10 :(y > 0)c00 2 c11 :(y + 1 < 0)c02
10 c c10
[−∞/y] [0 + /y]
c10 ∨ c11 c11
Erika Abrah´ am´ - SMT solving and Symbolic Computation 28 / 39 SMT solver
∃x, y :( y = 0 ∨ y2 + 1 < 0 ) ∧ x − 3 ≤ 0 ∧ xy + 1 < 0
Boolean abstraction ( a ∨ b ) ∧ c ∧ d
SAT-solver c d b
check consistency answer: inconsistent reason: y2 + 1 < 0
Theory solver (virtual substitution)
xy + 1 < 0 consistency Theory solver ∧ x − 3 ≤ 0 check state B ∧ y2 + 1 < 0
Erika Abrah´ am´ - SMT solving and Symbolic Computation 29 / 39 SMT solver
∃x, y :( y = 0 ∨ y2 + 1 < 0 ) ∧ x − 3 ≤ 0 ∧ xy + 1 < 0
Boolean abstraction ( a ∨ b ) ∧ c ∧ d
SAT-solver c d
delete y2 + 1 < 0
Theory solver (virtual substitution)
xy + 1 < 0 Theory solver ∧ x − 3 ≤ 0 state A ∧ y2 + 1 < 0
Erika Abrah´ am´ - SMT solving and Symbolic Computation 29 / 39 Theory solver: delete y2 + 1 < 0
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0) 2 c02 :(y + 1 < 0) c01 c01 [−∞/x] [3/x]
c10 :(y > 0)c00 2 c11 :(y + 1 < 0)c02
10 c c10
[−∞/y] [0 + /y]
c10 ∨ c11 c11
Erika Abrah´ am´ - SMT solving and Symbolic Computation 30 / 39 Theory solver: delete y2 + 1 < 0
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c01 c01
[−∞/x] [3/x]
c10 :(y > 0)c00 2 c11 :(y + 1 < 0)c02
10 c c10
[−∞/y] [0 + /y]
c10 ∨ c11 c11
Erika Abrah´ am´ - SMT solving and Symbolic Computation 30 / 39 Theory solver: delete y2 + 1 < 0
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c01 c01
[−∞/x] [3/x]
c10 :(y > 0)c00
10 c c10
[−∞/y] [0 + /y]
c10 ∨ c11 c11
Erika Abrah´ am´ - SMT solving and Symbolic Computation 30 / 39 Theory solver: delete y2 + 1 < 0
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c01 c01
[−∞/x] [3/x]
c10 :(y > 0)c00
10 c c10
[−∞/y] [0 + /y]
c10 ∨ c11
Erika Abrah´ am´ - SMT solving and Symbolic Computation 30 / 39 Theory solver: delete y2 + 1 < 0
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c01 c01
[−∞/x] [3/x]
c10 :(y > 0)c00
10 c c10
[−∞/y] [0 + /y]
c10
Erika Abrah´ am´ - SMT solving and Symbolic Computation 30 / 39 SMT solver
∃x, y :( y = 0 ∨ y2 + 1 < 0 ) ∧ x − 3 ≤ 0 ∧ xy + 1 < 0
Boolean abstraction ( a ∨ b ) ∧ c ∧ d
SAT-solver c d
delete y2 + 1 < 0
Theory solver (virtual substitution)
xy + 1 < 0 Theory solver ∧ x − 3 ≤ 0 state A ∧ y2 + 1 < 0
Erika Abrah´ am´ - SMT solving and Symbolic Computation 31 / 39 SMT solver
∃x, y :( y = 0 ∨ y2 + 1 < 0 ) ∧ x − 3 ≤ 0 ∧ xy + 1 < 0
Boolean abstraction ( a ∨ b ) ∧ c ∧ d ∧ (¬b)
SAT-solver c dba
add y = 0
Theory solver (virtual substitution)
xy + 1 < 0 Theory solver ∧ x − 3 ≤ 0 state A ∧ y = 0
Erika Abrah´ am´ - SMT solving and Symbolic Computation 31 / 39 SMT solver
∃x, y :( y = 0 ∨ y2 + 1 < 0 ) ∧ x − 3 ≤ 0 ∧ xy + 1 < 0
Boolean abstraction ( a ∨ b ) ∧ c ∧ d ∧ (¬b)
SAT-solver c dba
check consistency answer: inconsistent reason: xy + 1 < 0 ∧ y = 0
Theory solver (virtual substitution)
xy + 1 < 0 consistency Theory solver ∧ x − 3 ≤ 0 check state C ∧ y = 0
Erika Abrah´ am´ - SMT solving and Symbolic Computation 31 / 39 SMT solver
∃x, y :( y = 0 ∨ y2 + 1 < 0 ) ∧ x − 3 ≤ 0 ∧ xy + 1 < 0
Boolean abstraction ( a ∨ b ) ∧ c ∧ d ∧ (¬b)
SAT-solver UNSAT
Theory solver (virtual substitution)
xy + 1 < 0 Theory solver ∧ x − 3 ≤ 0 state C ∧ y = 0
Erika Abrah´ am´ - SMT solving and Symbolic Computation 31 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c01 c01
[−∞/x] [3/x]
c10 :(y > 0)c00
10 c c10
[−∞/y] [0 + /y]
c10
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 [−∞/x] [3/x]
c10 :(y > 0)c00
10 c c10
[−∞/y] [0 + /y]
c10
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 [−∞/x] [3/x]
c10 :(y > 0)c00
c11 :(y = 0)c02
10 c c10
[−∞/y] [0 + /y]
c10
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 [−∞/x] [3/x]
c10 :(y > 0)c00
c11 :(y = 0)c02
10 c c10
[−∞/y] [0 + /y]
c10 ∨ c11
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 [−∞/x] [3/x]
c10 :(y > 0)c00
c11 :(y = 0)c02
10 c c10
[−∞/y] [0 + /y]
c10 ∨ c11 c11
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 [−∞/x] [3/x]
c10 :(y > 0)c00
c11 :(y = 0)c02 c 11 10 c c10
[−∞/y] [0 + /y] [0/y]
c10 ∨ c11 c11
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 [−∞/x] [3/x]
c10 :(y > 0)c00
c11 :(y = 0)c02 c 11 10 c c10
[−∞/y] [0 + /y] [0/y]
c10 ∨ c11 c11 c10
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 [−∞/x] [3/x]
c10 :(y > 0)c00
c11 :(y = 0)c02 c 11 10 c c10
[−∞/y] [0 + /y] [0/y]
c10 ∨ c11 c11 c10
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 [−∞/x] [3/x]
c00 ∧ c02
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 [−∞/x] [3/x]
c12 : (3y + 1 < 0)c00 c ∧ c 00 02 c :(y = 0) 13 c02
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 [−∞/x] [3/x]
c12 : (3y + 1 < 0)c00 c ∧ c 00 02 c :(y = 0) 13 c02
c 12 c12
−∞ − 1 [ /y] [ 3 + /y]
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 [−∞/x] [3/x]
c12 : (3y + 1 < 0)c00 c ∧ c 00 02 c :(y = 0) 13 c02
c 12 c12
−∞ − 1 [ /y] [ 3 + /y]
c13
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 [−∞/x] [3/x]
c12 : (3y + 1 < 0)c00 c ∧ c 00 02 c :(y = 0) 13 c02
c 12 c12
−∞ − 1 [ /y] [ 3 + /y]
c13 c12 ∨ c13
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 [−∞/x] [3/x]
c12 : (3y + 1 < 0)c00 c ∧ c 00 02 c :(y = 0) 13 c02 c 13 c 12 c12
−∞ − 1 [ /y] [ 3 + /y] [0/y]
c13 c12 ∨ c13
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 [−∞/x] [3/x]
c12 : (3y + 1 < 0)c00 c ∧ c 00 02 c :(y = 0) 13 c02 c 13 c 12 c12
−∞ − 1 [ /y] [ 3 + /y] [0/y]
c13 c12 ∨ c13 c12
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 [−∞/x] [3/x]
c12 : (3y + 1 < 0)c00 c ∧ c 00 02 c :(y = 0) 13 c02 c 13 c 12 c12
−∞ − 1 [ /y] [ 3 + /y] [0/y]
c13 c12 ∨ c13 c12
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 [−∞/x] [3/x]
c00 ∧ c02 c00 ∧ c02
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 c00 1 [−∞/x] [3/x] [− y + /x]y,0
c00 ∧ c02 c00 ∧ c02
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 c00 1 [−∞/x] [3/x] [− y + /x]y,0
c14 : (1 + 3y ≤ 0)c01 c18 : (1 + 3y ≥ 0)c01
c15 :(y > 0)c01 c19 :(y < 0)c01 c ∧ c c ∧ c 00 02 00 02 c :(y = 0) c :(y = 0) 16 c02 1A c02 c17 :(y , 0)c00 c1B :(y , 0)c00
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 c00 1 [−∞/x] [3/x] [− y + /x]y,0
c14 : (1 + 3y ≤ 0)c01 c18 : (1 + 3y ≥ 0)c01
c15 :(y > 0)c01 c19 :(y < 0)c01 c ∧ c c ∧ c 00 02 00 02 c :(y = 0) c :(y = 0) 16 c02 1A c02 c17 :(y , 0)c00 c1B :(y , 0)c00 c c 16 15 c16 c14 −∞ − 1 [ /y] [0/y] [ 3 /y] [0 + /y]
c15 ∨ c16 c14 ∨ c15 ∨ c17 c15 ∨ c16 c14 ∨ c16
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 c00 1 [−∞/x] [3/x] [− y + /x]y,0
c14 : (1 + 3y ≤ 0)c01 c18 : (1 + 3y ≥ 0)c01
c15 :(y > 0)c01 c19 :(y < 0)c01 c ∧ c c ∧ c 00 02 00 02 c :(y = 0) c :(y = 0) 16 c02 1A c02 c17 :(y , 0)c00 c1B :(y , 0)c00 c c 16 15 c16 c14 −∞ − 1 [ /y] [0/y] [ 3 /y] [0 + /y]
c15 ∨ c16 c14 ∨ c15 ∨ c17 c15 ∨ c16 c14 ∨ c16
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 c00 1 [−∞/x] [3/x] [− y + /x]y,0
c18 : (1 + 3y ≥ 0)c01
c19 :(y < 0)c01 c ∧ c c ∧ c c ∧ c 00 02 00 02 00 02 c :(y = 0) 1A c02 c1B :(y , 0)c00
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 c00 1 [−∞/x] [3/x] [− y + /x]y,0
c00 ∧ c02 c00 ∧ c02 c00 ∧ c02 c00 ∧ c02
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 Theory Solver: add y = 0, check consistency
c00 :(xy + 1 < 0)
c01 :(x − 3 ≤ 0)
c02 :(y = 0) c01 c01 c00 1 [−∞/x] [3/x] [− y + /x]y,0
c00 ∧ c02 c00 ∧ c02 c00 ∧ c02 c00 ∧ c02
Erika Abrah´ am´ - SMT solving and Symbolic Computation 32 / 39 CAD for Rn
A CAD for a set of polynomials from Z[x1,..., xn] splits Rn into sign-invariant regions.
Projection phase Construction phase
n Polynomials over Z[x1,..., xn] CAD for R
− Polynomials over Z[x1,..., xn−1] CAD for Rn 1
......
Polynomials over Z[x1] CAD for R1
Erika Abrah´ am´ - SMT solving and Symbolic Computation 33 / 39 Some experimental results
We compare: Z3 (SMT solver, Microsoft) redlog (reference implementation of virtual substitution in Reduce) SMT-RAT with two strategies.
rat1: CNF Preproc SAT ICP VirtualSub CAD
SAT ICP VirtualSub CAD rat2: CNF Preproc SAT Simplex VirtualSub CAD
Erika Abrah´ am´ - SMT solving and Symbolic Computation 34 / 39 Some experimental results
Benchmark z3 redlog rat1 rat2 (#examples) # time # time # time # time Hong (20) 40.0% 5.6 30.0% 3.7 100.0% < 1 100.0% < 1 - sat 0 0 0 0 0 0 0 0 - unsat 8 3.7 6 5.6 20 < 1 20 < 1 Kissing (45) 68.9% 1248.7 13.3% 3.3 35.6% 375.9 28.9% 54.4 - sat 31 1248.7 6 3.3 16 375.9 13 54.4 - unsat 0 0 0 0 0 0 0 0 Meti-Tarski (7713) 99.9% 405.6 96.6% 11617.9 92.8% 4658.3 95.6% 3109.4 - sat 5025 140.8 4859 7128.7 4740 2952.1 4815 2290.4 - unsat 2681 264.8 2590 4489.2 2418 1706.2 2560 819 Zankl (166) 53.0% 267.6 22.3% 178.0 25.9% 217.4 25.9% 101.3 - sat 61 266.3 27 156.0 27 216.8 26 80.4 - unsat 27 1.3 10 22.0 16 < 1 17 20.9 Keymaera (421) 99.8% 11.8 99.5% 209.3 96.9% 17 98.1% 25.3 - sat 0 0 0 0 0 0 0 0 - unsat 420 11.8 419 209.3 408 17 413 25.3 Witness (99) 21.2% 153.5 5.1% 62.1 64.6% 332.2 75.8% 937.9 - sat 4 106 5 62.1 47 331.9 58 937.6 - unsat 17 47.5 0 0 17 < 1 17 < 1
Erika Abrah´ am´ - SMT solving and Symbolic Computation 35 / 39 Upcoming research directions in SMT solving
Improve usability: User-friendly models Dedicated SMT solvers Increase scalability: Performance optimisation (better lemmas, heuristics, cache behaviour, . . . ) Novel combination of decision procedures Parallelisation Extend functionality: Unsatisfiable cores, proofs, interpolants Quantified arithmetic formulas Linear and non-linear (global) optimisation
Erika Abrah´ am´ - SMT solving and Symbolic Computation 36 / 39 Two communities, quite disjoint
Symbolic computation SMT solving
Research Automated computation with Automated satisfiability checking aim formal objects for combined theories
Arithmetic Constraint sets Boolean structures focus Exact, complete Exact, efficient
Tools Computer algebra systems SAT and SMT solvers Large, general-purpose Small, dedicated
Conf. ACA, CASC, ISSAC, . . . CADE, SAT, SMT, . . .
Groups SIGSAM SMT-LIB, SAT Live!
Journals J. Symb. Comput., AAECC, J. on Satisfiability, Boolean Mod- ACM Comm. in Computer eling and Computation Algebra (SIGSAM Bulletin)
Erika Abrah´ am´ - SMT solving and Symbolic Computation 37 / 39 A forthcoming Dagstuhl Seminar
Erika Abrah´ am´ - SMT solving and Symbolic Computation 38 / 39 Conclusion: More interactions desirable
Future Directions for Research in Symbolic Computation “More interactions are desirable between mathematicians and computer scientists interested in symbolic computation, between researchers in numerical and symbolic computing, and between software builders and users.” Report of a Workshop on Symbolic and Algebraic Computation, 1988 Ann Boyle and B. F. Caviness, Editors; Anthony C. Hearn, Workshop Chairperson
Erika Abrah´ am´ - SMT solving and Symbolic Computation 39 / 39