Advances in Automated Theorem Proving Leonardo de Moura, Nikolaj Bjørner Ken McMillan, Margus Veanes presented by Thomas Ball

Slides:



Advertisements
Similar presentations
Quantified Invariant Generation using an Interpolating Saturation Prover Ken McMillan Cadence Research Labs TexPoint fonts used in EMF: A A A A A.
Advertisements

Quantified Invariant Generation using an Interpolating Saturation Prover Ken McMillan Cadence Research Labs TexPoint fonts used in EMF: A A A A A.
Satisfiability Modulo Theories and Network Verification Nikolaj Bjørner Microsoft Research Formal Methods and Networks Summer School Ithaca, June
50.530: Software Engineering
Lecture 24 MAS 714 Hartmut Klauck
Satisfiability Modulo Theories (An introduction)
SMT Solvers (an extension of SAT) Kenneth Roe. Slide thanks to C. Barrett & S. A. Seshia, ICCAD 2009 Tutorial 2 Boolean Satisfiability (SAT) ⋁ ⋀ ¬ ⋁ ⋀
Equivalence of Extended Symbolic Finite Transducers Presented By: Loris D’Antoni Joint work with: Margus Veanes.
Proofs from SAT Solvers Yeting Ge ACSys NYU Nov
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Timed Automata.
Interpolants from Z3 proofs Ken McMillan Microsoft Research TexPoint fonts used in EMF: A A A A A.
NP-Completeness Lecture for CS 302. Traveling Salesperson Problem You have to visit n cities You want to make the shortest trip How could you do this?
Leonardo de Moura and Nikolaj Bjørner Microsoft Research.
SAT and Model Checking. Bounded Model Checking (BMC) A.I. Planning problems: can we reach a desired state in k steps? Verification of safety properties:
Plan for today Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search.
Nikolaj Bjørner Microsoft Research Lecture 3. DayTopicsLab 1Overview of SMT and applications. SAT solving, Z3 Encoding combinatorial problems with Z3.
Interpolants [Craig 1957] G(y,z) F(x,y)
1 Satisfiability Modulo Theories Sinan Hanay. 2 Boolean Satisfiability (SAT) Is there an assignment to the p 1, p 2, …, p n variables such that  evaluates.
1 Deciding separation formulas with SAT Ofer Strichman Sanjit A. Seshia Randal E. Bryant School of Computer Science, Carnegie Mellon University.
Presented by Ed Clarke Slides borrowed from P. Chauhan and C. Bartzis
GRASP-an efficient SAT solver Pankaj Chauhan. 6/19/ : GRASP and Chaff2 What is SAT? Given a propositional formula in CNF, find an assignment.
1 A theory-based decision heuristic for DPLL(T) Dan Goldwasser Ofer Strichman Shai Fine Haifa university TechnionIBM-HRL.
Quantifier Elimination Procedures in Z3 Support for Non-linear arithmetic Fixed-points – features and a preview.
1 A propositional world Ofer Strichman School of Computer Science, Carnegie Mellon University.
Final Exam Review Cummulative Chapters 0, 1, 2, 3, 4, 5 and 7.
1 First order theories. 2 Satisfiability The classic SAT problem: given a propositional formula , is  satisfiable ? Example:  Let x 1,x 2 be propositional.
Static Analysis of String Encoders and Decoders Presented By: Loris D’Antoni Joint work with: Margus Veanes.
CMPS 3223 Theory of Computation Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided.
Quantified Formulas - Decision Procedure Daniel Kroening, Ofer Strichman Presented by Changki Hong 07 NOV 08.
Minimization of Symbolic Automata Presented By: Loris D’Antoni Joint work with: Margus Veanes 01/24/14, POPL14.
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
Leonardo de Moura and Nikolaj Bjørner Microsoft Research.
Theory of Computation, Feodor F. Dragan, Kent State University 1 NP-Completeness P: is the set of decision problems (or languages) that are solvable in.
Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 TexPoint fonts used in EMF. Read the TexPoint manual before you.
Leonardo de Moura Microsoft Research. Is formula F satisfiable modulo theory T ? SMT solvers have specialized algorithms for T.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
CSCI 2670 Introduction to Theory of Computing December 1, 2004.
1 MVD 2010 University of Iowa New York University Comparing Proof Systems for Linear Real Arithmetic Using LFSC Andrew Reynolds September 17, 2010.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
Prof. Busch - LSU1 NFAs accept the Regular Languages.
Lazy Annotation for Program Testing and Verification Speaker: Chen-Hsuan Adonis Lin Advisor: Jie-Hong Roland Jiang November 26,
Integrating high-level constructs into programming languages Language extensions to make programming more productive Underspecified programs –give assertions,
Umans Complexity Theory Lectures Lecture 1a: Problems and Languages.
Solving Non-linear Arithmetic Dejan Jovanovic and Leonadro de Moura Presented by Boris Trayvas.
Decision methods for arithmetic Third summer school on formal methods Leonardo de Moura Microsoft Research.
Boolean Satisfiability Present and Future
Symbolic and Concolic Execution of Programs Information Security, CS 526 Omar Chowdhury 10/7/2015Information Security, CS 5261.
Nikolaj Bjørner Microsoft Research DTU Winter course January 2 nd 2012 Organized by Flemming Nielson & Hanne Riis Nielson.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
CS357 Lecture 13: Symbolic model checking without BDDs Alex Aiken David Dill 1.
Logic Engines as a Service Leonardo de Moura and Nikolaj Bjørner Microsoft Research.
Finding Conflicting Instances of Quantified Formulas in SMT Andrew Reynolds Cesare Tinelli Leonardo De Moura July 18, 2014.
Nikolaj Bjørner Microsoft Research DTU Winter course January 4 th 2012 Organized by Hanne Riis Nielson, Flemming Nielson.
2009/6/30 CAV Quantifier Elimination via Functional Composition Jie-Hong Roland Jiang Dept. of Electrical Eng. / Grad. Inst. of Electronics Eng.
Computability Examples. Reducibility. NP completeness. Homework: Find other examples of NP complete problems.
Satisfiability Modulo Theories and DPLL(T) Andrew Reynolds March 18, 2015.
Advanced Algorithms Analysis and Design
From Classical Proof Theory to P vs. NP
Lazy Proofs for DPLL(T)-Based SMT Solvers
A theory-based decision heuristic for DPLL(T)
Satisfiability Modulo Theories
Intro to Theory of Computation
Objective of This Course
Chapter Nine: Advanced Topics in Regular Languages
A Progressive Approach for Satisfiability Modulo Theories
NP-Completeness Lecture for CS 302.
Sharing Set Operations
Rich Model Toolkit – An Infrastructure for Reliable Computer Systems
Presentation transcript:

