6.2 CC Model for OWL Knowledge Bases
6.2.6 Higher Level Conflicts
The notion of conflicting transactions, defined for our SI-based protocol in terms of dis- jointness of sets is the basis to coordinate concurrent access to OWL knowledge bases. In addition, there are two higher level types of situations that can impair correctness. In short, they are owing to syntactic redundancies in OWL and its DL-based seman- tics. The first indirectly represents a transaction conflict that can be detected only by taking into account the higher semantic level of OWL syntactic instances. By handling the second type of conflict one can ensure that satisfiability of a KB is preserved for in- terleaved transactions. We call them Expression Conflict (E) and Satisfiability Conflict (S). The conflict of operations as defined byDefinition 6.4shall be (O) in this categorization. It is important to understand that E and S conflicts are a consequence of the specifics of OWL, not the specifics of the SI-based CC protocol. Therefore, they have to be con- sidered independent of the actual CC protocol used.
What is more, E and S conflicts cannot occur, in general, for reads and updates on annotations and entity declarations. The reason is that both are outside the underlying
DL theory nor are there syntactic redundancies on either of them. Consequently, we do not need to pay attention to them subsequently.
Expression Conflict
There can be situations where two transactions operate on OWL syntactic instances, say
ψ1, ψ2, which are structurally different but which are semantically (logically) equivalent. In other words, given two distinct data items diOWLψ1 , diOWLψ2 one cannot generally con- clude that the syntactic instances ψ1, ψ2are not logically equivalent. Formally, there can be cases in which
ψ1⇔ ψ2 while diOWLψ1 6=di
OWL
ψ2
and where ⇔ stands for logical equivalence. With the machinery introduced thus far, these transactions would not O-conflict because their OWL data items are distinct. The semantic equivalence of ψ1, ψ2, however, implies the need to treat them as the same. Such equivalences can exist for syntactic sugar constructs available in OWL, which are motivated by the wish to allow for more concise knowledge descriptions. Also, in OWL there is redundancy in the set of concept constructors (e.g., the negation constructor ObjectComplementOf allows to eliminate conjunctions in favor of disjunctions by using negation). Example 6.3 illustrates these semantic equivalencies for different types of axioms, assertions, and concept expressions.
Example 6.3
(a) The following axiom
ψ1 =DisjointUnion(:Parent :Mother :Father) and the axioms
ψ2 =EquivalentClasses(:Parent ObjectUnionO f(:Mother :Father))
ψ3 =DisjointClasses(:Mother :Father)
are clearly structurally different. Hence, they have distinct OWL data items and two transactions can never O-conflict. However, at the higher semantic level ψ1is equivalent to ψ2, ψ3because ψ1is a syntactic shortcut expressing the same knowl- edge than ψ2, ψ3together.
(b) This is analogously the case for the individual assertions
ψ4= Di f f erentIndividuals(:OSIRIS :ISIS :HORUS)
ψ5= Di f f erentIndividuals(:OSIRIS :ISIS)
ψ6= Di f f erentIndividuals(:ISIS :HORUS) .
ψ4is again a concise form of ψ5, ψ6.
(c) The following concept expressions are logically equivalent (De Morgan’s law).
ψ7 =ObjectComplementO f(ObjectIntersectionO f(A B))
Again, ψ7, ψ8are not structurally equivalent, thus, would have distinct OWL data items. This can analogously occur for universally and existentially quantified con- cept restrictions (ObjectAllValuesFrom, ObjectSomeValuesFrom) or cardinality con- cept expressions, e.g., an exact cardinality restriction is a shortcut of a minimum and maximum cardinality restriction.
An E-conflict can be detected by pre-processing OWL syntactic instances that are parameters of the basic operations and transforming them into a syntactic normal form. The normalized forms are then used for standard O-conflict analysis while retaining, of course, the actual operation. This leads us to the following formal definition of expres- sion conflicts between operations in a schedule.
Definition 6.6(Expression Conflict). Let o1(ψ1), o2(ψ2)be two operations in a history H that would O-conflict according toDefinition 6.4 if ψ1, ψ2were structurally equivalent. Let Nf be a normalization procedure that transforms an OWL syntactic instance ψ into its normalized form Nf(ψ)and that preserves logical equivalence (ψ ⇔ Nf(ψ)). Then, o1, o2E-conflict w.r.t. H iff o1(Nf(ψ1)), o2(Nf(ψ2))O-conflict w.r.t. H.
Notice herein that we assume every pair of operations within a transaction not to E- conflict, which is a reasonable sanity assumption that one would want to make anyway on applications that generate transactions.
From Definition 6.6we can easily derive the criterion for an E-conflict under the SI protocol.
Definition 6.7 (SI Expression Conflict). Let T1, T2 be two transactions and δ(T1), δ(T2) their change sets, respectively. Let Nf be a normalization procedure that transforms a change set
δ(T)into a normalized change set δNf(T) such that each OWL syntactic instance ψ occurring
in δ(T)is substituted by its normalized form Nf(ψ)in δNf(T). Then, T1, T2E-conflict iff their normalized change sets are not disjoint δNf(T1) ∩δNf(T2) 6=∅.
There are several types of normal forms of which some of them can be used only for a subset of OWL. Concept expressions (using Boolean connectives, cardinality re- strictions, or existential/universal quantifiers) can be normalized to Negation Normal Form (NNF). More precisely, a complex concept is in NNF iff negation (¬) occurs only in front of atomic concepts. NNF is obtained by applying De Morgan laws to push ¬
inward (e.g.,¬(CuD) ⇔ ¬Ct ¬D). Other candidates for concept expressions are the Disjunctive Normal Form (DNF), the Conjunctive Normal Form (CNF), or the Prenex Normal Form. A role is in Inverse Normal Form iff inverse applies only to the role name; that is,(R−)− is transformed to R. Finally, normalization of syntactic sugar constructs (e.g., Example 6.3(a) and (b)) is a simple rule-based rewriting function systematically transforming them into a set of equivalents. These rules can easily be derived from OWL’s structural specification [MPSP09].
Normalization is rather cheap in terms of computational time complexity. For in- stance, NNF is linear in the size (number of terms) of concept expressions [HNSS90]. On the other hand, some normal forms can grow exponential in space. CNF and DNF may increase a concept expression of n terms in worst-case to 2nterms due to the distributive
law.6 Normalization for some n-ary syntactic sugar constructs (e.g., DifferentIndividuals, DisjointClasses) is polynomial in space, otherwise it is linear (e.g., SameIndividuals, Equiv- alentClasses). Conversely, normalization can also involve simplifications, for instance, factoring out tautologies.
Satisfiability Conflict
In general, if contradictory knowledge is added to a KB Kthen it becomes unsatisfiable; that is, there exists no modelI that satisfies all axioms in the TBox and assertions in the ABox (seeDefinition 3.6). Recap, reasoning is no longer meaningful in this case because one can conclude anything from false premises. This is a general concern regardless of whether K is updated concurrently or not. It can be avoided by a guard mechanism that analyzes and rejects updates which would result in an unsatisfiable KB (see Sec- tion 3.1.5). In other words, this mechanism preserves consistency at DL level. In case of concurrent access, however, it is no longer sufficient to analyze updates made by an application in isolation; that is to say, concurrent access necessitates combined analysis of concurrent transactions.Example 6.4illustrates this.
Example 6.4
Given an OWL KBW and its core KBK, consider the transactions T1 =a(DisjointClasses(:A :B)) c and
T2 =a(ClassAssertion(:I1 :A)) a(ClassAssertion(:I1 :B)) c .
It is assumed that K is initially consistent, that T1, T2 start from the same state (snap- shot) of W, and that :A and :B are already declared as concepts inW. Then, T1, T2 do neither O-conflict nor E-conflict because syntactic instances are normalized and struc- turally different; hence, both can commit. If both commit then Kbecomes inconsistent at DL level afterwards: the individual named :I1 cannot be both an instance of :A and :B since the concepts were declared to be disjoint. This is due to the fact that the knowledge represented by the updates of T1, T2contradicts each other.
An S-conflict is consequently the situation where the execution of two or more op- erations of different transactions leads to inconsistency of the KB, which is formally expressed by the following definition.
Definition 6.8(Satisfiability Conflict). Let o1, . . . , on, n≥2 be each either an add or a delete operation in a history H. Then o1, . . . , on S-conflict w.r.t. H iff the operations are from at least two different transactions T1, T2 that are interleaved in H and commit of T1, T2 leads to an unsatisfiable KB.
A similar assumption to E-conflicts is made here: within a transaction there is no S-conflict. It is equally reasonable to assume that a transaction T generated by an appli- cation is itself consistent, meaning that if KT is the result of executing T on the empty KB thenKT is satisfiable (consistent).
6For example, the following non-DNF concept expression having 2 terms is normalized in DNF to a concept expression having 4 terms:(C1tC2) u (C3tC4) ⇔ (C1uC3) t (C1uC4) t (C2uC3) t (C2uC4).
Also, note that in case of OWL an S-conflict can only occur when new syntactic in- stances are added but not for deletion. This is a consequence of the fact that the DL
S ROI Q(D) underlying OWL 2 (and also any sublanguage such as the DLs underly-
ing the profiles EL, QL, RL) is monotonic (see Observation 3.1). We could therefore safely drop the delete operation fromDefinition 6.8. In other words,Definition 6.8is a generalization including non-monotonic DLs.
An S-conflict can be detected under the SI protocol by extending the guard mecha- nism to take into account local changes of a transaction T and the updates of meanwhile committed transactions, which essentially means to analyze changesets.
Definition 6.9(SI Satisfiability Conflict). Let T1be a transaction assigned with a start times- tamp tT1
s and a commit timestamp tTc1. Let S be the initial set of syntactic instances in an OWL KB W visible at the time when T1 starts (snapshot of T1) and whose core KB K is satisfiable. Let AT1 be the set of syntactic instances added by T1. Let T2 be a transaction that committed
in the interval[tT1
s , tTc1]and AT2 (DT2) the set of syntactic instances that were added to (deleted
from)W by T2. Then, T1S-conflicts with T2iff the resulting set S0 = (S\DT2) ∪AT2∪AT1 represents an OWL KBW0 whose core KBK0is not satisfiable.
If DL consistency needs to be preserved then T1 commits successfully only if the updated core KB K0 is satisfiable. In the general case there might be any amount of transactions Ti (i ≥ 0) which committed in the interval [tTs1, tcT1]. Let A = SATi and
D =S
DTi be the set of added/deleted syntactic instances by these transactions in this interval. Then, T1 commits successfully only if(S\D) ∪A∪ AT1 represents an OWL
KBW0whose core KBK0 is satisfiable.
Depending on the expressivity used inK, satisfiability checking has worst-case poly- nomial complexity for tractable OWL profiles EL, QL, RL, exponential complexity for highly expressive OWL DL, up to the point – OWL Full – where it is undecidable in gen- eral (seeSection 3.3.3). Checking for satisfiability conflicts can, therefore, be expensive compared to the other two types of conflicts.