An Introduction to Z3

Size: px
Start display at page:

Download "An Introduction to Z3"

Transcription

1 An Introduction to Z3 Huixing Fang National Trusted Embedded Software Engineering Technology Research Center April 12, 2017

2 Outline 1 SMT 2 Z3 Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

3 Outline 1 SMT 2 Z3 Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

4 SMT: Satisfiability Modulo Theory 1 Satisfiability is the problem of determining whether a formula ϕ has a model 1 If ϕ is propositional, a model is a truth assignemt to Boolean variables 2 If ϕ is a first-order formula, a model assigns values to variables and interpretations to the function and predicate symbols 2 SAT Solvers: check satisfiability of propositional formulas 3 SMT Solvers: check satisfiability of formulas in a decidable first-order theory (eg, linear arithmetic, array theory, bitvectors) Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

5 Outline 1 SMT 2 Z3 Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

6 Z3 Context Huixing Fang (ECNU) An Introduction Z3 Figure: Contextto View April 12, / 24

7 Z3 Architecture Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

8 Z3 Architecture 1 Simplifier : Input formulas are first processed using an incomplete, but efficient simplification p true p x = 4 q(x) x = 4 q(4) 2 Compiler: The simplified abstract syntax tree representation of the formula is converted into a different data-structure comprising of a set of clauses and congruence-closure nodes 3 Congruence Closure Core: Handles equalities and uninterpreted functions Receives the assignment from the SAT solver, and processed using E-matching Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

9 Basic Commands 1 displays a message: (echo "starting Z3") Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

10 Basic Commands 1 displays a message: (echo "starting Z3") 2 declares a constant of a given type: (declare-const a Int) Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

11 Basic Commands 1 displays a message: (echo "starting Z3") 2 declares a constant of a given type: (declare-const a Int) 3 declares a function : (declare-fun f (Int Bool) Int) Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

12 Basic Commands 1 displays a message: (echo "starting Z3") 2 declares a constant of a given type: (declare-const a Int) 3 declares a function : (declare-fun f (Int Bool) Int) 4 asserts a formula : (assert (> a 10)) Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

13 Basic Commands 1 displays a message: (echo "starting Z3") 2 declares a constant of a given type: (declare-const a Int) 3 declares a function : (declare-fun f (Int Bool) Int) 4 asserts a formula : (assert (> a 10)) 5 defines a function: (define-fun a () Int 100) Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

14 Basic Commands 1 displays a message: (echo "starting Z3") 2 declares a constant of a given type: (declare-const a Int) 3 declares a function : (declare-fun f (Int Bool) Int) 4 asserts a formula : (assert (> a 10)) 5 defines a function: (define-fun a () Int 100) 6 defines a function: (define-fun f ((x Int) (y Bool)) Int (ite (and (= x 11) (= y true)) 0 1)) Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

15 Basic Commands 1 displays a message: (echo "starting Z3") 2 declares a constant of a given type: (declare-const a Int) 3 declares a function : (declare-fun f (Int Bool) Int) 4 asserts a formula : (assert (> a 10)) 5 defines a function: (define-fun a () Int 100) 6 defines a function: (define-fun f ((x Int) (y Bool)) Int (ite (and (= x 11) (= y true)) 0 1)) 7 check: (check-sat) determines whether the current formulas on the Z3 stack are satisfiable or not Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

16 Basic Commands 1 displays a message: (echo "starting Z3") 2 declares a constant of a given type: (declare-const a Int) 3 declares a function : (declare-fun f (Int Bool) Int) 4 asserts a formula : (assert (> a 10)) 5 defines a function: (define-fun a () Int 100) 6 defines a function: (define-fun f ((x Int) (y Bool)) Int (ite (and (= x 11) (= y true)) 0 1)) 7 check: (check-sat) determines whether the current formulas on the Z3 stack are satisfiable or not 8 model: (get-model) is used to retrieve an interpretation that makes all formulas on the Z3 internal stack true Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

17 Basic Commands Basic Building Blocks 1 The basic building blocks of SMT formulas are constants and functions Constants are just functions that take no arguments So everything is really just a function 2 An uninterpreted function or function symbol is one that has no other property than its name and n-ary form Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

18 Basic Commands Basic Building Blocks 1 The basic building blocks of SMT formulas are constants and functions Constants are just functions that take no arguments So everything is really just a function 2 An uninterpreted function or function symbol is one that has no other property than its name and n-ary form Valid and Satisfiable 1 A formula F is valid if F always evaluates to true for any assignment of appropriate values to its uninterpreted function and constant symbols 2 A formula F is satisfiable if there is some assignment of appropriate values to its uninterpreted function and constant symbols under which F evaluates to true Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

19 Propositional Logic The pre-defined sort Bool is the sort (type) of all Boolean propositional expressions Z3 supports the usual Boolean operators and, or, xor, not, => (implication), ite (if-then-else) Example Formulas: ( d e c l a r e c o n s t p Bool ) ( d e c l a r e c o n s t q Bool ) ( d e c l a r e c o n s t r Bool ) ( d e f i n e fun c o n j e c t u r e ( ) Bool (=> ( and (=> p q ) (=> q r ) ) (=> p r ) ) ) ( a s s e r t ( not c o n j e c t u r e ) ) ( check s a t ) Result: unsat Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

20 Uninterpreted functions and constants The basic building blocks of SMT formulas are constants and functions Constants are just functions that take no arguments So everything is really just a function Example Formulas: ( d e c l a r e fun f ( I n t ) I n t ) ( d e c l a r e fun a ( ) I n t ) ; a i s a c o n s t a n t ( d e c l a r e c o n s t b I n t ) ; s y n t a x s u g a r f o r ( d e c l a r e fun b ( ) I n t ) ( a s s e r t (> a 20)) ( a s s e r t (> b a ) ) ( a s s e r t (= ( f 10) 1 ) ) ( check s a t ) ( get model ) Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

