EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization

Size: px
Start display at page:

Download "EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization"

Transcription

1 EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Discrete Systems Lecture: State-Space Exploration Stavros Tripakis University of California, Berkeley Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 1 / 52

2 ANALYSIS OF DISCRETE SYSTEMS: STATE-SPACE EXPLORATION Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 2 / 52

3 State-Space Exploration Goal: explore all reachable states of the system (modeled as a transition system). Main application: exhaustive verification by reachability analysis. Check that system is never in an incorrect state (safety) deadlock state state which does not satisfy a given (state) property e.g., train is at intersection but gate is not lowered autopilot is off but pilot thinks it is on... Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 3 / 52

4 State-Space Exploration Goal: explore all reachable states of the system (modeled as a transition system). Main application: exhaustive verification by reachability analysis. Check that system is never in an incorrect state (safety) deadlock state state which does not satisfy a given (state) property e.g., train is at intersection but gate is not lowered autopilot is off but pilot thinks it is on... Also the basis for checking liveness properties: every so often system does something useful. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 3 / 52

5 State-Space Exploration For finite-state systems, it can be done fully automatically! (in principle) Forms the basis for model-checking Turing award 2007: Clarke, Emerson, Sifakis. Established practice in the industry (mainly hardware, but increasingly also software). Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 4 / 52

6 Model-Checking and State-Space Exploration Model-checking: check a model M (transition system) against a specification φ: M = φ? Often φ is a temporal logic formula: If φ is an LTL formula: M = φ means σ = φ for every trace of M. If φ is a CTL formula: M = φ means s0 = φ for every initial state s 0 of M. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 5 / 52

7 Model-Checking and State-Space Exploration Model-checking: check a model M (transition system) against a specification φ: M = φ? Often φ is a temporal logic formula: If φ is an LTL formula: M = φ means σ = φ for every trace of M. If φ is a CTL formula: M = φ means s0 = φ for every initial state s 0 of M. State-space exploration: the basis for model-checking. E.g., Can build monitor M φ and reduce the LTL model-checking question to a state-space exploration question about the composition of M and M φ (we will revisit this when we talk about composition). Can extend symbolic reachability analysis (later in this lecture) to CTL model-checking. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 5 / 52

8 State-Space Exploration Algorithms Enumerative (also called explicit state ). Symbolic Bounded model-checking using SAT/SMT solvers. Symbolic reachability. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 6 / 52

9 An Enumerative Algorithm: Depth-First Search Assume given: Kripke structure (P, S, S 0, L, R). main: 1: V := ; /* V : set of visited states */ 2: for all s S 0 do 3: DFS(s); 4: end for DFS(s): 1: check s; /* is s a deadlock? is given p L(s)?... */ 2: V := V {s}; 3: for all s such that (s, s ) R do 4: if s V then 5: DFS(s ); /* recursive call */ 6: end if 7: end for Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 7 / 52

10 An Enumerative Algorithm: Depth-First Search Let s simulate the algorithm on this graph. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 8 / 52

11 An Enumerative Algorithm: Depth-First Search Quiz: Does the algorithm terminate? Does it visit all reachable states? Does it visit any unreachable states? What is the complexity of the algorithm? Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 9 / 52

12 Enumerative Methods Many algorithms: DFS, BFS, A*,... Many approaches to combat state-space explosion: partial-order reduction, symmetry reduction, bit-state hashing,... In-depth discussion: Computer-Aided Verification course (see also bibliography). Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 10 / 52

13 SYMBOLIC METHODS Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 11 / 52

14 Symbolic Methods: Why? The plague of exhaustive verification: state explosion. A chip with 100 flip-flops: (potentially reachable) states. That is states. Even if each state costs 1 bit to store, this still makes = 2 32 = 4, 294, 967, 296 exabytes... Symbolic methods aim to improve this. A seminal paper was subtitled Symbolic model checking: states and beyond. [Burch et al., 1990] is still less than 2 67, but a great leap forward at that time. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 12 / 52

15 Symbolic Representation of State Spaces Key idea: Instead of reasoning about individual states, reason about sets of states. How do we represent a set of states? Symbolic representation: Set = predicate. Set of states = predicate on state variables. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 13 / 52

16 Symbolic Representation of Sets of States Examples: 1. Assume 3 state variables, p, q, r, of type boolean. S 1 : p q Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 14 / 52

17 Symbolic Representation of Sets of States Examples: 1. Assume 3 state variables, p, q, r, of type boolean. S 1 : p q = {pqr, pqr, pqr, pqr, pqr, pqr} Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 14 / 52

18 Symbolic Representation of Sets of States Examples: 1. Assume 3 state variables, p, q, r, of type boolean. S 1 : p q = {pqr, pqr, pqr, pqr, pqr, pqr} 2. Assume 3 state variables, x, i, b, of types real, integer, boolean. How many states are in S 2? S 2 : x > 0 (b i 0) Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 14 / 52

19 Symbolic Representation of Transition Relations Key idea: Use a predicate on two copies of the state variables: unprimed (current state) + primed (next state). If x is the vector of state variables, then the transition relation R is a predicate on x and x : R( x, x ) e.g., R(x, i, b, x, i, b ) Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 15 / 52

20 Symbolic Representation of Transition Relations Examples: 1. Assume one state variable, p, of type boolean. R 1 : (p p ) ( p p ) Which transition relation does this represent? Is it a relation or a function (deterministic)? Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 16 / 52

21 Symbolic Representation of Transition Relations Examples: 1. Assume one state variable, p, of type boolean. R 1 : (p p ) ( p p ) Which transition relation does this represent? Is it a relation or a function (deterministic)? 2. Assume one state variable, n, of type integer. R 2 : n = n + 1 n = n Which transition relation does this represent? Is it a relation or a function (deterministic)? Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 16 / 52

22 Symbolic Representation of Kripke Structures Kripke structure: (P, S, S 0, L, R) Symbolic representation: (P, Init, Trans) where P = {x 1, x 2,..., x n }: set of (boolean) state variables, also also taken to be the atomic propositions. 1 Predicate Init( x) on vector x = (x 1,..., x n ) represents the set S 0 of initial states. Predicate Trans( x, x ) represents the transition relation R. 1 this is done for simplicity, the two could be separated Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 17 / 52

23 Symbolic Representation of Kripke Structures Kripke structure: (P, S, S 0, L, R) Symbolic representation: (P, Init, Trans) where P = {x 1, x 2,..., x n }: set of (boolean) state variables, also also taken to be the atomic propositions. 1 Predicate Init( x) on vector x = (x 1,..., x n ) represents the set S 0 of initial states. Predicate Trans( x, x ) represents the transition relation R. Basis of the language of NuSMV. 1 this is done for simplicity, the two could be separated Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 17 / 52

24 Example: NuSMV model MODULE inverter(input) VAR output : boolean; INIT output = FALSE TRANS next(output) =!input next(output) = output What is the Kripke structure defined by this NuSMV program? Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 18 / 52

25 Example: NuSMV model MODULE inverter(input) VAR output : boolean; INIT output = FALSE TRANS next(output) =!input next(output) = output What is the Kripke structure defined by this NuSMV program? What about P and L? Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 18 / 52

26 Example: Kripke Structure Represent this symbolically. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 19 / 52

27 FINITE-HORIZON REACHABILITY (a.k.a. BOUNDED MODEL-CHECKING) Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 20 / 52

