The Uses of SAT Solvers in Vampire
Giles Reger and Martin Suda
School of Computer Science, University of Manchester
The 2nd Vampire Workshop
Reger,G Vampire and SAT Solvers 1 / 30
The Uses of SAT Solvers in Vampire Giles Reger and Martin Suda - - PowerPoint PPT Presentation
The Uses of SAT Solvers in Vampire Giles Reger and Martin Suda School of Computer Science, University of Manchester The 2nd Vampire Workshop Reger,G Vampire and SAT Solvers 1 / 30 Introduction In this talk we will: Talk about the different
Reger,G Vampire and SAT Solvers 1 / 30
1
2
3
4
Reger,G Vampire and SAT Solvers 2 / 30
Reger,G Vampire and SAT Solvers 3 / 30
Reger,G Vampire and SAT Solvers 4 / 30
Reger,G Vampire and SAT Solvers 5 / 30
Reger,G Vampire and SAT Solvers 6 / 30
◮ Any model will be symmetrical in ordering of domain constants ◮ So the SAT solver will be checking the same model multiple times ◮ We can (partly) break these symmetries by ordering ground terms ◮ Pick and order n ground terms (include all constants at the front) ◮ For term ti and domain size n add the clauses
◮ Separate constants and function positions into different distinct sorts ◮ Under certain conditions we can detect a maximum size for a sort ◮ This information can render certain constraints redundant Reger,G Vampire and SAT Solvers 7 / 30
◮ Can help a lot ◮ Can make things worse Reger,G Vampire and SAT Solvers 8 / 30
◮ This is a decision procedure for EPR i.e. we stop at n where n is the
◮ The input can restrict the size of the domain, then we can detect the
◮ Idea (from Paradox): use and update single SAT solver ◮ Requires us to retract totality constraints ◮ Pros: we only have to generate new stuff, we get learned clauses ◮ Cons: we lose variable elimination Reger,G Vampire and SAT Solvers 9 / 30
Reger,G Vampire and SAT Solvers 10 / 30
◮ Combine with decision procedures i.e. use a SMT solver ◮ See VampireZ3 in CASC as a proof of idea Reger,G Vampire and SAT Solvers 11 / 30
1
2
Reger,G Vampire and SAT Solvers 12 / 30
◮ FO: Process new clauses ⋆ split clauses into components ◮ SAT: Construct model ◮ FO: Use model (do splitting) ⋆ In FO use clauses with assertions ◮ FO: Do FO proving ⋆ Assertions must be preserved in
◮ Process refutation
Reger,G Vampire and SAT Solvers 13 / 30
◮ FO: Process new clauses ⋆ split clauses into components ◮ SAT: Construct model ◮ FO: Use model (do splitting) ⋆ In FO use clauses with assertions ◮ FO: Do FO proving ⋆ Assertions must be preserved in
◮ Process refutation
Reger,G Vampire and SAT Solvers 13 / 30
◮ FO: Process new clauses ⋆ split clauses into components ◮ SAT: Construct model ◮ FO: Use model (do splitting) ⋆ In FO use clauses with assertions ◮ FO: Do FO proving ⋆ Assertions must be preserved in
◮ Process refutation
Reger,G Vampire and SAT Solvers 13 / 30
◮ FO: Process new clauses ⋆ split clauses into components ◮ SAT: Construct model ◮ FO: Use model (do splitting) ⋆ In FO use clauses with assertions ◮ FO: Do FO proving ⋆ Assertions must be preserved in
◮ Process refutation
Reger,G Vampire and SAT Solvers 13 / 30
◮ FO: Process new clauses ⋆ split clauses into components ◮ SAT: Construct model ◮ FO: Use model (do splitting) ⋆ In FO use clauses with assertions ◮ FO: Do FO proving ⋆ Assertions must be preserved in
◮ Process refutation
Reger,G Vampire and SAT Solvers 13 / 30
◮ FO: Process new clauses ⋆ split clauses into components ◮ SAT: Construct model ◮ FO: Use model (do splitting) ⋆ In FO use clauses with assertions ◮ FO: Do FO proving ⋆ Assertions must be preserved in
◮ Process refutation
Reger,G Vampire and SAT Solvers 13 / 30
◮ FO: Process new clauses ⋆ split clauses into components ◮ SAT: Construct model ◮ FO: Use model (do splitting) ⋆ In FO use clauses with assertions ◮ FO: Do FO proving ⋆ Assertions must be preserved in
◮ Process refutation
Reger,G Vampire and SAT Solvers 13 / 30
◮ FO: Process new clauses ⋆ split clauses into components ◮ SAT: Construct model ◮ FO: Use model (do splitting) ⋆ In FO use clauses with assertions ◮ FO: Do FO proving ⋆ Assertions must be preserved in
◮ Process refutation
Reger,G Vampire and SAT Solvers 13 / 30
◮ FO: Process new clauses ⋆ split clauses into components ◮ SAT: Construct model ◮ FO: Use model (do splitting) ⋆ In FO use clauses with assertions ◮ FO: Do FO proving ⋆ Assertions must be preserved in
◮ Process refutation
Reger,G Vampire and SAT Solvers 13 / 30
◮ FO: Process new clauses ⋆ split clauses into components ◮ SAT: Construct model ◮ FO: Use model (do splitting) ⋆ In FO use clauses with assertions ◮ FO: Do FO proving ⋆ Assertions must be preserved in
◮ Process refutation
Reger,G Vampire and SAT Solvers 13 / 30
◮ FO: Process new clauses ⋆ split clauses into components ◮ SAT: Construct model ◮ FO: Use model (do splitting) ⋆ In FO use clauses with assertions ◮ FO: Do FO proving ⋆ Assertions must be preserved in
◮ Process refutation
Reger,G Vampire and SAT Solvers 13 / 30
◮ FO: Process new clauses ⋆ split clauses into components ◮ SAT: Construct model ◮ FO: Use model (do splitting) ⋆ In FO use clauses with assertions ◮ FO: Do FO proving ⋆ Assertions must be preserved in
◮ Process refutation
Reger,G Vampire and SAT Solvers 13 / 30
◮ FO: Process new clauses ⋆ split clauses into components ◮ SAT: Construct model ◮ FO: Use model (do splitting) ⋆ In FO use clauses with assertions ◮ FO: Do FO proving ⋆ Assertions must be preserved in
◮ Process refutation
Reger,G Vampire and SAT Solvers 13 / 30
◮ FO: Process new clauses ⋆ split clauses into components ◮ SAT: Construct model ◮ FO: Use model (do splitting) ⋆ In FO use clauses with assertions ◮ FO: Do FO proving ⋆ Assertions must be preserved in
◮ Process refutation
Reger,G Vampire and SAT Solvers 13 / 30
◮ FO: Process new clauses ⋆ split clauses into components ◮ SAT: Construct model ◮ FO: Use model (do splitting) ⋆ In FO use clauses with assertions ◮ FO: Do FO proving ⋆ Assertions must be preserved in
◮ Process refutation
◮ From the SAT solver
Reger,G Vampire and SAT Solvers 13 / 30
◮ What to do with ground literals? ◮ What to do with unsplittable clauses?
◮ Our own, MiniSAT, Lingeling ◮ Setting various options
◮ Do we need the whole model? ◮ How does a partial model interact with splitting theory? Reger,G Vampire and SAT Solvers 14 / 30
◮ The model produced by the SAT solver matters ◮ Faster SAT solving can help ◮ Incremental SAT solving can help
◮ A lot... ◮ How important the model is, what a nice model is ◮ How important partial models are, what kind of partialness ◮ How much information we should give the SAT solver
Reger,G Vampire and SAT Solvers 15 / 30
Reger,G Vampire and SAT Solvers 16 / 30
1
2
3
4
5
Reger,G Vampire and SAT Solvers 17 / 30
Reger,G Vampire and SAT Solvers 18 / 30
Reger,G Vampire and SAT Solvers 19 / 30
Reger,G Vampire and SAT Solvers 20 / 30
Reger,G Vampire and SAT Solvers 21 / 30
Reger,G Vampire and SAT Solvers 22 / 30
Reger,G Vampire and SAT Solvers 23 / 30
1
2
3
Reger,G Vampire and SAT Solvers 24 / 30
◮ C = p(x, y) ∨ r(x) ◮ S = {p(x, y) ∨ r(x), p(x, x)}
◮ If we do things wrong we can get Sgr = {p(a, b) ∨ r(a), p(a, a)} ◮ We check {p(a, a) ∨ r(a), p(a, a), ¬p(a, a)} ◮ We have Sgr |
◮ The correct grounding of S is Sgr = {p(a, b) ∨ r(a), p(a, a), p(a, b)} ◮ We check {p(a, b) ∨ r(a), p(a, a), p(a, b), ¬p(a, b)} ◮ C can be replaced by p(x, y) Reger,G Vampire and SAT Solvers 25 / 30
Reger,G Vampire and SAT Solvers 26 / 30
◮ Assert A for unconditional reduction ◮ Assert AVATAR model for conditional reduction ⋆ Might need to extend A in reduced clause
Reger,G Vampire and SAT Solvers 27 / 30
Reger,G Vampire and SAT Solvers 28 / 30
◮ For AVATAR this might be about minimal change or minimality ◮ For Instance Generation this might be about minimising the number of
Reger,G Vampire and SAT Solvers 29 / 30
Reger,G Vampire and SAT Solvers 30 / 30