21 Arithmetic Z3 has builtin support for integer and real constants These two types (sorts) represent the mathematical integers and reals ( d e c l a r e c o n s t a I n t ) ( d e c l a r e c o n s t b I n t ) ( d e c l a r e c o n s t d Real ) ( d e c l a r e c o n s t e Real ) ( a s s e r t (> a (+ b 2 ) ) ) ( a s s e r t (>= d e ) ) ( check s a t ) ( get model ) s a t ( model ( d e f i n e fun e ( ) Real 0 0 ) ( d e f i n e fun d ( ) Real 0 0 ) ( d e f i n e fun a ( ) I n t 1) ( d e f i n e fun b ( ) I n t ( 2 ) ) ) Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

22 Nonlinear arithmetic 1 A formula is nonlinear if it contains expressions of the form (* t s) where t and s are not numbers 2 Nonlinear real arithmetic is very expensive, and Z3 is not complete for this kind of formula ( d e c l a r e c o n s t a I n t ) ( a s s e r t (> ( a a ) 3 ) ) ( check s a t ) ( get model ) ( d e c l a r e c o n s t b Real ) ( d e c l a r e c o n s t c Real ) ( a s s e r t (= (+ ( b b b ) ( b c ) ) 3 0 ) ) ( check s a t ) s a t ( model ( d e f i n e fun a ( ) I n t ( 8) ) ) unknown Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

23 Bitvectors Bitvector Literals Bitvector literals may be defined using binary, decimal and hexadecimal notation 1 #b010 in binary format is a bitvector of size 3 2 bitvector literal #x0a0 in hexadecimal format is a bitvector of size 12 The size must be specified for bitvector literals in decimal format (_ bv10 32) is a bitvector of size 32 that representes the numeral 10 Z3 supports Bitvectors of arbitrary size (_ BitVec n) is the sort of bitvectors whose length is n Declare 64-bit bitvector constant x as follow: ( d e c l a r e c o n s t x (_ BitVec 64)) Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

24 Basic Bitvector Arithmetic 1 bvadd : a d d i t i o n 2 bvsub : s u b t r a c t i o n 3 bvneg : unary minus 4 bvmul : m u l t i p l i c a t i o n 5 bvurem : u n s i g n e d r e m a i n d e r 6 bvsrem : s i g n e d r e m a i n d e r 7 bvsmod : s i g n e d modulo 8 b v s h l : s h i f t l e f t 9 b v l s h r : u n s i g n e d ( l o g i c a l ) s h i f t r i g h t 10 b v a s h r : s i g n e d ( a r i t h m e t i c a l ) s h i f t r i g h t 11 bvor : b i t w i s e or 12 bvand : b i t w i s e and 13 bvnot : b i t w i s e not 14 bvnand : b i t w i s e nand 15 bvnor : b i t w i s e nor 16 bvxnor : b i t w i s e xnor Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

25 Arrays 1 The expression (select a i) returns the value stored at position i of the array a; 2 and (store a i v) returns a new array identical to a, but on position i it contains the value v ( d e c l a r e c o n s t x I n t ) ( d e c l a r e c o n s t y I n t ) ( d e c l a r e c o n s t a1 ( Array I n t I n t ) ) ( a s s e r t (= ( s e l e c t a1 x ) x ) ) ( a s s e r t (= ( s t o r e a1 x y ) a1 ) ) ( check s a t ) ( get model ) s a t ( model ( d e f i n e fun y ( ) I n t 1) ( d e f i n e fun a1 ( ) ( Array I n t I n t ) (_ as a r r a y k! 0 ) ) ( d e f i n e fun x ( ) I n t 1) ( d e f i n e fun k! 0 ( ( x! 1 I n t ) ) I n t ( i t e (= x! 1 1) 1 0 ) ) ) Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

26 Records A record is specified as a datatype with a single constructor and as many arguments as record elements Example Parametric type Pair, with constructor mk-pair and two arguments that can be accessed using the selector functions first and second ( d e c l a r e d a t a t y p e s (T1 T2) ( ( P a i r (mk p a i r ( f i r s t T1) ( second T2 ) ) ) ) ) ( d e c l a r e c o n s t p1 ( P a i r I n t I n t ) ) ( d e c l a r e c o n s t p2 ( P a i r I n t I n t ) ) ( a s s e r t (= p1 p2 ) ) ( a s s e r t (> ( second p1 ) 20)) ( check s a t ) ( get model ) ( a s s e r t ( not (= ( f i r s t p1 ) ( f i r s t p2 ) ) ) ) ( check s a t ) Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

27 Model-based Quantifier Instantiation The model-based quantifier instantiation (MBQI) is essentially a counter-example based refinement loop, where candidate models are built and checked ( s e t o p t i o n : smt mbqi t r u e ) ( d e c l a r e fun f ( I n t I n t ) I n t ) ( d e c l a r e c o n s t a I n t ) ( d e c l a r e c o n s t b I n t ) ( a s s e r t ( f o r a l l ( ( x I n t ) ) (>= ( f x x ) (+ x a ) ) ) ) ( a s s e r t (< ( f a b ) a ) ) ( a s s e r t (> a 0 ) ) ( check s a t ) ( get model ) ( e v a l ( f (+ a 10) 2 0 ) ) s a t ( model ( d e f i n e fun b ( ) I n t 2) ( d e f i n e fun a ( ) I n t 1) ( d e f i n e fun f ( ( x! 1 I n t ) ( x! 2 I n t ) ) I n t ( i t e ( and (= x! 1 1) (= x! 2 2 ) ) 0 (+ 1 x! 1 ) ) ) ) Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24 12

28 Relations, rules and queries The default fixed-point engine is a bottom-up Datalog engine It works with finite relations and uses finite table representations as hash tables as the default way to represent finite relations ( d e c l a r e r e l a ( ) ) ( d e c l a r e r e l b ( ) ) ( d e c l a r e r e l c ( ) ) ( r u l e (=> b a ) ) ( r u l e (=> c b ) ) ( set o p t i o n : f i x e d p o i n t e n g i n e d a t a l o g ) ( query a ) ( r u l e c ) ( query a : p r i n t answer t r u e ) unsat s a t t r u e Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