Advances in Automated Theorem Proving Leonardo de Moura, Nikolaj Bjørner Ken McMillan, Margus Veanes presented by Thomas Ball

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

Satisfiability unsat, Proof Solution/Model

Z3 is a collection of Symbolic Reasoning Engines DPLL Simplex Rewriting Superposition Congruence Closure Congruence Closure Groebner Basis Groebner Basis  elimination  elimination Euclidean Solver Euclidean Solver Automated Theorem Provier Leonardo de Moura and Nikolaj Bjørner

Learn about Z3 and get the source code! Start here – Strategies – Advanced topics – Source code –

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

Impact SAGE Z3 used by many research groups (> 700 citations) More than 17k downloads Z3 placed 1 st in 17/21 categories in 2011 SMT competition Design & PLVerification/Defect DetectionTesting

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

Craig Interpolation and Interpolating Z3 Ken McMillan (FMCAD 2011) TexPoint fonts used in EMF: AAAAA

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

Interpolants as ExplanationsA unknown,complex UNSAT! AB false!Proofunknownvariables! feasible interpolation Interpolant explains the failure in terms of known variables. most general most specific RELEVANTGENERALIZATIONB

Interpolants as Floyd-Hoare proofs x 1 = y 0 y 1 =y 0 +1 x1y1x1y1 x := y y := y+1 assume(x = y)

Interpolants as Floyd-Hoare proofs x 1 = y 0 y 1 =y 0 +1 x1y1x1y1

Interpolants as Floyd-Hoare proofs x 1 = y 0 y 1 =y 0 +1 x1y1x1y1

Interpolants as Floyd-Hoare proofs x 1 = y 0 y 1 =y 0 +1 x1y1x1y1

Interpolants as Floyd-Hoare proofs x 1 = y 0 y 1 =y 0 +1 x1y1x1y1 {False} {x=y} {True} {y>x} x := y y := y+1 assume(x = y) x := y y := y+1 assume(x = y)

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

Duality performance vs. Yogi

Symbolic Automata and Transducers Margus Veanes, Nikolaj Bjørner (POPL 2011)

Core Question

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

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: p q Symbolic transition: ‘\x80’/ “\xC2\x80” … ‘\x7FF’/ “\xDF\xBF” q p x ≤ x ≤ 7FF 16 / [C0 16 | x  10,6 , | x  5,0  ] guard bitvector operations 1920 transitions

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

Analysis  Example 1:  x (utf8encode( x )  R utf8 ) ? 1. E = SFT (utf8encode) 2. A = Complement(SFA ( R utf8 ) ) 3. B = x. A(E(x)) 4. B   ?  Example 2: x. utf8decode ( utf8encode( x ) )  Id ? Does there exist an input x that causes a bad output ?

Links Symbolic Automata Tool Kit Rex (acceptors) online Bek (transducers) online Samples: Tutorials:

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

Polynomial Constraints AKA Existential Theory of the Reals  R

Milestones RCF admits QE non elementary complexity QE by CAD Doubly exponential

Applications

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

CAD “Big Picture” 1. Saturate Search

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

Our Procedure (1) Key ideas: Use partial solution to guide the search Feasible Region What is the core?

Our Procedure (2) Key ideas: Nonchronological Backtracking

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

Complexity Trap: P  Efficient 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 “Real algebraic numbers are efficient” “CAD is polynomial for a fixed number of variables”

Experimental Results NEW ENGINE

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