28 Bounded Model-Checking Question: Can a bad state be reached in up to n steps (transitions)? i.e., does there exist a path s 0, s 1,..., s k where k n, s 0 S 0 and s k Bad, for some given set Bad. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 21 / 52

29 Bounded Model-Checking Question: Can a bad state be reached in up to n steps (transitions)? i.e., does there exist a path s 0, s 1,..., s k where k n, s 0 S 0 and s k Bad, for some given set Bad. Key idea: Reduce the above question to a SAT (satisfiability) problem. SAT problem NP-complete for propositional logic, generally undecidable for predicate logic. In practice, today s SAT solvers can handle formulas with thousands of variables. SMT (SAT Modulo Theory) solvers also making good progress. BMC exploits this. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 21 / 52

30 Bounded Model-Checking (BMC) Suppose I have predicates Init( x), Trans( x, x ), and Bad( x). How to use them for BMC? Bad state reachable in 0 steps iff SAT ( ) Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 22 / 52

31 Bounded Model-Checking (BMC) Suppose I have predicates Init( x), Trans( x, x ), and Bad( x). How to use them for BMC? Bad state reachable in 0 steps iff SAT ( Init( x) Bad( x) ) Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 22 / 52

32 Bounded Model-Checking (BMC) Suppose I have predicates Init( x), Trans( x, x ), and Bad( x). How to use them for BMC? Bad state reachable in 0 steps iff SAT ( Init( x) Bad( x) ) Bad state reachable in 1 step iff SAT ( ) Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 22 / 52

33 Bounded Model-Checking (BMC) Suppose I have predicates Init( x), Trans( x, x ), and Bad( x). How to use them for BMC? Bad state reachable in 0 steps iff SAT ( Init( x) Bad( x) ) Bad state reachable in 1 step iff SAT ( Init( x 0 ) Trans( x 0, x 1 ) Bad( x 1 ) ) Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 22 / 52

34 Bounded Model-Checking (BMC) Suppose I have predicates Init( x), Trans( x, x ), and Bad( x). How to use them for BMC? Bad state reachable in 0 steps iff SAT ( Init( x) Bad( x) ) Bad state reachable in 1 step iff SAT ( Init( x 0 ) Trans( x 0, x 1 ) Bad( x 1 ) )... Bad state reachable in n steps iff SAT ( ) Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 22 / 52

35 Bounded Model-Checking (BMC) Suppose I have predicates Init( x), Trans( x, x ), and Bad( x). How to use them for BMC? Bad state reachable in 0 steps iff SAT ( Init( x) Bad( x) ) Bad state reachable in 1 step iff SAT ( Init( x 0 ) Trans( x 0, x 1 ) Bad( x 1 ) )... Bad state reachable in n steps iff SAT ( Init( x 0 ) Trans( x 0, x 1 ) Trans( x n 1, x n ) Bad( x n ) ) Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 22 / 52

36 BMC Outer Loop 1: for all k = 0, 1,..., n do 2: φ := Init( x 0) Trans( x 0, x 1) Trans( x k 1, x k ) Bad( x k ); 3: if SAT(φ) then 4: print Bad state reachable in k steps ; 5: output solution as counter-example; 6: end if 7: end for 8: print Bad state unreachable up to n steps ; Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 23 / 52

37 SAT Solving SAT: given propositional logic formula, check whether it is satisfiable, and return a solution if it is. Usually formula given in CNF: Conjunctive Normal Form. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 24 / 52

38 CNF and DNF Literal: a variable x or its negation x. Clause: a disjunction of literals. E.g.: clause 1 : x + y clause 2 : x + z + w CNF: conjunction of clauses, i.e., conjunction of disjunctions of literals (also called POS - product of sums ). E.g.: (x + y) (x + z + w) DNF: disjunction of conjunctions of literals (also called SOP - sum of products ). E.g.: (xy) + (xzw) + Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 25 / 52

39 Translations to/from CNF and DNF Every formula can be trivially transformed into DNF. How? Are there more efficient ways to transform into DNF? (Hint: how easy is it to check whether a DNF formula is SAT? how hard is SAT?) Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 26 / 52

40 Translations to/from CNF and DNF Every formula can be trivially transformed into DNF. How? Are there more efficient ways to transform into DNF? (Hint: how easy is it to check whether a DNF formula is SAT? how hard is SAT?) NNF (Negation Normal Form): all negations are pushed into literals. E.g.: (x y) (z w) Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 26 / 52

41 Translations to/from CNF and DNF Every formula can be trivially transformed into DNF. How? Are there more efficient ways to transform into DNF? (Hint: how easy is it to check whether a DNF formula is SAT? how hard is SAT?) NNF (Negation Normal Form): all negations are pushed into literals. E.g.: (x y) (z w) ( (x y)) (z w) Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 26 / 52

42 Translations to/from CNF and DNF Every formula can be trivially transformed into DNF. How? Are there more efficient ways to transform into DNF? (Hint: how easy is it to check whether a DNF formula is SAT? how hard is SAT?) NNF (Negation Normal Form): all negations are pushed into literals. E.g.: (x y) (z w) ( (x y)) (z w) ( x y) (z w) Homework: write a procedure to convert any boolean expression to NNF. Given a formula in NNF, how to transform it into CNF? Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 26 / 52

43 Translations to/from CNF and DNF 1: CNF(φ): 2: if φ is a literal then 3: return φ; 4: else if φ is φ 1 φ 2 then 5: return CNF(φ 1 ) CNF(φ 2 ); 6: else if φ is φ 1 φ 2 then 7: return DistributeOr ( CNF(φ 1 ), CNF(φ 2 ) ) ; 8: else 9: error: φ not in NNF; 10: end if 1: DistributeOr(φ 1, φ 2 ): 2: if φ 1 is φ 11 φ 12 then 3: return DistributeOr(φ 11, φ 2 ) DistributeOr(φ 12, φ 2 ); 4: else if φ 2 is φ 21 φ 22 then 5: return DistributeOr(φ 1, φ 21 ) DistributeOr(φ 1, φ 22 ); 6: else 7: return φ 1 φ 2 ; /* both must be literals at this point */ 8: end if Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 27 / 52

44 Translations to/from CNF and DNF 1: CNF(φ): 2: if φ is a literal then 3: return φ; 4: else if φ is φ 1 φ 2 then 5: return CNF(φ 1 ) CNF(φ 2 ); 6: else if φ is φ 1 φ 2 then 7: return DistributeOr ( CNF(φ 1 ), CNF(φ 2 ) ) ; 8: else 9: error: φ not in NNF; 10: end if 1: DistributeOr(φ 1, φ 2 ): 2: if φ 1 is φ 11 φ 12 then 3: return DistributeOr(φ 11, φ 2 ) DistributeOr(φ 12, φ 2 ); 4: else if φ 2 is φ 21 φ 22 then 5: return DistributeOr(φ 1, φ 21 ) DistributeOr(φ 1, φ 22 ); 6: else 7: return φ 1 φ 2 ; /* both must be literals at this point */ 8: end if How large can CNF(φ) be in the worst-case? Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 28 / 52