29 Engine for Property Directed Reachability The PDR engine is targeted at applications from symbolic model checking of software The systems may be infinite state Example McCarthy s 91 function illustrates a procedure that calls itself recursively twice mc( x ) = i f x > 100 then x 10 e l s e mc(mc( x +11)) ( d e c l a r e r e l mc ( I n t I n t ) ) ( d e c l a r e v a r n I n t ) ( d e c l a r e v a r m I n t ) ( d e c l a r e v a r p I n t ) ( r u l e (=> (> m 100) (mc m ( m 1 0 ) ) ) ) ( r u l e (=> ( and (<= m 100) (mc (+ m 11) p ) (mc p n ) ) (mc m n ) ) ) Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

30 Engine for Property Directed Reachability Example McCarthy s 91 function illustrates a procedure that calls itself recursively twice mc( x ) = i f x > 100 then x 10 e l s e mc(mc( x +11)) ( d e c l a r e r e l mc ( I n t I n t ) ) ( d e c l a r e v a r n I n t ) ( d e c l a r e v a r m I n t ) ( d e c l a r e v a r p I n t ) ( r u l e (=> (> m 100) (mc m ( m 1 0 ) ) ) ) ( r u l e (=> ( and (<= m 100) (mc (+ m 11) p ) (mc p n ) ) (mc m n ) ) ) ( d e c l a r e r e l q ( I n t I n t ) ) ( r u l e (=> ( and (mc m n ) (< n 92)) ( q m n ) ) ) ( query q : p r i n t c e r t i f i c a t e t r u e ) Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

31 Engine for Property Directed Reachability Example McCarthy s 91 function illustrates a procedure that calls itself recursively twice mc( x ) = i f x > 100 then x 10 e l s e mc(mc( x +11)) s a t ( and ( not (<= 92 ( : v a r 5 ) ) ) (mc ( : v a r 4) ( : v a r 5 ) ) (= ( : v a r 5) (+ ( 10) ( : v a r 4 ) ) ) ( not (<= ( : v a r 4) 100)) ) v5 < 92 mc( v4 ) = v5 v5 = v4 10 v4 > 100 Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

32 End Thanks for your attention Huixing Fang (ECNU) An Introduction to Z3 April 12, / 24

Introduction to Z3. Bow-Yaw Wang. December 19, Institute of Information Science Academia Sinica, Taiwan

Introduction to Z3. Bow-Yaw Wang. December 19, Institute of Information Science Academia Sinica, Taiwan Introduction to Z3 Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan December 19, 2017 Bow-Yaw Wang (Academia Sinica) Introduction to Z3 December 19, 2017 1 / 26 Outline 1 Introduction

More information

SMT BASICS WS 2017/2018 ( ) LOGIC SATISFIABILITY MODULO THEORIES. Institute for Formal Models and Verification Johannes Kepler Universität Linz

SMT BASICS WS 2017/2018 ( ) LOGIC SATISFIABILITY MODULO THEORIES. Institute for Formal Models and Verification Johannes Kepler Universität Linz LOGIC SATISFIABILITY MODULO THEORIES SMT BASICS WS 2017/2018 (342.208) Armin Biere Martina Seidl biere@jku.at martina.seidl@jku.at Institute for Formal Models and Verification Johannes Kepler Universität

More information

Satisfiability Modulo Theories (SMT)

Satisfiability Modulo Theories (SMT) CS510 Software Engineering Satisfiability Modulo Theories (SMT) Slides modified from those by Aarti Gupta Textbook: The Calculus of Computation by A. Bradley and Z. Manna 1 Satisfiability Modulo Theory

More information

Combined Satisfiability Modulo Parametric Theories

Combined Satisfiability Modulo Parametric Theories Intel 07 p.1/39 Combined Satisfiability Modulo Parametric Theories Sava Krstić*, Amit Goel*, Jim Grundy*, and Cesare Tinelli** *Strategic CAD Labs, Intel **The University of Iowa Intel 07 p.2/39 This Talk

More information

CSE507. Satisfiability Modulo Theories. Computer-Aided Reasoning for Software. Emina Torlak

CSE507. Satisfiability Modulo Theories. Computer-Aided Reasoning for Software. Emina Torlak Computer-Aided Reasoning for Software CSE507 Satisfiability Modulo Theories courses.cs.washington.edu/courses/cse507/18sp/ Emina Torlak emina@cs.washington.edu Today Last lecture Practical applications

More information

Scalable and Accurate Verification of Data Flow Systems. Cesare Tinelli The University of Iowa

Scalable and Accurate Verification of Data Flow Systems. Cesare Tinelli The University of Iowa Scalable and Accurate Verification of Data Flow Systems Cesare Tinelli The University of Iowa Overview AFOSR Supported Research Collaborations NYU (project partner) Chalmers University (research collaborator)

More information

Topics in Model-Based Reasoning

Topics in Model-Based Reasoning Towards Integration of Proving and Solving Dipartimento di Informatica Università degli Studi di Verona Verona, Italy March, 2014 Automated reasoning Artificial Intelligence Automated Reasoning Computational

More information

Tutorial 1: Modern SMT Solvers and Verification

Tutorial 1: Modern SMT Solvers and Verification University of Illinois at Urbana-Champaign Tutorial 1: Modern SMT Solvers and Verification Sayan Mitra Electrical & Computer Engineering Coordinated Science Laboratory University of Illinois at Urbana

More information

SMT: Satisfiability Modulo Theories

SMT: Satisfiability Modulo Theories SMT: Satisfiability Modulo Theories Ranjit Jhala, UC San Diego April 9, 2013 Decision Procedures Last Time Propositional Logic Today 1. Combining SAT and Theory Solvers 2. Theory Solvers Theory of Equality

