Satisifiability and Probabilistic Satisifiability

Size: px
Start display at page:

Download "Satisifiability and Probabilistic Satisifiability"

Transcription

1 Satisifiability and Probabilistic Satisifiability Department of Computer Science Instituto de Matemática e Estatística Universidade de São Paulo 2010

2 Topics

3 Next Issue

4 The SAT Problem The Centrality of SAT Satisfiability is a central problem in Computer Science Both theoretical and practical interests

5 The SAT Problem The Centrality of SAT Satisfiability is a central problem in Computer Science Both theoretical and practical interests SAT was the 1st NP-complete problem

6 The SAT Problem The Centrality of SAT Satisfiability is a central problem in Computer Science Both theoretical and practical interests SAT was the 1st NP-complete problem SAT received a lot of attention [1960-now]

7 The SAT Problem The Centrality of SAT Satisfiability is a central problem in Computer Science Both theoretical and practical interests SAT was the 1st NP-complete problem SAT received a lot of attention [1960-now] SAT has very efficient implementations

8 The SAT Problem The Centrality of SAT Satisfiability is a central problem in Computer Science Both theoretical and practical interests SAT was the 1st NP-complete problem SAT received a lot of attention [1960-now] SAT has very efficient implementations SAT has become the assembly language of hard-problems

9 The SAT Problem The Centrality of SAT Satisfiability is a central problem in Computer Science Both theoretical and practical interests SAT was the 1st NP-complete problem SAT received a lot of attention [1960-now] SAT has very efficient implementations SAT has become the assembly language of hard-problems SAT is logic

10 The PSAT Problem Probabilistic satisfiability (PSAT) was proposed by [Boole 1854] On the Laws of Thought Classical probability No assumption of a priori statistical independence Rediscovered several times since Boole PSAT is also NP-complete

11 The PSAT Problem Probabilistic satisfiability (PSAT) was proposed by [Boole 1854] On the Laws of Thought Classical probability No assumption of a priori statistical independence Rediscovered several times since Boole PSAT is also NP-complete But PSAT seems to be more complex than SAT Why?

12 Applications of SAT SAT has good implementations SAT has many applications

13 Applications of SAT SAT has good implementations SAT has many applications Planning: SatPlan Answer Set Programming Integer Programming Map colouring, combinatorial problems Optimisation problems etc NP-complete problems reduced to SAT

14 Potential Applications of PSAT SAT has many potential applications

15 Potential Applications of PSAT SAT has many potential applications Computer models of biological processes Machine learning Fault tolerance. Software design and analysis. Economics, econometrics, etc. But there are no practical algorithms for PSAT

16 Next Issue

17 The Setting: the language Atoms: P = {p 1,...,p n } Literals: p i and p j p = p, p = p A clause is a set of literals. Ex: {p, q,r} or p q r A formula C is a set of clauses

18 The Setting: semantics Valuation for atoms v : P {0,1}

19 The Setting: semantics Valuation for atoms v : P {0,1} An atom p is satisfied if v(p) = 1

20 The Setting: semantics Valuation for atoms v : P {0,1} An atom p is satisfied if v(p) = 1 Valuations are extended to all formulas

21 The Setting: semantics Valuation for atoms v : P {0,1} An atom p is satisfied if v(p) = 1 Valuations are extended to all formulas v( λ) = 1 v(λ) = 0

22 The Setting: semantics Valuation for atoms v : P {0,1} An atom p is satisfied if v(p) = 1 Valuations are extended to all formulas v( λ) = 1 v(λ) = 0 A clause c is satisfied (v(c) = 1) if some literal λ c is satisfied

23 The Setting: semantics Valuation for atoms v : P {0,1} An atom p is satisfied if v(p) = 1 Valuations are extended to all formulas v( λ) = 1 v(λ) = 0 A clause c is satisfied (v(c) = 1) if some literal λ c is satisfied A formula C is satisfied (v(c) = 1) if all clauses in C are satisfied

24 The Problem A formula C is satisfiable if exits v, v(c) = 1. Otherwise, C is unsatisfiable

25 The Problem A formula C is satisfiable if exits v, v(c) = 1. Otherwise, C is unsatisfiable The SAT Problem Given a formula C, decide if C is satisfiable. Witnesses: If C is satisfiable, provide a v such that v(c) = 1.

26 The Problem A formula C is satisfiable if exits v, v(c) = 1. Otherwise, C is unsatisfiable The SAT Problem Given a formula C, decide if C is satisfiable. Witnesses: If C is satisfiable, provide a v such that v(c) = 1. SAT has small witnesses

27 An NP Algorithm for SAT NP-SAT(C) Input: C, a formula in clausal form Output: v, if v(c) = 1; no, otherwise. 1: Guess a v 2: Show, in polynomial time, that v(c) = 1 3: return v 4: if no such v is guessable then 5: return no 6: end if

28 A Naïve SAT Solver NaiveSAT(C) Input: C, a formula in clausal form Output: v, if v(c) = 1; no, otherwise. 1: for every valuation v over p 1,...,p n do 2: if v(c) = 1 then 3: return v 4: end if 5: end for 6: return no

29 History Next Issue

30 History A Brief History of SAT Solvers [Davis & Putnam, 1960; Davis, Longemann & Loveland, 1962] The DPLL Algorithm, a complete SAT Solver

31 History A Brief History of SAT Solvers [Davis & Putnam, 1960; Davis, Longemann & Loveland, 1962] The DPLL Algorithm, a complete SAT Solver [Tseitin, 1966] DPLL has exponential lower bound

32 History A Brief History of SAT Solvers [Davis & Putnam, 1960; Davis, Longemann & Loveland, 1962] The DPLL Algorithm, a complete SAT Solver [Tseitin, 1966] DPLL has exponential lower bound [Cook 1971] SAT is NP-complete

33 History Incomplete SAT methods Incomplete methods compute valuation if C is SAT; if C is unsat, no answer. [Selman, Levesque & Mitchell, 1992] GSAT, a local search algorithm for SAT

34 History Incomplete SAT methods Incomplete methods compute valuation if C is SAT; if C is unsat, no answer. [Selman, Levesque & Mitchell, 1992] GSAT, a local search algorithm for SAT [Mitchell, Levesque & Selman, 1992] Hard and easy SAT problems

