COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS
Mathias Preiner, Aina Niemetz and Armin Biere
Institute for Formal Models and Verification (FMV) Johannes Kepler University, Linz, Austria http://fmv.jku.at/ TACAS 2017 April 24-28, 2017 Uppsala, Sweden
COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS Mathias Preiner, Aina Niemetz - - PowerPoint PPT Presentation
COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS Mathias Preiner, Aina Niemetz and Armin Biere Institute for Formal Models and Verification (FMV) Johannes Kepler University, Linz, Austria http://fmv.jku.at/ TACAS 2017 April 24-28, 2017 Uppsala, Sweden
Institute for Formal Models and Verification (FMV) Johannes Kepler University, Linz, Austria http://fmv.jku.at/ TACAS 2017 April 24-28, 2017 Uppsala, Sweden
1/15
bitwise: ∼, &, |, ⊕, < <, > >, . . . arithmetic: +, −, ∗, /, . . . predicates: =, <, ≤, . . . string operations: concat, extract, extension, . . .
2/15
combined with E-matching, symbolic quantifier instantiation
concrete models and counterexamples only
relies on simplifications, approximation techniques, variable ordering
⊲ Combines synthesis with variant of CEGQI
3/15
4/15
ϕ 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/15
ϕ Preprocessing Check Ground Instances Synthesize Candidate Model Check Candidate Model CEGQI sat Model Skolem function Interpr. sat Counter- example New ground instance unsat unsat
⊲ generate expression signature ⊲ discard expressions with same signature (pruning)
⊲ candidate expressions must satisfy set of ground instances
Size Enumerated Expressions
1 x y z 1 2 . . . 2 . . . x + y x + z y + z x ∗ y . . . x = y . . . 3 . . . (x + y) ∗ x (x + y) ∗ 2 . . . x < (x ∗ y) y < (x ∗ y) . . . 4 . . . (x + y)&(x ∗ y) . . . ite(x = y, z, x) . . . . . .
6/15
ϕ Preprocessing Check Ground Instances Synthesize Candidate Model Check Candidate Model CEGQI sat Model Skolem function Interpr. sat Counter- example New ground instance unsat unsat
7/15
ϕ 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 ′
8/15
ϕ 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/15
ϕ 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 }
10/15
11/15
1LIA, LRA, NIA, NRA SMT-LIB benchmarks translated to BV
12/15
13/15
no simplification techniques yet no E-matching or other quantifier instantiation heuristics
improve synthesis impact of simplification techniques (e.g., miniscoping, DER, . . . ) model reconstruction from unsatisfiable dual formulas approach not limited to BV
14/15
15/15