Decision Procedures in Verification First-Order Logic (4) - - PowerPoint PPT Presentation

decision procedures in verification
SMART_READER_LITE
LIVE PREVIEW

Decision Procedures in Verification First-Order Logic (4) - - PowerPoint PPT Presentation

Decision Procedures in Verification First-Order Logic (4) 12.12.2016 Viorica Sofronie-Stokkermans e-mail: sofronie@uni-koblenz.de 1 Exam 2 Until now: General Resolution Soundness, refutational completeness Refinements: Ordered resolution


slide-1
SLIDE 1

Decision Procedures in Verification

First-Order Logic (4) 12.12.2016 Viorica Sofronie-Stokkermans e-mail: sofronie@uni-koblenz.de

1

slide-2
SLIDE 2

Exam

2

slide-3
SLIDE 3

Until now:

General Resolution Soundness, refutational completeness Refinements: Ordered resolution with selection Consequences: Herbrand’s theorem The Theorem of L¨

  • wenheim-Skolem

Compactness of first-order logic Craig Interpolation

3

slide-4
SLIDE 4

Resolution Calculus Res≻

S

Let ≻ be a total and well-founded ordering on ground atoms and S a selection function. Ordered resolution with selection C ∨ A ¬B ∨ D (C ∨ D)σ [ordered resolution with selection] if σ = mgu(A, B) and (i) Aσ strictly maximal wrt. Cσ; (ii) nothing is selected in C by S; (iii) either ¬B is selected,

  • r else nothing is selected in ¬B ∨ D and ¬Bσ is maximal in Dσ.

Ordered factoring C ∨ A ∨ B (C ∨ A)σ [ordered factoring] if σ = mgu(A, B) and Aσ is maximal in Cσ and nothing is selected in C.

4

slide-5
SLIDE 5

Craig Interpolation

Theorem: Res≻

S is sound and refutationally complete.

A theoretical application of ordered resolution is Craig- Interpolation: Theorem (Craig 57) Let F and G be two propositional formulas such that F | = G. Then there exists a formula H (called the interpolant for F | = G), such that H contains only propostional variables occurring both in F and in G, and such that F | = H and H | = G.

5

slide-6
SLIDE 6

Craig Interpolation

Proof: Translate F and ¬G into CNF. Let N and M, resp., denote the resulting clause set. Choose an atom ordering ≻ for which the propositional variables that occur in F but not in G are maximal. Saturate N into N∗ wrt. Res≻

S with an empty selection function S.

Then saturate N∗ ∪ M wrt. Res≻S to derive ⊥. As N∗ is already saturated, due to the ordering restrictions only inferences need to be considered where premises, if they are from N∗, only contain symbols that also occur in G. The conjunction of these premises is an interpolant H. The theorem also holds for first-order formulas. For universal formulas the above proof can be easily extended. In the general case, a proof based on resolution technology is more complicated because of Skolemization.

6

slide-7
SLIDE 7

Applications of Craig Interpolation

Modular databases Given: Two databases (different but possibly overlapping languages) Task: Is the union of the two databases consistent? If not: locate error

7

slide-8
SLIDE 8

Applications of Craig Interpolation

Modular databases Given: Two databases (different but possibly overlapping languages) Logical modeling: F1 ∧ F2 Task: Is the union of the two databases consistent? If not: locate error F1 ∧ F2 | =⊥

8

slide-9
SLIDE 9

Applications of Craig Interpolation

Modular databases Given: Two databases (different but possibly overlapping languages) Logical modeling: F1 ∧ F2 Task: Is the union of the two databases consistent? If not: locate error F1 ∧ F2 | =⊥ F1 | = ¬F2 (assume we are in prop. logic)

9

slide-10
SLIDE 10

Applications of Craig Interpolation