More information

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig First-Order Logic First-Order Theories Roopsha Samanta Partly based on slides by Aaron Bradley and Isil Dillig Roadmap Review: propositional logic Syntax and semantics of first-order logic (FOL) Semantic

More information

Constraint Solving for Finite Model Finding in SMT Solvers

Constraint Solving for Finite Model Finding in SMT Solvers myjournal manuscript No. (will be inserted by the editor) Constraint Solving for Finite Model Finding in SMT Solvers Andrew Reynolds Cesare Tinelli Clark Barrett Received: date / Accepted: date Abstract

More information

Leonardo de Moura Microsoft Research

Leonardo de Moura Microsoft Research Leonardo de Moura Microsoft Research Is formula F satisfiable modulo theory T? SMT solvers have specialized algorithms for T b + 2 = c and f(read(write(a,b,3), c-2)) f(c-b+1) b + 2 = c and f(read(write(a,b,3),

More information

Interpolation. Seminar Slides. Betim Musa. 27 th June Albert-Ludwigs-Universität Freiburg

Interpolation. Seminar Slides. Betim Musa. 27 th June Albert-Ludwigs-Universität Freiburg Interpolation Seminar Slides Albert-Ludwigs-Universität Freiburg Betim Musa 27 th June 2015 Motivation program add(int a, int b) { var x,i : int; l 0 assume(b 0); l 1 x := a; l 2 i := 0; while(i < b) {

More information

arxiv:submit/ [cs.lo] 11 May 2018

arxiv:submit/ [cs.lo] 11 May 2018 Solving Quantified Bit-Vectors using Invertibility Conditions Aina Niemetz 1, Mathias Preiner 1, Andrew Reynolds 2, Clark Barrett 1, and Cesare Tinelli 2 arxiv:submit/2258887 [cs.lo] 11 May 2018 1 Stanford

More information

Quantifiers. Leonardo de Moura Microsoft Research

Quantifiers. Leonardo de Moura Microsoft Research Quantifiers Leonardo de Moura Microsoft Research Satisfiability a > b + 2, a = 2c + 10, c + b 1000 SAT a = 0, b = 3, c = 5 Model 0 > 3 + 2, 0 = 2 5 + 10, 5 + ( 3) 1000 Quantifiers x y x > 0 f x, y = 0

More information

WHAT IS AN SMT SOLVER? Jaeheon Yi - April 17, 2008

WHAT IS AN SMT SOLVER? Jaeheon Yi - April 17, 2008 WHAT IS AN SMT SOLVER? Jaeheon Yi - April 17, 2008 WHAT I LL TALK ABOUT Propositional Logic Terminology, Satisfiability, Decision Procedure First-Order Logic Terminology, Background Theories Satisfiability

More information

Propositional Calculus

Propositional Calculus Propositional Calculus Dr. Neil T. Dantam CSCI-498/598 RPM, Colorado School of Mines Spring 2018 Dantam (Mines CSCI, RPM) Propositional Calculus Spring 2018 1 / 64 Calculus? Definition: Calculus A well

More information

CS156: The Calculus of Computation

CS156: The Calculus of Computation CS156: The Calculus of Computation Zohar Manna Winter 2010 It is reasonable to hope that the relationship between computation and mathematical logic will be as fruitful in the next century as that between

More information

Internals of SMT Solvers. Leonardo de Moura Microsoft Research

Internals of SMT Solvers. Leonardo de Moura Microsoft Research Internals of SMT Solvers Leonardo de Moura Microsoft Research Acknowledgements Dejan Jovanovic (SRI International, NYU) Grant Passmore (Univ. Edinburgh) Herbrand Award 2013 Greg Nelson What is a SMT Solver?

More information

SAT/SMT/AR Introduction and Applications

SAT/SMT/AR Introduction and Applications SAT/SMT/AR Introduction and Applications Ákos Hajdu Budapest University of Technology and Economics Department of Measurement and Information Systems 1 Ákos Hajdu About me o PhD student at BME MIT (2016

More information

Quantifier Instantiation Techniques for Finite Model Finding in SMT

Quantifier Instantiation Techniques for Finite Model Finding in SMT Quantifier Instantiation Techniques for Finite Model Finding in SMT Andrew Reynolds, Cesare Tinelli Amit Goel, Sava Krstic Morgan Deters, Clark Barrett Satisfiability Modulo Theories (SMT) SMT solvers

More information

First Order Logic (FOL)

First Order Logic (FOL) First Order Logic (FOL) Testing, Quality Assurance, and Maintenance Winter 2018 Prof. Arie Gurfinkel based on slides by Prof. Ruzica Piskac, Nikolaj Bjorner, and others References Chpater 2 of Logic for

More information

Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory

Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory Motivation CS389L: Automated Logical Reasoning Lecture 10: Overview of First-Order Theories Işıl Dillig Last few lectures: Full first-order logic In FOL, functions/predicates are uninterpreted (i.e., structure

More information

Formal Modeling with Propositional Logic

Formal Modeling with Propositional Logic Formal Modeling with Propositional Logic Assaf Kfoury February 6, 2017 (last modified: September 3, 2018) Contents 1 The Pigeon Hole Principle 2 2 Graph Problems 3 2.1 Paths in Directed Graphs..................................

More information

Satisfiability Modulo Theories

Satisfiability Modulo Theories Satisfiability Modulo Theories Summer School on Formal Methods Menlo College, 2011 Bruno Dutertre and Leonardo de Moura bruno@csl.sri.com, leonardo@microsoft.com SRI International, Microsoft Research SAT/SMT

More information

Comp487/587 - Boolean Formulas

Comp487/587 - Boolean Formulas Comp487/587 - Boolean Formulas 1 Logic and SAT 1.1 What is a Boolean Formula Logic is a way through which we can analyze and reason about simple or complicated events. In particular, we are interested

More information

CS 514, Mathematics for Computer Science Mid-semester Exam, Autumn 2017 Department of Computer Science and Engineering IIT Guwahati

CS 514, Mathematics for Computer Science Mid-semester Exam, Autumn 2017 Department of Computer Science and Engineering IIT Guwahati CS 514, Mathematics for Computer Science Mid-semester Exam, Autumn 2017 Department of Computer Science and Engineering IIT Guwahati Important 1. No questions about the paper will be entertained during

More information

Equalities and Uninterpreted Functions. Chapter 3. Decision Procedures. An Algorithmic Point of View. Revision 1.0

Equalities and Uninterpreted Functions. Chapter 3. Decision Procedures. An Algorithmic Point of View. Revision 1.0 Equalities and Uninterpreted Functions Chapter 3 Decision Procedures An Algorithmic Point of View D.Kroening O.Strichman Revision 1.0 Outline Decision Procedures Equalities and Uninterpreted Functions

More information

Leonardo de Moura Microsoft Research

Leonardo de Moura Microsoft Research Leonardo de Moura Microsoft Research Logic is The Calculus of Computer Science (Z. Manna). High computational complexity Naïve solutions will not scale Is formula F satisfiable modulo theory T? SMT solvers

More information

Deductive Verification

Deductive Verification Deductive Verification Mooly Sagiv Slides from Zvonimir Rakamaric First-Order Logic A formal notation for mathematics, with expressions involving Propositional symbols Predicates Functions and constant

More information

Constraint Logic Programming and Integrating Simplex with DPLL(T )

Constraint Logic Programming and Integrating Simplex with DPLL(T ) Constraint Logic Programming and Integrating Simplex with DPLL(T ) Ali Sinan Köksal December 3, 2010 Constraint Logic Programming Underlying concepts The CLP(X ) framework Comparison of CLP with LP Integrating

More information

Symbolic Analysis. Xiangyu Zhang

Symbolic Analysis. Xiangyu Zhang Symbolic Analysis Xiangyu Zhang What is Symbolic Analysis CS510 S o f t w a r e E n g i n e e r i n g Static analysis considers all paths are feasible Dynamic considers one path or a number of paths Symbolic

More information

Notes. Corneliu Popeea. May 3, 2013

Notes. Corneliu Popeea. May 3, 2013 Notes Corneliu Popeea May 3, 2013 1 Propositional logic Syntax We rely on a set of atomic propositions, AP, containing atoms like p, q. A propositional logic formula φ Formula is then defined by the following

More information

cse 311: foundations of computing Spring 2015 Lecture 3: Logic and Boolean algebra

cse 311: foundations of computing Spring 2015 Lecture 3: Logic and Boolean algebra cse 311: foundations of computing Spring 2015 Lecture 3: Logic and Boolean algebra gradescope Homework #1 is up (and has been since Friday). It is due Friday, October 9 th at 11:59pm. You should have received

More information

a > 3, (a = b a = b + 1), f(a) = 0, f(b) = 1

a > 3, (a = b a = b + 1), f(a) = 0, f(b) = 1 Yeting Ge New York University Leonardo de Moura Microsoft Research a > 3, (a = b a = b + 1), f(a) = 0, f(b) = 1 Dynamic symbolic execution (DART) Extended static checking Test-case generation Bounded model

More information

Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies

Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies Valentin Stockholm University September 2016 Propositions Proposition:

More information

Propositional Logic: Models and Proofs

Propositional Logic: Models and Proofs Propositional Logic: Models and Proofs C. R. Ramakrishnan CSE 505 1 Syntax 2 Model Theory 3 Proof Theory and Resolution Compiled at 11:51 on 2016/11/02 Computing with Logic Propositional Logic CSE 505

More information

Chapter 2. Boolean Algebra and Logic Gates

Chapter 2. Boolean Algebra and Logic Gates Chapter 2 Boolean Algebra and Logic Gates Basic Definitions A binary operator defined on a set S of elements is a rule that assigns, to each pair of elements from S, a unique element from S. The most common

More information

SAT-Based Verification with IC3: Foundations and Demands

SAT-Based Verification with IC3: Foundations and Demands SAT-Based Verification with IC3: Foundations and Demands Aaron R. Bradley ECEE, CU Boulder & Summit Middle School SAT-Based Verification with IC3:Foundations and Demands 1/55 Induction Foundation of verification

More information

IC3 and Beyond: Incremental, Inductive Verification

IC3 and Beyond: Incremental, Inductive Verification IC3 and Beyond: Incremental, Inductive Verification Aaron R. Bradley ECEE, CU Boulder & Summit Middle School IC3 and Beyond: Incremental, Inductive Verification 1/62 Induction Foundation of verification

More information

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 7: Procedures for First-Order Theories, Part 1

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 7: Procedures for First-Order Theories, Part 1 Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 7: Procedures for First-Order Theories, Part 1 Matt Fredrikson mfredrik@cs.cmu.edu October 17, 2016 Matt Fredrikson Theory Procedures

More information

Undecidable Problems. Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, / 65

Undecidable Problems. Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, / 65 Undecidable Problems Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, 2018 1/ 65 Algorithmically Solvable Problems Let us assume we have a problem P. If there is an algorithm solving

More information

XOR - XNOR Gates. The graphic symbol and truth table of XOR gate is shown in the figure.

XOR - XNOR Gates. The graphic symbol and truth table of XOR gate is shown in the figure. XOR - XNOR Gates Lesson Objectives: In addition to AND, OR, NOT, NAND and NOR gates, exclusive-or (XOR) and exclusive-nor (XNOR) gates are also used in the design of digital circuits. These have special

More information

CS156: The Calculus of Computation Zohar Manna Autumn 2008

CS156: The Calculus of Computation Zohar Manna Autumn 2008 Page 3 of 52 Page 4 of 52 CS156: The Calculus of Computation Zohar Manna Autumn 2008 Lecturer: Zohar Manna (manna@cs.stanford.edu) Office Hours: MW 12:30-1:00 at Gates 481 TAs: Boyu Wang (wangboyu@stanford.edu)

More information

Introduction to SAT (constraint) solving. Justyna Petke

Introduction to SAT (constraint) solving. Justyna Petke Introduction to SAT (constraint) solving Justyna Petke SAT, SMT and CSP solvers are used for solving problems involving constraints. The term constraint solver, however, usually refers to a CSP solver.

More information

Beyond First-Order Logic

Beyond First-Order Logic Beyond First-Order Logic Software Formal Verification Maria João Frade Departmento de Informática Universidade do Minho 2008/2009 Maria João Frade (DI-UM) Beyond First-Order Logic MFES 2008/09 1 / 37 FOL

More information

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19 PROPOSITIONAL LOGIC VL Logik: WS 2018/19 (Version 2018.2) Martina Seidl (martina.seidl@jku.at), Armin Biere (biere@jku.at) Institut für Formale Modelle und Verifikation BOX Game: Rules 1. The game board

More information

SMT and Z3. Nikolaj Bjørner Microsoft Research ReRISE Winter School, Linz, Austria February 5, 2014

SMT and Z3. Nikolaj Bjørner Microsoft Research ReRISE Winter School, Linz, Austria February 5, 2014 SMT and Z3 Nikolaj Bjørner Microsoft Research ReRISE Winter School, Linz, Austria February 5, 2014 Plan Mon An invitation to SMT with Z3 Tue Equalities and Theory Combination Wed Theories: Arithmetic,

More information

The Eager Approach to SMT. Eager Approach to SMT

The Eager Approach to SMT. Eager Approach to SMT The Eager Approach to SMT Sanjit A. Seshia UC Berkeley Slides based on ICCAD 09 Tutorial Eager Approach to SMT Input Formula Satisfiability-preserving Boolean Encoder Boolean Formula SAT Solver SAT Solver

More information

Solving Extended Regular Constraints Symbolically

Solving Extended Regular Constraints Symbolically Solving Extended Regular Constraints Symbolically Margus Veanes Microsoft Research, Redmond 16 Dec 2009 Küberneetika Instituudi Seminar 1 Initial Motivation Test table and test data generation for SQL

More information

Chapter 4, Logic using Propositional Calculus Handout

Chapter 4, Logic using Propositional Calculus Handout ECS 20 Chapter 4, Logic using Propositional Calculus Handout 0. Introduction to Discrete Mathematics. 0.1. Discrete = Individually separate and distinct as opposed to continuous and capable of infinitesimal

More information

First-Order Logic. Chapter Overview Syntax

First-Order Logic. Chapter Overview Syntax Chapter 10 First-Order Logic 10.1 Overview First-Order Logic is the calculus one usually has in mind when using the word logic. It is expressive enough for all of mathematics, except for those concepts

More information

Database Theory VU , SS Complexity of Query Evaluation. Reinhard Pichler

Database Theory VU , SS Complexity of Query Evaluation. Reinhard Pichler Database Theory Database Theory VU 181.140, SS 2018 5. Complexity of Query Evaluation Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 17 April, 2018 Pichler

More information

A Reduction Approach to Decision Procedures

A Reduction Approach to Decision Procedures A Reduction Approach to Decision Procedures Deepak Kapur and Calogero G. Zarba University of New Mexico Abstract. We present an approach for designing decision procedures based on the reduction of complex

More information

Integrating Answer Set Programming and Satisfiability Modulo Theories

Integrating Answer Set Programming and Satisfiability Modulo Theories Integrating Answer Set Programming and Satisfiability Modulo Theories Ilkka Niemelä Helsinki University of Technology (TKK) Department of Information and Computer Science http://www.tcs.tkk.fi/ ini/ References:

More information

Solution suggestions for examination of Logic, Algorithms and Data Structures,

Solution suggestions for examination of Logic, Algorithms and Data Structures, Department of VT12 Software Engineering and Managment DIT725 (TIG023) Göteborg University, Chalmers 24/5-12 Solution suggestions for examination of Logic, Algorithms and Data Structures, Date : April 26,

More information

CTL satisfability via tableau A C++ implementation

CTL satisfability via tableau A C++ implementation CTL satisfability via tableau A C++ implementation Nicola Prezza April 30, 2015 Outline 1 Introduction 2 Parsing 3 Data structures 4 Initial sets of labels and edges 5 Cull 6 Examples and benchmarks The

More information

EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits)

EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) September 5, 2002 John Wawrzynek Fall 2002 EECS150 Lec4-bool1 Page 1, 9/5 9am Outline Review of

More information

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007) Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007) Problem 1: Specify two different predicates P (x) and

More information

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary Number System Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary BOOLEAN ALGEBRA BOOLEAN LOGIC OPERATIONS Logical AND Logical OR Logical COMPLEMENTATION

More information

Outline. EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) Combinational Logic (CL) Defined

Outline. EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) Combinational Logic (CL) Defined EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) January 30, 2003 John Wawrzynek Outline Review of three representations for combinational logic:

