automatic reasoning (ar) beyond sat and smt › ssa-school-2019 › slides › ... ·...

29
Automatic Reasoning (AR) Beyond SAT and SMT Christoph Weidenbach

Upload: others

Post on 29-Jun-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Automatic Reasoning (AR)

Beyond SAT and SMT

Christoph Weidenbach

Page 2: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 2

Automatic Reasoning

The science of developing systems that automatically test (un)satisfiability, validity of a logical formula.

SAT: FOL:

Post Correspondence Problem (PCP) [Post46]

Page 3: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 3

Message

The more expressive the logic the more the needfor a sophisticated combination of AR techniquesin order to obtain a robust user experience.

Robust:• Small changes to a problem formulation result in

small changes in system solving.• Easy problems are solved fast.

This is a dream, in general, but achievable in specific settings.

Page 4: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 4

Parts of the AR Landscape

SAT QBF FOLBS

LIA LIANP

NP PSPACE NEXPTIME UNDECIDABLEHardware Verification

Software Verification

Knowledge Representation

Theorem Proving

NP

Hardware Verification

Universal

+ +

SMT BS(T)UNDECIDABLEPSPACE

= =

[Coo71, Lew79, Lew80, Pap81, Pla84, FLHT01, BHvMW09]

Page 5: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 5

Why does SAT work?CDCL (Conflict Driven Clause Learning) [SS96, BS97]

No waste of computing time.

Page 6: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 6

Non-Redundant Clauses

If is a CDCL Backtracking state with eager Conflict and Propagate, then where

. Non-Redundancy is NP-complete.

Theorem [Wei15]

CDCL either finds a model or generates a non-redundantclause with respect to an NP-complete criterion.

No waste of computing time.

Page 7: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 7

SummarySAT works because:

• Explicit, efficient model generation• Non-redundant clause learning• No waste of computing time

Page 8: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 8

Why does SMT work?SMT (Satisfiability Modulo Theories) [NOT06]

LIA

LIA

Page 9: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 9

Summary

SMT works because:

• Explicit, efficient model generation• Non-redundant clause learning• No waste of computing time

SAT works because:

• Abstraction• SAT works• Explicit, efficient model generation CDCL(LIA)• No waste of computing time• No notion of non-redundant clause learning CDCL(LIA)

Page 10: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 10

Bernays-Schönfinkel (BS)

SAT BSNP NEXPTIME

Reduction to SATAnswer Set Programming (ASP) [KLPS16]

[BS28,vH67]

Page 11: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 11

BS Explicit Models

SAT BSNP NEXPTIME

There cannot be an efficient modelrepresentation formalism for BS, in general.

There are several: • ME [BFT06]

• DPLL(SX) [PMB10]

• NRCL [AW15]

• SCL [FW19]

NPNP

P

P

Page 12: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 12

BS Model ComplicationsLengthy Propagations

ME, DPLL(SX), NRCL, SCL

Page 13: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 13

BS Model ComplicationsShort Resolution Proof

Page 14: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 14

BS Model ComplicationsImmediate Conflict

Theorem There is always a decision without immediate conflict.

ME, DPLL(SX), NRCL, SCL

Page 15: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 15

BS Model ComplicationsInconsistent Model Representation

ME, DPLL(SX), NRCL, SCL

Theorem There is always a way to repair the model.

Page 16: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 16

BS Model ComplicationsEquality

There is currently no “nice” solution to BSR.

Page 17: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 17

Non-Redundant Clauses

If is a BS Backtracking state with eager Conflict and Propagate, then where

. Non-Redundancy is NEXPTIME-complete.

Theorem [AW15,FW19]

This holds for NRCL, SCL but probably also for variants of DPLL(SX) and ME.

Page 18: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 18

Summary

SMT works because:

• Explicit, efficient model generation• Non-redundant clause learning• No waste of computing time

SAT works because:

• Abstraction• SAT works• Explicit, efficient model generation CDCL(LIA)• No waste of computing time• No notion of non-redundant clause learning CDCL(LIA)

BS works because:• Non-redundant clause learning• In general, no efficient model generation• No waste of computing time with SCL• Exhaustive Propagation, Equality

Page 19: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 19

BS Approximation Refinement

Instgen [KG03,K13]

Approximation to SAT solver: unsatsat

SUP(AR) [TW17]

Approximation to MSLH solver: unsatsat

Page 20: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 20

BS Ordered Resolution

Page 21: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 21

BS(T)

Page 22: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

Christoph Weidenbach SAT-SMT-AR 2019 22

Thanks for Your Attention

Page 23: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

References do not reflect history.

References

[AW15] Gabor Alagi and Christoph Weidenbach. NRCL - Amodel building approach to the bernays-schonfinkelfragment. In Carsten Lutz and Silvio Ranise, editors,Frontiers of Combining Systems - 10th Interna-tional Symposium, FroCoS 2015, Wroclaw, Poland,September 21-24, 2015. Proceedings, volume 9322 ofLecture Notes in Computer Science, pages 69–84.Springer, 2015.

[BFT06] Peter Baumgartner, Alexander Fuchs, and CesareTinelli. Lemma learning in the model evolution cal-culus. In LPAR, volume 4246 of Lecture Notes inComputer Science, pages 572–586. Springer, 2006.

Page 24: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

[BGG96] Egon Borger, Erich Gradel, and Yuri Gurevich. Theclassical decision problem. Perspectives in mathe-matical logic. Springer, 1996.