35 History Incomplete SAT methods Incomplete methods compute valuation if C is SAT; if C is unsat, no answer. [Selman, Levesque & Mitchell, 1992] GSAT, a local search algorithm for SAT [Mitchell, Levesque & Selman, 1992] Hard and easy SAT problems [Kautz & Selman, 1992] SAT planning

36 History Incomplete SAT methods Incomplete methods compute valuation if C is SAT; if C is unsat, no answer. [Selman, Levesque & Mitchell, 1992] GSAT, a local search algorithm for SAT [Mitchell, Levesque & Selman, 1992] Hard and easy SAT problems [Kautz & Selman, 1992] SAT planning [Kautz & Selman, 1993] WalkSAT Algorithm

37 History Incomplete SAT methods Incomplete methods compute valuation if C is SAT; if C is unsat, no answer. [Selman, Levesque & Mitchell, 1992] GSAT, a local search algorithm for SAT [Mitchell, Levesque & Selman, 1992] Hard and easy SAT problems [Kautz & Selman, 1992] SAT planning [Kautz & Selman, 1993] WalkSAT Algorithm [Gent & Walsh, 1994] SAT phase transition

38 History Incomplete SAT methods Incomplete methods compute valuation if C is SAT; if C is unsat, no answer. [Selman, Levesque & Mitchell, 1992] GSAT, a local search algorithm for SAT [Mitchell, Levesque & Selman, 1992] Hard and easy SAT problems [Kautz & Selman, 1992] SAT planning [Kautz & Selman, 1993] WalkSAT Algorithm [Gent & Walsh, 1994] SAT phase transition [Shang & Wah, 1998] Discrete Lagrangian Method (DLM)

39 History DPLL: Second Generation Second Generation of DPLL SAT Solvers: Posit [1995], SATO [1997], GRASP [1999]. Heuristics but no learning.

40 History DPLL: Second Generation Second Generation of DPLL SAT Solvers: Posit [1995], SATO [1997], GRASP [1999]. Heuristics but no learning. SAT competitions since 2002:

41 History DPLL: Second Generation Second Generation of DPLL SAT Solvers: Posit [1995], SATO [1997], GRASP [1999]. Heuristics but no learning. SAT competitions since 2002: Aggregation of several techniques to SAT, such as learning, unlearning, backjumping, watched literal, special heuristics.

42 History DPLL: Second Generation Second Generation of DPLL SAT Solvers: Posit [1995], SATO [1997], GRASP [1999]. Heuristics but no learning. SAT competitions since 2002: Aggregation of several techniques to SAT, such as learning, unlearning, backjumping, watched literal, special heuristics. Very competitive SAT solvers: Chaff [2001], BerkMin [2002],zChaff [2004].

43 History DPLL: Second Generation Second Generation of DPLL SAT Solvers: Posit [1995], SATO [1997], GRASP [1999]. Heuristics but no learning. SAT competitions since 2002: Aggregation of several techniques to SAT, such as learning, unlearning, backjumping, watched literal, special heuristics. Very competitive SAT solvers: Chaff [2001], BerkMin [2002],zChaff [2004]. Applications to planning, microprocessor test and verification, software design and verification, AI search, games, etc.

44 History DPLL: Second Generation Second Generation of DPLL SAT Solvers: Posit [1995], SATO [1997], GRASP [1999]. Heuristics but no learning. SAT competitions since 2002: Aggregation of several techniques to SAT, such as learning, unlearning, backjumping, watched literal, special heuristics. Very competitive SAT solvers: Chaff [2001], BerkMin [2002],zChaff [2004]. Applications to planning, microprocessor test and verification, software design and verification, AI search, games, etc. Some non-dpll SAT solvers incorporate all those techniques: [Dixon 2004]

45 Next Issue

46 The SAT Phase Transition

47 The Phase Transition Diagram 3-SAT, N is fixed Higher N, more abrupt transition M/N: low (SAT); high (UNSAT) Phase transition point: M/N 4.3, 50%SAT [Toby & Walsh 1994] Invariant with N Invariant with algorithm!

48 The Phase Transition Diagram 3-SAT, N is fixed Higher N, more abrupt transition M/N: low (SAT); high (UNSAT) Phase transition point: M/N 4.3, 50%SAT [Toby & Walsh 1994] Invariant with N Invariant with algorithm! No theoretical explanation There is another phase-transition for SAT based on Impurity [Lozinskii 2006]

49 Next Issue

50 DPLL Through Examples p q p q p t s p t s p s p s a

51 Initial Simplifications Delete all clauses that contain λ, if λ does not occur. p q p q p t s p t s p s p s a ////////////////

52 Construction of a Partial Valuation Choose a literal: s. V = {s} Propagate choice: Delete clauses containing s. Delete s from other clauses. p q p q p t s ////////////// p t s //////////////// p s /////

53 Unit Propagation Enlarge the partial valuation with unit clauses. V = {s, p} Propagate unit clauses as before. ////q p //// q p p //// Another propagation step leads to V = {s, p,q, q}

54 Backtracking Unit propagation may lead to contradictory valuation: V = {s, p,q, q} Backtrack to the previous choice, and propagate: V = { s} p q p q p t s /// p t s /// p s ///////////

55 New Choice When propagation finishes, a new choice is made: p. V = { s,p}. This leads to an inconsistent valuation: V = { s,p,t, t} Backtrack to last choice: V = { s, p} ////q p //// q p p t ///////// p t /////////// Propagation leads to another contradiction: V = { s, p, q, q}

56 The Formula is UnSAT There is nowhere to backtrack to now! The formula is unsatisfiable, with a proof sketched below. s p ( p s) q (p q) q (p q) s p t ( p t s) t ( p t s) p q (p q) q (p q)

57 Resolution Next Issue

58 Resolution The Resolution Inference For Clauses Usual Resolution C λ λ D C D Clauses as Sets Γ {λ} { λ} Γ Note that, as clauses are sets Γ {µ,λ} { λ,µ} Γ {µ}

59 Resolution DPLL Proofs and Resolution s p ( p s) q (p q) q (p q) s p t ( p t s) t ( p t s) p q (p q) q (p q)

60 Resolution DPLL Proofs and Resolution s p ( p s) p p q p q s p t ( p t s) t ( p t s) p q (p q) q (p q)

61 Resolution DPLL Proofs and Resolution s p p q p q p s s p t ( p t s) t ( p t s) p q (p q) q (p q)