Modular databases Given: Two databases (different but possibly overlapping languages) Logical modeling: F1 ∧ F2 Task: Is the union of the two databases consistent? If not: locate error F1 ∧ F2 | =⊥ F1 | = ¬F2 (assume we are in prop. logic) Craig Interpolation (propositional case) There exists I containing only propositional variables occurring in F1 and F2 such that: F1 | = I and I | = ¬F2

10

slide-11
SLIDE 11

Applications of Craig Interpolation

Reasoning in combinations of theories Given: Two theories (different but possibly overlapping languages) s.t. decision procedures for component theories for certain fragments exist Task: Reason in the combination of the two theories Question: Which information needs to be exchanged between provers? Answer: Craig Interpolation The case of two disjoint theories will be discussed later in this lecture

11

slide-12
SLIDE 12

Applications of Craig Interpolation

Verification (programs or hardware) Model programs as transition systems.

  • Sets of states expressed as formulae
  • Transitions expressed as formulae T

Question: Can a state in a certain set of states E (error) be reached from some state in a set I (initial) in k steps? φI ∧ T1 ∧ T2 ∧ · · · ∧ Tk ∧ φE

12

slide-13
SLIDE 13

Applications of Craig Interpolation

Verification (programs or hardware) Model programs as transition systems.

  • Sets of states expressed as formulae
  • Transitions expressed as formulae T

Question: Can a state in a certain set of states E (error) be reached from some state in a set I (initial) in k steps? (φI ∧ T1)

  • F1

∧ (T2 ∧ · · · ∧ Tk ∧ φE )

  • F2

Not reachable: F1 ∧ F2 | =⊥

13

slide-14
SLIDE 14

Applications of Craig Interpolation

Verification (programs or hardware) Model programs as transition systems.

  • Sets of states expressed as formulae
  • Transitions expressed as formulae T

Question: Can a state in a certain set of states E (error) be reached from some state in a set I (initial) in k steps? (φI ∧ T1)

  • F1

∧ (T2 ∧ · · · ∧ Tk ∧ φE )

  • F2

Not reachable: F1 ∧ F2 | =⊥ Interpolant: I overapproximates the set of successors of φI .

14

slide-15
SLIDE 15

Goal

Goal: Make resolution efficient Identify clauses which are not needed and can be discarded

15

slide-16
SLIDE 16

Redundancy

So far: local restrictions of the resolution inference rules using

  • rderings and selection functions.

Is it also possible to delete clauses altogether? Under which circumstances are clauses unnecessary? (Conjecture: e. g., if they are tautologies or if they are subsumed by

  • ther clauses.)

Intuition: If a clause is guaranteed to be neither a minimal counterexample nor productive, then we do not need it.

16

slide-17
SLIDE 17

Recall

Construction of I for the extended clause set: clauses C IC ∆C Remarks 1 ¬P0 ∅ ∅ 2 P0 ∨ P1 ∅ {P1} 3 P1 ∨ P2 {P1} ∅ 4 ¬P1 ∨ P2 {P1} {P2} 9 ¬P1 ∨ ¬P1 ∨ P3 ∨ P0 {P1, P2} {P3} 8 ¬P1 ∨ ¬P1 ∨ P3 ∨ P3 ∨ P0 {P1, P2, P3} ∅ true in AC 5 ¬P1 ∨ P4 ∨ P3 ∨ P0 {P1, P2, P3} ∅ 6 ¬P1 ∨ ¬P4 ∨ P3 {P1, P2, P3} ∅ true in AC 7 ¬P3 ∨ P5 {P1, P2, P3} {P5} The resulting I = {P1, P2, P3, P5} is a model of the clause set.

17

slide-18
SLIDE 18

A Formal Notion of Redundancy

Let N be a set of ground clauses and C a ground clause (not necessarily in N). C is called redundant w. r. t. N, if there exist C1, . . . , Cn ∈ N, n ≥ 0, such that Ci ≺ C and C1, . . . , Cn | = C. Redundancy for general clauses: C is called redundant w. r. t. N, if all ground instances Cσ of C are redundant w. r. t. GΣ(N). Intuition: Redundant clauses are neither minimal counterexamples nor productive. Note: The same ordering ≻ is used for ordering restrictions and for redundancy (and for the completeness proof).