[BHvMW09] Armin Biere, Marijn Heule, Hans van Maaren, andToby Walsh, editors. Handbook of Satisfiability, vol-ume 185 of Frontiers in Artificial Intelligence andApplications. IOS Press, 2009.

[BS28] Paul Bernays and Moses Schonfinkel. Zum entschei-dungsproblem der mathematischen logik. Mathema-tische Annalen, 99:342–372, 1928.

[Coo71] S.A. Cook. The complexity of theorem proving pro-cedures. In Proceedings Third ACM Symposium onthe Theory of Computing, STOC, pages 151–158.ACM, 1971.

[FLHT01] Christian G. Fermuller, Alexander Leitsch, UllrichHustadt, and Tanel Tamet. Resolution decision pro-

Page 25: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

cedures. In Alan Robinson and Andrei Voronkov, edi-tors, Handbook of Automated Reasoning, volume II,chapter 25, pages 1791–1849. Elsevier, 2001.

[FW19] Alberto Fiori and Christoph Weidenbach. Scl clauselearning from simple models. In Pascal Fontaine,editor, 27th International Conference on Auto-mated Deduction, CADE-27, volume 11716 of LNAI.Springer, 2019.

[GK03] Harald Ganzinger and Konstantin Korovin. New di-rections in instatiation–based theorem proving. InSamson Abramsky, editor, 18th Annual IEEE Sym-posium on Logic in Computer Science, LICS’03,LICS’03, pages 55–64. IEEE Computer Society, 2003.

[BS97] Roberto J. Bayardo Jr. and Robert Schrag. UsingCSP look-back techniques to solve real-world SAT in-stances. In Benjamin Kuipers and Bonnie L. Web-

Page 26: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

ber, editors, Proceedings of the Fourteenth NationalConference on Artificial Intelligence and NinthInnovative Applications of Artificial IntelligenceConference, AAAI 97, IAAI 97, July 27-31, 1997,Providence, Rhode Island, USA., pages 203–208,1997.

[KLPS16] Benjamin Kaufmann, Nicola Leone, Simona Perri, andTorsten Schaub. Grounding and solving in answer setprogramming. AI Magazine, 37(3):25–32, 2016.

[Kor13] Konstantin Korovin. Inst-gen - A modular approachto instantiation-based automated reasoning. In AndreiVoronkov and Christoph Weidenbach, editors, Pro-gramming Logics - Essays in Memory of HaraldGanzinger, volume 7797 of Lecture Notes in Com-puter Science, pages 239–270. Springer, 2013.

[Lew79] Harry R. Lewis. Unsolvable Classes of Quantifica-

Page 27: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

tional Formulas. Addison-Wesley, 1979.

[Lew80] Harry R. Lewis. Complexity results for classes of quan-tificational formulas. Journal of Compututer andSystem Sciences, 21(3):317–353, 1980.

[NOT06] Robert Nieuwenhuis, Albert Oliveras, and CesareTinelli. Solving sat and sat modulo theories: Froman abstract davis–putnam–logemann–loveland proce-dure to dpll(t). Journal of the ACM, 53:937–977,November 2006.

[Pap81] Christos H. Papadimitriou. On the complexity of in-teger programming. Journal of the ACM, 28(4):765–768, 1981.

[PMB10] Ruzica Piskac, Leonardo Mendonca de Moura, andNikolaj Bjørner. Deciding effectively propositionallogic using DPLL and substitution sets. Journal ofAutomated Reasoning, 44(4):401–424, 2010.

Page 28: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

[Pla84] David A. Plaisted. Complete problems in the first-order predicate calculus. Journal of Computer andSystem Sciences, 29:8–35, 1984.

[Pos46] Emil L. Post. A variant of a recursively unsolvableproblem. Bulletin of the American MathematicalSociety, 52:264–268, 1946.

[SS96] Joao P. Marques Silva and Karem A. Sakallah. Grasp- a new search algorithm for satisfiability. In Interna-tional Conference on Computer Aided Design, IC-CAD, pages 220–227. IEEE Computer Society Press,1996.

[TW17] Andreas Teucke and Christoph Weidenbach. De-cidability of the monadic shallow linear first-orderfragment with straight dismatching constraints. InLeonardo de Moura, editor, Automated Deduction -CADE 26 - 26th International Conference on Au-

Page 29: Automatic Reasoning (AR) Beyond SAT and SMT › ssa-school-2019 › slides › ... · 2020-06-11 · Automatic Reasoning The science of developing systems that automatically . test

tomated Deduction, Gothenburg, Sweden, August6-11, 2017, Proceedings, volume 10395 of LectureNotes in Computer Science, pages 202–219. Springer,2017.

[vH67] van Heijenoort. From Frege to Goedel - A SourceBook in Mathematical Logic, 1979-1931. SourceBooks in the History of the Sciences. Harvard Uni-versity Press, Cambridge - Massachusetts, London -England, 1967.

[Wei15] Christoph Weidenbach. Automated reasoning buildingblocks. In Roland Meyer, Andre Platzer, and HeikeWehrheim, editors, Correct System Design - Sympo-sium in Honor of Ernst-Rudiger Olderog on the Oc-casion of His 60th Birthday, Oldenburg, Germany,September 8-9, 2015. Proceedings, volume 9360 ofLecture Notes in Computer Science, pages 172–188.Springer, 2015.