Download - Internals of SMT Solvers
Internals of SMT Solvers
Leonardo de MouraMicrosoft Research
Acknowledgements
β’ Dejan Jovanovic (SRI International, NYU)β’ Grant Passmore (Univ. Edinburgh)
Herbrand Award 2013
Greg Nelson
What is a SMT Solver?
Multiple Approaches
is a portfolio of solvers
Preprocessing
Simplify
Variable elimination
if-then-else elimination
β¦
πΉ
Solver
Modular Architecture is a βmust haveβ
Equivalence Preserving Simplifications
Simplify
πΉ
πΉ β²Examples:
Preprocessor API
Preprocessor
πΉ
πΉ β²
ModelConverter
ProofConverter
and may be only equisatisfiable
Example
VariableElimination
Proofbuilder
Modelbuilder
Example
VariableElimination
Proofbuilder
Modelbuilder
π
π ,π (π)=π (π)+1
Example
VariableElimination
Proofbuilder
Modelbuilder
πβ5
πβ5 ,πβ6
Model Converters
Extension Filter
Modelbuilder
π
π ,π (π)=π (π)+1
Model Converter: Filter
πβ¨(πβ§h)
TseitinCNF converter
Modelbuilder
π
π βπ
Model Converter: Filter
πβ¨(πβ§h)
TseitinCNF converter
Modelbuilder
πβ π‘ ,πβ π ,πβ π , hβπ‘
πβ π‘ ,πβ π , hβ π‘
Model Converter: Extension + Filter
Bit-blaster
Modelbuilder
π
π β²
Preprocessors1. Produce Equivalent Formula2. Produce Equisatisfiable Formula3. Assume βclosed worldβ (non-incremental)Example: symmetry reduction
Simple QF_BV (bit-vector) solver
Simplify
Variable elimination
πΉ
Bit-blasting
Tseitin CNF converter SAT Solver
Under/Over-Approximations
Under-approximationunsat answers cannot be trusted
Over-approximationsat answers cannot be trusted
Under/Over-Approximations
Under-approximationmodel finders
Over-approximationproof finders
Under/Over-Approximations
Under-approximationS S Sβ
Over-approximationS S \ Sβ
Under/Over-Approximations
Under-approximationExample: QF_NIA model finders
add bounds to unbounded variables (and blast)
Over-approximationExample: Boolean abstraction
Under/Over-Approximations
Combining under and over is bad!sat and unsat answers cannot be trusted.
Tracking: under/over-approximations
Proof and Model converters can check if the resultant models and proofs are valid.
CEGAR is your friendCounter-Example Guided Abstract Refinement
procedure Solver(F)Fp := Abstract(F)loop
(R, M) := Solve(Fp)if R = UNSAT then return
UNSATRβ := Check(F, M)if Rβ = SAT then return SAT Fp := Refine(F, Fp, M)
Using over-approximation
Model
CEGAR is your friendCounter-Example Guided Abstract Refinement
procedure Solver(F)Fp := Abstract(F)loop
(R, Pr) := Solve(Fp)if R = SAT then return SATRβ := Check(F, Pr)if Rβ = UNSAT then return
UNSATFp := Refine(F, Fp, M)
Using under-approximation
Proof
CEGAR is your friendCounter-Example Guided Abstract Refinement
Refinements:
Incremental Solver
Run over and under-approximation is parallel
Uninterpreted Functions by CEGAR
Suppose we have a Solver that does not supportuninterpreted functions (example: QF_BV solver)
Congruence Rule:
Uninterpreted Functions by CEGARCongruence Rule:
Abstract: replace each f-application with a fresh variable(over-approximation)
π=π+1 , π (πβ1)=π , π (π)β π
π=π+1 ,π1=π ,π2β π
Uninterpreted Functions by CEGARCongruence Rule:
Check: check if congruence rule is satisfied
π=π+1 ,π1=π ,π2β π
πβ1 ,πβ0 ,πβ0 ,π1β0 ,π2β1
Uninterpreted Functions by CEGARCongruence Rule:
Refine: expand congruence axiom
π=π+1 ,π1=π ,π2β π
πβ1 ,πβ0 ,πβ0 ,π1β0 ,π2β1
Uninterpreted Functions by CEGARCongruence Rule:
Refine: expand congruence axiom
unsatπβ1β πβ¨π1=π2
UF by CEGAR
Simple QF_UFBV Solver
QF_BVsolver
AUF by CEGAR
Simple QF_AUFBV Solverarrays on top of UF
QF_BVsolver
Lemmas on Demand For Theory of Arrays [Brummayer-Biere 2009]
Simple UFBV Solvermodel-based quantifier instantiation
MBQI
UF by CEGAR
QF_BVsolver
Efficiently solving quantified bit-vector formulas [Wintersteiger at al 2010]
Simple QF_NIA βsolverβ by CEGARnonlinear integer arithmetic
Hilbertβs 10th ProblemDPRM theorem: QF_NIA is undecidable
Idea: use (under-approximation) CEGAR1. Add lower/upper bounds to all variables, and convert
into QF_BV2. If SAT done3. Otherwise, refine: increase lower/upper bounds
Lazy SMT as CEGARSuppose we have a Solver that can only process a conjunction of literals.
Examples: Congurence Closure (UF), Simplex (Linear Real Arithmetic)
Lazy SMT as CEGAR: 1. AbstractBasic Idea
x 0, y = x + 1, (y > 2 y < 1)
p1, p2, (p3 p4) p1 (x 0), p2 (y = x + 1), p3 (y > 2), p4 (y < 1)
[Audemard et al - 2002], [Barrett et al - 2002], [de Moura et al - 2002][Flanagan et al - 2003], β¦
Lazy SMT as CEGAR: 2. SolveBasic Idea
x 0, y = x + 1, (y > 2 y < 1)
p1 (x 0), p2 (y = x + 1), p3 (y > 2), p4 (y < 1)
p1, p2, (p3 p4)
SAT Solver
Lazy SMT as CEGAR: 2. SolveBasic Idea
x 0, y = x + 1, (y > 2 y < 1)
p1 (x 0), p2 (y = x + 1), p3 (y > 2), p4 (y < 1)
p1, p2, (p3 p4)
SAT Solver
Assignmentp1, p2, p3, p4
Lazy SMT as CEGAR: 3. CheckBasic Idea
x 0, y = x + 1, (y > 2 y < 1)
p1, p2, (p3 p4)
SAT Solver
Assignmentp1, p2, p3, p4
p1 (x 0), p2 (y = x + 1), p3 (y > 2), p4 (y < 1)
x 0, y = x + 1, (y > 2), y < 1
Lazy SMT as CEGAR: 3. CheckBasic Idea
x 0, y = x + 1, (y > 2 y < 1)
p1, p2, (p3 p4)
SAT Solver
Assignmentp1, p2, p3, p4
p1 (x 0), p2 (y = x + 1), p3 (y > 2), p4 (y < 1)
x 0, y = x + 1, (y > 2), y < 1
TheorySolver
Unsatisfiablex 0, y = x + 1, y <
1
Lazy SMT as CEGAR: 4. RefineBasic Idea
x 0, y = x + 1, (y > 2 y < 1)
p1, p2, (p3 p4)
SAT Solver
Assignmentp1, p2, p3, p4
p1 (x 0), p2 (y = x + 1), p3 (y > 2), p4 (y < 1)
x 0, y = x + 1, (y > 2), y < 1
TheorySolver
Unsatisfiablex 0, y = x + 1, y <
1
New Lemmap1p2p4
Lazy SMT as CEGAR: 4. RefineBasic Idea
TheorySolver
Unsatisfiablex 0, y = x + 1, y <
1
New Lemmap1p2p4
AKATheory conflict
Lazy SMT as CEGAR: refinements
Many refinements:IncrementalityEfficient BacktrackingEfficient Lemma GenerationTheory propagation - DPLL(T) [Ganzinger et all β 2004]
Many SMT solvers are based on DPLL(T)
DPLL(T) weaknessTheories are βsecond-class citizensβ.DPLL(T) is not model-driven (key property of CDCL).
Models
Proo
fsConflict
Resolution
CDCL: Conflict Driven Clause Learning
Resolution
DPLLConflict
Resolution
Proof
Model
DPLL(T) weakness
DPLL(T) works well only for βeasyβ theories.Examples:
Uninterpreted functionsDifference logic ()Linear real arithmetic
βHard theoriesβ:Linear integer arithmeticArraysNonlinear real arithmetic
Example: Nonlinear Real Arithmetic
PSPACE
QF_NRANP-hardnessx is βBooleanβ x (x-1) = 0 x or y or z x + y + z > 0
PSPACE membershipCanny β 1988,Grigorβev β 1988
NP
The RISE of Model-Driven Techniques in SMT
Saturation x Search
Proof-finding Model-finding
Models
Proo
fsConflict
Resolution
Two procedures
Resolution DPLLProof-finder Model-finderSaturation Search
CDCL is model-driven proof search
Linear Arithmetic
Fourier-Motzkin SimplexProof-finder Model-finderSaturation Search
Fourier-Motzkin
Very similar to Resolution
Exponential time and space
π‘1β€ππ₯ ,ππ₯β€ π‘ 2
ππ‘1β€πππ₯ ,πππ₯β€ππ‘ 2
ππ‘1β€ππ‘2
Polynomial Constraints
AKAExistential Theory of the Reals
R
CAD βBig Pictureβ1. Project/Saturate set of polynomials 2. Lift/Search: Incrementally build assignment
Isolate roots of polynomials Select a feasible cell , and assign some If there is no feasible cell, then backtrack
CAD βBig Pictureβπ₯2+ π¦2β1<0π₯ π¦β1>0 1. Saturate
π₯4βπ₯2+1
π₯π₯2β1
+ + + + + + ++ 0 - - - 0 +- - - 0 + + +
2. Search
CAD βBig Pictureβππ+ππβπ<0π π βπ>0 1. Saturate
π₯4βπ₯2+1
π₯π₯2β1
+ + + + + + ++ 0 - - - 0 +- - - 0 + + +
πβπ
+ + ++ 0 -
2. Search
CAD βBig Pictureβππ+ππβπ<ππ₯ π¦β1>0 1. Saturate
π₯4βπ₯2+1
π₯π₯2β1
+ + + + + + ++ 0 - - - 0 +- - - 0 + + +
πβπ
+ + ++ 0 -
2. Search
CONFLICT
NLSat: Model-Driven SearchStatic x DynamicOptimistic approachKey ideas
Start the Search before Saturate/ProjectWe saturate on demandModel guides the saturation
Models
Proo
fs
Conflict
Resolution
Experimental Results (1)OUR NEW ENGINE
Experimental Results (2)
OUR NEW ENGINE
Other examples
Delayed Theory Combination[Bruttomesso et al 2006]
Model-Based Theory CombinationX
Other examples
Array Theory byAxiom Instantiation
Lemmas on DemandFor Theory of Array
[Brummayer-Biere 2009]X
Other examples(for linear arithmetic)
Fourier-Motzkin
Generalizing DPLL to richer logics
[McMillan et al 2009]
Conflict Resolution[Korovin et al 2009]
X
Saturation: successful instances
Polynomial time procedures
Gaussian EliminationCongruence Closure
MCSat
Model-Driven SMTLift ideas from CDCL to SMT
Generalize ideas found in model-driven approachesEasier to implement
Model construction is explicit
MCSat
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
MCSat
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2
Propagations
MCSat
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2
Propagations
π₯β₯1
MCSat
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2
Propagations
π₯β₯1 π¦ β₯1
MCSat
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2
Boolean Decisions
π₯β₯1 π¦ β₯1π₯2+ π¦2β€1
MCSat
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2
Semantic Decisions
π₯β₯1 π¦ β₯1π₯2+ π¦2β€1π₯β2
MCSat
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2
Conflict
π₯β₯1 π¦ β₯1π₯2+ π¦2β€1π₯β2
We canβt find a value for s.t.
MCSat
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2
Conflict
π₯β₯1 π¦ β₯1π₯2+ π¦2β€1π₯β2
We canβt find a value for s.t.
Learning that = 2)is not productive
MCSat
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2 π₯β₯1 π¦ β₯1π₯2+ π¦2β€1
Learning that = 2)is not productive
Β¬(π₯=2)
= 2)
MCSat
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2 π₯β₯1 π¦ β₯1π₯2+ π¦2β€1
Learning that = 2)is not productive
Β¬(π₯=2)
= 2)
π₯β3
MCSat
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2 π₯β₯1 π¦ β₯1π₯2+ π¦2β€1
Learning that = 2)is not productive
Β¬(π₯=2)
= 2)
π₯β3
βSameβ Conflict
We canβt find a value for s.t.
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2
Conflict
π₯β₯1 π¦ β₯1π₯2+ π¦2β€1π₯β2
π¦
π₯
π₯2+ π¦2β€1 π₯β2
β1β€ π₯ , π₯β€1
Β¬(π₯2+ π¦2β€1)β¨π₯β€1
MCSat
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2 π₯β₯1 π¦ β₯1π₯2+ π¦2β€1 π₯β€1
Β¬(π₯2+π¦2β€1)β¨π₯β€1
MCSat
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2 π₯β₯1 π¦ β₯1π₯2+ π¦2β€1 π₯β€1
Β¬(π₯2+π¦2β€1)β¨π₯β€1ConflictΒ¬ (π₯β₯2 )β¨Β¬(π₯β€1)
MCSat
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2 π₯β₯1 π¦ β₯1π₯2+ π¦2β€1
Β¬(π₯2+π¦2β€1)β¨π₯β€1Learned by resolutionΒ¬ (π₯β₯2 )β¨Β¬(π₯2+π¦2β€1)
MCSat
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2 π₯β₯1 π¦ β₯1Β¬(π₯2+π¦2β€1)
Β¬(π₯2+π¦2β€1)β¨π₯β€1Β¬ (π₯β₯2 )β¨Β¬(π₯2+π¦2β€1)
MCSat: FM Example
, π§β0 , π¦β0
, β‘
,
βπ₯+π§+1β€0π§β0 π¦β0π₯β π¦ β€0
We canβt find a value of
MCSat: FM Example
, π§β0 , π¦β0
π§+1β π¦ β€0
βπ₯+π§+1β€0π§β0 π¦β0π₯β π¦ β€0
Β¬ (βπ₯+π§+1β€ 0 )β¨Β¬ (π₯β π¦ β€0 )β¨π§+1β π¦ β€0
Fourier-Motzkin
MCSat: FM Example
βπ₯+π§+1β€0π§β0 π§+1β π¦ β€0π₯β π¦ β€0
Β¬ (βπ₯+π§+1β€ 0 )β¨Β¬ (π₯β π¦ β€0 )β¨π§+1β π¦ β€0
MCSat: FM Example
βπ₯+π§+1β€0π§β0 π§+1β π¦ β€0π₯β π¦ β€0
Β¬ (βπ₯+π§+1β€ 0 )β¨Β¬ (π₯β π¦ β€0 )β¨π§+1β π¦ β€0
π¦β1
, π§β0 , π¦β1
, β‘
,
MCSat: FM Example
βπ₯+π§+1β€0π§β0 π§+1β π¦ β€0π₯β π¦ β€0
Β¬ (βπ₯+π§+1β€ 0 )β¨Β¬ (π₯β π¦ β€0 )β¨π§+1β π¦ β€0
π¦β1
, π§β0 , π¦β1
, β‘
,
π₯β1
MCSat: Another Exampleβ4 π₯π¦β4 π₯+ π¦>1 ,π₯2+ π¦2<1 ,π₯3+2π₯2+3 π¦2β5<0
MCSat: Another Example
π₯3+2π₯2+3 π¦ 2β5<0
π₯2+ π¦2<1
β4 π₯π¦β4 π₯+ π¦>1
Feasible Region
Starting searchPartial solution:
Can we extend it to ?
What is the core?
β4 π₯π¦β4 π₯+ π¦>1 ,π₯2+ π¦2<1 ,π₯3+2π₯2+3 π¦2β5<0
MCSat: Another Example
π₯3+2π₯2+3 π¦ 2β5<0
π₯2+ π¦2<1
β4 π₯π¦β4 π₯+ π¦>1
Feasible Region
Starting searchPartial solution:
Can we extend it to ?
What is the core?
β4 π₯π¦β4 π₯+ π¦>1 ,π₯2+ π¦2<1 ,π₯3+2π₯2+3 π¦2β5<0
MCSat β Finite BasisEvery theory that admits quantifier elimination has a finite basis (given a fixed assignment order)
πΉ [π₯ , π¦1 ,β¦, π¦π]
βπ₯ :πΉ [π₯ , π¦1 ,β¦, π¦π]
πΆ1[π¦1 ,β¦, π¦π]β§β¦β§πΆπ[π¦1 ,β¦, π¦π ]
Β¬πΉ [π₯ , π¦1 ,β¦, π¦π ]β¨πΆπ[π¦1 ,β¦, π¦π ]
MCSat β Finite Basis
πΉ 1[π₯1]
πΉ 2[π₯1 ,π₯2]
πΉ π[π₯1 ,π₯2,β¦, π₯πβ1 ,π₯π]
πΉ πβ1[π₯1 ,π₯2 ,β¦, π₯πβ1]β¦
MCSat β Finite Basis
πΉ 1[π₯1]
πΉ 2[π₯1 ,π₯2]
πΉ π[π₯1 ,π₯2,β¦, π₯πβ1 ,π₯π]
πΉ πβ1[π₯1 ,π₯2 ,β¦, π₯πβ1]β¦
MCSat β Finite Basis
πΉ 1[π₯1]
πΉ 2[π₯1 ,π₯2]
πΉ π[π₯1 ,π₯2,β¦, π₯πβ1 ,π₯π]
πΉ πβ1[π₯1 ,π₯2 ,β¦, π₯πβ1]β¦
MCSat β Finite Basis
πΉ 1[π₯1]
πΉ 2[π₯1 ,π₯2]
πΉ π[π₯1 ,π₯2,β¦, π₯πβ1 ,π₯π]
πΉ πβ1[π₯1 ,π₯2 ,β¦, π₯πβ1]β¦
MCSat β Finite BasisEvery βfiniteβ theory has a finite basisExample: Fixed size Bit-vectors
πΉ [π₯ , π¦1 ,β¦, π¦π]
Β¬πΉ [π₯ , π¦1 ,β¦, π¦π ]β¨Β¬(π¦1=πΌ1)β¨β¦β¨Β¬(π¦ΒΏΒΏπ=πΌπ)ΒΏ
MCSat β Finite BasisTheory of uninterpreted functions has a finite basis
Theory of arrays has a finite basis [Brummayer- Biere 2009]
In both cases the Finite Basis is essentially composed of equalities between existing terms.
MCSat: Uninterpreted Functions
π=π+1 , π (πβ1 )<π , π (π )>π
π=π+1 , π (π )<π , π (π )>π ,π=πβ1
π=π+1 , π (π )<π , π (π )>π ,π=πβ1
Treat and as variablesGeneralized variables
MCSat: Uninterpreted Functionsπ=π+1 , π (π )<π , π (π )>π ,π=πβ1
πβ0πβ0π (π)β0π (π)β2
Conflict: and must be equal
Β¬ (π=π)β¨ π (π )= π (π)
MCSat: Uninterpreted Functionsπ=π+1 , π (π )<π , π (π )>π ,π=πβ1
πβ0πβ0π (π)β0
Β¬ (π=π)β¨ π (π )= π (π)
π=π
(Semantic) Propagation
MCSat: Uninterpreted Functionsπ=π+1 , π (π )<π , π (π )>π ,π=πβ1
πβ0πβ0π (π)β0
Β¬ (π=π)β¨ π (π )= π (π)
π=π π (π )= π (π)
MCSat: Uninterpreted Functionsπ=π+1 , π (π )<π , π (π )>π ,π=πβ1
πβ0πβ0π (π)β0
Β¬ (π=π)β¨ π (π )= π (π)
π=π π (π )= π (π)π (π)β0
MCSat β Finite BasisWe can also use literals from the finite basis in decisions.
Application: simulate branch&bound for bounded linear integer arithmetic
LP solution:
1 2 3 4 5 6π₯1
123456
0
π₯2
π₯1β₯1π₯1β€0
MCSat: Termination
Propagations
Boolean Decisions
Semantic Decisions
MCSat
β»Propagations
Boolean Decisions
Semantic Decisions
MCSat
β»
Propagations
Boolean Decisions
Semantic Decisions
MCSat
ΒΏπΉππππ‘ππ΅ππ ππ β¨ΒΏ
β¦Maximal Elements
β¦
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2 π₯β₯1 π¦ β₯1π₯2+ π¦2β€1 π₯β€1
Β¬(π₯2+π¦2β€1)β¨π₯β€1ConflictΒ¬ (π₯β₯2 )β¨Β¬(π₯β€1)
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2 π₯β₯1 π¦ β₯1π₯2+ π¦2β€1 π₯β€1
Β¬(π₯2+π¦2β€1)β¨π₯β€1ConflictΒ¬ (π₯β₯2 )β¨Β¬(π₯β€1)
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2 π₯β₯1 π¦ β₯1Β¬(π₯2+π¦2β€1)
Β¬(π₯2+π¦2β€1)β¨π₯β€1Β¬ (π₯β₯2 )β¨Β¬(π₯2+π¦2β€1)
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2 π₯β₯1 π¦ β₯1π₯2+ π¦2β€1 π₯β€1
Β¬(π₯2+π¦2β€1)β¨π₯β€1ConflictΒ¬ (π₯β₯2 )β¨Β¬(π₯β€1)
π₯β₯2 , (Β¬π₯β₯1β¨ π¦ β₯1 ) ,(π₯2+ π¦2β€1β¨π₯π¦>1)
π₯β₯2 π₯β₯1 π¦ β₯1Β¬(π₯2+π¦2β€1)
Β¬(π₯2+π¦2β€1)β¨π₯β€1Β¬ (π₯β₯2 )β¨Β¬(π₯2+π¦2β€1)
π₯<1β¨π ,Β¬πβ¨π₯=2
π₯β1
MCSat
π₯<1β¨π ,Β¬πβ¨π₯=2
π₯β1
MCSat
π
π₯<1β¨π ,Β¬πβ¨π₯=2
π₯β1
MCSat
π
Conflict (evaluates to false)
π₯<1β¨π ,Β¬πβ¨π₯=2
π₯β1
MCSat
π
New clauseπ₯<1β¨π₯=2
π₯<1β¨π ,Β¬πβ¨π₯=2
π₯β1
MCSat
π
New clauseπ₯<1β¨π₯=2
π₯<1
π₯<1β¨π ,Β¬πβ¨π₯=2
π₯β1
MCSat
π
New clauseπ₯<1β¨π₯=2
π₯<1
MCSat: Architecture
Arithmetic
Boolean Lists
Arrays
MCSat: development
MCSat prototype: 7k lines of codeDeduction Rules
Boolean Resolution
Fourier-Motzkin
Equality Split
Ackermann expansionaka Congruence
Normalization
MCSat: preliminary resultsprototype: 7k lines of code
QF_LRA
MCSat: preliminary resultsprototype: 7k lines of code
QF_UFLRA and QF_UFLIA
ConclusionMode-driven techniques are very promising
Preprocessing
MCSat: new framework for developing SMT solversMCSat generalizes NLSat
Modular architecture
CEGAR
Resources: PapersThe Strategy Challenge in SMT Solving, L. de Moura and G. Passmore.http://research.microsoft.com/en-us/um/people/leonardo/files/smt-strategy.pdf
Solving non-linear arithmetic, D. Jovanovic and L. de Mourahttp://research.microsoft.com/en-us/um/people/leonardo/files/IJCAR2012.pdf
A Model Constructing Satisfiability Calculus, L. de Moura and D. Jovanonichttp://research.microsoft.com/en-us/um/people/leonardo/files/mcsat.pdf
The Design and Implementation of the Model Constructing Satisfiability Calculus, D. Jovanovic, C. Barrett , L. de Mourahttp://research.microsoft.com/en-us/um/people/leonardo/mcsat_design.pdf
Resources: Source Code
nlsathttps://z3.codeplex.com/SourceControl/latest#src/nlsat/
mcsathttps://github.com/dddejan/CVC4/tree/mcsat
tactic/preprocessorshttps://z3.codeplex.com/SourceControl/latest#src/tactic/