62 Resolution DPLL Proofs and Resolution s p p q p q p s s p s p t s p t s p q (p q) q (p q)

63 Resolution DPLL Proofs and Resolution s p p q p q p s s p s p t s p t s p p q p q

64 Resolution DPLL Proofs and Resolution s p p q p q p s s p s p t s p t s p p q p q

65 Resolution Conclusion DPLL is isomorphic to (a restricted form of) resolution

66 Resolution Conclusion DPLL is isomorphic to (a restricted form of) resolution DPLL inherits all properties of this (restricted form of resolution

67 Resolution Conclusion DPLL is isomorphic to (a restricted form of) resolution DPLL inherits all properties of this (restricted form of resolution In particular, DPLL inherits the exponential lower bounds

68 Resolution Enhancing DPLL For the reasons discussed, DPLL needs to be improved to achieve better efficiency. Several techniques have been applied: Learning Unlearning Backjumping Watched literals Heuristics for choosing literals

69 Resolution Enhancing DPLL For the reasons discussed, DPLL needs to be improved to achieve better efficiency. Several techniques have been applied: Learning Unlearning Backjumping Watched literals Heuristics for choosing literals

70 Next Issue

71 WatchLit Next Issue

72 WatchLit Watched Literals

73 WatchLit The Cost of Unit Propagation Empirical measures show that 80% of time DPLL is doing Unit Propagation Propagation is the main target for optimization Chaff introduced the technique of Watched Literals Unit Propagation speed up No need to delete literals or clauses No need to watch all literals in a clause Constant time backtracking (very fast)

74 WatchLit DPLL and 3-valued Logic DPLL underlying logic is 3-valued Given a partial valuation V = {λ 1,...,λ k } Let λ be any literal. 1(true) if λ V V(λ) = 0(false) if λ V (undefined) otherwise

75 WatchLit The Watched Literal Data Structure Every clause c has two selected literals: λ c1,λ c2 For each c, λ c1,λ c2 are dynamically chosen and varies with time λ c1,λ c2 are properly watched under partial valuation V if: they are both undefined; or at least one of them is true

76 WatchLit Dynamics of Watched Literals Initially, V = A pair of watched literals is chosen for each clause. It is proper. Literal choice and unit propagation expand V One or both watched literals may be falsified If λ c1,λ c2 become improper then The falsified watched literal is changed if no proper pair of watched literals can be found, two things may occur to alter V Unit propagation (V is expanded) Backtracking (V is reduced)

77 WatchLit Example clause λ c1 λ c2 p q r p = q = p q s p = q = p r s p = r = Initially V = A pair of literals was elected for each clause All are undefined, all pairs are proper

78 WatchLit p is chosen V = { p} All watched literals become (0, ), improper New literals are chosen to be watched clause λ c1 λ c2 p q r r = q = p q s s = q = p r s s = r =

79 WatchLit r is chosen V = { p, r} WL in clauses 1,3 become improper No other *- or 1-literal to be chosen Unit propagation: q, s become true clause λ c1 λ c2 p q r r = 0 q = / 1 p q s s = q = p r s s = / 1 r = 0

80 WatchLit Unit propagation leads to backtracking V = { p, r,q, s} WL in clause 2 becomes improper No other *- or 1-literal to be chosen No unit propagation is possible: clause 2 is false clause λ c1 λ c2 p q r r = 0 q = 1 p q s s = 0 q = 0 p r s s = 1 r = 0

81 WatchLit Fast Backtracking V is contracted to last choice point V = { p, r,q, s} ////////////// { p,r} clause λ c1 λ c2 p q r r = 1 q = p q s s = q = p r s s = r = 1 Only affected WLs had to be recomputed No need to reestablish previous context from a stack of contexts Very quick backtracking

82 Further Techniques Next Issue

83 Further Techniques Improvements Techniques from Chaff Learning new clauses VSDIS Heuristics Random restarts Backjumping

84 Further Techniques Learning

85 Further Techniques When do we learn? Sages learn from their bad choices

86 Further Techniques When do we learn? Sages learn from their bad choices Every time a contradiction is derived (closed branch) we can lament our choice...

87 Further Techniques When do we learn? Sages learn from their bad choices Every time a contradiction is derived (closed branch) we can lament our choice or learn from our mistakes:

88 Further Techniques When do we learn? Sages learn from their bad choices Every time a contradiction is derived (closed branch) we can lament our choice or learn from our mistakes: We learn that a choice of literals lead to contradiction

89 Further Techniques When do we learn? Sages learn from their bad choices Every time a contradiction is derived (closed branch) we can lament our choice or learn from our mistakes: We learn that a choice of literals lead to contradiction We learn that the clauses involved have enough information to avoid the mistake

90 Further Techniques When do we learn? Sages learn from their bad choices Every time a contradiction is derived (closed branch) we can lament our choice or learn from our mistakes: We learn that a choice of literals lead to contradiction We learn that the clauses involved have enough information to avoid the mistake We can added learned information to the problem

91 Further Techniques When do we learn? Sages learn from their bad choices Every time a contradiction is derived (closed branch) we can lament our choice or learn from our mistakes: We learn that a choice of literals lead to contradiction We learn that the clauses involved have enough information to avoid the mistake We can added learned information to the problem Learning means adding new clauses, without adding new variables

92 Further Techniques Learning 1: Bad Choices Suppose we had choices which after propagation led to V = { p, r} V = { p, r,q, s,s} That is, in that context we learned that we cannot have both p and r.

93 Further Techniques Learning 1: Bad Choices Suppose we had choices which after propagation led to V = { p, r} V = { p, r,q, s,s} That is, in that context we learned that we cannot have both p and r. Add the new clause: p r

94 Further Techniques Learning 1: Properties From a closed branch with choices λ 1,...,λ k, learn λ 1... λ k

95 Further Techniques Learning 1: Properties From a closed branch with choices λ 1,...,λ k, learn λ 1... λ k In general, this form of learning does not improve efficiency, for

96 Further Techniques Learning 1: Properties From a closed branch with choices λ 1,...,λ k, learn λ 1... λ k In general, this form of learning does not improve efficiency, for it will only be used if k 1 literals occur in another branch

97 Further Techniques Learning 1: Properties From a closed branch with choices λ 1,...,λ k, learn λ 1... λ k In general, this form of learning does not improve efficiency, for it will only be used if k 1 literals occur in another branch not very likely

98 Further Techniques Learning 1: Properties From a closed branch with choices λ 1,...,λ k, learn λ 1... λ k In general, this form of learning does not improve efficiency, for it will only be used if k 1 literals occur in another branch not very likely Useful in the presence of forgetting (random restarts)

99 Further Techniques Learning 1: Properties From a closed branch with choices λ 1,...,λ k, learn λ 1... λ k In general, this form of learning does not improve efficiency, for it will only be used if k 1 literals occur in another branch not very likely Useful in the presence of forgetting (random restarts) Other learning techniques may be applied

100 Further Techniques Learning 2: Relevant information Clauses involved in a contradiction present useful information

101 Further Techniques Learning 2: Relevant information Clauses involved in a contradiction present useful information In particular, some clauses leading to a contradiction can be resolved

102 Further Techniques Learning 2: Relevant information Clauses involved in a contradiction present useful information In particular, some clauses leading to a contradiction can be resolved We learn the resolved clause and add it

103 Further Techniques Learning 2: Relevant information Clauses involved in a contradiction present useful information In particular, some clauses leading to a contradiction can be resolved We learn the resolved clause and add it For that, we have to store extra information in a partial valuation:

104 Further Techniques Learning 2: Relevant information Clauses involved in a contradiction present useful information In particular, some clauses leading to a contradiction can be resolved We learn the resolved clause and add it For that, we have to store extra information in a partial valuation: For each unit clause, its original clause

105 Further Techniques Learning 2: Relevant information Clauses involved in a contradiction present useful information In particular, some clauses leading to a contradiction can be resolved We learn the resolved clause and add it For that, we have to store extra information in a partial valuation: For each unit clause, its original clause Choice literals are associted to

106 Further Techniques Learning 2: An Example In the previous example, the choices are represented as: V = {( p, ),( r, )}

107 Further Techniques Learning 2: An Example In the previous example, the choices are represented as: V = {( p, ),( r, )} After linear propagation, the contradiction V = {( p, ),( r, ),(q,p q r),( s,p r s),(s,p q s)}

108 Further Techniques Learning 2: An Example In the previous example, the choices are represented as: V = {( p, ),( r, )} After linear propagation, the contradiction V = {( p, ),( r, ),(q,p q r),( s,p r s),(s,p q s)} We learn the resolution of contradição: p r s e p q s

109 Further Techniques Learning 2: An Example In the previous example, the choices are represented as: V = {( p, ),( r, )} After linear propagation, the contradiction V = {( p, ),( r, ),(q,p q r),( s,p r s),(s,p q s)} We learn the resolution of contradição: p r s e p q s That is, we add the clause: p r q

110 Further Techniques Learning 2: An Example In the previous example, the choices are represented as: V = {( p, ),( r, )} After linear propagation, the contradiction V = {( p, ),( r, ),(q,p q r),( s,p r s),(s,p q s)} We learn the resolution of contradição: p r s e p q s That is, we add the clause: p r q This form of learning has better effects to proof efficiency

111 Further Techniques Learning 2: An Example In the previous example, the choices are represented as: V = {( p, ),( r, )} After linear propagation, the contradiction V = {( p, ),( r, ),(q,p q r),( s,p r s),(s,p q s)} We learn the resolution of contradição: p r s e p q s That is, we add the clause: p r q This form of learning has better effects to proof efficiency Theorem: proofs with DPLL + Learning2 can polynomially simulate full resolution proofs

112 Further Techniques Heuristics for Choosing Literals

113 Further Techniques Choosing Literals A DPLL step starts when linear propagation ends without contradiction

114 Further Techniques Choosing Literals A DPLL step starts when linear propagation ends without contradiction A each step, a new literal has to be chosen to start a new cycle propagation/backtrack

115 Further Techniques Choosing Literals A DPLL step starts when linear propagation ends without contradiction A each step, a new literal has to be chosen to start a new cycle propagation/backtrack Several heuristics can be used to choose that literal

116 Further Techniques Choosing Literals A DPLL step starts when linear propagation ends without contradiction A each step, a new literal has to be chosen to start a new cycle propagation/backtrack Several heuristics can be used to choose that literal Heuristics are rules that help the choice of one among several possibilities

117 Further Techniques Choosing Literals A DPLL step starts when linear propagation ends without contradiction A each step, a new literal has to be chosen to start a new cycle propagation/backtrack Several heuristics can be used to choose that literal Heuristics are rules that help the choice of one among several possibilities Some heuristics are clearly more efficient than others

118 Further Techniques Heuristics without Learning Do not take in consideration the learning of new clauses

119 Further Techniques Heuristics without Learning Do not take in consideration the learning of new clauses MOM Heuristics Maximum number of literal Ocorrences with Minimum length Easy to implement: select the literal that is present in the largest number of clauses of minimum size. Increases the probability of backtracking

120 Further Techniques Heuristics without Learning Do not take in consideration the learning of new clauses MOM Heuristics Maximum number of literal Ocorrences with Minimum length Easy to implement: select the literal that is present in the largest number of clauses of minimum size. Increases the probability of backtracking SATO Heuristics is a variation of MOM. Let f(p) be 1 plus the number of clauses of smallest size which contain p. Choose p that maximizes f(p) f( p). Choose p if f(p) > f( p); p otherwise.

121 Further Techniques Heuristics VSIDS Variable State Independent Decaying Sum

122 Further Techniques Heuristics VSIDS Variable State Independent Decaying Sum Takes the learning of clauses in consideration

123 Further Techniques Heuristics VSIDS Variable State Independent Decaying Sum Takes the learning of clauses in consideration One counter for each literal

124 Further Techniques Heuristics VSIDS Variable State Independent Decaying Sum Takes the learning of clauses in consideration One counter for each literal Initialize each with n. of occurrences of each literal

125 Further Techniques Heuristics VSIDS Variable State Independent Decaying Sum Takes the learning of clauses in consideration One counter for each literal Initialize each with n. of occurrences of each literal Increment counter when a clause containing that literal is added

126 Further Techniques Heuristics VSIDS Variable State Independent Decaying Sum Takes the learning of clauses in consideration One counter for each literal Initialize each with n. of occurrences of each literal Increment counter when a clause containing that literal is added Choose literal with highest count

127 Further Techniques Heuristics VSIDS Variable State Independent Decaying Sum Takes the learning of clauses in consideration One counter for each literal Initialize each with n. of occurrences of each literal Increment counter when a clause containing that literal is added Choose literal with highest count Periodically, counters are divided by a constant

128 Further Techniques Heuristics VSIDS Variable State Independent Decaying Sum Takes the learning of clauses in consideration One counter for each literal Initialize each with n. of occurrences of each literal Increment counter when a clause containing that literal is added Choose literal with highest count Periodically, counters are divided by a constant Highest priority to literals in clauses recently learned

129 Further Techniques Heuristics VSIDS Variable State Independent Decaying Sum Takes the learning of clauses in consideration One counter for each literal Initialize each with n. of occurrences of each literal Increment counter when a clause containing that literal is added Choose literal with highest count Periodically, counters are divided by a constant Highest priority to literals in clauses recently learned Low overheads: counters updated only during learning

130 Further Techniques Random Restarts

131 Further Techniques Forgetting, or Random Restarts Suppose a formula is SAT, but bad initial choices

132 Further Techniques Forgetting, or Random Restarts Suppose a formula is SAT, but bad initial choices A valuation will be found only after exhausting the consequences of those bad choices

133 Further Techniques Forgetting, or Random Restarts Suppose a formula is SAT, but bad initial choices A valuation will be found only after exhausting the consequences of those bad choices Idea: restart periodically the search for a valuation

134 Further Techniques Forgetting, or Random Restarts Suppose a formula is SAT, but bad initial choices A valuation will be found only after exhausting the consequences of those bad choices Idea: restart periodically the search for a valuation Problem: if the formula is UNSAT, this may lead to great inefficiency

135 Further Techniques Forgetting, or Random Restarts Suppose a formula is SAT, but bad initial choices A valuation will be found only after exhausting the consequences of those bad choices Idea: restart periodically the search for a valuation Problem: if the formula is UNSAT, this may lead to great inefficiency This problem is avoided if learned formulas are kept

136 Further Techniques Random Restart Consider ǫ, 0 < ǫ 1

137 Further Techniques Random Restart Consider ǫ, 0 < ǫ 1 When a branch is closed

138 Further Techniques Random Restart Consider ǫ, 0 < ǫ 1 When a branch is closed With probability (1 ǫ), perform usual backtracking

139 Further Techniques Random Restart Consider ǫ, 0 < ǫ 1 When a branch is closed With probability (1 ǫ), perform usual backtracking With probability ǫ, restart the search process with V =

140 Further Techniques Random Restart Consider ǫ, 0 < ǫ 1 When a branch is closed With probability (1 ǫ), perform usual backtracking With probability ǫ, restart the search process with V = Empirically checked: this brings efficiency gains

141 Further Techniques Backjumping

142 Further Techniques Backjumping via Examples Suppose we have the partial valuation V = {( p, ),( r, ),(a, ),(q,p q r),( s,p r s),(s,p q s

143 Further Techniques Backjumping via Examples Suppose we have the partial valuation V = {( p, ),( r, ),(a, ),(q,p q r),( s,p r s),(s,p q s The chose literal a does not occur in clauses associated with subsequent unit propagations

144 Further Techniques Backjumping via Examples Suppose we have the partial valuation V = {( p, ),( r, ),(a, ),(q,p q r),( s,p r s),(s,p q s The chose literal a does not occur in clauses associated with subsequent unit propagations That is, the choice of a is useless

145 Further Techniques Backjumping via Examples Suppose we have the partial valuation V = {( p, ),( r, ),(a, ),(q,p q r),( s,p r s),(s,p q s The chose literal a does not occur in clauses associated with subsequent unit propagations That is, the choice of a is useless Backtracking would lead to useless repetition V = {( p, ),( r, ),(ā, ),(q,p q r),( s,p r s),(s,p q s

146 Further Techniques Backjumping via Examples Suppose we have the partial valuation V = {( p, ),( r, ),(a, ),(q,p q r),( s,p r s),(s,p q s The chose literal a does not occur in clauses associated with subsequent unit propagations That is, the choice of a is useless Backtracking would lead to useless repetition V = {( p, ),( r, ),(ā, ),(q,p q r),( s,p r s),(s,p q s Backtracking should jump back over a and ignore it, instead of generating V = {( p, ),( r, ),(ā, ), gera V = {( p, ),(r, )}

147 Further Techniques Backjumping via Examples Suppose we have the partial valuation V = {( p, ),( r, ),(a, ),(q,p q r),( s,p r s),(s,p q s The chose literal a does not occur in clauses associated with subsequent unit propagations That is, the choice of a is useless Backtracking would lead to useless repetition V = {( p, ),( r, ),(ā, ),(q,p q r),( s,p r s),(s,p q s Backtracking should jump back over a and ignore it, instead of generating V = {( p, ),( r, ),(ā, ), gera This is backjumping V = {( p, ),(r, )}

148 Further Techniques Backjumping via Examples Suppose we have the partial valuation V = {( p, ),( r, ),(a, ),(q,p q r),( s,p r s),(s,p q s The chose literal a does not occur in clauses associated with subsequent unit propagations That is, the choice of a is useless Backtracking would lead to useless repetition V = {( p, ),( r, ),(ā, ),(q,p q r),( s,p r s),(s,p q s Backtracking should jump back over a and ignore it, instead of generating V = {( p, ),( r, ),(ā, ), gera V = {( p, ),(r, )} This is backjumping Backjumping always brings efficiency gains

149 Next Issue

150 Conclusion of the Talk DPLL is > 40 years old, but still the most used strategy for SAT solvers

151 Conclusion of the Talk DPLL is > 40 years old, but still the most used strategy for SAT solvers Use of smart techniques have improved DPLL s performance: N = 15 N =

152 Conclusion of the Talk DPLL is > 40 years old, but still the most used strategy for SAT solvers Use of smart techniques have improved DPLL s performance: N = 15 N = There are still very hard formulas that make DPLL exponential, e.g. PHP

153 Conclusion of the Talk DPLL is > 40 years old, but still the most used strategy for SAT solvers Use of smart techniques have improved DPLL s performance: N = 15 N = There are still very hard formulas that make DPLL exponential, e.g. PHP Experiments show that these formulas do occur in practice

154 Conclusion of the Talk DPLL is > 40 years old, but still the most used strategy for SAT solvers Use of smart techniques have improved DPLL s performance: N = 15 N = There are still very hard formulas that make DPLL exponential, e.g. PHP Experiments show that these formulas do occur in practice The future of SAT solvers may be in non-dpll, non-clausal methods

155 Conclusion of the Talk DPLL is > 40 years old, but still the most used strategy for SAT solvers Use of smart techniques have improved DPLL s performance: N = 15 N = There are still very hard formulas that make DPLL exponential, e.g. PHP Experiments show that these formulas do occur in practice The future of SAT solvers may be in non-dpll, non-clausal methods But the techniques learned from DPLL are incorporated in new techniques

156 Conclusion of the Talk DPLL is > 40 years old, but still the most used strategy for SAT solvers Use of smart techniques have improved DPLL s performance: N = 15 N = There are still very hard formulas that make DPLL exponential, e.g. PHP Experiments show that these formulas do occur in practice The future of SAT solvers may be in non-dpll, non-clausal methods But the techniques learned from DPLL are incorporated in new techniques SAT can also be enhanced: SAT Modulo Theories

157 SAT is not a Panacea Reduction to SAT may be ok for some NPc problems, but some NPc problems with no known polynomial SAT-reduction. E.g. Answer Set Programming... some NPc problems with no efficient polynomial SAT-reduction. E.g. Probabilistic SAT

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

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

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

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

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

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

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

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

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 32. Propositional Logic: Local Search and Outlook Martin Wehrle Universität Basel April 29, 2016 Propositional Logic: Overview Chapter overview: propositional logic

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 8. Satisfiability and Model Construction Davis-Putnam-Logemann-Loveland Procedure, Phase Transitions, GSAT Joschka Boedecker and Wolfram Burgard and Bernhard Nebel

More information

Logic in AI Chapter 7. Mausam (Based on slides of Dan Weld, Stuart Russell, Subbarao Kambhampati, Dieter Fox, Henry Kautz )

Logic in AI Chapter 7. Mausam (Based on slides of Dan Weld, Stuart Russell, Subbarao Kambhampati, Dieter Fox, Henry Kautz ) Logic in AI Chapter 7 Mausam (Based on slides of Dan Weld, Stuart Russell, Subbarao Kambhampati, Dieter Fox, Henry Kautz ) 2 Knowledge Representation represent knowledge about the world in a manner that

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

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

Satisfiability Modulo Theories (SMT)

Satisfiability Modulo Theories (SMT) Satisfiability Modulo Theories (SMT) Sylvain Conchon Cours 7 / 9 avril 2014 1 Road map The SMT problem Modern efficient SAT solvers CDCL(T) Examples of decision procedures: equality (CC) and difference

More information

Logic in AI Chapter 7. Mausam (Based on slides of Dan Weld, Stuart Russell, Dieter Fox, Henry Kautz )

Logic in AI Chapter 7. Mausam (Based on slides of Dan Weld, Stuart Russell, Dieter Fox, Henry Kautz ) Logic in AI Chapter 7 Mausam (Based on slides of Dan Weld, Stuart Russell, Dieter Fox, Henry Kautz ) Knowledge Representation represent knowledge in a manner that facilitates inferencing (i.e. drawing

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

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

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

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 31. Propositional Logic: DPLL Algorithm Malte Helmert and Gabriele Röger University of Basel April 24, 2017 Propositional Logic: Overview Chapter overview: 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

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

Advanced Artificial Intelligence, DT4048

Advanced Artificial Intelligence, DT4048 Advanced Artificial Intelligence, DT4048 Part 5 Boolean Satisfiability Federico Pecora federico.pecora@oru.se Center for Applied Autonomous Sensor Systems (AASS) Örebro University, Sweden What is Boolean

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 University of Maryland 12:58 PM February 15, 2012 1 Motivation Propositional satisfiability:

More information

Lecture 9: The Splitting Method for SAT

Lecture 9: The Splitting Method for SAT Lecture 9: The Splitting Method for SAT 1 Importance of SAT Cook-Levin Theorem: SAT is NP-complete. The reason why SAT is an important problem can be summarized as below: 1. A natural NP-Complete problem.

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

Heuristics for Efficient SAT Solving. As implemented in GRASP, Chaff and GSAT.

Heuristics for Efficient SAT Solving. As implemented in GRASP, Chaff and GSAT. Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT. Formulation of famous problems as SAT: k-coloring (1/2) The K-Coloring problem: Given an undirected graph G(V,E) and a natural

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

Machine Learning and Logic: Fast and Slow Thinking

Machine Learning and Logic: Fast and Slow Thinking Machine Learning and Logic: Fast and Slow Thinking Moshe Y. Vardi Rice University Is Computer Science Fundamentally Changing? Formal Science vs Data Science We are at peak hype about machine learning and

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 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

Planning as Satisfiability

Planning as Satisfiability Planning as Satisfiability Alan Fern * Review of propositional logic (see chapter 7) Planning as propositional satisfiability Satisfiability techniques (see chapter 7) Combining satisfiability techniques

More information

Artificial Intelligence

Artificial Intelligence Torralba and Wahlster Artificial Intelligence Chapter 11: Propositional Reasoning, Part II 1/69 Artificial Intelligence 11. Propositional Reasoning, Part II: SAT Solvers How to Efficiently Think About

More information

Phase Transitions and Computational Complexity Bart Selman

Phase Transitions and Computational Complexity Bart Selman Phase Transitions and Computational Complexity Bart Selman BS - 08/95 1 Computational Challenges In AI Many core computer science problems have been shown to be computationally intractable. We have results

More information

Towards Understanding and Harnessing the Potential of Clause Learning

Towards Understanding and Harnessing the Potential of Clause Learning Journal of Artificial Intelligence Research 22 (2004) 319-351 Submitted 12/03; published 12/04 Towards Understanding and Harnessing the Potential of Clause Learning Paul Beame Henry Kautz Ashish Sabharwal

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

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

A Review of Stochastic Local Search Techniques for Theorem Provers

A Review of Stochastic Local Search Techniques for Theorem Provers A Review of Stochastic Local Search Techniques for Theorem Provers Termpaper presentation for CSE814-Formal Methods in Software Development Course Michigan State University, East Lansing, USA Presenter:

More information

Local and Stochastic Search

Local and Stochastic Search RN, Chapter 4.3 4.4; 7.6 Local and Stochastic Search Some material based on D Lin, B Selman 1 Search Overview Introduction to Search Blind Search Techniques Heuristic Search Techniques Constraint Satisfaction

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

Propositional Logic: Methods of Proof (Part II)

Propositional Logic: Methods of Proof (Part II) Propositional Logic: Methods of Proof (Part II) This lecture topic: Propositional Logic (two lectures) Chapter 7.1-7.4 (previous lecture, Part I) Chapter 7.5 (this lecture, Part II) (optional: 7.6-7.8)

More information

Propositional Reasoning

Propositional Reasoning Propositional Reasoning CS 440 / ECE 448 Introduction to Artificial Intelligence Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri Spring 2010 Intro to AI (CS

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

Introduction Algorithms Applications MINISAT. Niklas Sörensson Chalmers University of Technology and Göteborg University

Introduction Algorithms Applications MINISAT. Niklas Sörensson Chalmers University of Technology and Göteborg University SAT ALGORITHMS AND APPLICATIONS nik@cschalmersse Chalmers University of Technology and Göteborg University Empirically Successful Classical Automated Reasoning a CADE-20 Workshop 22nd - 23th July, 2005

More information

3 Example: (free after Lewis Carroll)

3 Example: (free after Lewis Carroll) Version November, 2017 1 Automated Reasoning, 2IMF25 older version encoded by 2IW15 prof dr Hans Zantema Metaforum room 6.078 tel 040-2472749 email: h.zantema@tue.nl Information: www.win.tue.nl/~hzantema/ar.html

More information

Satisfiability and SAT Solvers. CS 270 Math Foundations of CS Jeremy Johnson

Satisfiability and SAT Solvers. CS 270 Math Foundations of CS Jeremy Johnson Satisfiability and SAT Solvers CS 270 Math Foundations of CS Jeremy Johnson Conjunctive Normal Form Conjunctive normal form (products of sums) Conjunction of clauses (disjunction of literals) For each

More information

The Wumpus Game. Stench Gold. Start. Cao Hoang Tru CSE Faculty - HCMUT

The Wumpus Game. Stench Gold. Start. Cao Hoang Tru CSE Faculty - HCMUT The Wumpus Game Stench Stench Gold Stench Start 1 The Wumpus Game Stench in the square containing the wumpus and in the directly adjacent squares in the squares directly adjacent to a pit Glitter in the

More information

The SAT Revolution: Solving, Sampling, and Counting

The SAT Revolution: Solving, Sampling, and Counting The SAT Revolution: Solving, Sampling, and Counting Moshe Y. Vardi Rice University Boolean Satisfiability Boolean Satisfiability (SAT); Given a Boolean expression, using and ( ) or, ( ) and not ( ), is

More information

Finding small unsatisfiable cores to prove unsatisfiability of QBFs

Finding small unsatisfiable cores to prove unsatisfiability of QBFs Finding small unsatisfiable cores to prove unsatisfiability of QBFs Yannet Interian 1 Gabriel Corvera 2 Bart Selman 3 Ryan Williams 4 1 Center for Applied Mathematics. Cornell University, Ithaca, NY 14853

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

Propositional Logic: Methods of Proof. Chapter 7, Part II

Propositional Logic: Methods of Proof. Chapter 7, Part II Propositional Logic: Methods of Proof Chapter 7, Part II Inference in Formal Symbol Systems: Ontology, Representation, ti Inference Formal Symbol Systems Symbols correspond to things/ideas in the world

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

On the Relative Efficiency of DPLL and OBDDs with Axiom and Join

On the Relative Efficiency of DPLL and OBDDs with Axiom and Join On the Relative Efficiency of DPLL and OBDDs with Axiom and Join Matti Järvisalo University of Helsinki, Finland September 16, 2011 @ CP M. Järvisalo (U. Helsinki) DPLL and OBDDs September 16, 2011 @ CP

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

A Logic Based Algorithm for Solving Probabilistic Satisfiability

A Logic Based Algorithm for Solving Probabilistic Satisfiability A Logic Based Algorithm for Solving Probabilistic Satisfiability Marcelo Finger and Glauber De Bona Department of Computer Science (IME-USP) Institute of Mathematics and Statistics University of Sao Paulo

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

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

Constrained Sampling and Counting

Constrained Sampling and Counting Constrained Sampling and Counting Moshe Y. Vardi Rice University Joint work with Kuldeep S. Meel, Supratik Chakraborty, Daniel Fremont, Rakesh Mistry, Sanjit Seshia. Boolean Satisfiability Boolean Satisfiability

More information

An empirical complexity study for a 2CPA solver

An empirical complexity study for a 2CPA solver Modern Information Processing: From Theory to Applications 1 B. Bouchon-Meunier, G. Coletti and R.R. Yager, Editors c 2005 Elsevier B.V. All rights reserved An empirical complexity study for a 2CPA solver

More information

Logic in AI Chapter 7. Mausam (Based on slides of Dan Weld, Stuart Russell, Subbarao Kambhampati, Dieter Fox, Henry Kautz )

Logic in AI Chapter 7. Mausam (Based on slides of Dan Weld, Stuart Russell, Subbarao Kambhampati, Dieter Fox, Henry Kautz ) Logic in AI Chapter 7 Mausam (Based on slides of Dan Weld, Stuart Russell, Subbarao Kambhampati, Dieter Fox, Henry Kautz ) 2 Knowledge Representation represent knowledge about the world in a manner that

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 19, 2013 This is a preliminary draft of these notes. Please do not distribute without

More information

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 10, 5/9/2005 University of Washington, Department of Electrical Engineering Spring 2005 Instructor: Professor Jeff A. Bilmes Logical Agents Chapter 7

More information

Logical Agents. Chapter 7

Logical Agents. Chapter 7 Logical Agents Chapter 7 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem

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

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

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

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit:

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit: Three days of interesting talks & workshops from industry experts across Australia Explore new computing topics Network with students & employers in Brisbane Price: $25 (incl. T-Shirt, morning tea and

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

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

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

Practical SAT Solving

Practical SAT Solving Practical SAT Solving Lecture 1 Carsten Sinz, Tomáš Balyo April 24, 2017 NSTITUTE FOR THEORETICAL COMPUTER SCIENCE KIT University of the State of Baden-Wuerttemberg and National Laboratory of the Helmholtz

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

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

Advanced Satisfiability

Advanced Satisfiability Advanced Satisfiability Mausam (Based on slides of Carla Gomes, Henry Kautz, Subbarao Kambhampati, Cristopher Moore, Ashish Sabharwal, Bart Selman, Toby Walsh) Why study Satisfiability? Canonical NP complete

More information

CS:4420 Artificial Intelligence

CS:4420 Artificial Intelligence CS:4420 Artificial Intelligence Spring 2018 Propositional Logic Cesare Tinelli The University of Iowa Copyright 2004 18, Cesare Tinelli and Stuart Russell a a These notes were originally developed by Stuart

More information

SAT-Solving: From Davis- Putnam to Zchaff and Beyond Day 3: Recent Developments. Lintao Zhang

SAT-Solving: From Davis- Putnam to Zchaff and Beyond Day 3: Recent Developments. Lintao Zhang SAT-Solving: From Davis- Putnam to Zchaff and Beyond Day 3: Recent Developments Requirements for SAT solvers in the Real World Fast & Robust Given a problem instance, we want to solve it quickly Reliable

More information

Deliberative Agents Knowledge Representation I. Deliberative Agents

Deliberative Agents Knowledge Representation I. Deliberative Agents Deliberative Agents Knowledge Representation I Vasant Honavar Bioinformatics and Computational Biology Program Center for Computational Intelligence, Learning, & Discovery honavar@cs.iastate.edu www.cs.iastate.edu/~honavar/

More information

Pruning Search Space for Weighted First Order Horn Clause Satisfiability

Pruning Search Space for Weighted First Order Horn Clause Satisfiability Pruning Search Space for Weighted First Order Horn Clause Satisfiability Naveen Nair 123, Anandraj Govindan 2, Chander Jayaraman 2, Kiran TVS 2, and Ganesh Ramakrishnan 21 1 IITB-Monash Research Academy,

More information

Phase Transitions and Local Search for k-satisfiability

Phase Transitions and Local Search for k-satisfiability Phase Transitions and Local Search for k-satisfiability Pekka Orponen (joint work with many others) Department of Information and Computer Science Helsinki University of Technology TKK Outline Part I:

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

Clause/Term Resolution and Learning in the Evaluation of Quantified Boolean Formulas

Clause/Term Resolution and Learning in the Evaluation of Quantified Boolean Formulas Journal of Artificial Intelligence Research 1 (1993) 1-15 Submitted 6/91; published 9/91 Clause/Term Resolution and Learning in the Evaluation of Quantified Boolean Formulas Enrico Giunchiglia Massimo

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

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

The Interface between P and NP. Toby Walsh Cork Constraint Computation Centre

The Interface between P and NP. Toby Walsh Cork Constraint Computation Centre The Interface between P and NP Toby Walsh Cork Constraint Computation Centre http://4c.ucc.ie/~tw 3-SAT Where are the hard 3-SAT problems? Sample randomly generated 3-SAT Fix number of clauses, l Number

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

IntSat: From SAT to Integer Linear Programming

IntSat: From SAT to Integer Linear Programming IntSat: From SAT to Integer Linear Programming CPAIOR 2015 (invited talk) Robert Nieuwenhuis Barcelogic.com - Computer Science Department BarcelonaTech (UPC) 1 Proposed travel arrangements (next time):

More information

VLSI CAD: Lecture 4.1. Logic to Layout. Computational Boolean Algebra Representations: Satisfiability (SAT), Part 1

VLSI CAD: Lecture 4.1. Logic to Layout. Computational Boolean Algebra Representations: Satisfiability (SAT), Part 1 VLSI CAD: Logic to Layout Rob A. Rutenbar University of Illinois Lecture 4.1 Computational Boolean Algebra Representations: Satisfiability (SAT), Part 1 Some Terminology Satisfiability (called SAT for

More information

Logical agents. Chapter 7. Chapter 7 1

Logical agents. Chapter 7. Chapter 7 1 Logical agents Chapter 7 Chapter 7 1 Outline Knowledge-based agents Logic in general models and entailment Propositional (oolean) logic Equivalence, validity, satisfiability Inference rules and theorem

More information

Solving hard industrial combinatorial problems with SAT

Solving hard industrial combinatorial problems with SAT UNIVERSITAT POLITÈCNICA DE CATALUNYA SOFTWARE DEPARTMENT PhD in Computing Solving hard industrial combinatorial problems with SAT Ignasi Abío Roig Advisors: Robert Nieuwenhuis and Albert Oliveras and Enric

More information

Incremental Deterministic Planning

Incremental Deterministic Planning Incremental Deterministic Planning Ştefan ANDREI National University of Singapore, School of Computing, E-mail: andrei@comp.nus.edu.sg Martin RINARD MIT, Department of Electrical Engineering and Computer

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 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

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

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Constraint Satisfaction Vibhav Gogate The University of Texas at Dallas Some material courtesy of Rina Dechter, Alex Ihler and Stuart Russell Constraint Satisfaction Problems The

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

MiniMaxSat: : A new Weighted Solver. Federico Heras Javier Larrosa Albert Oliveras

MiniMaxSat: : A new Weighted Solver. Federico Heras Javier Larrosa Albert Oliveras MiniMaxSat: : A new Weighted Max-SAT Solver Federico Heras Javier Larrosa Albert Oliveras SAT (x v y), ( y v z), ( z v w) SAT (x v y), ( y v z), ( z v w) x=y=z=w=true Satisfiable SAT (x), ( x v y), ( x

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

Foundations of Lazy SMT and DPLL(T)

Foundations of Lazy SMT and DPLL(T) Foundations of Lazy SMT and DPLL(T) Cesare Tinelli The University of Iowa Foundations of Lazy SMT and DPLL(T) p.1/86 Acknowledgments: Many thanks to Albert Oliveras for contributing some of the material

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

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

The Interface between P and NP: COL, XOR, NAE, 1-in-, and Horn SAT

The Interface between P and NP: COL, XOR, NAE, 1-in-, and Horn SAT The Interface between P and NP: COL, XOR, NAE, -in-, and Horn SAT Toby Walsh APES Report: APES-37-2002 Abstract We study in detail the interface between P and NP by means of five new problem classes. Like

More information