More information

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms First-Order Logic 1 Syntax Domain of Discourse The domain of discourse for first order logic is FO structures or models. A FO structure contains Relations Functions Constants (functions of arity 0) FO

More information

Linear Arithmetic Satisfiability via Strategy Improvement

Linear Arithmetic Satisfiability via Strategy Improvement Linear Arithmetic Satisfiability via Strategy Improvement Azadeh Farzan 1 Zachary Kincaid 1,2 1 University of Toronto 2 Princeton University July 13, 2016 The problem: satisfiability modulo the theory

More information

Fundamentals of Digital Design

Fundamentals of Digital Design Fundamentals of Digital Design Digital Radiation Measurement and Spectroscopy NE/RHP 537 1 Binary Number System The binary numeral system, or base-2 number system, is a numeral system that represents numeric

More information

Towards Lightweight Integration of SMT Solvers

Towards Lightweight Integration of SMT Solvers Towards Lightweight Integration of SMT Solvers Andrei Lapets Boston University Boston, USA lapets@bu.edu Saber Mirzaei Boston University Boston, USA smirzaei@bu.edu 1 Introduction A large variety of SMT

More information

Exercises 1 - Solutions

Exercises 1 - Solutions Exercises 1 - Solutions SAV 2013 1 PL validity For each of the following propositional logic formulae determine whether it is valid or not. If it is valid prove it, otherwise give a counterexample. Note

