Adding ternary complex roles to ALCRP(D) A.Kaplunova, V. Haarslev, R.Möller University of Hamburg, Computer Science Department Vogt-Kölln-Str. 30, 22527 Hamburg, Germany Abstract The goal of this paper is to introduce the description logic ALCRP 3 (D). This logic is based on the DL ALCRP(D) extended by a ternary role-forming predicate operator and by inverse roles. In order to be able to define a compositional semantics for ALCRP 3 (D), which supports n-ary relations, we introduce a DLR-style syntax. For simplicity and from the viewpoint of the applicability in practice, only ternary relations will be discussed. The paper discusses syntactic restrictions on concepts and roles to ensure decidability of the language. 1 Motivation Description logics (DLs) provide terminological reasoning about abstract domain objects. However, reasoning about objects from other domains (concrete domains) is very important for practical applications as well. One important class of applications is, for example, the class of Geographic Information Systems (GIS). In this context, for modeling spatiotemporal terminological knowledge, the description logic ALCRP(D) has been developed (see [5]). Intuitively speaking, with ALCRP(D) spatial relations such as connected can be represented as so-called complex roles based on predicates of a concrete domain. The appropriate integration of such roles into a description logic leads to more expressive power, as illustrated with examples using the topological relations from RCC-8 theory [8]. However, ALCRP(D) supports only binary complex roles and cannot be used for representing ternary qualitative spatial relations (e.g., for specifying spatial knowledge about orientation). By extending ALCRP(D) to a logic with ternary complex roles we achieve more expressive power and practical use in the context of spatial reasoning. For practical GIS applications, in many cases qualitative spatial knowledge is available, i.e. reasoning about qualitative spatial relations has to be appropriately integrated with terminological reasoning. In this paper we consider two formalisms which play an important role in the field: Frank s cardinal direction calculus [2] and Freksa s relative orientation calculus [3]. Both calculi deal with different aspects of spatial reasoning. In [6] it has been shown that combining both calculi is not a trivial task. Indeed, [6] presents a specific calculus (called ccoa) for the combination of Frank s cardinal directions with a weaker variant of Freksa s relative orientation calculus. Hence, the result of [6] is that in some situations the canonical combination operator for concrete domains [5] cannot be applied. The concrete domain ccoa consists of predicates which describe qualitative spatial relationships between 2D objects. In particular, it refers to binary predicates using a West-East-South-North reference system and ternary predicates based on a left-straight-right partition of the plane in order to represent the position of an object w.r.t. a reference object and a parent object (see Figure 1, left). The atomic predicates for both description formalisms are described as follows. Definition 1 (Cardinal Directions Algebra, CDA) Let P and R be points on the 2D plane. We call P the parent object and R the reference object. The following binary predicates describe the position of R relative to P using a West-East-South-North coordinate
North North-West North-East West East South-West South-East South CDA br cr R lr bw rr cp P bp ROA dd R, P de Hamburg RightmostFHC Luebeck Berlin Wismar Figure 1: Base relations of CDA and ROA and an example. system: N NE E SE S SW W NW Eq(P, R) meaning R lies to the north, northeast, east, southeast, southwest, west, northwest of P, or R is equal to P, respectively. Definition 2 (Relative Orientation Algebra, ROA) Let P, R and O be points on the 2D plane. Let P R be a directed line segment. P R connects the parent object P with the reference object R and divides the plane into three partitions: left, straight and right. Then, the following predicates are used to describe the position of the third object O relative to the line segment P R: lr rr bp br cp cr bw de dd(p, R, O) with the intuitive meaning O is to the left or right of the line P R, O lies on the P R behind P or behind R, O coincides with P or R, O lies on P R between P and R, degenerate equal (O coincides with P and R), or degenerate distinct (P coincides with R and O is distinct from P and R). For the full definition of these relations we refer to [6]. Relations between concrete objects, i.e., spatial objects, are defined by ccoa predicates. However, the idea is also to relate abstract objects with roles based on predicates from the concrete domain. Then, it is possible to quantify over roles representing spatial relationships. Basically, this has been achieved with the logic ALCRP(D). We extend the approach to ternary roles and corresponding predicates. In the same way as in ALCRP(D), abstract objects are related to concrete objects via functional roles (features). The relation between abstract objects based on concrete domain predicates can be declared with the help of roleforming (binary or ternary) predicate operators. The following example demonstrates that reasoning w.r.t. adequately designed knowledge bases using ternary spatial predicates allows for the automatic discovery of, for instance, possible inconsistencies. As an example we propose to describe spatial knowledge about locations of Hansa cities as shown in Figure 1, to the right. Qualitative spatial knowledge is assumed to be available from a certain data source (e.g., acquired by a Web robot). Although Figure 1 might suggest the availability of quantitative knowledge (i.e., coordinates), in particular in the Web context it is appropriate to consider a scenario where, for instance, quantitative knowledge is not available or may be expensive to acquire. In order to represent terminological knowledge from the domain, we assume two concepts F ree Hansa City and Rightmost F ree Hansa City. Using the predicates of ccoa these concepts can be related in an adequate way. For instance, we declare the concept Rightmost F ree Hansa City as a subconcept of F ree Hansa City with the additional restriction there is no other F ree Hansa City located to the northwest, west or southwest. In the example presented in Figure 1, Hamburg is a free Hansa city, Luebeck is the rightmost free Hansa city, and Berlin is known as to be southeast of Luebeck. Furthermore, W ismar is known to be to the left of a line from Luebeck to Berlin, and also to the right of a line from Hamburg to Luebeck. Now, by also postulating that W ismar is a F ree Hansa City the knowledge base becomes inconsistent. In fact, due to the assumptions described above, Hamburg is to the left of Luebeck and, therefore, W ismar is located in the marked area as shown in Figure 1. But then, W ismar must be a free Hansa city which is to
the right of Luebeck. This indicates that Luebeck cannot be the rightmost free Hansa city, or, contrary to the last postulation about W ismar, W ismar cannot be a free Hansa city. The inconsistency cannot be recognized without properly reflecting the semantics of binary and ternary spatial relationships in the context of a description logic. Before details of the example are formalized, the paper introduces the syntax and semantics of the description logic ALCRP 3 (D). Then, syntactic restrictions are discussed that guarantee the decidability of the language. 2 The Description Logic ALCRP 3 (D) The main part of the syntax and semantics of the description logic ALCRP 3 (D) is taken from [5] and is rewritten using a DLR-like syntax, which provides for the means to denote relations of any arity. The syntax and semantics of the logic DLR is given in [1]. Although one might think that the DLR syntax is quite complex for humans to read, it provides for a compositional semantics in the context of n-ary relations. The DL ALCRP 3 (D) incorporates a concrete domain which is defined as follows. Definition 3 (Concrete domain) A concrete domain D consists of a pair ( D, Φ D ), where D is a set called the domain, and Φ D is a set of predicate names. Each predicate name P is associated with an arity n and an n-ary predicate P D ( D ) n. Given such predicate name P Φ D, P denotes the negation of P, which is associated with the arity n and the n-ary predicate P D = ( D ) n \ P D. Definition 4 (Admissibility of the concrete domain) A concrete domain D is admissible if (i)the set of its predicate names is closed under negation and contains a name D for D (the negation of the predicate D is denoted as D ); and (ii) the satisfiability problem for finite conjunctions of predicates is decidable. Definition 5 (ALCRP 3 (D) role terms) Let R and F be disjoint sets of role and feature names, respectively. 1. Any element of R F is an atomic role term (of arity 2). 2. A composition of features (written f 1... f k, where f i F) is called a feature chain (of arity 2). A simple feature is considered as a feature chain of length 1. 3. If C is a concept term (see below), i is an integer denoting the i-th component of the n-ary relation (n 1), then the following expression is a primitive role term (of arity n): $i/n : C. 4. If P Φ D is the name of a predicate with arity n + m, and u 1,..., u n, v 1,..., v m are feature chains, then the expression (u 1,..., u n )(v 1,..., v m ).P is a complex role term of arity 2 (also called a roleforming binary predicate operator). 5. If P Φ D is the name of a predicate with arity n + m + k, and u 1,..., u n, v 1,..., v m, w 1,..., w k are feature chains, then the expression (u 1,..., u n )(v 1,..., v m )(w 1,..., w k ).P is a complex role term of arity 3 (role-forming ternary predicate operator). Let RN be a role name and let R be a role term. Then RN. = R is a terminological axiom. This type of terminological axiom is also called a role definition.
Definition 6 (ALCRP 3 (D) concept terms) 1. If C is a set of concept names which is disjoint from R and F, then any element of C is an atomic concept term; 2. If C and D are concept terms, R is a role term of arity m, P Φ D is a predicate name with arity n, f is a feature and u 1,..., u n are feature chains, then the following expressions are also concept terms: C (negation) C D (conjunction) C D (disjunction) u 1,..., u n.p (predicate exists restriction) [$i]r (m-ary role exists restriction, 1 i m) 3. We define and as abbreviations for C C and C C respectively. Concepts and roles may be put in parentheses. Let CN be a concept name and C a concept term. Then CN. = C and CN C are terminological axioms as well. The terminological axiom CN. = C is also called a concept definition and the axiom CN C is called a primitive concept definition. Definition 7 (Terminological axioms, TBox) A finite set of terminological axioms (role and concept definitions) T is called a terminology, or TBox, if the left hand sides of all terminological axioms in T are unique and all definitions are acyclic. The semantics of ALCRP 3 (D) is based on set theory and is defined as follows. Definition 8 (ALCRP 3 (D) interpretation) Let D = ( D, Φ D ) be a concrete domain. An interpretation I = ( I, D, I) consists of a set I (the abstract domain), a set D (the domain of the concrete domain D) and an interpretation function I. The sets D and I must be disjoint. The interpretation function I must satisfy the following restrictions: - each concept name C from C is mapped to a subset C I of I ; - each role name R from R of arity n is mapped to a subset R I of ( I ) n ; - each feature name f from F is mapped to a partial function f I from I to D I, where f I (a) = x will be written as (a, x) f I ; and - each predicate name P from Φ D with arity n is mapped to a subset P I of ( D ) n. If u = f 1... f n is a feature chain, then u I denotes the composition f I 1... f I n of the partial functions f I 1,..., f I n. Let C, D be concept terms, R be a role term, f be a feature name, u 1,..., u n, v 1,..., v m, w 1,..., w k be feature chains and P be a predicate name. The interpretation function is extended to arbitrary concept and role terms as follows: I n ( I ) n ( C) I := I \ C I (C D) I := C I D I (C D) I := C I D I ( u 1,..., u n.p ) I := {a I x 1,..., x n D : (a, x 1 ) u I 1... (a, x n ) u I n (x 1,..., x n ) P D } ( (u 1,..., u n )(v 1,..., v m ).P ) I := {(a, b) I I x 1,..., x n, y 1,..., y m D : (a, x 1 ) u I 1... (a, x n ) u I n (b, y 1 ) v I 1... (b, y m ) v I m (x 1,..., x n, y 1,..., y m ) P D } ( (u 1,..., u n )(v 1,..., v m )(w 1,..., w k ).P ) I := {(a, b, c) I I I x 1,..., x n, y 1,..., y m, z 1,..., z k D : (a, x 1 ) u I 1... (a, x n ) u I n (b, y 1 ) v I 1... (b, y m ) v I m (c, z 1 ) w I 1... (c, z k ) w I k (x 1,..., x n, y 1,..., y m, z 1,..., z k ) P D }
( [$i]r) I := {d I (d 1,..., d n ) R I : d i = d} ($i/n : C) I := {(d 1,..., d n ) I n d i C I } An interpretation I is a model of a TBox T if it satisfies CN I = C I (CN I C I ) for all (primitive) concept definitions CN. = C (CN C) and RN I = R I for all role definitions RN. = R in T. Knowledge about specific individuals is represented by assertional axioms. Definition 9 (Assertional axioms, ABox) Let O A and O D be two disjoint sets of object names. Elements of O A are called abstract objects and elements of O D are called concrete objects. Let C be a concept term, R be a role term of arity n (atomic or complex), f be a feature name, P be a predicate name with arity n, a, b, d 1,..., d n be elements of O A and x, x 1, x 2,..., x n be elements of O D. An interpretation I for the concept language can be extended to the assertional language by additionally mapping every abstract object from O A to a single element of I and every concrete object from O D to a single element from D. The unique name assumption is not imposed, that is a I = b I may hold even if a b. An interpretation I satisfies an assertional axiom: a : C iff a I C I (concept assertion) (d 1,..., d n ) : R iff (d I 1,..., d I n) R I (n-ary role assertion, n 3) (a, b) : f iff f I (a I ) = b I (feature assertion) (a, x) : f iff f I (a I ) = x I (concrete domain feature assertion) (x 1,..., x n ) : P iff (x I 1,..., x I n) P D (predicate assertion) A finite set of assertional axioms is called an ABox. An interpretation is a model of an ABox A w.r.t. a TBox T iff it is a model of T and, furthermore, satisfies all assertional axioms in A. Definition 10 (Knowledge base) A knowledge base is a tuple (T, A), where T is a TBox and A is a ABox. An interpretation I is a model of a knowledge base (T, A) iff I is a model of T and A. Definition 11 (ABox consistency problem) An ABox is consistent w.r.t. a TBox T iff it has a model w.r.t. T. If an ABox is not consistent, it is called inconsistent. The ABox consistency problem is to decide whether a given ABox A is consistent w.r.t. a TBox T. For ALCRP 3 (D) we have chosen a DLR-style syntax because n-ary roles are supported. In particular, the syntax provides the expressivity of inverse roles. Since ALCRP 3 (D) is based on ALCRP(D), which is defined with an ALC-style syntax, we provide appropriate mappings for some ALCI terms. R.C [$1](R $2/2 : C) R.C [$2](R $1/2 : C) R.C [$1](R $2/2 : C) R.C [$2](R $1/2 : C) Here is an example of a valid ALCRP(D) concept and its equivalent representation in the ALCRP 3 (D) notation: ( (f)(g).p ).C [$1]( (f)(g).p $2/2 : C) Further examples are presented in the next section.
3 An Example with ALCRP 3 (D ccoa ) In the introduction we have discussed an application example concerning spatial relations. In particular, the ccoa calculus was introduced in order to formalize reasoning about cardinal directions and relative orientations using concrete domains. The concrete domain D ccoa is defined as follows. Definition 12 (Concrete domain D ccoa ) The concrete domain D ccoa is a tuple ( DcCOA, Φ DcCOA ), where DcCOA is the set of 2D points and the set Φ DcCOA consists of following predicates: A unary predicate is-point with is-point D ccoa = DcCOA and its negation is-no-point with is-no-point D ccoa =, a binary predicate inconsistent-cda-relation-p with inconsistent-cda-relation-p D ccoa =, and a ternary predicate inconsistent-roarelation-p with inconsistent-roa-relation-p D ccoa = The 9 basic binary predicates N-p, NE-p, E-p, SE-p, S-p, SW -p, W -p, NW -p, Eq-p, which correspond to the CDA relations and defined as follows. Let P and R be 2D points. Then (P, R) N-p D ccoa iff N(P, R),..., (P, R) Eq-p D ccoa iff Eq(P, R). For each set {p 1,... p n } of basic predicates from CDA, where n 2, a disjunctive binary predicate named p 1 -... -p n -p is defined as follows. (P, R) p 1 -... -p n -p D ccoa iff {p 1,..., p n }(P, R). To guarantee uniqueness of the predicate name for each disjunctive relation we suppose a predefined order on the basic relation names (e.g., N, NE, E, SE, S, SW, W, NW, Eq). The 9 basic ternary predicates lr-p, rr-p, bp-p, br-p, cp-p, cr-p, bw-p, de-p, dd-p, which correspond to the ROA relations and defined as follows. Let P, R and O be 2D points. Then (P, R, O) lr-p D ccoa iff lr(p, R, O),..., (P, R, O) dd-p D ccoa iff dd(p, R, O). We introduce for each set {p 1,... p n } of basic predicates from ROA a disjunctive ternary predicate named p 1 -... -p n -p. We say that (P, R, O) p 1 -... -p n -p D ccoa iff {p 1,..., p n }(P, R, O). Again, we assume a predefined order of ROA basic relation names (e.g., lr, rr, bp, br, cp, cr, bw, de, dd). Now we reconsider the example from Section 1 and write it down as a set of terminological and assertional axioms. Let the TBox contain the atomic concepts F ree Hansa City and Rightmost F ree Hansa City. Each abstract domain object is assumed to be associated with its concrete representation in the plane via a feature has position. RR. = (has position)(has position)(has position) rr-p $1/3 : $2/3 : $3/3 : LR. = (has position)(has position)(has position) lr-p $1/3 : $2/3 : $3/3 : SW -W e-nw. = (has position)(has position) SW -W e-nw -p $1/2 : $2/2 : SE. = (has position)(has position) SE-p $1/2 : $2/2 : Rightmost F ree Hansa City F ree Hansa City [$2](SW -W e-nw $1/2 : F ree Hansa City $2/2 : ) We represent the relations of the abstract individuals Hamburg, Luebeck, Berlin, W ismar to their concrete representations in the 2D plane as a set of assertional axioms. (Hamburg, pos Hamburg) : has position (Berlin, pos Berlin) : has position (Luebeck, pos Luebeck) : has position (W ismar, pos W ismar) : has position The following part of the ABox describes the spatial configuration depicted by Figure 1. (pos Hamburg, pos Luebeck, pos W ismar) : RR (pos Luebeck, pos Berlin, pos W ismar) : LR Luebeck : Rightmost F ree Hansa City (pos Berlin, pos Luebeck) : SE Hamburg : F ree Hansa City
Now, if the follow axiom is added, the ABox becomes inconsistent: W ismar:f ree Hansa City. The reason is that now W ismar is a free Hansa city which is located to the right of the rightmost free Hansa city, namely Luebeck. The inconsistency can be detected only if the semantics of both ternary and binary spatial relations is properly considered. Furthermore, the inconsistency result is only achieved if the ccoa calculus described in [6] is applied, i.e. considering the CDA and ROA calculi in isolation is not appropriate. As shown in [4] the consistency problem for ALCRP(D) ABoxes is undecidable. Since ALCRP 3 (D) is a superlogic of ALCRP(D), the ALCRP 3 (D) ABox consistency problem is undecidable as well. Therefore, in the next section we introduce restrictedness criteria for the syntactic combination of ALCRP 3 (D) concept and role terms. 4 Structural Restriction of ALCRP 3 (D) In the same spirit as for ALCRP(D), we introduce restrictedness criteria to ensure the finite model property of the logic [5]. Because in ALCRP 3 (D) inverse roles are implicitly provided (s.a.), we need, however, stronger restrictions compared to ALCRP(D) in order to avoid termination problems. In order to cope with inverse roles we define restrictions which are similar to those defined for ALCRP(D) (see [7]). Informally speaking, one may say that nesting of [$i]r and [$i]r subterms, where R is a complex (and restricted) role term, is not allowed. For the formal description of the restrictedness criteria, some additional definitions are required. Definition 13 (Negation Normal Form, NNF) A concept term is in negation normal form iff the negation sign occurs only in front of concept names or in front of [$i]r operators. Definition 14 (Transformation to NNF) Let the naming declarations be the same as in the definition 8. For a feature chain u i = f 1... f i of the length i(1 i n) let λ(u i ) and u i. be abbreviations for the following expressions, respectively: λ(u i ) = f 1. D f 1 f 2. D... f 1... f i 1. D u i. = [$1](f 1 $2/2 : [$1](f 2 $2/2 : [$1](... (f i 1 $2/2 : f i. D )...))) Every ALCRP 3 (D) concept term can be transformed to NNF by iteratively applying the following transformation rules to subterms until no rules are applicable. C C (C D) C D (C D) C D ( u 1,..., u n.p ) u 1,..., u n.p λ(u 1 )... λ(u n ) u 1.... u n. Definition 15 (Restricted role term) Let C, D and E be concept terms, and R be a role name from R. Let P be a predicate from the set of predicate names Φ D and u 1,..., u n, v 1,..., v m, w 1,..., w k be feature chains. Then, the following terms are called restricted role terms: R $1/2 : C $2/2 : D R $1/3 : C $2/3 : D $3/3 : E (u 1,..., u n )(v 1,..., v m ).P $1/2 : C $2/2 : D (u 1,..., u n )(v 1,..., v m )(w 1,..., w k ).P $1/3 : C $2/3 : D $3/3 : E Definition 16 (Unfolding w.r.t. TBox) A concept C is called to be unfolded w.r.t. a TBox T if all concept names and complex role names which occur on the right hand side of the definition of C are iteratively replaced by their definitions from T until no more substitutions are possible.
Definition 17 (Restricted concept term) A concept X is called restricted w.r.t. a TBox T iff after unfolding and transforming into NNF the following conditions are fulfilled: 1. All role terms in X are restricted. 2. Let Y be any subconcept of X of the form [$i]r. If Z is a subterm of R: Z = $j/n : C (j i), then [$j]r terms (j i) are not allowed in C. For example, if we have the subconcept Y = [$1](S $1/3 : C $2/3 : D $3/3 : E), then D and E must not contain any terms of the form [$2]R or [$3]R. 3. In a similar way we define the restriction for [$i]r subterms of X. Let Z be a subterm of R: Z = $j/n : C (j i). Then C must not contain any terms like [$j]r (j i). 4. Let Y be any subconcept of X of the form [$i]r or [$i]r. If Z is a subterm of R: Z = $j/n : C, then C contains no predicate exists restrictions. Definition 18 (Restricted terminology and restricted Abox) A terminology is called restricted iff all concept terms and role terms on the right-hand side of terminological axioms in T are restricted w.r.t. T. Similarly, an ABox A is restricted w.r.t. T iff T is restricted and all concept and role terms used in A are restricted w.r.t. T. 5 Conclusion In this paper we have presented a ternary extension of the DL ALCRP(D) motivated by a number of concrete domains, especially spatial domains. We demonstrated the need for ternary complex roles, for instance, in order to represent spatial knowledge about orientation. In addition, application examples demonstrated possible inconsistencies which would not occur if roles were not defined using (ternary) concrete domain predicates. In our current work we make investigations about a sound and complete algorithm to decide the consistency problem of restricted ALCRP 3 (D) ABoxes. References [1] D. Calvanese, G. De Giacomo, M. Lenzerini, D. Nardi, and R. Rosati. Description logic framework for information integration. In Proc. of the 6th Int. Conf. on the Principles of Knowledge Representation and Reasoning (KP 98), pages 2 13, 1998. [2] A. U. Frank. Qualitative spatial reasoning with cardinal directions. In Proc. of the Austrian Conference on Artificial Intelligence, pages 157 167, 1991. [3] C. Freksa. Using orientation information for qualitative spatial reasoning. In A. U. Frank, I. Campari, and U. Formentini, editors, Proc. of the International Conference on Theories and Methods of Spatio-Temporal Reasoning in Geographic Space, Berlin, 1992. Springer Verlag. [4] V. Haarslev, C. Lutz, and R. Möller. Foundations of spatioterminological reasoning with description logics. In Proceedings of Sixth International Conference on Principles of Knowledge Representation and Reasoning, pages 112 123, 1998. [5] V. Haarslev, C. Lutz, and R. Möller. A description logic with concrete domains and a role-forming predicate operator. Journal of Logic and Computation, 9:351 384, 1999. [6] A. Isli, V. Haarslev, and R. Möller. Combining cardinal direction relations and relative orientation relations in qualitative spatial reasoning. Technical report fbi-hh-m-304/01, LKI, University of Hamburg, Computer Science Department, 2001. [7] C. Lutz. The Complexity of Reasoning with Concrete Domains. PhD thesis, Teaching and Research Area for Theoretical Computer Science, RWTH Aachen, 2001. [8] D.A. Randell, Z. Cui, and A.G. Cohn. A spatial logic based on regions and connections. In Principles of Knowledge Representation and Reasoning, pages 165 176, 1992.