• No results found

Updates to Intensional and Derived Knowledge

6.4 Formal Specification of Updates

6.4.2 Updates to Intensional and Derived Knowledge

While insert, delete, and update only effect the graph (the ABox and TBox of the knowledge base), the definition of assert and retract has to consider changes to the knowledge base. In the following, updates to a knowledge base are examined with respect to the theory.

Definition 6.2 (Theory of a Graph G)

The relationship between a theory T h and a graph G is defined for closed for-mulae ϕ if

T h(G) = {ϕ : T h |=OW Lϕ} 2

Definition 6.3 (Minimal Graph)

Let G be any graph and T h := T h(G). If there is no G such that G &

G and T h = T h(G), then G is a minimal graph. 2

Definition 6.4 (Inverse Properties)

If T h(G ∪ (x, r, y)) |= (y, r, x) then r is the inverse property of r . 2

For the definition of updates to the knowledge base the following restrictions are introduced:

a) Neither assert nor retract are allowed to perform changes on the TBox.

b) A theory update consists of minimal changes (according to a minimal changes semantics as described below).

No Changes to the TBox. Retract and assert operations are only defined for statements of the ABox. There are two reasons for this restriction.

- First, consider again Example 6.6 where the deletion of the statement (:Susan family:hasChild :Peter) was not possible. That statement is derived and does not exist as a base fact, hence, it cannot be deleted. If this state-ment has to be retracted, there are, theoretically, two possibilities: either delete the ABox statement (:Peter family:hasParent :Susan) or the TBox statement (family:hasMother owl:inverseOf family:hasChild). The deletion of the former is reasonable because the statements are closely related and the deletion reflects the intention of the update operation. A deletion of the other statement would also come to the desired result, but it would, at the same time, cause the removal of all other (derived) statements that make use of the inverse nature of that property definition.

- Intensional updates to the TBox can hardly be achieved. For an ABox, there are situations where a deleted statement can be reconstructed by derivation from another statement. There is no comparable situation for

TBoxes. This can be explained by the fact that there are no bidirectional axioms like owl:inverseOf as class constructors. Therefore, the delete oper-ation should always be sufficient for the specificoper-ation of an update of the TBox. The same is true for insert operations on the TBox.

Hence, assert and retract operations are defined for ABox updates only.

Updates to the TBox have to be explicitly defined by insert or delete operations.

Minimal Updates. The restriction of effects of updates to minimal changes is proposed in order to prevent extensive changes to the TBox caused by the-ory updates. For example, consider a transitive family:hasAncestor relationship:

(:Peter family:hasAncestor :Susan) (:Susan family:hasAncestor :Mary). It can be deduced that :Mary is :Peters ancestor. Retracting the inferred statement (:Peter family:hasAncestor :Mary) is only possible by removing both of the explicit state-ments followed by inserting the positive and the negative disjunction of the two statements (one does definitely exist, but not the two of them). This disjunc-tion can be expressed in an OWL ontology, but it involves massive changes to the TBox: Two statements can be defined to be mutually exclusive only by constructing complex TBox assertions in form of disjoint classes from named individuals (nominals).

Definition 6.5 (Assert)

Consider a graph G and an ABox statement s = (x, y, z). Now consider a set U of ABox updates to G such that T h(U (G)) |= s.

U is a minimal set of updates with respect to the assertion of s to G if for all U

if U& U then T h(U(G)) 6|= s.

Two sets of updates U1 and U2 are equivalent if T h(U1(G)) = T h(U2(G))

A set U = {U1, U2, . . . , Um} of minimal sets of updates is unambiguous iff all Ui

are equivalent.

Consider the set U = {U1, U2, . . . , Un} of all minimal sets of updates with respect to the assertion of s to G such that all Ui ∈ U are sets of ABox updates. If U is unambiguous then let UG,s+m:= U.

If UG,s+mis defined for G, s and UG,s+m6= ∅ then s is an assertable statement to G.

For the assertion of s to G any U from UG,s+mcan be chosen. The signature and definition of assert are:

assert : s × G → G

(s, G) 7→ U (G) for some U ∈ UG,s+m

2

Note that ∅ is the only minimal set of updates with regard to assert(s, G) if T h(G) |= s.

Note also that despite the fact that sets of minimal updates can be equiv-alent there might be a preferable set of minimal updates. For example, U1 = {ins(x, r, y)} is equivalent to U2 = {ins(y, r−1, x)}. If, however, r is the pred-icate of the statement s that is to be asserted then U1 is preferred over U2

because it is closer to the intention of s.

Definition 6.6 (Retract)

Consider again a graph G and an ABox statement s = (x, y, z). Now sets U of ABox updates to G are considered such that T h(U (G)) 6|= s.

U is a minimal set of updates with respect to the retraction of s from G if for all U

if U & U then T h(U(G)) |= s.

Consider the set U = {U1, U2, . . . , Un} of all minimal sets of updates with respect to the retraction of s from G such that all Ui∈ U are sets of ABox updates. If U is unambiguous then let UG,s−m:= U.

If UG,s−m is defined for G,s and UG,s−m6= ∅ then s is retractable from G. For the retraction of s from G, any U from UG,sm can be chosen. The signature and definition of retract are:

retract : s × G → G

(s, G) 7→ U (G) for some U ∈ UG,s−m

2

The next chapter will deal with the actual realisation of these operations.

This is achieved by the use of triggers which complete the intensional update.

RDF-Triggers:

An Active RDF-Database

7.1 Motivation

In Section 6.4.2 the problems of knowledge base updates have been analysed formally. Furthermore, the semantics of the theory update operations assert and retract were given. This chapter describes the concept of knowledge base triggers in Swan, which allow to realise intensional updates as defined by assert and retract.

The presence of intensional data poses additional problems in comparison to simple graph updates. For example, consider a situation where an action de-mands for the deletion of facts from the knowledge base. What if that knowledge does not exist explicitly but only as derived facts? This situation is illustrated with the next example:

: P e t e r f a m i l y : h a s P a r e n t : Susan .

f a m i l y : h a s C h i l d owl : i n v e r s e O f f a m i l y : h a s P a r e n t .

The following statement is entailed by the knowledge base but it is not contained in the underlying graph:

: Susan f a m i l y : h a s C h i l d : P e t e r .

Hence, the statement cannot be removed from the graph by directly deleting it. This can only be achieved by the retract operation. The intensional update itself, however, does not specify what update on the graph level has actually to be carried out. Rather, it specifies the desired result. Therefore, intensional updates have to be completed. This means that update operations have to be performed instead of or in addition to the intensional update. For example, instead of retracting (:Susan family:hasChild :Peter) the statement (:Peter fam-ily:hasPartent :Susan) should be deleted. The completion of intensional updates can be realised by knowledge base triggers.

93