18

slide-19
SLIDE 19

Examples of Redundancy

Proposition 2.40:

  • C tautology (i.e., |

= C) ⇒ C redundant w. r. t. any set N.

  • Cσ ⊂ D ⇒ D redundant w. r. t. N ∪ {C}
  • Cσ ⊆ D ⇒ D ∨ Lσ redundant w. r. t. N ∪ {C ∨ L, D}

(Under certain conditions one may also use non-strict subsumption, but this requires a slightly more complicated definition of redundancy.)

19

slide-20
SLIDE 20

Saturation up to Redundancy

N is called saturated up to redundancy (wrt. Res≻

S )

:⇔ Res≻

S (N \ Red(N)) ⊆ N ∪ Red(N)

Theorem 2.41: Let N be saturated up to redundancy. Then N | = ⊥ ⇔ ⊥ ∈ N

20

slide-21
SLIDE 21

Saturation up to Redundancy

Proof (Sketch): (i) Ground case:

  • consider the construction of the candidate model I ≻

N for Res≻ S

  • redundant clauses are not productive
  • redundant clauses in N are not minimal counterexamples for I ≻

N

The premises of “essential” inferences are either minimal counterex- amples or productive. (ii) Lifting: no additional problems over the proof of Theorem 2.39.

21

slide-22
SLIDE 22

Monotonicity Properties of Redundancy

Theorem 2.42: (i) N ⊆ M ⇒ Red(N) ⊆ Red(M) (ii) M ⊆ Red(N) ⇒ Red(N) ⊆ Red(N \ M) Proof: (i) Let C ∈ Red(N). Then there exist C1, . . . , Cn ∈ N, n ≥ 0 such that Ci ≺ C for all i = 1, . . . , n and C1, . . . , Cn | = C. We assumed that N ⊆ M, so we know that C1, . . . , Cn ∈ M. Thus: there exist C1, . . . , Cn ∈ M, n ≥ 0 such that Ci ≺ C for all i = 1, . . . , n and C1, . . . , Cn | = C. Therefore, C ∈ Red(M).

22

slide-23
SLIDE 23

Monotonicity Properties of Redundancy

Theorem 2.42: (i) N ⊆ M ⇒ Red(N) ⊆ Red(M) (ii) M ⊆ Red(N) ⇒ Red(N) ⊆ Red(N \ M) Proof (Idea): (ii) Let C ∈ Red(N). Then there exist C1, . . . , Cn ∈ N, n ≥ 0 such that Ci ≺ C for all i = 1, . . . , n and C1, . . . , Cn | = C. Case 1: For all i, Ci ∈ M. Then C ∈ Red(N\M). Case 2: For some i, Ci ∈ M ⊆ Red(N). Then for every such index i there exist C i

1, . . . , C i ni ∈ N such that C i j ≺ Ci and C i 1, . . . , C i ni |

= Ci. We can replace Ci above with C i

1, . . . , C i ni . We can iterate the procedure until

none of the Ci’s are in M (termination guaranteed by the fact that ≻ is well-founded).

23

slide-24
SLIDE 24

Some theorem provers for first-order logic

  • SPASS

http://www.spass-prover.org/

  • E

http://www4.informatik.tu-muenchen.de/∼schulz/E/E.html

  • Vampire

http://www.vprover.org/

24

slide-25
SLIDE 25

Decidable subclasses of first-order logic

25

slide-26
SLIDE 26

Applications

Use ordered resolution with selection to give a decision procedure for the Ackermann class.

26

slide-27
SLIDE 27

The Ackermann class

