COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS
Mathias Preiner ⋆†, Aina Niemetz ⋆† and Armin Biere⋆
⋆ Johannes Kepler University † Stanford University
COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS Mathias Preiner , Aina - - PowerPoint PPT Presentation
COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS Mathias Preiner , Aina Niemetz and Armin Biere Johannes Kepler University Stanford University SMT Workshop July 22-23, 2017 Heidelberg, Germany Introduction
⋆ Johannes Kepler University † Stanford University
1/19
bitwise: ∼, &, |, ⊕, < <, > >, . . . arithmetic: +, −, ∗, /, . . . predicates: =, <, ≤, . . . string operations: concat, extract, extension, . . .
2/19
combined with E-matching
relies on simplifications, approximation techniques, variable ordering
⊲ Combines synthesis with variant of CEGQI
3/19
4/19
ϕ Preprocessing Check Ground Instances Synthesize Candidate Model Check Candidate Model CEGQI SAT UNSAT sat Model Skolem function Interpr. sat Counter- example New ground instance unsat unsat
5/19
ϕ Preprocessing Check Ground Instances Synthesize Candidate Model Check Candidate Model CEGQI sat Model Skolem function Interpr. sat Counter- example New ground instance unsat unsat
⊲ start with smallest expressions (inputs) ⊲ enumerate expressions in increasing size ⊲ prune enumeration space
⊲ return candidate interpretation if all gi ∈ G are satisfied
6/19
ϕ Preprocessing Check Ground Instances Synthesize Candidate Model Check Candidate Model CEGQI sat Model Skolem function Interpr. sat Counter- example New ground instance unsat unsat
1 x y 1 2 x = y x = 0 x = 1 y = x y = 0 y = 1 x + y . . . 3 (x + y) + x (x + y) + y (x + y) + 1 . . . 4 (x = y)&(x = 0) (x = y)&(x = 1) . . . ite(x = y, x, y) . . . . . .
⊲ Large enumeration space!
7/19
ϕ Preprocessing Check Ground Instances Synthesize Candidate Model Check Candidate Model CEGQI sat Model Skolem function Interpr. sat Counter- example New ground instance unsat unsat
′, . . . , gn ′
⊲ if every value is true, e is a candidate interpretation for f
8/19
ϕ Preprocessing Check Ground Instances Synthesize Candidate Model Check Candidate Model CEGQI sat Model Skolem function Interpr. sat Counter- example New ground instance unsat unsat
9/19
ϕ Preprocessing Check Ground Instances Synthesize Candidate Model Check Candidate Model CEGQI sat Model Skolem function Interpr. sat Counter- example New ground instance unsat unsat
10/19
ϕ Preprocessing Check Ground Instances Synthesize Candidate Model Check Candidate Model CEGQI sat Model Skolem function Interpr. sat Counter- example New ground instance unsat unsat
11/19
ϕ Preprocessing Check Ground Instances Synthesize Candidate Model Check Candidate Model CEGQI sat Model Skolem function Interpr. sat Counter- example New ground instance unsat unsat
⊲ Solver returns sat, candidate model is invalid ⊲ Solver produces counterexample { a = 1, b = 0 }
12/19
⊲ CEGMS(ϕ) and CEGMS(¬ϕ) can be executed in parallel
13/19
Boolector . . . CEGQI only +s . . . synthesis +d . . . dual (parallel) Limits 1200 seconds CPU time, 7GB memory
1LIA, LRA, NIA, NRA SMT-LIB benchmarks translated to BV
14/19
Limits 1200 seconds CPU time, 7GB memory
15/19
xi . . . universal variables, c . . . constant value,
16/19
enumerative learning algorithm straightforward to implement
no simplification techniques yet no E-matching or other quantifier instantiation heuristics
improve synthesis approach ⊲ employ divide and conquer approach from [Alur’17] ⊲ employ other synthesis approaches? generalize counterexamples via synthesis model reconstruction from unsatisfiable dual formulas useful for other theories?
17/19
18/19
19/19