More information

1 Propositional Logic

1 Propositional Logic CS 2800, Logic and Computation Propositional Logic Lectures Pete Manolios Version: 384 Spring 2011 1 Propositional Logic The study of logic was initiated by the ancient Greeks, who were concerned with

More information

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL. 2017-18 XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL HALF ADDER 1. The circuit that performs addition within the Arithmetic and Logic Unit of the CPU are called adders. 2. A unit that adds two

More information

Implementing Branch and Bound Algorithms in SMT. Andrew Reynolds Two Sigma July 12, 2016

Implementing Branch and Bound Algorithms in SMT. Andrew Reynolds Two Sigma July 12, 2016 Implementing Branch and Bound Algorithms in SMT Andrew Reynolds Two Sigma July 12, 2016 Overview Satisfiability Modulo Theories and DPLL(T) Finite Model Finding in SMT Branch and bound for finding small

More information

Generalized Property Directed Reachability

Generalized Property Directed Reachability Generalized Property Directed Reachability Kryštof Hoder (1) and Nikolaj Bjørner (2) (1) The University of Manchester (2) Microsoft Research, Redmond Abstract. The IC3 algorithm was recently introduced

More information

Rewriting for Satisfiability Modulo Theories

Rewriting for Satisfiability Modulo Theories 1 Dipartimento di Informatica Università degli Studi di Verona Verona, Italy July 10, 2010 1 Joint work with Chris Lynch (Department of Mathematics and Computer Science, Clarkson University, NY, USA) and

