Proof of completeness of the SCIFF proof

Proof of completeness of the SCIFF
proof-procedure
Marco Gavanelli, Evelina Lamma, and Paola Mello
May 30, 2005
Abstract
This document provides the proof of completeness of the SCIFF proofprocedure.
1
Introduction
The completeness of SCIFF proof-procedure was defined in Deliverable D8 [2],
together with the operational semantics of the proof-procedure.
For the sake of completeness, we report the declarative semantics, that will
be useful in the following proofs.
1.1
Declarative semantics
In the following we give semantics to a society instance by identifying sets of
expectations which, together with the society’s knowledge base and the happened events, imply an instance of the goal - if any - and satisfy the integrity
constraints.
For notion of integrity constraint satisfaction we rely, in the following, upon
a notion of entailment in a three-valued logic, since more general and capable of
dealing with both open and closed society instances. Therefore, in the following,
the symbol |= has to be interpreted as the notion of entailment in a three-valued
setting.
Furthermore, in this section, we consider negative literals of the kind ¬H()
as new positive literals that have no definition in each open society instance. For
closed society instances, we use Clark’s completion of the history, Comp(HAP),
and negation is interpreted in the Closed World Assumption (CWA).
Throughout this section, for the sake of simplicity, we always consider a
ground version of society’s knowledge base and integrity constraints, and do not
consider CLP-like constraints.
We first recall the concept of IC S -consistent set of social expectations. Intuitively, given a society instance, a IC S -consistent set of social expectations
consists of a set of expectations about social events that are compatible with P
(i.e., the SOKB and the set HAP), and with IC S .
1
Definition 1. (IC S -consistency) Given a (closed/open) society instance SHAP ,
an IC S -consistent set of social expectations ∆ is a set of expectations such that:
SOKB ∪ HAP ∪ ∆ |= IC S
(1)
In definition 1 (and in the following definitions 4, 5, 6 and 7), for open
instances we refer to a three-valued completion where only the history of events
has not been completed. Therefore, for open instances,
SOKB ∪ HAP ∪ ∆ |= IC S
is a shorthand for:
Comp(SOKB ∪ ∆) ∪ HAP ∪ CET |= IC S
where Comp() is three-valued completion [3] and CET Clark’s equational theory.
MarcoG]Il simbolo |= è overloaded. Non si fa un po confusione? Si potrebbero usare due simboli? For closed instances, instead,
SOKB ∪ HAP ∪ ∆ |= IC S
is a shorthand for:
Comp(SOKB ∪ ∆ ∪ HAP) ∪ CET |= IC S
since also the history of events (closed) needs to be completed.
Among IC S -consistent sets of expectations, we are interested in those which
are also consistent with respect to E-consistency and ¬-consistency.
Definition 2. (E-consistency) A set of social expectations ∆ is E-consistent
if and only if for each (ground) term p:
{E(p), NE(p)} 6⊆ ∆
Definition 3. (¬-consistency) A set of social expectations ∆ is ¬-consistent
if and only if for each (ground) term p:
{E(p), ¬E(p)} 6⊆ ∆
and
{NE(p), ¬NE(p)} 6⊆ ∆
Given a closed (respectively, open) society instance, a set of expectations is
called closed (resp. open) admissible if it satisfies Definitions 1, 2 and 3, i.e. if
it is IC S -, E- and ¬-consistent.
Definition 4. (Fulfillment) Given a (closed/open) society instance SHAP , a
set of social expectations ∆ is fulfilled if and only if for each (ground) term p:
HAP ∪ ∆ ∪ {E(p) → H(p)} ∪ {NE(p) → ¬H(p)} 6 f alse
2
(2)
Notice that Definition 4 above requires, for a closed instance of a society, that
each positive expectation in ∆ has a corresponding happened event in HAP,
and each negative expectation in ∆ has no corresponding happened event. This
requirement is weaker for open instances, where a set ∆ is not fulfilled only when
a negative expectation occurs in the set, but the corresponding event happened
(i.e., the implication NE(p) → ¬H(p) is false).
Symmetrically, we define a violation:
Definition 5. (Violation) Given a (closed/open) society instance SHAP , a
set of social expectations EXP is violated if and only if there exists a (ground)
term p such that:
HAP ∪ ∆ ∪ {E(p) → H(p)} ∪ {NE(p) → ¬H(p)} f alse
(3)
Finally, we give, in the following, the notion of goal achievability and achievement.
Definition 6. Goal achievability Given an open instance of a society, SHAP ,
and a ground goal G, we say that G is achievable (and we write SHAP ≈∆ G) iff
there exists an (open) admissible and fulfilled set of social expectations ∆, such
that:
SOKB ∪ HAP ∪ ∆ G
(4)
(which, as explained earlier, is a shorthand for Comp(SOKB ∪ ∆) ∪ HAP ∪
CET |= G).
Definition 7. Goal achievement Given a closed instance of a society, SHAP ,
and a ground goal G, we say that G is achieved (and we write SHAP ∆ G) iff
there exists a (closed) admissible and fulfilled set of social expectations ∆, such
that:
(5)
SOKB ∪ HAP ∪ ∆ G
(i.e., Comp(SOKB ∪ HAP ∪ ∆) ∪ CET |= G).
2
Completeness
The following two theorems state the completeness properties, respectively for
the open and closed case.
Theorem 1. Open Completeness. Given an open society instance SHAP , and
a (ground) goal G, for any set of ground expectations, ∆ = EXP ∪ FULF,
G with an expectation answer
such that SHAP ≈∆ G then ∃∆′ such that S∅ ∼HAP
∆′
(∆′ , σ) such that ∆′ σ ⊆ ∆.
3
Completeness in the open case states that if goal G is achievable in an open
society instance under the expectation set ∆, then an open successful derivation
can be obtained for G, possibly computing a set ∆′ of the expectations whose
grounding (according to the expectation answer) is a subset of ∆.
Theorem 2. Closed Completeness. Given a closed society instance SHAP , a
(ground) goal G, for any set of ground expectations, ∆ = EXP ∪ FULF such
that SHAP |=∆ G then ∃∆′ such that S∅ ⊢HAP
G with an expectation answer
∆′
(∆′ , σ) such that ∆′ σ ⊆ ∆.
Completeness in the closed case states that if goal G is achieved in a closed
society instance under the expectation set ∆, then a closed successful derivation
can be obtained for G, possibly computing a set ∆′ of the expectations whose
grounding (according to the expectation answer) is a subset of ∆.
First, we extend some lemmas that have been used for the proof of soundness
in order to be applicable to completeness as well.
2.1
Lemmas
PaoloT]author: Marco Gavanelli
As we did for soundness, we relate the treatment of disequality as done in
SCIFF and IFF proof-procedures. We give the following lemma, that can be
considered the correspondent, for completeness, of Lemma 1 in the proof of
soundness [1, pag 14].
Lemma 1. The SCIFF proof procedure deals with disequalities in the Constraint
Store [2]. The IFF proof procedure transforms a disequality A 6= B into an
implication A = B → f alse.
Consider a program for which the IFF proof-procedure is confluent [4]. Consider a derivation DI1 for the IFF. (Since IFF is confluent, we can consider
another IFF derivation with a different order of application of transitions that
provides the same abductive answer.)
Then, there exists a derivation DI2 for the IFF that leads to the same node
of DI1 such that whenever a rule is applicable to an implication A = B → f alse
it is applied. In such a case, each time one or more transitions are applied to
an implication A = B → f alse, there exist one or more transitions in SCIFF
applicable to A 6= B that lead to the same node.
Proof. Consider an implication A = B → f alse in the IFF proof-procedure.
Remember that case analysis is not applicable to such an implication1 [4], be1 In
fact, quoting Xanthakos [4, pag. 61]:
Note that applying case analysis on a disequality in a node N is redundant,
because it produces only a node that is identical to N and a second node which,
after applying equality rewriting, is a failure one. Therefore, without any loss,
we disallow the application of case analysis on disequalities.
It is, however, applicable to implications whose body is a conjunct of equalities, in fact A =
1, B = 2 → f alse can generate the two nodes A = 1 ∧ [B = 2 → f alse] and A = 1 → f alse
none of which is redundant.
4
cause that would be non terminating. Thus, the only applicable transitions are
those of equality rewriting. Let us consider each of such transitions.
• Replaces f (t1 , . . . , tj ) = g(s1 , . . . , sl ) with f alse whenever f and g are
distinct or j 6= l.
In such a case, application of the rule gives f alse → f alse which is rewritten into true by logical simplification.
The SCIFF proof procedure has the following rule that is applicable and
gives the same result:
Replace f (t1 , . . . , tj ) 6= g(s1 , . . . , sl ) with true whenever f and g are distinct or j 6= l.
• Replace f (t1 , . . . , tj ) = f (s1 , . . . , sj ) with t1 = s1 ∧ · · · ∧ tj = sj .
I.e., A = f (t1 , . . . , tj ) and B = f (s1 , . . . , sj ). Application of this rule leads
to a node t1 = s1 ∧ · · · ∧ tj = sj → f alse.
We obtain another disequality, to which other rules are applicable.
– if j = 1, the IFF applies equality rewriting and obtains t1 = s1 →
f alse. SCIFF generates a node t1 6= s1 .
– if j > 1, the IFF can apply case analysis j − 1 times and obtain
[t1 = s1 → f alse] ∨ · · · ∨ [tj = sj → f alse]. SCIFF generates
[t1 6= s1 ] ∨ · · · ∨ [tj 6= sj ].
For the other rules of equality rewriting of the IFF the proof is trivial.
2.2
IFF-like Rewritten Program
The proof of completeness will be given by exploiting corresponding results of
the IFF proof procedure with respect to three-valued completion semantics. To
this end, as we did for soundness, we map SCIFF programs into IFF-like programs, and then prove that for each IFF derivation (that also fulfills the requirement of the declarative semantics of SCIFF, like E-consistency, ¬-consistency,
and fulfillment), there exists a SCIFF derivation leading to a corresponding
terminal node. Relying on the completeness of the IFF proof-procedure, for
each abductive answer, there exists a derivation that computes it (or a set of
abducibles that is a subset of it).
We first give the proof of soundness in a restricted set of instances. The
proof will be extended in future work to more general cases.
The set of restrictions are the following.
No universally quantified variables in abducibles. We give the proof of
completeness for instances in which the abductive answer does not contain
universally quantified abducibles. In such a case, we prove that there is
a SCIFF derivation without universally quantified abducibles that corresponds to the declarative semantics.
5
No ¬H. We take for simplicity the case without ¬H literals in the Social Integrity Constraints.
Static history. We first give the proof for a given history; the extension for the
dynamic case (that will rely on the Lemma 8 of [1]) will be given in future
work. This is the same schema we applied for termination and soundness
proofs.
We report the definition of the IFF rewritten program, given in the proof
of soundness [1]. It is the first step to map a correspondence between IFF and
SCIFF derivations. As we did in the proof of soundness, we will substitute
universally quantified variables with constants. This is meaningful, because
from IFF completeness we know that the abductive answer (declarative) will be
a superset of the extracted answer (operational). Since the abductive answer
does not contain universally quantified abducibles by previous assumption, we
know that there cannot be an extracted answer containing the newly introduced
constant symbols.
The allowedness condition for integrity constraints of the IFF proof procedure requires that every variable in the conclusion occurs in the condition. This
cannot be the case in our social integrity constraints. However, as discussed in
[1], we can transform our IC S into a new set of integrity constraints satisfying the allowedness condition. We give a simple example in the following. An
integrity constraint of kind
H(p(X)) → E(q(Z))
is not allowed since a new variable (Z) occurs in the conclusion. But, it can be
transformed into the (IFF-like) integrity constraint:
H(p(X)) → a
and the definition:
a ← E(q(Z))
which are both allowed.
Definition 8. Given an instance of a society knowledge base hSOKB∪HAP, E, IC S i,
we define the IFF rewritten program hSOKB ∗ ∪ HAP, E, IC ∗S i as follows:
• For each icS ∈ IC S that does not satisfy the allowedness condition of the
IFF proof procedure, we rewrite it as explained earlier.
• For each icS ∈ IC S with a universally quantified variable X occurring in
the head of a social integrity constraint but not in the body, X is replaced
in the corresponding ic∗S in IC ∗S with a constant symbol not occurring
elsewhere.
• In the same way, for each clause in SOKB with a variable X which is
universally quantified in the Body of the clause, X is replaced in SOKB ∗
with a new constant symbol.
6
• In the same way, for each atom in the goal G with a variable X which is
universally quantified, X is replaced in G∗ with a new constant symbol.
• All ¬H atoms are considered as a new predicate without definition (i.e.,
always false). H events in the history are considered as a predicate in the
SOKB ∗ .
• We complete the SOKB with the Clark’s completion to obtain SOKB ∗ .
• We add to the set IC ∗S the integrity constraints for E-consistency and
¬-consistency [2, page 163], i.e.
E(X), NE(X) → f alse
E(X), ¬E(X) → f alse
NE(X), ¬NE(X) → f alse.
(6)
Notice that, by construction, given a set of abduced atoms ∆ (not containing
universally quantified atoms), and an open history for the society, the set of
atoms that are true in the rewritten program and in the original society instance
are the same.
Lemma 2. For every finite ground set ∆ ⊆ E (non containing universally
quantified variables and) non containing the new constant symbols introduced in
SOKB ∗ ,
SOKB ∗ ∪ HAP ∪ ∆ |= a ⇔ SOKB ∪ HAP ∪ ∆ |= a
and
SOKB ∗ ∪ HAP ∪ ∆ |= IC ∗S ⇔ SOKB ∪ HAP ∪ ∆ |= IC S
where the symbol |= stands for the three-valued completion semantics.
Proof. The syntax imposes that only abducible atoms can be universally quantified in the Body of a clause. Thus, the body of a clause
a ← [∀X p(X)]
(where p is a predicate symbol, in our case, only NE and ¬NE), is true if and
only if there exists an atom ∀Y p(Y ) ∈ ∆, or if for every possible ground atom A
with functor p, A ∈ ∆, which is not, because ∆ is finite and ground. Thus, the
body of any clause containing universally quantified variables is false in SOKB.
The corresponding rewritten clause is
a ← p(c)
where c is a new constant symbol. The body of this clause can be true only if
∆ contains p(c) or p(X) for some variable X, which is not.
The proof is similar for the universally quantified atoms occurring in the
goal, or in the IC S .
Moreover, atoms ¬H are all false in the rewritten program. In the original
society instance, since it is open, atoms ¬H are new positive literals without
definition, so they are false as well.
7
MarcoG]1 apr 05: Potremmo dimostrare che esiste un ordine di applicazione
delle transizioni (completeness non strong). Quindi anche per happening: se
lo dimostriamo con history statica, poi potremmo dire che esiste un ordine di
applicazione (quello che esegue prima tutte hli happening) che ci riconduce alla
statica.
2.3
Proof of open completeness: case without universally
quantified abducibles
We consider the case of a (possibly non-ground) goal, expectation sets without
universally quantified variables, and do not consider CLP constraints in the
program.
By the following Lemma 3, we prove that for this class of programs, any IFF
successful derivation on the IFF-like rewritten program such that the conditions
of the SCIFF declarative semantics are respected, has a counterpart in a SCIFF
open successful derivation.
Lemma 3. Let SHAP be hSOKB, E, IC S i. Let hSOKB ∗ ∪ HAP, E, IC ∗S i be
the correspondent IFF-like rewritten program.
Let (∆, σ) be an answer computed by the IFF on the rewritten program
hSOKB ∗ ∪ HAP, E, IC ∗S i. Let ∆ not contain any constant symbol introduced in
the IFF rewritten program. Since the IFF is sound, there exists a corresponding
abductive answer.MarcoG]We could state it better. Should we talk about models?
Let such an abductive answer satisfy conditions of definitions 2 (E-consistency),
3 (¬-consistency), and 4 (fulfillment) considering the history not completed2 .
Then, there exists a SCIFF open successful derivation such that (∆, σ) is an
extracted answer for SHAP .
Proof. We build a successful SCIFF derivation from the given IFF derivation, by
mapping every step except equality rewriting into itself. For equality rewriting,
we proved (Lemma 1) that it is complete.
Propagation is slightly different in the IFF and in the SCIFF proof procedures: in the SCIFF it also performs a copy of the abducible. The only difference stands in the case of universally quantified variables in abduced atoms (in
fact, copy does not perform anything significant if the atom does not contain
universally quantified variables). Since we assume that the IFF derivation does
not generate atoms with the new constant symbols introduced in the IFF-like
rewritten program, then the SCIFF proof-procedure will not generate literals with universally quantified variables. Therefore, copy has no effect on the
derivation in this case.
After the application of the IFF-like transitions, other transitions (those
additional transitions of the SCIFF) may be applicable. Such transitions may
cause a failure: thus, even if the IFF derivation succeeds, the SCIFF may
fail. Let us consider the added transitions and prove that the possible failures
correspond to instances of violation, E-inconsistency, or ¬-inconsistency.
2 This is coherent with the fact that the history is open: there is no closed world assumption
on the set of happened events.
8
1. Non-happening transition cannot occur because of the previous assumptions;
2. Violation NE, from a node containing two atoms H(X) and NE(Y ) generates two nodes. In one node, it imposes the equality X = Y and fails.
Such a node is obviously a node of violation (we have a H literal that
matches a NE expectation).
In the other node, the disequality X 6= Y is introduced, which may lead to
failure. By Lemma 1, the disequality corresponds to an IFF disequality,
i.e., an implication X = Y → f alse. Since the IFF proof-procedure is
complete, we can say that in this branch logically X 6= Y . Since, logically,
X = Y ∨ X = Y → f alse is a tautology, we have that the SCIFF branch
will fail if and only if the corresponding IFF derivation fails as well.
3. Violation E is not applicable in the open case.
4. Happening transition is not considered, because the history is not dynamically evolving.
5. Closure generates two nodes. In the first, the history becomes closed, so
we will not consider it for the open successful derivation. The second is
identical to the father, so the fact that the derivation fails does not depend
on the application of closure. Notice that, due to the definition of closure,
the derivation nevertheless terminates, as proven in [1].
6. Fulfillment generates two nodes: one with an equality and one with a
disequality. Thus, the same considerations given for transition Violation
NE can be applied.
Finally, after application of one of the new transitions, other transitions may
become applicable as well. This is not the case, because
• the new transitions can (possibly) add only disequalities
• we assumed that the constraint solver only contains the rules for equality
and disequality, and the behaviour of such rules (as proven in Lemma 1
and [1, Lemma 1]) is similar to the behaviour of the IFF for an implication
A = B → f alse
• disequality cannot cause3 other transitions.
We can now prove Open Completeness (stated in Theorem 1) in the case
without universally quantified abducibles
3 For
a definition of cause, see [4, 1].
9
Proof. of Theorem 1
Let us consider a goal G, which is true in an open society
SHAP ≈∆ G
such that ∆ does not contain universally quantified variables. Let (∆′ , σ) be
the SCIFF abductive answer.
As noted earlier, this goal will also be true for the IFF in the rewritten
program, i.e., hSOKB ∗ ∪ HAP, E, IC ∗S i will have as IFF abductive answer the
same (∆, σ) abductive answer.MarcoG]A me non sembra cosı̀ ovvio, ma per ora
lasciamo cosı̀. Ad es, noi nel rewritten program intruduciamo delle variabili (per
la allowedness degli IC)? Non dovremmo considerare un binding in σ per quelle
variabili?
By IFF completeness, there exists an IFF derivation from which an answer
(∆′ , σ) can be extracted, such that ∆′ ⊆ ∆.
Since SHAP ≈∆ G holds, the expectations in ∆ are fulfilled. Thus, the computed answer (∆′ , σ) is fulfilled (in fact, if a set of expectations is fulfilled, any
subset of it will be fulfilled as well). Also, since IC ∗S contains the integrity constraints of equations (6), E and ¬-consistency will hold because of soundness of
the IFF. Thus, Lemma 3 is applicable, so there exists an open successful derivation that corresponds to the IFF derivation such that (∆′ , σ) is a computed
answer for SCIFF.
2.4
Proof of closed completeness: case without universally
quantified abducibles
We consider the case of a (possibly non-ground) goal, expectation sets without
universally quantified variables, and do not consider CLP constraints in the
program.
We follow the same scheme used for proving the open completeness. Namely,
we extend Lemma 3 to Lemma 4, for the closed case.
Lemma 4. Let SHAP be hSOKB, E, IC S i. Let hSOKB ∗ ∪ HAP, E, IC ∗S i be
the correspondent IFF-like rewritten program.
Let (∆, σ) be an answer computed by the IFF on the rewritten program
hSOKB ∗ ∪ HAP, E, IC ∗S i. Let ∆ not contain any constant symbol introduced in
the IFF rewritten program. Since the IFF is sound, there exists a corresponding
abductive answer.MarcoG]We could state it better. Should we talk about models?
Let such an abductive answer satisfy conditions of definitions 2 (E-consistency),
3 (¬-consistency), and 4 (fulfillment) considering the history completed.
Then, there exists a SCIFF closed successful derivation such that (∆, σ) is
an extracted answer for SHAP .
Proof. As for the open case, we build a closed successful SCIFF derivation from
the given IFF derivation, by mapping every step except equality rewriting into
itself. For equality rewriting, we proved (Lemma 1) that it is complete.
10
For the other transitions, the proof is identical to the open case, except for
the following:
1. Non-happening transition cannot occur because of the previous assumptions;
2. Violation E is applicable in the closed case only if an E expectation is
not fulfilled, which is not the case, since, by hypothesis, the condition of
Definition 4 holds with the history completed.
3. Closure generates two nodes. Of course, we will take the node in which
the history becomes closed. After that, the history becomes closed and
closure is not applicable anymore.
We can now prove Closed Completeness (stated in Theorem 2) in the case
without universally quantified abducibles.
Proof. of Theorem 2 Let us consider a goal G, which is true in a closed society
SHAP |=∆ G
such that ∆ does not contain universally quantified variables. Let (∆′ , σ) be
the SCIFF abductive answer.
As noted earlier, this goal will also be true for the IFF in the rewritten
program, i.e., hSOKB ∗ ∪ HAP, E, IC ∗S i will have as IFF abductive answer the
same (∆, σ) abductive answer.MarcoG]A me non sembra cosı̀ ovvio, ma per ora
lasciamo cosı̀. Ad es, noi nel rewritten program intruduciamo delle variabili (per
la allowedness degli IC)? Non dovremmo considerare un binding in σ per quelle
variabili?
By IFF completeness, there exists an IFF derivation from which an answer
(∆′ , σ) can be extracted, such that ∆′ ⊆ ∆.
Since SHAP |=∆ G holds, the expectations in ∆ are fulfilled. Thus, the
computed answer (∆′ , σ) is fulfilled (in fact, if a set of expectations is fulfilled,
any subset of it will be fulfilled as well). Also, since IC ∗S contains the integrity
constraints of equation (6), E and ¬-consistency will hold because of soundness
of the IFF. Thus, Lemma 4 is applicable, so there exists a closed successful
derivation that corresponds to the IFF derivation such that (∆′ , σ) is a computed
answer for SCIFF.
3
Extension for the dynamic case
Completeness can be informally seen as a statement that there exists a derivation
such that a conclusion drawn in the declarative semantics can also be derived
by the operational semantics.
11
Extending completeness for the dynamic case is trivial: in fact, starting from
an empty history, one can apply Happening transition until the final history is
obtained, and then add the transitions given in the previous proofs for the static
case.
There also exists strong completeness, that can be seen as completeness together with confluence: for every possible order of application of the transitions,
it is possible to derive the conclusions drawn in the declarative semantics.
Proving such a property in the dynamic case is still work in progress.
References
[1] M. Gavanelli, E. Lamma, and P. Mello. Proof of properties of the SCIFF
proof-procedure. Deliverable IST32530/DIFERRARA/410/D/I/b1, SOCS
Consortium, Dec 2004.
[2] M. Gavanelli, E. Lamma, P. Torroni, P. Mello, K. Stathis, P. Moraı̈tis,
A. C. Kakas, N. Demetriou, G. Terreni, P. Mancarella, A. Bracciali, F. Toni,
F. Sadri, and U. Endriss. Computational model for computees and societies
of computees. Technical report, SOCS Consortium, 2003. Deliverable D8.
[3] K. Kunen. Negation in logic programming. In Journal of Logic Programming,
volume 4, pages 289–308, 1987.
[4] I. Xanthakos. Semantic Integration of Information by Abduction. PhD thesis,
Imperial College London, 2003.
12