• Keine Ergebnisse gefunden

Updates to Intensional and Derived Knowledge

6.4 Formal Specification of Updates

6.4.2 Updates to Intensional and Derived Knowledge

Whileinsert,delete, andupdateonly effect the graph (the ABox and TBox of the knowledge base), the definition of assertand retracthas 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 theoryT h and a graphGis 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 &

GandT h=T h(G), thenGis a minimal graph. 2

Definition 6.4 (Inverse Properties)

IfT h(G∪(x, r, y))|= (y, r, x) thenr is the inverse property of r. 2

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

a) Neither assertnorretract 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 bedeleted. If this state-ment has to beretracted, 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 likeowl:inverseOfas class constructors. Therefore, thedelete oper-ation should always be sufficient for the specificoper-ation of an update of the TBox. The same is true forinsertoperations 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 transitivefamily:hasAncestorrelationship:

(:Peter family:hasAncestor :Susan) (:Susan family:hasAncestor :Mary). It can be deduced that:Maryis:Petersancestor. Retracting the inferred statement (:Peter family:hasAncestor :Mary) is only possible by removing both of the explicit state-ments followed by inserting the positiveand 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 graphGand an ABox statements= (x, y, z). Now consider a setU of ABox updates toGsuch thatT h(U(G))|=s.

U is a minimal set of updates with respect to the assertion of sto Gif for all U

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

Two sets of updatesU1 andU2 are equivalent if T h(U1(G)) =T h(U2(G))

A setU ={U1, U2, . . . , Um}of minimal sets of updates isunambiguous iff allUi

are equivalent.

Consider the setU ={U1, U2, . . . , Un}of all minimal sets of updates with respect to the assertion ofsto Gsuch that allUi ∈ U are sets of ABox updates. If U is unambiguous then letUG,s+m:=U.

IfUG,s+mis defined forG, sandUG,s+m6=∅thensis an assertable statement toG.

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

assert : s× G → G

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

2

Note that ∅ is the only minimal set of updates with regard toassert(s, G) ifT 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 toU2 ={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 ofs.

Definition 6.6 (Retract)

Consider again a graphGand an ABox statement s= (x, y, z). Now setsU of ABox updates toGare considered such thatT h(U(G))6|=s.

U is a minimal set of updates with respect to the retraction ofs fromGif for allU

ifU &U thenT h(U(G))|=s.

Consider the setU ={U1, U2, . . . , Un}of all minimal sets of updates with respect to the retraction ofsfromGsuch that allUi∈ U are sets of ABox updates. If U is unambiguous then letUG,s−m:=U.

IfUG,s−mis defined for G,s and UG,s−m6=∅ then sis retractable from G. For the retraction of s from G, any U from UG,sm can be chosen. The signature and definition ofretract are:

retract : s× G → G

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

2

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

This is achieved by the use of triggers whichcomplete 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 inSwan, which allow torealiseintensional updates as defined byassert andretract.

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