More information

Conjunctive Normal Form and SAT

Conjunctive Normal Form and SAT Notes on Satisfiability-Based Problem Solving Conjunctive Normal Form and SAT David Mitchell mitchell@cs.sfu.ca September 10, 2014 These notes are a preliminary draft. Please use freely, but do not re-distribute

More information

9. Quantifier-free Equality and Data Structures

9. Quantifier-free Equality and Data Structures 9. Quantifier-free Equality and Data Structures The Theory of Equality T E Σ E : {=, a, b, c,..., f, g, h,..., p, q, r,...} uninterpreted symbols: constants a, b, c,... functions f, g, h,... predicates

More information

De Morgan s a Laws. De Morgan s laws say that. (φ 1 φ 2 ) = φ 1 φ 2, (φ 1 φ 2 ) = φ 1 φ 2.

De Morgan s a Laws. De Morgan s laws say that. (φ 1 φ 2 ) = φ 1 φ 2, (φ 1 φ 2 ) = φ 1 φ 2. De Morgan s a Laws De Morgan s laws say that (φ 1 φ 2 ) = φ 1 φ 2, (φ 1 φ 2 ) = φ 1 φ 2. Here is a proof for the first law: φ 1 φ 2 (φ 1 φ 2 ) φ 1 φ 2 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0 0 a Augustus DeMorgan

More information

Combinations of Theories for Decidable Fragments of First-order Logic

Combinations of Theories for Decidable Fragments of First-order Logic Combinations of Theories for Decidable Fragments of First-order Logic Pascal Fontaine Loria, INRIA, Université de Nancy (France) Montreal August 2, 2009 Montreal, August 2, 2009 1 / 15 Context / Motivation

More information

First-Order Theorem Proving and Vampire. Laura Kovács (Chalmers University of Technology) Andrei Voronkov (The University of Manchester)

First-Order Theorem Proving and Vampire. Laura Kovács (Chalmers University of Technology) Andrei Voronkov (The University of Manchester) First-Order Theorem Proving and Vampire Laura Kovács (Chalmers University of Technology) Andrei Voronkov (The University of Manchester) Outline Introduction First-Order Logic and TPTP Inference Systems

More information

Model Based Theory Combination

Model Based Theory Combination Model Based Theory Combination SMT 2007 Leonardo de Moura and Nikolaj Bjørner {leonardo, nbjorner}@microsoft.com. Microsoft Research Model Based Theory Combination p.1/20 Combination of Theories In practice,

More information

Interpolation and Symbol Elimination in Vampire

Interpolation and Symbol Elimination in Vampire Interpolation and Symbol Elimination in Vampire Kryštof Hoder 1, Laura Kovács 2, and Andrei Voronkov 1 1 University of Manchester 2 TU Vienna Abstract. It has recently been shown that proofs in which some

More information

Satisfiability Modulo Theories

Satisfiability Modulo Theories Satisfiability Modulo Theories Clark Barrett and Cesare Tinelli Abstract Satisfiability Modulo Theories (SMT) refers to the problem of determining whether a first-order formula is satisfiable with respect

More information

Lecture 1: Logical Foundations

Lecture 1: Logical Foundations Lecture 1: Logical Foundations Zak Kincaid January 13, 2016 Logics have two components: syntax and semantics Syntax: defines the well-formed phrases of the language. given by a formal grammar. Typically

More information

COMPUTER SCIENCE TRIPOS

COMPUTER SCIENCE TRIPOS CST.2016.6.1 COMPUTER SCIENCE TRIPOS Part IB Thursday 2 June 2016 1.30 to 4.30 COMPUTER SCIENCE Paper 6 Answer five questions. Submit the answers in five separate bundles, each with its own cover sheet.

More information

A Collection of Problems in Propositional Logic

A Collection of Problems in Propositional Logic A Collection of Problems in Propositional Logic Hans Kleine Büning SS 2016 Problem 1: SAT (respectively SAT) Instance: A propositional formula α (for SAT in CNF). Question: Is α satisfiable? The problems

More information

Solving Quantified Verification Conditions using Satisfiability Modulo Theories

