CMU, Oct 4 DPLL-based Checkers for Satisfiability Modulo Theories Cesare Tinelli Department of Computer Science The University of Iowa Joint work with.

Slides:



Advertisements
Similar presentations
SMELS: Sat Modulo Equality with Lazy Superposition Christopher Lynch – Clarkson Duc-Khanh Tran - MPI.
Advertisements

Automated Theorem Proving
Satisfiability modulo the Theory of Bit Vectors
The Model Evolution Calculus with Built-in Theories Peter Baumgartner MPI Informatik, Saarbrücken
Satisfiability Modulo Theories (An introduction)
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Propositional and First Order Reasoning. Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p 
Effective Propositional Reasoning CSE 473 – Autumn 2003.
Panel on Decision Procedures Panel on Decision Procedures Randal E. Bryant Lintao Zhang Nils Klarlund Harald Ruess Sergey Berezin Rajeev Joshi.
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:
Weizmann Institute Deciding equality formulas by small domain instantiations O. Shtrichman The Weizmann Institute Joint work with A.Pnueli, Y.Rodeh, M.Siegel.
Willis Lemasters Grant Conklin. Searching a tree recursively one branch at a time, abandoning any branch which does not satisfy the search constraints.
The Model Evolution Calculus Peter Baumgartner, MPI Saarbruecken and U Koblenz Cesare Tinelli, U Iowa.
Interpolants [Craig 1957] G(y,z) F(x,y)
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.
SAT-Based Decision Procedures for Subsets of First-Order Logic
1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University.
GRASP SAT solver Presented by Constantinos Bartzis Slides borrowed from Pankaj Chauhan J. Marques-Silva and K. Sakallah.
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
1 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Satisfiability (Reading R&N: Chapter 7)
1 Abstraction Refinement for Bounded Model Checking Anubhav Gupta, CMU Ofer Strichman, Technion Highly Jet Lagged.
ECI 2007: Specification and Verification of Object- Oriented Programs Lecture 4.
Knowledge Representation II (Inference in Propositional Logic) CSE 473 Continued…
1 A Combination Method for Generating Interpolants by G. Yorsh and M. Masuvathi Presentation by: Emilia Katz.
ENGG3190 Logic Synthesis “Boolean Satisfiability” Winter 2014 S. Areibi School of Engineering University of Guelph.
GRASP: A Search Algorithm for Propositional Satisfiability EE878C Homework #2 2002/11/1 KAIST, EECS ICS Lab Lee, Dongsoo.
SAT Solving Presented by Avi Yadgar. The SAT Problem Given a Boolean formula, look for assignment A for such that.  A is a solution for. A partial assignment.
Logic - Part 2 CSE 573. © Daniel S. Weld 2 Reading Already assigned R&N ch 5, 7, 8, 11 thru 11.2 For next time R&N 9.1, 9.2, 11.4 [optional 11.5]
On Solving Presburger and Linear Arithmetic with SAT Ofer Strichman Carnegie Mellon University.
Ofer Strichman, Technion Deciding Combined Theories.
SAT Solver Math Foundations of Computer Science. 2 Boolean Expressions  A Boolean expression is a Boolean function  Any Boolean function can be written.
Deciding a Combination of Theories - Decision Procedure - Changki pswlab Combination of Theories Daniel Kroening, Ofer Strichman Presented by Changki.
Boolean Satisfiability and SAT Solvers
1 A Combination Method for Generating Interpolants Greta Yorsh Madan Musuvathi Tel Aviv University, Israel Microsoft Research, Redmond, US CAV’05.
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 3 Logic Representations (Part 2)
Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 TexPoint fonts used in EMF. Read the TexPoint manual before you.
Introduction to Satisfiability Modulo Theories
1 MVD 2010 University of Iowa New York University Comparing Proof Systems for Linear Real Arithmetic Using LFSC Andrew Reynolds September 17, 2010.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module Logic Representations.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
Boolean Satisfiability Present and Future
SAT 2009 Ashish Sabharwal Backdoors in the Context of Learning (short paper) Bistra Dilkina, Carla P. Gomes, Ashish Sabharwal Cornell University SAT-09.
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.
Planning as Satisfiability (SAT-Plan). SAT-Plan Translate the planning problem into a satisfiability problem for length n of Plan garb 0 (proposition)present.
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding Combined Theories.
Satisfiability and SAT Solvers CS 270 Math Foundations of CS Jeremy Johnson.
SAT Solving As implemented in - DPLL solvers: GRASP, Chaff and
Inference in Propositional Logic (and Intro to SAT) CSE 473.
1 Boolean Satisfiability (SAT) Class Presentation By Girish Paladugu.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
Selected Decision Procedures and Techniques for SMT More on combination – theories sharing sets – convex theory Un-interpreted function symbols (quantifier-free.
1 A framework for eager encoding Daniel Kroening ETH, Switzerland Ofer Strichman Technion, Israel (Executive summary) (submitted to: Formal Aspects of.
A Decision-Making Procedure for Resolution-Based SAT-solvers Eugene Goldberg Cadence Research Labs (USA) SAT-2008, Guangzhou, P.R. China.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
Computer Systems Laboratory Stanford University Clark W. Barrett David L. Dill Aaron Stump A Framework for Cooperating Decision Procedures.
Satisfiability Modulo Theories and DPLL(T) Andrew Reynolds March 18, 2015.
Inference in Propositional Logic (and Intro to SAT)
EA C461 – Artificial Intelligence Logical Agent
Lazy Proofs for DPLL(T)-Based SMT Solvers
Introduction to Software Verification
Simple Circuit-Based SAT Solver
ECE 667 Synthesis and Verification of Digital Circuits
DLL Algorithm.
A Progressive Approach for Satisfiability Modulo Theories
GRASP-an efficient SAT solver
Presentation transcript:

CMU, Oct 4 DPLL-based Checkers for Satisfiability Modulo Theories Cesare Tinelli Department of Computer Science The University of Iowa Joint work with Jed Hagen (Iowa) Robert Nieuwenhuis, Albert Oliveras (TUC)

CMU, Oct 4 Talk Plan Propositional satisfiability and the DPLL procedure A calculus for DPLL Satisfiability modulo theories The DPLL( T 1,…T n ) calculus Implementing the DPLL( T 1,…T n ) calculus Some experimental results

CMU, Oct 4 Background Propositional satisfiability (SAT) is one of the most fundamental problems in AI and CS. SAT is decidable, but it is NP-complete. An effective method for SAT was pioneered by Davis, Putman, Logemann, and Loveland (DPLL). The best modern SAT solvers (Chaff, Berkmin, Siege, …) are based on DPLL.

CMU, Oct 4 The DPLL Procedure as a Calculus Context (partial assignment)

CMU, Oct 4 The DPLL Calculus

CMU, Oct 4 The DPLL Calculus (cont.) Lits(  ) = { all atoms in  and their negation }

CMU, Oct 4 Correctness of DPLL  = { propositional clauses } Prop. Every derivation tree of  |-  is finite. Prop.  is satisfiable iff  |-  has a derivation tree with a successful branch.

CMU, Oct 4 Talk Plan Propositional satisfiability and the DPLL procedure A calculus for DPLL Satisfiability modulo theories The DPLL( T 1,…T n ) calculus Implementing the DPLL( T 1,…T n ) calculus Some experimental results

CMU, Oct 4 DPLL-based methods can also decide the satisfiability of quantifier-free, first-order formulas Often, however, one is interested in the satisfiability of a quantifier-free formula in a given FO theory T –Example: Is R(a,b)  R(b,c)   R(a,c) satisfiable? What if R stands for a transitive relation? Applications: planning, scheduling, verification, compiler optimization, … Satisfiability Modulo Theories

CMU, Oct 4 Current approaches: Eager translation into SAT –Encode problem and theory into an equisatisfiable propositional formula –Feed formula to a SAT-solver Lazy “translation” into SAT –Couple a SAT solver with a decision procedure for the theory Checking Satisfiability Modulo Theories

CMU, Oct 4 Fact: Many theories of interest have (efficient) decision procedures for sets of literals. Problem: in practice, dealing with Boolean combinations of literals is as hard as in the propositional case. Solution: use propositional satisfiability technology for the Boolean part. Idea of Lazy Approach

CMU, Oct 4 Previous Lazy Approaches [Ar00,Aud02,Ba02,deM02,…]

CMU, Oct 4 Our Approach [Tin02, ON03] Embed decision procedures into the SAT solver. More abstractly: Embed decision procedures into the DPLL Calculus.

CMU, Oct 4 The DPLL( T ) Calculus iff every model of T that satisfies  also satisfies l Checked by decision procedure for T

CMU, Oct 4 The DPLL( T ) Calculus

CMU, Oct 4 The DPLL( T ) Calculus All the DPLL rules plus:

CMU, Oct 4 Correctness of DPLL( T )  = {quantifier-free clauses in T’s signature} Prop. Every derivation tree of  |-  is finite. Prop.  is T -satisfiable iff  |-  has a derivation tree with a successful branch.

CMU, Oct 4 Satisfiability Modulo Multiple Theories Let T 1,…, T n be distinct theories with resp. decision procedures P 1,…, P n How can we reason over all of them with DPLL( T )? Quick Solution: –Combine P 1,…, P n with the Nelson-Oppen method into a decision procedure for T 1  …  T n –Use DPLL( T ) with T = T 1  …  T n

CMU, Oct 4 Satisfiability Modulo Multiple Theories Let T 1,…, T n be distinct theories with resp. decision procedures P 1,…, P n How can we reason over all of them with DPLL( T )? Better Solution: –Embed the Nelson-Oppen method directly into the calculus –Turn DPLL( T ) into DPLL( T 1,…, T n )

CMU, Oct 4 The DPLL( T 1,…,T n ) Calculus: Preliminaries Let n=2, for simplicity Let T i be a theory of signature  i for i=1,2, with  1   2 =  Assume wlog that each input literal has signature  1 or  2 (no mixed literals)

CMU, Oct 4 The DPLL( T 1,…,T n ) Calculus: Notation Lits( , i) = {  i - atoms in  and their negation}  i = {  i - literals of  }  s = { x = y | x, y  vars(  1 )  vars(  2 ) }

CMU, Oct 4 The DPLL( T 1,…,T n ) Calculus All the DPLL rules but with newDPLL Only change

CMU, Oct 4 The DPLL( T 1,…,T n ) Calculus (cont.) New theory rules ( i=1,2 ):

CMU, Oct 4 Correctness of DPLL( T 1,…,T n )  = { quantifier-free clauses in (T 1 ...  T n )’s signature } Prop. If T 1, …, T n are stably-infinite and pairwise signature-disjoint then  is (T 1 ...  T n ) -satisfiable iff  |-  has a derivation tree with a successful branch. A theory T is stably infinite iff every T -satisfiable qff is satisfiable in an infinite model of T A theory T is stably infinite iff every T -satisfiable qff is satisfiable in an infinite model of T

CMU, Oct 4 Talk Plan Propositional satisfiability and the DPLL procedure A calculus for DPLL Satisfiability modulo theories The DPLL( T 1,…T n ) calculus Implementing the DPLL( T 1,…T n ) calculus Some experimental results

CMU, Oct 4 Making DPLL Efficient Literal selection strategies Intelligent backtracking (backjumping) Learning (lemma generation)

CMU, Oct 4 Making DPLL( T 1,…,T n ) Efficient T -based literal selection strategies T -based intelligent backtracking T -based learning

CMU, Oct 4 Implementing DPLL( T 1,…,T n ) In theory, it suffices to have decision procedures P i s.t. P i ({l 1, …, l n }) = true iff { l 1, …, l n } is T i -unsatisfiable In practice, it is better if to have a solver for each T i with additional functionalities

CMU, Oct 4 T i -solver Interface type status = Valid | Unsat | Undef type lit = sign * pred Class Solver { attr context : lit list meth status : pred  status meth explanation : pred  lit set meth assert : lit  lit set meth backtrack : int  unit }

CMU, Oct 4 T i -solver Specification type status = Valid | Unsat | Undef type lit = sign * pred Class Solver { attr context : lit list … meth status (p : pred) : status ensures result = Valid context |= T p & result = Unsat context |= T ~p … }

CMU, Oct 4 T i -solver Specification type status = Valid | Unsat | Undef type lit = sign * pred Class Solver { attr context : lit list … meth explanation (p : pred) : lit set requires status(p) != Undef ensures result  context & status(p) = Valid => result |= T p & status(p) = Unsat => result |= T ~p … }

CMU, Oct 4 T i -solver Specification type status = Valid | Unsat | Undef type lit = sign * pred Class Solver { attr context : lit list … meth assert ((sign,p) : lit) : lit set requires status(p) = Undef ensures context’ = (sign,p)::context & (sign,p)  result & forall (lit  result) context’ |= T lit & not(context |= T lit) … }

CMU, Oct 4 T i -solver Specification type status = Valid | Unsat | Undef type lit = sign * pred Class Solver { attr context : lit list … meth backtrack (n : int) : unit requires 1 <= n & n <= length(context) ensures context = lit 1 :: … ::lit n ::context’ … }

CMU, Oct 4 Talk Plan Propositional satisfiability and the DPLL procedure A calculus for DPLL Satisfiability modulo theories The DPLL( T 1,…T n ) calculus Implementing the DPLL( T 1,…T n ) calculus Some experimental results

CMU, Oct 4 Experimental Results T = theory of successor and predecessor + free symbols p(s(x)) = x s(p(x)) = x p(x) = p(y) => x = y s(x) = s(y) => x = y 0  p n (x)(for each n > 0) 0  s n (x) (for each n > 0) p n (x)  p m (x) (for each m,n with m > n > 0) s n (x)  s m (x) (for each m,n with m > n > 0) Popular in hardware verification

CMU, Oct 4 Experimental Results T -solver based on a novel congruence closure algorithm [ON03] DPLL( T ) engine with: – Chaff-style literal selection function – 2-watched literal unit propagation – conflict set-based backjumping – 1st-UIP lemma generation C implementation

CMU, Oct 4 Experimental Results Benchmarks produced with UCLID tool [BLJ02] Comparisons with –SVC –4 SAT-translation methods by Bryant et al. Machine: Pentium IV, 2.63 GHz, 512MB RAM Times in seconds, with timeout at 6000s

CMU, Oct 4 See external table

CMU, Oct 4 Conclusions DPLL( T 1,…,T n ) is a sound and complete calculus for satisfiability modulo T 1  …  T n. General framework for integrating decision procedures into the DPLL method. Decision procedures drive the derivation instead of just validating solutions. Major optimization techniques from SAT can be lifted to DPLL( T 1,…,T n ). Initial experimental results are very promising

CMU, Oct 4 Further Work (in Progress) New version of the DPLL( T ) calculus, to model more accurately modern SAT engines Non-clausal version of DPLL( T ) Implementation with more theories A DPLL( T )-based system for solving integer linear programming (optimization) problems