Σ = (Ω, Π), Ω is a finite set of constants The Ackermann class consists of all sentences of the form ∃x1 . . . ∃xn∀x∃y1 . . . ∃ymF(x1, . . . , xn, x, y1, . . . , ym) Idea: CNF translation: ∃x1 . . . ∃xn∀x∃y1 . . . ∃ymF(x1, . . . , xn, x, y1, . . . , ym) ⇒S ∀xF(c1, . . . , cn, x, f1(x), . . . , fm(x)) ⇒K ∀x Li(c1, . . . , cn, x, f1(x), . . . , fm(x)) c1, . . . , cn are Skolem constants f1, . . . , fm are unary Skolem functions

27

slide-28
SLIDE 28

The Ackermann class

Σ = (Ω, Π), Ω is a finite set of constants The Ackermann class consists of all sentences of the form ∃x1 . . . ∃xn∀x∃y1 . . . ∃ymF(x1, . . . , xn, x, y1, . . . , ym) Idea: CNF translation: ∃x1 . . . ∃xn∀x∃y1 . . . ∃ymF(x1, . . . , xn, x, y1, . . . , ym) ⇒∗ ∀x Li(c1, . . . , cn, x, f1(x), . . . , fm(x)) The clauses are in the following classes:

G = G(c1, . . . , cn) ground clauses without function symbols V = V (x, c1, . . . , cn) clauses with one variable and without function symbols Gf = G(c1, . . . , cn, f1, . . . , fn) ground clauses with function symbols Vf = V (x, c1, . . . , cn, f1(x), . . . , fn(x)) clauses with a variable & function symbols

28

slide-29
SLIDE 29

The Ackermann class

G = G(c1, . . . , cn) ground clauses without function symbols V = V (x, c1, . . . , cn) clauses with one variable and without function symbols Gf = G(c1, . . . , cn, f1, . . . , fn) ground clauses with function symbols Vf = V (x, c1, . . . , cn, f1(x), . . . , fn(x)) clauses with a variable & function symbols

Term ordering f (t) ≻ t; terms containing function symbols larger than those who do not. B ≻ A iff exists argument u of B such that every argument t of A: u ≻ t Ordered resolution: G ∪ V ∪ Gf ∪ Vf is closed under ordered resolution. G, G → G; G, V → G; G, Gf → nothing; G, Vf → nothing V , V → V ∪ G; V , Gf → G ∪ Gf ; V , Vf → G ∪ V ∪ Gf ∪ Vf Gf , Gf → Gf ; Gf , Vf → Gf ∪ G; Vf , Vf → G ∪ V ∪ Vf ∪ Gf Observation 1: G ∪ V ∪ Gf ∪ Vf finite set of clauses (up to renaming of variables).

29

slide-30
SLIDE 30

The Ackermann class

G = G(c1, . . . , cn) ground clauses without function symbols V = V (x, c1, . . . , cn) clauses with one variable and without function symbols Gf = G(c1, . . . , cn, fi) ground clauses with function symbols Vf = V (x, c1, . . . , cn, f1(x), . . . , fn(x)) clauses with a variable & function symbols

Term ordering f (t) ≻ t; terms containing function symbols larger than those who do not. B ≻ A iff exists argument u of B such that every argument t of A: u ≻ t Ordered resolution: G ∪ V ∪ Gf ∪ Vf is closed under ordered resolution. G, G → G; G, V → G; G, Gf → nothing; G, Vf → nothing V , V → V ∪ G; V , Gf → G ∪ Gf ; V , Vf → G ∪ V ∪ Gf ∪ Vf Gf , Gf → Gf ; Gf , Vf → Gf ∪ G; Vf , Vf → G ∪ V ∪ Vf ∪ Gf Observation 2: No clauses with nested function symbols can be generated.

30

slide-31
SLIDE 31

The Ackermann Class

Conclusion: Resolution (with implicit factorization) will always terminate if the input clauses are in the class defined before. Resolution can be used as a decision procedure to check the satisfiability of formulae in the Ackermann class.

31

slide-32
SLIDE 32

