1 / 40

Advances in Automated Theorem Proving

Advances in Automated Theorem Proving. Leonardo de Moura, Nikolaj Bjørner Ken McMillan, Margus Veanes p resented by Thomas Ball http://research.microsoft.com/rise/ http://rise4fun.com/z3py/. Symbolic Reasoning. Undecidable (FOL + LIA).

stevie
Download Presentation

Advances in Automated Theorem Proving

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Advances in Automated Theorem Proving Leonardo de Moura, Nikolaj Bjørner Ken McMillan, Margus Veanes presented by Thomas Ball http://research.microsoft.com/rise/ http://rise4fun.com/z3py/

  2. Symbolic Reasoning Undecidable (FOL + LIA) Logic is “The Calculus of Computer Science” Zohar Manna Practical problems often have structure that can be exploited. Semi Decidable (FOL) NEXPTIME (EPR) PSPACE (QBF) NP (SAT)

  3. Satisfiability Solution/Model sat, unsat, Proof

  4. Automated Theorem Provier http://research.microsoft.com/projects/z3/ Leonardo de Moura and Nikolaj Bjørner Simplex Rewriting DPLL Superposition Z3 is a collection of Symbolic Reasoning Engines Congruence Closure Euclidean Solver Groebner Basis  elimination

  5. Learn about Z3 andget the source code! • Start here • http://rise4fun.com/Z3Py/tutorial/guide • Strategies • http://rise4fun.com/Z3Py/tutorial/strategies • Advanced topics • http://rise4fun.com/Z3Py/tutorial/advanced • Source code • http://z3.codeplex.com/

  6. Some Applications • Functional verification • Defect detection • Test generation • Design-space exploration • New programming languages

  7. Impact Z3 used by many research groups (> 700 citations) More than 17k downloads Z3 placed 1st in 17/21 categories in 2011 SMT competition Design & PL Verification/Defect Detection Testing SAGE

  8. Recent Progress 1. Interpolants 2. Fixed Points New Applications Beyond Satisfiability Arithmetic, Bit-Vectors, Booleans, Arrays, Datatypes, Quantifiers New Mathematics 3. Sequences/Strings 4. Nonlinear arithmetic

  9. Craig Interpolationand Interpolating Z3 Ken McMillan (FMCAD 2011) TexPoint fonts used in EMF: AAAAA

  10. Introduction Imagine two companies that want to do business... How do we explain the problem to Bob? Alice's Business Machines Bob's Good Hosting Constraints Constraints UNSAT (secret) involve

  11. B unknown, complex A most general Proof A B false! most specific Interpolants as Explanations UNSAT! unknown variables! Interpolant explains the failure in terms of known variables. RELEVANT GENERALIZATION feasible interpolation

  12. x1= y0 x := y y:= y+1 y1=y0+1 x1=y1 assume(x = y) Interpolants as Floyd-Hoare proofs

  13. x1= y0 y1=y0+1 x1=y1 Interpolants as Floyd-Hoare proofs

  14. x1= y0 y1=y0+1 x1=y1 Interpolants as Floyd-Hoare proofs

  15. x1= y0 y1=y0+1 x1=y1 Interpolants as Floyd-Hoare proofs

  16. {True} x1= y0 x := y x := y {x=y} y:= y+1 y:= y+1 y1=y0+1 {y>x} x1=y1 assume(x = y) assume(x = y) {False} Interpolants as Floyd-Hoare proofs

  17. Duality: Summaries from Interpolants property main P procedure instances ... ... Interpolant is a speculated procedure summary for P Duality constructs inductive summaries from these speculated summaries ... ... F F F F

  18. Duality performance vs. Yogi

  19. Symbolic Automataand Transducers Margus Veanes, Nikolaj Bjørner (POPL 2011)

  20. Core Question Can classical automata theory and algorithms be extended to work modulo large (infinite) alphabets  ?

  21. Symbolic Automata: Relativized Formal Language Theory string transformation SymbolicWord Transducers  Classical Word Transducers modulo Th() Classical Word Transducers (e.g. decoding automata, rational transductions) Classical I/O Automata (e.g. Mealy machine) Symbolic Word Acceptors ClassicalWord Acceptors (NFA, DFA)  Classical Word Acceptors modulo Th() regex matching

  22. Symbolic Finite Transducer (SFT) • Classical transducer modulo a rich label theory • Core Idea: represent labels with guarded transformers • Separation of concerns: finite graph / theory of labels Concrete transitions: Symbolic transition: guard 1920transitions p p  x. 8016≤ x ≤ 7FF16/ [C016|x10,6, 8016|x5,0] … ‘\x7FF’/ “\xDF\xBF” ‘\x80’/“\xC2\x80” bitvector operations q q

  23. Algorithms • New algorithms for SFAs and SFTs • Extensions of classical algorithms modulo Th() • Big-O complexity matches that of classical algorithms, with factor for decision procedure Using Z3

  24. Analysis • Example 1: x(utf8encode(x) Rutf8) ? • E = SFT(utf8encode) • A = Complement(SFA(Rutf8)) • B =  x. A(E(x)) • B  ? • Example 2:  x.utf8decode(utf8encode(x))  Id ? Does there exist an input x that causes a bad output ?

  25. Links • Symbolic Automata Tool Kithttp://research.microsoft.com/automata/ • Rex (acceptors) onlinehttp://rise4fun.com/rex/ • Bek (transducers) onlineSamples: http://rise4fun.com/Bek/Tutorials: http://rise4fun.com/Bek/tutorial

  26. Solving Nonlinear Arithmetic Dejan Jovanović (NYU) and Leonardo de Moura (IJCAR 2012)

  27. Polynomial Constraints AKA Existential Theory of the Reals R

  28. Milestones RCF admits QE non elementary complexity 820 1247 1637 1732 1830 1835 1876 1930 1975 QE by CAD Doubly exponential

  29. Applications

  30. How hard is R? NP-hardness x is “Boolean” x (x-1) = 0 x or y or z  x + y + z > 0 PSPACE PSPACE membership Canny – 1988, Grigor’ev– 1988 R NP

  31. CAD “Big Picture” 1. Saturate 2. Search

  32. Our Procedure • Start search before saturate/project • Saturate on demand • Apply SAT solver heuristics • Learn lemmas from conflicts • Non-chronological backtracking

  33. Our Procedure (1) Key ideas: Use partial solution to guide the search Feasible Region Starting search Partial solution: What is the core? Can we extend it to ?

  34. Our Procedure (2) Key ideas: Nonchronological Backtracking Conflict = 1 The values chosen for and are irrelevant.

  35. Our Procedure (3) Key ideas: Lemma Learning Prevent a Conflict from happening again. Current assignment Conflict Current assignments does not satisfy new constraint. Lemma implies False

  36. Complexity Trap: P  Efficient “Real algebraic numbers are efficient” “CAD is polynomial for a fixed number of variables” Every detail matters GCD of two polynomials Our procedure “dies” in polynomial time steps Real algebraic number computations Computing PSCs Root isolation of polynomials with irrational coefficients

  37. Experimental Results NEW ENGINE

  38. Conclusions 1. Interpolants 2. Fixed Points New Applications “Logic is the Calculus of Computer Science” Automating mathematical logic Logic engines as a service Beyond Satisfiability Arithmetic, Bit-Vectors, Booleans, Arrays, Datatypes, Quantifiers New Mathematics 3. Sequences/Strings 4. Nonlinear arithmetic

More Related