Solving Quantified Verification Conditions using Satisfiability Modulo Theories Solving Quantified Verification Conditions using Satisfiability Modulo Theories Yeting Ge, Clark Barrett, Cesare Tinelli Solving Quantified Verification Conditions using Satisfiability Modulo Theories

More information

Part 2: First-Order Logic

Part 2: First-Order Logic Part 2: First-Order Logic First-order logic formalizes fundamental mathematical concepts is expressive (Turing-complete) is not too expressive (e. g. not axiomatizable: natural numbers, uncountable sets)

More information

SMT and Its Application in Software Verification

SMT and Its Application in Software Verification SMT and Its Application in Software Verification Yu-Fang Chen IIS, Academia Sinica Based on the slides of Barrett, Sanjit, Kroening, Rummer, Sinha, Jhala, and Majumdar Assertion in C int main(){ int x;

More information

TDDD08 Tutorial 1. Who? From? When? 6 september Victor Lagerkvist (& Wªodek Drabent)

TDDD08 Tutorial 1. Who? From? When? 6 september Victor Lagerkvist (& Wªodek Drabent) TDDD08 Tutorial 1 Who? From? Victor Lagerkvist (& Wªodek Drabent) Theoretical Computer Science Laboratory, Linköpings Universitet, Sweden When? 6 september 2015 1 / 18 Preparations Before you start with

More information

First-Order Theorem Proving and Vampire

First-Order Theorem Proving and Vampire First-Order Theorem Proving and Vampire Laura Kovács 1,2 and Martin Suda 2 1 TU Wien 2 Chalmers Outline Introduction First-Order Logic and TPTP Inference Systems Saturation Algorithms Redundancy Elimination

More information

Solving SAT Modulo Theories

Solving SAT Modulo Theories Solving SAT Modulo Theories R. Nieuwenhuis, A. Oliveras, and C.Tinelli. Solving SAT and SAT Modulo Theories: from an Abstract Davis-Putnam-Logemann-Loveland Procedure to DPLL(T) Mooly Sagiv Motivation

More information

6.841/18.405J: Advanced Complexity Wednesday, February 12, Lecture Lecture 3

6.841/18.405J: Advanced Complexity Wednesday, February 12, Lecture Lecture 3 6.841/18.405J: Advanced Complexity Wednesday, February 12, 2003 Lecture Lecture 3 Instructor: Madhu Sudan Scribe: Bobby Kleinberg 1 The language MinDNF At the end of the last lecture, we introduced the

More information

Rigorous Software Development CSCI-GA

Rigorous Software Development CSCI-GA Rigorous Software Development CSCI-GA 3033-009 Instructor: Thomas Wies Spring 2013 Lecture 2 Alloy Analyzer Analyzes micro models of software Helps to identify key properties of a software design find

More information

Solving Quantified Linear Arithmetic by Counterexample- Guided Instantiation

Solving Quantified Linear Arithmetic by Counterexample- Guided Instantiation Noname manuscript No. (will be inserted by the editor) Solving Quantified Linear Arithmetic by Counterexample- Guided Instantiation Andrew Reynolds Tim King Viktor Kuncak Received: date / Accepted: date

More information

Complete problems for classes in PH, The Polynomial-Time Hierarchy (PH) oracle is like a subroutine, or function in

Complete problems for classes in PH, The Polynomial-Time Hierarchy (PH) oracle is like a subroutine, or function in Oracle Turing Machines Nondeterministic OTM defined in the same way (transition relation, rather than function) oracle is like a subroutine, or function in your favorite PL but each call counts as single

More information

Satisfiability Modulo Theories

Satisfiability Modulo Theories Satisfiability Modulo Theories Bruno Dutertre SRI International Leonardo de Moura Microsoft Research Satisfiability a > b + 2, a = 2c + 10, c + b 1000 SAT a = 0, b = 3, c = 5 Model 0 > 3 + 2, 0 = 2 5 +

More information

Predicate Logic. Andreas Klappenecker

Predicate Logic. Andreas Klappenecker Predicate Logic Andreas Klappenecker Predicates A function P from a set D to the set Prop of propositions is called a predicate. The set D is called the domain of P. Example Let D=Z be the set of integers.

More information

An Introduction to SAT Solving

An Introduction to SAT Solving An Introduction to SAT Solving Applied Logic for Computer Science UWO December 3, 2017 Applied Logic for Computer Science An Introduction to SAT Solving UWO December 3, 2017 1 / 46 Plan 1 The Boolean satisfiability

More information

Conjunctive Normal Form and SAT

Conjunctive Normal Form and SAT Notes on Satisfiability-Based Problem Solving Conjunctive Normal Form and SAT David Mitchell mitchell@cs.sfu.ca October 4, 2015 These notes are a preliminary draft. Please use freely, but do not re-distribute

More information

Solving Constrained Horn Clauses using Interpolation

Solving Constrained Horn Clauses using Interpolation Solving Constrained Horn Clauses using Interpolation MSR-TR-2013-6 Kenneth L. McMillan Micrsoft Research Andrey Rybalchenko Technische Universität München Abstract We present an interpolation-based method

More information

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 8: Procedures for First-Order Theories, Part 2

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 8: Procedures for First-Order Theories, Part 2 Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 8: Procedures for First-Order Theories, Part 2 Matt Fredrikson mfredrik@cs.cmu.edu October 17, 2016 Matt Fredrikson Theory Procedures

More information

CHAPTER 1. MATHEMATICAL LOGIC 1.1 Fundamentals of Mathematical Logic

CHAPTER 1. MATHEMATICAL LOGIC 1.1 Fundamentals of Mathematical Logic CHAPER 1 MAHEMAICAL LOGIC 1.1 undamentals of Mathematical Logic Logic is commonly known as the science of reasoning. Some of the reasons to study logic are the following: At the hardware level the design

More information

Propositional and Predicate Logic - V

Propositional and Predicate Logic - V Propositional and Predicate Logic - V Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - V WS 2016/2017 1 / 21 Formal proof systems Hilbert s calculus

More information