The Monadic Class

Monadic first-order logic (MFO) is FOL (without equality) over purely relational signatures Σ = (Ω, Π), where Ω = ∅, and every p ∈ Π has arity 1. Abstract syntax: Φ := ⊤ | P(x) | Φ1 ∧ Φ2 | ¬Φ | ∀xΦ

  • Idea. Let Φ be a MFO formula with k predicate symbols.

Let A = (UA, {pA}p∈Π) be a Σ-algebra. The only way to distinguish the elements of UA is by the atomic formulae p(x), p ∈ Π.

  • the elements which a ∈ UA which belong to the same pA’s, p ∈ Π

can be collapsed into one single element.

  • if Π = {p1, . . . , pk} then what remains is a finite structure with at

most 2k elements.

  • the truth value of a formula: computed by evaluating all subformulae.

32

slide-33
SLIDE 33

The Monadic Class

MFO Abstract syntax: Φ := ⊤ | P(x) | Φ1 ∧ Φ2 | ¬Φ | ∀xΦ Theorem (Finite model theorem for MFO). If Φ is a satisfiable MFO formula with k predicate symbols then Φ has a model where the domain is a subset of {0, 1}k.

Proof: Let B = ({0, 1}k, {p1

B, . . . , pk B}), where pi B={(b1, . . . , bk) | bi=1}.

Let A = (UA, {p1

A, . . . , pk A}), β : X → UA be such that (A, β) |

= Φ. We construct a model for Φ with cardinality at most 2k as follows:

  • Let h : A → B be defined for all a ∈ UA by:

h(a) = (b1, . . . , bk) where bi = 1 if a ∈ pi

A and 0 otherwise.

Then a ∈ pi

A iff h(a) ∈ pi B for all a ∈ UA and all i = 1, . . . , k.

  • Let B′ = ({0, 1}k ∩ h(UA), {p1

B ∩ h(UA), . . . , pk B ∩ h(UA)}).

  • We show that (B′, β ◦ h) |

= Φ.

33

slide-34
SLIDE 34

The Monadic Class

Let B = ({0, 1}k, {p1

B, . . . , pk B}), where pi B={(b1, . . . , bk) | bi=1}.

Let A = (UA, {p1

A, . . . , pk A}), β : X → UA be such that (A, β) |

= Φ. We construct a model for Φ with cardinality at most 2k as follows:

  • Let h : A → B be defined for all a ∈ UA by:

h(a) = (b1, . . . , bk) where bi = 1 if a ∈ pi

A and 0 otherwise.

Then a ∈ pi

A iff h(a) ∈ pi B for all a ∈ UA and all i = 1, . . . , k.

  • Let B′ = ({0, 1}k ∩ h(UA), {p1

B ∩ h(UA), . . . , pk B ∩ h(UA)}).

  • We show that (B′, β ◦ h) |

= Φ. Induction on the structure of Φ

  • Φ = ⊤ OK
  • Φ = pi(x).

Then (A, β) | = Φ iff β(x) ∈ pi

A iff h(β(x)) ∈ pi B iff

(B′, β ◦ h) | = Φ.

34

slide-35
SLIDE 35

The Monadic Class

Let B = ({0, 1}k, {p1

B, . . . , pk B}), where pi B={(b1, . . . , bk) | bi=1}.

Let A = (UA, {p1

A, . . . , pk A}), β : X → UA be such that (A, β) |

= Φ. We construct a model for Φ with cardinality at most 2k as follows:

  • Let h : A → B be defined for all a ∈ UA by:

h(a) = (b1, . . . , bk) where bi = 1 if a ∈ pi

A and 0 otherwise.

Then a ∈ pi

A iff h(a) ∈ pi B for all a ∈ UA and all i = 1, . . . , k.

  • Let B′ = ({0, 1}k ∩ h(UA), {p1

B ∩ h(UA), . . . , pk B ∩ h(UA)}).

  • We show that (B′, β ◦ h) |

