Synthesis by Quantifier Instantiation in CVC4
Andrew Reynolds May 4, 2015
Synthesis by Quantifier Instantiation in CVC4 Andrew Reynolds May - - PowerPoint PPT Presentation
Synthesis by Quantifier Instantiation in CVC4 Andrew Reynolds May 4, 2015 Overview SMT solvers : how they work Synthesis Problem : f. x. P( f, x ) There exists a function f such that for all x, P( f, x ) New approaches for
Andrew Reynolds May 4, 2015
There exists a function f such that for all x, P( f, x )
Decision Procedure for T
DPLL(T)
Decision Procedure for T
DPLL(T)
Decision Procedure for T
DPLL(T)
Decision Procedure for T
DPLL(T)
Decision Procedure for T
DPLL(T)
Decision Procedure for T
DPLL(T)
Decision Procedure for T
DPLL(T)
Decision Procedure for T
DPLL(T)
Decision Procedure for T
DPLL(T)
sat
Decision Procedure for T
DPLL(T)
instances
Decision Procedure for T
DPLL(T)
Decision Procedure for T
DPLL(T)
sat instances
sat
Each limited to a particular fragment
However, this is challenging
Can we instead use a refutation-based approach for synthesis?
negate
negate
Push quantification downwards
Push quantification downwards
Skolemize, for fresh a and b
g.(g<a g<b (g≠a g≠b))
g.(g<a g<b (g≠a g≠b))
instances a/g, b/g (a<a a<b (a≠a a≠b)) (b<a b<b (b≠a b≠b))
g.(g<a g<b (g≠a g≠b))
a<b b<a simplify
g.(g<a g<b (g≠a g≠b))
a<b b<a g.(g<a g<b (g≠a g≠b)) is unsatisfable, implies original synthesis conjecture has a solution
f.x.P(f(x),x)
Solution for f can be extracted from unsatisfiable core of instantiations
g.P(g,k)
f.x.P(f(x),x)
negate, translate to FO
g.P(g,k)
f.x.P(f(x),x)
instances
negate, translate to FO
g.P(g,k)
f.x.P(f(x),x)
instances
negate, translate to FO
g.P(g,k)
f.x.P(f(x),x)
instances
negate, translate to FO
Claim the following is a solution for f:
ite( P(t2,k), t2, … ite( P(tn-1,k), tn-1, tn)…)[x/k]
Claim the following is a solution for f:
ite( P(t2,k), t2, … ite( P(tn-1,k), tn-1, tn)…)[x/k] Given Found
Claim the following is a solution for f:
ite( P(t2,k), t2, … ite( P(tn-1,k), tn-1, tn)…)[x/k] Given Found
If P holds for t1, return t1
Claim the following is a solution for f:
ite( P(t2,k), t2, … ite( P(tn-1,k), tn-1, tn)…)[x/k] Given Found
If P holds for t2, return t2
Claim the following is a solution for f:
ite( P(t2,k), t2, … ite( P(tn-1,k), tn-1, tn)…)[x/k] Given Found
If P holds for tn-1, return tn-1
Claim the following is a solution for f:
ite( P(t2,k), t2, … ite( P(tn-1,k), tn-1, tn)…)[x/k] Given Found
Why does P(tn,k) hold?
Claim the following is a solution for f:
ite( P(t2,k), t2, … ite( P(tn-1,k), tn-1, tn)…)[x/k] Given Found
Due to unsatisfiable core
f.xy.(f(x,y)≥x f(x,y)≥y (f(x,y)=x f(x,y)=y))
Given
f.xy.(f(x,y)≥x f(x,y)≥y (f(x,y)=x f(x,y)=y))
Given Found (a≥a a≥b (a=a a=b)),
f.xy.(f(x,y)≥x f(x,y)≥y (f(x,y)=x f(x,y)=y))
Claim the following is a solution for f:
b)…)[x/a][y/b] Given Found (a≥a a≥b (a=a a=b)),
f.xy.(f(x,y)≥x f(x,y)≥y (f(x,y)=x f(x,y)=y))
Claim the following is a solution for f:
y)…) Given Found (a≥a a≥b (a=a a=b)),
f.xy.(f(x,y)≥x f(x,y)≥y (f(x,y)=x f(x,y)=y))
Claim the following is a solution for f:
Given Found (a≥a a≥b (a=a a=b)),
For more details, see CAV 15 paper
Coutereaple Guided Quatifier Istatiatio for “thesis i “MT with Morgan Deters, Viktor Kuncak, Cesare Tinelli, and Clark Barrett
http://cvc4.cs.nyu.edu/web/