45 Translations to/from CNF and DNF More efficient translations to CNF exist: they preserve satisfiability of the original formula, by adding extra variables. Example: ab + cd (a + c)(a + d)(b + c)(b + d) }{{} normal translation ab + cd (z 1 + z 2 )(z 1 + a)(z 1 + b)(z 2 + c)(z 2 + d) }{{} translation adding variables z 1, z 2 Idea: z 1 represents ab and z 2 represents cd. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 29 / 52

46 SAT Solving SAT: given propositional logic formula, check whether it is satisfiable, and return a solution if it is. Usually formula given in CNF: Conjunctive Normal Form. Solvers exploit this form, e.g.: Easy to detect conflicts (unsatisfiability). Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 30 / 52

47 SAT Solving Let φ be a formula in CNF. Let x 1, x 2,..., x n be the variables appearing in φ. Brute-force algorithm: Explore the tree of all assignments to x 1, x 2,..., x n. As soon as a partial assignment results in a conflict, prune the entire subtree and backtrack. Either a complete assignment that works is found, or formula is UNSAT. Worst-case performance: O(2 n ). Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 31 / 52

48 SAT Solving: Resolution From two clauses x + A and x + B, derive new clause A + B. Example: (x + y)(x + z) (x + y)(x + z)(y + z) Why? Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 32 / 52

49 SAT Solving: Resolution From two clauses x + A and x + B, derive new clause A + B. Example: (x + y)(x + z) (x + y)(x + z)(y + z) Why? A form of learning (new clauses). Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 32 / 52

50 SAT Solving: Resolution We can assume that every variable x appears both in positive form x and in negative form x in φ, that is, φ contains at least two clauses (x + ) and (x + ). What if it s not the case? Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 33 / 52

51 SAT Solving: Resolution We can assume that every variable x appears both in positive form x and in negative form x in φ, that is, φ contains at least two clauses (x + ) and (x + ). What if it s not the case? Davis-Putnam algorithm: for every variable x in φ do for every pair of clauses A : (x + ) and B : (x + ) in φ do resolve A and B and add resolvent to φ; check UNSAT (empty clause); end for remove from φ original clauses containing x or x; remove variables that don t appear both in positive and negative form; check SAT; end for Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 33 / 52

52 SAT Solving: Davis-Putnam Algorithm Examples (a means negation, i.e., a): From Sanjit Seshia. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 34 / 52

53 SAT Solving Modern SAT solvers use much more involved (and efficient) techniques. In-depth discussion: Computer-Aided Verification course. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 35 / 52

54 Back to BMC: Soundness vs. Completeness 1: for all k = 0, 1,..., n do 2: φ := Init( x 0) Trans( x 0, x 1) Trans( x k 1, x k ) Bad( x k ); 3: if SAT(φ) then 4: print Bad state reachable in k steps ; 5: output solution as counter-example; 6: end if 7: end for 8: print Bad state unreachable up to n steps ; BMC algorithm is sound in the following sense: if algorithm reports reachable then indeed a bad state is reachable if algorithm reports unreachable then a bad state is unreachable but only up to n steps. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 36 / 52

55 Back to BMC: Soundness vs. Completeness 1: for all k = 0, 1,..., n do 2: φ := Init( x 0) Trans( x 0, x 1) Trans( x k 1, x k ) Bad( x k ); 3: if SAT(φ) then 4: print Bad state reachable in k steps ; 5: output solution as counter-example; 6: end if 7: end for 8: print Bad state unreachable up to n steps ; BMC algorithm is sound in the following sense: if algorithm reports reachable then indeed a bad state is reachable if algorithm reports unreachable then a bad state is unreachable but only up to n steps. Can we make BMC complete? Reports unreachable iff bad states are unreachable (w.r.t. any bound). Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 36 / 52

56 Back to BMC: Soundness vs. Completeness 1: for all k = 0, 1,..., n do 2: φ := Init( x 0) Trans( x 0, x 1) Trans( x k 1, x k ) Bad( x k ); 3: if SAT(φ) then 4: print Bad state reachable in k steps ; 5: output solution as counter-example; 6: end if 7: end for 8: print Bad state unreachable up to n steps ; BMC algorithm is sound in the following sense: if algorithm reports reachable then indeed a bad state is reachable if algorithm reports unreachable then a bad state is unreachable but only up to n steps. Can we make BMC complete? Reports unreachable iff bad states are unreachable (w.r.t. any bound). Is this even possible in general? Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 36 / 52

57 Back to BMC: Soundness vs. Completeness 1: for all k = 0, 1,..., n do 2: φ := Init( x 0) Trans( x 0, x 1) Trans( x k 1, x k ) Bad( x k ); 3: if SAT(φ) then 4: print Bad state reachable in k steps ; 5: output solution as counter-example; 6: end if 7: end for 8: print Bad state unreachable up to n steps ; BMC algorithm is sound in the following sense: if algorithm reports reachable then indeed a bad state is reachable if algorithm reports unreachable then a bad state is unreachable but only up to n steps. Can we make BMC complete? Reports unreachable iff bad states are unreachable (w.r.t. any bound). Is this even possible in general? For finite-state systems? Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 36 / 52

58 Complete BMC: the trivial threshold 1: for all k = 0, 1,..., n do 2: φ := Init( x 0) Trans( x 0, x 1) Trans( x k 1, x k ) Bad( x k ); 3: if SAT(φ) then 4: print Bad state reachable in k steps ; 5: output solution as counter-example; 6: end if 7: end for 8: print Bad state unreachable up to n steps ; A finite-state Kripke structure K = (P, S, S 0, L, R) is essentially a finite graph. Can we turn BMC into a complete method for finite-state structures? How? Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 37 / 52

59 Complete BMC: the trivial threshold 1: for all k = 0, 1,..., n do 2: φ := Init( x 0) Trans( x 0, x 1) Trans( x k 1, x k ) Bad( x k ); 3: if SAT(φ) then 4: print Bad state reachable in k steps ; 5: output solution as counter-example; 6: end if 7: end for 8: print Bad state unreachable up to n steps ; A finite-state Kripke structure K = (P, S, S 0, L, R) is essentially a finite graph. Can we turn BMC into a complete method for finite-state structures? How? If we know S (the number of all possible states) then we can set n := S. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 37 / 52

60 Complete BMC: the trivial threshold 1: for all k = 0, 1,..., n do 2: φ := Init( x 0) Trans( x 0, x 1) Trans( x k 1, x k ) Bad( x k ); 3: if SAT(φ) then 4: print Bad state reachable in k steps ; 5: output solution as counter-example; 6: end if 7: end for 8: print Bad state unreachable up to n steps ; A finite-state Kripke structure K = (P, S, S 0, L, R) is essentially a finite graph. Can we turn BMC into a complete method for finite-state structures? How? If we know S (the number of all possible states) then we can set n := S. With 100 boolean variables, S = 2 100, so this doesn t work. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 37 / 52

61 Complete BMC: the Completeness Threshold Reachability diameter : maximum number of steps that it takes to reach all states. d := min{i s Reach : path s 0, s 1,..., s j in K : j i s 0 S 0 s j = s} where Reach is the set of reachable states of K. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 38 / 52

62 Complete BMC: the Completeness Threshold Reachability diameter : maximum number of steps that it takes to reach all states. d := min{i s Reach : path s 0, s 1,..., s j in K : j i s 0 S 0 s j = s} where Reach is the set of reachable states of K. d is a much better threshold than S. Why? Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 38 / 52

63 Complete BMC: the Completeness Threshold Reachability diameter : maximum number of steps that it takes to reach all states. d := min{i s Reach : path s 0, s 1,..., s j in K : j i s 0 S 0 s j = s} where Reach is the set of reachable states of K. d is a much better threshold than S. Why? d Reach S. It could in practice be much smaller. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 38 / 52

64 Complete BMC: the Completeness Threshold Reachability diameter : maximum number of steps that it takes to reach all states. d := min{i s Reach : path s 0, s 1,..., s j in K : j i s 0 S 0 s j = s} where Reach is the set of reachable states of K. d is a much better threshold than S. Why? d Reach S. It could in practice be much smaller. Problem: we don t know Reach, therefore how to compute d? Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 38 / 52

65 Complete BMC: the Completeness Threshold Recurrence diameter : length of the longest loop-free path. r := max{i path s 0, s 1,..., s i in K : s 0 S 0 0 j < k i : s j s k } where Reach is the set of reachable states of K. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 39 / 52

66 Complete BMC: the Completeness Threshold Recurrence diameter : length of the longest loop-free path. r := max{i path s 0, s 1,..., s i in K : s 0 S 0 0 j < k i : s j s k } where Reach is the set of reachable states of K. Then: d r. Why? Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 39 / 52

67 Complete BMC: the Completeness Threshold Recurrence diameter : length of the longest loop-free path. r := max{i path s 0, s 1,..., s i in K : s 0 S 0 0 j < k i : s j s k } where Reach is the set of reachable states of K. Then: d r. Why? How to compute r? Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 39 / 52

68 Complete BMC: the Completeness Threshold Recurrence diameter : length of the longest loop-free path. r := max{i path s 0, s 1,..., s i in K : s 0 S 0 0 j < k i : s j s k } where Reach is the set of reachable states of K. Then: d r. Why? How to compute r? Express it in propositional logic! ( r := max{i SAT Init( x 0 ) Trans( x 0, x 1 ) Trans( x i 1, x i ) i 1 i j=0 k=j+1 x j x k )} Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 39 / 52

69 EXHAUSTIVE SYMBOLIC REACHABILITY (a.k.a. SYMBOLIC MODEL-CHECKING) Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 40 / 52

70 Symbolic Reachability Recall: Set of states = predicate φ( x) on vector of state variables x. E.g.: Init(x, y, z) : x y Bad(x 1, x 2 ) : x 1 = crit x 2 = crit Transition relation = predicate Trans( x, x ) on state variables and next-state variables. E.g.: Trans(x, y, x, y ) : x = x + 1 (y = 0 y = 1) Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 41 / 52

71 Symbolic Reachability: Predicate Transformer Then: Successors can be computed by a predicate transformer : succ ( φ( x) ) := ( x : φ( x) Trans( x, x ) ) [ x x] x : φ( x) Trans( x, x ): successors of states in φ [ x x]: renames variables so that resulting predicate is over current state variables Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 42 / 52

72 Symbolic Reachability: Predicate Transformer Then: Successors can be computed by a predicate transformer : Example: succ ( φ( x) ) := ( x : φ( x) Trans( x, x ) ) [ x x] x : φ( x) Trans( x, x ): successors of states in φ [ x x]: renames variables so that resulting predicate is over current state variables φ = 0 x 5 Trans = x x x + 1 succ(φ) = ( x : 0 x 5 x x x + 1)[x x] Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 42 / 52

73 Symbolic Reachability: Predicate Transformer Then: Successors can be computed by a predicate transformer : Example: succ ( φ( x) ) := ( x : φ( x) Trans( x, x ) ) [ x x] x : φ( x) Trans( x, x ): successors of states in φ [ x x]: renames variables so that resulting predicate is over current state variables φ = 0 x 5 Trans = x x x + 1 succ(φ) = ( x : 0 x 5 x x x + 1)[x x] = ( x : 0 x 5 0 x 5 + 1)[x x] Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 42 / 52

74 Symbolic Reachability: Predicate Transformer Then: Successors can be computed by a predicate transformer : Example: succ ( φ( x) ) := ( x : φ( x) Trans( x, x ) ) [ x x] x : φ( x) Trans( x, x ): successors of states in φ [ x x]: renames variables so that resulting predicate is over current state variables φ = 0 x 5 Trans = x x x + 1 succ(φ) = ( x : 0 x 5 x x x + 1)[x x] = ( x : 0 x 5 0 x 5 + 1)[x x] = (0 x 6)[x x] Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 42 / 52

75 Symbolic Reachability: Predicate Transformer Then: Successors can be computed by a predicate transformer : Example: succ ( φ( x) ) := ( x : φ( x) Trans( x, x ) ) [ x x] x : φ( x) Trans( x, x ): successors of states in φ [ x x]: renames variables so that resulting predicate is over current state variables φ = 0 x 5 Trans = x x x + 1 succ(φ) = ( x : 0 x 5 x x x + 1)[x x] = ( x : 0 x 5 0 x 5 + 1)[x x] = (0 x 6)[x x] = 0 x 6 Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 42 / 52

76 Symbolic Reachability: Predicate Transformer succ ( φ( x) ) := ( x : φ( x) Trans( x, x ) ) [ x x] How do we implement succ in practice? In particular, how to do quantifier elimination automatically? In the case of propositional logic, quantifier elimination becomes a simple procedure: x : φ(x) Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 43 / 52

77 Symbolic Reachability: Predicate Transformer succ ( φ( x) ) := ( x : φ( x) Trans( x, x ) ) [ x x] How do we implement succ in practice? In particular, how to do quantifier elimination automatically? In the case of propositional logic, quantifier elimination becomes a simple procedure: x : φ(x) φ(x)[x 0] φ(x)[x 1] Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 43 / 52

78 Predicate Transformer: Another Example succ(p q) = ( p, q : p q Trans)[p p, q q] Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 44 / 52

79 Predicate Transformer: Another Example succ(p q) = ( p, q : p q Trans)[p p, q q] = ( p, q : p q p q )[p p, q q] Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 44 / 52

80 Predicate Transformer: Another Example succ(p q) = ( p, q : p q Trans)[p p, q q] = ( p, q : p q p q )[p p, q q] = (p q )[p p, q q] Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 44 / 52

81 Predicate Transformer: Another Example succ(p q) = ( p, q : p q Trans)[p p, q q] = ( p, q : p q p q )[p p, q q] = (p q )[p p, q q] = p q Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 44 / 52

82 Symbolic Reachability 1: Reachable := Init; 2: terminate := false; 3: repeat 4: tmp := Reachable succ(reachable); 5: if tmp Reachable then 6: terminate := true; 7: else 8: Reachable := tmp; 9: end if 10: until terminate 11: return Reachable; Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 45 / 52

83 Symbolic Reachability 1: Reachable := Init; 2: terminate := false; 3: repeat 4: tmp := Reachable succ(reachable); 5: if tmp Reachable then 6: terminate := true; 7: else 8: Reachable := tmp; 9: end if 10: until terminate 11: return Reachable; Does the algorithm terminate? Why? Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 45 / 52

84 Symbolic Reachability 1: Reachable := Init; 2: terminate := false; 3: repeat 4: tmp := Reachable succ(reachable); 5: if tmp Reachable then 6: terminate := true; 7: else 8: Reachable := tmp; 9: end if 10: until terminate 11: return Reachable; Does the algorithm terminate? Why? Quiz: modify the algorithm to make it check reachability of a set of bad states characterized by predicate Bad. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 45 / 52

85 Symbolic Reachability: checking for Bad states 1: Reachable := Init; 2: terminate := false; 3: error := false; 4: repeat 5: tmp := Reachable succ(reachable); 6: if tmp Reachable then 7: terminate := true; 8: else 9: Reachable := tmp; 10: end if 11: if SAT(Reachable Bad) then 12: error := true; 13: end if 14: until terminate or error 15: return (Reachable,error); Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 46 / 52

86 Symbolic Model-Checking: Example Let s model-check this symbolically! We want to check that all reachable states satisfy p q. In temporal logic parlance: CTL: AG(p q) LTL: (p q) Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 47 / 52

87 Symbolic Model-Checking: Implementation For finite-state systems, boolean variables can be used to encode state. All predicates then become boolean expressions. Efficient data structures for boolean expressions: BDDs (Binary Decision Diagrams) Efficient algorithms for implementing logical operations (conjunction, disjunction, satisfiability check) on BDDs. In-depth discussion: Computer-Aided Verification course. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 48 / 52

88 Example: BDD Can you guess which boolean expression this BDD represents? Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 49 / 52

89 Example: BDD Can you guess which boolean expression this BDD represents? x 2 x 3 x 4 + x 1 (x 2 x 3 x 4 + x 2 x 3 x 4 ) + x 2 x 3 x 4 + x 1 x 2 x 4 Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 49 / 52

90 Symbolic Model-Checking Homework: Assuming that the system only has boolean variables, express deadlock as a predicate on state (or next state) variables. Note: the predicate must have no quantifiers. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 50 / 52

91 Bibliography I Baier, C. and Katoen, J.-P. (2008). Principles of Model Checking. MIT Press. Barrett, C. W., Sebastiani, R., Seshia, S. A., and Tinelli, C. (2009). Satisfiability modulo theories. In Biere, A., Heule, M., van Maaren, H., and Walsh, T., editors, Handbook of Satisfiability, volume 185, pages IOS Press. Biere, A., Cimatti, A., Clarke, E. M., Strichman, O., and Zhu, Y. (2003). Bounded model checking. Advances in Computers, 58: Burch, J., Clarke, E., Dill, D., Hwang, L., and McMillan, K. (1990). Symbolic model checking: states and beyond. In 5th LICS, pages IEEE. Clarke, E., Grumberg, O., and Peled, D. (2000). Model Checking. MIT Press. Godefroid, P. and Wolper, P. (1991). Using partial orders for the efficient verification of deadlock freedom and safety properties. In 4th CAV. Holzmann, G. (1998). An analysis of bitstate hashing. In Formal Methods in System Design, pages Chapman & Hall. Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 51 / 52

92 Bibliography II Huth, M. and Ryan, M. (2004). Logic in Computer Science: Modelling and Reasoning about Systems. Cambridge University Press. Jain, H. and Clarke, E. M. (2009). Efficient SAT solving for non-clausal formulas using DPLL, graphs, and watched cuts. In 46th Annual Design Automation Conference, DAC 09, pages ACM. Robinson, J. (1965). A machine-oriented logic based on the resolution principle. Journal of the ACM, 12(1). Tseitin, G. S. (1968). On the complexity of derivations in the propositional calculus. Studies in Mathematics and Mathematical Logic, Part II: Valmari, A. (1990). Stubborn sets for reduced state space generation. LNCS 483. Zhang, L. and Malik, S. (2002). The quest for efficient boolean satisfiability solvers. In 14th International Conference on Computer Aided Verification, CAV 02, pages Stavros Tripakis: EECS 144/244 Discrete Systems State-Space Exploration 52 / 52

State-Space Exploration. Stavros Tripakis University of California, Berkeley

State-Space Exploration. Stavros Tripakis University of California, Berkeley EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2014 State-Space Exploration Stavros Tripakis University of California, Berkeley Stavros Tripakis (UC Berkeley) EE

More information

Temporal Logic. Stavros Tripakis University of California, Berkeley. We have designed a system. We want to check that it is correct.

Temporal Logic. Stavros Tripakis University of California, Berkeley. We have designed a system. We want to check that it is correct. EE 244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2016 Temporal logic Stavros Tripakis University of California, Berkeley Stavros Tripakis (UC Berkeley) EE 244, Fall 2016

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

LOGIC PROPOSITIONAL REASONING

LOGIC PROPOSITIONAL REASONING LOGIC PROPOSITIONAL REASONING 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 Linz Version 2018.1

More information

Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011

Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber 15-414 Aug 31, 2011 Why study SAT solvers? Many problems reduce to SAT. Formal verification CAD, VLSI Optimization AI, planning, automated

More information

Lecture 2: Symbolic Model Checking With SAT

Lecture 2: Symbolic Model Checking With SAT Lecture 2: Symbolic Model Checking With SAT Edmund M. Clarke, Jr. School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 (Joint work over several years with: A. Biere, A. Cimatti, Y.

More information

A Logic Primer. Stavros Tripakis University of California, Berkeley

A Logic Primer. Stavros Tripakis University of California, Berkeley EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2015 A Logic Primer Stavros Tripakis University of California, Berkeley Stavros Tripakis (UC Berkeley) EE 144/244,

More information

From SAT To SMT: Part 1. Vijay Ganesh MIT

From SAT To SMT: Part 1. Vijay Ganesh MIT From SAT To SMT: Part 1 Vijay Ganesh MIT Software Engineering & SMT Solvers An Indispensable Tactic for Any Strategy Formal Methods Program Analysis SE Goal: Reliable/Secure Software Automatic Testing

More information

A Logic Primer. Stavros Tripakis University of California, Berkeley. Stavros Tripakis (UC Berkeley) EE 144/244, Fall 2014 A Logic Primer 1 / 35

A Logic Primer. Stavros Tripakis University of California, Berkeley. Stavros Tripakis (UC Berkeley) EE 144/244, Fall 2014 A Logic Primer 1 / 35 EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2014 A Logic Primer Stavros Tripakis University of California, Berkeley Stavros Tripakis (UC Berkeley) EE 144/244,

More information

Propositional Logic: Evaluating the Formulas

Propositional Logic: Evaluating the Formulas Institute for Formal Models and Verification Johannes Kepler University Linz VL Logik (LVA-Nr. 342208) Winter Semester 2015/2016 Propositional Logic: Evaluating the Formulas Version 2015.2 Armin Biere

More information

Formal Verification Methods 1: Propositional Logic

Formal Verification Methods 1: Propositional Logic Formal Verification Methods 1: Propositional Logic John Harrison Intel Corporation Course overview Propositional logic A resurgence of interest Logic and circuits Normal forms The Davis-Putnam procedure

More information

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 3: Practical SAT Solving

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 3: Practical SAT Solving Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 3: Practical SAT Solving Matt Fredrikson mfredrik@cs.cmu.edu October 17, 2016 Matt Fredrikson SAT Solving 1 / 36 Review: Propositional

More information

Classical Propositional Logic

Classical Propositional Logic Classical Propositional Logic Peter Baumgartner http://users.cecs.anu.edu.au/~baumgart/ Ph: 02 6218 3717 Data61/CSIRO and ANU July 2017 1 / 71 Classical Logic and Reasoning Problems A 1 : Socrates is a

More information

A brief introduction to Logic. (slides from

A brief introduction to Logic. (slides from A brief introduction to Logic (slides from http://www.decision-procedures.org/) 1 A Brief Introduction to Logic - Outline Propositional Logic :Syntax Propositional Logic :Semantics Satisfiability and validity

More information

Model Checking: An Introduction

Model Checking: An Introduction Model Checking: An Introduction Meeting 3, CSCI 5535, Spring 2013 Announcements Homework 0 ( Preliminaries ) out, due Friday Saturday This Week Dive into research motivating CSCI 5535 Next Week Begin foundations

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

CSE507. Introduction. Computer-Aided Reasoning for Software. Emina Torlak courses.cs.washington.edu/courses/cse507/17wi/

CSE507. Introduction. Computer-Aided Reasoning for Software. Emina Torlak courses.cs.washington.edu/courses/cse507/17wi/ Computer-Aided Reasoning for Software CSE507 courses.cs.washington.edu/courses/cse507/17wi/ Introduction Emina Torlak emina@cs.washington.edu Today What is this course about? Course logistics Review of

More information

Chapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013

Chapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013 Chapter 2 Reductions and NP CS 573: Algorithms, Fall 2013 August 29, 2013 2.1 Reductions Continued 2.1.1 The Satisfiability Problem SAT 2.1.1.1 Propositional Formulas Definition 2.1.1. Consider a set of

More information

Bounded Model Checking

Bounded Model Checking Vol. 58 of Advances in Computers, 2003. Academic Press (pre-print). Bounded Model Checking Armin Biere 1 Alessandro Cimatti 2 Edmund M. Clarke 3 Ofer Strichman 3 Yunshan Zhu 4 1 Institute of Computer Systems,

More information

Decision Procedures for Satisfiability and Validity in Propositional Logic

Decision Procedures for Satisfiability and Validity in Propositional Logic Decision Procedures for Satisfiability and Validity in Propositional Logic Meghdad Ghari Institute for Research in Fundamental Sciences (IPM) School of Mathematics-Isfahan Branch Logic Group http://math.ipm.ac.ir/isfahan/logic-group.htm

More information

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning COMP219: Artificial Intelligence Lecture 20: Propositional Reasoning 1 Overview Last time Logic for KR in general; Propositional Logic; Natural Deduction Today Entailment, satisfiability and validity Normal

More information

SAT in Formal Hardware Verification

SAT in Formal Hardware Verification SAT in Formal Hardware Verification Armin Biere Institute for Formal Models and Verification Johannes Kepler University Linz, Austria Invited Talk SAT 05 St. Andrews, Scotland 20. June 2005 Overview Hardware

More information

Lecture 2 Propositional Logic & SAT

Lecture 2 Propositional Logic & SAT CS 5110/6110 Rigorous System Design Spring 2017 Jan-17 Lecture 2 Propositional Logic & SAT Zvonimir Rakamarić University of Utah Announcements Homework 1 will be posted soon Propositional logic: Chapter

More information

Software Verification using Predicate Abstraction and Iterative Refinement: Part 1

Software Verification using Predicate Abstraction and Iterative Refinement: Part 1 using Predicate Abstraction and Iterative Refinement: Part 1 15-414 Bug Catching: Automated Program Verification and Testing Sagar Chaki November 28, 2011 Outline Overview of Model Checking Creating Models

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

Pythagorean Triples and SAT Solving

Pythagorean Triples and SAT Solving Pythagorean Triples and SAT Solving Moti Ben-Ari Department of Science Teaching Weizmann Institute of Science http://www.weizmann.ac.il/sci-tea/benari/ c 2017-18 by Moti Ben-Ari. This work is licensed

More information

Reduced Ordered Binary Decision Diagrams

Reduced Ordered Binary Decision Diagrams Reduced Ordered Binary Decision Diagrams Lecture #12 of Advanced Model Checking Joost-Pieter Katoen Lehrstuhl 2: Software Modeling & Verification E-mail: katoen@cs.rwth-aachen.de December 13, 2016 c JPK

More information

Abstractions and Decision Procedures for Effective Software Model Checking

Abstractions and Decision Procedures for Effective Software Model Checking Abstractions and Decision Procedures for Effective Software Model Checking Prof. Natasha Sharygina The University of Lugano, Carnegie Mellon University Microsoft Summer School, Moscow, July 2011 Lecture

More information

Part 1: Propositional Logic

Part 1: Propositional Logic Part 1: Propositional Logic Literature (also for first-order logic) Schöning: Logik für Informatiker, Spektrum Fitting: First-Order Logic and Automated Theorem Proving, Springer 1 Last time 1.1 Syntax

More information

Revising Specifications with CTL Properties using Bounded Model Checking

Revising Specifications with CTL Properties using Bounded Model Checking Revising Specifications with CTL Properties using Bounded Model Checking No Author Given No Institute Given Abstract. During the process of software development, it is very common that inconsistencies

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

Verification using Satisfiability Checking, Predicate Abstraction, and Craig Interpolation. Himanshu Jain THESIS ORAL TALK

Verification using Satisfiability Checking, Predicate Abstraction, and Craig Interpolation. Himanshu Jain THESIS ORAL TALK Verification using Satisfiability Checking, Predicate Abstraction, and Craig Interpolation Himanshu Jain THESIS ORAL TALK 1 Computer Systems are Pervasive Computer Systems = Software + Hardware Software/Hardware

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

Sanjit A. Seshia EECS, UC Berkeley

Sanjit A. Seshia EECS, UC Berkeley EECS 219C: Computer-Aided Verification Explicit-State Model Checking: Additional Material Sanjit A. Seshia EECS, UC Berkeley Acknowledgments: G. Holzmann Checking if M satisfies : Steps 1. Compute Buchi

More information

Finite-State Model Checking

Finite-State Model Checking EECS 219C: Computer-Aided Verification Intro. to Model Checking: Models and Properties Sanjit A. Seshia EECS, UC Berkeley Finite-State Model Checking G(p X q) Temporal logic q p FSM Model Checker Yes,

More information

An instance of SAT is defined as (X, S)

An instance of SAT is defined as (X, S) SAT: Propositional Satisfiability 22c:45 Artificial Intelligence Russell & Norvig, Ch. 7.6 Validity vs. Satisfiability Validity: A sentence is valid if it is true in every interpretation (every interpretation

More information

Model checking the basic modalities of CTL with Description Logic

Model checking the basic modalities of CTL with Description Logic Model checking the basic modalities of CTL with Description Logic Shoham Ben-David Richard Trefler Grant Weddell David R. Cheriton School of Computer Science University of Waterloo Abstract. Model checking

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

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

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

EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving III & Binary Decision Diagrams. Sanjit A. Seshia EECS, UC Berkeley

EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving III & Binary Decision Diagrams. Sanjit A. Seshia EECS, UC Berkeley EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving III & Binary Decision Diagrams Sanjit A. Seshia EECS, UC Berkeley Acknowledgments: Lintao Zhang Announcement Project proposals due

More information

Propositional Logic: Methods of Proof (Part II)

Propositional Logic: Methods of Proof (Part II) Propositional Logic: Methods of Proof (Part II) You will be expected to know Basic definitions Inference, derive, sound, complete Conjunctive Normal Form (CNF) Convert a Boolean formula to CNF Do a short

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

Chapter 4: Computation tree logic

Chapter 4: Computation tree logic INFOF412 Formal verification of computer systems Chapter 4: Computation tree logic Mickael Randour Formal Methods and Verification group Computer Science Department, ULB March 2017 1 CTL: a specification

More information

CS357: CTL Model Checking (two lectures worth) David Dill

CS357: CTL Model Checking (two lectures worth) David Dill CS357: CTL Model Checking (two lectures worth) David Dill 1 CTL CTL = Computation Tree Logic It is a propositional temporal logic temporal logic extended to properties of events over time. CTL is a branching

More information

Algorithmic verification

Algorithmic verification Algorithmic verification Ahmed Rezine IDA, Linköpings Universitet Hösttermin 2018 Outline Overview Model checking Symbolic execution Outline Overview Model checking Symbolic execution Program verification

More information

Lecture Notes on SAT Solvers & DPLL

Lecture Notes on SAT Solvers & DPLL 15-414: Bug Catching: Automated Program Verification Lecture Notes on SAT Solvers & DPLL Matt Fredrikson André Platzer Carnegie Mellon University Lecture 10 1 Introduction In this lecture we will switch

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

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

Introduction to Artificial Intelligence Propositional Logic & SAT Solving. UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010

Introduction to Artificial Intelligence Propositional Logic & SAT Solving. UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010 Introduction to Artificial Intelligence Propositional Logic & SAT Solving UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010 Today Representation in Propositional Logic Semantics & Deduction

More information

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30)

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30) Computational Logic Davide Martinenghi Free University of Bozen-Bolzano Spring 2010 Computational Logic Davide Martinenghi (1/30) Propositional Logic - sequent calculus To overcome the problems of natural

More information

Bounded Model Checking with SAT/SMT. Edmund M. Clarke School of Computer Science Carnegie Mellon University 1/39

Bounded Model Checking with SAT/SMT. Edmund M. Clarke School of Computer Science Carnegie Mellon University 1/39 Bounded Model Checking with SAT/SMT Edmund M. Clarke School of Computer Science Carnegie Mellon University 1/39 Recap: Symbolic Model Checking with BDDs Method used by most industrial strength model checkers:

More information

Automata, Logic and Games: Theory and Application

Automata, Logic and Games: Theory and Application Automata, Logic and Games: Theory and Application 1. Büchi Automata and S1S Luke Ong University of Oxford TACL Summer School University of Salerno, 14-19 June 2015 Luke Ong Büchi Automata & S1S 14-19 June

More information

Lecture Notes on Emptiness Checking, LTL Büchi Automata

Lecture Notes on Emptiness Checking, LTL Büchi Automata 15-414: Bug Catching: Automated Program Verification Lecture Notes on Emptiness Checking, LTL Büchi Automata Matt Fredrikson André Platzer Carnegie Mellon University Lecture 18 1 Introduction We ve seen

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

Reducing CTL-live Model Checking to Semantic Entailment in First-Order Logic (Version 1)

Reducing CTL-live Model Checking to Semantic Entailment in First-Order Logic (Version 1) 1 Reducing CTL-live Model Checking to Semantic Entailment in First-Order Logic (Version 1) Amirhossein Vakili and Nancy A. Day Cheriton School of Computer Science University of Waterloo Waterloo, Ontario,

More information

The Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna

The Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna The Calculus of Computation: Decision Procedures with Applications to Verification Part I: FOUNDATIONS by Aaron Bradley Zohar Manna 1. Propositional Logic(PL) Springer 2007 1-1 1-2 Propositional Logic(PL)

More information

Reasoning with Quantified Boolean Formulas

Reasoning with Quantified Boolean Formulas Reasoning with Quantified Boolean Formulas Martina Seidl Institute for Formal Models and Verification Johannes Kepler University Linz 1 What are QBF? Quantified Boolean formulas (QBF) are formulas of propositional

More information

Boolean decision diagrams and SAT-based representations

Boolean decision diagrams and SAT-based representations Boolean decision diagrams and SAT-based representations 4th July 200 So far we have seen Kripke Structures 2 Temporal logics (and their semantics over Kripke structures) 3 Model checking of these structures

More information

UCLID: Deciding Combinations of Theories via Eager Translation to SAT. SAT-based Decision Procedures

UCLID: Deciding Combinations of Theories via Eager Translation to SAT. SAT-based Decision Procedures UCLID: Deciding Combinations of Theories via Eager Translation to SAT Sanjit A. Seshia SAT-based Decision Procedures Input Formula Input Formula Satisfiability-preserving Boolean Encoder Boolean Formula

More information

Part 1: Propositional Logic

Part 1: Propositional Logic Part 1: Propositional Logic Literature (also for first-order logic) Schöning: Logik für Informatiker, Spektrum Fitting: First-Order Logic and Automated Theorem Proving, Springer 1 Last time 1.1 Syntax

More information

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Discrete Systems Lecture: Automata, State machines, Circuits Stavros Tripakis University of California, Berkeley Stavros

More information

Propositional Logic. Methods & Tools for Software Engineering (MTSE) Fall Prof. Arie Gurfinkel

Propositional Logic. Methods & Tools for Software Engineering (MTSE) Fall Prof. Arie Gurfinkel Propositional Logic Methods & Tools for Software Engineering (MTSE) Fall 2017 Prof. Arie Gurfinkel References Chpater 1 of Logic for Computer Scientists http://www.springerlink.com/content/978-0-8176-4762-9/

More information

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system): Logic Knowledge-based agents Inference engine Knowledge base Domain-independent algorithms Domain-specific content Knowledge base (KB) = set of sentences in a formal language Declarative approach to building

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

Completeness and Complexity of Bounded Model Checking

Completeness and Complexity of Bounded Model Checking Completeness and Complexity of Bounded Model Checking Edmund Clarke 1, Daniel Kroening 1,Joël Ouaknine 1, and Ofer Strichman 2 1 Computer Science Department, Carnegie Mellon University, Pittsburgh, PA,

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

Undergraduate work. Symbolic Model Checking Using Additive Decomposition by. Himanshu Jain. Joint work with Supratik Chakraborty

Undergraduate work. Symbolic Model Checking Using Additive Decomposition by. Himanshu Jain. Joint work with Supratik Chakraborty Undergraduate work Symbolic Model Checking Using Additive Decomposition by Himanshu Jain Joint work with Supratik Chakraborty Organization of the Talk Basics Motivation Related work Decomposition scheme

More information

Propositional and First Order Reasoning

Propositional and First Order Reasoning Propositional and First Order Reasoning Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p p Clause: disjunction of literals q \/ p \/ r given by

More information

Abstract DPLL and Abstract DPLL Modulo Theories

Abstract DPLL and Abstract DPLL Modulo Theories Abstract DPLL and Abstract DPLL Modulo Theories Robert Nieuwenhuis, Albert Oliveras, and Cesare Tinelli Abstract. We introduce Abstract DPLL, a general and simple abstract rule-based formulation of the

More information

Double Header. Model Checking. Model Checking. Overarching Plan. Take-Home Message. Spoiler Space. Topic: (Generic) Model Checking

Double Header. Model Checking. Model Checking. Overarching Plan. Take-Home Message. Spoiler Space. Topic: (Generic) Model Checking Double Header Model Checking #1 Two Lectures Model Checking SoftwareModel Checking SLAM and BLAST Flying Boxes It is traditional to describe this stuff (especially SLAM and BLAST) with high-gloss animation

More information

Warm-Up Problem. Is the following true or false? 1/35

Warm-Up Problem. Is the following true or false? 1/35 Warm-Up Problem Is the following true or false? 1/35 Propositional Logic: Resolution Carmen Bruni Lecture 6 Based on work by J Buss, A Gao, L Kari, A Lubiw, B Bonakdarpour, D Maftuleac, C Roberts, R Trefler,

More information

SAT Solvers: Theory and Practice

SAT Solvers: Theory and Practice Summer School on Verification Technology, Systems & Applications, September 17, 2008 p. 1/98 SAT Solvers: Theory and Practice Clark Barrett barrett@cs.nyu.edu New York University Summer School on Verification

More information

SAT, NP, NP-Completeness

SAT, NP, NP-Completeness CS 473: Algorithms, Spring 2018 SAT, NP, NP-Completeness Lecture 22 April 13, 2018 Most slides are courtesy Prof. Chekuri Ruta (UIUC) CS473 1 Spring 2018 1 / 57 Part I Reductions Continued Ruta (UIUC)

More information

SAT-based Model Checking: Interpolation, IC3, and Beyond

SAT-based Model Checking: Interpolation, IC3, and Beyond SAT-based Model Checking: Interpolation, IC3, and Beyond Orna GRUMBERG a, Sharon SHOHAM b and Yakir VIZEL a a Computer Science Department, Technion, Haifa, Israel b School of Computer Science, Academic

More information

Chapter 7 Propositional Satisfiability Techniques

Chapter 7 Propositional Satisfiability Techniques Lecture slides for Automated Planning: Theory and Practice Chapter 7 Propositional Satisfiability Techniques Dana S. Nau CMSC 722, AI Planning University of Maryland, Spring 2008 1 Motivation Propositional

More information

SBMC : Symmetric Bounded Model Checking

SBMC : Symmetric Bounded Model Checking SBMC : Symmetric Bounded Model Checing Brahim NASRAOUI LIP2 and Faculty of Sciences of Tunis Campus Universitaire 2092 - El Manar Tunis Tunisia brahim.nasraoui@gmail.com Syrine AYADI LIP2 and Faculty of

More information

Formal Verification Techniques. Riccardo Sisto, Politecnico di Torino

Formal Verification Techniques. Riccardo Sisto, Politecnico di Torino Formal Verification Techniques Riccardo Sisto, Politecnico di Torino State exploration State Exploration and Theorem Proving Exhaustive exploration => result is certain (correctness or noncorrectness proof)

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

Propositional Resolution

Propositional Resolution Artificial Intelligence Propositional Resolution Marco Piastra Propositional Resolution 1] Deductive systems and automation Is problem decidible? A deductive system a la Hilbert (i.e. derivation using

More information

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 2: Propositional Logic

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 2: Propositional Logic Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 2: Propositional Logic Matt Fredrikson mfredrik@cs.cmu.edu October 17, 2016 Matt Fredrikson Propositional Logic 1 / 33 Propositional

More information

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask Set 6: Knowledge Representation: The Propositional Calculus Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask Outline Representing knowledge using logic Agent that reason logically A knowledge based agent Representing

More information

Homework 2: Temporal logic

Homework 2: Temporal logic ICS-E5010 Computer-Aided Verification and Synthesis, Spring 2016 Stavros Tripakis Homework 2: Temporal logic Assigned: January 20, 2016 Due: February 1, 2016 Total: 235 points. 1. (20 points) Two formulae

More information

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem.

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem. 1 More on NP In this set of lecture notes, we examine the class NP in more detail. We give a characterization of NP which justifies the guess and verify paradigm, and study the complexity of solving search

More information

First-order resolution for CTL

First-order resolution for CTL First-order resolution for Lan Zhang, Ullrich Hustadt and Clare Dixon Department of Computer Science, University of Liverpool Liverpool, L69 3BX, UK {Lan.Zhang, U.Hustadt, CLDixon}@liverpool.ac.uk Abstract

More information

Essential facts about NP-completeness:

Essential facts about NP-completeness: CMPSCI611: NP Completeness Lecture 17 Essential facts about NP-completeness: Any NP-complete problem can be solved by a simple, but exponentially slow algorithm. We don t have polynomial-time solutions

More information

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler Complexity Theory Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 15 May, 2018 Reinhard

More information

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181. Complexity Theory Complexity Theory Outline Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität

More information

Symbolic Trajectory Evaluation (STE): Orna Grumberg Technion, Israel

Symbolic Trajectory Evaluation (STE): Orna Grumberg Technion, Israel Symbolic Trajectory Evaluation (STE): Automatic Refinement and Vacuity Detection Orna Grumberg Technion, Israel Marktoberdort 2007 1 Agenda Model checking Symbolic Trajectory Evaluation Basic Concepts

More information

Model Checking. Boris Feigin March 9, University College London

Model Checking. Boris Feigin March 9, University College London b.feigin@cs.ucl.ac.uk University College London March 9, 2005 Outline 1 2 Techniques Symbolic 3 Software 4 Vs. Deductive Verification Summary Further Reading In a nutshell... Model checking is a collection

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

Logical Inference. Artificial Intelligence. Topic 12. Reading: Russell and Norvig, Chapter 7, Section 5

Logical Inference. Artificial Intelligence. Topic 12. Reading: Russell and Norvig, Chapter 7, Section 5 rtificial Intelligence Topic 12 Logical Inference Reading: Russell and Norvig, Chapter 7, Section 5 c Cara MacNish. Includes material c S. Russell & P. Norvig 1995,2003 with permission. CITS4211 Logical

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

Bounded Model Checking 1

Bounded Model Checking 1 Bounded Model Checking 1 ARMIN BIERE Institute of Computer Systems ETH Zurich, 8092 Zurich Switzerland biere@inf.ethz.ch ALESSANDRO CIMATTI Istituto per la Ricerca Scientifica e Technologica (IRST) via

More information

CTL Model checking. 1. finite number of processes, each having a finite number of finite-valued variables. Model-Checking

CTL Model checking. 1. finite number of processes, each having a finite number of finite-valued variables. Model-Checking CTL Model checking Assumptions:. finite number of processes, each having a finite number of finite-valued variables.. finite length of CTL formula Problem:Determine whether formula f 0 is true in a finite

More information

1 Algebraic Methods. 1.1 Gröbner Bases Applied to SAT

1 Algebraic Methods. 1.1 Gröbner Bases Applied to SAT 1 Algebraic Methods In an algebraic system Boolean constraints are expressed as a system of algebraic equations or inequalities which has a solution if and only if the constraints are satisfiable. Equations

More information

Reduced Ordered Binary Decision Diagrams

Reduced Ordered Binary Decision Diagrams Reduced Ordered Binary Decision Diagrams Lecture #13 of Advanced Model Checking Joost-Pieter Katoen Lehrstuhl 2: Software Modeling & Verification E-mail: katoen@cs.rwth-aachen.de June 5, 2012 c JPK Switching

More information

SAT, CSP, and proofs. Ofer Strichman Technion, Haifa. Tutorial HVC 13

SAT, CSP, and proofs. Ofer Strichman Technion, Haifa. Tutorial HVC 13 SAT, CSP, and proofs Ofer Strichman Technion, Haifa Tutorial HVC 13 1 The grand plan for today Intro: the role of SAT, CSP and proofs in verification SAT how it works, and how it produces proofs CSP -

More information

Propositional and Predicate Logic. jean/gbooks/logic.html

Propositional and Predicate Logic.   jean/gbooks/logic.html CMSC 630 February 10, 2009 1 Propositional and Predicate Logic Sources J. Gallier. Logic for Computer Science, John Wiley and Sons, Hoboken NJ, 1986. 2003 revised edition available on line at http://www.cis.upenn.edu/

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