= Φ. Induction on the structure of Φ

  • Φ = Φ1 ∧ Φ2: standard
  • Φ = ¬Φ1: standard

35

slide-36
SLIDE 36

The Monadic Class

Let B = ({0, 1}k, {p1

B, . . . , pk B}), where pi B={(b1, . . . , bk) | bi=1}.

Let A = (UA, {p1

A, . . . , pk A}), β : X → UA be such that (A, β) |

= Φ. We construct a model for Φ with cardinality at most 2k as follows:

  • Let h : A → B be defined for all a ∈ UA by:

h(a) = (b1, . . . , bk) where bi = 1 if a ∈ pi

A and 0 otherwise.

Then a ∈ pi

A iff h(a) ∈ pi B for all a ∈ UA and all i = 1, . . . , k.

  • Let B′ = ({0, 1}k ∩ h(UA), {p1

B ∩ h(UA), . . . , pk B ∩ h(UA)}).

  • We show that (B′, β ◦ h) |

= Φ. Induction on the structure of Φ

  • Φ = ∀xΦ1(x). Then the following are equivalent:

– (A, β)| =Φ (i.e. (A, β[x → a])| =Φ1 for all a ∈ UA) – (B′, β[x → a] ◦ h)| =Φ1 for all a∈UA (ind. hyp) – (B′, β ◦ h[x → b])| =Φ1 for all b∈{0, 1}k ∩ h(A) (i.e. (B′, β◦h)| =Φ)

36

slide-37
SLIDE 37

The Monadic Class

Resolution-based decision procedure for the Monadic Class (and for several

  • ther classes):

William H. Joyner Jr. Resolution Strategies as Decision Procedures.

  • J. ACM 23(3): 398-417 (1976)

Idea:

  • Use orderings to restrict the possible inferences
  • Identify a class of clauses (with terms of bounded depth) which

contains the type of clauses generated from the respective fragment and is closed under ordered resolution (+ red. elim. criteria)

  • Show that a saturation of the clauses can be obtained in finite time

37

slide-38
SLIDE 38

The Monadic Class

