Logic for Computer Scientists/Predicate Logic/SATCHMO

From testwiki
Jump to navigation Jump to search

SATCHMO

The SATCHMO Theorem Prover was one of the first systems which used model generation, i.e. a bottom-up proof procedure. The prover was given by a small Prolog-program, which implements a tableau proof procedure. One restriction is that it requires range restricted formulae.

Definition 30

A first order clause A1AnB1Bm is called range restricted if every variable which occurs in the head A1An occurs in the body B1Bm as well.

  1. Convert clauses to range restricted form:
    q(x)p(x,y)q(x)q(X);p(X,Y)<q(X),dom(Y)
  2. assert range-restricted clauses and dom clauses in Prolog database.
  3. Call satisfiable:
kill satisfiable :-    assume(X) :- asserta(X).     
       (Head <- Body)            assume(X) :-  
       Body, not Head, !,          retract(X), !, fail.  
       component(HLit, Head),      component(E, (E ; _)).      
       assume(HLit),               component(E, (_ ; R)) :-    
       not false,                   !, component(E, R).   
       satisfiable.                component(E, E).  
  satisfiable.

First-Order completeness via Level-Saturation modification. This proof procedure implements Hyper Tableaux in the ground case.

Hyper Tableau - Ground Case

All open branches consist of positive literals only Take the following clause set as an example {A,B,ABCD,ABED,AC}

Definition 31 (Literal tree, Clausal Tableau)

A literal tree is a pair (t,λ) consisting of a finite, ordered tree t and a labeling function λ that assigns a literal to every non-root node of t.

The successor sequence of a node N in an ordered tree t is the sequence of nodes with immediate predecessor N, in the order given by t.

A (clausal) tableau T of a set of clauses 𝒮 is a literal tree (t,λ) in which, for every successor sequence N1,,Nn in t labeled with literals K1,,Kn, respectively, there is a substitution σ and a clause {L1,,Ln}𝒮 with Ki=Liσ for every 1in. {K1,,Kn} is called a tableau clause and the elements of a tableau clause are called tableau literals.

Definition 32 (Branch, Open and Closed Tableau, Selection Function)

A branch of a tableau T is a sequence N0,,Nn (n0) of nodes in T such that N0 is the root of T, Ni is the immediate predecessor of Ni+1 for 0i<n, and Nn is a leaf of T. We say branch b=N0,,Nn is a prefix of branch c, written as bc or cb, iff c=N0,,Nn,Nn+1,,Nn+k for some nodes Nn+1,,Nn+k, k0. The branch literals of branch b=N0,,Nn are the set lit(b)={λ(N1),λ(Nn)}. We find it convenient to use a branch in place where a literal set is required, and mean its branch literals. For instance, we will write expressions like Ab instead of Alit(b).

In order to memorize the fact that a branch contains a contradiction, we allow to label a branch as either open or em closed. A tableau is closed if each of its branches is closed, otherwise it is open.

A selection function is a total function f which maps an open tableau to one of its open branches. If f(T)=b we also say that b is selected in T by f.

Note that branches are always finite, as tableaux are finite. Fortunately, there is no restriction on which selection function to use. For instance, one can use a selection function which always selects the "leftmost" branch.

Definition 33 (Hyper Tableau - Ground Case)

Let S be a finite set of clauses and f be a selection function. Hyper tableaux for S are inductively defined as follows:
Initialization step: A one node literal tree is a hyper tableau for S. Its single branch is marked as "open".

Hyper extension step: If

  1. T is an open hyper tableau for S, f(T)=b (i.e. b is selected in T by f) with open leaf node N, and
  2. C=A1,,AmB1,,Bn is a clause from S (m0, n0), called extending clause in this context, and
  3. such that {B1,,Bn}b (referred to as hyper condition)

then the literal tree T is a hyper tableau for S, where T is obtained from T by attaching m+n child nodes M1,,Mm,N1,,Nn to b with respective labels


A1,,Am,¬B1,,¬Bn


and marking every new branch (b,M1),,(b,Mm) with positive leaf as "open", and marking every new branch (b,N1),,(b,Nn) with negative leaf as "closed".

Minimal Model Reasoning

The clause set M={AB,BA} obviously has two different models: {A,B} and {B}. Under set inclusion these models can be compared and there are some tasks where it is appropriate to compute the (or in general a) smallest one. This is for example the case with

  • Knowledge Representation, Circumscription
  • Basis for default negation (GCWA)
  • Applications: Deductive database updates, Diagnosis

There are basically two different methods to compute minimal models.

Minimal Model Reasoning – Niemel¨a’s Approach

Given a set of ground clauses M the methods applies a model generating procedure, e.g. hyper tableau, which is able to generate all models.

Lemma 1: For every minimal model p for M there is a branch with literals p.

Assume that Σ is the set of atoms, which occur in the head of a clause from M, than the following Lemma holds.

Lemma 2: p is a minimal model for M iff M{¬AAΣp}p

This offers a general method: Generate model candidates, and test with Lemma 2.

p={A,B} is not a minimal model in our example from above, because M{}{A,B} iff M{AB} is unsatisfiable, which is not the case, hence p does not correspond to a minimal model and hence the branch is closed.

p={B} is minimal because M{A}{B} iff M{A}{B} is unsatisfiable. This is the case and hence p is minimal and the branch remains open.

Properties: Soundness (by Lemma 2) Completeness (by Lemma 1), space efficiency.

Minimal Model Reasoning – Bry& Yayha‘s Approach

As an example we have the set M={ABC,BA,DB}


Lemma: With complement splitting, the leftmost open branch is a minimal model for M.

General method: Repeat: generate minimal model p, add p to M. Properties: Soundness (by Lemma) Completeness as before, possibly exponentially many new clauses p.

Template:BookCat