Resolution-based decision procedure for the Monadic Class: Φ : ∀x1∃y1 . . . ∀xk∃yk(....ps(xi)......pl(yi)...) → ∀x1 . . . ∀xk(...ps(xi)...pl(fsk(x1, . . . , xi)...) Consider the class MON of clauses with the following properties:

  • no literal of heigth greater than 2 appears
  • each variable-disjoint partition has at most n =

i=1 |xi|

variables (can order the variables as x1, . . . , xn)

  • the variables of each non-ground block can occur either in

atoms p(xi) or in atoms P(fsk(x1, . . . , xt)), 0 ≤ t ≤ n It can be shown that this class contains all CNF’s of formulae in the monadic class and is closed under ordered resolution.

38

slide-39
SLIDE 39

3.2 Deduction problems

Satisfiability w.r.t. a theory

39

slide-40
SLIDE 40

Satisfiability w.r.t. a theory

Example Let Σ = ({e/0, ∗/2, i/1}, ∅) Let F consist of all (universally quantified) group axioms: ∀x, y, z x ∗ (y ∗ z) ≈ (x ∗ y) ∗ z ∀x x ∗ i(x) ≈ e ∧ i(x) ∗ x ≈ e ∀x x ∗ e ≈ x ∧ e ∗ x ≈ x Question: Is ∀x, y(x ∗ y = y ∗ x) entailed by F?

40

slide-41
SLIDE 41

Satisfiability w.r.t. a theory

Example Let Σ = ({e/0, ∗/2, i/1}, ∅) Let F consist of all (universally quantified) group axioms: ∀x, y, z x ∗ (y ∗ z) ≈ (x ∗ y) ∗ z ∀x x ∗ i(x) ≈ e ∧ i(x) ∗ x ≈ e ∀x x ∗ e ≈ x ∧ e ∗ x ≈ x Question: Is ∀x, y(x ∗ y = y ∗ x) entailed by F? Alternative question: Is ∀x, y(x ∗ y = y ∗ x) true in the class of all groups?

41

slide-42
SLIDE 42

Logical theories

Syntactic view first-order theory: given by a set F of (closed) first-order Σ-formulae. the models of F: Mod(F) = {A ∈ Σ-alg | A | = G, for all G in F} Semantic view given a class M of Σ-algebras the first-order theory of M: Th(M) = {G ∈ FΣ(X) closed | M | = G}

42

slide-43
SLIDE 43

Decidable theories

Let Σ = (Ω, Π) be a signature.

M: class of Σ-algebras. T = Th(M) is decidable iff there is an algorithm which, for every closed first-order formula φ, can decide (after a finite number of steps) whether φ is in T or not. F: class of (closed) first-order formulae. The theory T = Th(Mod(F)) is decidable iff there is an algorithm which, for every closed first-order formula φ, can decide (in finite time) whether F | = φ or not.

43

slide-44
SLIDE 44

Examples

Undecidable theories

  • Th((Z, {0, 1, +, ∗}, {≤}))
  • Peano arithmetic
  • Th(Σ-alg)

44

slide-45
SLIDE 45

Peano arithmetic

Peano axioms: ∀x ¬(x + 1 ≈ 0) (zero) ∀x∀y (x + 1 ≈ y + 1 → x ≈ y (successor) F[0] ∧ (∀x (F[x] → F[x + 1]) → ∀xF[x]) (induction) ∀x (x + 0 ≈ x) (plus zero) ∀x, y (x + (y + 1) ≈ (x + y) + 1) (plus successor) ∀x, y (x ∗ 0 ≈ 0) (times 0) ∀x, y (x ∗ (y + 1) ≈ x ∗ y + x) (times successor) 3 ∗ y + 5 > 2 ∗ y expressed as ∃z(z = 0 ∧ 3 ∗ y + 5 ≈ 2 ∗ y + z)

Intended interpretation: (N, {0, 1, +, ∗}, {≈, ≤}) (does not capture true arithmetic by Goedel’s incompleteness theorem)

45

slide-46
SLIDE 46

Examples

Undecidable theories

  • Th((Z, {0, 1, +, ∗}, {≤}))
  • Peano arithmetic
  • Th(Σ-alg)

Idea of undecidability proof: Suppose there is an algorithm P that, given a formula in one of the theories above decides whether that formula is valid. We use P to give a decision algorithm for the language {(G(M), w)|G(M) is the G¨

  • delisation of a TM M that accepts the string w }

As the latter problem is undecidable, this will show that P cannot exist.

46

slide-47
SLIDE 47

Examples

Undecidable theories

  • Th((Z, {0, 1, +, ∗}, {≤}))
  • Peano arithmetic
  • Th(Σ-alg)

Idea of undecidability proof: (ctd) (1) For Th((Z, {0, 1, +, ∗}, {≤})) and Peano arithmetic: multiplication can be used for modeling G¨

  • delisation

(2) For Th(Σ-alg): Given M and w, we create a FOL signature and a set of formulae over this signature encoding the way M functions, and a formula which is valid iff M accepts w.

47

slide-48
SLIDE 48

Examples

In order to obtain decidability results:

  • Restrict the signature
  • Enrich axioms
  • Look at certain fragments

48

slide-49
SLIDE 49

Examples

In order to obtain decidability results:

  • Restrict the signature
  • Enrich axioms
  • Look at certain fragments

Decidable theories

  • Presburger arithmetic decidable in 3EXPTIME [Presburger’29]

Signature: ({0, 1, +}, {≈, ≤}) (no ∗) Axioms { (zero), (successor), (induction), (plus zero), (plus successor) }

  • Th(Z+)

Z+ = (Z, 0, s, +, ≤) the standard interpretation of integers.

49

slide-50
SLIDE 50

Examples

In order to obtain decidability results:

  • Restrict the signature
  • Enrich axioms
  • Look at certain fragments

Decidable theories

  • The theory of real numbers (with addition and multiplication)

is decidable in 2EXPTIME [Tarski’30]

50

slide-51
SLIDE 51

Examples

In order to obtain decidability results:

  • Restrict the signature
  • Enrich axioms
  • Look at certain fragments

51

slide-52
SLIDE 52

Problems

T : first-order theory in signature Σ; L class of (closed) Σ-formulae Given φ in L, is it the case that T | = φ? Common restrictions on L Pred = ∅ {φ ∈ L | T | = φ} L={∀xA(x) | A atomic} word problem L={∀x(A1∧ . . . ∧An→B) | Ai, B atomic} uniform word problem Th∀Horn L={∀xC(x) | C(x) clause} clausal validity problem Th∀,cl L={∀xφ(x) | φ(x) unquantified} universal validity problem Th∀ L={∃xA1∧ . . . ∧An | Ai atomic} unification problem Th∃ L={∀x∃xA1∧ . . . ∧An | Ai atomic} unification with constants Th∀∃

52

slide-53
SLIDE 53

T -validity vs. T -satisfiability

T -validity: Let T be a first-order theory in signature Σ Let L be a class of (closed) Σ-formulae Given φ in L, is it the case that T | = φ? Remark: T | = φ iff T ∪ ¬φ unsatisfiable Every T -validity problem has a dual T -satisfiability problem: T -satisfiability: Let T be a first-order theory in signature Σ Let L be a class of (closed) Σ-formulae ¬L = {¬φ | φ ∈ L} Given ψ in ¬L, is it the case that T ∪ ψ is satisfiable?

53

slide-54
SLIDE 54

T -validity vs. T -satisfiability

Common restrictions on L / ¬L

L ¬L {∀xA(x) | A atomic} {∃x¬A(x) | A atomic} {∀x(A1∧ . . . ∧An→B) | Ai, B atomic} {∃x(A1∧ . . . ∧An∧¬B) | Ai, B atomic} {∀x Li | Li literals} {∃x L′

i | L′ i literals}

{∀xφ(x) | φ(x) unquantified} {∃xφ′(x) | φ′(x) unquantified} validity problem for universal formulae ground satisfiability problem

54

slide-55
SLIDE 55

T -validity vs. T -satisfiability

Common restrictions on L / ¬L

L ¬L {∀xA(x) | A atomic} {∃x¬A(x) | A atomic} {∀x(A1∧ . . . ∧An→B) | Ai, B atomic} {∃x(A1∧ . . . ∧An∧¬B) | Ai, B atomic} {∀x Li | Li literals} {∃x L′

i | L′ i literals}

{∀xφ(x) | φ(x) unquantified} {∃xφ′(x) | φ′(x) unquantified} validity problem for universal formulae ground satisfiability problem In what follows we will focus on the problem of checking the satisfiability

  • f conjunctions of ground literals

55

slide-56
SLIDE 56

T -validity vs. T -satisfiability

T | = ∀xA(x) iff T ∪ ∃x¬A(x) unsatisfiable T | = ∀x(A1 ∧ · · · ∧ An → B) iff T ∪ ∃x(A1 ∧ · · · ∧ An ∧ ¬B) unsatisfiable T | = ∀x(n

i=1 Ai ∨ m j=1 ¬Bj)

iff T ∪ ∃x(¬A1 ∧ · · · ∧ ¬An ∧ B1 ∧ · · · ∧ Bm) unsatisfiable

T -satisfiability vs. Constraint Solving The field of Constraint Solving also deals with satisfiability problems But be careful:

  • in Constraint Solving one is interested if a formula is

satisfiable in a given, fixed model of T .

  • in T -satisfiability one is interested if a formula is

satisfiable in any model of T at all.

56