Academia.eduAcademia.edu

Pellet system description

2006, Proc. of the Int. Workshop on Description Logics, DL

Proceedings of the 2006 International Workshop on Description Logics DL’06 May 30 – June 1, 2006 Lake District, United Kingdom Edited by Bijan Parsia, Ulrike Sattler, and David Toman Preface Welcome to the 2006 International Workshop on Description Logics, DL’06, in the Lake District, UK, May 30–June 1, 2006. The workshop continues the long-standing tradition of international workshops devoted to discussing developments and applications of knowledge representation formalisms and systems based on Description Logics. The list of the International Workshops on Description Logics can be found at http://dl.kr.org. There were 38 papers submitted to DL’06 each of which was reviewed by at least three members of the program committee or additional reviewers recruited by the PC members. In addition to the presentation of the accepted papers, posters, and demos the following speakers agreed to give invited talks at the workshop: • Franz Baader: Description Logics: a personal history • Anthony Hunter: Living with Inconsistency: Theory + Applications The organizers and participants of the Description Logics 2006 workshop gratefully acknowledge the support of Cerebra (cerebra.com) that helped to provide reduced registration fees for students, and the University of Manchester for providing logistical support, in particular with registration. Our thanks go to all the authors for submitting to DL, and to the invited speakers, PC members, and all additional reviewers who made the technical programme possible. The organization of the workshop also greatly benefited from the help of many people at the University of Manchester, in particular Sam Creighton for helping with all the invitation letters for visas, and Bernardo Cuenca Grau, Hector Perez-Urbina and Birte Glimm for helping with the local organization. Finally, we would like to acknowledge that the work of the PC was greatly simplified by using the EasyChair conference management system (www.easychair.org) developed by Andrei Voronkov. Bijan Parsia, Ulrike Sattler, and David Toman Description Logics 2006 PC chairs and organizers i Programme Committee Carlos Areces, INRIA Lorraine, France Giuseppe De Giacomo, Università di Roma ”La Sapienza”, Italy Enrico Franconi, Free University of Bozen-Bolzano, Italy Volker Haarslev, Concordia University, Quebec, Canada Ian Horrocks, University of Manchester, UK Ralf Küsters, Christian-Albrechts-Universitt zu Kiel, Germany Carsten Lutz, Technical University Dresden, Germany Ralf Möller, Hamburg University of Technology, Germany Bijan Parsia, University Of Maryland, College Park, USA Peter Patel-Schneider, Bell Laboratories, USA Ulrike Sattler, University of Manchester, UK David Toman, University of Waterloo, Canada Chris Welty, IBM Watson Research Center, USA Frank Wolter, University of Liverpool, UK Additional Reviewers Alex Borgida Sebastian Brandt Diego Calvanese Xi Deng Sofia Espinosa Birte Glimm Daniel Gorin Christian Halaschek-Wiener Jan Hladik Aditya Kalyanpur Alissa Kaplunova Atila Kaya Sergio Mera Maja Miličić Boris Motik Hsueh-Ieng Pai Boontawee Suntisrivaraporn Stephan Tobies Dmitry Tsarkov Anni-Yasmin Turhan Dirk Walther Grant Weddell Michael Wessel Michael Zakharyaschev Hui Zhang Evgeny Zolin ii Contents I Long Papers 1 Conjunctive Query Answering for Description Logics with Transitive Roles. Birte Glimm, Ian Horrocks and Ulrike Sattler . . . . . . . . . . 3 Efficient Reasoning in EL+. Franz Baader, Carsten Lutz and Boontawee Suntisrivaraporn . . 15 DL Actions with GCIs: a Pragmatic Approach. Hongkai Liu, Carsten Lutz, Maja Miličić and Frank Wolter . . 27 . . . . 39 Epistemic First-order Queries over Description Logic Knowledge Bases. Diego Calvanese, Giuseppe De Giacomo, Domenico Lembo, Maurizio Lenzerini and Riccardo Rosati . . . . . . . . . . . . . . . . 51 Data Complexity of Answering Unions of Conjunctive Queries in SHIQ. Magdalena Ortiz, Diego Calvanese and Thomas Eiter . . . . . . 62 PSPACE Automata for Description Logics. Jan Hladik and Rafael Peñaloza . . . . . . . . . . . . . . . . . . 74 Binary Absorption in Tableaux-Based Reasoning for Description Logics. Alexander K. Hudek and Grant Weddell . . . . . . . . . . . . . 86 A Description Logic of Change. Alessandro Artale, Carsten Lutz and David Toman . . . . . . . 97 Discrete Tableau Algorithms for FSHI. Yanhui Li, Baowen Xu, Jianjiang Lu and Dazhou Kang II Regular Papers 109 Reasoning for Fuzzy Description Logic with Comparison Expressions. Dazhou Kang, Baowen Xu, Jianjiang Lu and Yanhui Li . . . . 111 Handling Imprecise Knowledge with Fuzzy Description Logic. Giorgos Stoilos, Giorgos Stamou and Jeff Pan . . . . . . . . . . 119 Finding Subsumers for Natural Language Presentation. Chris Mellish and Jeff Pan . . . . . . . . . . . . . . . . . . . . . 127 iii SHIN ABox Reduction. Achille Fokoue, Aaron Kershenbaum and Li Ma . . . . . . . . . 135 Tableau Caching for Description Logics with Inverse and Transitive Roles. Yu Ding and Volker Haarslev . . . . . . . . . . . . . . . . . . . 143 On the Scalability of Description Logic Instance Retrieval. Ralf Möller Volker Haarslev and Michael Wessel . . . . . . . . . 151 High Performance Absorption Algorithms for Terminological Reasoning. Ming Zuo and Volker Haarslev . . . . . . . . . . . . . . . . . . 159 Automated Benchmarking of Description Logic Reasoners. Tom Gardiner, Ian Horrocks and Dmitry Tsarkov . . . . . . . . 167 Will my Ontologies Fit Together?. Bernardo Cuenca Grau, Ian Horrocks, Oliver Kutz and Ulrike Sattler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Description logic reasoning using the PTTP approach. Zsolt Nagy, Gergely Lukácsy and Peter Szeredi . . . . . . . . . . 183 Extending the SHOIQ(D) Tableaux with DL-safe Rules: First Results. Vladimir Kolovski, Bijan Parsia and Evren Sirin . . . . . . . . 192 Description Logic Reasoning for Dynamic ABoxes. Christian Halaschek-Wiener, Bijan Parsia, Evren Sirin and Aditya Kalyanpur . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 Beyond Asserted Axioms: Fine-Grain Justifications for OWL-DL Entailments. Aditya Kalyanpur, Bijan Parsia and Bernardo Cuenca Grau . . 208 Optimizations for Answering Conjunctive ABox Queries. Evren Sirin and Bijan Parsia . . . . . . . . . . . . . . . . . . . 215 Model checking the basic modalities of CTL with Description Logic. Shoham Ben-David, Richard Trefler and Grant Weddell . . . . . 223 Towards Mobile Reasoning. Thomas Kleemann . . . . . . . . . . . . . . . . . . . . . . . . . 231 iv III Posters 239 Euclidian Roles in Description Logics. Giorgos Stoilos and Giorgos Stamou . . . . . . . . . . . . . . . 241 Experiences with Load Balancing and Caching for Semantic Web Applications. Alissa Kaplunova, Atila Kaya and Ralf Möller . . . . . . . . . . 243 How sensor data interpretation could benefit from description logics: A practical case study. Ralf Möller and Sylvia Melzer . . . . . . . . . . . . . . . . . . . 245 Cost-Efficient Web Service compositions for querying processes over reasoning services. Irma Sofia Espinosa Peraldi and Ralf Möller . . . . . . . . . . . 247 Static Knowledge Representation of Multi-Agent System’s Specification by Description Logic. Haiyan Che and Jigui Sun . . . . . . . . . . . . . . . . . . . . . 249 A Tableaux-based Mobile DL Reasoner - An Experience Report. Felix Müller, Michael Hanselmann, Thorsten Liebig and Olaf Noppens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 Computing Maximally Satisfiable Terminologies for the Description Logic ALC with Cyclic Definitions. Kevin Lee, Thomas Meyer, Jeff Pan and Richard Booth . . . . . 253 Pellet System Description. Evren Sirin and Bijan Parsia . . . . . . . . . . . . . . . . . . . 255 Topological Reasoning in Basic Description. Matteo Cristani, Nicoletta Gabrielli and Paolo Torelli . . . . . . 257 The new ICOM Ontology Editor. Pablo Fillottrani, Enrico Franconi and Sergio Tessaris 259 v . . . . . vi Part I Long Papers 3 Proceedings of DL 2006 Conjunctive Query Answering for Description Logics with Transitive Roles Birte Glimm∗ Ian Horrocks Ulrike Sattler The University of Manchester, UK [glimm,horrocks,sattler]@cs.man.ac.uk Abstract An important reasoning task, in addition to the standard DL reasoning services, is conjunctive query answering. In this paper, we present algorithms for conjunctive query answering in the expressive Description Logics SHQ and SHOQ. In particular, we allow for transitive (or nonsimple) roles in the query body, which is a feature that is not supported by other existing conjunctive query answering algorithms. For SHQ, we achieve this by extending the logic with a restricted form of ↓ binders and state variables as known from Hybrid Logics. We also highlight, why the addition of inverse roles makes the task of finding a decision procedure for conjunctive query answering more complicated. 1 Introduction Existing Description Logic (DL) reasoners1 provide automated reasoning support for checking concepts for satisfiability and subsumption, and also for answering queries that retrieve instances of concepts and roles. The development of a decision procedure for conjunctive query answering in expressive DLs is, however, still a partially open question. Grounded conjunctive queries for SHIQ are supported by KAON2, Pellet, and Racer’s query language nRQL. However, the semantics of grounded queries is different from the usually assumed openworld semantics in DLs since existentially quantified variables are always bound to named individuals. ∗ This work was supported by an EPSRC studentship. For example, FaCT++ http://owl.man.ac.uk/factplusplus/, KAON2 http:// kaon2.semanticweb.org/, Pellet http://www.mindswap.org/2003/pellet/, or Racer Pro http://www.racer-systems.com/ 1 4 Long Papers None of the existing conjunctive query answering techniques [14, 10, 4, 9, 13] is able to handle transitive roles or nominals in the query body.2 In this paper, we present an extension of SHQ with a restricted form of the ↓ binder operator and state variables as known from Hybrid Logics [3]. This extended logic enables an extension of the rolling-up technique [14, 4] to transitive roles; a feature which was left open by Tessaris [14]. Unfortunately, the ↓ binder already makes the DL ALC undecidable. For query answering, however, the ↓ binder occurs in a very restricted form and, as we show in Section 4, this extension of SHQ is decidable. Further on, we adapt the tableaux algorithm for SHOQ [7] in order to decide conjunctive query entailment in SHQ. Query answering for a logic that includes nominals, e.g., a logic such as SHOQ, has the additional difficulty that cycles are no longer limited to ABox individuals or shortcuts via transitive roles. Therefore, the non-deterministic assignment of individual names to variables in a cycle, as suggested for the DL DLR by Calvanese et al. [4], can no longer be applied. In Section 5, however, we show that, by also introducing new variables, the non-deterministic assignment of individual names to variables can be used in order to provide a query answering algorithm for SHOQ. Finally, we highlight why the extension of SHQ or SHOQ with inverse roles makes the design of a decision procedure for conjunctive query answering more complicated. 2 Preliminaries We assume readers to be familiar with the syntax and semantics of the DL SHOIQ (for details see [1]) and of SHOIQ knowledge bases. Therefore, we introduce only the syntax and semantics of the ↓ binder and of conjunctive queries here. Let L be a Description Logic, C an L-concept, and NV a finite set of variable names with y ∈ NV . With L↓ , we denote the language obtained by allowing, additionally, y and ↓ y.C as L-concepts. For an interpretation I = (∆I ,·I ), an element d ∈ ∆I , and a variable y ∈ NV , we denote with I[y/d] the interpretation that extends I such that y I = {d}. The L↓ -concept ↓ y.C is then interpreted as (↓ y.C)I = {d ∈ ∆I | d ∈ C I[y/d] }. Let ~y be a vector of variables and ~c a vector of individual names. A Boolean conjunctive query q has the form hi ← conj1 (~y ; ~c) ∧ . . . ∧ conjn (~y ; ~c). We call T(q) = ~y ∪ ~c the set of terms in q,3 and we call each conji (~y ; ~c) for 1 ≤ i ≤ n 2 Although the algorithm presented by Calvanese et al. [4] allows the use of regular expressions in the query (in particular the transitive reflexive closure), it has been shown that the algorithm is incomplete [8, 5]. 3 For readability, we sometimes abuse our notation and refer to ~y as a set. When referring 5 Proceedings of DL 2006 an atom. Atoms are either concept or role atoms: a concept atom has the form t : C, and a role atom the form ht, t′ i : r, for {t, t′ } ⊆ T(q), C a possibly complex L-concept, and r an L-role. Let K be an L-knowledge base (L-KB), I = (∆I ,·I ) a model for K, and q a Boolean conjunctive query for K. An assignment in I is a mapping ·A : T(q) → ∆I . We say that q is true in I and write I |= q if there exists an assignment ·A in I s.t. tA ∈ {tI } for every individual t ∈ ~c, tA ∈ C I for every concept atom t : C in q, and htA , t′A i ∈ rI for every role atom ht, t′ i : r in q. We call such an assignment a q-mapping w.r.t. I . If I |= K implies I |= q for all models I of K, then we say that q is true in K, and write K |= q; otherwise we say that q is false in K, and write K 6|= q. Since answering non-Boolean conjunctive queries can be reduced to answering (possibly several) Boolean queries, we consider only Boolean queries here. 3 Reducing Query Answering to Concept Unsatisfiability The main ideas used in this paper were first introduced by Calvanese et al. [4] for deciding conjunctive query entailment for the expressive DL DLRreg . Since query answering can be reduced to query entailment, the algorithm in [4] is capable of deciding conjunctive query answering as well. The authors show how a query q can be expressed as a concept Cq , such that q is true w.r.t. a given knowledge base if adding ⊤ ⊑ ¬Cq makes the KB unsatisfiable. In order to obtain the concept Cq , the query q is represented as a directed, labelled graph. This graph, called a tuple-graph or a query graph, is traversed in a depth-first manner and, during the traversal, nodes and edges are replaced with appropriate concept expressions, leading to the concept Cq after completing the traversal. The nodes in a query graph correspond to the terms in the query and are labelled with the concepts that occur in the corresponding concept atoms. The edges correspond to the role atoms in q and are labelled accordingly. For example, let q1 be the query hi ← x : C ∧ hx, yi : s ∧ y : D and q2 the query hi ← x : C ∧ hx, yi : s ∧ hy, xi : r ∧ y : D. The query graphs for q1 and q2 are depicted in Fig. 1 and Fig. 2 respectively. r x:C s y:D Figure 1: The (acyclic) query graph for q1 . x:C s y:D Figure 2: The (cyclic) query graph for q2 . Since q1 is acyclic, we can build the concept that represents q1 as follows: to a vector ~y as a set, we mean the set {yi | yi occurs in ~y }. 6 Long Papers start at x and traverse the graph to y. Since y is a leaf node, remove y and its incoming edge and conjoin ∃s.D to the label C of x, resulting in C ⊓ ∃s.D for Cq1 . A given KB K entails q1 iff K ∪ {⊤ ⊑ ¬Cq1 } is unsatisfiable. Since the graph is collapsed with each step, the technique is often called rolling-up. Full details can be found in the original paper [4], although the description there is slightly different since reification and name formulae are used in order to reduce DLRreg (which allows also for roles of arity n > 2) to converse-pdl. Tessaris [14] proposes a similar approach for the DL SHQ (without transitive roles in the query). This reduction is not directly extendable to cyclic queries since, due to the tree-model property of most DLs, a concept cannot capture cyclic relationships. However, for simpler DLs, this also means that cycles can only be enforced by ABox assertions and hence, Calvanese et al. suggest to replace variables in a cycle, i.e., x and y in q2 , non-deterministically with individual names from the KB (or with terms from the more specific query in the case of query entailment). Although the technique presented by Calvanese et al. provides the basic foundation of several query answering algorithms, including the extensions presented here, it was found later that the algorithm in its original form is not a decision procedure. Horrocks et al. [8] point out that, by identifying variables with each other, some cyclic queries become acyclic, and hence a replacement of variables with named individuals might not find all solutions. For example, identifying y and y ′ in the query graph depicted in Fig. 3, leads to the acyclic query graph in Fig. 4, which can be expressed as C ⊓ ∃r.∃s.D. Clearly, the KB containing the ABox assertion a : ∃r′ .(C ⊓ ∃r.∃s.D) would make the query true, although in the relevant assignments none of the variables can be bound to the individual name a. r y r y’ s s s r x:C Figure 3: graph. z:D The original query x:C y=y’ z:D Figure 4: The query graph after identifying y with y ′ . Another problem arises through the regular expressions in DLRreg , which are, for example, capable of expressing inverse roles in the query. Let q3 be the query hi ← hx, yi : r ∧ hy, xi : s− (see Fig. 5). Identifying x and y still leaves us with a cyclic query graph. Let K be a knowledge base containing the role axiom r ⊑ s and the ABox assertion a : ∃r′ .∃r.⊤. Clearly, we have that K |= q3 (see Fig. 6), although again in the relevant assignments none of the variables can be bound to the individual name a. Similar examples can be given for regular expressions that use the Kleene star for expressing the transitive closure. These discoveries motivated the work presented in the following sections, which in particular targets the problems arising with cyclic queries. 7 Proceedings of DL 2006 sx r y a Figure 5: The query graph for q3 . r’ - r -,s- r’ r, s Figure 6: A representation of the canonical model of K. The parts that make q3 true are highlighted. The Rolling-Up Technique with ↓ Binders 4 An extension of the rolling-up technique to cyclic queries is not directly possible, as we have tried to explain in the previous section. Due to the tree-model property of most DLs, a concept cannot capture cyclic relationships, but it is also not always correct to replace variable names in a cycle with individual names from the knowledge base. In this section, we show how cyclic queries for an L-KB can be rolled-up into L↓ -concepts. The ↓ binder can label elements in a model with a variable, and this variable can be used to enforce a co-reference. Consider again the query q2 hi ← x : C ∧ hx, yi : s ∧ hy, xi : r ∧ y : D (see Fig. 2). Using the ↓ binder, we can construct the following concept Cq2 for q2 : ↓ x.(C ⊓∃s.(D⊓∃r.x)). In order to obtain this concept, we still traverse the query graph (see Fig. 7): we start at x, traverse to y, then we reach x again and replace the r-edge by conjoining ∃r.x to the label of y, now y is a leaf node and we replace y and its incoming s-edge by conjoining ∃r.↓ y.(D ⊓ ∃r.x) to the label of x, since x is the last node, we obtain Cq2 as ↓ x.(∃r.↓ y.(D ⊓ ∃r.x). Since y never occurs as a variable, we can omit the ↓ binder for y. Now we have again that K |= q2 iff K ∪ {⊤ ⊑ ¬Cq2 } is unsatisfiable. Further details and a proof that Cq2 indeed captures q2 can be found in a technical report [6]. r x:C s r y:D x:C s y:D x:C s y:Du9r.x x:Cu9s.#y.(Du9r.x) Figure 7: The graph traversal for the query graph of q2 step by step. Parts already seen during the traversal are highlighted. Even for cyclic queries, the rolling-up is now straightforward. If, however, the logic L under consideration does not provide for inverse roles, then this technique is only applicable in case each component in the query graph is also strongly connected. In the presence of weakly connected components, we would need inverse roles in order to roll-up a query. For example, let q4 be the query hi ← x : C ∧ hx, yi : s ∧ hx, yi : r ∧ y : D, i.e., both edges go now from x to y and x is not reachable from y. Therefore, the query graph is composed of two weakly connected components and a traversal of the query graph would get stuck at y. With inverse roles, q4 could easily be expressed as ↓ x.(C ⊓ ∃s.(D ⊓ ∃Inv(r).x)). Tessaris [14] shows how arbitrary conjunctive queries for SHQ can be rolled-up 8 Long Papers even without inverse roles, and an extension of this technique might work for ↓ binders and variables as well. r x:C s y:D Figure 8: The query graph for q4 . Unfortunately, there are no decision procedures for expressive DLs with the ↓ binder operator. It is even known that ALC extended with binders and state variables is undecidable [2]. However, we can observe some interesting properties for our query concepts. (1) After the rolling-up, all variables occur only positively. (2) Only existential restrictions are introduced in the rolling-up. Hence, negating the query concept for q2 and transforming it into negation normal form yields ↓ x.(¬C ⊔∀s.(¬D⊔∀r.¬x)) and we observe that all variables occur negated and are under the scope of universal quantifiers. For ALC, these restrictions are enough to regain decidability [11]. 4.1 A Tableaux Algorithm for SHQ Query Concepts Our algorithm is based on the tableaux algorithm for SHOQ [7], which obviously decides KB satisfiability for SHQ. Using this algorithm has the advantage that we can use nominals for the constants in the query. Alternatively, representative concepts and additional ABox assertions for each constant in a query could be used [14]. A tableaux algorithm builds a finite representation of a model, which is called a completion graph. The nodes in the completion graph represent elements in the domain and are labelled with a set of concepts. Labelled edges represent the relational structures among the elements. An initial completion graph is expanded according to a set of expansion rules. The expansion stops when an obvious contradiction, called a clash, occurs, or when no more rules are applicable. In the latter case, the completion graph is called complete. Termination is guaranteed by a technique called blocking. A complete and clash-free completion graph can be “unravelled” into a model for the given KB. In order to handle query concepts that may contain binders and state variables, some adaptations of the existing algorithm are necessary. In order to store the bindings of variables, we modify the node labels s.t. they contain tuples of the form hC, Bi, where C is a concept and B is a (possibly empty) set of bindings of the form {y1 /v1 , . . . , yn /vn }, where y1 , . . . , yn are the free variables in C and v1 , . . . , vn are nodes. The next obvious addition is a rule to handle concepts of the form ↓ y.C: if h↓ y.C, Bi is in the label of a node v, we add hC, {y/v} ∪ Bi and hy, {y/v}i to the label of v. The latter states that y is bound to v at v, and the former that the free variable y in C is bound to v. All other existing rules Proceedings of DL 2006 9 have to propagate the bindings as well, e.g., the ∀-rule applied to h∀r.C, Bi in the label of a node v adds hC, Bi to the labels of v’s r-successors. The set B contains all and only the bindings for the free variables in C. Another obvious consequence is the addition of a new clash condition: if both hy, {y/v}i and h¬y, {y/v}i are in the label of the node v, then this is a clash. A more challenging task is the extension of the blocking condition. For SHQ, however, we argue that we can simply ignore the bindings, i.e., if hC, Bi is in the label, we consider only C in the blocking condition. This clearly ensures termination. But why does this guarantee that we can unravel a complete and clash-free completion forest into a model? Obviously, in SHQ, there is no way for a node to propagate information “back” to its ancestors, and clashes according to the new clash condition can only occur through a cyclic structure. This is so because a node v is only labelled with hy, {y/v}i by an application of the new ↓-rule to some concept h↓ y.C, Bi in the label of v. Furthermore, the only way ¬y can occur with v as a binding is when hC, {y/v} ∪ Bi is expanded to h¬y, {y/v}i via a cyclic path back to v. This is obviously only possible among individual nodes in SHQ and, therefore, no clash in the tableau can by caused by unravelling. Hence, transitive roles alone are not causing major problems. An interesting consequence is, however, that we loose the finite model property. For example, let K contain the axioms ⊤ ⊑ ∃r.⊤ and ⊤ ⊑ ¬Cq with r a transitive role and ¬Cq := ↓ x.(∀r.¬x). The first axiom enforces an infinite r-chain for every individual. Normally, a finite model could contain an r-cycle instead of an infinite chain, but this would clearly violate ¬Cq . Hence, every model of K must be acyclic and therefore contain an infinite r-chain. 5 A Rolling-up Technique for SHOQ In this section, we show how the rolling-up technique can be extended to the DL SHOQ, i.e., SHQ plus nominals. We do not use ↓ binders here, but rather propose an extension of the guessing technique as sketched in Section 3. In the presence of nominals, a simple non-deterministic assignment of individual names to variables that occur in a cycle is not sufficient. For example, Fig. 9 represents a model for the KB containing the axioms {a} ⊑ ¬C⊓¬D⊓∃s.(C⊓∃r.(D⊓∃s.{a})) and trans(s). The query hi ← x : C ∧y : D ∧hx, yi : r ∧hy, xi : s (see Fig. 10) would clearly be true, although in the relevant assignments a cannot be bound to either x or y. Since the query graph for this query contains just one strongly connected component, no inverse roles are required in the rolling-up and we should be able to deal with this query. For SHOQ, our main argument for the correctness of an extension of the guessing of variable assignments is that a cycle among new nodes can only occur due to a transitive role that provides a shortcut for “skipping” the nominal. 10 Long Papers s s s a:¬Cu¬D r n1:C n2:D Figure 9: The dashed line indicates the relationship added due to s being transitive. Therefore, there is a cycle not directly containing the nominal a. Hence, a nominal is always at least indirectly involved in a cycle. In this case, we have only one nominal a, and we may guess that it is either in the position of x, in the position of y, or it is “splitting” the (transitive) role s (see Fig. 11). In each case, we can roll-up the query graph into the nominal, obtaining the three query concepts Cq1 := {a} ⊓ C ⊓ ∃r.(D ⊓ ∃s.{a}), Cq2 := {a} ⊓ D ⊓ ∃s.(C ⊓ ∃r.{a}), Cq3 := {a} ⊓ ∃s.(C ⊓ ∃r.(D ⊓ ∃s.{a})). Identifying x with y gives the additional forth query concept Cq4 := {a} ⊓ C ⊓ D ⊓ ∃r.{a} ⊓ ∃s.{a}. The query is true just in case one of these query concepts is entailed by the KB. Clearly, in our example, only the concept Cq3 that corresponds to the “new” guess is entailed. If we had n nominals, then we would need to try 4n guesses. s s x:C r y:D r x:C Figure 10: The original query graph. a s y:D Figure 11: An alternative query graph in which the nominal a is assumed to be involved in the cycle. Since it was, to the best of our knowledge, not even known if conjunctive query answering for logics with nominals and transitive roles is decidable, this technique is clearly valuable, although it is, due to its highly non-deterministic nature, not very practical. 6 The Challenges of Inverses and Nominals Neither the arguments used for the extension of SHQ with binders (i.e., blocking can ignore different bindings), nor the extended guessing strategy for SHOQ, can be used with inverse roles. Fig. 12 shows a representation of a model for the concept {a} ⊓ ∃r.(∃s.⊤) for s a transitive and symmetric role. The query hi ← hx, xi : s is obviously true in this model. The nominal a is, however, not even indirectly involved in the cycle. s a r n1 s s s n2 Figure 12: The dashed lines represent the additional relationships added for s being transitive and symmetric. Proceedings of DL 2006 11 Since completion graphs are finite representations of models, the question is how far do we have to expand a completion graph before blocking is “safe”, i.e., unravelling into a tableau does not lead to a clash. In order to see the same problem from another perspective, we briefly sketch a different query answering algorithm in the style of CARIN [10]. CARIN provides a conjunctive query answering algorithm for the DL ALCN R. Recall from Section 2 that a query q is true in a knowledge base K, if there is a qmapping for every model I = (∆I ,·I ) of K. Similarly, we define a mapping φ from terms in a query to nodes in a completion graph G and we call φ a q-mapping w.r.t. G if, for each constant t in q, {t} is in the label of φ(t) (i.e., constants are mapped to the corresponding nominal nodes), for each concept atom t : C in q, C is in the label of φ(t) and, for each role atom ht, t′ i : r in q, φ(t′ ) is an r-descendant of φ(t), where r-descendant implicitly closes the transitive roles. Since φ is purely syntactic, we extend the KB with an axiom ⊤ ⊑ C ⊔ ¬C for each concept C s.t. t : C is a concept atom in q. Hence, we obtain a decision procedure for conjunctive query answering if we can show the following: Claim 6.1 For each model I of K, there is a q-mapping w.r.t. I iff for each completed and clash-free completion graph G of K, there is a q-mapping w.r.t. G. In order to take the length of the paths in the query into account, blocking must be delayed appropriately. In CARIN (i.e., for a logic without transitive roles) this is achieved by using two isomorphic trees (instead of two isomorphic pairs as it is the case for normal pairwise blocking as in SHIQ) s.t. the depth of the trees corresponds to the longest path in the query. The “if” direction of Claim 6.1 is relatively straight forward but, for the “only if” direction, we have to show that (in contrapositive form), if there is a completion graph G for K s.t. there is no q-mapping φ w.r.t. G, then there is a model I of K s.t. there is no q-mapping σ w.r.t. I. We now give an example that shows that, even if we find such a completion graph G, we cannot guarantee that there is no mapping σ w.r.t. the canonical model I of G, if q contains a cycle with a transitive role occurring in it. Of course there may be another completion graph, for which this problem does not occur, but it is hard to prove that there is always a canonical counter-model for the query. Let K be a KB containing the axiom ⊤ ⊑ ∃r.⊤ ⊔ ∃s.⊤ for r a transitive and symmetric role and let q be the query hi ← hx, xi : r ∧ hx, yi : s ∧ hy, zi : r ∧ hz, zi : r ∧ x : C ∧ z : C, see Fig. 13 right. The upper part of Fig. 13 shows a possible (simplified) completion graph G for K, where C or ¬C is added to the node labels to allow for a purely syntactic mapping φ. The grey underlying triangle shapes illustrate the two isomorphic trees used for blocking, and clearly there is no q-mapping w.r.t. G. The partial representation of a model depicted in the lower part of Fig. 13, however, shows that, by unravelling G, we would get 12 Long Papers a model I of K s.t. there is a q-mapping w.r.t. I. This is the case because there is no longer only one element in the extension of C, and all role relationships for q are satisfied since r is transitive and symmetric (inferred relationships are only pictured where they are relevant for the mapping). Even choosing a larger depth for the two trees would allow this to happen, since the decision for C or ¬C and for an r- or s-successor was purely non-deterministic. r r r r r r ¬C ¬C ¬C ¬C ¬C ¬C r r r r r r r r s C ¬C ¬C ¬C ¬C ¬C r ¬C ¬C ¬C ¬C ¬C ¬C r r s x:C r r y z:C r r r s r r r r r s r r r C ¬C ¬C ¬C ¬C ¬C C ¬C ¬C ¬C Figure 13: A completion graph G with trees for blocking (top), a partial unravelling of G (bottom), and a query graph (right). Therefore, the absence of a q-mapping for the completion graph does not prove that there is a model for which there is no q-mapping. Requiring several isomorphic trees or pairs before blocking occurs obviously does not help either since only one part between the isomorphic trees/pairs could contain the twice required C in the node label. The problem is that, by repeating the unique part between the blocking and the blocked node, we can produce a structure that allows for a q-mapping. A tempting solution for “safe” blocking conditions would be to require a path of n isomorphic sequences directly following each other, where n is the length of the longest path in the query. However, this will not guarantee termination, as the following argument shows: we could interpret each path from a root or nominal node as a word over the edge labels, e.g., the above example would produce a word starting with rrrrrrsrrrr. For the suggested blocking condition, such a path must contain a substring of the form W n , i.e., n repetitions of the word W , where W is any sequence of letters over our alphabet of roles. The additional blocking conditions for the node labels are irrelevant here. In 1944 Morse and Hedlund [12] showed that the so called Thue-Morse sequence, which forms a word over an alphabet of only two letters, is cube-free, which would correspond to a path of unbounded length in which no blocking occurs. Hence, the algorithm would not terminate for n > 3. For a three letter alphabet, this holds already for n > 2. We encounter similar difficulties when using ↓ binders and variables for a logic like SHIQ or SHOIQ. It is difficult to determine how “deep” the completion graph has to be before blocking is safe. If the completion graph is not “deep enough”, unravelling does not yield a model. Although for the CARIN technique, some canonical models with a q-mapping have completion graphs without a q-mapping, it seems as if by testing all possi- Proceedings of DL 2006 13 ble completed and clash-free completion graphs, one would always find at least one completion graph such that also its canonical model does not provide for a q-mapping. However, this is only an observation, which could support the view that the problem is, despite all these problems, decidable. A different proof technique might be necessary to show this, and our future work is aimed at investigating this. 7 Conclusions In the previous sections, we have presented two ideas that allow an extension of the rolling-up technique also to cyclic conjunctive queries for SHQ and SHOQ. For SHQ, we achieved this by extending the logic with a restricted form of ↓ binders and state variables as known from Hybrid Logics. This allows the expression of cyclic queries as concepts since, with ↓ binders and variables we can express a co-reference. Query entailment can then be reduced to deciding concept satisfiability for the extended DL. However, adding the ↓ binder, even in the very restricted form needed for query answering, has a notable impact on the resulting logic; e.g., for SHQ, this extension leads to the loss of the finite model property. In Section 4.1, we illustrate how a tableaux algorithm for SHQ can be extended in order to handle query concepts. Although each ↓ introduces a fresh nominal on the fly, we show that, for SHQ, termination can be regained by ignoring them in the blocking condition. Thus we have shown how conjunctive queries with transitive roles in the query body can be answered. In Section 5, we extend the work by Calvanese et al. [4] to SHOQ, i.e., to a logic that allows for nominals. We do this by proposing a more sophisticated guessing technique, which then again enables the rolling-up of a query into a SHOQ-concept. In Section 6, we highlight why none of the proposed techniques extends easily to a logic with inverse roles. We also show this for a query entailment algorithm in the style of CARIN [10]. The main problem is to decide when a completion graph is expanded “far enough” in order to safely predict that the query is also not entailed in its possibly infinite canonical model. The rolling-up technique with binders and variables integrates seamlessly into the existing tableaux algorithms, whereas, for the CARIN-style algorithms, the search for a q-mapping is an additional and completely separated step. Moreover, the added axioms ⊤ ⊑ C ⊔¬C for every concept C in the query, can significantly increase the amount of non-determinism. This makes binders and variables the more attractive choice from an implementation point of view. Our future work will include efforts to show that answering arbitrary conjunctive queries for SHIQ and SHOIQ is decidable. If that is the case — and we believe it is — we aim at extending the rolling-up technique with binders 14 Long Papers and state variables to SHIQ, SHOQ and SHOIQ. This would provide a (hopefully practical) decision procedure for arbitrary conjunctive queries over OWL-DL knowledge bases. References [1] F. Baader, D. Calvanese, D. L. McGuinness, D. Nardi, and P.F̃. Patel-Schneider, editors. The Description Logic Handbook. Cambridge University Press, 2003. [2] P. Blackburn and J. Seligman. Hybrid languages. Journal of Logic, Language and Information, 4(3):251–272, 1995. Special issue on decompositions of first-order logic. [3] P. Blackburn and J. Seligman. Advances in Modal Logic, volume 1, chapter What are hybrid languages?, pages 41–62. CSLI, 1998. [4] D. Calvanese, G. De Giacomo, and M. Lenzerini. On the decidability of query containment under constraints. In Proc. of PODS’98, pages 149–158. ACM, 1998. [5] B. Glimm and I. Horrocks. Handling cyclic conjunctive queries. In Proc. of DL’05, Edinburgh, UK, July 26–28 2005. CEUR. [6] B. Glimm, I. Horrocks, and U. Sattler. Conjunctive query answering for the description logic SHOIQ. Technical report, The University of Manchester, 2006. Available online at http://www.cs.man.ac.uk/∼glimmbx/download/GlHS06b.pdf. [7] I. Horrocks and U. Sattler. Ontology reasoning in the SHOQ description logic. In Proc. of IJCAI’01, pages 199–204. Morgan Kaufmann, 2001. [8] I. Horrocks, U. Sattler, S. Tessaris, and S. Tobies. How to decide query containment under constraints using a description logic. In Proc. of LPAR’00, LNAI. Springer, 2000. [9] U. Hustadt, B. Motik, and U. Sattler. A decomposition rule for decision procedures by resolution-based calculi. In Proc. of LPAR’04, volume 3452 of LNCS. Springer, 2004. [10] A. Y. Levy and M.-C. Rousset. CARIN: A representation language combining horn rules and description logics. In European Conf. on Artificial Intelligence, pages 323–327, 1996. [11] M. Marx. Narcissists, stepmothers and spies. In Proc. of DL’02, volume 53. CEUR, 2002. [12] M. Morse and G. A. Hedlund. Unending chess, symbolic dynamics, and a problem in semigroups. Duke Mathematical Journal, 11(1):1–7, 1944. [13] M. M. Ortiz, D. Calvanese, and T. Eiter. Characterizing data complexity for conjunctive query answering in expressive description logics. In Proc. of the 21st Nat. Conf. on Artificial Intelligence (AAAI’06), 2006. to appear. [14] S. Tessaris. Questions and answers: reasoning and querying in Description Logic. PhD thesis, University of Manchester, 2001. Proceedings of DL 2006 15 Efficient Reasoning in EL+ Franz Baader, Carsten Lutz, Boontawee Suntisrivaraporn Institute for Theoretical Computer Science TU Dresden, Germany {baader,clu,meng}@tcs.inf.tu-dresden.de 1 Introduction The early dream of a description logic (DL) system that offers both sound and complete polynomial-time algorithms and expressive means that allow its use in real-world applications has since the 1990ies largely been considered to be a pipe dream. This was, on the one hand, due to complexity results showing intractability even in very inexpressive DLs [5], in particular in the presence of TBoxes [13]. On the other hand, many of the applications considered then required more expressive power rather than less, which led to the development of more and more expressive DLs. The use of such intractable DLs in applications was made possible by the fact that highly-optimized tableau-based reasoners for them behaved quite well in practice. However, more recent developments regarding the EL family of DLs have shed a new light on the realizability of this dream.1 On the one hand, theoretical results [1, 6, 2] have shown that reasoning in EL and several of its extensions remains tractable in the presence of TBoxes and even of general concept inclusions (GCIs). On the other hand, it has turned out that, despite its relatively low expressivity, the EL family is highly relevant for a number of important applications, in particular in the bio-medical domain: for example, medical terminologies such as the Systematized Nomenclature of Medicine (Snomed) [9] and the Galen Medical Knowledge Base (Galen) [14] are formulated in EL or small extensions thereof, and the Gene Ontology (Go) [8] used in bioinformatics can also be viewed as an EL TBox. In this paper, we address the question of whether the polynomial-time algorithms for reasoning in EL and its extensions really behave better in practice than intractable, but highly-optimized tableau-based algorithms. To this end, we have implemented a refined version of the algorithm described in [2] in our 1 An alternative contender for a usable tractable DL is the one introduced in [7]. 16 Long Papers Endocardium ⊑ Tissue ⊓ ∃cont-in.HeartWall ⊓ ∃cont-in.HeartValve HeartWall ⊑ BodyWall ⊓ ∃part-of.Heart HeartValve ⊑ BodyValve ⊓ ∃part-of.Heart Endocarditis ⊑ Inflammation ⊓ ∃has-loc.Endocardium Inflammation ⊑ Disease ⊓ ∃acts-on.Tissue Heartdisease ⊓ ∃has-loc.HeartValve ⊑ CriticalDisease . Heartdisease = Disease ⊓ ∃has-loc.Heart part-of ◦ part-of ⊑ part-of part-of ⊑ cont-in has-loc ◦ cont-in ⊑ has-loc Figure 1: An example EL+ ontology. CEL reasoner,2 and compared its performance on the large bio-medical ontologies Snomed, Go, and a trimmed-down version of Galen with the performance of the most advanced tableau-based reasoners FaCT++ ,3 RacerMaster,4 and Pellet5 on these ontologies. EL+ and the algorithm implemented in CEL 2 The CEL system currently supports the DL EL+ , whose concepts are formed according to the syntax rule C ::= A | ⊤ | C ⊓ D | ∃r.C, where A ranges over concept names, r over role names, and C, D over concepts. Thus, the concept language of EL+ is identical to that of EL. The ·+ in its name refers to the more powerful ontology formalism. An EL+ ontology is a finite set of general concept inclusions (GCIs) C ⊑ D and role inclusions (RIs) r1 ◦ · · · ◦ rn ⊑ r. Note that EL+ ontologies can thus express transitive roles, role hierarchies, and so-called right-identities on roles (r◦s ⊑ s), which are very useful in medical ontologies [15, 11]. The semantics of concepts and ontologies is defined in the usual way (see, e.g., [2]). We write C ⊑O D if the concept C is subsumed by the concept D w.r.t. the ontology O. Figure 1 shows a small medical ontology formulated in EL+ . Based on this ontology, it is not hard to see that the 2 CEL can be downloaded from http://lat.inf.tu-dresden.de/systems/cel/ See http://owl.man.ac.uk/factplusplus/ 4 See http://www.racer-systems.com/ 5 See http://www.mindswap.org/2003/pellet/ 3 17 Proceedings of DL 2006 Normal Form Completion Rules A1 ⊓ · · · ⊓ An ⊑ B R1 If A1 , . . . , An ∈ S(X), A1 ⊓ · · · ⊓ An ⊑ B ∈ O, and B ∈ / S(X) then S(X) := S(X) ∪ {B} R2 If A ∈ S(X), A ⊑ ∃r.B ∈ O, and (X, B) ∈ / R(r) then R(r) := R(r) ∪ {(X, B)} R3 If (X, Y ) ∈ R(r), A ∈ S(Y ), ∃r.A ⊑ B ∈ O, and B ∈ / S(X) then S(X) := S(X) ∪ {B} r⊑s R4 If (X, Y ) ∈ R(r), r ⊑ s ∈ O, and (X, Y ) ∈ / R(s) then R(s) := R(s) ∪ {(X, Y )} r◦s⊑t R5 If (X, Y ) ∈ R(r), (Y, Z) ∈ R(s), r ◦ s ⊑ t ∈ O, and (X, Z) ∈ / R(t) then R(t) := R(t) ∪ {(X, Z)} A ⊑ ∃r.B ∃r.A ⊑ B Figure 2: Normal form and completion rules concept Endocarditis is subsumed by the concept Heartdisease and CriticalDisease (i.e. Endocarditis ⊑O Heartdisease and Endocarditis ⊑O CriticalDisease). The main reasoning service that CEL offers is classification, i.e., the computation of the complete subsumption hierarchy between all concept names occurring in the input ontology O. The CEL reasoner is based on the polynomial time algorithm developed in [2] for the extension EL++ of EL+ , which can additionally handle the bottom concept (and thus disjoint concepts), restricted concrete domains, and nonimals (and thus ABoxes). In the following, we briefly introduce the restriction of this algorithm to EL+ , and then describe the refined version of this algorithm implemented in our CEL reasoner. To classify an ontology, the algorithm first transforms it into normal form, which requires that all concept and role inclusions are of one of the forms shown in the left part of Figure 2. By introducing new concept and role names and applying a number of simple transformation rules, any ontology O can be transformed in linear time into a normalized one such that subsumption between the concept names occurring in O is preserved [16, 2]. For the rest of this section, we assume without loss of generality that the input ontology O is in normal form. Let RNO be the set of all role names occurring in O, CNO the set of all concept names occurring in O, and CN⊤ O := CNO ∪ {⊤}. The algorithm computes ⊤ • a mapping S assigning to each element of CN⊤ O a subset of CNO , and • a mapping R assigning to each element of RNO a binary relation on CN⊤ O. The intuition is that these mappings make implicit subsumption relationships explicit in the sense that B ∈ S(A) implies A ⊑O B, and (A, B) ∈ R(r) implies 18 Long Papers A ⊑O ∃r.B. The mappings are initialized by setting S(A) := {A, ⊤} for each A ∈ CN⊤ O and R(r) := ∅ for each r ∈ RNO . Then the sets S(A) and R(r) are extended by applying the completion rules shown in the right part of Figure 2 until no more rule applies. In [2], it is shown that this algorithm always terminates in time polynomial in the size of the input ontology, and that it is sound and complete in the following sense: after termination we have B ∈ S(A) iff A ⊑O B, for all A, B ∈ CN⊤ O. Thus, the sets S(A) yield a complete representation of the subsumption relation ⊑O on the concept names from O (including ⊤). It is obvious that, when implementing this algorithm, an efficient approach for finding an applicable rule must be developed. Though a naı̈ve brute-force search for applicable rules would still yield a polynomial time algorithm, its complexity on very large knowledge bases would be prohibitive. As a solution to this problem, we use a refined version of the algorithm, which is inspired by the linear-time algorithm for satisfiability of propositional Horn formulas proposed in [10]. More precisely, our algorithm uses a set of queues, one for each element of CN⊤ O , to guide the application of completion rules. Intuitively, the queues list additions to S(A) and R(r) that still have to be carried out. The possible entries of the queues are of the form B1 ⊓ · · · ⊓ Bn → B ′ and ∃r.B with B1 , . . . , Bn , B, and B ′ concept names, r a role name, and n ≥ 0. For the case n = 0, we simply write the queue entry B1 ⊓ · · · ⊓ Bn → B ′ as B ′ . Intuitively, • an entry B1 ⊓ · · · ⊓ Bn → B ′ in queue(A) means that B ′ has to be added to S(A) if S(A) already contains B1 , . . . , Bn , and • ∃r.B ∈ queue(A) means that (A, B) has to be added to R(r). The fact that such an addition triggers other rules will be taken into account by appropriately extending the queues when the addition is performed. To facilitate describing the manipulation of the queues, we view the (normalb from concepts to sets of queue entries ized) input ontology O as a mapping O b as follows: for each concept name A ∈ CN⊤ O , O(A) is the minimal set of queue entries such that • if A1 ⊓ · · · ⊓ An ⊑ B ∈ O and A = Ai , then b A1 ⊓ · · · ⊓ Ai−1 ⊓ Ai+1 ⊓ · · · ⊓ An → B ∈ O(A); b • if A ⊑ ∃r.B ∈ O, then ∃r.B ∈ O(A). Proceedings of DL 2006 19 procedure process(A, X) begin if X = B1 , . . . , Bn → B and B ∈ / S(A) then if {B1 , . . . , Bn } ⊆ S(A) then S(A) := S(A) ∪ {B}; b queue(A) := queue(A) ∪ O(B); ′ for all concept names A and role names r with (A′ , A) ∈ R(r) do b queue(A′ ) := queue(A′ ) ∪ O(∃r.B); if X = ∃r.B and (A, B) ∈ / R(r) then process-new-edge(A, r, B) end; procedure process-new-edge(A, r, B) begin for all role names s with r ⊑∗O s do R(s) := R(s) ∪ {(A, B)}; S ′ ); b queue(A) := queue(A) ∪ {B ′ |B ′ ∈S(B)} O(∃s.B for all concept names A′ and role names t, u with t ◦ s ⊑ u ∈ O and (A′ , A) ∈ R(t) and (A′ , B) 6∈ R(u) do process-new-edge(A′ , u, B); for all concept names B ′ and role names t, u with s ◦ t ⊑ u ∈ O and (B, B ′ ) ∈ R(t) and (A, B ′ ) 6∈ R(u) do process-new-edge(A, u, B ′ ); end; Figure 3: Processing the queue entries b Likewise, for each concept ∃r.A, O(∃r.A) is the minimal set of queue entries b such that, if ∃r.A ⊑ B ∈ O, then B ∈ O(∃r.A). In the modified algorithm, the queues are used as follows: since the sets S(A) b b are initialized with {A, ⊤}, we initialize queue(A) with O(A) ∪ O(⊤), i.e., we add to the queues the immediate consequences of being an instance of A and ⊤. Then, we repeatedly fetch (and thereby remove) entries from the queues and process them using the procedure process displayed in Figure 3. To be more precise, process(A, X) is called when the queue of A was non-empty and we fetched the queue entry X from queue(A) to be treated next. Observe that the first if-clause of the procedure process implements R1 and (part of) R3, and the second if-clause implements R2, (the rest of) R3, as well as R4 and R5. The procedure process-new-edge(A, r, B) is called by process to handle the effects of adding a new pair (A, B) to R(r). The notation ⊑∗O used in its top-most for- 20 Long Papers loop stands for the reflexive-transitive closure of the statements r ⊑ s occurring in O. Queue processing is continued until all queues are empty. Observe that the refined algorithm need not perform any search to check which completion rules are applicable. With a relatively straightforward implementation (in Common LISP) of this algorithm, we were able to classify the large Snomed ontology (see below) in less than 4 hours (see [4] for this and other experimental results). Since then, however, we have further improved the implementation by changing the strategy of rule applications, changing the encoding of concept and role names, and by using low-level optimizations of the underlying data structure. These optimizations have enhanced the performance of CEL on large real-world ontologies. In particular, CEL can now classify Snomed in less than half an hour (see below). 3 The experimental results To test whether CEL can compete with modern tableau based reasoners, we have conducted a number of experiments based on three important bio-medical ontologies: the Gene Ontology (Go) [8], the Galen Medical Knowledge Base (Galen) [14], and the Systematized Nomenclature of Medicine (Snomed) [9]. These ontologies provide us with the following benchmark EL+ ontologies: • OGo , which is the latest OWL version of Go; • OGalen , which is a stripped-down version of Galen obtained by removing inverse role axioms and treating functional roles as ordinary ones; • OSnomed , which is the complete Snomed ontology; Snomed • Ocore , which is the definitorial fragment of O Snomed , obtained by keeping only complete concept definitions (A ≡ C) , but not the primitive ones (A ⊑ C). We consider this fragment in order to obtain another benchmark that is easier to tackle for standard DL reasoners. Some information about the size and structure of these ontologies is shown in the upper part of Table 1, where CDefs stands for complete concept definitions (A ≡ C), PCDefs for primitive concept definitions (A ⊑ C), and GCIs for concept inclusions that are neither CDefs nor PCDefs. It is interesting to note that all ontologies except for O Galen are actually acyclic TBoxes. We have compared the performance of CEL with three of the most advanced tableau-based reasoning systems: FaCT++ (v1.1.0), RacerMaster (v1.9.0), and Pellet (v1.3b). All these systems implement expressive DLs in which subsumption is ExpTime-complete. The experiments have been performed on a PC with 2.8GHz Intel Pentium 4 processor and 512MB memory running Linux v2.6.14. 21 Proceedings of DL 2006 OGo OGalen No. of CDefs. Snomed Ocore OSnomed 0 699 38,719 38,719 20,465 2041 0 340,972 No. of GCIs 0 1214 0 0 No. of role axioms 1 438 0 11 + 1 20,465 1 2,740 413 53,234 52 379,691 52 CEL 5.8 14 95 1,782 FaCT++ 6.9 50 740 3,859 RacerMaster 19 14 No. of PCDefs. |CNO | |RNO | Pellet 1,357 34,709 unattainable 75 unattainable unattainable Table 1: Benchmarks and Evaluation Results For Pellet, we used JVM v1.5 and set the Java heap space to 256MB (as recommended by the implementor). In the case of Galen, for the sake of fairness also the tableau reasoners have been used with the restricted version of Galen that includes neither functional nor inverse roles. In the case of Snomed, the only existing right-identity rule was passed to CEL, but not to the other reasoners as they do not support right identities. The results of our experiments are summarized in the lower part of Table 1, where all classification times are shown in seconds and unattainable means the reasoner failed due to memory exhaustion. Notably, CEL outperforms all the reasoners in all benchmarks except for O Galen , where CEL and RacerMaster show the same performance. CEL and FaCT++ are the only reasoners that can classify O Snomed , whereas RacerMaster and Pellet fail. Pellet and the original version of FaCT (not shown Snomed in the table) also fail already to classify Ocore . It seems worth noting that the ++ Snomed performance of FaCT on O degrades dramatically if O Snomed is extended ++ with real GCIs. For instance, FaCT needs about 3,000 more seconds to classify OSnomed for each additional randomly generated GCI of the form ∃r.C ⊑ D, whereas the performance of CEL does not change noticeably if we add such GCIs. 4 Computing the Subsumption DAG The innate classification output of CEL is simply the computed sets S(A) for all concept names A. We call these sets subsumer sets in what follows. In contrast, tableau-based reasoners usually employ the enhanced traversal method from [3] to generate a directed acyclic graph (DAG) describing the direct subsumption relationships, i.e., for every concept name A they compute the sets of its direct 22 Long Papers subsumers and subsumees, which are the sets of concept names B such that A ⊑O B (B ⊑O A) and there is no concept name B ′ ∈ / {A, B} with A ⊑O B ′ ⊑O ′ B (B ⊑O B ⊑O A). We will call this graph the subsumption DAG. Since the subsumption relation is a quasi-order rather than a partial order (i.e., in general not antisymmetric), one node of the DAG actually corresponds to an equivalence class of concept names rather than a single concept name. The advantage of using subsumption DAGs over subsumer sets is that this format is more compact, and it directly supports browsing the subsumption hierarchy by going from a concept name to its direct subsumers or subsumees. The disadvantage is that answering a subsumption question A ⊑?O B then requires to test reachability of B from A in the DAG, and not just a look-up in the subsumer set S(A). Since many applications require subsumption DAGs rather than (or in addition to) subsumer sets, CEL allows to construct the former from the latter in an efficient way. In principle, converting subsumer sets into a subsumption DAG is easy. We can simply compute, for each concept name A, • the set SS (A) := {B ∈ S(A) | A ∈ / S(B)} of strict subsumers of A, i.e., subsumers of A that are not equivalent to A; ¡S ¢ • the set DS (A) := SS (A) \ B∈SS (A) SS (B) of direct subsumers of A; • the set DS − (A) := {B | A ∈ DS (B)} of direct subsumees of A. Clearly, the sets DS (A) and DS − (A) yield a representation of the subsumption DAG. However, we do not use this direct construction since computing the sets − DS (A) is expensive (it needs quadratic time) and it is possible to avoid the direct computation of these sets according to the above definition by using an approach that is inspired by the enhanced traversal method in [3]. Another virtue of our alternative approach is that the potentially costly set operations in the computation of DS (A) are replaced by an inexpensive marking algorithm. In order to explain the main idea underlying our algorithm, assume that we have already computed a restriction of the subsumption DAG to some subset of the concept names, and that we now want to insert the concept name A into this DAG. We start by computing the set SS (A) of strict subsumers according to the definition given above. The elements of S(A) \ SS (A) are the concepts that are equivalent to A. To find all the direct subsumers of A among the elements of SS (A), we proceed as follows. If all elements of SS (A) belong to the already computed DAG, we can find the direct subsumers by using a simple graph traversal algorithm to mark all the strict subsumers of elements of SS (A) in the DAG. The direct subsumers of A are then those elements of SS (A) that are not marked. If there are elements of SS (A) that do not belong to the already computed DAG, then we simply first insert these elements into the DAG (by Proceedings of DL 2006 23 issuing recursive calls of the insertion procedure) before inserting A. By following this strategy, we ensure that, when inserting a concept name A into the DAG, all subsumers of A are already in the DAG, but no subsumee of A is. Hence, our algorithm need not compute the direct subsumees explicitly. Instead, it is enough to extend the set of direct subsumees of B by A in case B is found to be a direct subsumer of A. Figure 4 shows a pseudo code representation of our algorithm. The sets parents(A) are used to store the direct subsumers of A, the sets children(A) are used to store the direct subsumees of A, and the sets equivalents(A) are used to store the concepts that are equivalent to A. Note that the description of the algorithm is a bit sloppy in that we do not distinguish between a concept name and the node in the DAG representing (the equivalence class of) this name. An algorithm similar to ours is obtained if we describe the subsumer sets as a primitive TBox, i.e. a set of primitive concept definitions A ⊑ ⊓Bi ∈S(A) Bi for each concept name A, and then employ a simplified version of the enhanced traversal method [3] using told subsumer information and some of the optimizations described in [12] to compute the subsumption DAG from the resulting TBox. The time required by CEL for computing subsumption DAGs is very small. For example, even in the case of O Snomed , which has almost 380,000 concepts and huge subsumer sets, it takes only 9 seconds. This is negligible compared to the time needed to compute the subsumer sets. In particular, if we add this time to CEL’s run-time on O Snomed in Table 1, CEL is still more than twice as fast as FaCT++ . There is an obvious alternative to first computing the full subsumer sets, and only then deriving the subsumption DAG from them: we could modify our classification algorithm, which computes the whole subsumption hierarchy, into a subsumption algorithm that answers only a single subsumption query, and then use this subsumption algorithm inside a standard enhanced traversal algorithm as described in [3]. We have experimented with this strategy, which is closer to the approach employed by tableau-based systems. To turn our algorithm into a subsumption algorithm, we have developed a goal-directed variant of it, which is based on activating a concept name if computing its subsumer set is required for answering the subsumption question at hand. If the aim is to answer the subsumption query A ⊑?O B, then initially only A is activated. Intuitively, completion rules are only applied to activated names. We activate a concept name B ′ whenever B ′ is the second component of a tuple added to some R(r). The set S(A′ ) and the queue of A′ is initialized only when the concept name becomes activated, and thus the subsumer sets of concept names that do not become activated are not populated by the algorithm. During the construction of the whole subsumption DAG, the enhanced traversal procedure makes repeated calls to the subsumption algorithm. To avoid redoing work, we retain the already 24 Long Papers procedure compute-dag for all concept names X ∈ CN⊤ O do classified(X) := false parents(X) := children(X) := equivalents(A) := ∅ for each concept name A ∈ CN⊤ O do if not classified(A) then dag-classify(A); end; procedure dag-classify(A) candidates := ∅; for all subsumers B ∈ S(A) do if A ∈ S(B) then classified(B) := true; equivalents(A) := equivalents(A) ∪ {B}; else if not classified(B) then dag-classify(B); candidates := candidates ∪ {B}; dag-insert(A, candidates); classified(B) := true; end; procedure dag-insert(A, candidates) marked(X) := false for all X ∈ CN⊤ O; for all B ∈ candidates do for all X ∈ parents(B) do marked(X) := true while there are X, Y ∈ CN⊤ O with marked(X), Y ∈ parents(X), and not marked(Y ) do marked(Y ) := true parents(A) := {B ∈ candidates | marked(B) = false}; for all B ∈ parents(A) do children(B) := children(B) ∪ {A}; end; Figure 4: Computing the DAG from the subsumer sets computed parts of the mappings S(·) and R(·) for such repeated calls. However, our current implementation of this idea cannot compete with the runtime of the original CEL implementation described before. For example, the classification of O Snomed takes 3,750 seconds. This is still slightly better than Proceedings of DL 2006 25 the performance of FaCT++ , but more than twice of the 1,791 seconds needed when first computing the subsumer sets and then constructing the subsumption DAG. The reason is probably that, in sum, the single subsumption tests do the same work as the full classification algorithm, but then there is the additional overhead of the enhanced traversal method (which is more complicated than the simplified version employed to compute the subsumption DAG from the subsumer sets). 5 Conclusion The performance evaluations show that our tractable reasoner CEL outperforms modern reasoners for intractable DLs based on tableau algorithms. It should be noted that the good performance of CEL is achieved with a relatively straightforward implementation of the tractable algorithm, whereas the tableau-based systems are the result of many years of research into optimization techniques. The robustness and scalability of tractable reasoning is visible in the case of Snomed, which comprises almost 380,000 concept definitions. Only CEL and FaCT++ can classify this terminology, whereas RacerMaster, Pellet, and the original version of FaCT fail. Additionally, FaCT++ shows a significant degradation in performance if Snomed, which is an acyclic TBox, is extended with GCIs. In contrast, the runtime of CEL is not noticeably affected by such an extension. Developing CEL is ongoing work. We plan to extend its capabilities to the DL EL++ [2], which includes, among other things, nominals and the bottom concept (thus one can express ABoxes and disjoint concepts). We also plan to implement DIG and OWL interfaces,6 so that CEL can be used as a backend reasoner for ontology editors like OilEd7 and Protégé,8 which would also make their sophisticated graphical user-interfaces available to users of CEL. References [1] F. Baader. Terminological cycles in a description logic with existential restrictions. In Proc. IJCAI’03, 2003. [2] F. Baader, S. Brandt, and C. Lutz. Pushing the EL envelope. In Proc. IJCAI’05, 2005. [3] F. Baader, E. Franconi, B. Hollunder, B. Nebel, and H.-J. Profitlich. An empirical analysis of optimization techniques for terminological representation systems or: Making KRIS get a move on. Applied Artificial Intelligence, 4:109–132, 1994. 6 See http://dl.kr.org/dig/ and http://www.w3.org/2004/OWL/ See http://oiled.man.ac.uk/ 8 See http://protege.stanford.edu/ 7 26 Long Papers [4] F. Baader, C. Lutz, and B. Suntisrivaraporn. Is tractable reasoning in extensions of the description logic EL useful in practice? In Proc. M4M’05, 2005. [5] R. J. Brachman and H. J. Levesque. The tractability of subsumption in framebased description languages. In Proc. AAAI’84, 1984. [6] S. Brandt. Polynomial time reasoning in a description logic with existential restrictions, GCI axioms, and—what else? In Proc. ECAI’04, 2004. [7] D. Calvanese, G. De Giacomo, D. Lembo, M. Lenzerini, and R. Rosati. DL-Lite: Tractable description logics for ontologies. In Proc. AAAI’05, 2005. [8] The Gene Ontology Consortium. Gene Ontology: Tool for the unification of biology. Nature Genetics, 25:25–29, 2000. [9] R. Cote, D. Rothwell, J. Palotay, R. Beckett, and L. Brochu. The systematized nomenclature of human and veterinary medicine. Technical report, SNOMED International, Northfield, IL: College of American Pathologists, 1993. [10] W. F. Dowling and J. Gallier. Linear-time algorithms for testing the satisfiability of propositional horn formulae. J. Logic Programming, 1(3):267–284, 1984. [11] I. Horrocks and U. Sattler. Decidability of SHIQ with complex role inclusion axioms. Artificial Intelligence, 160(1–2):79–104, 2004. [12] I. Horrocks and D. Tsarkov. Optimised classification for taxonomic knowledge bases. In Proc. DL’05, 2005. [13] B. Nebel. Terminological reasoning is inherently intractable. Artificial Intelligence, 43:235–249, 1990. [14] A. Rector and I. Horrocks. Experience building a large, re-usable medical ontology using a description logic with transitivity and concept inclusions. In Proc. Ontological Engineering Workshop, AAAI Spring Symposium, 1997. [15] K.A. Spackman. Managing clinical terminology hierarchies using algorithmic calculation of subsumption: Experience with SNOMED-RT. J. of the American Medical Informatics Association, 2000. Fall Symposium Special Issue. [16] B. Suntisrivaraporn. Optimization and implementation of subsumption algorithms for the description logic EL with cyclic TBoxes and general concept inclusion axioms. Master thesis, TU Dresden, Germany, 2005. 27 Proceedings of DL 2006 DL Actions with GCIs: a Pragmatic Approach H. Liu1 , C. Lutz1 , M. Miličić1 , F. Wolter2 1 2 Institut für Theoretische Informatik Department of CS TU Dresden, Germany Univ. of Liverpool, UK lastname@tcs.inf.tu-dresden.de frank@csc.liv.ac.uk Abstract We recently proposed action formalisms based on description logics (DLs) as decidable fragments of well-established action theories such as the Situation Calculus and the Fluent Calculus. One short-coming of our initial proposal is that the considered formalisms admit only acyclic TBoxes, but not GCIs. In this paper, we define DL action formalisms that admit GCIs, propose a pragmatic approach to addressing the ramification problem that is introduced in this way, show that our formalim is decidable and investigate its computational complexity. 1 Introduction Action theories such as the Situation Calculus (SitCalc) and the Fluent Calculus aim at describing actions in a semantically adequate way [8, 10]. They are usually formulated in first- or higher-order logic and do not admit decidable reasoning. For reasoning about actions in practical applications, such theories are thus not directly suited. There are two obvious ways around this problem: the first one is to accept undecidability and replace reasoning by programming. This route is taken by the inventors of action-oriented programming languages such as Golog [3] and Flux [11], whose semantics is based on the SitCalc and Fluent Calculus, respectively. The second one is to try to identify fragments of action theories such as SitCalc that are sufficiently expressive to be useful in applications, but nevertheless admit decidable reasoning. For example, a simple such fragment is obtained by allowing only propositional logic for describing the state of the world and pre- and post-conditions of actions. A much more expressive formalism was identified in our recent paper [1], where we define action formalisms that are based on description logics (DLs). More precisely, we use DL ABoxes to describe the state of the world and pre- and post-conditions of actions 28 Long Papers and prove that reasoning in the resulting formalism is decidable [1]. We also show in [1] that, in this way, we actually get a decidable fragment of SitCalc. However, the DL action formalism defined in [1] has two major limitations: first, we only admit acyclic TBoxes, but no general TBoxes involving GCIs. And second, we allow only concept names (but no complex concepts) in post-conditions and additionally stipulate that these concept names are not defined in the TBox. In the present paper, we present a pragmatic approach to overcoming these limitations while retaining decidability of reasoning. In particular, we show how to incorporate general TBoxes into DL action formalisms. Since there is no clear notion of a concept name “being defined” in a general TBox, we also drop the second restriction and admit arbitrary concepts in post-conditions. The main reason for adopting the mentioned restrictions in [1] was that they disarm the frame and ramification problem, which pose major difficulties in reasoning about actions. When admitting general TBoxes, in particular the ramification problem becomes a serious issue. Attempts to automatically solve this problem, e.g. by adopting a Winslett-style PMA semantics [14], lead to semantic and computational problems: we show in [1] that counter-intuitive results and undecidability of reasoning are the consequence of adopting such a semantics. Since there appears to be no general automated solution to the ramification problem introduced by general TBoxes, we take a rather pragmatic approach and leave it to the designer of an action description to fine-tune the ramifications of the action. This is similar to what is done in the SitCalc and the Fluent Calculus to address the ramification problem. There, the designer of an action description can control the ramifications of the action by specifying causal relationships between predicates [4, 9]. While causality appears to be a satisfactory approach for addressing the ramification problem in the case of propositional state constraints (which correspond to a TBox formulated in propositional logic), it seems not powerful enough for attacking the ramifications introduced by general TBoxes, which may involve complex quantification patterns. We therefore adopt a different strategy for controlling ramifications: when describing an action, the user can specify the predicates that can change by executing the action, as well as those that cannot change. To allow an adequate fine-tuning of ramifications, we admit rather complex statements about the change of predicates such as “the concept name A can change from positive to negative only at the indidivual a, and from negative to positive only where the complex concept C was satisfied before the action was executed”. The family of action formalisms introduced in this paper can be parameterized with any description logic. We show that, for many standard DLs, the reasoning problems executability and projection in the corresponding action formalism are decidable. We also pinpoint the exact computational complexity of these reasoning problems for several members of the ALCQIO family of DLs. As a rule of thumb, our results show that reasoning in the action formalism Proceedings of DL 2006 29 instantiated with a description logic L is of the same complexity as subsumption in L extended with nominals. For fine-tuning ramifications, deciding the consistency of actions is of prime importance. We introduce two notions of consistency (weak and strong) and show that one of them is of the same complexity as deciding projection while the other one is undecidable even when the action formalism is instantiated with ALC. 2 Describing Actions The action formalism proposed in this paper is an extension of the one from [1] and is not restricted to a particular DL. However, for our complexity results we consider the DL ALCQIO and its fragments. We refrain from introducing the syntax and semantics of ALCQIO in full detail, referring e.g. to [2], and only give a few central definitions. A concept literal is a concept name or the negation thereof, and a role literal is a role name or the negation thereof. An ABox assertion is of the form C(a) or r(a, b), where a, b are individual names, C is a concept, and r a role literal. An ABox A is a finite set of ABox assertions. A general concept inclusion axiom (GCI) is an expression of the form C ⊑ D, where C and D are an concepts. A (general) TBox T is a finite set of GCIs. The main ingredients of our approach to reasoning about actions are action descriptions (as defined below), ABoxes for describing the current knowledge about the state of affairs in the application domain, and TBoxes for describing general knowledge about the application domain similar to state constraints in the SitCalc and Fluent Calculus. On the semantic side, interpretations are used to describe the state of affairs in the application domain. Thus, the knowledge described by an ABox is incomplete: ABoxes may admit more than a single model, and all the corresponding states of affairs are considered possible. Before we go deeper into the semantics, we introduce the syntax of action descriptions. We use LO to denote the extension of a description logic L with nominals. Definition 1 (Action). Let L be a description logic. An atomic L-action α = (pre, occ, post) consists of • a finite set pre of L-ABox assertions, the pre-conditions; • the occlusion pattern occ which is a set of mappings {occϕ1 , . . . , occϕn } indexed by L-ABox assertions ϕ1 , . . . , ϕn such that each occϕi assigns – to every concept literal A an LO-concept occϕi (A), – to every role literal r a finite set occϕi (r) of pairs of LO-concepts. • a finite set post of conditional post-conditions of the form ϕ/ψ, where ϕ and ψ are L-ABox assertions. A composite L-action is a finite sequence of atomic L-actions α1 , . . . , αn . 30 Long Papers Applying an action changes the state of affairs, and thus transforms an interpretation I into an interpretation I ′ . Intuitively, the pre-conditions specify under which conditions the action is applicable. The post-condition ϕ/ψ says that, if ϕ is true in the original interpretation I, then ψ is true in the interpretation I ′ obtained by applying the action. The purpose of the occlusion pattern is to control the changes that are allowed to occur during the execution of the action. This is necessary because, as will be discussed in more detail later, the presence of TBoxes often requires to allow more changes than those that are directly enforced via the post-conditions. To illustrate how the occlusion pattern works, suppose occ = {occϕ1 , . . . , occϕn } and ϕi1 , . . . , ϕim are the assertions among the indexes in occ that are true in the original interpretation I. If A is a concept name, then instances of the concept occϕi1 (A) ⊔ · · · ⊔ occϕim (A) in I may change from A in I to ¬A in I ′ , but non-instances may not. Likewise, instances of occϕi1 (¬A) ⊔ · · · ⊔ occϕim (¬A) may change from ¬A to A. For role names, (C, D) ∈ occϕik (r) means that pairs from C I × DI that have been connected by r in I may lose this connection in I ′ , and similarly for the occlusion of negated role names. Note that the indexing of the mappings occϕ with ABox assertions makes the occlusions conditional: the occlusion occϕ is only active if ϕ is satisfied by the original interpretation I. We will explain later why nominals are always admitted in the occlusion pattern, even if they are not provided by L. For defining the semantics in a succinct way, it is convenient to introduce the following abbreviation. For an action α with occ = {occϕ1 , . . . , occϕn }, an interpretation I, a concept literal A, and a role literal r, we set S (occϕi (A))I (occ(A))I := I|=ϕi S (C I × DI ) (occ(r))I := (C,D)∈occϕi (r),I|=ϕi Thus, occ(B)I describes those elements of ∆I that may change from B to ¬B when going to I ′ . Definition 2 (Action semantics). Let α = (pre, occ, post) be an atomic action and I, I ′ interpretations sharing the same domain and interpretation of all individual names. We say that α may transform I to I ′ w.r.t. a TBox T (I ⇒Tα I ′ ) iff the following holds: • I, I ′ are models of T ; • for all ϕ/ψ ∈ post: I |= ϕ implies I ′ |= ψ (written I, I ′ |= post); 31 Proceedings of DL 2006 • for each A ∈ NC and r ∈ NR , we have ′ AI \ AI ⊆ (occ(A))I ′ rI \ rI ⊆ (occ(r))I ′ ¬AI \ ¬AI ⊆ (occ(¬A))I ′ ¬rI \ ¬rI ⊆ (occ(¬r))I The composite action α1 , . . . , αn may transform I to I ′ w.r.t. T (I ⇒Tα1 ,...,αn I ′ ) iff there are models I0 , . . . , In of T with I = I0 , I ′ = In , and Ii−1 ⇒Tαi Ii for 1 ≤ i ≤ n. We now give a simple example for DL actions that illustrates the ramification problem introduced by general TBoxes and how occlusion patterns can be used to control this problem. The TBox T contains the following GCI, which says that everybody registered for a course has access to the university library: ∃registered for.Course ⊑ ∃access to.Library The ABox A, which describes the current state of the world, is defined as: Course(cs), ¬∃registered for.Course(peter), ¬∃access to.Library(peter). Obviously, A states that computer science is a course and that Peter is neither registered for a course nor has access to a library. Now, the action α := (∅, occ, {taut/registered for(peter, cs)}) describes the registration of Peter for the computer science course. For simplicity, the set of pre-conditions is empty and taut is some valid ABox assertion (say ⊤(cs)), i.e., the post-condition is unconditional. Following the law of inertia, it may seem reasonable to specify occ such that only the fact stated explicitly in the post-condition can change when executing the action: occ consists of just one (unconditional) mapping occtaut which maps all concept and role literals with the exception of ¬registered for to ⊥ and {(⊥, ⊥)}, respectively. By setting occtaut (¬registered for) := {({peter}, {cs})}, where {peter} and {cs} are nominals, we achieve the desired effect that only the pair (peter, cs) can be added to “registered for”, and nothing else can be changed. This shows why nominals are indispensible in the occlusion pattern: without them, we are not able to occlude only the change that is enforced by simple post-conditions such as the one in the example. However, our choice of the occlusion pattern is too strict. Due to the presence of the TBox, the action is inconsistent in the sense that there is no model I of A and T such that I ⇒Tα I ′ for some model I ′ of T . The reason is that, due to T , 32 Long Papers Peter should have access to a library after execution of the action. Since he does not have access before the action and the occlusion pattern does not allow us to change access to, there is no way to achieve this. This shows that admitting general TBoxes induces a ramification problem: there may be indirect effects of an action that are not directly stated in the post-conditions. Such ramifications, which led us to introducing occlusion patterns in the current paper, cannot occur in the more basic DL action formalism introduced in [1] where we admit only acyclic TBoxes and primitive concepts in post-conditions. An obvious way to regain consistency of the action α is to allow via the occlusion pattern that access to can change in the required way, i.e., setting occtaut (¬access to) := {({peter}, Library)} and thus allow Peter to have access to a library after the action. In the example above, for simplicity we did not use conditional post-conditions, i.e., conditions ϕ/ψ where ϕ is not taut. For this reason, it was sufficient that occ consists of a single (unconditional) mapping as well. Obviously, controlling the ramifications of conditional post-conditions requires occlusion patterns that are conditional as well. The above example suggests that deciding consistency of an action is an important task because failure to specify the occlusion pattern in a proper way can result in inconsistent actions. In the following, we propose two notions of consistency. Definition 3 (Consistency). Let α = α1 , . . . , αn be a composite action, let T be a TBox, and A an ABox. We say that • α is weakly consistent with T and A iff there is a model I of T and A, and a model I ′ of T such that I ⇒Tα I ′ . • α is strongly consistent with T and A iff for all models I of T and A, there is a model I ′ of T such that I ⇒Tα I ′ . Ideally, the designer of an action α = (pre, occ, post) should establish strong consistency of α w.r.t. the relevant TBox and the ABox pre. Note that strong consistency of an action α w.r.t. T and pre implies strong consistency of α w.r.t. T and A for all ABoxes A that satisfy the preconditions pre. Unfortunately, we shall show later that strong consistency is undecidable even for ALC actions. In contrast, weak consistency will turn out to be decidable. As demonstrated by our example, in which the first attempt to specify occ yields an action that is not even weakly consistent, checking for weak consistency is helpful to detect severe ramfication problems. In the case of weak consistency, consistency w.r.t. pre does not imply consistency w.r.t. all ABoxes satisfying the pre-conditions. Hence, the designer of an action should not only consider the ABox pre when Proceedings of DL 2006 33 checking weak consistency, but also additional ABoxes that he considers typical for the application domain. To check whether an action can be applied in a given situation, the user wants to know whether it is (strongly consistent and) executable, where executable means that all pre-conditions are satisfied in the states of the world considered possible. If the action is executable, he wants to know whether applying it achieves the desired effect, i.e., whether an assertion that he wants to make true really holds after executing the action. This problem is usually called projection [8, 1]. Definition 4 (Executability and projection). Let α1 , . . . , αn be a composite action with αi = (prei , occi , posti ) for i = 1, . . . , n, let T be a TBox, and A an ABox. • Executablity: α1 , . . . , αn is executable in A w.r.t. T iff the following conditions are true for all models I of A and T : – I |= pre1 – for all i with 1 ≤ i < n and all interpretations I ′ with I ⇒Tα1 ,...,αi I ′ , we have I ′ |= prei+1 . • Projection: The assertion ϕ is a consequence of applying α1 , . . . , αn in A w.r.t. T iff for all models I of A and T and for all I ′ with I ⇒Tα1 ,...,αn I ′ , we have I ′ |= ϕ. It is not too difficult to see that the action formalism just introduced is a generalization of the one introduced in [1], for details see [5]. As in [1], projection and executability are mutually reducible in polynomial time. Moreover, (i) an action α is weakly consistent with a TBox T and ABox A iff ⊥(a) is not a consequence of applying α in A w.r.t. T ; and (ii) ϕ is a consequence of applying α = (pre, occ, post) in A w.r.t. T iff the action (pre, occ, post∪{⊤(a)/¬ϕ}) is not weakly consistent with T and A. Thus, since both executability and weak consistency can be reduced to (non-)projection and vice versa, we will concentrate on the latter throughout this paper. 3 Deciding Projection in ALCQI and ALCQIO We consider the prominent DLs ALCQI and ALCQIO and show that projection is co-NExpTime-complete. It is shown in [5] that Lemma 8 of [1] implies the following. Theorem 5. Projection and executability (weak consistency) in ALCQI are coNExpTime-hard ( NExpTime-hard) even if occlusions for roles are restricted to {(⊥, ⊥)} and only nominals are allowed in the occlusions of concept names. 34 Long Papers Note that projection in ALCQI is thus harder than subsumption in the same logic, which is ExpTime-complete [13]. In the case of ALCQIO, the complexities of subsumption and projection coincide. Intuitively (and as shown by the proof of Theorem 5), projection in a logic L should be expected to be of the same complexity as subsumption in L extended with nominals. In the following, we establish a matching co-NExpTime upper bound for projection in ALCQIO (and thus also ALCQI). The proof proceeds by reducing projection in ALCQIO to ABox (in)consistency in ALCQIO ¬,∩,∪ , i.e. the extension of ALCQIO with the Boolean role constructors. Let α1 , . . . , αn be a composite action with αi = (prei , occi , posti ) for i = 1, . . . , n, and let T be a TBox, A0 an ABox and ϕ0 an assertion. We are interested in deciding whether ϕ0 is a consequence of applying α1 , . . . , αn in A0 w.r.t. T . In what follows, we call α1 , . . . , αn , T , A0 and ϕ0 the input. W.l.o.g., we make the following assumptions: • ϕ0 is of the form ϕ0 = C0 (a0 ), where C0 is a (possibly complex) concept. This assumption can be made because an assertion r(a, b) can be replaced with (∃r.{b})(a), and ¬r(a, b) with (¬∃r.{b})(a). • Each occlusion pattern occi contains exactly one occlusion pattern that is unconditional (i.e., indexed by taut) and formulated in ALCQIO ¬,∩,∪ . An occlusion pattern {occϕ1 , . . . , occϕn } can be converted into an occlusion pattern {occtaut } formulated in ALCQIO ¬,∩,∪ as follows. First, we may assume w.l.o.g. that ϕi is of the form Ci (ai ) for 1 ≤ i ≤ n (see previous point). For 1 ≤ i ≤ n, let Pi denote the concept ∀U.({ai } → Ci ), where U denotes the universal role, i.e. r ∪ ¬r for some r ∈ NR . Then, define for each concept literal A ¢ occtaut (A) := (Pi ⊓ occϕi (A) ⊔ 1≤i≤n Likewise, for each role literal r, define occtaut (r) := {(Pi ⊓ C, Pi ⊓ D) | (C, D) ∈ occϕi }. Having the occlusion pattern formulated in ALCQIO ¬,∩,∪ is unproblematic since our reduction is to ALCQIO ¬,∩,∪ anyway. In the following, we slightly abuse notation and confuse the singleton set occi with the (unconditional) occlusion mapping contained in it. The idea of the reduction is to define an ABox Ared and a TBox Tred such that a single model of them encodes a sequence of interpretations I0 , . . . , In such that I0 |= A0 , T and Ii−1 ⇒Tαi Ii for i = 1, . . . , n. In the following, we use Sub to denote the set of subconcepts of the concepts which occur in the input. In the 35 Proceedings of DL 2006 reduction, we introduce concept names A(i) and role names r (i) for every concept name A and every role name r used in the input, and every i ≤ n. Intuitively, A(i) and r(i) represent the extensions of A and r in the i-th interpretation. For a complex concept C ∈ Sub, we use C (i) , for i ≤ n, to denote the concept obtained by replacing all concept names A and role names r occurring in C by A(i) and r(i) respectively. We start by assembling the reduction ABox Ared . First, define a “copy” Aini of the input ABox A0 as: Aini := {C (0) (a) | C(a) ∈ A0 }∪ {r(0) (a, b) | r(a, b) ∈ A0 } ∪ {¬r (0) (a, b) | ¬r(a, b) ∈ A0 } Then, introduce abbreviations, for i ≤ n: pi (C(a)) := ∀U.({a} → C (i) ), pi (r(a, b)) := ∀U.({a} → ∃r (i) .{b}), pi (¬r(a, b)) := ∀U.({a} → .∀r (i) .¬{b}), Now we can define the components of Ared that take care of post-condition satisfaction. For 1 ≤ i ≤ n, we define: ¡ ¢ (i) Apost := { pi−1 (ϕ) → pi (ψ) (a0 ) | ϕ/ψ ∈ posti } We assemble Ared as Ared := Aini ∪ [ (i) Apost . 1≤i≤n Next, we define the components of the TBox Tred . Since all interpretations I0 , . . . , In have to be models of the input TBox T , we define for each i ≤ n, a copy T (i) of T in the obvious way: T (i) = {C (i) ⊑ D(i) | C ⊑ D ∈ T }. (i) (i) To deal with occlusions, we introduce auxiliary role names rDom(C) and rRan(D) for 0 ≤ i < n and all concepts C, D such that (C, D) ∈ occi (s) for some role (i) (i) (i) literal s. The following TBox Taux ensures that rDom(C) and rRan(D) are interpreted as C (i) × ⊤ and ⊤ × D (i) , respectively. It contains the following axioms, for all concepts C, D as above: (i) C (i) ⊑ ∀¬rDom(C) .⊥ (i) ¬C (i) ⊑ ∀rDom(C) .⊥ (i) (i) ⊤ ⊑ ∀rRan(D) .D(i) (i) ⊤ ⊑ ∀¬rRan(D) .¬D(i) The following TBox Tfix ensures that concept and role names do not change unless this is allowed by the occlusion pattern: 36 Long Papers • for every concept name A in the input, A(i) ⊓ ¬A(i+1) ⊑ (occi+1 (A))(i) ¬A(i) ⊓ A(i+1) ⊑ (occi+1 (¬A))(i) • for every role name r in the input, ³ ´ [ (i) (i) ⊤ ⊑ ∀¬ (rDom(C) ∩ rRan(D) ) ∩ (r(i) ∩ ¬r(i+1) ).⊥ ⊤ ⊑ ∀¬ ³ (C,D)∈occi+1 (r) [ (C,D)∈occi+1 (¬r) ´ (i) (i) (rDom(C) ∩ rRan(D) ) ∩ (¬r (i) ∩ r(i+1) ).⊥ Finally, we can construct Tred as [ [ (i) [ (i) Tred := T (i) ∪ Taux ∪ Tfix . 0≤i≤n 0≤i<n 0≤i<n The following is shown in [5]: Lemma 6. C0 (a0 ) is a consequence of applying α1 , . . . , αn in A0 w.r.t. T iff (n) Ared ∪ {¬C0 (a0 )} is inconsistent w.r.t. Tred . Since ALCQIO ¬,∩,∪ is a fragment of C 2 (the 2-variable fragment of first-order logic with counting), ABox inconsistency in ALCQIO ¬,∩,∪ is in co-NExpTime even if numbers are coded in binary [7]. Since Ared and Tred are polynomial in the size of the input, Lemma 6 gives us a co-NExpTime upper bound for projection in ALCQIO and ALCQI. Theorem 7. Projection and executability are co-NExpTime-complete, while weak consistency is NExpTime-complete in ALCQIO and ALCQI. 4 Undecidability of Strong Consistency Here we show that strong consistency is undecidable. The proof consists of a reduction of the undecidable semantic consequence problem from modal logic. Before formulating the DL version of this problem, we need some preliminaries. We use concepts and interpretations with only one role name r, which we call ALC r -concepts. Accordingly, we also assume that interpretations interprete only concept names and the role name r. A frame is a structure F = (∆F , rF ) where ∆F is a non-empty set and r F ⊆ ∆F × ∆F . An interpretation I = (∆I , ·I ) is based on a frame F iff ∆I = ∆F and rI = rF . We say that a concept C is valid on F (written F |= C) iff C I = ∆I for every interpretation I based on F. Definition 8 (Semantic consequence problem). Let D and E be ALC r concepts. We say that E is a semantic consequence of D iff for every frame F = (∆F , rF ) such that F |= D, it holds that F |= E. Proceedings of DL 2006 37 In [12], it is proved that for ALC r -concepts D and E, the problem “Is E a semantic consequence of D?” is undecidable. We now show that the semantic consequence problem can be reduced to strong consistency. For ALC r -concepts D and E, we define the ABox AE := {¬E(a)} and the atomic action αD = (∅, {occtaut }, post) with post := {⊤(a)/(∃u.¬D)(a)} where u is an arbitrary role name and occtaut maps r and ¬r to {(⊥, ⊥)}, all other role literals to {(⊤, ⊤)}, and all concept literals to ⊤. Then the action αD is strongly consistent with the empty TBox and the ABox AE iff E is a semantic consequence of D [5]. As an immediate consequence, we obtain the following theorem. Theorem 9. Strong consistency of ALC-actions is undecidable, even with the empty TBox. 5 Discussion We have introduced an action formalism based on description logics that admits general TBoxes and complex post-conditions. To deal with ramifications induced by general TBoxes, the formalism includes powerful occlusion patterns that can be used to fine-tune the ramifications. We believe that undecidability of strong consistency is no serious obstacle for the feasibility of our approach in practice. Although deciding strong consistency would provide valuable support for the designer of an action, it could not replace manual inspection of the ramifications. For example, occluding all concept names with ⊤ and all role names with {(⊤, ⊤)} usually ensures strong consistency but does not lead to an intuitive behaviour of the action. With weak consistency, we offer at least some automatic support to the action designer for detecting ramification problems. In [6], we investigate the complexity of reasoning with DL actions for other fragments of ALCQIO, most notably ALC, ALCI, and ALCIO. It turns out that, in these logics, deciding projection (as well as executability and weak consistency) is ExpTime-complete, which is in accordance with the observation that, usually, reasoning with L-actions has the same complexity as subsumption in L extended with nominals. In [5], we also show how reasoning with a restricted version of ALCQIO actions can be reduced to reasoning in ALCQIO instead of ALCQIO ¬,∩,∪ . This is relevant since reasoners for the former (but not for the latter) are readily available. Acknowledgements. We would like to thank Giuseppe De Giacomo for ideas and discussions. The third author is supported by the DFG Graduiertenkolleg 334. The fourth author is partially supported by UK EPSRC grant no. GR/S63182/01. 38 Long Papers References [1] F. Baader, C. Lutz, M. Milicic, U. Sattler, and F. Wolter. Integrating description logics and action formalisms: First results. In Proc. of (AAAI05), Pittsburgh, PA, USA, 2005. [2] F. Baader, D. L. McGuiness, D. Nardi, and P. Patel-Schneider. The Description Logic Handbook: Theory, implementation and applications. Cambridge University Press, 2003. [3] H. J. Levesque, R. Reiter, Y. Lespérance, F. Lin, and R. B. Scherl. GOLOG: A logic programming language for dynamic domains. J. Log. Program., 31(1-3):59–83, 1997. [4] F. Lin. Embracing causality in specifying the indirect effects of actions. In Proc. of IJCAI-95, Montreal, Canada, 1995. Morgan Kaufmann. [5] H. Liu, C. Lutz, M. Milicic, and F. Wolter. Description logic actions with general TBoxes: a pragmatic approach. LTCS-Report 06-03, TU Dresden, Germany, 2006. See http://lat.inf.tu-dresden.de/research/reports.html. [6] H. Liu, C. Lutz, M. Milicic, and F. Wolter. Description logic actions with general TBoxes: a pragmatic approach. Submitted to JELIA’06, 2006. [7] I. Pratt-Hartmann. Complexity of the two-variable fragment with counting quantifiers. Journal of Logic, Language and Inf., 14(3):369–395, 2005. [8] R. Reiter. Knowledge in Action. MIT Press, 2001. [9] M. Thielscher. Ramification and causality. Artificial Intelligence Journal, 89(1–2):317–364, 1997. [10] M. Thielscher. Introduction to the Fluent Calculus. Electronic Transactions on Artificial Intelligence, 2(3–4):179–192, 1998. [11] M. Thielscher. FLUX: A logic programming method for reasoning agents. TPLP, 5(4-5):533–565, 2005. [12] S. K. Thomason. The logical consequence relation of propositional tense logic. Z. Math. Logik Grundl. Math., 21:29–40, 1975. [13] S. Tobies. The complexity of reasoning with cardinality restrictions and nominals in expressive description logics. Journal of Artificial Intelligence Research, 12:199–217, 2000. [14] M. Winslett. Reasoning about action using a possible models approach. In AAAI, pages 89–93, Saint Paul, MN, 1988. 39 Proceedings of DL 2006 Discrete Tableau Algorithms for FSHI ∗ Yanhui Li1 , Baowen Xu1,2 , Jianjiang Lu3 and Dazhou Kang1 1 3 School of Computer Science and Engineering, Southeast University, Nanjing 210096, China 2 Jiangsu Institute of Software Quality, Nanjing 210096, China Institute of Command Automation, PLA University of Science and Technology, Nanjing 210007, China bwxu@seu.edu.cn Abstract A variety of fuzzy description logics are proposed to extend classical description logics with fuzzy capability. However, reasoning with general TBoxes is still an open problem in fuzzy description logics. In this paper, we present a novel discrete tableau algorithm for a given fuzzy description logic FSHI with general TBoxes, which tries to construct discrete tableaus of FSHI knowledge bases. We prove the equivalence of existence between discrete tableaus and models of FSHI knowledge bases, hence getting that the discrete tableau algorithm is a sound and complete decision procedure for FSHI reasoning problems with general TBoxes. 1 Introduction Increasing demands for fuzzy knowledge representation have triggered a variety of fuzzy extensions of description logics (DLs) that make them convenient to express knowledge in fuzzy cases. Straccia adopted fuzzy interpretations to propose a representative fuzzy extension FALC of ALC, and designed a tableau algorithm for acyclic TBoxes [9]. Based on FALC, Höldobler et al proposed membership manipulator constructors to define new fuzzy concepts [2]. Fuzzy extensions of more expressive DLs like ALCQ and SHOIN (D) were presented ∗ This work was supported in part by the NSFC (60373066, 60425206 and 90412003), National Grand Fundamental Research 973 Program of China (2002CB312000), Excellent Ph.D. Thesis Fund of Southeast University, Advanced Armament Research Project (51406020105JB8103), High Technology Research Project of Jiangsu Province (BG2005032) and Advanced Armament Research Project (51406020105JB8103). 40 Long Papers in [6,11], but there were no reasoning algorithms for them. The concrete domains were also introduced into fuzzy DLs with an optimized reasoning technique in FALC(D) [10]. Stoilos et al extended Straccia’s fuzzy framework into OWL, hence getting a fuzzy ontology language: Fuzzy OWL [8]. They also gave a reasoning technique to deal with ABox consistency without TBoxes. Though the fuzzy extension of DLs has done a lot, reasoning with general TBoxes is still an open problem in fuzzy DLs. In this paper, we will propose a novel discrete tableau algorithm for satisfiability of FSHI knowledge bases (KBs) with general TBoxes. The remaind of this paper is organized as follows. A brief introduction to FSHI KBs will be given in section 2. The main theoretical foundation of our discrete tableau algorithms is the discretization of fuzzy models, which will be discussed in section 3. Following that, we will present the definition of discrete tableaus and the expansion rules of discrete tableau algorithms, and propose a sketch proof of correctness and complexity of our algorithms in section 4. Finally section 5 will conclude this paper and discuss the further work. 2 A Brief Introduction to FSHI FSHI is a complex fuzzy description logic with role hierarchy, transitive and inverse role. Let NC be a set of concept names and R be a set of role names with transitive role names R+ ⊆ R. FSHI roles are either role names R ∈ R or their inverse role R− . FSHI concepts are inductively defined as follows: 1. For any A ∈ NC , A is a concept; 2. The top concept ⊤ and the bottom concept ⊥ are concepts; 3. If C and D are two concepts and R is a role, the ¬C, C ⊓ D, C ⊔ D, ∃R.C and ∀R.C are concepts. One of the main differences between fuzzy DLs and classical DLs is that fuzzy DLs adopt fuzzy interpretations. A fuzzy interpretation I = h∆I , ·I i of FSHI consists of a nonempty domain ∆I and an interpretation function ·I mapping: any individual name a into aI ∈ ∆I any concept name A into AI : ∆I → [0, 1] any role name R into RI : ∆I × ∆I → [0, 1] And for any transitive role name R ∈ R+ , ·I satisfies ∀d, d′ ∈ ∆I , RI (d, d′ ) ≥ supx∈∆I {min(RI (d, x), RI (x, d′ ))}. Intuitively, any concept name A is naturally interpreted as the membership degree function AI w.r.t. ∆I : for any element d ∈ ∆I , AI (d) shows the degree of d being an instance of the fuzzy concept A 41 Proceedings of DL 2006 ⊤I (d) ⊥I (d) (¬C)I (d) (C ⊓ D)I (d) (C ⊔ D)I (d) (∃R.C)I (d) (∀R.C)I (d) (R− )I (d, d′ ) = 1 = 0 = 1 − C I (d) = min(C I (d), DI (d)) = max(C I (d), DI (d)) = supd′ ∈∆I {min(RI (d, d′ ), C I (d′ ))} = inf d′ ∈∆I {max(1 − RI (d, d′ ), C I (d′ ))} = RI (d ′ , d) Figure 1: The Semantics of FSHI under the interpretation I. Similarly for role name R. For complex concepts and inverse roles, ·I satisfies the following conditions (see figure 1): A general TBox T is a finite set of fuzzy general concept inclusions C ⊑ D, where C and D are FSHI concepts. An interpretation I satisfies C ⊑ D iff ∀d ∈ ∆I , C I (d) ≤ DI (d). I satisfies (is a fuzzy model of) a TBox T (written I |= T ) iff I satisfies every inclusion in T . A RBox R is a finite set of fuzzy role inclusions R ⊑ P , where R and P are FSHI roles. An interpretation I satisfies R ⊑ P iff ∀d, d′ ∈ ∆I , RI (d, d′ ) ≤ P I (d, d′ ). I satisfies (is a fuzzy model of) a RBox R (written I |= R) iff I satisfies every inclusion in R. Here we introduce ⊑∗ as the transitive-reflexive closure of ⊑ on R ∪ {R− ⊑ P − |R ⊑ P ∈ R}. An ABox A is a finite set of fuzzy assertions α ⊲⊳ n, where α is an assertion: a : C or ha, bi : R, ⊲⊳ ∈ {≥, >, ≤, <} and n ∈ [0, 1]. I satisfies a fuzzy assertion a:C ≥ n iff C I (aI ) ≥ n. Similarly for other three cases: <, ≤ and >, and role assertions ha, bi : R ⊲⊳ n. I satisfies (is a fuzzy model of) an ABox A (written I |= A) iff I satisfies every fuzzy assertion in A. A FSHI KB K = hT , R, Ai consists of its TBox T , RBox R and ABox A. An interpretation I is a fuzzy model of a KB K (written I |= K), iff I satisfies its TBox, RBox and ABox. K is satisfiable iff there is a fuzzy model of K. In this paper, we will present a discrete tableau algorithm to decide satisfiability of FSHI KBs. 3 Discretization of Fuzzy Models Before discussing discretization of fuzzy models, we analyze troubles of reasoning with general TBoxes in fuzzy DLs: the key question is “why reasoning technique for general TBoxes in classical DLs can not be applied in fuzzy DLs”. To answer this question, we will compare the semantics of fuzzy DLs with classical DLs. In classical DL cases, an individual (a pair of individuals) completely belongs to a concept (a role) or not, that means in classical models any concept (role) will be 42 Long Papers interpreted as two-value degree functions: ∆I (∆I × ∆I ) → { 0, 1}. For any general concept inclusion C ⊑ D and any individual a, classical tableau algorithms nondeterministically “guess” the membership degrees n and m of a being an instance of C and D, for some n, m ∈ {0, 1} and n ≤ m [1]. However, such “guess” technique cannot be directly applied in fuzzy DLs. The main difficulty is that in fuzzy models concepts and roles are interpreted as complex membership degree functions by extending {0, 1} to [0, 1], hence the value of membership degree functions is continuous but not discrete. To solve this problem, we try to design a discretization step to translate fuzzy model into corresponding discrete model, in which any membership degree value belongs to a special discrete degree set. This discretization can enable similar “guess” technique applied in fuzzy DLs. The first issue in discretization of fuzzy models is to decide the special discrete degree set S. Let us now proceed formally in the creation of S. Consider a FSHI KB K = hT , R, Ai. Let NK be the set of degrees appearing in A: NK = {n| α ⊲⊳ n ∈ A}. From NK , we define the degree closure DSK of K as: DSK = {0, 0.5, 1} ∪ NK ∪ {1 − n| n ∈ NK } and sort DSK in ascending order: DSK = {n0 , n1 , . . . , ns }, where for any 0 ≤ i < s, ni < ni+1 . It is easy to prove that n0 = 0 and ns = 1; s is even; and for any 0 ≤ i ≤ s, ni + nn−i = 1. Consider a constant vector M = [ c1 , c2 , . N . . , cs/2 ], where for any ci , 0 < ci < 1. N We define the operation: N SK = DSK M = {m1 , m2 , . . . , ms }, where if i ≤ s/2, mi = ci × ni−1 + (1 − ci ) × ni , otherwise mi = (1 − cs+1−i ) × ni−1 + cs+1−i × ni . Obviously for any 1 ≤ i ≤ s, mi + ms+1−i = 1 and ni−1 < mi < ni . Let S = DSK ∪ N SK , we call S a discrete degree set w.r.t K. Note that |S| = 2s + 1 = O(|NK |) = O(|A|). We also sort degrees of S in ascending order: S = {n0 , m1 , n1 , . . . , ns−1 , ms , ns }. For a fuzzy model Ic of K, if every membership degree value of C Ic ( ) or RIc ( ) belongs to a discrete degree set S, Ic is called a discrete model of K within S. Following theorem guarantees the equivalence between existence of fuzzy models and discrete models of K. Theorem 1 For any K = hT , R, Ai and any discrete degree set S w.r.t K, K has a fuzzy model, iff it has a discrete model within S. Proof.⇒) Let I = h∆I , ·I i be a fuzzy model of K and the degree set S = {n0 , m1 , n1 , . . . , ns−1 , ms , ns }. Consider a translation function ϕ( ) : [ 0, 1] → S: ½ ni if x = ni ϕ(x) = mi if ni−1 < x < ni Here we enumerate some properties of ϕ( ), which are useful for the following proof: for any x ≤ y, ϕ(x) ≤ ϕ(y); for any x < y, if x or y ∈ DSK , ϕ(x) < ϕ(y); and for any x and y, ϕ(1 − x) = 1 − ϕ(x), ϕ(max(x, y)) = max(ϕ(x), ϕ(y)), and ϕ(min(x, y)) = min(ϕ(x), ϕ(y)). Based on ϕ( ), we construct a discrete model Ic = h∆Ic , ·Ic i within S from I = h∆I , ·I i: 43 Proceedings of DL 2006 • The interpretation domain ∆Ic is defined as: ∆Ic = ∆I ; • The interpretation function ·Ic is defined as: for any individual name a, aIc = aI ; for any concept name A and any role name R: AIc ( ) = ϕ(AI ( )) and RIc ( ) = ϕ(RI ( )); and for complex concept C and inverse role R− , their interpretation are recursively defined based on membership degree functions AIc ( ) and RIc ( ) of concept names and role names. 1. For any concept C and role R and any two elements d, d′ ∈ ∆Ic , we show, by induction on the structure of C and R, that C Ic (d) = ϕ(C I (d)) and RIc (d, d′ ) = ϕ(RI (d, d′ )): • Case A: from the construction of Ic , AIc (d) = ϕ(AI (d)); • Case R: the proof is similar to case A; • Case R− : from the semantics of R− in I and Ic , (R− )Ic (d, d′ ) = RIc (d′ , d) = ϕ(RI (d′ , d)) = ϕ((R− )I (d, d′ )) • Case ⊤: for 1 ∈ DSK , ⊤Ic (d) = 1 = ϕ(⊤I (d)); • Case ⊥: the proof is similar to case ⊤; • Case ¬C: from induction, C Ic (d) = ϕ(C I (d)). And from ϕ(1 − x) = 1 − ϕ(x), we have (¬C)Ic (d) = 1 − C Ic (d) = 1 − ϕ(C I (d)) = ϕ(1 − C I (d)) = ϕ((¬C)I (d)) • Case C⊓D: from induction, C Ic (d) = ϕ(C I (d)) and DIc (d) = ϕ(DI (d)). We can get that (C ⊓ D)Ic (d) = min(C Ic (d), DIc (d)) = min(ϕ(C I (d)), ϕ(DI (d))) = ϕ(min(C I (d), DI (d))) = ϕ((C ⊓ D)I (d)) • Case C⊔D: the proof is similar to case C ⊓ D. • Case ∀R.C: let f (d′ ) = max(1 − RI (d, d′ ), C I (d′ )). From definition, (∀R.C)I (d) = infd′ ∈∆I f (d′ ). Assume there is an element d ′′ with the minimal value of f ( ): for any d′ in ∆I , f (d′′ ) ≤ f (d′ )1 . Let f ∗ (d ′ ) = ϕ(f (d ′ )) = ϕ(max(1 − RI (d, d′ ), C I (d′ ))) = max(ϕ(1 − RI (d, d′ )), ϕ(C I (d′ ))) = max(1 − ϕ(RI (d, d′ )), ϕ(C I (d′ ))) = max(1 − RIc (d, d′ ), C Ic (d′ )) 1 The detailed proof of this assumption is given in [5] 44 Long Papers Obviously, for ∀d ′ in ∆Ic , f ∗ (d ′′ ) = ϕ(f (d ′′ )) ≤ ϕ(f (d′ )) = f ∗ (d′ ). Then we get (∀R.C)Ic (d) = infd′ ∈∆Ic f ∗ (d′ ) = f ∗ (d′′ ) = ϕ(f (d′′ )) = ϕ((∀R.C)I (d)) • Case ∃R.C: for ¬(∃R.C) = ∀R.¬C, we can get the proof from case ¬C and ∀R.C. 2. We show Ic is a fuzzy model of K. • Case R ∈ R+ : for I is a fuzzy model of K, ∀d, d′ ∈ ∆I , RI (d, d′ ) ≥ supx∈∆I {RI (d, x), RI (x, d′ )}. Therefore, RIc (d, d′ ) = ϕ(RI (d, d′ )) ≥ supx∈∆I {min(ϕ(RI (d, x)), ϕ(RI (x, d′ )))} = supx∈∆Ic {min(RIc (d, x), RIc (x, d′ ))} • Case C ⊑ D ∈ T : for I is a fuzzy model of K, ∀d ∈ ∆I , C I (d) ≤ DI (d). And from 1, for any concept C, C Ic (d) = ϕ(C I (d)). Therefore, ∀d ∈ ∆Ic , C Ic (d) = ϕ(C I (d)) ≤ ϕ(DI (d)) = DIc (d); • Case R ⊑ S ∈ R: the proof is similar to case C ⊑ D; • Case α ⊲⊳ n ∈ A: here we only focus on a:C ≥ n. For C I (aI ) ≥ n and n ∈ DSK , we can get: C Ic (aIc ) = ϕ(C I (aI )) ≥ ϕ(n) = n From above two points, Ic is a discrete model of K within S. ⇐) Let Ic be a discrete model of K within S. It is also a fuzzy model of K.¤ 4 Discrete Tableau Algorithms This section will talk about discrete tableau algorithms, which try to decide the existence of discrete models of a FSHI KB K by constructing a discrete tableau. Before going into the definition of discrete tableaus, we first introduce some notations. It will be assumed that the concepts appearing in tableau algorithms are written in Negation Normal Form (NNF). And for any concept C, we use nnf(C) to denote its equivalent form in NNF. The set of subconcepts of a concept C is denoted as sub(C). For a KB K, we define sub(K) as the union of all sub(C), when the concept C appears in K. We also make two notions about roles to make the following consideration easier: we use Inv(R) to denote the inverse role of R and Tran(R) as a Boolean value to tell whether R is transitive. Trans(R) =True, iff R or Inv(R) ∈ R+ or there is a role P with (1) P ⊑∗ R and R ⊑∗ P ; and (2) P or Inv(P ) ∈ R+ . Moreover, we use the symbols ⊲ and ⊳ as two placeholders for the inequalities ≥, > and ≤, <, and the symbols ⊲⊳− , ⊲− 45 Proceedings of DL 2006 Table 1: Conjugated pairs h<, mi h≥, ni n≥m h>, ni ¬∃n1 ∈ S with n < n1 < m h≤, mi n>m n≥m and ⊳− to denote the reflections of ⊲⊳, ⊲ and ⊳. For example, ≥ and ≤ are the reflections to each other. Finally, we define h⊲⊳, ni as a degree pair. Two degree pairs h⊲, ni and h⊳, mi are called conjugated, iff they satisfy one of following conditions (see table 1). Now we define the discrete tableau for K. Let RK and OK be the sets of roles and individuals appearing in K. A discrete tableau T for K within a degree set S is a quadruple: hO, L, E, Vi, where • • • • O: a nonempty set of nodes; L: O → 2M , M = sub(K) × {≥, >, ≤, <} × S; E: RK → 2Q , Q = {O × O} × {≥, >, ≤, <} × S; V: OK → O, maps any individual into a corresponding node in O. The discrete tableau has a forest-like structure, which is a collection of trees that correspond to individuals in the ABox A. Every tree consists of nodes standing for the individuals, and edges representing the relations between two nodes (individuals). Each node d is labelled with a set L(d) of degree triples: hC, ⊲⊳, ni, which denotes the membership degree of d being an instance of C ⊲⊳ n. A pair of triple hC, ⊲⊳, ni and hC, ⊲⊳′ , mi are conjugated if h⊲⊳, ni and h⊲⊳′ , mi are conjugated. In a discrete tableau T, for any d, d′ ∈ O, a, b ∈ OK , C, D ∈ sub(K) and R ∈ RK , the following conditions must hold: 1. There are not two conjugated degree triples in L(d); 2. There are not inconsistent triples: h⊥, ≥, ni (n > 0), h⊤, ≤, ni (n < 1), h⊥, >, ni, h⊤, <, ni, hC, >, 1i and hC, <, 0i in L(d); 3. If C ⊑ D ∈ T , then there must be some n ∈ S with hC, ≤, ni and hD, ≥, ni in L(d); 4. If hC, ⊲⊳, ni ∈ L(d), then hnnf(¬C), ⊲⊳− , 1 − ni ∈ L(d); 5. If hC ⊓ D, ⊲, ni ∈ L(d), then hC, ⊲, ni and hD, ⊲, ni ∈ L(d); 6. If hC ⊓ D, ⊳, ni ∈ L(d), then hC, ⊳, ni or hD, ⊳, ni ∈ L(d); 7. If hC ⊔ D, ⊲, ni ∈ L(d), then hC, ⊲, ni or hD, ⊲, ni ∈ L(d); 8. If hC ⊔ D, ⊳, ni ∈ L(d), then hC, ⊳, ni and hD, ⊳, ni ∈ L(d); 9. If h∀R.C, ⊲, ni ∈ L(d),hhd, d′ i, ⊲′ , mi ∈ E(R), and h⊲′ , mi is conjugated with h⊲− , 1 − ni, then hC, ⊲, ni ∈ L(d′ ); 10. If h∀R.C, ⊳, ni ∈ L(d), then there must be a node d′ ∈ O with hhd, d′ i, ⊳− , 1− ni ∈ E(R) and hC, ⊳, ni ∈ L(d′ ); 11. If h∃R.C, ⊲, ni ∈ L(d), then there must be a node d′ ∈ O with hhd, d′ i, ⊲, ni ∈ E(R) and hC, ⊲, ni ∈ L(d′ ); 46 Long Papers 12. If h∃R.C, ⊳, ni ∈ L(d), hhd, d′ i, ⊲′ , mi ∈ E(R), and h⊲′ , mi is conjugated with h⊳, ni, then hC, ⊳, ni ∈ L(d′ ); 13. If h∀P.C, ⊲, ni ∈ L(d), hhd, d′ i, ⊲′ , mi ∈ E(R) for some R ⊑∗ P with Trans(R) =True and h⊲′ , mi is conjugated with h⊲− , 1−ni, then h∀R.C, ⊲, ni ∈ L(d′ ); 14. If h∃P.C, ⊳, ni ∈ L(d), hhd, d′ i, ⊲′ , mi ∈ E(R) for some R ⊑∗ P with Trans(R) =True and h⊲′ , mi is conjugated with h⊳, ni, then h∃R.C, ⊳, ni ∈ L(d′ ); 15. If hhd, d′ i, ⊲⊳, ni ∈ E(R), then hhd′ , di, ⊲⊳, ni ∈ E(Inv(R)); 16. If hhd, d′ i, ⊲, ni ∈ E(R) and R ⊑∗ P , then hhd, d′ i, ⊲, ni ∈ E(P ); 17. If a : C ⊲⊳ n ∈ A, then hC, ⊲⊳, ni ∈ L(V(a)); 18. If ha, bi : R ⊲⊳ n ∈ A, then hhV(a), V(b)i, ⊲⊳, ni ∈ E(R). Discrete tableau is an extension of fuzzy tableau [7] with additional conditions (condition 3) to deal with general TBoxes. For any C ⊑ D ∈ T , since any membership degree in the discrete model belongs to S, for any individuals d, let d : C = n1 and d : D = n2 , where n1 , n2 ∈ S and n1 ≤ n2 . Obviously, there must be some n ∈ S satisfying n1 ≤ n ≤ n2 . Then we add hC, ≤, ni and hD, ≥, ni in L(d). For other conditions, conditions 1 and 2 prevent tableau from containing any clash; condition 4-16 are necessary for the completeness of discrete tableaus; and condition 17-18 ensure the correctness of individual mapping function V( ). Theorem 2 For any K =< T , R, A > and any discrete degree set S w.r.t K, K has a discrete model within S iff it has a discrete tableau T within S. Proof. ⇐) Let S = {n0 , m1 , n1 , . . . , ns−1 , ms , ns } and T = hO, L, E, Vi be a discrete tableau within S. We define a sign function h( ): S → {1, 2, . . . , 2s+1}. For any 0 ≤ i ≤ s, h(ni ) = 2i + 1 and h(mi ) = 2i. Obviously, for any x ∈ S, x is the h(x)-th minimal element in S. And we define g( ) as the inverse function of h( ). Based on T, we construct a discrete model Ic = h∆Ic , ·Ic i of K within S: • The interpretation domain ∆Ic is defined as follows: ∆Ic = O; • The interpretation function ·Ic is defined as follows: for any individual a, aIc = V(a); for any concept name A any d ∈ ∆Ic : AIc (d) = max{ 0, max{n|hA, ≥, ni ∈ L(d)}, h(g(max{n|hA, >, ni ∈ L(d)}) + 1) } And for any role name R and d, d′ ∈ ∆Ic , let R∗ (d, d′ ) = max{ 0, max{n|hhd, d′ i, ≥, ni ∈ E(R)}, h(g(max{n|hhd, d′ i, >, ni ∈ E(R)}) + 1) } For any k ≥ 0, let Rk∗ (d, d′ ) = supx1 ,...,xk ∈∆Ic {min(R∗ (d, x1 ), R∗ (x1 , x2 ), . . . , RIc (d, d′ ) = ½ R∗ (xk−1 , xk ), R∗ (xk , d′ ))} supk≥0 {Rk∗ (d, d′ )} if Tran(R) = True R∗ (d, d′ ) otherwise 47 Proceedings of DL 2006 From above, AIc (d) are defined as the minimal value to satisfy constraints in both ≥ and > cases. Note that, in order to be greater than all values in S ∗ = {n|hA, >, ni ∈ L(d)}, AIc (d) must be greater than or equal to the subsequence value h(g(max S ∗ ) + 1) of the maximal value of S ∗ in S. And similarly for RIc (d, d′ ). And for any complex concept C and inverse role R− , their interpretation are recursively defined based on membership degree functions AIc ( ) and RIc ( ) of concept names and role names. 1. We show, for any C and d with hC, ⊲⊳, ni ∈ L(d), C Ic (d) ⊲⊳ n. – Case A: from the definition of AIc ( ), for any hA, ⊲, ni ∈ L(d), obviously AIc (d) ⊲ n. And for any hA, ⊳, ni ∈ L(d), here we only focus on ≤ cases. Assume AIc (d) > n, (1) if AIc (d) is max{n|hA, ≥, ni ∈ L(d)} or h(g(max{n|hA, >, ni ∈ L(d)}) + 1), then there must be two conjugated triples in L(d), which is contrary to condition 1 of the discrete tableaus; or (2) if AIc (d) is 0, then n < 0 holds which is contrary to assumption n ∈ [0, 1]. – Case complex concepts: the proof is similar to case A. 2. Similarly, for any R and d, d′ with hhd, d′ i, ⊲⊳, ni ∈ E(R), RIc (d, d′ ) ⊲⊳ n. 3. We show Ic is a fuzzy model of K. – Case R ∈ R+ : from the construction of Ic , for any d, d′ ∈ ∆Ic , RIc (d, d′ ) ≥ supx∈∆Ic {RIc (d, x), RIc (x, d′ )} – Case C ⊑ D ∈ T : from condition 3 of discrete tableaus, for any d ∈ ∆Ic there must be some n ∈ S with hC, ≤, ni and hD, ≥, ni in L(d). And from 1, C Ic (d) ≤ n and DIc (d) ≥ n hold. Therefore, Ic satisfies C ⊑ D – Case R ⊑ S ∈ R: the proof is similar to case C ⊑ D; – Case α ⊲⊳ n ∈ A: here we only focus on a : C ⊲⊳ n. From condition 17 of discrete tableau, hC, ⊲⊳, ni ∈ L(V(a)). And from aIc = V(a) and 1, we get C Ic (aIc ) ⊲⊳ n. ⇒) Let Ic = h∆Ic , ·Ic i be a discrete model within S. And we construct a discrete tableau T = hO, L, E, Vi from Ic : • • • • O: O = ∆Ic ; L: for any d ∈ O, L(d) = {hC, ⊲⊳, ni|C Ic (d) ⊲⊳ n, n ∈ S}; for any R ∈ RK , E(R) = {hhd, d′ i, ⊲⊳, ni|RIc (d, d′ ) ⊲⊳ n, n ∈ S}; V: for any a ∈ OK , V(a) = aIc . 48 Long Papers From definition, hC, ⊲⊳, ni ∈ L(d) ⇔ C Ic (d) ⊲⊳ n and hhd, d′ i, ⊲⊳, ni ∈ E(R) ⇔ RIc (d, d′ ) ⊲⊳ n. We show T is a discrete tableau of K within S: here we give the proof of that T satisfies condtion 3 and 4: 3. if C ⊑ D ∈ T , for any d, C Ic (d) ≤ DIc (d). Let C Ic (d) = n and obviously n ∈ S. From the construction of T, hC, ≤, ni and hD, ≥, ni ∈ L(d). 4. if hC, ⊲⊳, ni ∈ L(d), then C Ic (d) ⊲⊳ n. And for the semantics of negation, nnf(¬C)Ic (d) ⊲⊳− 1 − n, then hnnf(¬C), ⊲⊳− , 1 − ni ∈ L(d). From above, T is a discrete tableau of K within S. ¤ From theorem 1 and 2, an algorithm that constructs a discrete tableau of K within S can be considered as a decision procedure for the satisfiability of K. The discrete tableau algorithm works on a completion forest FK , where each node x is labelled with L(x) ⊆ M = sub(K) × {≥, >, ≤, <} × S; and each edge hx, yi is labelled L(hx, yi)={hR, ⊲⊳, ni}, for some R ∈ RK and n ∈ S. The tableau algorithm initializes FK to contain a root node xa for each individual a in OK and labels xa with L(xa ) = {hC, ⊲⊳, ni|a : C ⊲⊳ n ∈ A}. Moreover, for any pair hxa , xb i, L(hxa , xb i) = {hR, ⊲⊳, ni|ha, bi : R ⊲⊳ n ∈ A}. The algorithm expands the forest FK either by extending L(x) for the current node x or by adding new leaf node y with expansion rules in table 2. In table 2, we adopt an optimized way to reduce ”⊳ rules”: for any ”⊳” triple hC, ⊳, ni ∈ L(x), we use ¬⊲⊳ rules to add its equivalence hnnf(C), ⊳− , 1 − ni to L(x), and then deal it with ⊲ rules. Edges and nodes are added when expanding triples h∃R.C, ⊲, ni, h≥ pR, ⊲, ni in L(x). A node y is called a R-successor of another node x and x is called a R-predecessor of y, if hR, ⊲⊳, ni ∈ L(hx, yi). Ancestor is the transitive closure of predecessor. And for any two connected nodes x and y, we define S DR (x, y)={h⊲, ni|P ⊑∗ R, hP, ⊲, ni ∈ L(hx, yi) or hInv(P ), ⊲, ni ∈ L(hy, xi)} {h⊳, ni|R ⊑∗ P, hP, ⊳, ni ∈ L(hx, yi) or hInv(P ), ⊳, ni ∈ L(hy, xi)}. If DR (x, y) 6= ∅, y is called a R-neighbor of x. As inverse role is allowed in FSHI, we make use of dynamic blocking technique [3] to ensure the termination and correctness of our tableau algorithm. A node x is directly blocked by its ancestor y iff x is not a root node and L(x) = L(y). A node x is indirectly blocked if its predecessor is blocked. A node x is blocked iff it is either directly or indirectly blocked. A completion forest FK is said to contain a clash, if for a node x in FK , L(x) contains two conjugated triples or an inconsistent triple (see condition 2 of discrete tableaus). A completion forest FK is clash-free if it does not contain any clash, and it is complete if none of the expansion rules are applicable. From dynamic blocking technique, the worst-case complexity of our tableau algorithm is 2NEXPTIME [4]. And the soundness and completeness of our tableau algorithm are guaranteed by the following theorem. Proceedings of DL 2006 49 Table 2: Expansion rules of discrete Tableau Rule name KB rule: Description if C ⊑ D ∈ T and there is no n with hC, ≤, ni and hD, ≥, ni in L(x); then L(x) → L(x) ∪ {hC, ≤, ni, hD, ≥, ni} for some n ∈ S. The following rules are applied to nodes x which is not indirectly blocked. ¬⊲⊳ rule: if hC, ⊲⊳, ni ∈ L(x) and hnnf(¬C), ⊲⊳− , ni ∈ / L(x); then L(x) → L(x) ∪ {hnnf(¬C), ⊲⊳− , ni}. ⊓⊲ rule: if hC ⊓ D, ⊲, ni ∈ L(x), and hC, ⊲, ni or hD, ⊲, ni ∈ / L(x); then L(x) → L(x) ∪ {hC, ⊲, ni, hD, ⊲, ni}. ⊔⊲ rule: if hC ⊔ D, ⊲, ni ∈ L(x), and hC, ⊲, ni, hD, ⊲, ni ∈ / L(x) then L(x) → L(x) ∪ {T }, for some T ∈ {hC, ⊲, ni, hD, ⊲, ni} ∀⊲ rule: if h∀R.C, ⊲, ni ∈ L(x), there is a R-neighbor y of x with h⊲′ , mi ∈ DR (x, y), which is conjugated with h⊲− , 1 − ni, and hC, ⊲, ni ∈ / L(y); then L(y) → L(y) ∪ {hC, ⊲, ni}. ∀+⊲ rule: if h∀P.C, ⊲, ni ∈ L(x), there is a R-neighbor y of x with R ⊑∗ P , Trans(R)=True and h⊲′ , mi ∈ DR (x, y), h⊲′ , mi is conjugated with h⊲− , 1 − ni L(y) → L(y) ∪ {h∀R.C, ⊲, ni}. The following rules are applied to nodes x which is not blocked. ∃⊲ rule: if h∃R.C, ⊲, ni ∈ L(x); there is not a R-neighbor y of x with h⊲, ni ∈ DR (x, y) and hC, ⊲, ni ∈ L(y). then add a new node z with hR, ⊲, ni ∈ L(hx, zi) and hC, ⊲, ni ∈ L(z). Theorem 3 For any K = hT , R, Ai and any discrete degree set S w.r.t K, K has a discrete tableau within S iff the tableau algorithm can construct a complete and clash-free completion forest. Proof.(Sketch) Here we only focus on ⇐). The proof of ⇒) is similar to the one given in [3]. Let FK a complete and clash-free completion forest. We construct a discrete tableau T = hO, L, E, Vi from FK : • O: O = {x | x is a node in FK , and it is not blocked}; • L: for any x ∈ O, L(x) = the labelling set L(x) of nodes x in FK ; • E: for any R ∈ RK , E(R) = {hhx, yi, ⊲⊳, ni| 1. y is R-neighbor of x and h⊲⊳, ni ∈ DR (x, y); or 2. y blocks z, and h⊲⊳, ni ∈ DR (x, z); or 3. x blocks z, and h⊲⊳, ni ∈ DInv(R) (y, z) } • V: for any a ∈ OK , V(a) = the initialized node xa of a in FK . We can follow the similar steps in theorem 2 to prove that T is a discrete tableau of K within S. 50 5 Long Papers Conclusion This paper presents the discretization technique to reduce fuzzy models of FSHI and proposes a discrete tableau algorithm to solve satisfiability of FSHI KBs with general TBoxes. This discretization technique supports a new way to achieve reasoning with general TBoxes in fuzzy DLs. We will try to extend this discretization technique in more complex fuzzy DLs and design corresponding tableau algorithms for reasoning with them. Moreover, we plan to apply it in complexity research of reasoning problems in fuzzy DLs. References [1] F. Baader and U. Sattler. An overview of tableau algorithms for description logics. Studia Logica, 69(1):5–40, 2001. [2] S. Höldobler, H.P. Sötr, T.D. Khang, and N.H. Nga. The subsumption problem in the fuzzy description logic alcfh. In Proceedings of the Tenth International Conference of Information Processing and Managment of Uncertainty in Knowledge-Based Systems, pages 243–250, Perugia, Italy, 2004. [3] I. Horrocks and U. Sattler. A description logic with transitive and inverse roles and role hierarchies. Journal of Logic and Computation, 9:385–410, 1999. [4] I. Horrocks, U. Sattler, and S. Tobies. Practical reasoning for expressive description logics. In Proceedings of of LPAR99, 1999. [5] Y.H. Li, B.W. Xu, J.J. Lu, and D.Z. Kang. Witnessed models of fuzzy description logcis. Paper in preparation. [6] D. Sanchez and G. Tettamanzi. Generalizing quantification in fuzzy description logic. In Proceedings of the 8th Fuzzy Days, Dortmund, Germany, 2004. [7] G. Stoilos, G. Stamou, V. Tzouvaras, J.Z. Pan, and I. Horrock. A Fuzzy Description Logic for Multimedia Knowledge Representation. In Proc. of the International Workshop on Multimedia and the Semantic Web, 2005. [8] G. Stoilos, G. Stamou, V. Tzouvaras, J.Z. Pan, and I. Horrocks. Fuzzy owl: Uncertainty and the semantic web. In Proceedings of International Workshop of OWL: Experiences and Directions, Galway, 2005. [9] U. Straccia. Reasoning within fuzzy description logics. Journal of Artificial Intelligence Researc, 14:137–166, 2001. [10] U. Straccia. Fuzzy alc with fuzzy concrete domains. In Proceeedings of the International Workshop on Description Logics (DL-05), pages 96–103, Edinburgh, Scotland, 2005. CEUR. [11] U. Straccia. Towards a fuzzy description logic for the semantic web. In Proceedings of the 2nd European Semantic Web Conference, Heraklion, Greece, 2005. 51 Proceedings of DL 2006 Epistemic First-Order Queries over Description Logic Knowledge Bases∗ Diego Calvanese1 , Giuseppe De Giacomo2 , Domenico Lembo2 , Maurizio Lenzerini2 , Riccardo Rosati2 1 Faculty of Computer Science Free University of Bozen-Bolzano Piazza Domenicani 3 39100 Bolzano, Italy calvanese@inf.unibz.it 2 Dipartimento di Informatica e Sistemistica Università di Roma “La Sapienza” Via Salaria 113 00198 Roma, Italy lastname @dis.uniroma1.it Abstract Querying Description Logic knowledge bases has received great attention in the last years. The need of coping with incomplete information is the distinguishing feature with respect to querying databases. Due to this feature, we have to deal with two conflicting needs: on the one hand, we would like to query the knowledge base with sophisticated mechanisms provided by full first-order logic as in databases; on the other hand, the presence of incomplete information makes query answering a much more difficult task than in databases. In this paper we advocate the use of an epistemic first-order query language, which is able to incorporate closed-world reasoning on demand, as a means for expressing sophisticated queries over Description Logic knowledge bases. We show that through a subset of this language, called EQL-Lite, we are able to formulate full first-order queries over Description Logic knowledge bases, while keeping computational complexity of query answering under control. In particular, we show that EQL-Lite queries over DL-Lite knowledge bases are first-order reducible (i.e., can be compiled into SQL) and hence can be answered in LogSpace through standard database technologies. 1 Introduction Querying Description Logic (DL) knowledge bases has received great attention in the last years. Indeed, the definition of suitable query languages, and the design of query answering algorithms is arguably one of the crucial issues in applying DLs to ontology management and to the Semantic Web [9]. Answering queries in DLs must take into account the open-world semantics of such logics, and is therefore much more difficult than in Databases. For example, ∗ This research has been partially supported by FET project TONES (Thinking ONtologiES), funded by the EU under contract number FP6-7603, by project HYPER, funded by IBM through a Shared University Research (SUR) Award grant, and by MIUR FIRB 2005 project “Tecnologie Orientate alla Conoscenza per Aggregazioni di Imprese in Internet” (TOCAI.IT). 52 Long Papers while First Order Logic (FOL) is the basis of any query language (e.g., relational algebra and SQL) for relational databases [1], it is well-known that answering FOL queries posed to DL knowledge bases is undecidable1 . More precisely, to the best of our knowledge, the most expressive class of queries that go beyond instance checking, and for which decidability of query answering has been proved in DLs, is the class of union of conjunctive queries [5, 14, 15]. This restriction on the query language may constitute a serious limitation to the adoption of DLs technology in information management tasks, such as those required in Semantic Web applications. The open-world semantics of DLs on one hand is essential for representing incomplete information, but on the other hand may complicate the task of interpreting the answers by the users, or may call for the need of reasoning about the incompleteness of the knowledge base. For example, knowing that there are no parents with only female children, one might become interested in asking for all parents whose known chidren are all female. Note that querying mechanisms such as the one mentioned in the example go beyond FOL. To summarize, due to the need of coping with incomplete information in DL knowledge bases, two conflicting requirements arise in querying: on one hand, we would like to query the knowledge base with powerful mechanisms that are able to reason about incompleteness, and on the other hand we aim at query languages that are both close in expressive power to FOL, and decidable (and, possibly, computationally tractable). This paper presents the following contributions: • We define a new query language for DL knowledge bases, called EQL (see Section 2), based on a variant of the well-known first-order modal logic of knowledge/belief [12, 17, 13]. The language incorporates a modal operator K, that is used to formalize the epistemic state of the knowledge base. Informally, the formula Kφ is read as “φ is known to hold (by the knowledge base)”. Using this operator, we are able to pose queries that reason about the incompleteness of information represented by the knowledge base. For instance, a user can express queries that are able to incorporate closed-world reasoning on demand. • We show (see Section 3) that through a subset of this language, called EQL-Lite(Q), we are able to formulate queries that are interesting both from the expressive power point of view, and from the computational complexity perspective. Queries in EQL-Lite(Q) have atoms that are expressed using a specific query language Q, and enjoy the property that they can be evaluated essentially with the same data complexity (i.e., measured wrt the size of the ABox only) as Q. • We investigate the properties of EQL-Lite(Q) for the cases of ALCQI (Section 4) and DL-Lite (Section 5) knowledge bases, under the assumption that Q is the language of unions of conjunctive queries. We study the data complexity of query answering for both cases. In particular, we show that answering such queries over DL-Lite knowledge bases is LogSpace, and, notably, can be reduced to 1 Indeed, query answering can be easily reduced to validity checking in FOL. 53 Proceedings of DL 2006 evaluating FOL queries over the ABox, when considered as a database. It follows that query processing in this setting can be done through standard database technologies. 2 Epistemic query language We make use of a variant of the well-known first-order modal logic of knowledge/belief [12, 16, 13] (see also [7, 11]), here called EQL. The language EQL is a first-order modal language with equality and with a single modal operator K, constructed from concepts, interpreted as unary predicates, and roles/relations, interpreted as binary/n-ary predicates, and an infinitely countable set of disjoint constants (a.k.a., standard names [13]) corresponding to elements of an infinite countable fixed domain ∆. In EQL, the modal operator is used to formalize the epistemic state of the knowledge base. Informally, the formula Kφ should be read as “φ is known to hold (by the knowledge base)”. Under this view, a DL knowledge base corresponds to a finite set of FOL sentences (i.e., closed FOL formulas), capturing what is known about the world. We query such information by using (possibly open) EQL formulas possibly involving K. In the following, we use the symbol c (possibly with subscript) to denote a constant, the symbol x to denote a variable, and φ, ψ to denote arbitrary formulas. A world is a first-order interpretation (over ∆). An epistemic interpretation is a pair E, w, where E is a (possibly infinite) set of worlds, and w is a world in E. We inductively define when a sentence (i.e., a closed formula) φ is true in an interpretation E, w (or, is true in w and E), written E, w |= φ, as follows:2 E, w E, w E, w E, w E, w E, w |= c1 = c2 |= P (c1 , . . . , cn ) |= φ1 ∧ φ2 |= ¬φ |= ∃x.ψ |= Kψ iff iff iff iff iff iff c1 = c2 w |= P (c1 , . . . , cn ) E, w |= φ1 and E, w |= φ2 E, w 6|= φ E, w |= ψcx for some constant c E, w′ |= ψ for every w′ ∈ E Formulas without occurrences of K are said to be objective since they talk about what is true. Observe that in order to establish if E, w |= φ, where φ is an objective formula, we have to look at w but not at E: we only need the FOL interpretation w. All assertions in the DL knowledge base are indeed objective sentences. Instead, formulas where each occurrence of predicates and of the equality is in the scope of the K operator are said to be subjective, since they talk about what is known to be true. Observe that for a subjective sentence φ, in order to establish if E, w |= φ we do not have to look at w but only at E. We use such formulas to query what the knowledge base knows. In other words, through subjective sentences we do not query information about the world represented by the knowledge base; instead, we query the epistemic state of the knowledge base itself. Obviously there are formulas that 2 ,...,xn to denote the formula obtained from For a formula φ with free variables x1 , . . . , xn , we use φxc11,...,c n φ by substituting each free occurrence of the variable xi with the constant ci , for each i ∈ {1, . . . , n}. 54 Long Papers are neither objective nor subjective. For example ∃x.P (x) is an objective sentence, K(∃x.P (x) ∧ ¬KP (x)) is a subjective sentence, while ∃x.P (x) ∧ ¬KP (x) is neither objective nor subjective. In our setting, among the various epistemic interpretations, we are interested in specific ones that guarantee minimal knowledge over a DL knowledge base. Namely: let Σ be a DL knowledge base (TBox and ABox), and let Mod (Σ) be the set of all FOL-interpretations that are models of Σ. Then a Σ-EQL-interpretation is an epistemic interpretation E, w where E = Mod (Σ). We say that a sentence φ is ΣEQL-satisfiable if there exists a Σ-EQL-model for φ, i.e., a Σ-EQL-interpretation E, w such that E, w |= φ. Otherwise, we say that φ is Σ-EQL-unsatisfiable. Observe that for objective formulas this notion of satisfiability becomes the standard notion of FOL-satisfiability (relative to Σ). A sentence φ is EQL-logically implied by Σ, written Σ |=EQL φ, if every Σ-EQL-interpretation is a Σ-EQL-model of φ. It is worth mentioning some characterizing properties of EQL. Proposition 1 For every DL knowledge base Σ and every EQL sentence φ we have: Σ |=EQL Kφ ⊃ φ Σ |=EQL Kφ ⊃ KKφ Σ |=EQL ¬Kφ ⊃ K¬Kφ These are the standard S5 axioms of modal logic. The first one expresses that “what is known is true” (knowledge is accurate), and the latter two express that the knowledge base has “complete knowledge on what is known and not known”. Proposition 2 For every DL knowledge base Σ and every objective EQL sentence φ we have: Σ |= φ iff Σ |=EQL Kφ Σ 6|= φ iff Σ |=EQL ¬Kφ The above proposition relates knowledge to FOL logical implication. It says that if an objective sentence φ is logically implied then it is known, and vice-versa, that if φ is not logically implied then it is not known. Notably, the latter property is a consequence of the minimal knowledge semantics that we are adopting. Observe also that, as a consequence of this, every objective sentence is either known or not known by a DL knowledge base. Proposition 3 For every subjective EQL formula φ with free variables x1 , . . . , xn there is another subjective EQL formula φ′ , with free variables x1 , . . . , xn , such that: (i) every occurrence of a subformula of the form Kψ in φ′ is such that ψ is a nonsubjective formula and Kψ occurs in φ; (ii) for every epistemic interpretation E, w, we have that E, w |= ∀x1 , . . . , xn .φ ≡ φ′ . The above proposition says that we do not gain expressive power by putting in the scope of the K operator a formula that is already subjective. In other words, if we start from formulas of the form Kψ, where ψ is not subjective, as the basic building blocks of the language, then applying the full EQL constructs actually gives Proceedings of DL 2006 55 the same expressive power as applying the first-order constructs only. By the way, to get the sentence φ′ from φ we simply need to “push inward” the K operators through subjective subformulas, stopping when we get to subformulas that are not subjective, and simplifying KKψ to Kψ whenever possible. Finally we provide the definition of EQL-queries. Definition 4 An EQL-query is an EQL-formula q with free variables x1 , . . . , xn , for n ≥ 0, written q[x1 , . . . , xn ]. Given a Σ-EQL-interpretation E, w, we say that an n-tuple (c1 , . . . , cn ) of constants in ∆ satisfies an EQL-query q[x1 , . . . , xn ] in E, w, written E, w |= q[c1 , . . . , cn ], if ,...,xn E, w |= qcx11,...,c n . A tuple (c1 , . . . , cn ) of constants in ∆ is a certain answer to q over Σ, denoted Σ |=EQL q[c1 , . . . , cn ], if E, w |= q[c1 , . . . , cn ] for every Σ-EQL-interpretation E, w. Given two EQL-queries q[x1 , . . . , xn ] and q ′ [x1 , . . . , xn ] we say that q[x1 , . . . , xn ] is contained in (resp., equivalent to) q ′ [x1 , . . . , xn ] if for every Σ-EQL-interpretation E, w and every n-tuple (c1 , . . . , cn ) of constants in ∆ we have that E, w |= q[c1 , . . . , cn ] implies (resp., if and only if) E, w |= q[c1 , . . . , cn ]. Example 5 Consider the DL knowledge base Σ constituted by the following TBox T and ABox A: T = { Male ⊑ ¬Female } A = { Female(mary), Female(ann), Female(jane), Male(bob), Male(john), Male(paul), PARENT(bob, mary), PARENT(bob, ann), PARENT(john, paul), PARENT(mary, jane) } Suppose we want to know the set of males that have only female children. This corresponds to the following first-order query q1 : q1 [x] = Male(x) ∧ ∀y.PARENT(x, y) → Female(y) It is easy to verify that the set of certain answers of q1 over Σ is empty. In particular, bob is not a certain answer to the above query, since (due to the open-world semantics of DLs) there are models of Σ in which the interpretation of PARENT contains pairs of elements of the form (bob, x) and the interpretation of Male contains the element x. Suppose now that we want to know who are the persons all of whose known children are female. This can be expressed by the following EQL query q2 : q2 [x] = Male(x) ∧ ∀y.(KPARENT(x, y)) → Female(y) It is immediate to verify that the certain answers over Σ of the query q2 are bob and paul. In fact, for each Σ-EQL-interpretation E, w (we recall that E = Mod (Σ)), (bob, mary) and (bob, ann) are the only pairs (x, y) such that Σ |=EQL KPARENT(x, y); moreover, paul is a certain answer because he is male and has no known children. Analogously, it can be seen that no other constant is in the set of certain answers of q2 over Σ. 56 Long Papers Example 6 Suppose now that we want to know who are the single children according to what is known, i.e., the known children who have no known sibling. This can be expressed by the following EQL query q3 : q3 [x] = ∃y.(KPARENT(y, x)) ∧ ∀z.(KPARENT(y, z)) → z = x It is immediate to verify that the certain answers over Σ of the query q3 are paul and jane. 3 EQL-Lite(Q) We introduce now the query language EQL-Lite(Q). Such a language is parameterized with respect to a basic query language Q, which is a subset of EQL. Informally, EQLLite(Q) is the first-order query language with equality whose atoms are formulas of the form Kq where q is a Q-query, i.e., a query in Q. To define EQL-Lite(Q) formally, we first need to introduce the notion of domain independence for first-order queries, which is the semantical restriction on first-order logic that is needed to get the equivalence to relational algebra [1]. A first-order query q is domain independent if for each pair of FOL interpretations I1 and I2 , respectively over domains ∆I1 ⊆ ∆ and ∆I2 ⊆ ∆, for which P I1 = P I2 for all atomic relations P , we have that q I1 = q I2 3 . Given a subset Q of EQL, we call epistemic atom in Q an expression of the form Kq[x1 , . . . , xn ], where q[x1 , . . . , xn ] is a Q-query. Definition 7 An EQL-Lite(Q) query is a formula ψ that: • is constructed according to the following syntax: ψ ::= a | x1 = x2 | ψ1 ∧ ψ2 | ¬ψ | ∃x.ψ, where a is an epistemic atom in Q, and • is domain-independent, when we consider epistemic atoms as atomic formulas. Observe that in EQL-Lite(Q) we do not allow for nesting of the K operator outside the expressions of the basic query language Q. Indeed, we now show that allowing such nested occurrences of the epistemic operator does not actually increase the expressive power of EQL-Lite(Q). Proposition 8 Let EQL-Lite(Q)+ be the extension of EQL-Lite(Q) obtained by adding to the abstract syntax for EQL-Lite(Q) formulas the rule ψ ::= Kψ For each query q ∈ EQL-Lite(Q)+ , there exists a query q ′ ∈ EQL-Lite(Q) such that q is equivalent to q ′ . 3 For an interpretation I over domain ∆I and a FOL query q[x1 , . . . , xn ], we use q I to denote the result of the evaluation of q in I, i.e., the set of tuples (c1 , . . . , cn ) of constants in ∆I such that ,...,xn is true in I. φxc11,...,c n Proceedings of DL 2006 57 The above property is an immediate consequence of Proposition 3, since EQL-Lite(Q) queries are subjective EQL formulas, where the K operator is applied to non subjective (in fact objective) subformulas only, and hence each EQL-Lite(Q)+ query can be reduced to an equivalent EQL-Lite(Q) query by pushing inward the K operator, stopping in front of the epistemic atoms, and simplifying KKψ to Kψ whenever possible. In spite of its expressive richness, EQL-Lite(Q) enjoys an interesting complexity characterization of query answering. In the rest of the paper, when we speak about the computational complexity of the query answering problem we actually refer to the computational complexity of the recognition problem associated with query answering [1]. Let Q be a query language and L a DL language, and let us assume that the query language Q over L-knowledge bases has data complexity CQ,L , i.e., the complexity of answering queries in Q over L-knowledge bases measured in the size of the data of the knowledge base is CQ,L . Let us further consider the following restriction over queries and knowledge bases. Definition 9 Given a knowledge base Σ in L, a query q in Q is Σ-range-restricted, if the certain answers of q over Σ contain only elements of adom(Σ), where adom(Σ) denotes the set of constants occurring in Σ. By extension, an EQL-Lite(Q) query is Σ-range-restricted if each of its epistemic atoms involves a Σ-range-restricted query. The class of Σ-range-restricted queries is perfectly natural in this setting: indeed, it can be shown that if the set of certain answers of a query q on a knowledge base Σ contains elements that are not in adom(Σ), then the set of certain answers is infinite. Example 10 The following in an EQL-Lite(Q) query, where Q is the language of atomic queries: q4 [x] = (KMale(x)) ∧ ∀y.(KPARENT(x, y)) → (KFemale(y)) It is easy to verify that for the knowledge base Σ given in Example 5, q4 is Σ-rangerestricted. Observe that, by Proposition 2, we have complete information on each instantiation of the epistemic atoms of an EQL-Lite(Q) query, i.e., either the instantiated epistemic atom is entailed by Σ or its negation is entailed by Σ. Now, answering a Σ-rangerestricted EQL-Lite(Q) query amounts to evaluating a domain independent first-order query whose variables range over adom(Σ) and whose instantiated epistemic atoms Kq[c1 , . . . , cn ] can be checked by verifying whether (c1 , . . . , cn ) is a certain answer of q over the knowledge base. We know that evaluating a first-order query over a given database is in LogSpace in data complexity [1], and, by our assumption, computing whether a tuple of elements of adom(Σ) is in the relation corresponding to the extension of an epistemic atom, can be done in CQ,L in data complexity. Hence, we immediately derive the following result on the data complexity of answering Σ-rangerestricted EQL-Lite(Q)-queries, where we denote with C1C2 the class of languages recognized by a C1 -Turing Machine that uses an oracle in C2 . 58 Long Papers Theorem 11 Let Q be a query language over L-knowledge bases that is in CQ,L with respect to data complexity. Let Σ be an L-knowledge base, and q a Σ-range-restricted EQL-Lite(Q) query. Then, answering q over Σ is in LogSpaceCQ,L with respect to data complexity. Among the various choices of the basic query language Q in EQL-Lite(Q), a prominent role is played by unions of conjunctive queries (UCQs). In fact, the language of UCQs is currently the most expressive subset of first-order logic for which query answering over DL knowledge bases is known to be decidable [5, 15]. Consequently, in the following we will focus on EQL-Lite(UCQ), and will call such a language simply EQL-Lite. Answering EQL-Lite queries over ALCQI knowledge bases 4 As a consequence of the properties shown in the previous section, we now provide a computational characterization of answering Σ-range-restricted EQL-Lite queries in ALCQI. It is known that answering unions of conjunctive queries over ALCQI knowledge bases is coNP-complete with respect to data complexity [15]. Based on this characterization and on Theorem 11, we are able to show the following result. Theorem 12 Let Σ be an ALCQI-knowledge base, and q a Σ-range-restricted EQLLite query. Then, answering q over Σ is in Θ2p with respect to data complexity. We recall that Θp2 = ∆p2 [O(log n)] = P N P [O(log n)] [10, 8], i.e., Θp2 is the class of the decision problems that can be solved in polynomial time through a logarithmic number of calls to an NP-oracle. Such a class is considered as “mildly” harder than the class NP, since a problem in Θp2 can be solved by solving “few” (i.e., a logarithmic number of) instances of problems in NP. Consequently, answering EQL-Lite queries in ALCQI (and in all the DLs in which answering UCQs is a coNP-complete problem) is “mildly harder” than answering UCQs. 5 Answering EQL-Lite queries over DL-Lite knowledge bases In this section we study EQL-Lite queries posed over DL-Lite knowledge bases. DLLite [6, 3] is a DL specifically tailored to capture basic ontology languages, while keeping low complexity of reasoning, in particular, polynomial in the size of the instances in the knowledge base. Answering UCQs in DL-Lite is in LogSpace with respect to data complexity4 . Moreover all UCQs in DL-Lite are Σ-range-restricted. As a consequence of Theorem 11 we get that moving from UCQs to EQL-Lite does not blow up computational complexity of the query answering problem. 4 It is easy to see that all results for CQs in [6, 3] can be extended to UCQs. Proceedings of DL 2006 59 Theorem 13 Answering EQL-Lite queries over DL-Lite knowledge bases is in LogSpace with respect to data complexity. We point out that membership in LogSpace for the problem of answering UCQs over DL-Lite knowledge bases follows from a notable property of such a DL language, namely, FOL-reducibility of query answering [4]. Intuitively, FOL-reducibility means that query answering can be reduced to evaluating queries over the database corresponding to the ABox of a DL knowledge base, which therefore can be maintained in secondary storage. More formally, given an ABox A involving membership assertions on atomic concept and roles only, we define IA as the interpretation constructed as follows: – aIA = a for each constant a, – AIA = {a | A(a) ∈ A} for each atomic concept A, and – P IA = {(a1 , a2 ) | P (a1 , a2 ) ∈ A} for each atomic role P . Then, query answering in a DL L is FOL-reducible if for every query q (of a given language) and every TBox T expressed in L, there exists a FOL query q1 such that for every ABox A, we have that (T , A) |=EQL q[c1 , . . . , cn ] if and only if (c1 , . . . , cn )IA ∈ q1IA . In other words, q1 is evaluated over the ABox A considered as a database. Observe that FOL-reducibility is a very nice property from a practical point of view. Indeed, in all such cases in which query answering can be reduced to evaluation of a suitable domain independent FOL query q1 , then q1 can be expressed in relational algebra, i.e., in SQL. Therefore, query answering can take advantage of optimization strategies provided by current DBMSs (which are in charge of properly managing ABoxes in secondary storage). Now, it turns out that FOL-reducibility is also at the basis of the membership in LogSpace of answering EQL-Lite queries over DL-Lite knowledge bases, as the following theorem shows. Theorem 14 Answering EQL-Lite queries in DL-Lite is FOL-reducible. Furthermore, the resulting FOL-queries are domain independent. Proof (sketch). We make use of the algorithm for FOL-reducibility of UCQs over DLLite knowledge bases presented in [3]. More precisely, given a DL-Lite TBox T and an EQL-Lite query ψ over T , we execute the algorithm of [3] for each epistemic atom Kq[x1 , . . . , xn ] of ψ, giving as inputs to each such execution the union of conjunctive queries q[x1 , . . . , xn ] and the DL-Lite TBox T . Then, we substitute to each epistemic atom Kq[x1 , . . . , xn ] of ψ the union of conjunctive queries q ′ [x1 , . . . , xn ] produced by the corresponding execution of the rewriting algorithm, thus obtaining (provided some further syntactic transformations) a FOL query q1 . Now, it is possible to show that q1 is domain independent, and that for every ABox A, (T , A) |=EQL q[c1 , . . . , cn ] iff (c1 , . . . , cn )IA ∈ q1IA , thus proving the claim. As a consequence, to perform query answering of EQL-Lite queries in DL-Lite, we can rely on traditional relational DBMSs. 60 Long Papers Recently, different versions of DL-Lite have been considered, and an entire family of “lite” DLs, namely, the DL-Lite family, has been defined [4]. Roughly speaking, DLs of such a family differ one another for the set of constructs allowed in the righthand side and in the left-hand side of inclusion assertions between concepts and/or roles specified in the TBox (e.g., allowing in certain cases for the presence of existential qualified quantification on the right-hand side, or conjunctions of concepts in the lefthand side), as well as the possibility of specifying functionality assertions on roles, inclusion assertions between roles, and n-any relationships in addition to binary roles. Notably, the DLs of the DL-Lite family are the maximal logics allowing for FOLreducibility of answering unions of conjunctive queries [4]. As for answering EQL-Lite queries, we point out that Theorem 14 also holds for all the DLs belonging to the DL-Lite family. 6 Conclusions Motivated by various needs related to querying DL knowledge bases, we have proposed the query language EQL, based on a variant of the well-known first-order modal logic of knowledge/belief. Then, we have studied a subset of this language, called EQL-Lite(Q), arguing that it allows for formulating queries that are interesting both from the expressive power point of view, and from the computational complexity perspective. Finally, we have investigated the properties of EQL-Lite(Q) for the cases of ALCQI and DL-Lite knowledge bases, under the assumption that Q is the language of unions of conjuntive queries. In particular, we have shown that answering EQLLite(Q) in the latter setting is LogSpace in data complexity, and, notably, can be done through standard database technologies. We are working specifically on EQL-Lite(Q) for DL-Lite knowledge bases, for the case where Q is the query language whose queries are either a UCQ or a comparison atom involving values taken from a set of given domains. We are currently implementing such an extended language with the goal of enhancing the querying capabilities of the QuOnto system [2]. References [1] S. Abiteboul, R. Hull, and V. Vianu. Foundations of Databases. Addison Wesley Publ. Co., 1995. [2] A. Acciarri, D. Calvanese, G. De Giacomo, D. Lembo, M. Lenzerini, M. Palmieri, and R. Rosati. QuOnto: Querying ontologies. In Proc. of the 20th Nat. Conf. on Artificial Intelligence (AAAI 2005), pages 1670–1671, 2005. [3] D. Calvanese, G. De Giacomo, D. Lembo, M. Lenzerini, and R. Rosati. DL-Lite: Tractable description logics for ontologies. In Proc. of the 20th Nat. Conf. on Artificial Intelligence (AAAI 2005), pages 602–607, 2005. [4] D. Calvanese, G. De Giacomo, D. Lembo, M. Lenzerini, and R. Rosati. Data complexity of query answering in description logics. In Proc. of the 10th Int. Proceedings of DL 2006 61 Conf. on the Principles of Knowledge Representation and Reasoning (KR 2006), 2006. [5] D. Calvanese, G. De Giacomo, and M. Lenzerini. On the decidability of query containment under constraints. In Proc. of the 17th ACM SIGACT SIGMOD SIGART Symp. on Principles of Database Systems (PODS’98), pages 149–158, 1998. [6] D. Calvanese, G. De Giacomo, M. Lenzerini, R. Rosati, and G. Vetere. DLLite: Practical reasoning for rich DLs. In Proc. of the 2004 Description Logic Workshop (DL 2004). CEUR Electronic Workshop Proceedings, http: //ceur-ws.org/Vol-104/, 2004. [7] B. F. Chellas. Modal Logic: An introduction. Cambridge University Press, 1980. [8] T. Eiter and G. Gottlob. The complexity class Θp2 : Recent results and applications in AI and modal logic. In Proc. of the 11th Int. Symp. on Fundamentals of Computation Theory (FCT’97), volume 1279 of Lecture Notes in Artificial Intelligence, pages 1–18. Springer, 1997. [9] R. Fikes, P. Hayes, and I. Horrocks. OWL-QL: A language for deductive query answering on the semantic web. J. of Web Semantics, 2(1), 2005. [10] G. Gottlob. NP trees and Carnap’s modal logic. J. of the ACM, 42(2):421–457, 1995. [11] G. E. Hughes and M. J. Cresswell. A Companion to Modal Logic. Methuen, London (United Kingdom), 1984. [12] H. J. Levesque. Foundations of a functional approach to knowledge representation. Artificial Intelligence, 23:155–212, 1984. [13] H. J. Levesque and G. Lakemeyer. The Logic of Knowledge Bases. The MIT Press, 2001. [14] M. M. Ortiz, D. Calvanese, and T. Eiter. Characterizing data complexity for conjunctive query answering in expressive description logics. In Proc. of the 21st Nat. Conf. on Artificial Intelligence (AAAI 2006), 2006. [15] M. M. Ortiz, D. Calvanese, and T. Eiter. Data complexity of answering unions of conjunctive queries in SHIQ. In Proc. of the 2006 Description Logic Workshop (DL 2006). CEUR Electronic Workshop Proceedings, http://ceur-ws.org/, 2006. [16] R. Reiter. What should a database know? J. of Logic Programming, 14:127–153, 1990. [17] R. Reiter. Narratives as programs. In Proc. of the 7th Int. Conf. on the Principles of Knowledge Representation and Reasoning (KR 2000), pages 99–108, 2000. 62 Long Papers Data Complexity of Answering Unions of Conjunctive Queries in SHIQ∗ Magdalena Ortiz1,2 , Diego Calvanese1 , Thomas Eiter2 1 Faculty of Computer Science Free University of Bozen-Bolzano Piazza Domenicani 3, Bolzano, Italy calvanese@inf.unibz.it, magdalena.ortiz@stud-inf.unibz.it 2 Institute of Information Systems Vienna University of Technology Favoritenstraße 9-11, Vienna, Austria eiter@kr.tuwien.ac.at Abstract The novel context of accessing and querying large data repositories through ontologies that are formalized in terms of expressive DLs requires on the one hand to consider query answering as the primary inference technique, and on the other hand to optimize it with respect to the size of the data, which dominates the size of ontologies. While the complexity of DLs has been studied extensively, data complexity in expressive DLs has been characterized only for answering atomic queries, and was still open for more expressive query languages, such as unions of conjunctive queries (UCQs). In this paper we advocate the need for studying this problem, and provide a significant technical contribution in this direction. Specifically, we prove a tight coNP upper bound for answering UCQs over SHIQ knowledge bases, for the case where the queries do not contain transitive roles. We thus establish that for a whole range of DLs from AL to SHIQ, answering such UCQs has coNP-complete data complexity. We obtain our result by a novel tableaux-based algorithm for checking query entailment, inspired by the one in [20], but which manages the technical challenges of simultaneous inverse roles and number restrictions (which leads to a DL lacking the finite model property). 1 Introduction Description Logics (DLs) [2] provide the formal foundations for the standard Web ontology languages [11]. In fact, OWL-Lite and OWL-DL are syntactic variants of the DLs SHIF(D) and SHOIN (D), respectively [12, 22]. In the Semantic Web and domains such as Enterprise Application Integration and Data Integration [19], ontologies provide a high-level, conceptual view of the relevant information. However, they are increasingly seen also as a mechanism to access and query data repositories. ∗ This work was partially supported by the Austrian Science Funds (FWF) project P17212, by the European Commission project REWERSE (IST-2003-506779), and by the European Commission FET project TONES (FP6-7603). Proceedings of DL 2006 63 This novel context poses an original combination of challenges both in DLs/ontologies and in related areas such as data modeling and querying in databases: (i ) On the one hand, data repositories can be very large and are usually much larger than the intensional level expressing constraints on the data. Therefore, the contribution of the extensional data to inference complexity must be singled out, and one must pay attention to optimizing inference techniques with respect to data size, as opposed to the overall size of the knowledge base. In databases, this is accounted for by data complexity of query answering [26], where the relevant parameter is the size of the data, as opposed to combined complexity, which additionally considers the size of the query and of the schema. (ii ) On the other hand, the data underlying an ontology should be accessed using well established and flexible mechanisms such as those provided by database query languages. This goes well beyond the traditional inference tasks involving objects in DL-based systems, like instance checking [10, 23]. Indeed, since explicit variables are missing, DL concepts have limited possibility for relating specific data items to each other. Conjunctive queries (CQs) and unions of CQs (UCQs) provide a good tradeoff between expressive power and nice computational properties, and thus are adopted as core query language in several contexts, such as data integration [19]. (iii ) Finally, the considered DLs should have sufficient expressive power to capture common constructs used in data modeling [4]. This calls for expressive DLs [5], such as SHIQ [13, 15], featuring besides full Booleans also number restrictions, inverse and transitive roles, and role hierarchies. As for data complexity of DLs, [10, 23] showed that instance checking is coNPhard already in the rather weak DL ALE, and [7] that CQ answering is coNP-hard in the yet weaker DL AL. For suitably tailored DLs, answering UCQs is polynomial (actually LogSpace) in data complexity [6, 7]; see [7] for an investigation of the NLogSpace, PTime, and coNP boundaries. For expressive DLs (with the features above, notably inverse roles), TBox+ABox reasoning has been studied extensively using techniques ranging from reductions to Propositional Dynamic Logic (PDL) (see, e.g., [8, 5]) over tableaux [3, 15] to automata on infinite trees [5, 25]. For many such DLs, the combined complexity of TBox+ABox reasoning is ExpTime-complete, including ALCQI [5, 25], DLR [8], and SHIQ [25]. However, until recently, little attention has been explicitly devoted to data complexity in expressive DLs. An ExpTime upper bound for data complexity of UCQ answering in DLR follows from the results on UCQ containment and view-based query answering in [8, 9]. They are based on a reduction to reasoning in PDL, which however prevents to single out the contribution to the complexity coming from the ABox. In [20] a tight coNP upper bound for CQ answering in ALCN R is shown. However, this DL lacks inverse roles and is thus not suited to capture semantic data models or UML. In [17, 18] a technique based on a reduction to Disjunctive Datalog is used for ALCHIQ. For instance checking, it provides a (tight) coNP upper bound for data complexity, since it allows to single out the ABox contribution. The result can immediately be extended to tree shaped conjunctively queries, since these admit a representation as a description logic concept (e.g., by making use of the notion of tuple-graph of [8], or via rolling up [16]). However, this is not the case for general CQs, resulting in a non-tight 64 Long Papers 2ExpTime upper bound (matching also combined complexity). Summing up, a precise characterization of data complexity for UCQ answering in expressive DLs was still open, with a gap between a coNP lower-bound and an ExpTime upper bound. We close this gap, thus simultaneously addressing the three challenges identified above. Specifically, we make the following contributions: • Building on techniques of [20, 15], we devise a novel tableaux-based algorithm for answering UCQs where all roles are simple over SHIQ knowledge bases. Technically, to show its soundness and completeness, we have to deal both with a novel blocking condition (inspired by the one in [20], but taking into account inverse and transitive roles), and with the lack of the finite model property. • This novel algorithm provides us with a characterization of data complexity for UCQ answering in expressive DLs. Specifically, we show that data complexity of answering such an UCQ over SHIQ knowledge bases is in coNP, and thus coNP-complete for all DLs ranging from AL to SHIQ. For space reasons, proofs are omitted here; they can be found in [21]. 2 Preliminaries We only briefly recall SHIQ and refer to the literature (e.g., [13, 15]) for details and background. We denote by C, R, R+ (where R+ ⊆ R), and I the sets of concept names, role names, transitive role names, and individuals respectively. A role R is either an atomic role name P or its inverse P − . A concept C is either an atomic concept name A or one of C ⊓ D, C ⊔ D, ¬C, ∀R.C, ∃R.C, ≥ n S.C, or ≤ n S.C, where C and D denote concepts, R a role, S a simple role (see later), and n ≥ 0 an integer. A knowledge base is a triple K = hT , R, Ai, where the TBox T is a set of concept inclusion axioms C1 ⊑ C2 ; the role hierarchy R is a set of role inclusion axioms R1 ⊑ R2 ; and the ABox A is a set of assertions A(a), P (a, b), and a 6= b, where A (resp., P ) is an atomic concept (resp., role) and a and b are individuals. A role S is simple, if for no role R ∈ R+ we have that R ⊑∗ S, where ⊑∗ denotes the reflexive and transitive closure of the subrole relation ⊑ over R ∪ {Inv(R1 ) ⊑ Inv(R2 ) | R1 ⊑ R2 ∈ R}. Without loss of expressivity, we assume that all concepts in K are in negation normal form (NNF). For a concept C, clos(C) is the smallest set of concepts containing C that is closed under subconcepts and their negation (in NNF); and clos(K) denotes the union of all clos(C) for each C occurring in K. We will use K to denote a knowledge base hT , R, Ai, RK the roles occurring in K and their inverses, and IK the individuals occurring in A. The semantics of K is defined in terms of first-order interpretations I = (∆I , ·I ), where ∆I is the domain and ·I the valuation function, as usual (without unique names assumption;1 see [2]). I is a model of K, denoted I |= K, if it satisfies T , R and A. 1 The unique names assumption can be easily emulated using 6≈. Proceedings of DL 2006 65 Example 1 As a running example, we use the knowledge base K = h {A ⊑ ∃P1 .A, A ⊑ ∃P2 .¬A }, {}, { A(a) }i. We assume that K has an associated set of distinguished concept names, denoted Cq , which are the concepts that can occur in queries. Definition 1 (Union of Conjunctive Queries) A conjunctive query (CQ) Q over a knowledge base K is a set of atoms of the form {p1 (Y1 ), . . . , pn (Yn )} where each pi is either a role name in RK or a concept in Cq , and Yi is a tuple of variables or individuals in IK matching its arity. A union of CQs (UCQ) U is defined as an expression of the form Q1 ∨ · · · ∨ Qm where Qi is a CQ for each i ∈ {1, . . . , m}. For short, a query is either a CQ or a UCQ. We will restrict our attention to queries where each role occurring in some pi (Yi ) is a simple role, i.e., transitive roles and super-roles of transitive roles are disallowed in queries. We denote by varind(Q) the set of variables and individuals in query Q. An interpretation I is a model of a CQ Q, denoted I |= Q, if there is a substitution σ : varind(Q) → ∆I such that σ(a) = aI for each individual a ∈ varind(Q) and I |= p(σ(Y )), for each p(Y ) in Q. For a UCQ U = Q1 ∨ · · · ∨ Qm , I |= U is defined as I |= Qi for some i ∈ {1, . . . , m}. We say that K entails query Q, denoted K |= Q, if I |= Q for each model I of K. Example 2 Let Cq = {A}. We consider the CQs Q1 = {P1 (x, y), P2 (x, z), A(y)} and Q2 = {P2 (x, y), P2 (y, z)} and the UCQ U = Q1 ∨ Q2 . Note that K |= Q1 . Indeed, for an arbitrary model I of K, we can map x to aI , y to an object connected to aI via role P1 (which by the inclusion axiom A ⊑ ∃P1 .A exists and is an instance of A), and z to an object connected to aI via role P2 (which exists by the inclusion A ⊑ ∃P2 .¬A). Also, K 6|= Q2 . A model I of K that is not a model of Q2 is the one with ∆I = {o1 , o2 }, aI = o1 , AI = {o1 }, P1I = {ho1 , o1 i}, and P2I = {ho1 , o2 i}. Finally, since K |= Q1 , then also K |= U . Query answering for a certain DL L is in a complexity class C, if given any knowledge base K in L and query Q, deciding K |= Q is in C; this is also called combined complexity. The data complexity of query answering is the complexity of deciding K |= Q where Q and all of K except A is fixed. We only consider Boolean queries (i.e., yes/no queries, with no free variables), to which queries with distinguished variables are reducible as usual. Note that query answering is not reducible to knowledge base satisfiability, since the negated query is not expressible within the knowledge base. 3 The Query Answering Algorithm In this section, Q denotes a CQ and U a UCQ. As mentioned, we assume that all roles occurring in queries are simple. We first describe our method for deciding K |= Q, and then how it is extended to K |= U . Our technique builds on the SHIQ satisfiability algorithm in [15]. The adaption to query answering is inspired by [20], yet we deal with DLs that have no finite model property. 66 Long Papers a T1 P1 L1 P2 v2 a T2 P1 L1 P2 v2 P2 L2 v1 P1 L1 P2 L2 v4 v1 P1 L1 v4 P2 L2 v3 P1 L1 P2 L2 v6 v3 P1 L1 v6 L2 v5 P1 L1 v8 v7 L1 P2 P2 L2 v5 P1 L1 v8 L2 v7 P1 L1 P2 L2 L2 v10 v9 P1 v11 L1 L1 P2 L2 v12 Figure 1: Trees and completion forests for the example knowledge base We use completion forests, which are finite relational structures capturing sets of models of K. Roughly speaking, the models of K are represented by an initial completion forest FK . By applying tableaux-style expansion rules repeatedly, new completion forests are generated non-deterministically where also new individuals might be introduced. Each model of K is preserved in some of the resulting forests. Therefore, checking K |= Q equals checking F |= Q for each completion forest F. The blocking conditions on the rules, which ensure that expansion terminates, are more involved than those in [15]. They require a depth parameter n (depending on Q) that ensures a sufficient expansion of each forest F, in such a way that semantical entailment of Q in F can be checked effectively via a syntactic mapping of the variables in Q to the nodes in F. Thus, to witness that K 6|= Q, it is sufficient to (nondeterministically) construct a large enough forest F to which Q cannot be mapped. A variable tree T is a tree whose nodes are variables except the root, which might be also an individual, and where each node v is labeled with a set of concepts L(v) and each arc v → w is labeled with a set of roles L(v → w). For any integer n ≥ 0, the n-tree of a node v in T , denoted Tvn , is the subtree of T rooted at v that contains all descendants of v within distance n. Variables v and v ′ in T are n-tree equivalent in T , if Tvn and Tvn′ are isomorphic (i.e., there is a bijection from the nodes of Tvn to those of Tvn′ which preserves all labels). If, for such v and v ′ , v ′ is an ancestor of v in T and v is not in Tvn′ , then we say that Tvn′ tree-blocks Tvn . A completion forest (cf. [15]) for K is constituted by (i ) a set of variable trees whose roots are the individuals in IK and can be arbitrarily connected by arcs; and (ii ) a binary relation 6≈ on the individuals in IK , implicitly assumed to be symmetric. Example 3 Consider the variable tree T1 in Figure 1, with a as root, L1 = {A, ¬A ⊔ ∃P1 .A, ¬A ⊔ ∃P2 .¬A, A ⊔ ¬A, ∃P1 .A, ∃P2 .¬A}, and L2 = {¬A, ¬A ⊔ ∃P1 .A, ¬A⊔∃P2 .¬A, A⊔¬A}. Then, v1 and v5 are 1-tree equivalent in T1 and T1 1v1 tree-blocks T1 1v5 . Now we introduce the initial completion forest for K. We use a set of global concepts gcon(K, Cq ) = {¬C ⊔ D | C ⊑ D ∈ T } ∪ {C ⊔ ¬C | C ∈ Cq }. Informally, by requiring that each individual belongs to all global concepts, satisfaction of the TBox Proceedings of DL 2006 67 is enforced and, by case splitting, each individual can be classified with respect to the distinguished concepts (i.e., those appearing in queries). The initial completion forest for K, denoted FK , is defined as follows:2 • The nodes are the individuals a ∈ IK , and L(a) = {A | A(a) ∈ A} ∪ gcon(K, Cq ). • The arc a → a′ is present iff A contains some assertion P (a, a′ ), and L(a → a′ ) = {P | P (a, a′ ) ∈ A}. • a 6≈ a′ iff a 6= a′ ∈ A. Example 4 In our running example, FK contains only the node a which has the label L(a) := {A, ¬A ⊔ ∃P1 .A, ¬A ⊔ ∃P2 .¬A, A ⊔ ¬A}. In the expansion rules, we use a notion of blocking that depends on a depth parameter n: a node is n-blocked if it’s a leaf of a tree-blocked n-tree in F. Note that if v is n-blocked, then it is m-blocked for each m ≤ n. For n ≥ 1, n-blocking implies blocking as in [15], and for n = 0 amounts to blocking by equal node labels. Starting from FK , we can generate a set FK of new completion forests by applying expansion rules. The rules are analogous to those in [15], but they use “n-blocking” and initialize newly introduced nodes with a label containing gcon(K, Cq ). When applying the expansion rules, a clash may arise in some F, i.e., two complementary concepts C and ¬C occur in a node label, or a node that should satisfy a number restriction ≤ n S.C has more than n distinct S successors marked C. If this is not the case, then F is clash free. We call a completion forest n-complete, if (under n-blocking) no rule can be applied to it. We denote by ccf n (FK ) the set of n-complete and clash free completion forests in FK . For the set of expansion rules and more details, see [21]. Example 5 Consider the completion forest F1 with the variable tree T1 from Example 3 and with empty 6≈. F1 is 1-blocked. Analogously, consider F2 that has T2 in Figure 1 and where 6≈ is also empty. F2 is 2-blocked. Both F1 and F2 can be obtained from FK by applying the expansion rules. They are both complete and clash-free, so F1 ∈ ccf 1 (FK ) and F2 ∈ ccf 2 (FK ). Models of a completion forest Viewing variables in a completion forest F as individuals, we can define models of F as models of K (over an extended vocabulary). An interpretation I is a model of a completion forest F for K, denoted I |= F, if I |= K and for all nodes v, w in F it holds that (i ) v I ∈ C I if C ∈ L(v), (ii ) hv I , wI i ∈ RI if F has an arc v → w and R ∈ L(hv, wi), and (iii ) v I 6= wI if v 6≈ w ∈ F. Clearly, the models of the initial completion forest FK and of K coincide, and thus FK semantically represents K. Then, each time an expansion rule is applied, all models are preserved in some resulting forest. As a consequence, it holds that for each model I of K, there exists some F ∈ ccf n (FK ) and a model of F which extends I (for any n ≥ 0). Since the set of n-complete and clash-free forests for K semantically 2 If A = ∅, then FK contains a single node a with L(a) = gcon(K, Cq ). 68 Long Papers captures K (modulo new individuals), we can transfer query entailment K |= Q to logical consequence of Q from completion forests as follows. For any completion forest F and CQ Q, let F |= Q denote that I |= Q for every model I of F. Proposition 1 Let Q be a CQ in which all roles are simple and let n ≥ 0 be arbitrary. K |= Q iff F |= Q for each F ∈ ccf n (FK ). Now we will show that, if n is sufficiently large, we can decide F |= Q for an F ∈ ccf n (FK ) by syntactically mapping the query Q into F. We say that Q can be mapped into F, denoted Q ֒→ F, if there is a mapping µ from the variables and individuals in varind(Q) into the nodes of F, such that (i ) for each individual a, µ(a) = a; (ii ) for each atom C(x) in Q, C ∈ L(µ(x)); and (iii ) for each atom R(x, y) in Q, there is an arc µ(x) → µ(y) whose label contains R′ or an arc µ(y) → µ(x) whose label contains the inverse of R′ for some R′ ⊑∗ R. Example 6 Q1 ֒→ F2 holds, as witnessed by the mapping µ(x) = a, µ(y) = v2 , and µ(z) = v1 . Note that there is no mapping of Q2 into F2 satisfying the above conditions. It is clear that if Q can be mapped to F via µ, then Q is satisfied in each model I = (∆I , ·I ) of F by assigning to each variable x in Q the value of its image µ(x)I . Thus Q ֒→ F implies F |= Q. To prove that the converse also holds, we have to show that if n is large enough, a mapping of Q into F ∈ ccf n (FK ) can be constructed from a distinguished canonical model of F. The canonical model IF of F is constructed by unraveling the forest F in the standard way, where the blocked nodes act like ‘loops’. Its domain comprises the set of all paths from some root in F to some node of F (thus, it can be infinite). Note that in order for IF to be a model, F must be in ccf n (FK ) for some n ≥ 1. The formal definition of IF is then straightforward yet complex, and we must refer to the extended report [21] for the details. Instead, we provide an example. Example 7 By unraveling F2 , we obtain a model IF2 that has as domain the infinite set of paths from a to each vi . Note that a path actually comprises a sequence of pairs of nodes, in order to witness the loops introduced by blocked variables. When a node is not blocked, like v1 , the pair vv11 is added to the path. Since Tv21 tree-blocks Tv27 , every 5 to the path and time a path reaches v11 , which is a leaf of a blocked tree, we add vv11 ‘loop’ back to the successors of v5 . In this way, we obtain the following infinite set of paths: p0 = [ aa ], p7 = [ aa , vv11 , vv33 , vv55 , vv77 ], p8 = [ aa , vv11 , vv33 , vv55 , vv88 ], p1 = [ aa , vv11 ], a v2 p2 = [ a , v2 ], p9 = [ aa , vv11 , vv33 , vv55 , vv77 , vv99 ], p3 = [ aa , vv11 , vv33 ], p10 = [ aa , vv11 , vv33 , vv55 , vv77 , vv10 ], 10 a v1 v4 5 p11 = [ aa , vv11 , vv33 , vv55 , vv77 , vv99 , vv11 ], p4 = [ a , v1 , v4 ], a v1 v3 v5 a v1 v3 v5 v7 v9 v12 p5 = [ a , v1 , v3 , v5 ], p12 = [ a , v1 , v3 , v5 , v7 , v9 , v12 ], a v1 v3 v6 5 p6 = [ a , v1 , v3 , v6 ], p13 = [ aa , vv11 , vv33 , vv55 , vv77 , vv99 , vv11 , vv77 ], 5 , vv88 ], p14 = [ aa , vv11 , vv33 , vv55 , vv77 , vv99 , vv11 .. . Proceedings of DL 2006 69 This set of paths is the domain of IF2 . The extension of each concept C is determined by the set all pi such that C occurs in the label of the last node in pi . For the extension of each role R, we consider the pairs hpi , pj i such that the last node in pj is an Rsuccessor of pi (the extension of the roles in R+ are transitively expanded). Therefore IF p0 , p1 , p3 , . . . are in AIF2 , and hp0 , p1 i, hp1 , p3 i, hp3 , p5 i, hp5 , p7 i, . . . are all in P1 2 . In the following, let nQ denote the number of role atoms in Q, and let n ≥ nQ . For any forest F that is n-complete, a mapping µ of Q into F can be obtained from any mapping σ of varind(Q) into IF satisfying Q. If we see the image of Q under σ as a graph G (considering only the edges that correspond to simple roles), then the length of a path connecting the images σ(x) and σ(y) of any two variables x and y in Q will be at most nQ . Since F contains at least two non-overlapping trees of size n, it is big enough to ensure that for each path in G there is an isomorphic one in F. Proposition 2 Let Q be a CQ in which all roles are simple, let F ∈ ccf n (FK ), with n ≥ nQ , and let IF |= Q. Then Q ֒→ F. Example 8 IF2 models Q1 , as witnessed by the substitution σ(x) = p7 , σ(y) = p9 and σ(z) = p10 . From it we can obtain the mapping µ(x) = v7 , µ(y) = v9 and µ(z) = v10 , which shows that Q1 ֒→ F2 . Note that nQ1 = 2 and the image of Q1 under σ has no paths of length > 2. The results given above can be extended straightforwardly to a UCQ U . As before, we will use F |= U to denote that F semantically entails U (i.e., every model of F is a model of U ), and U ֒→ F to denote syntactical mappability, which is defined as Qi ֒→ F for some Qi in U . We already know that to decide K |= U it is sufficient to verify whether F |= U for every F in ccf n (FK ) for an arbitrary n ≥ 0 (in fact, Proposition 1 holds for any kind of query). It is only left to prove that for a suitable n, F |= U can be effectively reduced to U ֒→ F. Again, one direction is trivial. If U ֒→ F, then by definition there is some Qi in U such that Qi ֒→ F, and as this implies F |= Qi , we also have that F |= U . Example 9 Since Q1 ֒→ F2 (see Examples 6 and 8), we have U ֒→ F2 . F2 |= Q1 implies F2 |= U . The other direction is also quite straightforward. Consider nU as the maximal nQi for all Qi in U . For each F ∈ ccf n (FK ), with n ≥ nU , if IF |= U , then IF |= Qi for some Qi in U . Since n ≥ nU ≥ nQi , by Proposition 2 we know that Qi ֒→ F and then U ֒→ F. Thus IF |= U implies U ֒→ F as well. Finally, we establish our key result: answering K |= U for a UCQ U reduces to finding a mapping of U into every F ∈ ccf n (FK ) for any n ≥ nU . Theorem 3 Let U be a UCQ in which all roles are simple and let n ≥ nU . Then K |= U iff U ֒→ F holds for each F ∈ ccf n (FK ). 70 4 Long Papers Complexity of Query Answering In the following, kK, Qk denotes the total size of the string encoding a given knowledge base K and a query Q. As shown in [21], for a CQ Q, branching in each variable tree in a completion forest F ∈ ccf n (FK ) is polynomially bounded in kK, Qk, and the maximal depth of a variable is double exponential in kK, Qk if n is polynomial in kK, Qk. Therefore, F has at most triple exponentially many nodes. Since each rule can be applied only polynomially often to a node, the expansion of the initial completion forest FK into some F ∈ ccf n (FK ) terminates in nondeterministic triple exponential time in kK, Qk for n = nQ . Theorem 4 Given a SHIQ knowledge base K and a union of conjunctive queries U in which all roles are simple, deciding whether K |= U is in co-3NExpTime. Proof (Sketch). It is sufficient to check for every F ∈ ccf nU (FK ) whether U ֒→ F, i.e., Qi ֒→ F for some CQ Qi in U . The size of F is at most triple exponential in kK, Qi∗ k, where Qi∗ is such that nQi∗ = nU , thus also in kK, U k. Furthermore, Qi ֒→ F can be checked by naive methods in triple exponential time in kK, Qi∗ k and thus in kK, U k as well. (We stress that this test is NP-hard even for fixed F.) ✷ Notice that the result holds for binary encoding of number restrictions in K. An exponential drop results for unary encoding if Q is fixed. Under data complexity, U and all components of K = hT , R, Ai except for the ABox A are fixed. Therefore, nU is constant. Thus every completion forest F ∈ ccf n (FK ) has linearly many nodes in |A|, and any expansion of FK terminates in polynomial time. Furthermore, deciding whether U ֒→ F is polynomial in the size of F by simple methods. As a consequence, Theorem 5 For a knowledge base K in SHIQ and a union of conjunctive queries U in which all roles are simple, deciding K |= U is in coNP w.r.t. data complexity. Matching coNP-hardness follows from the respective result for ALE [24], which has been extended later to DLs even less expressive than AL [7]. Thus we obtain the following main result. Theorem 6 On knowledge bases in any DL from AL to SHIQ, answering unions of conjunctive queries in which all roles are simple is coNP-complete w.r.t. data complexity. This result not only exactly characterizes the data complexity of UCQs for a range of DLs, but also extends two previous coNP-completeness results w.r.t. data complexity which are not obvious: the result on CQs over ALCN R given in [20] to SHIQ, and the result in [18] for atomic queries in SHIQ to UCQs. 5 Discussion and Conclusion By the correspondence between query containment and query answering [1], our algorithm can also be applied to decide containment of two UCQs over a SHIQ knowledge Proceedings of DL 2006 71 base. Also, the technique is applicable to the DL SHOIQ, which extends SHIQ with nominals, i.e., concepts denoting single individuals, by tuning of the SHOIQ tableaux rules [14]. It remains open whether the proposed technique can be applied to even more expressive logics, for example, containing reflexive-transitive closure in the TBox (in the style of PDL), or to more expressive query languages. Several issues remain for further work. The restriction of the query languages to allow only simple roles is also adopted in [18]. To the best of our knowledge, it is yet unknown whether conjunctive query answering remains decidable in SHIQ when this constraint is relaxed. It remains unclear whether the algorithm which we have presented here can be exploited, since the presence of transitive roles imposes difficulties in establishing a bound on the depth of completion forests which need to be considered for answering a given query. Also the combined complexity of UCQs remains for further study. As follows from [17], it is in 2ExpTime, and thus Theorem 4 gives not a tight bound. However, we can use a more relaxed blocking condition in our algorithm, where the root of the blocked tree is not necessarily an ancestor of the blocked one. This lowers the worst-case size of a forest exponentially, leading to a co-2NExpTime upper bound, which is not optimal either. We want to point out that such blocking could be similarly used in the standard tableau algorithms for satisfiability checking, but might be inconvenient from an implementation perspective. References [1] S. Abiteboul and O. Duschka. Complexity of answering queries using materialized views. In Proc. of the 17th ACM SIGACT SIGMOD SIGART Symp. on Principles of Database Systems (PODS’98), pages 254–265, 1998. [2] F. Baader, D. Calvanese, D. McGuinness, D. Nardi, and P. F. Patel-Schneider, editors. The Description Logic Handbook: Theory, Implementation and Applications. Cambridge University Press, 2003. [3] F. Baader and U. Sattler. An overview of tableau algorithms for description logics. Studia Logica, 69(1):5–40, 2001. [4] A. Borgida and R. J. Brachman. Conceptual modeling with description logics. In Baader et al. [2], chapter 10, pages 349–372. [5] D. Calvanese and G. De Giacomo. Expressive description logics. In Baader et al. [2], chapter 5, pages 178–218. [6] D. Calvanese, G. De Giacomo, D. Lembo, M. Lenzerini, and R. Rosati. DL-Lite: Tractable description logics for ontologies. In Proc. of the 20th Nat. Conf. on Artificial Intelligence (AAAI 2005), pages 602–607, 2005. [7] D. Calvanese, G. De Giacomo, D. Lembo, M. Lenzerini, and R. Rosati. Data complexity of query answering in description logics. In Proc. of the 10th Int. Conf. on the Principles of Knowledge Representation and Reasoning (KR 2006), 2006. 72 Long Papers [8] D. Calvanese, G. De Giacomo, and M. Lenzerini. On the decidability of query containment under constraints. In Proc. of the 17th ACM SIGACT SIGMOD SIGART Symp. on Principles of Database Systems (PODS’98), pages 149–158, 1998. [9] D. Calvanese, G. De Giacomo, and M. Lenzerini. Answering queries using views over description logics knowledge bases. In Proc. of the 17th Nat. Conf. on Artificial Intelligence (AAAI 2000), pages 386–391, 2000. [10] F. M. Donini, M. Lenzerini, D. Nardi, and A. Schaerf. Deduction in concept languages: From subsumption to instance checking. J. of Logic and Computation, 4(4):423–452, 1994. [11] J. Heflin and J. Hendler. A portrait of the Semantic Web in action. IEEE Intelligent Systems, 16(2):54–59, 2001. [12] I. Horrocks, P. F. Patel-Schneider, and F. van Harmelen. From SHIQ and RDF to OWL: The making of a web ontology language. J. of Web Semantics, 1(1):7–26, 2003. [13] I. Horrocks and U. Sattler. A description logic with transitive and inverse roles and role hierarchies. J. of Logic and Computation, 9(3):385–410, 1999. [14] I. Horrocks and U. Sattler. A tableaux decision procedure for SHOIQ. In Proc. of the 19th Int. Joint Conf. on Artificial Intelligence (IJCAI 2005), pages 448–453, 2005. [15] I. Horrocks, U. Sattler, and S. Tobies. Reasoning with individuals for the description logic SHIQ. In D. McAllester, editor, Proc. of the 17th Int. Conf. on Automated Deduction (CADE 2000), volume 1831 of Lecture Notes in Computer Science, pages 482–496. Springer, 2000. [16] I. Horrocks and S. Tessaris. A conjunctive query language for description logic ABoxes. In Proc. of the 17th Nat. Conf. on Artificial Intelligence (AAAI 2000), pages 399–404, 2000. [17] U. Hustadt, B. Motik, and U. Sattler. A decomposition rule for decision procedures by resolution-based calculi. In Proc. of the 11th Int. Conf. on Logic for Programming, Artificial Intelligence and Reasoning (LPAR 2004), pages 21–35, 2004. [18] U. Hustadt, B. Motik, and U. Sattler. Data complexity of reasoning in very expressive description logics. In Proc. of the 19th Int. Joint Conf. on Artificial Intelligence (IJCAI 2005), pages 466–471, 2005. [19] M. Lenzerini. Data integration: A theoretical perspective. In Proc. of the 21st ACM SIGACT SIGMOD SIGART Symp. on Principles of Database Systems (PODS 2002), pages 233–246, 2002. Proceedings of DL 2006 73 [20] A. Y. Levy and M.-C. Rousset. Combining Horn rules and description logics in CARIN. Artificial Intelligence, 104(1–2):165–209, 1998. [21] M. M. Ortiz de la Fuente, D. Calvanese, and T. Eiter. Data complexity of answering unions of conjunctive queries in SHIQ. Technical report, Faculty of Computer Science, Free University of Bozen-Bolzano, Mar. 2006. Available at http://www. inf.unibz.it/~calvanese/papers/orti-calv-eite-TR-2006-03.pdf%. [22] P. Patel-Schneider, P. Hayes, and I. Horrocks. OWL Web Ontology Language semantics and abstract syntax – W3C recommendation. Technical report, World Wide Web Consortium, Feb. 2004. Available at http://www.w3.org/TR/ owl-semantics/. [23] A. Schaerf. On the complexity of the instance checking problem in concept languages with existential quantification. J. of Intelligent Information Systems, 2:265–278, 1993. [24] A. Schaerf. Query Answering in Concept-Based Knowledge Representation Systems: Algorithms, Complexity, and Semantic Issues. PhD thesis, Dipartimento di Informatica e Sistemistica, Università di Roma “La Sapienza”, 1994. [25] S. Tobies. Complexity Results and Practical Algorithms for Logics in Knowledge Representation. PhD thesis, LuFG Theoretical Computer Science, RWTHAachen, Germany, 2001. [26] M. Y. Vardi. The complexity of relational query languages. In Proc. of the 14th ACM SIGACT Symp. on Theory of Computing (STOC’82), pages 137–146, 1982. 74 Long Papers PSpace Automata for Description Logics Jan Hladik∗ Rafael Peñaloza† Abstract Tree automata are often used for satisfiability testing in the area of description logics, which usually yields ExpTime complexity results. We examine conditions under which this result can be improved, and we define two classes of automata, called segmentable and weakly-segmentable, for which emptiness can be decided using space logarithmic in the size of the automaton (and thus polynomial in the size of the input). The usefulness of segmentable automata is demonstrated by reproving the known PSpace result for satisfiability of ALC concepts with respect to acyclic TBoxes. 1 Introduction Tableau- and automata-based algorithms are two mechanisms which are widely used for testing satisfiability in description logics (DLs). Aside from considerations regarding implementation (most of the efficient implementations are tableau-based) and elegance (tableaus for expressive logics require a blocking condition to ensure termination), there is also a difference between the complexity results which can be obtained “naturally”, i.e. without using techniques with the sole purpose of remaining in a specific complexity class. With tableaus, the natural complexity class is usually NExpTime, e.g. for SHIQ [HST00, BS01] or SHIQ(D) [Lut04], although this result is not optimal in the former case. With automata, one usually obtains an ExpTime result, e.g. for ALC with general TBoxes [Sch94]. Previously, we examined which properties of a NExpTime tableau algorithm make sure that the logic is decidable in ExpTime, and we defined a class of tableau algorithms for which an ExpTime automata algorithm can be automatically derived [BHLW03]. For ExpTime automata, a frequently used ∗ † Automata Theory, TU Dresden (jan.hladik@tu-dresden.de) Intelligent Systems, Uni Leipzig (rpenalozan@yahoo.com) Proceedings of DL 2006 75 method to obtain a lower complexity class is testing emptiness of the language accepted by the automaton on the fly, i.e. without keeping the entire automaton in the memory at the same time. Examples for DLs can be found in [HST00] for SI and in [BN03] for ALCN . Furthermore, the inverse method [Vor01] for the modal logic K can be regarded as an optimised emptiness test of the corresponding automaton [BT01], and also the “bottom up” version of the binary decision diagram based satisfiability test presented in [PSV02] can be considered as an on-the-fly emptiness test. In this paper, our aim is to generalise these results by finding properties of ExpTime automata algorithms which guarantee that the corresponding logic can be decided in PSpace, and to develop a framework which can be used to automatically obtain PSpace results for new logics. 2 Preliminaries We will first define the automata which in the following will be used to decide the satisfiability problem for DLs. These automata operate on infinite k-ary trees, for which the root node is identified by ε and the i-th successor of a node n is identified by n · i for 1 ≤ i ≤ k. Thus, the set of all nodes is {1, . . . , k}∗ , and in the case of labelled trees, we will refer to the labelling of the node n in the tree t by t(n). The following definition of automata does not include an alphabet for labelling the tree nodes, because in order to decide the emptiness problem, we are only interested in the existence of a model and not in the labelling of its nodes. Definition 1 (Automaton, run, accepted language.) A Büchi automaton over k-ary trees is a tuple (Q, ∆, I, F ), where Q is a finite set of states, ∆ ⊆ Qk+1 is the transition relation, I ⊆ Q is the set of initial states, and F ⊆ Q is the set of final states. A looping automaton is a Büchi automaton where all states are accepting, i.e. F = Q. For simplicity, it will be written (Q, ∆, I). A run of an automaton A = (Q, ∆, I, F ) on a k-ary tree t is a labelled k-ary tree r such that r(ε) ∈ I and, for all w ∈ {1, . . . , k}∗ , it holds that (r(w), r(w · 1), . . . , r(w · k)) ∈ ∆. A run r is accepting if every path of r contains a final state infinitely often. The language accepted by A, L(A), is the set of all trees t such that there exists an accepting run of A on t. For the DL ALC [SS91], it is well-known that looping automata can be used to decide satisfiability of a concept C: we define a looping automaton AC = (Q, ∆, I), where the set of states Q consists of (propositionally expanded and clash-free) sets of subformulas of C, and the transition relation ∆ ensures 76 Long Papers that the successor states of a state q contain those concepts which are required by the universal and existential concepts in q. Since #Q, the cardinality of Q, is exponential in the size of C and T (because it is bounded by the number of sets of subformulas of C and T ) and the emptiness test is linear [BT01, VW86] in the cardinality of Q, this yields an ExpTime algorithm. This result is optimal for ALC with general TBoxes, but not for ALC with acyclic (or empty) TBoxes. In the following, we will define this algorithm in detail. We assume that . acyclic TBoxes are sets of concept definitions Ai = Ci , for concept names Ai and concept terms Ci , where there is at most one definition for a concept name . . and there is no sequence of concept definitions A1 = C1 , . . . , An = Cn such that Ci contains Ai+1 for 1 ≤ i < n and Cn contains A1 . In contrast, general TBoxes can additionally contain general concept inclusion axioms (GCIs) of the kind Ci ⊑ Di for arbitrary concept terms Ci and Di . For the sake of simplicity, we will assume that all concepts are in negation normal form (NNF), i.e. negation appears only directly before concept names. All ALC concepts can be transformed into NNF in linear time using de Morgan’s laws and their analogues for universal and existential formulas. We will denote the NNF of a concept C by nnf(C) and nnf(¬C) by ∽ C. The data structures that will serve as models for ALC concepts are Hintikka trees, a special kind of trees whose nodes are labelled with propositionally expanded and clash-free sets of ALC concepts. Definition 2 (Sub-concept, Hintikka set, Hintikka tree.) Let C be an ALC concept term. The set of sub-concepts of C, sub(C), is the minimal set S which contains C and has the following properties: if S contains ¬A for a concept name A, then A ∈ S; if S contains D ⊔ E or D ⊓ E, then {D, E} ⊆ S; if S contains ∃r.D or ∀r.D, then D ∈ S. For a TBox T , sub(C, T ) is defined as follows: [ [ sub(C) ∪ (A ∪ sub(D) ∪ sub(∽ D)) ∪ sub(∽ C ⊔ D) . C⊑D∈T A=D∈T A set H ⊆ sub(C, T ) is called a Hintikka set for C if the following three conditions are satisfied: if D ⊓ E ∈ H, then {D, E} ⊆ H; if D ⊔ E ∈ H, then {D, E} ∩ H 6= ∅; there is no concept name A with {A, ¬A} ⊆ H. For a TBox T , a Hintikka set S is called T -expanded if for every GCI C ⊑ . D ∈ T , it holds that ∽ C ⊔ D ∈ S, and for every concept definition A = C ∈ T , it holds that if A ∈ S then C ∈ S and if ¬A ∈ S then ∽ C ∈ S. We will refer to this technique of handling definitions as lazy unfolding because, in contrast to GCIs, we use the definition only if A or ¬A is explicitly present in a node label. For a concept term C and TBox T , fix an ordering of the existential concepts in sub(C, T ) and let ϕ : {∃r.D ∈ sub(C, T )} → {1, . . . , k} be the corresponding Proceedings of DL 2006 77 ordering function. Then the tuple (S, S1 , . . . , Sk ) is called C, T -compatible if, for every existential formula ∃r.D ∈ sub(C, T ), it holds that if ∃r.D ∈ S, then Sϕ(∃r.D) contains D and every concept Ei for which there is a universal formula ∀r.Ei ∈ S. A k-ary tree t is called a Hintikka tree for C and T if, for every node n ∈ {1, . . . , k}∗ , t(n) is a T -expanded Hintikka set and the tuple (t(n), t(n·1), . . . , t(n· k)) is C, T -compatible. Note that in a Hintikka tree t, the k-th successor of a node n stands for the individual satisfying the k-th existential formula D if D ∈ t(n). We can use Hintikka trees to test the satisfiability in ALC: Lemma 3 An ALC concept term C is satisfiable w.r.t. a TBox T iff there is a C, T -compatible Hintikka tree t with C ∈ t(ε). Proof sketch. The proof is similar to the one presented for ALC ¬ in [LS00] where the “if” direction is shown by defining a model (∆I , ·I ) from a Hintikka tree in the following way: • ∆I := {n ∈ {1, . . . , k}∗ | n = ε or n = m · ϕ(∃r.D) for some m with ∃r.D ∈ t(m)}; • for a role name r, r I := {(n, n · i) | ∃r.C ∈ t(n) and ϕ(∃r.C) = i}; • for a concept name A, AI := {n | A ∈ t(n)}; • the function ·I is extended to concept terms in the natural way. For our Hintikka trees, we have to modify the definition of AI for concept names A in order to deal with TBoxes. For a GCI C ⊑ D, it follows immediately from the definition of T -expanded that a node whose label contains C also contains D. However, concept definitions need special consideration because due . to the lazy unfolding of A = C, a node label might contain C but not A, thus we have to modify the definition of AI . To this end, we define a hierarchy ≺ on concept names in such a way that if a concept name A appears in the definition of B, then A ≺ B. As the concept definitions are acyclic, this hierarchy is wellfounded. When we define the interpretation of concept names, we start with the lowest ones in the hierarchy, i.e. the primitive concepts, and define AI := {n ∈ ∆I | A ∈ t(n)}. Then we move gradually up in the hierarchy and define, for a . defined concept B = C, B I = {n ∈ ∆I | B ∈ t(n)} ∪ {n ∈ ∆I | n ∈ C I }. This is well-defined because the interpretation of all concept names appearing in C has already been defined. Our Hintikka trees differ from those in [LS00] in that, if an existential formula ∃r.D is not present in a node n, we do not require that n · ϕ(∃r.D) is labelled with ∅. However, it can still be shown that if a concept term C is contained in 78 Long Papers the label of a node n of the Hintikka tree, then n ∈ C I , because in the definition of the interpretation for the role names, we consider only the successors that will satisfy the existential restrictions of a node, and pay no attention to any other possible successors. The universal restrictions are then immediately satisfied by the definition of C,T -compatible. The “only-if” direction does not require significant modifications, because if there is a model for a concept C and a TBox T , the node labels of the Hintikka tree constructed as in [LS00] can easily be extended to reflect the constraints imposed by the TBox. ■ With this result, we can use automata operating on Hintikka trees to test for the existence of models. As mentioned before, we can omit the labelling of the tree, since we are only interested in the existence of a model and all relevant information to answer this question is kept in the transition relation. Definition 4 (Automaton AC,T .) For a concept C and a TBox T , let k be the number of existential formulas in sub(C, T ). Then the looping automaton AC,T = (Q, ∆, I) is defined as follows: Q = {S ⊆ sub(C, T ) | S is a T -expanded Hintikka set}; ∆ = {(S, S1 , . . . , Sk ) | (S, S1 , . . . , Sk ) is C, T -compatible}; I = {S ∈ Q | C ∈ S}. Using AC,T , we can reduce the satisfiability problem for ALC to the (non-) emptiness problem of L(AC,T ). Since these results are well known, they will not be formally proved. Theorem 5 The language accepted by the automaton AC,T is empty iff C is unsatisfiable w.r.t. T . Corollary 6 Satisfiability of ALC concepts w.r.t. general TBoxes is decidable in ExpTime. For general TBoxes, this complexity bound is tight [Spa93], but in the special case of an empty or acyclic TBoxes, it can be improved to PSpace. Usually, this is proved using a tableau algorithm, but in the next section we will show how the special properties of acyclic TBoxes can be used to perform the emptiness test of the automaton with logarithmic space. 3 Segmentable automata In this section we will show how the space efficiency for the construction and the emptiness test of the automaton can be improved under specific conditions. The idea is to define a hierarchy of states and ensure that the level of the state decreases with every transition. In Section 4 we will then show how the role depth of concepts can be used to define this hierarchy. Proceedings of DL 2006 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 79 guess an initial state q ∈ I if there is a transition from q then guess a transition (q, q1 , . . . , qk ) ∈ ∆ else return “empty” end if push (SQ, (q1 , . . . , qk )); push (SN, 0) while SN is not empty do (q1 , . . . , qk ) := pop (SQ) n := pop (SN) + 1 if n ≤ k then push(SQ,(q1 , . . . , qk )) push(SN,n) if qn ∈ / Q0 then if there is a transition from qn then guess a transition (qn , q1′ , . . . , qk′ ) else return “empty” end if push(SQ,(q1′ , . . . , qk′ )) push(SN,0) end if end if end while return “not empty” Figure 1: Emptiness test for segmentable automata Definition 7 (Q0 -looping, m-segmentable.) Let A = (Q, ∆, I, F ) be a Büchi automaton over k-ary trees and Q0 ⊆ F . We call A Q0 -looping if for every q ∈ Q0 there exists a set of states {q1 , . . . , qk } ⊆ Q0 such that (q, q1 , . . . , qk ) ∈ ∆. An automaton A = (Q, ∆, I, F ) is called m-segmentable if there exists a partition Q0 , Q1 , . . . , Qm of Q such that A is Q0 -looping and, for every (q, q1 , . . . , qk ) ∈ ∆, it holds Sn−1that if q ∈ Qn , then qi ∈ Q<n for 1 ≤ i ≤ k, where Q<n denotes Q0 ∪ j=1 Qj . Note that it follows immediately from this definition that for every element q of Q0 there exists an infinite tree with q as root which is accepted by A. The hierarchy Qm , . . . , Q0 ensures that Q0 is reached eventually. Our algorithm performing the emptiness test for m-segmentable Büchi automata is shown in Figure 1. Essentially, we perform a depth-first traversal of a run. Since A is m-segmentable, we do not have to go to a depth larger than 80 Long Papers q5 q4 q4 ✁ q2 ☎ ✄ (q4 , q4 , q0 ) 1 (q3 , q2 , q2 ) 3 (q1 , q0 , q1 ) 1 q2 ✆ ✝ q1 ✞ SN q0 ✂ q3 SQ q0 ✟ q1 ✠ Figure 2: state of SQ, SN and the associated run, at an iteration of the algorithm m. Moreover, since the different branches of the tree are independent, we only have to keep one of them in memory at a time. Note that the construction of the automaton is interleaved with the emptiness test, so we also never keep the whole automaton in memory, but only the states which are relevant for the current branch. In order to remember the backtracking information for the depth first traversal, we use two data structures: SQ is a stack storing, for every predecessor of the current node, the transition which led to that node, and thus it contains the required node labels for the nodes of the current branch and their siblings. SN is another stack recording the current path by storing, for every level of the tree, the number of the node on the current path. If we refer to the elements in SN by SN(1)(the bottom element), . . . , SN(d)(the top element), the next node to be checked is SN(1) · SN(2) · . . . · SN(d) + 1 (d is the depth of SN). Thus, SQ ∈ (Q k )∗ , because every transition is a k-ary tuple, and SN ∈ {1, . . . , k}∗ . Figure 2 shows the values stored in each of the stacks SQ and SN at the beginning of an iteration, and their relation with the traversal of the run. The circled nodes represent the path followed to reach the node about to be checked. The values of the elements of the stack are shown next to the depth in the run to which they correspond. For this reason, the stacks appear backwards, with their bottom element at the top of the figure, and vice versa. After starting the algorithm, we first guess an initial transition. If we can find one, we push the labels of the nodes 1, . . . , k onto SQ and the number 0 onto SN. Then we enter the while loop. As long as the stacks are not empty, we take the top elements of both stacks. If n > k in line 11, this indicates that we have checked all nodes on this level, and we backtrack without pushing anything on the stacks, which means that we will continue at the next upper level in the next loop. Otherwise, we store the information that we have to check our next sibling Proceedings of DL 2006 81 by pushing the same tuple of states onto SQ and the incremented number n onto SN. If the current node belongs to Q0 (line 14), we backtrack, which means that we will continue with the next sibling. Otherwise, we try to guess a transition from this node, and if we can find one, we push the required node labels for the children of the current node onto SQ and the value 0 onto SN (line 20), which means that we will descend to the first child of the current node in the next loop. Theorem 8 The emptiness problem of the language accepted by an msegmentable Büchi automaton A = (Q, ∆, I, F ) over k-ary trees can be decided by a non-deterministic algorithm using space O(log(#Q) · m · k). Proof. In order to show soundness, we will prove the claim “if the algorithm processes a node n or backtracks without descending into n, then there is a run r in which n is labelled with the same state as in the algorithm” by induction over the iterations of the while loop. Initially, if the algorithm does not answer “empty”, there is a transition (q0 , q1 , . . . , qk ) from an initial state, which can serve as root of the run r, and for which the states 1, . . . , k of r can be labelled with q1 , . . . , qk . If the algorithm has reached a node n = n0 ·n1 ·. . .·nℓ without failing, it follows by induction hypothesis that each of the previously visited nodes corresponds to a node in r. Now there are two possibilities: firstly, if r(n) ∈ Q0 , then, since A is Q0 -looping, there exists a k-ary subtree rooted at n all of whose states are accepting. Otherwise, since the algorithm does not answer “empty”, there is a transition (r(n), q1′ , . . . , qk′ ), and we can use the same transition in the construction of a run. In order to show completeness, we will prove the claim “if there exists a run, the algorithm can reach or skip every node in {1, . . . , k}∗ without failing” by induction over the structure of the run r. Since there is a run, we can guess an initial transition, and the nodes of the first level have the same labels in the algorithm as in r. If we have reached a node n which corresponds to the node n in r with r(n) = q, there are again two possibilities: if q ∈ Q0 , the algorithm will backtrack and skip over all successor nodes of n. Otherwise, since r is a run, there exists a transition (q, q1′ , . . . , qk′ ), which the algorithm can guess, and therefore it will not fail. Regarding memory consumption, observe that the SQ stack contains, for every level, k states, each of which can be represented using space logarithmic in the number of states, e.g. by using binary coding. Since A is m-segmentable, there can be at most m tuples before the current state qn belongs to Q0 , thus the size of SQ is bounded by log(#Q) · m · k. SN stores at most m numbers between 0 and k, so the algorithm uses space logarithmic in the size of A. ■ 82 Long Papers The condition that an automaton A is m-segmentable is rather strong since it requires the transition relation to reduce the class with every possible transition, and thus e.g. the automaton AC,T in Definition 4 cannot easily be proved to be segmentable even if the TBox is empty. The reason for this is that AC,T does not require the Hintikka sets of the successor states to use only a lower quantification depth. However, in order to test emptiness, we only need the existence of such a transition. This is the idea behind the generalisation in the following definition. Definition 9 (Weakly-m-segmentable, reduced.) A Büchi automaton A = (Q, ∆, I, F ) is called weakly-m-segmentable if there exists a partition Q0 , Q1 , . . . , Qm of Q such that A is Q0 -looping and for every q ∈ Q there exists a function fq : Q → Q which satisfies the following conditions: 1. if (q, q1 , . . . , qk ) ∈ ∆, then (q, fq (q1 ), . . . , fq (qk )) ∈ ∆, and if q ∈ Qn , then fq (qi ) ∈ Q<n for all 1 ≤ i ≤ k; 2. if (q ′ , q1 , . . . , qk ) ∈ ∆, then (fq (q ′ ), fq (q1 ), . . . , fq (qk )) ∈ ∆. If A = (Q, ∆, I, F ) is a weakly-m-segmentable automaton, then Ar , the reduced automaton of A, is defined as follows: Ar = (Q, ∆′ , I, F ) with ∆′ = {(q, q1 , . . . , qm ) ∈ ∆ | if q ∈ Qn then qi ∈ Q<n for 1 ≤ i ≤ k}. Note that the reduced automaton Ar is m-segmentable by definition. Intuitively, condition 1 ensures that that the class decreases for the first transition, and condition 2 ensures that there are still transitions for all nodes after modifying the node labels according to fq . We can transfer the complexity result from segmentable to weaklysegmentable automata: Theorem 10 Let A = (Q, ∆, I, F ) be a weakly-m-segmentable automaton. Then L(A) is empty iff L(Ar ) is empty. Proof. Since every run of Ar is also a run of A, L(A) can only be empty if L(Ar ) is empty, thus the “only if” direction is obvious. For the “if” direction, we will show how to transform an accepting run r of A into an accepting run s of Ar . To do this, we traverse r breadth-first, creating an intermediate run r̂, which initially is equal to r. At every node n ∈ {1, . . . , k}∗ , we replace the labels of the direct and indirect successors of n with their respective fn values (see Definition 9). More formally, at node n, we replace r̂(p) with fn (r̂(p)) for all p ∈ {n · q | q ∈ {1, . . . , k}+ }, where for a set S, S + denotes S ∗ \ {ε}. By definition 9, r̂ is still a run after the replacement, and all direct successors of n are in a lower class than n (or Q0 if r̂(n) ∈ Q0 ). Note that the labels of n’s successors are not modified anymore after n has been processed. We can Proceedings of DL 2006 83 therefore define s(n) as the value of r̂(n) after n has been processed. As argued before, s is a run in which every node is in a lower class than its father node (or both are in class 0). Consequently, all transitions used in s belong to the transition relation of Ar . ■ Corollary 11 The emptiness problem for weakly-m-segmentable automata is in NLogSpace. 4 An application to ALC with acyclic TBoxes In order to apply our framework to ALC with acyclic TBoxes, we will use the role depth to define the different classes. The following definition of role depth considers concept definitions: Definition 12 (Expanded role depth.) For an ALC concept C and an acyclic TBox T , the expanded role depth rdT (C) is inductively defined as follows: for a primitive role name A, rdT (A) = 0; for a concept definition . A = C, rdT (A) = rdT (C); rdT (¬A) = rdT (A); rdT (D ⊓ E) = rdT (D ⊔ E) = max{rdT (D), rdT (E)}; rdT (∀r.D) = rdT (∃r.D) = rdT (D) + 1. For a set of concepts S, rdT (S) is defined as max{rdT (D) | D ∈ S}. The set sub<n (C, T ) is defined as {D ∈ sub(C, T ) | rdT (D) ≤ max{0, n−1}}. Again, note that rdT is well-defined because T is acyclic. The intuition behind using the role depth is that, for a node q in a Hintikka tree, any concept having a higher role depth than q is superfluous in successors of q and thus the tuple without these formulas is also in the transition relation. Lemma 13 Let C be an ALC concept, T an acyclic TBox, (S, S1 , . . . , Sk ) a C,T -compatible tuple, and n = rdT (S). Then (S, sub<n (C, T ) ∩ S1 , . . ., sub<n (C, T ) ∩ Sk ) is C,T -compatible, and for every m ≥ 0, the tuple (sub<m (C, T ) ∩ S, sub<m (C, T ) ∩ S1 , . . ., sub<m (C, T ) ∩ Sk ) is C,T -compatible. Proof. We need to show that the conditions in Definition 2 are satisfied for both tuples. In the case of the first tuple suppose that ∃r.D ∈ S. Then, Sϕ(∃r.D) contains D and every concept Ei for which there is a universal formula ∀r.Ei ∈ S. But since rdT (D) < rdT (∃.rD) ≤ n and rdT (Ei ) < rdT (∀r.Ei ) ≤ n, it holds that sub<n (C, T ) ∩ Sϕ(∃r.D) contains D and each of the Ei concepts. For the second tuple, if ∃r.D ∈ sub<m (C, T ) ∩ S, then rdT (∃r.D) < m and D ∈ Sϕ(∃r.D) . If additionally there is a concept term Ei such that the universal formula ∀r.Ei ∈ sub<m (C, T ) ∩ S, then again rdT (Ei ) < m and Ei ∈ Sϕ(∃r.D) . Hence, sub<m (C, T ) ∩ Sϕ(∃r.D) contains D and each such concept Ei . ■ 84 Long Papers Theorem 14 Let C be an ALC concept, T an acyclic TBox and m = max{rdT (D) | D ∈ sub(C, T )}. Then AC,T is weakly-m-segmentable. Proof. We have to give the segmentation of Q and the functions fq and show that they satisfy the conditions in Definition 9. Define the classes Qi := {S ∈ Q | rdT (S) = i}, 0 ≤ i ≤ m and fq (q ′ ) := q ′ ∩ sub<n (C, T ), where n = rdT (q) for every q, q ′ ∈ Q. By this definition, it is obvious that for every q ′ , fq (q ′ ) is in a lower class than q (or in Q0 if q ∈ Q0 ). Lemma 13 shows that conditions 1 and 2 of Definition 9 are satisfied. It remains to show that AC,T is Q0 -looping. If q ∈ Q0 , there are no existential formulas in q, and therefore (q, ∅, . . . , ∅) ∈ ∆. ■ Although our algorithm in Figure 1 is non-deterministic, we can obtain a deterministic complexity class by using Savitch’s theorem [Sav70]. Corollary 15 Satisfiability of ALC concepts with respect to acyclic TBoxes is in PSpace. 5 Conclusion We have introduced segmentable and weakly-segmentable Büchi automata, two classes of automata for which the emptiness problem of the accepted language is decidable in NLogSpace, whereas in general the complexity class of this problem for Büchi automata is P. The complexity bound is proved by testing the possibility of a model on the fly using depth-first search. This generalises previous results of on-the-fly emptiness tests for several modal and description logics. As an example, we showed how our framework can be used to obtain the PSpace upper complexity bound for ALC with acyclic TBoxes in an easy way. We hope that this framework will make it easier to prove a PSpace upper bound also for new logics. Acknowledgements We would like to thank Franz Baader for fruitful discussions. We also thank the reviewers for suggesting improvements of this paper. References [BHLW03] F. Baader, J. Hladik, C. Lutz, and F. Wolter. From tableaux to automata for description logics. Fundamenta Informaticae, 57:1–33, 2003. Proceedings of DL 2006 85 [BN03] F. Baader and W. Nutt. The Description Logic Handbook, chapter 2: Basic Description Logics. Cambridge University Press, 2003. [BS01] F. Baader and U. Sattler. An overview of tableau algorithms for description logics. Studia Logica, 69, 2001. [BT01] F. Baader and S. Tobies. The inverse method implements the automata approach for modal satisfiability. In R. Goré, A. Leitsch, and T. Nipkow, editors, Proceedings of IJCAR-01, volume 2083 of LNAI. Springer-Verlag, 2001. [HST00] I. Horrocks, U. Sattler, and S. Tobies. Practical reasoning for very expressive description logics. Logic Journal of the IGPL, 8(3):239– 264, 2000. [LS00] C. Lutz and U. Sattler. Mary likes all cats. In F. Baader and U. Sattler, editors, Proceedings of DL 2000, CEUR Proceedings, 2000. [Lut04] C. Lutz. NExpTime-complete description logics with concrete domains. ACM Transactions on Computational Logic, 5(4):669–705, 2004. [PSV02] G. Pan, U. Sattler, and M. Y. Vardi. BDD-based decision procedures for K. In Proceedings of the Conference on Automated Deduction, volume 2392 of Lecture Notes in Artificial Intelligence, 2002. [Sav70] W. J. Savitch. Relationships between nondeterministic and deterministic tape complexities. Journal of computer and system sciences, 4(2):177–192, 1970. [Sch94] K. Schild. Terminological cycles and the propositional µ-calculus. In J. Doyle, E. Sandewall, and P. Torasso, editors, Proceedings of KR-94. Morgan Kaufmann, 1994. [Spa93] E. Spaan. Complexity of Modal Logics. PhD thesis, University of Amsterdam, 1993. [SS91] M. Schmidt-Schauß and G. Smolka. Attributive concept descriptions with complements. Artificial Intelligence, 48(1):1–26, 1991. [Vor01] A. Voronkov. How to optimize proof-search in modal logics: new methods of proving reduncancy criteria for sequent calculi. ACM transactions on computational logic, 2(2), 2001. [VW86] M. Y. Vardi and P. Wolper. Automata-theoretic techniques for modal logics of programs. J. of Computer and System Science, 32:183–221, 1986. 86 Long Papers Binary Absorption in Tableaux-Based Reasoning for Description Logics Alexander K. Hudek and Grant Weddell David R. Cheriton School of Computer Science University of Waterloo {akhudek,gweddell}@cs.uwaterloo.ca 1 Introduction A fundamental problem in Description Logics (DLs) is satisfiability, the problem of checking if a given DL terminology T remains sufficiently unconstrained to enable at least one instance of a given DL concept C to exist. It has been known for some time that lazy unfolding is an important optimization technique in model building algorithms for satisfiability [2]. It is also imperative for large terminologies to be manipulated by an absorption generation process to maximize the benefits of lazy unfolding in such algorithms, thereby reducing the combinatorial effects of disjunction in underlying chase procedures [5]. In this paper, we propose a generalization of the absorption theory and algorithms developed by Horrocks and Tobies [6, 7]. The generalization, called binary absorption, makes it possible for lazy unfolding to be used for parts of terminologies not handled by current absorption algorithms and theory. The basic idea of binary absorption is to avoid the need to internalize (at least some of the) terminological axioms of the form (A1 ⊓ A2 ) ⊑ C, where the Ai denote primitive concepts and C a general concept. This idea, coupled with equivalences and another idea relating to “role absorptions” developed by Tsarkov and Horrocks [8], makes it possible for an algorithm to absorb, e.g., the definition SPECIALCLIENT as the set of axioms . = CLIENT ⊓ (∃Buy.(EXPENSIVE ⊔ PROFITABLE)) ⊓ (∃Recommend− .TRUSTEDCLIENT) 87 Proceedings of DL 2006 SPECIALCLIENT ⊑ EXPENSIVE PROFITABLE A1 CLIENT ⊓ A2 TRUSTEDCLIENT A3 ⊓ A4 ⊑ ⊑ ⊑ ⊑ ⊑ ⊑ CLIENT ⊓ (∃Buy.(EXPENSIVE ⊔ PROFITABLE)) ⊓ (∃Recommend− .TRUSTEDCLIENT) A1 A1 ∀Buy − .A2 A3 ∀Recommend.A4 SPECIALCLIENT in which the primitive concepts A1, A2, A3 and A4 are new internal primitive concepts introduced by the absorption algorithm. There is another reason that binary absorption proves useful, beyond the welldocumented advantages of reducing the need for internalization of general terminological axioms. In particular, Palacios has explored the possibility of a tighter integration of conjunctive query optimization and DL consistency checking in which a query is mapped to a concept in such a way that view integration becomes an automatic consequence of an initial chase phase for optimization [4, 9]. When used for such purposes, it becomes crucial for DL reasoners to support special case (and likely incomplete) deterministic modes of model building. Binary absorption enables such modes to incorporate reasoning about materialized views in a terminology, such as SPECIALCLIENT above. The organization of the paper is as follows. The next section is a review of the basic definitions introduced by Horrocks and Tobies [6] for the notion of a DL, of terminologies and satisfiability, and an important abstraction that relates to model building algorithms for satisfiability: the notion of a witness. In Section 3, we define binary absorptions, and give a related lemma that establishes an additional sufficiency condition for correct binary absorptions. (Note that existing sufficiency conditions given by Horrocks and Tobies [6, 7] for correct non-binary absorptions are inherited in our formulation.) In Section 4, we present an absorption algorithm for binary absorptions that derives from earlier procedures [1, 6, 7]. Our summary comments follow in Section 5. 2 Preliminaries The definitions and lemmas in this section are largely reproduced from Horrocks and Tobies [7]. The main difference is in our formulation of a description logic immediately following in which we have an additional stipulation that the logic includes the concept forming operations of ALCI. Definition 2.1. (Description Logic) Let L be a DL based on infinite sets of atomic concepts NC and atomic roles NR. We identify L with the set of its well-formed concepts and require L to be closed under sub-concepts and the concept forming operations of dialect ALCI: we require that if NR contains R and L contains C1 and C2 , then L also contains ¬C1 , C1 ⊓ C2 , C1 ⊔ C2 , ⊤, ⊥, ∃R.C1 , ∃R− .C1 , ∀R.C1 and ∀R− .C1 . 88 Long Papers An interpretation I is a pair I = (∆I , ·I ), where ∆I is a non-empty set and ·I is a function mapping NC to subsets of ∆I and NR to subsets of ∆I × ∆I . Each L is associated with a set Int(L) of admissible interpretations that (1) must be closed under isomorphisms, and that (2) satisfies I ∈ Int(L) ⇔ I ′ ∈ Int(L) for any two interpretations I and I ′ that agree on NR. Each L must also come with a semantics that allows any I ∈ Int(L) to be extended to each concept C ∈ L in a way that satisfies the following conditions: (I1) the concept forming operations of ALCI are mapped in the standard way, and (I2) the interpretation C I of a compound concept C ∈ L depends only on the interpretation of those atomic concepts and roles that appear syntactically in C. Definition 2.2. (TBox, Satisfiability) A TBox T for L is a finite set of axioms . . of the form C1 ⊑ C2 or C1 = C2 where Ci ∈ L. If T contains A ⊑ C or A = C for some A ∈ NC, then we say that A is defined in T . Let L be a DL and T a TBox. An interpretation I ∈ Int(L) is a model of T , written I |= T , iff C1I ⊆ C2I holds for each C1 ⊑ C2 ∈ T , and C1I = C2I holds for each . C1 = C2 ∈ T . A concept C ∈ L is satisfiable with respect to a TBox T iff there is an I ∈ Int(L) such that I |= T and such that C I 6= ∅. . A TBox T is called primitive iff it consists entirely of axioms of the form A = C with A ∈ NC, each A ∈ NC appears in at most one left hand side of an axiom, and T is acyclic. Acyclicity is defined as follows: A1 ∈ NC directly uses A2 ∈ NC if . A1 = C ∈ T and A2 occurs in C; uses is the transitive closure of “directly uses”. Then T is acyclic if there is no A ∈ NC that uses itself. Model building algorithms for checking the satisfaction of a concept C operate by manipulating an internal data structure (e.g., in the form of a node and edge labelled rooted tree with “back edges”). The data structure “encodes” a partial description of (eventual) interpretations I for which C I will be non-empty. Such a partial description will almost always abstract details on class membership for hypothetical elements of ∆I and on details relating to the interpretation of roles. To talk formally about absorption and lazy evaluation, it is necessary to codify the idea of a partial description. Horrocks and Tobies have done this by introducing the following notion of a witness, of an interpretation that stems from a witness, and of what it means for a witness to be admissible with respect to a given terminology. Definition 2.3. (Witness) Let L be a DL and C ∈ L a concept. A witness W = (∆W , ·W , LW ) for C consists of a non-empty set ∆W , a function ·W that maps NR to subsets of ∆W × ∆W , and a function LW that maps ∆W to subsets of L such that: (W1) there is some x ∈ ∆W with C ∈ LW (x), (W2) there is an interpretation I ∈ Int(L) that stems from W, and (W3) for each interpretation I ∈ Int(L) that stems from W, x ∈ C I if C ∈ LW (x). 89 Proceedings of DL 2006 An interpretation I = (∆I , ·I ) is said to stem from W if ∆I = ∆W , ·I |NR = ·W , and for each A ∈ NC, A ∈ LW (x) implies x ∈ AI and ¬A ∈ LW (x) implies x ∈ / AI . A witness W is called admissible with respect to a TBox T if there is an interpretation I ∈ Int(L) that stems from W with I |= T . The important properties satisfied by a witness are captured by the following lemmas by Horrocks and Tobies [7]. Lemma 2.1. Let L be a DL. A concept C ∈ L is satisfiable w.r.t. a TBox T iff it has a witness that is admissible w.r.t. T . Lemma 2.2. Let L, C, T and W be a DL, a concept in L, a TBox for L and a witness for C, respectively. Then W is admissible w.r.t. T if, for each x ∈ ∆W : C1 C1 C1 3 ⊑ C2 ∈ T . = C2 ∈ T . = C2 ∈ T implies implies implies ¬C1 ⊔ C2 ∈ LW (x), ¬C1 ⊔ C2 ∈ LW (x) and C1 ⊔ ¬C2 ∈ LW (x). Binary Absorptions Our generalization of the notion of an absorption developed by Horrocks and Tobies [6, 7] is given as follows. Definition 3.1. (Binary Absorption) Let L and T be a DL and a TBox, respectively. A binary absorption of T is a pair of TBoxes (Tu , Tg ) such that T ≡ Tu ∪ Tg and Tu contains only axioms of the form A1 ⊑ C, the form ¬A1 ⊑ C or the form (A1 ⊓ A2 ) ⊑ C, where A1 and A2 are primitive concepts occurring in NC. A binary absorption (Tu , Tg ) of T is called correct if it satisfies the following condition. For each witness W and x ∈ ∆W , if (A1 ⊓ A2 ) ⊑ C ∈ Tu and {A1 , A2 } ⊆ LW (x) A ⊑ C ∈ Tu and A ∈ LW (x) ¬A ⊑ C ∈ Tu and ¬A ∈ LW (x) C1 ⊑ C2 ∈ Tg . C1 = C2 ∈ Tg . C1 = C2 ∈ Tg implies implies implies implies implies implies C ∈ LW (x), C ∈ LW (x), C ∈ LW (x), ¬C1 ⊔ C2 ∈ LW (x), ¬C1 ⊔ C2 ∈ LW (x) and C1 ⊔ ¬C2 ∈ LW (x), (1) then W is admissible w.r.t. T . A witness that satisfies (1) will be called unfolded. The distinguishing feature of binary absorption is the addition of the first implication in condition (1). This allows additional axioms in Tu to be dealt with in a deterministic manner, as we illustrate in our introductory example. If a label of a node contains neither primitive concept A1 nor A2 , then nothing further is required. There is, however, a new requirement for computing the intersection of sets of primitive concepts during model building when a new primitive concept is added to a node. (For this problem, we refer the reader to algorithms developed by Demaine, Lopez-Ortiz and Munro [3].) The next three lemmas by Horrocks and Tobies [7] hold without modification. 90 Long Papers Lemma 3.1. Let (Tu , Tg ) be a correct binary absorption of T . For any C ∈ L, C has a witness that is admissible w.r.t. T iff C has an unfolded witness. Lemma 3.2. Let T be a primitive TBox and Tu defined as . {A ⊑ C, ¬A ⊑ ¬C | A = C ∈ T }. Then (Tu , ∅) is a correct absorption of T . Lemma 3.3. Let (Tu , Tg ) be a correct absorption of a TBox T . 1. If T ′ is an arbitrary TBox, then (Tu , Tg ∪ T ′ ) is a correct absorption of T ∪ T ′ . 2. If T ′ is a TBox that consists entirely of axioms of the form A ⊑ C, where A ∈ NC and A is not defined in Tu , then (Tu ∪ T ′ , Tg ) is a correct absorption of T ∪ T ′. The main benefit of binary absorptions is that they allow the following additional sufficiency condition for correct absorptions. Lemma 3.4. Let (Tu , Tg ) be a correct absorption of a TBox T . If T ′ is a TBox that consists entirely of axioms of the form (A1 ⊓ A2 ) ⊑ C, where {A1 , A2 } ⊆ NC and where neither A1 nor A2 is defined in Tu , then (Tu ∪ T ′ , Tg ) is a correct absorption of T ∪ T ′. Proof. Observe that Tu ∪ Tg ∪ T ′ ≡ T ∪ T ′ holds trivially. Let C ∈ L be a concept and W be an unfolded witness for C w.r.t. the absorption (Tu ∪ T ′ , Tg ). From W, define ′ ′ ′ a new witness W ′ for C by setting ∆W = ∆W , ·W = ·W , and defining LW to be the ′ function that, for every x ∈ ∆W , maps x to the set LW (x) ∪ {¬A1 , ¬A2 | (A1 ⊓ A2 ) ⊑ C ′ ∈ T ′ , {A1 , A2 } ∩ LW (x) = ∅} ∪ {¬A1 | (A1 ⊓ A2 ) ⊑ C ′ ∈ T ′ , A1 ∈ / LW (x), A2 ∈ LW (x)} ′ ′ ∪ {¬A2 | (A1 ⊓ A2 ) ⊑ C ∈ T , A1 ∈ LW (x), A2 ∈ / LW (x)}. It is easy to see that W ′ is also unfolded w.r.t. the absorption (Tu ∪ T ′ , Tg ). This implies that W ′ is also unfolded w.r.t. the (smaller) absorption (Tu , Tg ). Since (Tu , Tg ) is a correct absorption of T , there exists an interpretation I stemming from W ′ such that I |= T . We show that I |= T ′ also holds. Assume I 6|= T ′ . Then there is an axiom (A1 ⊓ A2 ) ⊑ C1 ∈ T ′ and an x ∈ ∆I such that x ∈ (A1 ⊓ A2 )I but x ∈ / C1I . ′ By construction of W ′ , x ∈ (A1 ⊓ A2 )I implies {A1 , A2 } ⊆ LW (x) because otherwise ′ {¬A1 , ¬A2 } ∩ LW (x) 6= ∅ would hold in contradiction to (W3). Then, since W ′ is ′ unfolded, C1 ∈ LW (x), which, again, by (W3), implies x ∈ C1I , a contradiction. Hence, we have shown that there exists an interpretation I stemming from W ′ such that I |= Tu ∪ T ′ ∪ Tg . By construction of W ′ , any interpretation stemming from W ′ also stems from W, hence W is admissible w.r.t. T ∪ T ′ . Proceedings of DL 2006 4 91 A Binary Absorption Algorithm In this section, we present a two-phase algorithm for generating binary absorptions that derives from the absorption algorithm for the FaCT system outlined in earlier work [1, 6, 7]. Our algorithm also incorporates role absorption, similar to the work of Tsarkov and Horrocks [8]. The notable differences in our algorithm happen in the second phase during which • an opportunity for unary absorption now has a very low priority, • binary absorption replaces unary absorption in becoming a high priority, and • primitive concepts are introduced by the procedure to enable further binary absorptions and to absorb existential role restrictions. The algorithm is given a TBox T containing arbitrary axioms, and proceeds by constructing four TBoxes, Tg , Tprim , Tuinc , and Tbinc , such that: T ≡ Tg ∪ Tprim ∪ Tuinc ∪ Tbinc , Tprim is primitive, Tuinc consists only of axioms of the form A1 ⊑ C, and Tbinc consists only of axioms of the form (A1 ⊓ A2 ) ⊑ C, where {A1 , A2 } ⊆ NC and neither A1 nor A2 are defined in Tprim . Here, Tuinc contains unary absorptions and Tbinc contains binary absorptions. In the first phase, we move as many axioms as possible from T into Tprim . We initialize Tprim = ∅ and process each axiom X ∈ T as follows. . 1. If X is of the form A = C, A is not defined in Tprim , and Tprim ∪{X} is primitive, then move X to Tprim . . 2. If X is of the form A = C, then remove X from T and replace it with axioms A ⊑ C and ¬A ⊑ ¬C. 3. Otherwise, leave X in T . In the second phase, we process axioms in T , either by simplifying them or by placing absorbed components in either Tuinc or Tbinc . We place components that cannot be absorbed in Tg . To ease axiom manipulation, we introduce a set representation. We let G = {C1 , . . . , Cn } represent the axiom ⊤ ⊑ (C1 ⊔ . . . ⊔ Cn ). When removing an axiom from T , we automatically convert it to a set G. Similarly, when adding G to T , we automatically convert it out of set notation. Details are as follows. 1. If T is empty, then return the binary absorption . ({A ⊑ C, ¬A ⊑ ¬C | A = C ∈ Tprim } ∪ Tuinc ∪ Tbinc , Tg ). Otherwise, remove an axiom G from T . 2. Try to simplify G. (a) If there is some ¬C ∈ G such that C is not a primitive concept, then add (G ∪ NNF(¬C) \ {¬C} to T , where the function NNF(·) converts concepts to negation normal form. Return to Step 1. 92 Long Papers (b) If there is some C ∈ G such that C is of the form (C1 ⊓ C2 ), then add both (G ∪ {C1 }) \ {C} and (G ∪ {C2 }) \ {C} to T . Return to Step 1. (c) If there is some C ∈ G such that C is of the form C1 ⊔ C2 , then apply associativity by adding (G ∪ {C1 , C2 }) \ {C1 ⊔ C2 } to T . Return to Step 1. 3. Try to partially absorb G. (a) If {¬A1 , ¬A2 } ⊂ G, (A3 ⊓ A4 ) ⊑ A1 ∈ Tbinc , and A2 is not defined in Tprim , then do the following. If there is an axiom of the form (A1 ⊓ A2 ) ⊑ A′ in Tbinc , add G ∪ {¬A′ } \ {¬A1 , ¬A2 } to T . Otherwise, introduce a new internal primitive concept A′ , add (G ∪ {¬A′ }) \ {¬A1 , ¬A2 } to T , and add (A1 ⊓ A2 ) ⊑ A′ to Tbinc . Return to Step 1. (b) If {¬A1 , ¬A2 } ⊂ G, and neither A1 nor A2 are defined in Tprim , then do the following. If there is an axiom of the form (A1 ⊓ A2 ) ⊑ A′ in Tbinc , add G∪{¬A′ }\{¬A1 , ¬A2 } to T . Otherwise, introduce a new internal primitive concept A′ , add (G ∪ {¬A′ }) \ {¬A1 , ¬A2 } to T , and add (A1 ⊓ A2 ) ⊑ A′ to Tbinc . Return to Step 1. (c) If ∀R.C ∈ G, then do the following. Introduce a new internal primitive concept A′ and add both ¬C ⊑ ∀R− .A′ and (G ∪ {¬A′ }) \ {∀R.C} to T . Return to Step 1. (d) If ∀R− .C ∈ G, then do the following. Introduce a new internal primitive concept A′ and add both ¬C ⊑ ∀R.A′ and (G ∪ {¬A′ }) \ {∀R− .C} to T . Return to Step 1. . 4. Try to unfold G. If, for some A ∈ G (resp. ¬A ∈ G), there is an axiom A = C in Tprim , then substitute A ∈ G (resp. ¬A ∈ G) with C (resp. ¬C), and add G to T . Return to Step 1. 5. Try to absorb G. If ¬A ∈ G and A is not defined in Tprim , add A ⊑ C to Tuinc where C is the disjunction of all the concepts in G \ {¬A}. Return to Step 1. 6. If none of the above are possible (G cannot be absorbed), add G to Tg . Return to Step 1. Termination of our procedure can be established by a straightforward counting argument involving concept constructors in T . We now prove the correctness of our algorithm using induction. We use the following four lemmas in our induction step. The first two lemmas prove, in combination, that both Step 3(a) and Step 3(b) of our algorithm is correct. The last two lemmas prove Step 3(c) and Step 3(d) correct respectively. Lemma 4.1. Let T1 , T2 , and T denote TBoxes, C ∈ L an arbitrary concept, and A a primitive concept not used in C or T . If T1 is of the form T1 = T ∪ {(C1 ⊓ C2 ⊓ C3 ) ⊑ C4 }, then C is satisfiable with respect to T1 iff C is satisfiable with respect to T2 = T ∪ {(C1 ⊓ C2 ) ⊑ A, (A ⊓ C3 ) ⊑ C4 }. Proceedings of DL 2006 93 Proof. First we prove the if direction. Assume C is satisfiable with respect to T1 . For each interpretation I such that I |= T1 and C I 6= ∅, we extend to an interpretation I ′ ′ such that I ′ |= T2 and C I 6= ∅. First, set I ′ = I. For each x ∈ ∆I such that x ∈ C1I ′ and x ∈ C2I , add x to AI . Then, I ′ |= T2 . For the only if direction, assume C is satisfiable with respect to T2 . For each interpretation I ∈ Int(L) such that I |= T2 and C I 6= ∅, we show that I |= T1 . The proof is by contradiction. Assume I 6|= T1 . It must be the case that (C1 ⊓ C2 ⊓ C3 ) ⊑ C4 ∈ T1 does not hold, since the rest of T1 is a subset of T2 . Therefore, there exists x ∈ ∆I such that x ∈ C1I ∩ C2I ∩ C3I , and x ∈ / C4I . But, in this case either (C1 ⊓ C2 ) ⊑ A ∈ T2 or (A ⊓ C3 ) ⊑ C4 ∈ T2 must not hold. A contradiction. The following lemma proves that instead of introducing a new primitive concept every time we execute Step 3(a) (or Step 3(b)) of our algorithm, we may instead reuse a previously introduced primitive concept. We use H to denote an arbitrary axiom. Lemma 4.2. Let T1 , T2 , and T denote TBoxes, C ∈ L an arbitrary concept, A a primitive concept not used in C or T , and A1 , A2 , primitive concepts introduced by Step 3(a) (or Step 3(b)) of our algorithm modified such that a new primitive is always introduced. If T1 is of the form T1 = T ∪ {(C1 ⊓ C2 ) ⊑ A1 , (C1 ⊓ C2 ) ⊑ A2 }, then C is satisfiable with respect to T1 iff C is satisfiable with respect to T2 = {(C1 ⊓ C2 ) ⊑ A} ∪ {H where A is substituted for A1 and A2 | H ∈ T }. Proof. First we prove the if direction. We have two cases. • Let I be an interpretation such that I |= T1 , C I 6= ∅, and AI1 = AI2 . We ′ construct an interpretation I ′ from I such that I ′ |= T2 and C I 6= ∅. First, set ′ I ′ = I. Then, set AI = AI1 and remove any references to A1 and A2 in I ′ . • Let I be an interpretation such that I |= T1 , C I 6= ∅, and AI1 6= AI2 . We ′ construct an interpretation I ′ from I such that I ′ |= T1 , C I 6= ∅, and AI1 = AI2 . For x ∈ ∆I such that x ∈ AI1 ∪ AI2 and x 6∈ AI1 ∩ AI2 , we show that we can / AI1 ∪ AI2 without causing any axiom remove x from either AI1 or AI2 so that x ∈ in T1 to fail to hold. Without loss of generality, assume x ∈ AI1 and x 6∈ AI2 . If x ∈ C1 and x ∈ C2 , then we have a contradiction. Otherwise, we remove x from AI1 . Since either x 6∈ C1I or x 6∈ C2I , the axiom (C1 ⊓ C2 ) ⊑ A1 holds. No other axiom in T1 has A1 on the right hand side, therefore removing x from AI1 does not cause any other axiom to fail to hold. Since the above is true for all x such that x is in only one of AI1 and AI2 , we may remove individuals from AI1 and AI2 until AI1 = AI2 . Then the first case applies. Now we prove the only if direction. Let I be an interpretation such that I |= T2 and ′ C I 6= ∅. We construct an interpretation I ′ from I such that I ′ |= T1 and C I 6= ∅. ′ ′ First set I ′ = I. Then, set AI1 = AI2 = AI . Due to the construction of T2 , I ′ |= T1 ′ and C I 6= ∅. 94 Long Papers Lemma 4.3. Let T1 , T2 , and T denote TBoxes, C ∈ L an arbitrary concept, A a primitive concept not used in C or T , and R a role. If T1 is of the form T1 = T ∪ {∃R.C1 ⊑ C2 }, then C is satisfiable with respect to T1 iff C is satisfiable with respect to TBox T2 = T ∪ {C1 ⊑ ∀R− .A, A ⊑ C2 }. Proof. First we prove the if direction. Assume C is satisfiable with respect to T1 . For an interpretation I ∈ Int(L) such that I |= T1 and C I 6= ∅, we extend I to an ′ interpretation I ′ such that I ′ |= T2 and C I 6= ∅. First set I ′ = I. For each x ∈ ∆I ′ ′ such that x ∈ (∃R.C1 )I ∩ C2I , we add x to AI . Then, I ′ |= T2 and C I 6= ∅. Now we prove the only if direction. Assume C is satisfiable with respect to T2 . For each interpretation I ∈ Int(L) such that I |= T2 and C I 6= ∅, it is also the case that I |= T1 . The proof is by contradiction. Assume I 6|= T1 . It must be the case that axiom ∃R.C1 ⊑ C2 does not hold as all other axioms in T1 are also in T2 . Then there exists x ∈ ∆I such that x ∈ (∃R.C1 )I and x ∈ / C2I . However, this implies that there I I exists y ∈ ∆ such that (x, y) ∈ R and y ∈ C1 . From axiom C1 ⊑ ∀R− .A, it must be the case that x ∈ AI . From axiom A ⊑ C2 , it must be the case that x ∈ C2I . A contradiction. Lemma 4.4. Let T1 , T2 , and T denote TBoxes, C ∈ L an arbitrary concept, A a primitive concept not used in C or T , and R a role. If T1 is of the form T1 = T ∪ {∃R− .C1 ⊑ C2 }, then C is satisfiable with respect to T1 iff C is satisfiable with respect to TBox T2 = T ∪ {C1 ⊑ ∀R.A, A ⊑ C2 }. The proof of this lemma is similar to that of Lemma 4.3. Theorem 4.1. For any TBox T , the binary absorption algorithm computes a correct absorption of T . Proof. The proof is by induction on the number of iterations of our algorithm. We define an iteration to end when we return to Step 1. We abbreviate the pair . ({A ⊑ C, ¬A ⊑ ¬C | A = C ∈ Tprim } ∪ Tuinc ∪ Tbinc , Tg ∪ T ) as T and claim that this pair is always a correct binary absorption. Initially, Tuinc , Tbinc , and Tg are empty, primitive axioms are in Tprim , and the remaining axioms are in T . By Lemma 3.1, Lemma 3.2, Lemma 3.3, and Lemma 3.4, T is a correct binary absorption at the start of our algorithm. Assume we just finish iteration i and now perform iteration i+1. By our induction hypothesis, T is a correct binary absorption. We have a number of possible cases. 95 Proceedings of DL 2006 • If we perform Step 3(a) or Step 3(b) then iteration i + 1 is finished. Due to the ordering of Step 3(a) and Step 3(b), newly introduced primitive concepts are absorbed first. Therefore, a newly introduced primitive concept only appears on the right hand side of an axiom once and Lemma 4.1 and Lemma 4.2 apply. We conclude that T is a correct binary absorption. • If we perform Step 3(c), then iteration i + 1 is finished and by Lemma 4.3, T is a correct binary absorption. • If we perform Step 3(d), then iteration i + 1 is finished and by Lemma 4.4, T is a correct binary absorption. • If we perform any of Steps 1, 2, 5, or 6, then T is a correct binary absorption at the end of iteration i + 1. This is because Steps 1, 2, 5, and 6 use only equivalence preserving operations. After the final iteration of our algorithm, T is a correct binary absorption by mathematical induction. 5 Summary We have proposed a simple and straightforward generalization of the absorption theory and algorithms pioneered by Horrocks and Tobies [6, 7]. Called binary absorption, the basic idea is to allow terminological axioms of the form (A1 ⊓ A2 ) ⊑ C to qualify for lazy unfolding in model building satisfaction procedures for description logics. An important issue for future work is to evaluate the efficacy of our binary absorption algorithm on real-world problems. Our immediate plans in this direction are to measure the reductions in the number of disjunctions in comparison to (basic) absorption for publicly accessible OWL DL ontologies. References [1] F. Baader, D. Calvanese, D. McGuinness, D. Nardi, and P. Patel-Schneider, editors. The Description Logic Handbook: Theory, Implementation, and Applications. Cambridge Univserity Press, 2003. [2] F. Baader, E. Franconi, B. Hollunder, B. Nebel, and H.-J. Profitlich. An empirical analysis of optimization techniques for terminological representation systems, or: Making KRIS get a move on. Applied Artificial Intelligence, 4:109–132, 1994. [3] E. D. Demaine, A. Lopez-Ortiz, and I. Munro. Adaptive set intersections, unions, and differences. In SODA ’00: Proceedings of the eleventh annual ACM-SIAM symposium on Discrete algorithms, pages 743–752, Philadelphia, PA, USA, 2000. Society for Industrial and Applied Mathematics. 96 Long Papers [4] A. Deutsch, L.Popa, and V. Tannen. Query reformulation with constraints. ACM SIGMOD Record, 35(1):65–73, 2006. [5] I. Horrocks. Using an Expressive Description Logic: FaCT or Fiction? In A. G. Cohn, L. Schubert, and S. C. Shapiro, editors, Principles of Knowledge Representation and Reasoning: Proceedings of the Sixth International Conference (KR’98), pages 636–647. Morgan Kaufmann Publishers, San Francisco, California, 1998. [6] I. Horrocks and S. Tobies. Optimisation of terminological reasoning. In Proc. of the 2000 Description Logic Workshop (DL 2000), pages 183–192, 2000. [7] I. Horrocks and S. Tobies. Reasoning with axioms: Theory and practice. In Proc. of the 7th Int. Conf. on Principles of Knowledge Representation and Reasoning (KR 2000), pages 285–296, 2000. [8] D. Tsarkov and I. Horrocks. Efficient reasoning with range and domain constraints. In Volker Haarslev and Ralf Möller, editors, Description Logics, volume 104 of CEUR Workshop Proceedings. CEUR-WS.org, 2004. [9] J. A. P. Villa. CGU: A common graph utility for DL reasoning and conjunctive query optimization. Master’s thesis, David R. Cheriton School of Computer Science, University of Waterloo, 2005. 97 Proceedings of DL 2006 A Description Logic of Change Alessandro Artale Carsten Lutz David Toman University of Bolzano, IT University of Dresden, DE University of Waterloo, CA artale@inf.unibz.it clu@tcs.inf.tu-dresden.de david@uwaterloo.ca Abstract We combine the modal logic S5 with the description logic (DL) ALCQI. In this way, we obtain a multi-dimensional DL, S5ALCQI , whose purpose is reasoning about change. S5ALCQI is capable of expressing that concepts and roles change over time, but cannot discriminate between changes in the past and in the future. Our main technical result is that S5ALCQI concept satisfiability with respect to terminologies of general concepts inclusions (GCIs) is decidable and 2-ExpTime-hard. We also provide a scenario based on temporal conceptual models with timestamping constraints in which the logic can be used. 1 Introduction An important application of Temporal Description Logics (TDLs) is the representation of and reasoning about temporal conceptual models [1, 3, 4]. The general idea is that such models are translated into an appropriate TDL, and that TDL reasoning is then used to detect inconsistencies and implicit IS-A relations in the temporal model [2, 4, 6]. However, a serious obstacle for putting this general idea to work is posed by the fact that, for many natural temporal conceptual formalisms and their associated TDLs, reasoning turns out to be undecidable. The most prominent witness of this problem is constituted by temporal entity-relationship (TER) models used to design temporal databases [8]. TERs are classical ER data models extended with two classes of constraints that model the temporal behavior of an application domain [13], i.e., evolution constraints— to govern object migration, i.e., the inability, possibility, and necessity of objects to change membership from one entity to another—and timestamping—to distinguish between temporal and atemporal components of a TER model. In this paper, we are interested in devising a logic able to fully capture TER with timestamping constraints and study its computational properties. Indeed, 98 Long Papers timestamping are temporal constructs supported by almost all temporal conceptual models proposed in the literature [10, 11, 13, 14]. It has be implemented either by marking entities (i.e., classes), relationships and attributes as snapshot or temporary, or leaving them un-marked. Then, objects belong to a snapshot entity either never or at all times, no object may belong to a temporary entity at all times, and there are no (temporal) assumptions about instances of unmarked entities. The meaning of timestamps for relationships and attributes is analogous. It has been observed in [4] that TER models with timestamping and evolution constraints can be translated into the TDL DLRU S . In the same paper, undecidability of DLRU S was established. Later, it was shown in [1] that these computational problems are not due to the translation to description logics: even direct reasoning with the (less powerful) TER models is undecidable. There appear to be two ways around this problem. First, one can restrict timestamping. Indeed, it has been shown in [4] that giving up timestamping of both relationships and attributes (in the sense that all relationships and attributes are left un-marked) re-establishes decidability of DLRU S , and thus also of TER models with both restricted timestamping and evolution constraints. Second, one can allow for full timestamping but avoiding evolution constraints. This second alternative is pursued in the current paper. We devise a multidimensional description logic S5ALCQI that is obtained by combining modal S5 with the standard DL ALCQI. The S5 modality can be applied to both concepts and roles but not in front of axioms—terminological axioms are interpreted globally. This logic may be viewed as a description logic of change, as it allows to state that concept and role memberships change in time, but does not allow to discriminate between changes in the past and changes in the future. We show that TER models with full timestamping (i.e., timestamping on entities, relationships and attributes) but without evolution constraints can be captured by S5ALCQI terminologies. The main result of this paper is to show that reasoning in S5ALCQI is decidable and 2-ExpTime-hard. While a decidability result was obtained for the simpler modal DL, S5-ALC [9], this is the first time that the more complex S5ALCQI is showed to have a decidable reasoning problem. Thus, dropping evolution constraints indeed recovers decidability. However, it is surprising that adding change, a rather weak form of temporality, pushes the complexity of ALCQI from ExpTime-complete to 2-ExpTime-hard. 2 The Logic S5ALCQI The logic S5ALCQI is a combination of the epistemic modal logic S5 and the description logic ALCQI. It is similar in spirit to the multi-dimensional description logics proposed, e.g., in [9, 16]. Let NC and NR be disjoint and countably 99 Proceedings of DL 2006 infinite sets of concept names and role names. We assume that NR is partitioned into two countably infinite sets Nglo and Nloc of global role names and local role names. The set ROL of roles is defined as {r, r− , ♦r, ♦r− , r, r− }, with r ∈ NR . The set of concepts CON is defined inductively: NC ⊆ CON; if C, D ∈ CON, r ∈ ROL, and n ∈ , then the following are also in CON: ¬C, C ⊓ D, (> n r C), and ♦C. A TBox is a finite set of general concept inclusions (GCIs) C ⊑ D with C, D ∈ CON. The concept constructors C ⊔ D, ∃r.C, (6 n r C), (= n r C), ∀r.C, C, ⊤, and ⊥ are defined as abbreviations in the usual way. Concerning roles, note that we allow only single applications of boxes and diamonds, while inverse is applicable only to role names. It is easily seen that any role obtained by nesting modal operators and inverse in an arbitrary way can be converted into an equivalent role in this restricted form: multiple temporal operators are absorbed and inverse commutes over temporal operators [5]. An S5ALCQI -interpretation I is a pair (W, I) with W a non-empty set of worlds and I a function assigning to each w ∈ W an ALCQI-interpretation I(w) = (∆, ·I,w ), where the domain ∆ is a non-empty set and ·I,w is a function mapping each A ∈ NC to a subset AI,w ⊆ ∆ and each r ∈ NR to a relation rI,w ⊆ ∆ × ∆, such that if r ∈ Nglo , then rI,w = rI,v for all w, v ∈ W . We can extend the mapping ·I,w to complex roles and concepts as follows: ◆ (r− )I,w (♦r)I,w (r)I,w (¬C)I,w (C ⊓ D)I,w := := := := := {(y, x) ∈ ∆ × ∆ | (x, y) ∈ rI,w } {(x, y) ∈ ∆ × ∆ | ∃v ∈ W : (x, y) ∈ rI,v } {(x, y) ∈ ∆ × ∆ | ∀v ∈ W : (x, y) ∈ rI,v } ∆ \ C I,w C I,w ∩ DI,w (> n r C)I,w := {x ∈ ∆ | ♯{y ∈ ∆ | (x, y) ∈ rI,w and y ∈ C I,w } ≥ n} (♦C)I,w := {x ∈ ∆ | ∃v ∈ W : x ∈ C I,v } An S5ALCQI -interpretation I = (W, I) is a model of a TBox T iff it satisfies C I,w ⊆ DI,w for all C ⊑ D ∈ T and w ∈ W . It is a model of a concept C if C I,w 6= ∅ for some w ∈ W . Note that S5ALCQI does not have the finite model property: there are concepts and TBoxes that are only satisfiable in models with both an infinite set of worlds and an infinite domain. For example, this is true for the concept ¬C w.r.t. the TBox {¬C ⊑ ♦C, C ⊑ ∃r.¬C, ¬C ⊑ ∀r.¬C}, where r ∈ Nglo . 3 Capturing Conceptual Schemas It is known that the TDL ALCQI U S is able to capture the temporal conceptual model ERV T , a TER model that supports timestamping and evolution 100 Long Papers constraints, IS-A links, disjointness and covering constraints, participation constraints [3]. In ERV T , timestamping is implemented using a marking approach as sketched in the introduction. Since the translation of atemporal constructs is similar to the one using ALCQI U S the reader must refer to [3] for full details and examples. In the following, after recalling the translation of atemporal constructs, we show that S5ALCQI is sufficient to capture the fragment of ERV T that has timestamping as the only temporal construct. When translating ERV T to TDLs, entities E—denoting sets of abstract objects—are mapped into concept names AE while attributes P —denoting functions associating mandatory concrete properties to entities—are mapped into roles names rP that are enforced to be interpreted as total functions using GCIs: ⊤ ⊑ (= 1 rP ⊤). In S5ALCQI , un-marked entities and attributes need no special treatment, while entities and attributes being of type snapshot or temporary can be expressed as follows: AE AE AE AE ⊑ AE ⊑ ♦¬AE ⊑ ∃rP .⊤ ⊑ ∀rP .⊥ snapshot entity temporary entity snapshot attribute temporary attribute Relationships—denoting n-ary relations between abstract objects—are translated by reification, i.e., each n-ary relationship R is translated into a concept name AR with n global role names r1 , . . . , rn . Intuitively, for each instance I,w , the tuple (y1 , . . . , yn ) with (x, yi ) ∈ riI,w is a tuple in the relationship x ∈ AR R at time point w. To ensure that every instance of AR gives rise to a unique tuple in R, we use GCIs ⊤ ⊑ (= 1 ri ⊤), for 1 ≤ i ≤ n. Now, to capture snapshot relationships, we simply put AR ⊑ AR , while for temporary relationships, we put AR ⊑ ♦¬AR . Note that, the latter GCI does not fully capture temporary relationships. As an example, consider the interpretation I = ({w1 , w2 }, I), with ∆ = {a, a′ , b, c}, I,w2 I,w1 = {a′ }, r1I,w1 = {(a, b)}, r2I,w1 = {(a, c)}, r1I,w2 = {(a′ , b)}, = {a}, AR AR I,w2 and r2 = {(a′ , c)}. Although the GCI AR ⊑ ♦¬AR (expressing temporary relationships) is satisfied, (b, c) is constantly in the temporary relationship R. This is due to a mismatch between the models of an ERV T schema and the models of its translation into S5ALCQI . In particulars, in models of ERV T , tuples belonging to relationships are unique while in models of the reified translation there may be two distinct objects connected through the ri global roles to the same objects, thus representing the same tuple, e.g., the distinct objects a, a′ in the above interpretation. Then, S5ALCQI models verifying the above situation do not correspond directly to an ERV T model. However, similarly to [7], it is possible to show that: (i) there are so called safe models of S5ALCQI that are in one-to-one correspondence with ERV T models, (ii) every satisfiable S5ALCQI concept is also satisfied in a safe model. Since we are interested in reasoning Proceedings of DL 2006 101 about ERV T schemas we can thus forget about non-safe models. An S5ALCQI interpretation I = (W, I) is safe for an ERV T schema if, for every n-ary relationship R reified with the global functional roles ri , and every w ∈ W we have the following: ∀x, y, x1 , . . . , xn ∈ ∆ : ¬((x, x1 ) ∈ r1I,w ∧ (y, x1 ) ∈ r1I,w ∧ . . . ∧ (x, xn ) ∈ rnI,w ∧ (y, xn ) ∈ rnI,w ). It is not hard to see that: (1) the model in the example above is not safe, (2) given a safe model, the above GCI for temporary relationships correctly capture the safety property. 4 Decidability of Reasoning in S5ALCQI We show that the satisfiability problem is decidable for S5ALCQI . For simplicity, throughout this section we assume that only local role names are used. This can be done w.l.o.g. since global role names can be simulated by r, where r is a fresh local role name. To prove decidability, we start with devising tree abstractions of S5ALCQI models. Then we show how, given a concept C0 and TBox T , we can construct a looping tree automaton accepting exactly the tree abstractions of models of C0 and T . Let C0 and T be a concept and a TBox whose satisfiability is to be decided. We first introduce the following notation. For roles r, we use Inv(r) to denote r− if r ∈ NR , s if r = s− , ♦Inv(s) if r = ♦s, and Inv(s) if r = s. We use rol(C0 , T ) to denote the smallest set that contains all roles used in C0 and T , and that is closed under Inv. We use cl(C0 , T ) to denote the smallest set containing all sub-concepts appearing in C0 and T closed under negation, if C ∈ cl(C0 , T ) and “¬” is not the top level operator in C, then ¬C ∈ cl(C0 , T ). 4.1 Tree Abstractions of S5ALCQI models The goal of this section is to develop tree abstractions of general S5ALCQI models: for a given model I of C0 and T , we develop a tree abstraction called (C0 , T )-tree. The root node corresponds to the object that realizes C0 in I, descendants of the root correspond to further objects in I that can be reached by traversing roles in some S5 world staring from the root object. For the abstractions to capture the essence of the S5ALCQI models, we need to attach additional information to the nodes of the tree and to constrain the parent-child relationships. To this end we develop the notions of an extended quasistate and matching successor. In the rest of this section we formalize the above intuition. We first introduce types and quasistates. Intuitively, a type describes the concept memberships of a domain element x ∈ ∆ in a single S5 world. 102 Long Papers Definition 1 (Type). A type t for C0 , T is a subset of cl(C0 , T ) such that ¬C ∈ t iff C 6∈ t for all ¬C ∈ cl(C0 , T ) C ⊓D ∈t iff C ∈ t and D ∈ t for all C ⊓ D ∈ cl(C0 , T ) C ∈ t implies D ∈ t for all C ⊑ D ∈ T We use tp(C0 , T ) to denote the set of all types for C0 , T . To describe the concept memberships of a domain element in all S5 worlds, we use quasistates: Definition 2 (Quasistate). Let W be a set and f : W → tp(C0 , T ) a function such that for all w ∈ W we have: ♦C ∈ f (w) iff C ∈ f (v) for some v ∈ W . We call the pair (W, f ) a quasistate witness and the set {f (v) | v ∈ W } a quasistate. In particular, quasistates capture constraints implied by the S5 modalities on concept membership of an object in all worlds. To check whether a set of types, {t1 , . . . , tn }, is a quasistate we simply check whether the pair (W, f ), with W = {t1 , . . . , tn } and f the identity function is a quasistate witness. Note, however, that each quasistate has many witnesses. To abstract the role structure of a model we define the notion of an extended quasistate. This abstraction is realized by a pair of quasistates in a (C0 , T )-trees and captures how two objects are related by a particular role. Definition 3 (Extended Quasistate). Let W be a set, f, g : W → tp(C0 , T ), and h : W → rol(C0 , T ) ∪ {ǫ} for ǫ 6∈ rol(C0 , T ) such that 1. (W, f ) and (W, g) are quasistate witnesses; 2. if ♦r = h(w) for some w ∈ W , then r = h(v) for some v ∈ W ; 3. if r = h(w) for some w ∈ W , then ♦r = h(v) or r = h(v) for all v ∈ W ; 4. it is not the case that r = h(w) for all w ∈ W ; 5. if r = h(w) for some w ∈ W , then r = h(v) for all v ∈ W . We call (W, f, g, h) an extended quasistate witness and the set of triples Q(W, f, g, h) = {(f (v), g(v), h(v)) | v ∈ W } an extended quasistate. We say that Q(W, f, g, h) realizes a concept C if: C ∈ f (w) for some w ∈ W ; we say that Q(W, f, g, h) is root if: h(w) = ǫ for all w ∈ W . Proceedings of DL 2006 103 The extended quasistates therefore enforce S5 modalities when applied to roles. In thee tree-shaped model abstraction we also use extended quasistates capture the idea that each object has exactly one parent: by convention we assume that the object abstracted by f has a parent abstracted by g. The two objects are connected by a role r that is abstracted by h in those worlds w in which h(w) ∈ {r, r}. For uniformity, we use the ǫ dummy role for the root object1 . We define an ordering between modalities of a basic role r as ♦r ≤ r ≤ r, this arrangement allows us to use a single role in the extended quasistate to capture all the implied modalities. It is again immediate to verify whether a set of triples forms an extended quasistate. The last ingredient needed in the tree abstractions is the ability to properly capture the effects of number restrictions. These constraints, given an object in a model, impact what and how many other objects can be connected to this object via roles (and in which worlds). In the tree abstraction this yields restrictions on which extended quasistates can possibly be children of a given quasistate. This intuition is captured by the notion of a matching successor: Definition 4 (Matching Successor). Let W and O be sets, o an element such that o 6∈ O; f, g : (O ∪ {o}) → W → tp(C0 , T ), and h : (O ∪ {o}) → W → rol(C0 , T ) functions such that (W, f (p), g(p), h(p)) is an extended quasistate witness for all p ∈ O ∪ {o} and f (o) = g(p) for all p ∈ O. We call (W, O, o, f, g, h) a matching successor witness if for all w ∈ W : 1. if (> n r C) ∈ f (o)(w) and C 6∈ g(o)(w) or Inv(r) 6≤ h(o)(w) then |{p ∈ O | r ≤ h(p)(w), C ∈ f (p)(w)}| ≥ n, 2. if (> n r C) ∈ f (o)(w), then |{p ∈ O | r ≤ h(p)(w), C ∈ f (p)(w)}| ≥ n−1, 3. if (> n r C) ∈ cl(T , C0 ), C ∈ g(o)(w), and Inv(r) ≤ h(o)(w), and |{p ∈ O | r ≤ h(p)(w), C ∈ f (p)(w)}| ≥ n − 1 then (> n r C) ∈ f (o)(w), 4. if (> n r C) ∈ cl(T , C0 ) and |{p ∈ O | r ≤ h(p)(w), C ∈ f (p)(w)}| ≥ n then (> n r C) ∈ f (o)(w), We call the pair (Q(W, f (o), g(o), h(o)), {Q(W, f (p), g(p), h(p)) | p ∈ O}) a matching successor. We say that two matching successor witnesses are equivalent if they define the same matching successor. 1 Note that each node in the abstraction is labeled by an extended quasistate describing the corresponding object, its parent, and the role that connects them. This arrangement is needed in order to keep track of how inverses interact with number restrictions and is similar to the so-called double-blocking technique. 104 Long Papers The intuition behind this definition is as follows: the object o stands for the parent node and the set of objects O for all its children in the tree abstraction. Each of these objects is labeled by an extended quasistate in a consistent way (i.e., the parent parts of the extended quasistates labeling the children match the quasistate attached to the parent). A matching successor witness is then a witness that the extended quasistates attached to o and to all elements of O can potentially be used to build a part of a model of C0 and T without violating any constraints in T . Thus we can use matching successors to define the sought after tree shaped abstraction of models of C0 and T . Definition 5 ((C0 , T )-tree). Let T = (n0 , N, E) be an ordinal tree with root n0 ∈ N and G a mapping of T ’s nodes to extended quasistates. We say that T is a (C0 , T )-tree if: 1. C0 is realized in G(n0 ), 2. G(n0 ) is root, 3. for all n ∈ N the pair (G(n), {G(m) | (n, m) ∈ E}) is a matching successor. To be able to eventually construct a model from our abstraction we use the following lemma that allows us to concatenate matching successor witnesses along branches of such a tree abstraction: Lemma 6. Let (W, O, o, f, g, h) be a matching successor witness for (q, Q) and α an infinite cardinal. Then there is an equivalent matching successor witness (W ′ , O, o, f ′ , g ′ , h′ ) such that |{w ∈ W ′ | (f ′ (p)(w), g ′ (p)(w), h′ (p)(w)) is a constant triple}| = α for all p ∈ O ∪ {o}. This can always be achieved by replicating elements of W sufficiently many times. These witnesses are convenient as whenever the associated extended quasistate match they can be plugged one into the bottom of another just by permuting the set W . The intuitions behind Definitions 4 and 5 is as follows: when given a model I of C0 and T , we use the object o ∈ ∆ that realizes C0 in I to define the extended quasistate for the root of our tree abstraction; we then collect all the extended quasistates for all successors of o in I and make them children of the root quasistate. Repeating this construction yields a (C0 , T )-tree: the children of every node have been extracted from I and thus must satisfy the conditions on matching successors (the witness comes from the model). Conversely, given a (C0 , T )-tree, we use the fact that for each matching successor, there must be a witness. We use these witnesses, with the help of Lemma 6, to construct a model by traversing the (C0 , T )-tree top down while concatenating the matching successor witnesses found along the branches. Thus the existence of a (C0 , T )tree is equivalent to the existence of a (C0 , T ) model: 105 Proceedings of DL 2006 Theorem 7. C0 is satisfiable w.r.t. T iff there exists a (C0 , T )-tree. 4.1.1 Decidability and Looping Tree Automata To show decidability, we need to show existence of at least one (C0 , T )-tree. We proceed in two steps: 1. We need to determine whether (q, Q) is a matching successor for each extended quasistate q and set of extended quasistates Q. 2. We need to show that the matching successors can be arranged into a tree rooted by a node labeled by an extended quasistate realizing C0 . Thus, we first need to define a procedure that constructs all matching successors given CP 0 and T . To show this, we need the following lemma, where max(C0 , T ) := (>m r C)∈cl(C0 ,T ) m, and n = |cl(C0 , T )|. Lemma 8. Let (W, O, o, f, g, h) be a matching successor witness for a matching successor (q, Q). Then there is an equivalent matching successor witness 2n ′ (W ′ , O′ , o, f ′ , g ′ , h′ ) such that |O′ | ≤ (max(C0 , T )+1)·2n2 and |W ′ | ≤ 2|O |·(n+1) . Figure 1 illustrates why the bounded matching successor witness required by w o0 o1 t0 t1 ··· ol ol+1 · · · om−1 om tl tl+1 tm−1 tm tn tn+1 ··· ···  y w is replaced by {v0 , . . . , vl } v0 t0 tm tn tl+1 tm−1 v2 .. . tm t1 tn tl+1 tm−1 vl tm tn tl tl+1 tm−1 .. . Figure 1: Reducing the size of a Matching Successor Witness. Lemma 8 must exist: consider that the objects o0 , . . . , on+1 . . . ∈ O have been assigned the same extended quasistate by the current witness and that there are more than max(C0 , T ) + 1 of such objects. Now consider a world w depicted on the top of the Figure. Assume that the (types of the) objects ol+1 , . . . , on are those needed to fulfill a number restriction in the (type of the) parent node in w. These must be preserved in the new witness after removing superfluous 106 Long Papers objects. The transformation is depicted in the lower half of the figure: we create a set of worlds v0 , . . . , vl with the same parent label and such that all the types tl+1 , . . . , tn are present in every of the new worlds. Hence the number restriction in the parent’s type still holds. Moreover, the original type assigned to the objects o0 , . . . , ol is preserved in at least one of the new worlds. This guarantees that, in the new witness, all the objects are still labeled by the same extended quasiworld. Thus the new witness is equivalent to the original one. Applying this procedure to every w ∈ W and every set of objects labeled with the same extended quasiworld by the original witness removes all the superfluous objects that were assigned the same extended quasistate; hence the bound holds for the new witness. Thus we can test all matching successor candidates for witnesses up to the size defined in Lemma 8—in 4-ExpTime we can check whether a pair (q, Q) is a matching successor and there are at most 3-Exp of such candidates to test. What remains is to check whether a (C0 , T )-tree can be constructed using these matching successors: to this end we define a looping tree automaton AC0 ,T that accepts exactly the C0 , T -trees. To check satisfiability of C0 w.r.t. T , it then suffices to check whether this looping automaton accepts at least one tree. We show that this provides us with a decision procedure for satisfiability in S5ALCQI as the emptiness problem for looping tree automata is decidable in time linear in the size of the automaton [15]. Intuitively, we use the matching successors to define the transition relation of AC0 ,T . Since in our case the trees do not have a constant branching degree, we adopt a variant of a looping automaton on amorphous trees [12] (except in our case we know the branching degree is bounded and thus the transition relation can be represented finitely in a trivial way). Definition 9 (Looping Tree Automaton). A looping tree automaton A = (Q, M, I, δ) for an M -labeled tree is defined by a set Q of states, an alphabet M , a set I ⊆ Q of initial states, and a transition relation δ ⊆ Q × M × 2Q . A run of A on an M -labeled tree T = (rT, NT, ET) with a root rT is a mapping τ : NT → Q such that τ (rT) ∈ I and (τ (α), T(α), {τ (β) | (α, β) ∈ ET}) ∈ δ for all α ∈ NT. A looping automaton A accepts those M -labeled trees T for which there exists a run of A on T. We construct an automaton from C0 and T as follows: Definition 10. Let C0 be a concept and T a S5ALCQI TBox. We denote with nl(C0 , T ) the set of all extended quasistates for C0 and T . A looping automaton AC0 ,T = (Q, M, I, δ) is defined by setting M = Q = nl(C0 , T ), I := {q ∈ Q | q realizes C0 , q is root}, and δ to the set of those tuples (q, q, Q) such that Q ∈ 2Q and (q, Q) is a matching successor for C0 and T . Proceedings of DL 2006 107 The following lemma states that the obtained looping automata behaves as expected. Lemma 11. T is a C0 , T -tree iff T is accepted by AC0 ,T . The size of AC0 ,T depends on the size of C0 and T as there are only finitely many matching successors as shown in Lemma 8. To construct the transition function of the automaton, we also need to verify that the pair (q, Q) is a matching successor. From Lemma 8, this can be done in 4-ExpTime. , we obtain that the proposed algorithm for satisfiability in S5ALCQI runs in 4-ExpTime. A lower bound can be established by reducing the word problem of exponentially space-bounded, alternating Turing machines [5]. Theorem 12. Satisfiability in S5ALCQI is decidable and 2-ExpTime-hard. This result holds regardless of whether numbers inside number restrictions are coded in unary or in binary. 5 Conclusions This work introduces the modal description logic S5ALCQI as a logic for representing and reasoning in temporal conceptual models with timestamping constraints only. S5ALCQI was shown to be decidable and 2-ExpTime-hard. This is the first decidability result for reasoning in temporal schemas with full timestamping—i.e., timestamping for entities, relationships, and attributes. This paper leaves out few interesting open problems for further investigation. First, a tight complexity bound is not known. The gap between the 2-ExpTimehardness and the 4-ExpTime algorithm shown in this paper needs to be closed. Second, we believe that the converse translation, from TER with full timestamping to S5ALCQI , is also possible. Once formally proved, this result would allow us to characterize the complexity of reasoning over TER with timestamping. Finally, we are interested in checking the limits of expressive power of S5ALCQI w.r.t. various constraints have appeared in literature on temporal models other than timestamping. References [1] A. Artale. Reasoning on temporal conceptual schemas with dynamic constraints. In 11th Int. Symposium on Temporal Representation and Reasoning (TIME04). IEEE Computer Society, 2004. Also in Proc. of DL’04. [2] A. Artale and E. Franconi. Temporal ER modeling with description logics. In Proc. of the Int. Conference on Conceptual Modeling (ER’99), volume 1728 of Lecture Notes in Computer Science. Springer-Verlag, 1999. 108 Long Papers [3] A. Artale, E. Franconi, and F. Mandreoli. Description logics for modelling dynamic information. In Jan Chomicki, Ron van der Meyden, and Gunter Saake, editors, Logics for Emerging Applications of Databases. LNCS, Springer-Verlag, 2003. [4] A. Artale, E. Franconi, F. Wolter, and M. Zakharyaschev. A temporal description logic for reasoning about conceptual schemas and queries. In Proc. of the 8th Joint European Conference on Logics in Artificial Intelligence (JELIA-02), volume 2424 of LNAI, pages 98–110. Springer, 2002. [5] A. Artale, C. Lutz, and D. Toman. A description logic of change. Technical report, LTCS-Report 05-06, Technical University Dresden, 2002. see http://lat.inf.tudresden.de/research/reports.html. [6] D. Calvanese, M. Lenzerini, and D. Nardi. Description logics for conceptual data modeling. In J. Chomicki and G. Saake, editors, Logics for Databases and Information Systems, pages 229–263. Kluwer, 1998. [7] D. Calvanese, M. Lenzerini, and D. Nardi. Unifying class-based representation formalisms. J. of Artificial Intelligence Research, 11:199–240, 1999. [8] J. Chomicki and D. Toman. Temporal Databases. In M. Fischer, D. Gabbay, and L. Villa, editors, Handbook of Temporal Reasoning in Artificial Intelligence, pages 429–467. Elsevier Foundations of Artificial Intelligence, 2005. [9] D. Gabbay, A. Kurucz, F. Wolter, and M. Zakharyaschev. Many-dimensional modal logics: theory and applications. Studies in Logic. Elsevier, 2003. [10] H. Gregersen and J.S. Jensen. Conceptual modeling of time-varying information. Technical Report TimeCenter TR-35, Aalborg University, Denmark, 1998. [11] C. S. Jensen and R. T. Snodgrass. Temporal data management. IEEE Transactions on Knowledge and Data Engineering, 111(1):36–44, 1999. [12] O. Kupferman and M. Y. Vardi. On bounded specifications. In Proc. of the Int. Conference on Logic for Programming and Automated Reasoning (LPAR’01), LNAI, pages 24–38. Springer-Verlag, 2001. [13] S. Spaccapietra, C. Parent, and E. Zimanyi. Modeling time from a conceptual perspective. In Int. Conf. on Information and Knowledge Management (CIKM98), 1998. [14] C. Theodoulidis, P. Loucopoulos, and B. Wangler. A conceptual modelling formalism for temporal database applications. Information Systems, 16(3):401–416, 1991. [15] M. Y. Vardi and P. Wolper. Automata-theoretic techniques for modal logic of programs. Journal of Computer and System Sciences, 32:183–221, 1986. [16] F. Wolter and M. Zakharyaschev. Modal descriptiopn logics: modalizing roles. Fundamentae Informaticae, 39:411–438, 1999. Part II Regular Papers 111 Proceedings of DL 2006 Reasoning for A Fuzzy Description Logic with Comparison Expressions ∗ Dazhou Kang1 , Baowen Xu1,2 , Jianjiang Lu3 and Yanhui Li1 1 School of Computer Science and Engineering, Southeast University, Nanjing 210096, China 2 Jiangsu Institute of Software Quality, Nanjing, 210096, China 3 Institute of Command Automation, PLA University of Science and Technology, Nanjing 210007, China Abstract The fuzzy extensions of description logics support representation and reasoning for fuzzy knowledge. But the current fuzzy description logics do not support the expression of comparisons between fuzzy membership degrees. The paper proposes ALC f c , a fuzzy extension of description logic ALC with comparison expressions. ALC f c defines comparison cut concepts to express complex comparisons, and integrate them with fuzzy ALC. The challenges of reasoning in ALC f c is discussed, and a tableau algorithm is presented. It enables representation and reasoning for expressive fuzzy knowledge about comparisons. 1 Introduction Description logics (DLs) [1] are widely used in the semantic web. Fuzzy extensions of description logics import the fuzzy theory to enable the capability of dealing with fuzzy knowledge [5]. In fuzzy DLs, an individual is an instance of a fuzzy concept only to a certain degree (called fuzzy membership degree); e.g. “Tom is tall to a degree greater than 0.8,” where Tall is a fuzzy concept. It is also a familiar description that “Tom is taller than Mike,” which can be seemed as a comparison between two degrees without any restrictions on their exact ∗ This work was supported by NSFC (60373066, 60425206 and 90412003), National Grand Fundamental Research 973 Program of China (2002CB312000), Innovation Plan for Jiangsu High School Graduate Student, Advanced Armament Research Project (51406020105JB8103), Advanced Research Fund of Southeast University (XJ0609233), and High Technology Research Project of Jiangsu Province (BG2005032). Email:swws@seu.edu.cn 112 Regular Papers values. Such comparison is important in many fuzzy information systems. For example, people are often interested in “the cheapest goods with the highest quality,” disregarding the exact prices and qualities. There are even more complex comparison expressions, e.g. “no close friend of Tom is taller or stronger than him.” However, the current fuzzy DLs do not support the expression of comparisons between fuzzy membership degrees. This paper defines comparison cut concepts to express complex comparisons, then presents ALC f c , and provides its reasoning algorithm. It enables representation and reasoning for expressive comparisons between fuzzy membership degrees. 2 Comparison expressions In DLs, an assertion a : C is either true or false (0 or 1). But in fuzzy DLs, any assertion is true only to a certain degree in [0, 1]. A fuzzy assertion is of the form ha : C ⊲⊳ ni, where n ∈ [0, 1] is a constant and ⊲⊳ ∈ {=, 6=, <, ≤, ≥, >}. In order to express a comparison that “Tom is taller than Mike,” the most intuitionistic solution is hTom : Tall > Mike : Tall i. However, such fuzzy assertion is not allowed in current fuzzy DLs [3, 5]. There are more complex comparisons, like “Tom is either taller or stronger than Mike.” We define comparison cut concepts (or cuts for short) to express such complex comparisons. The idea is as follows: individuals can be divided into different classes based on basic comparisons; the classes can be represented in basic cuts; and we can use constructors with such cuts to express more complex comparisons. Three kinds of basic cuts are defined: numerical cuts [C ⊲⊳ n] represents a set of individuals s such that hs : C ⊲⊳ ni. For example, [Tall < 0.9] refers to any person that is not very tall. comparative cuts [C ⊲⊳ D] represents s such that hs : C ⊲⊳ s : Di. [Absolutist < Liberalist] refers to people who prefer liberalism to absolutism. relative cuts [C ⊲⊳ D↑ ] represents any s such that hs : C ⊲⊳ t : Di with respect to an individual t. [C ⊲⊳] is an abbreviation of [C ⊲⊳ C ↑ ]. They describe the comparisons between individuals. The idea of cuts is not completely innovate. [3] and [6] defined concepts similar to the numerical cuts. But they do not consider other cuts. Complex cuts are constructed from basic cuts: if P, Q are cuts, then ¬P , P ⊓ Q and P ⊔ Q are also cuts. More expressive fuzzy concepts can be defined by importing cuts: for any cuts P, Q and a fuzzy role R, ∃R.P and ∀R.P are fuzzy concepts. For example, hT om : ∀friend .[T all ≤] ≥ 0.8i means Tom is tallest among his close friends. Such fuzzy concepts can be used in cuts again. We use ha : P (b)i to assert that a is in a cut P with respect to b. Then hTom : Tall ≥ 0.8i and hTom : Tall > Mike : Tall i can be seemed as aliases of hTom : [Tall ≥ 0.8]i and hTom : [Tall >](Mike)i. 113 Proceedings of DL 2006 3 The fuzzy description logic ALC f c Definition 1. Let NI , NC and NR be three disjoint sets of names of individuals, fuzzy concepts and fuzzy roles respectively. ALC f c -concepts are defined as • ⊤, ⊥ and A are concepts, where A ∈ NC ; • if C, D are concepts, R ∈ NR , and P is a cut, then ¬C, C ⊔ D, C ⊓ D, ∃R.C, ∀R.C, ∃R.P and ∀R.P are concepts. A fuzzy interpretation I = ∆I , ·I consists a nonempty set ∆I , and a function ·I maps every a ∈ NI to an element aI ∈ ∆I , maps every A ∈ NC to a function AI : ∆I → [0, 1], and maps every R ∈ NR to a function RI : ∆I × ∆I → [0, 1]. For ALC f c , ·I also maps every concept C to a function C I : ∆I → [0, 1] such that for any s ∈ ∆I , ⊤I (s) = 1; ⊥I (s) = 0; (¬C)I (s) = 1 − C I (s); (∃R.C)I (s) = supt∈∆I {min(RI (s, t), C I (t))}; (∀R.C)I (s) = inf t∈∆I {max(1 − RI (s, t), C I (t))}; (C ⊓ D)I (s) = max(C I (s), DI (s)); (∃R.P )I (s) = supt∈P I (s) RI (s, t); (C ⊔ D)I (s) = min(C I (s), DI (s)); (∀R.P )I (s) = inf t∈(¬P )I (s) (1 − RI (s, t)). Definition 2. The comparison cut concepts are defined as: • if C, D are concepts, n ∈ [0, 1] and ⊲⊳ ∈ {=, 6=, >, ≥, <, ≤}, then [C ⊲⊳ n], [C ⊲⊳ D] and [C ⊲⊳ D↑ ] are cuts; • if P, Q are cuts, then ¬P , P ⊓ Q and P ⊔ Q are cuts. The interpretation function ·I of a fuzzy interpretation I = ∆I , ·I maps, I additionally, every cut P into a function P I : ∆I → 2∆ : [C ⊲⊳ n]I (s) = {t|C I (t) ⊲⊳ n}; (¬P )I (s) = ∆I \P I (s); [C ⊲⊳ D]I (s) = {t|C I (t) ⊲⊳ DI (t)}; (P ⊓ Q)I (s) = P I (s) ∩ QI (s); [C ⊲⊳ D↑ ]I⊲⊳ (s) = {t|C I (t) ⊲⊳ DI (s)}; (P ⊔ Q)I (s) = P I (s) ∪ QI (s). For any cut P and a ∈ NI , P (a) is called an absolute cut, and (P (a))I = P (aI ). If a cut P contains no ↑, then P itself is an absolute cut, and for any a, we do not distinguish P (a) and P , since they are equivalent in semantics. I Definition 3. An ALC f c knowledge base is composed of a TBox and an ABox: A TBox is a finite set of axioms of the form C ⊑ D or C ⊏ D. An interpretation I satisfies C ⊑ D or C ⊏ D iff for any s ∈ ∆I , C I (s) ≤ DI (s) or C I (s) < DI (s). I is a model of a TBox T iff I satisfies every axiom in T . An ABox is a finite set of assertions of the form h(a, b) : R ⊲⊳ ni or ha : P (b)i, where n ∈ [0, 1], C is a concept, R is a role, a, b ∈ NI , and P is a cut. An interpretation I satisfies h(a, b) : R ⊲⊳ ni iff RI (aI , bI ) ⊲⊳ n, satisfies ha : P (b)i iff aI ∈ P I (bI ). I is a model of an ABox A iff I satisfies every assertion in A. The basic inference problem of ALC f c is consistency of ABoxes: an ABox A is consistent w.r.t. a TBox T , iff there exists a model I of both A and T . 114 4 4.1 Regular Papers Reasoning issues Challenges In the current reasoning algorithms for fuzzy DLs [4, 5], they always assume that for an element s in a model I with (∃R.C)I (s) ≥ n, there is t such that min(RI (s, t), C I (t)) ≥ n. In [2], the author pointed out that this is an unessential error. However, it yields a serious problem in ALC f c . Example 4. Let A = {ha : ∃R.C ≥ 1i , ha : ∃R.[c ≥ 1] ≤ 0i}. For any element s in a model I with (∃R.[c ≥ 1])I (s) ≤ 0, there cannot be any t such that min(RI (s, t), C I (t)) ≥ 1. Nevertheless, A is consistent: there can be infinite elements t1 , t2 , . . . such that supi=1,2,... {min(RI (s, ti ), C I (ti ))} = 1, and for any i = 1, 2, . . . , min(RI (s, ti ), C I (ti )) < 1. Another challenge is that current algorithms only consider a finite set of constants in [0, 1]; but there can be infinite different degrees in ALC f c . Example 5. Assume T = {C ⊏ ∃R.C}, A = {s0 : C > n}. In a model I of T and A, it holds n < C I (s0 ) < (∃R.C)I (s0 ). For any element si , C I (si ) < (∃R.C)I (si ) and there is si+1 with C I (si+1 ) > C I (si ). It also follows C I (si+1 ) < (∃R.C)I (si+1 ). So there must be an infinite path of elements s0 , s1 , s2 , . . . such that n < C I (s0 ) < C I (s1 ) < C I (s2 ) < · · · . Because of the above challenges, the current reasoning algorithms for fuzzy DLs are not capable for ALC f c . The following parts firstly define a novel fuzzy tableau for ALC f c . The essential difference from the tableau in [4] is P4 and P6. Then presents a tableau algorithm to overcome the challenges. Definition 6. Let A be an ABox, T be a TBox, a fuzzy tableau T of A w.r.t. T is a quadruple T = hS, L, E, Vi such that • S is a non-empty set of elements; • L : S → AC maps each element of S to a set of absolute cuts; • E : NR × [0, 1] → 2S×S maps each pair of a role name and a number in [0, 1] to a set of pairs of elements; • V : IA → S maps individual names occurring in A to elements in S. P1 P2 P3 P4 If [¬C = n] ∈ L(s), then [C = 1 − n] ∈ L(s). If [C ⊓D = n] ∈ L(s), then {[C = m1 ], [D = m2 ]} ⊆ L(s) and min(m1 , m2 ) = n. If [C ⊔ D = n] ∈ L(s), then [¬C ⊓ ¬D = 1 − n] ∈ L(s) If [∃R.C = n] ∈ L(s), then for any t with (s, t) ∈ E(R, m1 ) and m1 > n, it holds [C = m2 ] ∈ L(t) and m2 ≤ n, and there are two possible cases: • there is t ∈ S with (s, t) ∈ E(R, m1 ), [C = m2 ] ∈ L(t), min(m1 , m2 ) = n; • there are t1 , t2 , · · · ∈ S with for any i = 1, 2, . . . , (s, ti ) ∈ E(R, ni ), [C = mi ] ∈ L(ti ), min(ni , mi ) < n, and supi=1,2,... {min(ni , mi )} = n. Proceedings of DL 2006 115 P5 If [∀R.C = n] ∈ L(s), then [∃R.¬C = 1 − n] ∈ L(s). P6 If [∃R.P = n] ∈ L(s), then for any t with (s, t) ∈ E(R, m) that m > n, it holds ¬P (s) ∈ L(t), and there are two possible cases: • there is t ∈ S with (s, t) ∈ E(R, n), P (s) ∈ L(t); • there are t1 , t2 , · · · ∈ S with for any i = 1, 2, . . . , (s, ti ) ∈ E(R, ni ), P (s) ∈ L(ti ), ni < n, and supi=1,2,... {ni } = n. P7 If [∀R.P = n] ∈ L(s), then [∃R.¬P = 1 − n] ∈ L(s). P8 If [C ⊲⊳ n] ∈ L(s), then [C = m] ∈ L(s) and m ⊲⊳ n. P9 If [C ⊲⊳ D] ∈ L(s), then {[C = m], [D = n]} ⊆ L(s) and m ⊲⊳ n. P10 If [C ⊲⊳ D↑ ](t) ∈ L(s), then [C = m] ∈ L(s), [D = n] ∈ L(t) and m ⊲⊳ n. P11 If (P ⊓ Q)(t) ∈ L(s), then {P (t), Q(t)} ⊆ L(s). P12 If (P ⊔ Q)(t) ∈ L(s), then P (t) ∈ L(s) or Q(t) ∈ L(s). P13 If h(a, b) : R ⊲⊳ ni ∈ A, then (V(a), V(b)) ∈ E(R, m) and m ⊲⊳ n. P14 If ha : P (b)i ∈ A, then P (V(b)) ∈ L(V(a)). P15 If C ⊑ D ∈ T , then for any s ∈ S, {[C = m], [D = n]} ⊆ L(s) and m ≤ n. P16 If C ⊏ D ∈ T , then for any s ∈ S, {[C = m], [D = n]} ⊆ L(s) and m < n. P17 If [c = n] ∈ L(s), then there is no [c = m] ∈ L(s) such that n 6= m. P18 If (s, t) ∈ E(R, n), then there is no (s, t) ∈ E(R, m) such that n 6= m. All concepts and cuts are transformed into negation normal form, where ¬ can only occur in front of a concept name, by pushing negations inwards: ¬[C ⊲⊳ W ] → [C ⊲⊳⊖ W ]; ¬(X ⊔ Y ) → ¬X ⊓ ¬Y ; ¬(X ⊓ Y ) → ¬X ⊔ ¬Y ; ¬(∃R.X) → ∀R.¬X; ¬(∀R.X) → ∃R.¬X; where W ∈ {n, D, D↑ }, X, Y are concepts or cuts, and >⊖ = ≤, <⊖ = ≥, ≥⊖ = <, ≤⊖ = >. All elements satisfy [⊤ = 1] and [⊥ = 0]. So ⊤, ⊥, ¬P are not considered here. It is easy to prove that the existence of a fuzzy tableau is equivalent with the existence of a model: ∆I = S, AI (s) = n iff [A = n] ∈ L(s), and RI (s, t) = n iff (s, t) ∈ E(R, n). Theorem 7. An ALC f c ABox A is consistent w.r.t. a TBox T , iff there is a fuzzy tableau T of A w.r.t. T . 4.2 A tableau algorithm Here presents an algorithm to decide the existence of a fuzzy tableau by constructing a completion graph. There are three key points in the algorithm: 1. All degrees such as C(x) and R(x, y) are not constants but variables. The relations between degrees are recorded in a set δ, which is a partially ordered set (V, ≤, 6=). The set of degrees V can be easily mapping to [0, 1]. 2. In P4 and P6, there can be infinite elements. We just generate one node to represent them with a new relation ⋖ added into δ by R5 and R8. 3. It is clear that the construction of a completion graph may not terminate if T = 6 ∅. A cycle detection technique called blocking is employed to unravel a finite completion graph into an infinite fuzzy tableau. 116 Regular Papers Definition 8. A completion graph is T = hS, E, L, δi, where • S is a set of nodes in the graph. • E is a set of edges (pairs of nodes) in the graph. • L is a function: for every node x ∈ S, L(x) is a set of concepts or absolute cuts; for every edge (x, y) ∈ E, L(x, y) is a set of roles. • δ is a set of formulas of the form X ≤ Y , X 6= Y or X ⋖ Y , where X, Y ::= n|C(x)|R(x, y)|1 − X such that n ∈ [0, 1], C is a concept, R is a role, x, y ∈ S, and for any X, 1 − (1 − X) = X. Several abbreviations are defined below: X ≤δ Y =def X ≤ Y ∈ δ, or X ≤δ Y, Y ≤δ Z, or 1 − Y ≤δ 1 − X min(X, Y ) =δ Z =def Z ≤δ X, Z ≤δ Y, W ≤δ Z for some W ∈ {X, Y }; X= 6 δ Y =def X 6= Y ∈ δ; X ⋖δ Y =def X ⋖ Y ∈ δ; X ≥δ Y =def Y ≤δ X; X =δ Y =def X ≤δ Y, Y ≤δ X; X <δ Y =def X ≤δ Y, X 6=δ Y ; Xδ > Y =def Y ≤δ X, X 6=δ Y. The completion graph T of an ABox A w.r.t. a TBox T initializes with: S = {a ∈ NI |a occurs in A}; for any ha : P (b)i ∈ A, P (b) ∈ L(a); for any h(a, b) : R ⊲⊳ ni ∈ A, R ∈ L(a, b) and R ⊲⊳δ n. Let V0 = {v1 , v2 , . . . , vk } = {0, 1, 0.5} ∪ {n ∈ [0, 1]|n or 1 − n occurs in A or T }, where 0 = v1 < v2 < · · · < vk = 1. For any vi < vj , let vi <δ vj . Then the graph grows up by applying the expansion rules showed in Fig. 1. If a rule applied to x creates a new node y, then y is a successor of x. Let descendant be transitive closure of successor. The ⋖δ relation is used to simulate the infinite supreme. For any a ∈ NI , lev(a) = 1. If lev(x) = i, y is a successor of x by updating ⋖δ , then lev(y) = i+1. For any X of the form C(x), 1 − C(x), R(y, x), or 1 − R(y, x), if lev(x) = i, then X ∈ Vi . If X ⋖δ Y and Y ∈ Vi , then for any Z ∈ Vj such that j ≤ i, Z <δ Y → Z <δ X and Z >δ X → Z ≥δ Y . So X ⋖δ Y means X is greater than any Z < Y such that Z ∈ V0 ∪ V1 ∪ · · · ∪ Vi and Y ∈ Vi . It ensures that for any given constant ε, we can assign values to the variables in V such that X − Y < ε without inducing any conflict. Since there are variables, the blocking condition in ALC f c is different from classical DLs. It has to consider the comparisons between degrees. Definition 9. For any x, let δ(x) = {X ⊲⊳ Y |X ⊲⊳δ Y , X, Y are of the form C(x), 1 − C(x), or vi . A node x is blocked by y, iff x is an descendant of y, and δ(x) = [x/y]δ(y), where [x/y]δ(y) means to replace any y in δ(y) by x. Then we call y blocks x. When x is blocked, all descendants of x is also blocked. No rules in Fig. 1 can be applied to blocked nodes. T is said to contain a clash if {X 6=δ Y, X =δ Y } ⊆ δ, or X >δ 1, or X <δ 0. T is said to be clash-free Proceedings of DL 2006 R1 R4 if then if then if then if R5 then if R2 R3 then R6 R7 if then if R8 then if then R9 R10 R11 R12 R13 R14 R15 R16 R17 if then if then if then if then if then if then if then if then if then ¬C ∈ L(x), and not C(x) =δ 1 − (¬C)(x) L(x) → L(x) ∪ {C}, and C(x) =δ 1 − (¬C)(x) C ⊓ D ∈ L(x), and not min(C(x), D(x)) =δ (C ⊓ D)(x) L(x) → L(x) ∪ {C, D}, and min(C(x), D(x)) =δ (C ⊓ D)(x) C ⊔ D ∈ L(x), and not (C ⊔ D)(x) =δ 1 − (¬C ⊓ ¬D)(x) L(x) → L(x) ∪ {C ⊔ D}, and (C ⊔ D)(x) =δ 1 − (¬C ⊓ ¬D)(x) ∃R.C ∈ L(x), and there is y with R ∈ L(x, y) but not X ≤δ (∃R.C)(x) for some X ∈ {R(x, y), C(x)} L(y) → L(y) ∪ {C}, and X ≤δ (∃R.C)(x) ∃R.C ∈ L(x), and there is no y with X =δ (∃R.C)(x) or X ⋖δ (∃R.C)(x), for some X ∈ {R(x, y), C(x)} add a new node y with L(x, y) = {R}, L(y) = {C}, and X =δ (∃R.C)(x) or X ⋖δ (∃R.C)(x) ∀R.C ∈ L(x), and not (∀R.C)(x)δ = 1 − (∃R.¬C)(x) L(x) → L(x) ∪ {∃R.¬C}, and (∀R.C)(x) =δ 1 − (∃R.¬C)(x) ∃R.P ∈ L(x), and there is y with R ∈ L(x, y) but not R(x, y)δ ≤ (∃R.C)(x) nor ¬P (x)δ ∈ L(y) R(x, y) ≤δ (∃R.C)(x), or L(y) → L(y) ∪ {¬P (x)} ∃R.P ∈ L(x), and there is no y with P (x) ∈ L(y), R(x, y) =δ (∃R.C)(x) or R(x, y) ⋖δ (∃R.C)(x) add a new node y with L(x, y) = {R}, L(y) = {P (x)}, and R(x, y) =δ (∃R.C)(x) or R(x, y) ⋖δ (∃R.C)(x) ∀R.P ∈ L(x), and not (∀R.P )(x) =δ 1 − (∃R.¬P )(x) L(x) → L(x) ∪ {∃R.¬P }, and (∀R.P )(x) =δ 1 − (∃R.¬P )(x) [C ⊲⊳ n] ∈ L(x), and not C(x) ⊲⊳δ n L(x) → L(x) ∪ {C}, and C(x) ⊲⊳δ n [C ⊲⊳ D] ∈ L(x), and not C(x) ⊲⊳δ D(x) L(x) → L(x) ∪ {C, D}, and C(x) ⊲⊳δ D(x) [C ⊲⊳ D↑ ](y) ∈ L(x), and not C(x) ⊲⊳δ D(y) L(x) → L(x) ∪ {C}, L(y) → L(y) ∪ {D}, and C(x) ⊲⊳δ D(y) (P ⊓ Q)(y) ∈ L(x), and not {P (y), Q(y)} ⊆ L(x) L(x) → L(x) ∪ {P (y), Q(y)} (P ⊔ Q)(y) ∈ L(x), and {P (y), Q(y)} ∩ L(x) = ∅ L(x) → L(x) ∪ {X} for some X ∈ {P (y), Q(y)} C ⊑ D ∈ T , and there is x with no C(x) ≤δ D(x) L(x) → L(x) ∪ {C, D}, and C(x) ≤δ D(x) C ⊏ D ∈ T , and there is x with no C(x) <δ D(x) L(x) → L(x) ∪ {C, D}, and C(x) <δ D(x) C ∈ L(x) or R ∈ L(x, y), and let X = C(x) or R(x, y) there is no i such that vi <δ X <δ vi+1 , or X =δ vi vi <δ X <δ vi+1 for some vi , vi+1 , or X =δ vi for some vi Figure 1: Expansion rules for ALC f c 117 118 Regular Papers if it contains no clash. If none of the expansion rules can be applied to T , then T is said to be complete. From the blocking condition and the number of concepts in any L(x) is finite, the algorithm terminates. There is a fuzzy tableau T of A w.r.t. T , iff a complete and clash-free completion graph can be constructed from A w.r.t. T . So the above algorithm is a decision procedure for consistency of ALC f c ABoxes w.r.t. empty TBoxes. 5 Conclusion This paper presents ALC f c , a fuzzy extension of description logic ALC with comparison expressions. New challenges of reasoning within ALC f c are discussed and a reasoning algorithm for ALC f c is proposed to overcome the challenges. It enables representation and reasoning for expressive fuzzy knowledge about comparisons. The future work is to extend comparison expressions in more expressive fuzzy description logics and design their reasoning algorithms. References [1] Franz Baader, Diego Calvanese, Deborah McGuinness, Daniele Nardi, and Peter F. Patel-Schneider, editors. The Description Logic Handbook: Theory, Implementation, and Applications. Cambridge University Press, 2003. [2] Petr Hajek. Making fuzzy description logic more general. 2005. [3] Yanhui Li, Baowen Xu, Jianjiang Lu, Dazhou Kang, and Peng Wang. A family of extended fuzzy description logics. In Proceedings of the IEEE 29th Annual International Computer Software and Applications Conference, pages 221–226, Edinburgh, Scotland, 2005. [4] Giorgos Stoilos, Giorgos Stamou, Vassilis Tzouvaras, Jeff Z. Pan, and Ian Horrocks. The fuzzy description logic f-shin. In Proceedings of the International Workshop on Uncertainty Reasoning for the Semantic Web, Galway, Ireland, 2005. [5] Umberto Straccia. Reasoning within fuzzy description logics. Journal of Artificial Intelligence Research, 14:137–166, 2001. [6] Umberto Straccia. Transforming fuzzy description logics into classical description logics. In Proceedings of the 9th European Conference on Logics in Artificial Intelligence, number 3229, pages 385–399, Lisbon, Portugal, 2004. 119 Proceedings of DL 2006 Handling Imprecise Knowledge with Fuzzy Description Logic Giorgos Stoilos and Giorgos Stamou National Technical University of Athens, Greece gstoil@image.ntua.gr gstam@softlab.ntua.gr Jeff Z. Pan University of Aberdeen, UK jpan@csd.abdn.ac.uk Abstract Fuzzy Description Logics have been proposed in the literature as a way to represent and reason with vague and imprecise knowledge. Their decidability, the empirically tractable and efficient reasoning algorithms, that carry over to fuzzy Description Logics, have attracted the attention of many research communities and domains that deal with a wealth of imprecise knowledge and information. In the current paper we present the syntax and semantics of fuzzy SHOIQ, investigating several properties of the semantics of transitivity, qualified cardinality restrictions and reasoning capabilities. 1 Introduction Although Description Logics (DLs) provide considerable expressive power, they feature expressive limitations regarding their ability to represent vague and imprecise knowledge. Consider for example an image processing application. Such applications can be assisted by the aid of a knowledge base that contains definitions of the objects that can be found within an image. For example there could be a definition of the form, Body ⊓ ∃hasPart.Tail ⊑ Animal. saying that if an object has a body and a part that is a tail then this object is an animal. Now suppose that we run an image analysis algorithm. Such algorithms usually segment and label objects that they identify in images. Since 120 Regular Papers the algorithms cannot be certain about the membership or non-membership of an object to a concept it usually assigns degrees of truth to these labellings. For example, we could have that the object o1 hasPart o2 to a degree of 0.8, that o1 is a Body to a degree of 0.6 and that o2 is a Tail to a degree of 0.7. From this knowledge we can deduce that o1 is an Animal to a degree, at-least equal to 0.6. For that purpose Fuzzy Description Logics (f-DLs), have been proposed in the literature as a way to represent and reason with vague and imprecise knowledge. In the current paper we present the f-DL, f-SHOIQ. f-SHOIQ extends fSHOIN [10] with qualified cardinality restrictions (QCRs). Furthermore, we investigate the semantics of f-SHOIQ, showing that it is a sound extension of SHOIQ, we investigate properties of fuzzy QCRs and transitivity, we provide the inference problems and investigate reasoning capabilities in f-SHOIQ. 2 Fuzzy Set Theory Fuzzy set theory and fuzzy logic are widely used for capturing imprecise knowledge [3]. While in classical set theory an element either belongs to a set or not, in fuzzy set theory elements belong only to a certain degree. More formally, let X be a set of elements. A fuzzy subset A of X, is defined by a membership function µA (x), or simply A(x) [3]. This function assigns any x ∈ X to a value between 0 and 1 that represents the degree in which this element belongs to X. In this new framework the classical set theoretic and logical operations are performed by special mathematical functions. More precisely fuzzy complement is a unary operation of the form c : [0, 1] → [0, 1], fuzzy intersection and union are performed by two binary functions of the form t : [0, 1] × [0, 1] → [0, 1] and u : [0, 1] × [0, 1] → [0, 1], called t-norm and t-conorm operations [3], respectively, and fuzzy implication also by a binary function, J : [0, 1] × [0, 1] → [0, 1]. In order to produce meaningfull fuzzy complements, conjunctions, disjunctions and implications, these functions must satisfy certain mathematical properties. For example the operators must satisfy the following boundary properties, c(0) = 1, c(1) = 0, t(1, a) = a and u(0, a) = a. Due to space limitations we cannot present all the properties that these functions should satisfy. The reader is referred to [3] for a comprehensive introduction. Nevertheless, it worths noting here that there exist two distinct classes of fuzzy implications, those of S-implications, given by the equation J (a, b) = u(c(a), b), and those of R-implications, given by J (a, b) = sup{x ∈ [0, 1] | t(a, x) ≤ b}. Examples of fuzzy operators are the Lukasiewicz negation, cL (a) = 1 − a, t-norm, tL (a, b) = max(0, a + b − 1), t-conorm uL (a, b) = min(1, a + b), and implication, JL (a, b) = min(1, 1 − a + b), the Gödel norms tG (a, b) = min(a, b), uG (a, b) = max(a, b), and implication JG (a, b) = b if a > b, 1 otherwise, and the Kleene-Dienes implication (KDimplication), JKD (a, b) = max(1 − a, b). Proceedings of DL 2006 3 121 Fuzzy Description Logics 3.1 Syntax and Semantics In this section we introduce the DL f-SHOIQ. As usual we have an alphabet of distinct concept names (C), role names (R) and individual names (I). fSHOIQ-roles and f-SHOIQ-concepts are defined as follows: Definition 3.1 Let RN ∈ R be a role name and R an f-SHOIQ-role. fSHOIQ-roles are defined by the abstract syntax: R ::= RN | R− . The inverse relation of roles is symmetric, and to avoid considering roles such as R−− , we define a function Inv, which returns the inverse of a role, more precisely Inv(R) := R− and Inv(R− ) := R. Let A ∈ C be a concept name, C and D f-SHOIQ-concepts, p ∈ N, S a simple1 f-SHOIQ-role, o ∈ I and R an fSHOIQ-role. f-SHOIQ concepts are defined by the following abstract syntax: C, D −→ ⊥ | ⊤ | A | ¬C | C ⊔ D | C ⊓ D | ∃R.C | ∀R.C |≤ pS.C |≥ pS.C | {o} The semantics of f-DLs are provided by a fuzzy interpretation [9]. A fuzzy interpretation is a pair I = h∆I , ·I i where the domain ∆I is a non-empty set of objects, called the domain of interpretation, and ·I is a fuzzy interpretation function which maps an individual a ∈ I to an element aI ∈ ∆I , a concept name A ∈ C to a membership function AI : ∆I → [0, 1] and a role name R ∈ R to a membership function RI : ∆I × ∆I → [0, 1]. The semantics of f-SHOIQconcepts and roles are depicted in Table 1. Most of these semantics have been presented elsewhere [9, 10, 1, 4, 7]. Nevertheless, the semantics of fuzzy QCRs presented here are a revision of the definition provided in [10]. First, we extend the semantics of number restriction to qualified number restrictions. Second, we use arbitrary fuzzy implications to give semantics to at-most QCRs, while in [10] only S-implications were considered. Extending the definition has the effect that if ∀R.C is interpreted by means of an R-implication and the fuzzy complement is the involutive (c(c(a)) = a) precomplement of the R-implication, then the equivalence ∀R.C ≡≤ 0R.¬C, holds. Since we are using arbitrary fuzzy implications we have to extend the definition in [10] to consider the equalities (=) and inequalities (6=) of objects. Please note that this equality and inequality is usually considered crisp, i.e. either 0 or 1, in the f-DL literature [5]. Finally, as it is argued in [7] we choose not to fuzzify nominal concepts. The reason for this choice is that a concept of the form {o} intends to refer to a specific object of ∆I , i.e. oI and not some real life concept with an arbitrary number of members. An f-SHOIQ knowledge base Σ consists of a TBox, an RBox and an ABox. Let C and D be f-SHOIQ concepts. As with the classical case, an f-SHOIQ 1 A role is called simple if it is neither transitive nor has any transitive sub-roles. 122 Regular Papers Table 1: Semantics of f-SHOIQ-concepts and roles Constructor top bottom general negation conjunction disjunction exists restriction value restriction nominal at-most QCR at-least QCR inverse roles Syntax ⊤ ⊥ ¬C C ⊓D C ⊔D ∃R.C ∀R.C {o} ≤ pR.C ≥ pR.C R− Semantics ⊤I (a) = 1 ⊥I (a) = 0 (¬C)I (a) = c(C I (a)) (C ⊓ D)I (a) = t(C I (a), DI (a)) (C ⊔ D)I (a) = u(C I (a), DI (a)) (∃R.C)I (a) = supb∈∆I {t(RI (a, b), C I (b))} (∀R.C)I (a) = inf b∈∆I {J (RI (a, b), C I (b))} {o}I (a) = 1 if a ∈ {oI }, otherwise {o}I (a) = 0 I I inf b1 ,...,bp+1 ∈∆I J (tp+1 i=1 {t(R (a, bi ), C (bi ))}, ui<j {bi = bj }) p I I supb1 ,...,bp ∈∆I t(ti=1 {t(R (a, bi ), C (bi ))}, ti<j {bi 6= bj }) (R− )I (b, a) = RI (a, b) TBox is a finite set of axioms of the form C ⊑ D, which are called, fuzzy inclusion axioms. A fuzzy interpretation I satisfies a fuzzy TBox T if ∀o ∈ ∆I , C I (o) ≤ DI (o), for each C ⊑ D ∈ T ; in this case, we say that I is a model of T . Similarly, an f-SHOIQ RBox is a finite set of fuzzy transitive role axioms, Trans(R), and fuzzy role inclusion axioms, R ⊑ S. I satisfies a fuzzy RBox R if ∀a, c ∈ ∆I , RI (a, c) ≥ supb∈∆I {t(RI (a, b), RI (b, c))} for each Trans(R) ∈ R and ∀a, b ∈ ∆I × ∆I , RI (a, b) ≤ S I (a, b), for each R ⊑ S ∈ T ; in this case, we say that I is a model of R. An f-SHOIQ ABox is a finite set of fuzzy assertions [9] of the form (a : C)⊲⊳n or (ha, bi : R)⊲⊳n, where ⊲⊳ stands for ≥, >, ≤ and <. Formally, I satisfies a fuzzy ABox A, if C I (aI ) ≥ n (RI (aI , bI ) ≥ n) for each (a : C) ≥ n ((ha, bi : R) ≥ n) in A; in this case, we say that I is a model of A. The satisfiability of fuzzy assertions with ≤, >, < is defined analogously. Observe that we can also simulate assertions of the form (a : C) = n by considering the assertions (a : C) ≥ n and (a : C) ≤ n. As it has been argued in the literature, fuzzy set theory is an extension of classical set theory. Hence, the following lemma, Lemma 3.2 Fuzzy interpretations coincide with crisp interpretations if we restrict to the membership degrees of 0 and 1. In other words in the extreme limits of 0 and 1 the fuzzy operations provide the results of Boolean algebra. We call such an extention a sound extension. Since we have defined fuzzy QCRs it is possible that (a : (≥ p1 R.C)) ≥ n1 and (a : (≤ p2 R.C)) ≥ n2 , with p1 > p2 simultaneously hold, without forming a contradiction. More precisely if t is the Gödel t-norm and J the KD-implication we have, Lemma 3.3 Let A = {(a : (≥ p1 R.C)) ≥ n1 , (a : (≤ p2 R.C)) ≥ n2 } be a fuzzy ABox, with n1 , n2 ∈ [0, 1], p1 , p2 ∈ N, and p2 < p1 . Then A is satisfiable iff n1 + n2 ≤ 1. Proceedings of DL 2006 123 In classical DLs, since n1 , n2 ∈ {0, 1}, the inequality n1 + n2 ≤ 1 is satisfied if and only if either n1 = 0 or n2 = 0. Indeed in crisp DLs an individual cannot simultaneously belong to both such concepts. Please note that investigating this property when other norm operations are used is an open research issue. 3.2 Logical Properties of Fuzzy DLs As it is obvious different fuzzy operators specify different f-DLs. For example the fKD -SHOIQ is obtained from f-SHOIQ when the Lukasiewicz negation, the Gödel t-norm and t-conorm and the Kleene-Dienes fuzzy implication are used, while fL -SHOIQ is obtained if we use the Lukasiewicz negation, t-norm, t-conorm and fuzzy implication. The choice of the operations has an immediate impact on the logical properties of the resulting f-DL. For any triple hc, t, ui, due to the standard properties of the fuzzy operators [3], the following concept equivalences hold: ¬⊤ ≡ ⊥, ¬⊥ ≡ ⊤, C ⊓ ⊤ ≡ C, C ⊔ ⊥ ≡ C, C ⊔ ⊤ ≡ ⊤ and C ⊓ ⊥ ≡ ⊥. If the complement is involutive it also holds that ¬¬C ≡ C. Now if the fuzzy triple satisfies the De Morgan laws (called dual triple), we additionally have, ¬(C ⊔ D) ≡ ¬C ⊓ ¬D and ¬(C ⊓D) ≡ ¬C ⊔¬D. For example the fuzzy triples, hcL , tL , uL i and hcL , tG , uG i, are dual triples. Moreover, for any dual triple hc, t, ui and S-implication JS it holds that, ∀R.C = ¬(∃R.¬C). For example the quadruple hcL , tG , uG , JKD i, satisfies this equivalence. Furthermore, if the fuzzy triple satisfies the laws of contradiction and excluded middle, then the following properties of boolean logic hold: (C ⊓ ¬C ≡ ⊥) and (C ⊔ ¬C ≡ ⊤). For example, the triple hcL , tL , uL i, satisfies these laws. It is important to notice that the classical properties of Boolean algebra, like the De Morgan the excluded middle and the contradiction laws, do not always hold in fuzzy set theory and logic. For example for the triple hcL , tG , uG i we have max(0.6, 1 − 0.6) = 0.6 6= 1. The consequences of this property is that many well-known techniques in DLs, like internalization do not carry over to f-DLs. Fortunately, the laws of excluded middle and contradiction can be simulated. Lemma 3.4 For all a ∈ ∆I , n ∈ [0, 1], and interpretations I 1. either C I (a) < n, or C I (a) ≥ n [8] 2 , and 2. if C I (a) ≥ n and (¬C)I (a) ≥ n, then ⊥I (a) ≥ max(0, n − ǫ), where ǫ is the equilibrium [3] of a fuzzy complement. Point 1 simulates the DL axiom ⊤ ⊑ C ⊔ ¬C, while point 2 the axiom C ⊓ ¬C ⊑ ⊥. For example for hcL , tG , uG i, where ǫ = 0.5 if n = 0.7, then 0 = ⊥I (a) ≥ 0.2, which is a contradiction, while for n = 0.3, ⊥I (a) ≥ 0, which is valid. Indeed it is possible that C I (a) ≥ 0.3 and (¬C)I (a) ≥ 0.3 = C I (a) ≤ 0.7. 2 Similarly either C I (a) ≤ n or C I (a) > n for all n ∈ [0, 1] 124 3.3 Regular Papers Inference Services In the current section we will present the inference problems of f-DLs. An fSHOIQ knowledge base Σ is satisfiable (unsatisfiable) iff there exists (does not exist) a fuzzy interpretation I which satisfies all axioms in Σ. An f-SHOIQconcept C is n-satisfiable w.r.t. Σ iff there exists a model I of Σ for which there is some a ∈ ∆I such that C I (a) = n, and n ∈ (0, 1]; C subsumes D w.r.t. Σ iff for every model I of Σ we have ∀d ∈ ∆I , C I (d) ≤ DI (d); a fuzzy ABox A is consistent (inconsistent) w.r.t. a fuzzy TBox T and RBox R if there exists (does not exist) a model I of T and R that satisfies each assertion in A. Given a fuzzy concept axiom, a fuzzy role axiom or a fuzzy assertion φ, Σ entails φ, written Σ |= φ, iff for all models I of Σ, I satisfies φ. Let Σ = hT , R, Ai, be a fuzzy knowledge base. It has been proved that all inference problems of f-DLs can be reduced to ABox consistency w.r.t. T and R. More precisely, C is n-satisfiable w.r.t. Σ iff hT , R, {(a : C) ≥ n}i is satisfiable, Σ |= φ ⊲⊳ n iff Σ = hT , R, A ∪ {φ ¬ ⊲⊳ n}i is unsatisfiable (where ¬ ⊲⊳ represents the negation of inequalities, e.g. ¬ ≥=<), and Σ |= C ⊑ D iff Σ = hT , R, A ∪ {(a : C) ≥ n, (a : D) < n}i, for both n ∈ {n1 , n2 }, n1 ∈ (0, 0.5] and n2 ∈ (0.5, 1], is unsatisfiable [9]. In the past, the consistency problem in f-DLs has been considered w.r.t. to a simple and acyclic TBox. Only recently a procedure for deciding fuzzy ABox consistency w.r.t. general and/or cyclic TBoxes has been developed [8]. In classical DLs general and cyclic TBoxes were handled by a process called internalization [2]. As we mentioned previously, internalization is based on the law of excluded middle, which is not always satisfied in f-DLs. In [8] the authors use the case analysis of lemma 3.4, providing the following result, Lemma 3.5 [8] A fuzzy interpretation I satisfies C ⊑ D iff for all n ∈ [0, 1] and a ∈ ∆I , either C I (a) < n or DI (a) ≥ n. Hence, the semantic restrictions of a TBox T can be encoded in mutually exclusive fuzzy assertions. 4 Reasoning in Fuzzy Description Logics As we have seen f-DLs constitute a sound extension of classical DLs. Hence, the techniques used to perform reasoning in classical DLs could be extended to provide reasoning support for f-DLs. Since all inference problems can be reduced to the problem of ABox consistency w.r.t. an RBox R, a procedure that decides this problem should be constructed. In classical DLs this is done with the aid of tableaux algorithms that given an ABox A they try to construct a tableau for A [2], i.e., an abstraction of a model of A which has a tree or forest-like Proceedings of DL 2006 125 shape. In such trees, nodes correspond to objects in the model, and edges to certain relations that connect two nodes. Each node x is labelled with the set of concepts that it belongs to (L(x)), and each edge hx, yi with a set of roles that connect two nodes x, y (E(hx, yi)). In the fuzzy case, since now we have fuzzy assertions, we extend these mappings to also include the membership degree that a node belongs to a concept. More formally we have the following definition. Definition 4.1 If A is a fuzzy ABox, R a fuzzy RBox, RA is the set of roles occurring in A and R together with their inverses, sub(A) is the set of subconcepts that exist in A and IA is the set of individuals in A, a fuzzy tableau T for A w.r.t. R, is defined to be a quadruple (S, L, E, V) such that: S is a set of elements, L : S × sub(A) → [0, 1] maps each element and concept to the membership degree of that element to the concept, E : RA × S × S → [0, 1] maps each role and pair of elements to the membership degree of the pair to the role, and V : IA → S maps individuals occurring in A to elements in S. Additionally, a fuzzy tableau should satisfy certain properties of the semantics of the f-DL language [6, 5]. For example, if concept conjunction is performed by the Gödel t-norm, then for a ∈ S, C, D ∈ sub(A), n ∈ [0, 1], and L(s, C ⊓ D) ≥ n, it follows that both L(s, C) ≥ n and L(s, D) ≥ n must hold. Currently, we have tableau definitions for the languages fKD -SI and fKD -SHIN [6, 5], while it is an open research issue to define a tableau structure for fKD -SHOIQ as well as for f-DLs with other norm operations. One difficult point in these definitions is to handle transitivity in the new framework. In classical DLs the tree-like structure is preserved by pushing concepts of the form ∀R.C from a node s to a node t if R(s, t) exists. This is based on the observation that if Trans(R) then the axiom ∀R.C ⊑ ∀R.(∀R.C), holds [2]. The following lemma characterizes transitivity in fKD -DLs. Lemma 4.2 If (∀R.C)I (a) ≥ n, RI (a, b) ≥ r1 and Trans(R) then, in an fKD DL, (∀R.(∀R.C))I (a) ≥ n holds. Thus, as a tableau property we have that, if L(s, ∀R.C) ≥ n and Trans(R), then either c(E(R, hs, ti)) ≥ n or L(t, ∀R.C) ≥ n. Another major problem towards our goal in constructing a tableaux reasoning algorithm is to determine if the appropriate blocking techniques can be applied. While this is quite straightforward in fKD -DLs [6, 5, 8], this is very hard when other norms are used. 5 Conclusions Fuzzy Description Logics are applicable in a number of research and industrial applications that face a vast amount of imprecise and vague information. The last couple of years the work on fuzzy DLs has provided with impressive results 126 Regular Papers such as the extension of very expressive DL languages, like SHOIN [10] and SHOIQ, the development of reasoning procedures for fuzzy DLs like fKD -SI [6] and fKD -SHIN [5] and reasoning w.r.t. general inclusion axioms [8], which was considered an open problem for fuzzy DLs for many years. Currently the work on fuzzy DLs is focused on the reasoning problem for fKD -SHOIQ, on reasoning with other norms than the ones used in fKD -SI and fKD -SHIN , on data-type support and on implementations. References [1] Steffen Hölldobler, Tran Dinh Khang, and Hans-Peter Störr. A fuzzy description logic with hedges as concept modifiers. In Proceedings InTech/VJFuzzy’2002, pages 25–34, 2002. [2] I. Horrocks and U. Sattler. A description logic with transitive and inverse roles and role hierarchies. Journal of Logic and Computation, 9:385–410, 1999. [3] G. J. Klir and B. Yuan. Fuzzy Sets and Fuzzy Logic: Theory and Applications. Prentice-Hall, 1995. [4] D. Sánchez and G.B. Tettamanzi. Generalizing quantification in fuzzy description logic. In Proceedings 8th Fuzzy Days in Dortmund, 2004. [5] G. Stoilos, G. Stamou, V. Tzouvaras, J.Z. Pan, and I. Horrocks. The fuzzy description logic f-SHIN . Proc. of the International Workshop on Uncertainty Reasoning for the Semantic Web, 2005. [6] G. Stoilos, G. Stamou, V. Tzouvaras, J.Z. Pan, and I. Horrocks. A fuzzy description logic for multimedia knowledge representation. Proc. of the International Workshop on Multimedia and the Semantic Web, 2005. [7] G. Stoilos, G. Stamou, V. Tzouvaras, J.Z. Pan, and I. Horrocks. Fuzzy owl: Uncertainty and the semantic web. Proc. of the International Workshop on OWL: Experiences and Directions, 2005. [8] G. Stoilos, U. Straccia, G. Stamou, and J.Z. Pan. General concept inclusions in fuzzy description logics. to appear in ECAI, 2006. [9] U. Straccia. Reasoning within fuzzy description logics. Journal of Artificial Intelligence Research, 14:137–166, 2001. [10] U. Straccia. Towards a fuzzy description logic for the semantic web. In Proceedings of the 2nd European Semantic Web Conference, 2005. 127 Proceedings of DL 2006 Finding Subsumers for Natural Language Presentation Chris Mellish and Jeff Z. Pan Department of Computing Science University of Aberdeen Abstract This work is motivated by the task of describing in natural language a concept defined in an OWL DL ontology. However, rather than focussing on linguistic issues, we address the question of how to support natural language presentation with inference. We introduce a new non-standard DL reasoning problem, that of finding subsumers of a concept that are suitable for natural language presentation. We present a solution that works by enumerating successively more complex concepts in the limited language ALEN . Although the search space is formidable, specific optimisations that take into account characteristics of natural language enable it to be tamed. Our initial experiments show that the approach may be quite feasible in practice. 1 Introduction Knowledge engineers, domain experts and also casual users need better ways to understand ontologies. As the logical structure of ontologies becomes richer, it becomes harder to devise appropriate graphical means of presentation that do not require special training on the part of the users. In this scenario, presentation in natural language is becoming increasingly attractive. Natural language has developed good ways of conveying some complex logical structures and requires no special training. The work described in this paper takes as its starting point the task of answering in natural language a question What is A?, where A (the target) is an atomic concept mentioned in some given OWL DL ontology. This may take place as a part of a longer dialogue between person and machine where, for instance, subsequently the person asks What is B?, for some atomic B mentioned in the answer to the first question. Rather than considering detailed linguistic aspects of this task, however, we focus on how to support it with appropriate reasoning. A first attempt at the task of answering What is A? might somehow render in natural language the set of ontology axioms that mention A. However, an ontology axiom is not necessarily of appropriate complexity to be expressed as a natural language sentence. Also, it could be misleading to present true, but incomplete information. Finally, important information about the target may arise from logical consequences of the axioms, not only 128 Regular Papers from explicitly stated axioms. Elsewhere we have used these arguments to argue the need for new kinds of inference, natural language directed inference (NLDI), which are capable of deriving those logical consequences suitable for natural language presentation [8]. DL-based Ontologies have available powerful reasoning services, such as classification, subsumption and satisfiability checking. Standard reasoning services, however, require detailed specification of the reasoning goals (e.g. the subsumption service needs to be told exactly which two concepts are to be tested). Since NLDI is a kind of data-driven reasoning with goals that cannot be stated precisely in logical terms, standard DL reasoning services cannot be used immediately to implement NLDI. The challenge is to exploit these efficiently implemented services in more complex ways to make NLDI possible. What kind of information is needed to answer a question What is A? McKeown [7] discusses a number of kinds of facts present in human descriptions of a target A, which include identification: An aircraft carrier is a surface ship, attributive: A torpedo has an underwater target location, and equivalent: Wines described as ‘great’ are fine wines from an especially good village. In DL terms, these correspond to concept subsumptions A ⊑ C w.r.t. a TBox T , with A (A= Aircraf tCarrier, T orpedo, GreatW ine) being the subsumee. Unfortunately, not all (or even any) of these concept descriptions C need necessarily appear explicitly directly in axioms of the form “A ⊑ C” in the ontology. In this paper we present a procedure for discovering subsumers C of a concept A that might be worth presenting in natural language. Although we allow the ontology T to be expressed in full OWL DL, nevertheless the subsumers C are in the more limited language ALEN . In a sense, therefore, our real goal is to produce the most specific ALEN subsumer, which contains all the information known about the target. In general, however, this will be a conjunction, within which the conjuncts could be generated in many possible orders. Instead of generating the single conjunction, therefore, we generate a set of most specific non-conjunctive subsumers, which could then be combined together by conjunction if this was wished. We require these individual conjuncts to be the sort of things that could be presented in individual natural language sentences. The closest related work is that on non-standard inferences in DLs. On the one hand, our task could be characterised as looking for a least subsumer (other than A itself) of A using a less expressive DL [3]. On the other hand, the task can be regarded as a “matching” problem, “A ⊑? P ”, where P is a concept pattern [2]. Unfortunately, existing approaches to both computing least subsumers and matching only apply to less expressive DLs and assume TBoxes to be unfoldable. In this work, apart from assuming the existence of standard reasoning services, we do not assume unfoldability of the axioms. 2 Discovering Subsumers Answering questions about an ontology is a form of communication, and formal theories of communication standardly make reference to models of belief [1]. Here we need to distinguish between two different sets of beliefs – the system’s beliefs and the user’s beliefs (as in the system’s user model). The first of these is represented by the original ontology T , whilst the second requires a separate user knowledge base U. The user KB is likely to be different from the system KB because otherwise the user would not have sought information Proceedings of DL 2006 129 about the target. Hence two notions of subsumption arise:1 1. C1 system-subsumes C2 iff T |= C2 ⊑ C1 ; 2. C1 user-subsumes C2 iff U |= C2 ⊑ C1 . We make the assumption that the user KB has the same vocabulary as the system KB and is an approximation to the system KB: For all C1 , C2 , if U |= C1 ⊑ C2 then T |= C1 ⊑ C2 . I.e. everything the user knows is also known by the system. Our framework allows for any U satisfying the above constraints; in particular, one could have U = T (ignoring this particular distinction) or have U be something that is built up over the dialogue as a result of the information that the user is told. Our current implementation considers just the first question of a dialogue, where the user has no initial domain knowledge, i.e. U = φ. We can now present the task more formally:2 The natural language subsumer enumeration problem: Given a system-satisfiable target named concept A, find the most specific (w.r.t. usersubsumption) non-conjunctive concepts C which system-subsume A, do not user-subsume A and are appropriate for natural language presentation. Here we use the user KB to decide which of these are worth presenting, because the extra knowledge of the system may obscure certain user-relevant distinctions. For example, consider an ontology T which includes the axiom C1 ≡ C2 not in U. Given this knowledge, if C1 subsumes a target A, so does C2 . As C1 and C2 are system-equivalent, from the system’s point of view the choice of which to present is arbitrary. From the point of view of the user who is not in possession of all the knowledge in T , however, the descriptions C1 and C2 provide distinct information, and so it is worth considering presenting both of them. Our approach is to enumerate concepts C subsuming A via a search through all possible concepts in ALEN . At each stage we can test whether an enumerated concept C systemsubsumes A using the subsumption reasoning service. Some such concepts are returned as candidates which may be user-least non-conjunctive subsumers of A. The set of candidates is then further filtered, in order to obtain a set, no element of which user-subsumes another element or user-subsumes the target (exactly one of a set of user-equivalent concepts is returned). In practice, the enumeration of candidates is organised in such a way as to avoid many candidates that would otherwise be filtered out by the second step. 3 The Refinement Relation The search space is expressed in terms of a refinement relation ց, where C1 ց C2 indicates that C2 results from a minimal change to C1 that makes it more syntactically complex. The 1 In the following, we will also sometimes mention corresponding varients of other logical tests (e.g. system- vs user-equivalence). 2 We consider extra requirements for natural language presentation in Section 5. 130 Regular Papers search starts from the most general concept ⊤, working to candidates C1 such that ⊤ ց C1 , then to candidates C2 such that C1 ց C2 , and so on. Thus we are exploring the set of concepts α such that ⊤ ց∗ α, where ց∗ is the transitive closure of ց. To limit the amount of redundancy in the search space, concepts are assumed to be in a normal form, so that conjunctions are only allowed inside ∃ constructs, and conjunctive information at the top level or just inside ∀ constructs must be expanded out to yield multiple candidates. Nested conjunctions are flattened. Within conjunctions, conjuncts (if present) occur in the following order: negations (in lexicographic order) before role restrictions (with properties in a fixed order) before atomic concepts (in lexicographic order). Within the role restrictions, all the restrictions for a given role occur together, in the order: number restrictions before ∀ before ∃. For any role P , there are at most two number restrictions: either a single = restriction or at most one of each of ≤ and ≥, in this order. For any role P , at most one ∀P restriction can occur within any allowed conjunction. The following exhaustive definition can also be read as the basis of an algorithm for enumerating, for a given concept α, the concepts β such that α ց β. This gives us the original theoretical search space. In the actual implementation, we make a number of optimisations compared to using the basic refinement relation, as detailed below. ⊤ ց Ai if Ai is a named concept ⊤ ց ¬Ai if Ai is a named concept ⊤ ց (∃P.⊤) if P is a role name ⊤ ց (∀P.α) if P is a role name and ⊤ ց α ⊤ ց (≥ nP ) if P is a simple role and 0 ≤ n ≤ π, where π a large number (1000000) ⊤ ց (≤ nP ) if (0 ≤ n ≤ π), and P is a simple role ⊤ ց (= nP ) if (0 ≤ n ≤ π), and P is a simple role (∃P.α) ց (∃P.β) if α ց β (∀P.α) ց (∀P.β) if α ց β α ց (β ⊓ α) where α is not a conjunction, ⊤ ց β, this is within the scope of an ∃ and β is of a type allowed before α by the conjunction ordering rules. α1 ⊓ α2 ⊓ . . . αn ց β ⊓ α2 ⊓ . . . αn if α1 ց β α1 ⊓ α2 ⊓ . . . αn ց β ⊓ α1 ⊓ α2 ⊓ . . . αn if ⊤ ց β and β is of a type allowed before the α i by the conjunction ordering rules. The above relation ց has the following properties. These can be shown by induction on the number of symbols (other than ⊤) occurring in C1 . Lemma 1. If C1 is a satisfiable concept in ALEN expressed in terms of the vocabulary of the ontology then ⊤ ց∗ β for some concept β logically equivalent to C1 . Lemma 2. If C1 ց C2 then C2 is strictly more syntactically complex then C1 (for a range of possible complexity metrics) Lemma 3. If C1 ց C2 then C1 subsumes C2 (hence C1 system- and user-subsumes C2 ) The first of these means that we can reach all possible concepts through ց (notice that we do not need to allow ⊥ in formulae, because of equivalences such as (∀P.⊥) ≡ (= 0P )). Because of Lemmas 2 and 3, a search following the transitive closure of ց is both a search in terms of increasing syntactic complexity and also a (perhaps rather slow) search in terms of increasing logical specificity. Proceedings of DL 2006 4 131 The Search Strategy The search algorithm works with a derived relation ցց, defined in terms of ց, which produces results strictly user-subsumed by the original concept. Again, this definition can be thought of as an algorithm to enumerate the relevant refinements: C1 ցց C2 iff C1 ց C2 and C2 does not user-subsume C1 or ∃C3 .C1 ց C3 , C3 user-subsumes C1 and C3 ցց C2 Our search is organised in a depth-first manner. If a point in the tree is reached where the concept Ci does not system-subsume the target, there is no point in considering further refinements of this concept. By Lemma 3, such further refinements will be subsumed, and hence also system-subsumed, by Ci . One of these cannot system-subsume the target, because if so then, by transitivity of system-subsumption, Ci would have to as well. If such a Ci is reached, search down that path of the tree is terminated. Lemma 2 means that we can achieve termination by terminating the search path when it reaches a concept with a complexity equal to or exceeding a preset limit. A generated concept is returned as a candidate exactly when none of the first ցց descendents both are of acceptable size (see Section 5) and also system-subsume the target. This tends to lead to only user-least solutions being returned. The above properties guarantee that the above search is complete, in that all user-least non-conjunctive concepts (or concepts logically equivalent to them) that system-subsume the target and have a size below the limit are enumerated (as well as possibly some other concepts). Logically equivalent solutions could, however, be generated many times. The search is partially correct, in that all candidates system-subsume the target. User-minimality (and so the rest of correctness) is then ensured by the subsequent filtering process. Apart from the natural language based optimisations discussed in the next section, space does not permit us to describe in detail a number of other optimisations used to enhance the basic search approach. Firstly, the relevance filter of [9] is used to limit the vocabulary of atomic concept and role names used in the enumerated concepts. Secondly, we disallow the addition of elements to conjunctions which are either user-subsumed by or user-subsume existing conjuncts. Thirdly, a focussed search is used to ensure that any introduced number restriction is in fact the most specific such restriction such that the candidate with this restriction in it subsumes the target. 5 Natural Language Direction Natural language easily expresses conjunctive information and often produces scope ambiguities in complex examples involving disjunction and negation. ALEN allows no disjunctions or complex negations and thus is a natural DL to act as the target for natural language based approximation. The following summarises other ways in which we incorporate natural language direction into the algorithm, sometimes at the expense of logical completeness. 132 Regular Papers Concept Complexity. Because there is a limit to the complexity of a concept that can be presented in a sentence, we impose a size limit on concepts. Each negation or conjunction in a concept counts 1 towards the “size” of a formula, and each quantifier counts n + 1 towards the calculation, where n is the number of enclosing quantifiers. A complexity limit of around 4 or 5 seems roughly plausible for what can give rise to a comprehensible natural language sentence. Specificity and Complexity. Because we use ցց, rather than ց in the algorithm, refinements of a concept that are user-equivalent to it are not returned. Given that these refinements are more complex than the original, the effect is that (apart from where equivalent concepts are reached by different paths through the search space) only one of the smallest of a set of user-equivalent concepts is ever returned. The consequence is that, roughly speaking, the simplest way of saying some particular content is chosen (c.f. Grice’s principle of brevity [4]). Introducing new Terminology. Since we are interested in finding just the most specific concepts that subsume the target, whenever ⊤ is refined to a named concept it can be refined to a most user-specific named concept such that the whole candidate, with this concept substituted, system-subsumes the target. Similarly, when a concept ¬Ai is introduced, it can be done with a most user-general Ai such that the candidate still system-subsumes the target. Unfortunately, if U = φ, then there are no non-trivial user-subsumption relationships between named concepts, and so this measure has no effect. As a result, for instance, if a target is system-subsumed by (∃hasP et.P oodle) then concepts like (∃hasP et.Animate) will also appear as candidates (none of these is user-subsumed by any other). All of these convey new information to the imagined user, but they are not all equally good for natural language presentation. Given that the user has the opportunity in the dialogue to ask followup questions about mentioned atomic concepts, it is actually complete in a dialogue sense simply to return just the concept including the system most specific concepts in these cases. In contrast, if all the above concepts are presented then the impression may be given that there are no noteworthy system-subsumption relationships between them. Negations. In natural languages, negation is used primarily to deny an explicitly or implicitly available proposition. This means that (in the absence of some specific context) it would be strange to answer the question What is a mammal? with something like Every mammal is not a mushroom. Our interpretation of this requirement is the condition that a negation ¬α can only be generated if it is within a conjunction where there is another conjunct (which must be a positive atomic concept) β such that α ⊓ β is satisfiable. This is a kind of “β but not α” negation. For instance, it is perfectly reasonable to say “... a pizza but not a vegetarian dish”, because it is possible to be both a pizza and a vegetarian dish. Trivial Universals. If instances of a given concept cannot possibly have values for a role P then all ∀ restrictions on this role trivially subsume the concept. Such restrictions are however not appropriate to be expressed. This means that it would be strange to answer the question What is a SpicyTopping? with something like A SpicyTopping can only have 133 Proceedings of DL 2006 a pizza as a topping. In this example, pizza toppings cannot themselves have toppings. This means that, for instance, ∀topping.P izza system-subsumes SpicyT opping. In this situation, any concept of the form (∀P.α) system-subsumes the target. Although logically each of these is a subsumer, in natural language terms each of them is trivial and not worth expressing. The same problem can arise at any nesting within a candidate. Our solution to this problem is that if at any point we are planning to insert the concept (∀P.⊤) at some point in a candidate then first of all we look to see whether the concept with (∀P.⊥) in this position system-subsumes the target. If so, then we judge that any universal would be trivial and refrain from introducing one. 6 Discussion Our prototype considers just the first question of a question answering dialogue, where U = ∅. It is implemented in SWI Prolog (version 5.4.7), using a DIG interface for Prolog [5]. RacerPro (version 1.9.0) is used via DIG to provide all reasoning services w.r.t. the system KB (e.g. system-subsumption) and results are cached. As U =φ, the checking of user-subsumption is implemented structurally in Prolog with simple subset of the algorithm of [6], to avoid overheads introduced by using the DIG interface. The following table shows statistics about some examples. The two ontologies used are a food ontology from http://www.w3.org/TR/owl-guide/food.rdf and a pizza ontology from http://www.co-ode.org/ontologies/pizza/pizza 20041007.owl. For each example, we give the complexity limit, the search space size3 , the target, the number of calls to RacerPro needed, the number of subsumers found by the initial search and the number that this is filtered to. Ontology Food Food Food Pizza Pizza Pizza Limit 4 5 6 4 5 6 Search Space 2.8E8 1.8E10 1.2E12 2.1E8 1.8E10 1.5E12 Target F ruitCourse F ruitCourse F ruitCourse AmericanHot AmericanHot AmericanHot Calls 2354 4706 13756 1386 2116 3970 Subsumers 87 124 385 80 80 99 Filtered 63 93 324 76 76 95 The concepts found subsuming AmericanHot, assuming complexity limit 4, include: ¬ V egetarianP izza ⊓ N amedP izza (∀hasT opping.¬ ArtichokeT opping ⊓ P izzaT opping) (∀hasT opping.(≤ 1hasSpiciness)) (∃hasT opping.(∀hasSpiciness.Spiciness) ⊓ M ozzarellaT opping) (≥ 5hasT opping) Our results so far show that it can be possible, given an appropriate search strategy and natural language direction, to solve the natural language subsumer enumeration problem 3 The size of the basic refinement search space, without any optimisations, ignoring lexicographic ordering of conjuncts and assuming a maximum cardinality of 3. The implementation allows cardinalities up to 1 million, but using this figure in the calculation of the raw search space size would be misleading. 134 Regular Papers in spite of the huge search space involved. Actual runtimes are still somewhat problematic (the above calculation for AmericanHot with limit 5 takes about 31 seconds elapsed time on a 1695MHz PC), but further optimisations could be introduced if the reasoner and the rest of the system were in the same process. 7 Acknowledgements Thanks to Racer Systems GmbH for free use of RacerPro, Jan Wielemaker for SWI Prolog, and Zhisheng Huang and Cees Visser for their DIG interface for Prolog. Thanks to Holger Wache and Frank van Harmelen for useful discussions. Chris Mellish’s contribution to this work is funded by EPSRC grant GR/S62932/01. Jeff Z. Pan’s contribution is partially funded by the FP6 Network of Excellence EU project Knowledge Web (IST-2004-507842). References [1] J. Allen. Natural Language Understanding. Benjamin Cummings, 1995. [2] F. Baader, R. Küsters, A. Borgida, and D. McGuinness. Matching in description logics. Journal of Logic and Computation, 9(3):411–447, 1999. [3] S. Brandt, R. Küsters, and A. Turhan. Approximation and difference in description logics. In Proc. of the 8th Int. Conf. on Principles of Knowledge Representation and Reasoning (KR’2002), pages 203–214, 2002. [4] H. P. Grice. Logic and conversation. In P. Cole and J. Morgan, editors, Syntax and Semantics: Vol 3, Speech Acts. Academic Press, 1975. [5] Zhisheng Huang and Cees Visser. An Extended DIG Description Logic Interface for Prolog. Technical Report SEKT/2004/D3.4.1.2/v1.0, Dept of Artificial Intelligence, Vrije Universiteit Amsterdam, 2004. [6] R. Küsters and R. Molitor. Structural subsumption and least common subsumers in a description logic with existential and number restrictions. Studia Logica, 81(2):227–259, 2005. [7] K. McKeown. Text Generation: Using Discourse Strategies and Focus Constraints to Generate Natural Language Text. Cambridge University Press, 1985. [8] C. Mellish and X. Sun. Natural language directed inference in the presentation of ontologies. In Procs of the Tenth European Workshop on Natural Language Geeration, Aberdeen, Scotland, 2005. [9] Dmitry Tsarkov, Alexandre Riazanov, Sean Bechhofer, and Ian Horrocks. Using vampire to reason with owl. In Sheila A. McIlraith, Dimitris Plexousakis, and Frank van Harmelen, editors, Procs of the 2004 International Semantic Web Conference (ISWC 2004), pages 471–485. Springer LNCS 3298, 2004. 135 Proceedings of DL 2006 SHIN ABox Reduction Achille Fokoue, Aaron Kershenbaum, Li Ma, Edith Schonberg, Kavitha Srinivas, Rose Williams IBM Research, Hawthorne, NY 10532 achille, aaronk, malli, ediths, ksrinivs, rosemw@us.ibm.com May 12, 2006 Abstract We propose a technique to make consistency detection scalable for large Aboxes in secondary storage. We use static analysis of knowledge representation with summarization techniques to produce a dramatically reduced proxy Abox. We show that the proxy Abox is consistent only if the original Abox is also consistent. We also show that, in practice, our techniques dramatically reduce the time and space requirements for consistency detection. 1 Introduction All common reasoning tasks in expressive DL ontologies reduce to consistency detection, which is well known to be intractable in the worst-case [2]. Given that the size of an Abox may be in the order of millions of assertions, this complexity poses a serious challenge for the practical use of DL ontologies. We propose new techniques that make consistency detection scalable for SHIN Aboxes with millions of assertions. Ontology Aboxes often reside in transactional databases, so we do not assume that an Abox will fit into memory. With these new techniques, we are able to efficiently extract a small set of assertions from the database that represents the entire Abox, and reason over this small set in memory. We first use static analysis to isolate a subportion of the Abox that captures all the global effects that can occur in reasoning, henceforth referred to as the global-effects Abox. By global effects, we mean effects that propagate through the Abox to affect an individual’s membership in a given concept. In practice, isolating global effects results in substantial reductions in the size of the Abox, because most roles participate in local rather than global effects. 1 136 Regular Papers Once we’ve isolated global effects in the Abox, we use summarization techniques to dramatically reduce this subportion of the Abox further to produce a proxy Abox. For example, in the largest of the 4 ontologies that we studied, we reduced an Abox of 874K individuals and 3.5 million assertions to a proxy Abox with 18 individuals and 49 role assertions. The power of creating such a proxy is that we can replace the consistency check on the global-effects Abox A′ with a consistency check on a dramatically reduced proxy. Specifically, if the proxy is consistent, we are guaranteed that A ′ is consistent. If the proxy is inconsistent, it can still be used to partition A ′ . Our key contributions in this paper are as follows: (a) We present a technique to use static analysis of knowledge representation to isolate a portion of the Abox where global effects are possible. (b) We construct a dramatically reduced proxy of this portion using summarization techniques. (c) We present a method to further identify local effects in the global-effects Abox, based on the proxy Abox, to handle cases where the summarization may have been too conservative in building the proxy. (d) We show the efficiency of these techniques applied to 4 real ontologies. 2 Local/Global Effect Partitioning We present several criteria for safely removing role assertions from an Abox A. The reduced Abox is consistent iff A is consistent. In practice, applying these criteria results in both significantly shrinking the Abox and in partitioning it into many disconnected Aboxes, many of which consist of a single individual, which can be checked for consistency using concept satisfiability. Our criteria for role assertion removal is based on the assumption that any concept in the clos(A) can reach the concept set of any individual in A from the application of tableau expansion rules for SHIN. We define clos(A) as S a:C∈A clos(C) where clos(C) is a set that contains C and all its sub-concepts (where C is in NNF). Note that our formal definition of clos(A) differs from [6] in that we do not include ¬C in clos(C), due to lesser expressiveness of SHIN compared to SHIQ. We assume that a and b are named individuals in the original A, x is a new unnamed individual introduced as a result of tableau expansion rules, C is a concept in clos(A), and R is a role. Let L be a mapping from each individual in A to a set of concepts in clos(A), such that a : C ∈ A iff C ∈ L(a). L(a) is the concept set of a. An individual b is said to be an R-neighbor of a iff there is an assertion Q(a, b) or Q− (b, a) in A where Q ∈ R (where R = { Q| Q ⊑∗ R} and ⊑∗ is the reflexive transitive closure of the sub-role relation). The SHIN tableau expansion rules can merge individuals, add membership assertions of the form a : C where C ∈ clos(A), add unnamed individuals, and add new role assertions Proceedings of DL 2006 137 of the form R(a, x) or R(a, b) to A. We say that an expansion rule has a global effect if it uses an existing role assertion to add new assertions to A or to detect a clash. For example, a concept C will be propagated to the concept set L(b) of a named individual b if a : ∀R.C and R(a, b) ∈ A. The ∀-rule, ≤-rule, and ∀+ -rule can have global effects. In contrast, the ∃-rule and ≥-rule do not use any existing role assertions to alter the Abox, and are hence local effect rules; but these rules can generate new role assertions, so we call concepts of the form (∃R.C) and (≥ nR) R-generators. A role assertion R(a, b) is said to be a global-effect role assertion iff there is at least one execution of the tableau algorithm in which it is used by a global-effect rule, or it is part of an explicit clash involving both a and b. Otherwise, it is a local-effect role assertion and cannot affect the outcome of a consistency check. Our criteria are designed to detect and remove local effect role assertions. 2.1 Role-based Local Effect Detection We make the simple observation that if roles R and R− are never used in any universal or maximum cardinality restrictions, then a role assertion R(a, b) can never be used in a global-effect rule, so it can safely be ignored. Definition 1: A role R is part of a universal restriction ∀P.C iff R ∈ P . (Similarly for maximum cardinality restriction). A role R is part of the universal restrictions of an Abox A iff there is a universal restriction ∀P.C ∈ clos(A) such that R ∈ P . (Similarly for maximum cardinality restrictions). Theorem 2: A role assertion R(a, b) can safely be removed from an Abox A if neither R nor its inverse R− is part of the universal restrictions or maximum cardinality restrictions of A. Proof (sketch): Direct consequence of more the general Theorem 9. 2.2 Assertion-based Local Effect Detection We specify criteria for local-effect role assertion removal even in the presence of universal and maximum cardinality restrictions. The criteria for ∀-rule and ∀+ -rule is as follows: Let role R be part of a universal restriction ∀P.C. A role assertion R(a, b) is removable with respect to ∀P.C iff b : C ∈ A and R has no transitive superroles. R(a, b) is removable with respect to universal restrictions in an Abox A iff it is removable with respect to all universal restrictions ∀P.C, where R or R− is part of ∀P.C. Next, we note that for the ≤-rule to have a global effect from merging there must be a maximum cardinality restriction (≤ nP ) in clos(A), and an individual a with more than n P -neighbors. To ensure that an individual a has no more than n P -neighbors, we need to be able to compute an upper bound on P -neighbors of a safely. In particular, when counting a′ s P -neighbors, it is 138 Regular Papers Figure 1: Effect of mergers on a’s neighbors important to include named individuals and unnamed individuals that can become P -neighbors through P -generators and mergers. One example of a merger is shown in Figure 1, where c can be merged with a because P − is attracted to T − through a shared super role Q which is part of a maximum cardinality restriction. We define the conditions under which the upper bound of a′ s P neighbors can be computed safely and efficiently below. First, we introduce the notion of an an attractant for P , to prevent new P -neighbors from mergers as shown in Figure 1: Definition 3: For a given role P , we define attractant(P ) as follows: T ∈ attractant(P ) iff there is a role Q such that P ⊑∗ Q, T ⊑∗ Q, ≤ nQ ∈ clos(A). We say that P is safe in A iff one of the following conditions is satisfied for the role P: (a) the attractant(P ) ⊆ {P } and attractant(P − ) ⊆ {P − }, or (b) for all roles R such that either R or R− is in P , there are no R-generators in clos(A). Definition 4: An individual a in A is mergeable iff at some step of any execution of the tableau algorithm on A, a is merged with a named individual b. Lemma 5: Let P be a role that is safe in A. During an execution of the tableau algorithm on A the following holds: if there is a unnamed individual x such that P or P − is in the L(< parent(x), x >), then |L(< parent(x), x >)| = 1, where parent(x) denotes the parent node of x in the completion forest. Proof: Proved by induction [3] on the iterations of the tableau algorithm. Theorem 6: An individual a in A is not mergeable in A if, for any role P and any individual b in A, the following conditions hold: (1) if a is a P -neighbor of b there is no concept (≤ nP ) in clos(A), and (2) if b is a P -neighbor of a then P is safe in A. Proof sketch: By induction using Lemma 5 [3]. Definition 7: Let role R be part of a maximum cardinality restriction (≤ nP ) ∈ clos(A). A role assertion R(a, b) is removable with respect to (≤ nP ) iff (1) if a is a Q-neighbor of a named individual c, there is no concept of the form (≤ nQ) in clos(A), and (2) if a named individual c is a Q-neighbor of a then Q is safe in A, and (3) P is safe in A and its only mininum cardinality is of the form ≥ 1P (∃P.⊤), and (4) |P (a)| + |Some(P, a)| ≤ n, where Some(P, a) = {∃P.C ∈ clos(A) | there is no P -neighbor c of a such that c : C ∈ A}. Proceedings of DL 2006 139 R(a, b) is removable with respect to maximum cardinality restrictions in an Abox A iff it is removable with respect to all maximum cardinality restrictions ≤ nR, where R or R− is part of ≤ nR. Note that, by Theorem 6, (1) and (2) imply that a is not mergeable in A. Definition 8: A role assertion R(a, b) is removable with respect to maximum cardinality restrictions in an Abox A iff the following holds: if R (resp. R − ) is part of a maximum cardinality restriction (≤ nP ) ∈ clos(A), then R(a, b) (resp. R− (b, a)) is removable with respect to (≤ nP ). R(a, b) is removable with respect to maximum cardinality restrictions in an Abox A iff it is removable with respect to all maximum cardinality restrictions ≤ nP , where R or R − is part of ≤ nP . Theorem 9: A role assertion R(a, b) can safely be removed from an Abox A if it is removable with respect to universal restrictions and removable with respect to maximum cardinality restrictions. Proof Sketch: Let R(a, b) be a role assertion removable w.r.t. maximum cardinality and universal restrictions in an Abox A. Let A′ be the Abox defined as A′ = A − {R(a, b), R− (b, a)}. If A is consistent, A′ is obviously consistent. We show that if A′ is consistent, a model of A can be constructed by applying the tableau algorithm rules in a particular way. 1 First, for a root node c in the completion forest F , the root node α(c) is defined as follows: if L(c) 6= ∅ then α(c) = c; otherwise, α(c) = d, where d is the unique root node in F with L(d) 6= ∅ and d=c. ˙ Since A′ is consistent, we can ′ apply the tableau expansion rules on A without creating a clash in such a way that: (1) ∃-rule is never triggered to satisfy a constraint ∃P.C ∈ L(α(a)) (resp. L(α(b))) where ≤ nP ∈ clos(A), R (resp. R− ) is part of ≤ nP , and b : C ∈ A (resp. a : C ∈ A), and (2) ≥-rule is never triggered to satisfy a constraint ≥ nP ∈ L(α(a)) (resp. L(α(b))) where ≤ nP ∈ clos(A), R (resp. R − ) is part of ≤ nP , and, in the Abox A, b (resp. a) is one of the n R-neighbors of a (resp. R− -neighbors of b) explicitly asserted to be distinct. Such a rule application yields a clash-free completion forest F , and the only nodes on which expansion rules may be applicable are α(a) and α(b) (the only applicable rules are ∃-rule and ≥-rule). Next, we modify F to create a completion forest F ′ by adding to F the edge < α(a), α(b) > if it was not already in F , and by adding R to L(< α(a), α(b) >), if it was not already there. We show that F ′ is complete (i.e. no rules are applicable) and clash-free. The fact that, in F ′ , R ∈ L(< α(a), α(b) >) ensures that the ∃ and ≥ rules, which may have been applicable on α(a) or α(b) in F , are not applicable on α(a) and α(b) in F ′ . However, the same fact may now make the ∀, ∀+ , ≤, and ≤r rules applicable on α(a) or α(b) in F ′ . We show that this cannot be the case. The definition of removable w.r.t. universal restrictions obviously ensures that ∀ and ∀+ rules are not applicable on α(a) or α(b) in F ′ . It can be shown 1 A direct model-theoretic proof cannot easily provided here, see [3] for details. 140 Regular Papers [3] that ≤, and ≤r rules cannot be applicable on α(a) or α(b) in F ′ and that F ′ is still clash free. Thus, a tableau for A can be built from F ′ as in [6], which establishes that A has a model. 3 Proxy Abox Intuitively, the Abox contains many redundant assertions from the point of view of consistency checking that can be collapsed to create a reduced proxy Abox. As an example, if the Abox contains assertions of the form R(m, c) and R(j, y), where m and j are both members of W and c and y are both members of U , we can replace m and j by a proxy individual w : W that is connected by a R relation to a proxy individual u : U . Reasoning over the resulting proxy Abox corresponds to reasoning over the original Abox, as shown formally below. Definition 10: A proxy Abox is an Abox A′′ that is generated from any SHIN Abox A using a mapping function f that satisfies the following constraints, where R is the set of all roles and′′ their inverses in an Abox: ′′ (1) (3) if a : C ∈ A then f (a) : C ∈ A if a = 6 b ∈ A then f (a) 6= f (b) ∈ A′′ (2) if R(a, b) ∈ A then R(f (a), f (b)) ∈ A Theorem 11: If the proxy Abox A′′ obtained by applying the mapping function f to A is consistent then A is consistent. However, the converse of Theorem 11 does not hold. Proof : Let us assume that A′ is consistent w.r.t. T and R. Therefore there ′ ′ is a model I ′ = (∆I , .I ) of A′ w.r.t. T and R. A model of A can easily be built from I ′ by interpreting an individual a in A in the same way as f (a) is interpreted by I ′ . Formally, let I = (∆I , .I ) be the interpretation of the A w.r.t. ′ ′ T and R defined as follows: ∆I = ∆I ; for a concept C ∈ ′ T , C I = C I ; for a ′ role R in R, RI = RI ; for an individual a in A, aI = f (a)I . I is a model of A w.r.t. T and R as a direct consequence of the fact that I ′ is a model of A′ and A′ satisfies the 3 conditions stated in definition 1 (see [3] for more details). The mapping function f that we use to create a proxy Abox from a globaleffects Abox is defined such that if L(a) = L(b) and a 6= b ∈ / A, then f (a) = f (b). That is, all individuals in the Abox A which have the same concept set and are not asserted to be distinct map to the same individual in the proxy Abox A′′ . If a proxy Abox A′′ is not consistent, either there is a real inconsistency in A or the process of collapsing individuals to create A′′ caused an artificial inconsistency. To determine whether an inconsistency is real, we consider the global-effects Abox A′ . Like A′ , A′′ may consist of disconnected Aboxes and, since A′′ is typically small, it is not expensive to identify these partitions. Furthermore, we know from the consistency check which partitions in A′′ are inconsistent. For each inconsistent partition Ai ′′ in A′′ , we test for consistency the assertions in A′ that map into it, which form a distinct partition Ai ′ in A′ . If any partition in A′ is inconsistent, then A is inconsistent. 141 Proceedings of DL 2006 Table 1: Characteristics of A, A’, and A” KB BioPax LUBM NIMD ST 4 Classes A A’ 31 14 91 25 19 2 16 15 A” 14 19 2 15 Roles A A’ 40 2 27 5 28 1 11 2 A” 2 3 1 2 Instances A A’ 261K 17K 142K 44K 1,278K 429K 874K 547K A” 39 481 2 18 Role Assertions A A’ 582K 14K 736K 45K 2,000K 286K 3,595K 580K A” 106 352 1 49 Computational Experience We tested our approach on the four actual ontologies shown in Table 1. A corresponds to the original Abox, A′ is the Abox obtained from A after removing local effects, and A′′ is the proxy Abox. Biopax includes the data for 11 organisms available at http://biocyc.org. We used a version of LUBM that was modified to SHIN [7] . The Abox of the NIMD ontology was generated from text analysis programs run over a large number of unstructured documents. The semantic traceability (ST) ontology Abox was generated from a program that extracted relationships between software artifacts of a large middleware application. As can be seen in Table 1, in practice, A′ is significantly smaller than A, and A′′ is a substantial reduction over A′ . In most cases, A′ was sufficient for the consistency check. For ST, a real inconsistency was detected in the local-effects consistency check. The Biopax and NIMD ontologies were consistent in A′′ . For LUBM, we needed to check the consistency of A′ . The running time for our algorithm took from 12.6 seconds to 283 seconds, which included the time for building the proxy and checking it for consistency. 5 Related Work and Conclusion There are many highly optimized reasoners such as Pellet [8], Racer [4], InstanceStore [1], and Kaon2 [10] designed for consistency checking, but only InstanceStore and Kaon2 can be extended to Aboxes in secondary storage. Kaon2 applies to deductive databases, whereas our techniques work with relational databases. InstanceStore is limited to role-free Aboxes. In theory, Instance Store can handle Aboxes with role assertions through a technique called precompletion [9], but this may not be practical for Aboxes stored in databases. Our techniques can be contrasted with optimization techniques such as model caching and Abox contraction [5], but again, it is unclear how such techniques can be applied to Aboxes in databases. We have demonstrated a technique to scale consistency detection to large Aboxes in secondary storage by extracting a small representative Abox. Further, 142 Regular Papers we have shown that, in practice, this technique works efficiently on four large ontologies. Our plan is to extend this approach to apply more accurate static analysis techniques, extend its applicability to more expressive languages, and to apply these techniques to query processing. References [1] Sean Bechhofer, Ian Horrocks, and Daniele Turi. The owl instance store: System description. Proc. of 20th Int.Conf. on Automated Deduction, pages 177–181, 2005. [2] F. Donini. Complexity of reasoning. In F. Baader, D. Calvanese, D.L. McGuinness, D. Nardi, and P.F. Patel-Schneider, editors, Description Logic Handbook, pages 101–141. Cambridge University Press, 2002. [3] Achille Fokoue, Aaron Kershenbaum, Li Ma, Edith Schonberg, and Kavitha Srinivas. Scalable reasoning:cutting ontologies down to size. In http://www.research.ibm.com/iaaa/aaaiSubmission.ps, 2006. [4] V. Haarslev and R. Moller. Racer system description. Conf. on Automated Reasoning (IJCAR 2001), pages 701–705, 2001. [5] Volker Haarslev and Ralf Moller. An empirical evaluation of optimization strategies for abox reasoning in expressive description logics. Proc. of the International Workshop on Description Logics, pages 115–199, 1999. [6] Ian Horrocks, Ulrike Sattler, and Stephan Tobies. Reasoning with individuals for the description logic SHIQ∗ . Proc. of 17th Int.Conf. on Automated Deduction, pages 482–496, 2000. [7] Li Ma, Yang Yang, Zhaomin Qiu, Guotong Xie, and Yue Pan. Towards a complete owl ontology benchmark. In Proc. of the third European Semantic Web Conf.(ESWC 2006), 2006. [8] Evren Sirin and Bijan Parsia. Pellet: An owl dl reasoner. In Description Logics, 2004. [9] Sergio Tessaris and Ian Horrocks. Abox satisfiability reduced to terminological reasoning in expressive description logics. In LPAR, pages 435–449, 2002. [10] U.Hustadt, B. Motik, and U. Sattler. Reducing shiq description logic to disjunctive datalog programs. Proc. of 9th Intl. Conf. on Knowledge Representation and Reasoning (KR2004), pages 152–162. 143 Proceedings of DL 2006 Tableau Caching for Description Logics with Inverse and Transitive Roles Yu Ding and Volker Haarslev Concordia University, Montreal, Quebec, Canada {ding yu|haarslev}@cse.concordia.ca Abstract. Modern description logic (DL) reasoners are known to be less efficient for DLs with inverse roles. The current loss of performance is largely due to the missing applicability of some well-known optimization techniques, especially the one for caching the satisfiability status of modal successors. In this paper, we present a rule synthesis technique from which an estimation of the potential back-propagation of constraints can be made. This estimation can be applied to both the concept classifier and the satisfiability tester. This paper presents a tableau caching technique for SHI as a first step to improving the performance of tableau-based DL reasoners for logics offering the use of inverse roles. The proposed techniques underwent a first empirical evaluation with a prototype DL reasoner for SHI using a set of synthetically generated knowledge bases. The initial results indicate an significant improvement in runtime performance once caching is effectively enabled. 1 Motivation Description logics (DLs) are a family of logic based formalisms for terminological knowledge representation and reasoning [15]. Descending from KL-ONE [1], they now enjoy a wide spectrum of applications. Behind this success is a long line of research and implementation efforts in DL reasoners. Most modern DL systems are based on tableau algorithms. Such algorithms are first introduced in [2] by Schmidt-Schauss and Smolka. In spite of the high worst case complexity of the satisfiability problem [15] for most expressive DLs (typically ExpTime-complete), highly optimized implementations have been shown to work well in many realistic applications [3, 9, 14]. DLs express unary relations in terms of concepts and binary relations in terms of roles. To describe inverse binary relationships, inverse roles are a necessary language element. One of the first approaches to allow the declaration of inverse roles was in the early nineties when some DL systems started to support very expressive DLs with inverse roles [5]. Later, the theoretical result on elimination of inverse roles based on equi-satisfiability was established [7]. 144 Regular Papers Tableau-based DL systems typically employ a wide range of optimization techniques, most of which were designed and established unfortunately without appropriate consideration of inverse roles (which would be reasonable if the elimination of inverse roles had become realistic in applications). If directly applied to DLs with inverse roles, some wellknown optimizations become less efficient or even invalid (due to the twoway propagation of universal restrictions introduced by inverse roles). The caching technique is one such example that suddenly turns unsound when inverse roles are considered. The current technique of inverse role elimination could introduce an overwhelming number of GCIs (General Concept Inclusions) that are difficult for tableau algorithms. Other attempts were tried, e.g., the dynamic blocking technique [8] which can be considered as a successful attempt in adapting the blocking [4] technique to DLs with inverse roles. The literature addressing the issues caused by inverse role is not plentiful, and a systematic treatment is still to be done. This paper will discuss the soundness problem of common caching techniques for DLs with inverse roles. We extend our previous study [16] to a more expressive description logic, i.e., SHI, a logic with expressive role constructs (i.e., transitive roles, inverse roles, and role hierarchies). We assume the reader’s familiarity with the DL SHI and tableau algorithms. We introduce the rule synthesis approach, discuss the use of heuristics for concept classification, and show how to apply the same technique to obtain sound tableau caching. 2 Synthesizing Rules In this section, we present our rule synthesis approach in terms of a reachability analysis of the underlying unfolding rules. Our reachability analysis is based on a multi-graph G = (V, E) constructed from the syntactic structure of the given unfolding rules of T . The initial reachability relation is represented as ǫ-edges and its transitive closure can be computed according to a set of reachability extension rules that are presented in the first subsection. The potential back propagations is contained in this closure. After this, we show how the estimated potential back propagation can be used to obtain sound sub-tableau caching as well as potential subsumers, respectively. Proceedings of DL 2006 2.1 145 Potential Back Propagation Due to the interaction of universal restrictions with inverse roles, constraints can propagate up and down the tableau tree. We refer to this upward propagation of constraints as back propagation. Here we present a way to synthesize the unfolding rules [15] to determine potential back propagation (PBP). We view PBP a reflexive and transitive relation, and formulate it as reachability in a directed graph (containing multi-edges and cycles). In the discourse, we use the notation G = (V, E) for a directed multi-graph, where V denotes a set of nodes and E denotes a set of edges (binary relations) for pairs of nodes in V . We say C (also D) is non-modally used by C ⊓ D and C ⊔ D; and say ∀R.(A ⊔ B) (resp. ∃R.(A ⊔ B)) modally uses A (also B) through ∀R (resp. ∃R). Note we are not using the transitive use relation, for details please see [13]. Definition 1. Given a SHI expression in NNF (negation normal form), its reachability graph is a multi-graph G = (V, E) formed according to a function f such that: (1) for every concept literal C, there is a node f (C) ∈ V ; (2) for every SHI (sub-)expression s, there is a unique node f (s) ∈ V ; (3) if expression s1 non-modally uses s2 , then ǫ ∈ E(f (s1 ), f (s2 )); if s1 modally uses s2 through ⊗R for some role name R, then ⊗R ∈ E(f (s1 ), f (s2 )), where ⊗ stands for the connective ∃ or ∀. Recursively an expression could be decomposed into concept literals and correspondingly G is constructed. Definition 2. Given T, a SHI TBox of unfolding rules each of which is of the form CL ⊑ D, where CL is a concept literal and D is in NNF, a reachability graph G = (V, E) for T is formed such that for each rule CL ⊑ D: (1) there is a node f (CL ) ∈ V ; (2) there is a node f (D) ∈ V ; (3) ǫ ∈ E(f (CL ), f (D)). The initial reachability graph G is built upon the syntactic structure only. A non-modal use relationship is represented by an ǫ-edge, a modal use relationship is represented by an edge tagged with the modality connective concatenated with the corresponding role name. The unfolding operation is represented by connecting the concept literal with an ǫ-edge to the root of the graph representation of its right-hand side. In Table 1 three rules are given for extending the reachability relation from the initial G = (V, E). We use E ∗ to denote the transitive closure of E over ǫ-edges. 146 Regular Papers there exist nodes x, y, z such that ∃R1 ∈ E ∗ (x, y) and ∀R2 ∈ E ∗ (y, z) and R1 ⊑∗ Inv(R2 ) then E(x, z) := E(x, z) ∪ {ǫ} ∀∀-rule: if there exist nodes x, y, z such that ∀R1 ∈ E ∗ (x, y) and ∀S ∈ E ∗ (y, z) (for short let Inv(S) be R2 ) and there exists R3 ∈ R s.t. R3 ⊑∗ Ri for i ∈ {1, 2} then E(x, z) := E(x, z) ∪ {ǫ} ∀∃-rule: if there exist nodes x, y, z such that ∀R1 ∈ E ∗ (x, y) and ∃R2 ∈ E ∗ (y, z) and there exists Trans(S) s.t. R2 ⊑∗ S ⊑∗ R1 then E(y, y) := E(y, y) ∪ {∀S} ∃∀-rule: if Table 1. Reachability Extension Rules over R for SHI. Initially, the reachability graph G = (V, E) is constructed according to all unfolding rules in T . Then, an extension of G is based on a simulation of the ∀-rule in tableau algorithms w.r.t. R. For a given TBox T and a role hierarchy R in DL SHI, the PBP is contained in the final reachability relation in E ∗ . To see how PBP is obtained, we compare the tableau expansion with the reachability extension. In tableau algorithms, both decomposition and selection are done by the ⊓-rule and the ⊔-rule; on the other hand, in the reachability graph, only decomposition is simulated. Also, in tableau algorithms, the firing of ∃-rule is subject to conditions, whereas in reachability graph, we make a simplification and assume it can be always fired. Furthermore, in tableau algorithms, the firing of ∀-rule depends on the existence of an edge (e.g., might be provided by a sibling expression), but in a reachability graph, we simplify that condition to only consider its predecessors and successors (as if that sibling always exists). In summary, by making these simplification and discarding inessential factors, the reachability graph is constructed in a very conservative way to grasp every potential back propagation. The essence for the reachability graph is that if PBP (ǫ-edge in the final G = (V, E ∗ )) is impossible, then it is guaranteed that no back propagation will take place in the corresponding application of the tableau algorithm. For a given TBox T (of a set of unfolding rules) and a role hierarchy R, there is a corresponding reachability graph G = (V, E ∗ ). For a concept literal C, we define a function Reach(C) = {y ∈ V | ǫ ∈ E ∗ (f (C), y)}. In the following, we use the function Reach without mentioning its T and R. Proceedings of DL 2006 2.2 147 Heuristic for Sound Sub-tableau Caching Based on Reach(C), we define the function Watch applicable to a concept S literal C: Watch(C) = x∈Reach(C) {Inv(R) | ∃y ∈ V s.t. ∀R ∈ E(x, y)}, where R is a (inverse) role. For a set of concept literals Cs , we define S CWatch(Cs ) = C∈Cs Watch(C). Let Rs be a set of (inverse) roles, we use Rs↓ to denote the union of subroles for each r ∈ Rs w.r.t. role hierarchy R. At this point, we are able to define a boolean function Safe(Cs , R) that can be used to guarantee caching soundness by excluding potential unsound situations: Safe(Cs , R) = true iff R ∈ / CWatch(Cs )↓. The following lemma follows naturally from the previous analysis. Lemma 1 (Sound Caching). Given the TBox T and the role hierarchy R, let Cs and Cw be two sets of concept literals, R be a (inverse) role, The set Cs can be cached at the position of R-successor if: (1) Cs ⊆ Cw ; and (2) Safe(Cs , R); and (3) Cw has a model. Proof (sketch). (1) Assume Cw has the model Iw . The construction process for Iw can be used to guide that of Cs , and Cs has a model Is inside which each node’s label is a subset of that of Iw ; (2) The condition Safe(Cs , R) guarantees the root of Is has no Inv(R) predecessor, even if Iw needs a Inv(R) predecessor. 2.3 Heuristic for Potential Subsumer Classification is the process of computing the most-specific subsumption relationships (i.e., parents and children) of each concept name to other concept names mentioned in a TBox. The parents and children of a certain concept name are computed in the so-called top-down and bottom-up traversal phases, respectively. For large knowledge base, it is particularly important to avoid as many traversal as possible. A typical optimization is to use a heuristics-guided traversal which exploits information about told subsumers [3] or potential subsumer [12] to restrict the search space. However, even the better potential subsumer technique considers only the transitive non-modal use relation [12] among concept names. For DLs with inverse roles, potential subsumers could appear in modal-use relations. For example, given a simple TBox T = {A ⊑ ∃R.B, B ⊑ ∀R− .C} (note that T has only primitive definitions and no cyclic rules). The subsumption of A ⊑ C holds, and the subsumer C is neither explicitly told nor non-modal discernible. 148 Regular Papers For DLs with inverse roles, the potential subsumer technique remains useful if we take those concept names appearing in Reach(A) into consideration. Similarly, this estimation is also applicable to related ABox reasoning tasks [15]. 3 Discussion and Related Work As a first step to evaluate the proposed techniques, i.e., caching and backpropagation estimation for DLs with inverse roles, a experimental tableaubased reasoner has been developed in Java. It employs several optimization techniques such as lexical normalization, semantic branching, backjumping (in a weak form), and a optimized version of dynamic blocking (tailored to DLs free of number restrictions). Besides the basic platform, two components were implemented, one for back-propagation estimation, and one for caching (the latter relies on the former). The proposed techniques were then evaluated with a set of synthetically generated satisfiability tests. These preliminary benchmarks indicated a performance gain of a factor of 2 to 10. A more realistic benchmark using RacerPro is in preparation. The following papers in the literature are relevant in our context to caching and blocking. DeGiacomo et. al. [6] demonstrated for the DL ALC that the tableau caching technique (especially unsatisfiability caching) is necessary for obtaining a worst case optimal tableau algorithm. For superset and sub-set caching see [12]. For various blocking techniques for DLs with inverse roles see [11, 8]. Papers which systematically addressed the classification problem include [3, 12]. However, they commonly focused on DLs without inverse roles. Recent papers focusing on the optimization of classification did not address the anomaly when inverse roles are present in the TBox. Satisfiability tests for DLs with inverse roles are empirically hard for tableau-based reasoning systems. For instance, it is required that the blocking technique (i.e., the cycle detection mechanism) dynamically guarantees soundness. Furthermore, witness nodes are restricted to be ancestor nodes only. This dynamic behavior together with a limited choice of witness nodes generally makes the tableau-based procedures less efficient than necessary. Our preliminary experiments show that the proposed approach can be feasibly implemented as part of a one-pass parsing phase for tableau-based DL reasoners. The availability of the caching technique dramatically speeds up the reasoning process. First, the witness space is no longer restricted to ancestor nodes. Second, the caching technique requires Proceedings of DL 2006 149 no re-checking and thus it is safe to discard nodes once they are successfully cached. By doing this, the tableau algorithm is more space-economic. Our approach can successfully deal with a set of (possibly cyclic) unfolding rules and a role hierarchy, thus it well meets the typical requirement from real applications. 4 Conclusion The common caching techniques are no longer applicable in the presence of inverse roles, since information can be pushed backwards, which might invalidate the cache. Closely related to known techniques of knowledge compilation, we presented in this paper a technique for synthesizing the unfolding rules (of the terminological box) to estimate potential back propagations. This technique is currently applied to terminological knowledge bases with cyclic axioms and expressive roles in the expressive DL SHI. The presented solution computes a reachability graph before testing the satisfiability of a concept in order to determine, when backpropagation is impossible and hence caching is safe. Based on this, a sound tableau caching technique was obtained in a relatively straightforward way. As was expected, better run-time performance was observed in our preliminary experiments due to the use of cache. We also pointed out that the estimation could be used for other purposes such as in locating potential subsumers during concept classification. We are aware that further refinement is possible for the technique presented here. References 1. Brachman, R., McGuinness, D., Patel-Schneider, P., Resnick, L., Borgida, A.: Living with CLASSIC: When and how to use a KL-ONElike language. Principles of Semantic Networks, edited by John Sowa, Morgan Kaufmann, (1991) 401-456 2. Schmidt-Schauss M., Smolka G.: Attributive concept descriptions with complements. Artificial Intelligence, Vol 48, (1991) 1-26 3. Baader, F., Hollunder, B., Nebel, B., Profitlich, H.-J., Franconi, E.: An Empirical Analysis of Optimization Techniques for Terminological Representation Systems - or - Making KRIS get a move on: KR-92, (1992) 270-281 150 Regular Papers 4. Buchheit M., Donini F., Nutt W., Schaerf A.: Decidable Reasoning in Terminological Knowledge Representation Systems. Journal of Artificial Intelligence Research, Vol 1 (1993) 109-138. 5. Paolo Bresciani, Enrico Franconi, and Sergio Tessaris: Implementing and testing expressive description logics: a preliminary report. DL-95 (1995). 6. De Giacoma, G., Donini, F., Massacci, F.: EXPTIME Tableaux for ALC: DL-96, (1996) 7. Diego Calvanese, Giuseppe De Giacomo, Riccardo Rosati: A Note on Encoding Inverse Roles and Functional Restrictions in ALC Knowledge Bases. DL-98 (1998). 8. I. Horrocks and U. Sattler. A Description Logic with Transitive and Inverse Roles and Role Hierarchies. Journal of Logic and Computation, 9(3), (1999) 385-410 9. Ian Horrocks: Using an expressive description logic: FaCT or fiction?: KR-98 (1998) 10. Volker Haarslev, Ralf Möller: Consistency Testing: The RACE Experience: Proc. of TABLEAUX’2000, (2000) 57-61 11. F. Baader, U. Sattler: An Overview of Tableau Algorithms for Description Logics. Studia Logica, 69, (2001) 5-40 12. Volker Haarslev, Ralf Möller: High Performance Reasoning with Very Large Knowledge Bases: A Practical Case Study. Proc. of IJCAI’2001 (2001) 161-166 13. Volker Haarslev: Theory and Practice of Visual Languages and Description Logics: Habilitation Thesis, Computer Science Department, University of Hamburg, September (2001) 14. Volker Haarslev, Ralf Möller: RACER System Description: Proc. of IJCAR’2001 (2001) 15. Franz Baader, Diego Calvanese, Deborah McGuinness, Daniele Nardi, and Peter F. Patel-Schneider: The Description Logic Handbook: Theory, Implementation, and Applications. Cambridge University Press (2003) 16. Yu Ding, Volker Haarslev: Towards Efficient Reasoning for Description Logics with Inverse Roles. DL-05 (2005) 208-215 Proceedings of DL 2006 151 On the Scalability of Description Logic Instance Retrieval Ralf Möller, Volker Haarslev, Michael Wessel 1 Introduction Although description logics (DLs) are becoming more and more expressive, our experience has been that it is only for some tasks that the expressivity of description logics really comes into play; for many applications, it is necessary to be able to deal with largely deterministic knowledge very effectively (scalability problem). In the literature, the scalability problem has been tackled from different perspectives. We see two main approaches, the layered approach and the integrated approach. In the former approach the goal is to use databases for storing and accessing data, and exploit description logic ontologies for convenient query formulation. The main idea is to support ontology-based query expansion and optimization. See, e.g., [9, 4] (DLDB), [1] (Instance Store), or [2] (DL-Lite). We acknowlede the interesting progress of these approaches, but we note that the corresponding techniques only applicable if reduced expressivity does not matter. Despite the most appealing argument of reusing database technology (in particular services for persistent data), at the current state of the art it is not clear how expressivity can be increased to, e.g., SHIQ without losing the advantage of fast runtimes. Therefore, in this paper, we pursue the integrated approach that considers query answering with a description logic system. For the time being we ignore the problems associated with persistency and investigate specific knowledge bases (see below). Continuing our work in [5], in this paper we investigate the constraints imposed on the architecture of description logic reasoning systems, and we investigate the assumptions underlying the heuristics used in instance retrieval algorithms. The contribution presents and analyzes the main results we have found about how to solve the scalability problem with tableau-based prover systems given large sets of data descriptions for a large number of individuals. Note that we do not discuss query answering speed of a particular system but investigate the effect of optimization techniques that could be exploited by any (tableaubased) DL inference system that already exists or might be built. We assume the reader is familiar with DLs in general and tableau-based decision procedures in particular. 2 Lehigh University Benchmark In order to investigate the scalability problem, we use the Lehigh University BenchMark (LUBM, [3, 4]). LUBM data descriptions are automatically generated, but we do not exploit this in this paper (e.g., by tailoring optimization techniques to regular patterns stemming from generator peculiarities). The LUBM queries are formalized as conjunctive queries referencing concept, role, and individual names from the Tbox. A query language tailored to description logic applications that can express these queries is described in [8] (the language is called nRQL). Variables are only bound to individuals mentioned in the Abox. In the notation of nRQL queries used in this paper we assume that different variables may have the same bindings. In addition, variables that do not occur in the head of a query are assumed to be existentially quantified and are are also only bound to individual names mentioned in the 152 Regular Papers Abox. Below, LUBM queries 9 and 12 are shown in order to present a flavor of the kind of query answering problems – note that ′ www.U niversity0.edu′ is an individual and subOrganizationOf is a transitive role. Please refer to [3, 4] for more information about the LUBM queries. Q9 : ans(x, y, z) ← Student(x), F aculty(y), Course(z), advisor(x, y), takesCourse(x, z), teacherOf (y, z) Q12 : ans(x, y) ← Chair(x), Department(y), memberOf (x, y), subOrganizationOf (y,′ www.U niversity0.edu′ ) In order to investigate the scalability problem, we used a TBox for LUBM with inverse and transitive roles as well as domain and range restrictions but no number restrictions, value restrictions or disjunctions. Among other axioms, the LUBM TBox contains axioms that express necessary and sufficient conditions on Chair. For instance, there is an axiom . Chair = P erson ⊓ ∃headOf.Department. For evaluating optimization techinques for query answering we consider runtimes for a whole query set (queries 1 to 14 in the LUBM case). 3 Optimization Techniques If the queries mentioned in the previous section are answered in a naive way by evaluating subqueries in the sequence of syntactic notation, acceptable answering times cannot be achieved. Determining all bindings for a variable (with a so-called generator) is much more costly than verifying a particular binding (with a tester). Treating the one-place predicates Student, F aculty, and Course as generators for bindings for corresponding variables results in combinatorial explosion (cross product computation). Optimization techniques are required that provide for efficient query answering in the average case. For the discussion of optimization techniques, we assume that for transitive and inverse roles, the Abox is extended in the obvious way such that implicit role assertions are made explicit. In addition, the conclusions from domain and range restrictions are made explicit in the Abox as well. 3.1 Query Optimization The optimization techniques that we investigated are inspired by database join optimizations, and exploit the fact that there are few F aculties but many Students in the data descriptions. For instance, in case of query Q9 from LUBM, the idea is to use F aculty as a generator for bindings for y and then generate the bindings for z following the role teacherOf . The heuristic applied here is that the average cardinality of a set of role fillers is rather small. For the given z bindings we apply the predicate Course as a tester (rather than as a generator as in the naive approach). Given the remaining bindings for z, bindings for x can be established via the inverse of takesCourse. These x bindings are then filtered with the tester Student. If z was not mentioned in the set of variables for which bindings are to be computed, and the tester Course was not used, there would be no need to generate bindings for z at all. One could just check for the existence of a takesCourse role filler for bindings w.r.t. x. In the second example, query Q12, the constant ′ www.U niversity0.edu′ is mentioned. Starting from this individual the inverse of subOrganizationOf is applied as a generator for bindings for y which are filtered with the tester Department. With the inverse of memberOf , bindings for x are computed which are then filtered with Chair. Since for the concept Chair sufficient conditions are declared in the TBox, instance retrieval reasoning is required if Chair is a generator. Thus, it is advantageous that Chair is applied as a tester (and only instance tests are performed). For efficiently answering queries, an ordered query execution plan must be determined. For computing a total order relation on query atoms with respect to a given set of data descriptions (assertions in an ABox), we need information about the number of instances of concept and role names. An estimate for this information can be computed in a preprocessing Proceedings of DL 2006 153 step by considering given data descriptions, or could be obtained by examining the result set of previously answered queries (we assume that ABox realization is too costly, so this alternative is ruled out). 3.2 Indexing by Exploiting Told and Taxonomical Information In many practical applications that we encountered, data descriptions often directly indicate of which concept an individual is an instance. Therefore, in a preprocessing step it is useful to compute an index that maps concept names to sets of individuals which are their instances. In a practical implementation this index might be realized with some form of hashtable. Classifying the TBox yields the set of ancestors for each concept name, and if an individual i is an instance of a concept name A due to explicit data descriptions, it is also an instance of the ancestors of A. The index is organized in such a way that retrieving the instances of a concept A or one of its ancestors requires (almost) constant time. The index is particularly useful to provide bindings for variables if, despite all optimization attemps for deriving query execution plans, concept names must be used as generators. In addition, the index is used to estimate the cardinality of concept extensions. The estimates are used to compute an order relation for query atoms. The smaller the cardinality of a concept or a set of role fillers is assumed to be, the more priority is given to the query atom. Optimizing query Q9 using told information yields the following query execution plan. Q9′ : ans(x, y, z) ← F aculty(y), teacherOf (y, z), Course(z), advisor−1 (y, x), Student(x), takesCourse(x, z) Using this kind of rewriting, queries can be answered much more efficiently. If the TBox contains only role inclusion axioms and GCIs of the form A ⊑ A1 ⊓. . .⊓An , i.e., if the TBox forms a hierachy, the index-based retrieval discussed in this section is complete (see [1]). However, this is not the case for LUBM. In LUBM, besides domain and range . restrictions, axioms are also of the form A = A1 ⊓ A2 ⊓ . . . ⊓ Ak ⊓ ∃R1 .B1 ⊓ . . . ⊓ ∃Rm .Bm (actually, m = 1). If sufficient conditions with exists restrictions are specified as in the case of Chair, optimization is much more complex. In LUBM data descriptions, no individual is explicitly declared as a Chair and, therefore, reasoning is required, which is known to be rather costly. If Chair is used as a generator and not as a tester such as in the simple query ans(x) ← Chair(x), optimization is even more important. 3.3 Obvious Non-Instances: Exploiting Information from One Completion The detection of “obvious” non-instances of a given concept C can be optimized by using a model merging operator defined for so-called individual pseudo models (aka pmodels) as specified in [5]. The central idea is to compute a pmodel from a completion that is derived by the tableau prover. Note that it is important that all restrictions for a certain individual are “reflected” in the pmodel. The idea of model merging is that there is a simple sound but incomplete test for showing that adding the assertion i : ¬C to the ABox will not lead to a clash (see [5] for details) and, hence, i is not an instance of C. Note that, usually, the complete set of data structures for a particular completion is not maintained by a reasoner. The pmodels provide for an excerpt of a completion needed to determine non-instances. 3.4 Obvious Instances: Exploiting Information from the Precompletion A central optimization technique to ensure scalability as it is required for LUBM is to also find “obvious” instances with minimum effort. Given an initial ABox consistency test one can consider all deterministic restrictions, i.e., consider only those tableau structures (from now on called constraints) for which there are no previous choice points in the tableau proof (in other words, consider only those constraints that do not have dependency information 154 Regular Papers attached). These constraints, which are computed during the tableau proof, describe a socalled precompletion.1 Note that in a precompletion, no restrictions are violated. Given the precompletion constraints, for each individual an approximation of the mostspecific concept (MSC’) of an individual i is computed as follows. For all constraints representing role assertions of the form (i, j) : R (or (j, i) : R) add constraints of the form i : ∃R.⊤ (or i : ∃R−1 .⊤). Afterwards, constraints for a certain individual i are collected into a set {i : C1 , . . . , i : Cn }. Then, M SC ′ (i) := C1 ⊓ . . . ⊓ Cn . Now, if M SC ′ (i) is subsumed by the query concept C, then i must be an instance of C. In the case of LUBM many of the assertions lead to deterministic constraints in the tableau proof which, in turn, results in the fact that for many instances of a query concept C (e.g., F aculty as in query Q9) the instance problem is decided with a subsumption test based on the MSC’ of each individual. Subsumption tests are known to be fast due to caching and model merging. The more precisely MSC’(i) approximates MSC(i), the more often an individual can be determined to be an obvious instance of a query concept. Obviously, it might be possible to determine obvious instances by directly considering the precompletion data structures. However, these are technical details. The main point is that, due to our findings, the crude approximation described above suffices to detect all “obvious” instances in LUBM. If query atoms are used as testers, in LUBM it is the case that in a large number of cases the test for obvious non-instances or the test for obvious instances determines the result. However, for some individuals i and query concepts C both tests do not determine whether i is an instance of C (e.g., this is the case for Chair). Since both tests are incomplete, for some individuals i a refutational ABox consistency test resulting from adding the claim i : ¬C must be decided with a sound and complete tableau prover. For some concepts C, the set of remaining instances i for which the “expensive” ABox instance test must be used is quite large, or, considering C as a generator, the set of candidates is quite large. In any case, considering the volume of assertions in LUBM (see below for details), it is easy to see that the refutational ABox consistency test must not start from the initial, unprocessed ABox in order to ensure scalability. For large ABoxes and many repetitive instance tests it is mandatory not to “expand” the very same initial constraints over and over again. Therefore, the precompletion resulting from the initial ABox consistency test is used as a starting point for refutational instance tests. The tableau prover keeps the precompletion in memory. All deterministic constraints are expanded, so if some constraint is added, only a limited amount of work is to be done. Tableau provers are fast w.r.t. backtracking, blocking, caching and the like. But not fast enough if applied in a naive way. If a constraint i : ¬C is added to a precompletion, the tableau prover must be able to very effectively determine related constraints for i that already have been processed. Rather than using linear search through lists of constraints, index structures are required. 3.5 Index Structures for Optimizing Tableau Provers First of all, it is relatively easy to classify various types of constraints (for exists restrictions, value restrictions, atomic restrictions, negated atomic restrictions, etc.) and access them effectively according to their type. We call the corresponding data structure an active record of constraint sets (one set for each kind of constraint). For implementing a tableau prover, the question for an appropriate set data structure arises. Since ABoxes are not models, (dependency-directed) backtracking cannot be avoided in general. In this case, indexing the set of “relevant” constraints in order to provide algorithms for checking if an item is an element of a set or list (element problem) is all but easy. Indexing requires hashtables (or trees), but 1 Cardinality measures for concept names, required for determining optimized query execution plans, could be made more precise if cardinality information is computed by considering a precompletion. However, in the case of LUBM this did not result in better query execution plans. Proceedings of DL 2006 155 backtracking requires either frequent copying of index structures (i.e., hashtables) or frequent inserting and deleting items from hashtables. Both operations are known to be costly. Practical experiments with LUBM and many other knowledge bases indicate that the following approach is advantageous in the average case. For frequent updates of the search space structures during a tableau proof, we found that simple lists for different kinds of constraints are most efficient, thus we have an active record of lists of constraints. New constraints are added to the head of the corresponding list, a very fast operation. During backtracking, the head is chopped off with minimum effort. The list representation is used if there are few constraints, and the element problem can be decided efficiently. However, if these lists of constraints get large, performance decreases due to linear search. Therefore, if some list from the active record of constraints gets longer than a certain threshold, the record is restructured and the list elements are entered into an appropriate index structure (hashtables with individuals as keys). Afterwards the tableau prover continues with a new record of empty lists as the active record. The pair of previous record of lists and associated hashtable is called a generation. From now on, new constraints are added to the new active record of constraints and the list(s) of the first generation are no longer used. For the element problem the lists from the active record are examined first (linear search over small lists) and then, in addition, the hashtable from the first generation is searched (almost linear search). If a list from the active record gets too large again, a new generation is created. Thus, in general we have a sequence of such generations, which are then considered for the element test in the obvious way. If backtracking occurs, the lists of the appropriate generation are installed again as the active record of lists. This way of dealing with the current search state allows for a functional implementation style of the tableau prover which we prefer for debugging purposes. However, one might also use a destructive way to manage constraints during backtracking. Obviously, all (deterministic) constraints from the initial Abox can be stored in a hashtable. In any case, the main point here is that tableau provers need an individual-based index to efficiently find all constraints an individual is involved in. In the evaluation of other optimization techniques (see below) we presuppose that a tableau prover is equipped with this technology. 3.6 Transforming Sufficient Conditions into Conjunctive Queries Up to now we have discussed the optimization of concept atoms used as testers in the query execution plan. If concepts are used as generators, indeed a retrieval problem rather than only an instance test problem has to be solved. Using the results in [5] it is possible to linearly iterate over all individuals, check for obvious non-instances and obvious instances, and then, for the set of remaining candidates dependency-directed instance retrieval and binary partitioning can be used (see [5]). Our findings suggest that in the case of LUBM, for example for the concept Chair, the remaining tableau proofs are very fast. Nevertheless it is the case that the whole procedure is based on a linear iteration over all individuals. In application scenarios such as those we investigate with LUBM we have 200,000 individuals and more, and even if each single test lasts only a few dozen microseconds, query answering will be too slow, and hence additional techniques must be applied to solve the scalability problem. The central insight for another optimization technique is that conjunctive queries can be optimized according to the above-mentioned arguments whereas for concept-based retrieval queries, optimization is much harder to achieve. Let us consider the query ans(x) ← Chair(x). For Chair, sufficient conditions are given as part of the TBox (see above). Thus, in principle, we are looking for instances of the concept P erson ⊓ ∃headOf.Department. The key to optimizing query answering becomes apparent if we transform the definition of Chair into a conjunctive query and derive the optimized version Q15′ Q15 : ans(x) ← P erson(x), headOf (x, y), Department(y) Q15′ : ans(x) ← Department(y), headOf −1 (y, x), P erson(x) 156 Regular Papers Univs 1 3 5 10 Inds 17174 55664 102368 207426 Concept Assertions 53738 181324 336256 685569 Role Assertions 49336 166682 309393 630753 Table 1: Linearly increasing number of individuals, concept assertions and role assertions for different numbers of universities. Because there exist fewer Departments than P ersons in LUBM, search for bindings for x is substantially more focused in Q15′ (which is the result of automatic query optimization, see above). In addition, in LUBM, the extension of Department can be determined with simple index-based tests only (only hierarchies are involved). With the Chair example one can easily see that the standard approach for instance retrieval can be optimized dramatically if query atoms are rewritten as indicated in the above example. If there is no specific definition or there are meta constraints, rewriting is not applied. It is easy to see that the rewriting approach is sound. However, it is complete only under specific . conditions, which can be automatically detected. If we consider the Tbox T = {D = ∃R.C}, the Abox A = {i : ∃R.C} and the query ans(x) ← D(x), then, due to the algorithm presented above, the query will be rewritten as ans(x) ← R(x, y), C(y). For variable bindings, the query language nRQL (see above) considers only those individuals that are explicitly mentioned in the Abox. Hence, i will not be part of the result set because there is no binding for y in the Abox A. Examining the LUBM Tbox and Abox it becomes clear that in this case for every i : ∃R.C appearing in a tableau proof there already exist constraints (i, j) : R and j : C in the original Abox. However, even if this is not the case, the technique can be employed under some circumstances. Usually, in order to construct a model (or a completion to be more precise), tableau provers create a new individual for each constraint of the form i : ∃R.C and add corresponding concept and role assertions. These newly created individuals are called anonymous individuals. Let us assume, during the initial Abox consistency test a completion is found. As we have discussed above, a precompletion is computed by removing all constraints that depend on a choice point. If there is no such constraint, the precompletion is identical to the completion that the tableau prover computed. Then, the set of bindings for variables is extended to the anonymous individuals found in the precompletion. The rewriting technique for concept query atoms is applicable (i.e., is complete) under these conditions. Even if the rewriting technique is not complete (i.e., s.th. is removed from the completion to derive the precompletion), it can be employed to reduce the set of candidates for binary partitioning techniques (c.f., [5]) that can speed of this process considerably in the average case. The transformation approach discussed in this section is reminiscent to an early transformation approach discussed in [7]. In fact, ideas from translational approaches from DLs to disjunctive datalog [6] can also be integrated in tableau-based approaches. In the following section, we will evaluate how the optimization techniques introduced up to now provide a contribution to the data description scalability problem. 4 Evaluation and Conclusion The significance of the optimization techniques introduced in this contribution is analyzed with the system RacerPro 1.9. RacerPro is freely available for research and educational purposes (http://www.racer-systems.com). The runtimes we present in this section are used to demonstrate the order of magnitude of time resources that are required for solving inference problems. They allow us to analyze the impact of proposed optimization techniques. 157 Proceedings of DL 2006 RacerPro Performance 1800 Consistency Index Load Prepare 1600 1400 Seconds 1200 1000 800 600 400 200 0 1 2 3 4 5 6 No. of Universities 7 8 9 10 Figure 1: Runtimes for loading, preparation, abox consistency checking and indexing. RacerPro Performance 12 Mode A Mode B Mode C 10 Seconds 8 6 4 2 0 1 2 3 4 5 6 No. of Universities 7 8 9 10 Figure 2: Runtimes of 14 LUBM queries with different optimization settings (see text). An overview about the size of the LUBM benchmarks is given in Table 1. The runtimes for loading the data descriptions, transforming them into abstract syntax trees (preparation), and indexing are shown in Figure 1 (AMD 64bit processor, 4GB, Linux OS). It is important to note that the curves are roughly linear, thus, no reasoning is included in these phases. In 158 Regular Papers Figure 1, the runtimes for checking ABox consistency and precompletion data structures (see above) are indicated (the shape, which appears to be quadratic, reveals that this phase are subject to further optimizations). In Figure 2, average query-answering times for running all 14 LUBM queries on data descriptions for an increasing number of universities are presented (see Table 1 for an overview on the number of individuals, concept assertions, and role assertions). In mode A and B, concept definitions are not rewritten into conjunctive queries (see Section 3.6). In mode A, full constraint reasoning on datatypes is provided. However, this is not required for LUBM. Therefore, in mode B, told value retrieval is performed only. As Figure 2 shows, this is much more efficient. Mode C in Figure 2 presents the runtimes achieved when definitions of concept names are rewritten to conjunctive queries (and told value reasoning on datatypes is enabled). Mode C indicates that scalability for instance retrieval can be achieved with tableau-based retrieval engines. Note that we argue that the concept rewriting technique is advantageous not only for RacerPro but also for other tableau-based systems. Future work will investigate optimizations of large Aboxes and more expressive Tboxes. Our work is based on the thesis that for investigating optimization techniques for Abox retrieval w.r.t. more expressive Tboxes, we first have to ensure scalability for Aboxes and Tboxes such as those that we discussed in this paper. We have shown that the results are encouraging. References [1] S. Bechhofer, I. Horrocks, and D. Turi. The OWL instance store: System description. In Proceedings CADE-20, LNCS. Springer Verlag, 2005. [2] D. Calvanese, G. De Giacomo, D. Lembo, M. Lenzerini, and R. Rosati. Data complexity of query answering in description logics. In Proc. of the 2005 Description Logic Workshop (DL 2005). CEUR Electronic Workshop Proceedings, http://ceur-ws.org/, 2005. [3] Y. Guo, J. Heflin, and Z. Pan. Benchmarking DAML+OIL repositories. In Proc. of the Second Int. Semantic Web Conf. (ISWC 2003), number 2870 in LNCS, pages 613–627. Springer Verlag, 2003. [4] Y. Guo, Z. Pan, and J. Heflin. An evaluation of knowledge base systems for large OWL datasets. In Proc. of the Third Int. Semantic Web Conf. (ISWC 2004), LNCS. Springer Verlag, 2004. [5] V. Haarslev and R. Möller. Optimization techniques for retrieving resources described in OWL/RDF documents: First results. In Ninth International Conference on the Principles of Knowledge Representation and Reasoning, KR 2004, Whistler, BC, Canada, June 2-5, pages 163–173, 2004. [6] B. Motik. Reasoning in Description Logics using Resolution and Deductive Databases. PhD thesis, Univ. Karlsruhe, 2006. [7] B. Motik, R. Volz, and A. Maedche. Optimizing query answering in description logics using disjunctive deductive databases. In Proceedings of the 10th International Workshop on Knowledge Representation Meets Databases (KRDB-2003), pages 39–50, 2003. [8] M. Wessel and R. Möller. A high performance semantic web query answering engine. In Proc. of the 2005 Description Logic Workshop (DL 2005). CEUR Electronic Workshop Proceedings, http://ceur-ws.org/, 2005. [9] Z. Zhang. Ontology query languages for the semantic web: A performance evaluation. Master’s thesis, University of Georgia, 2005. 159 Proceedings of DL 2006 High Performance Absorption Algorithms for Terminological Reasoning Ming Zuo and Volker Haarslev Concordia University, Montreal, Quebec, Canada {ming zuo|haarslev}@cse.concordia.ca Abstract When reasoning with description logic (DL) knowledge bases (KBs), performance is of critical concern in real applications, especially when these KBs contain a large number of axioms. To improve the performance, axiom absorption has been proven to be one of the most effective optimization techniques. The well-known algorithms for axiom absorption, however, still heavily depend on the order and the format of the axioms occurring in KBs. In addition, in many cases, there exist some restrictions in these algorithms which prevent axioms from being absorbed. The design of absorption algorithms for optimal reasoning is still an open problem. In this paper, we propose some new algorithms to absorb axioms in a KB to improve the reasoning performance. The experimental tests we conducted are mostly based on synthetic benchmarks derived from common cases found in real KBs. The experimental evaluation demonstrates a significant runtime improvement. 1 Motivation When reasoning with description logic (DL) knowledge bases (KBs) which contain a large number of axioms, performance is the key concern in real application. To improve the reasoning performance, many optimization algorithms and techniques are employed in most of the modern reasoners such as RACER and FaCT++. Among the optimization algorithms, lazy unfolding is proven to be one of the most effective techniques [7]. Unfortunately, lazy unfolding does not work well for KBs containing a significant number of nonabsorbable GCIs (General Concept Inclusions). A GCI is called nonabsorbable if it cannot be rewritten into a rule axiom. We use the term rule axiom to represent axioms of the form of A ⇒ C where A ∈ N C and C is an arbitrary concept, while the form C ⊑ D represents a GCI where C and D are arbitrary concepts. The difference between A ⇒ C and A ⊑ C is that A ⇒ C represents only “if A then 160 Regular Papers C”, while A ⊑ C represents both “if A then C” and “if ¬C then ¬A” during reasoning. To convert a GCI into rule axiom(s), a technique called absorption is employed. Although preliminary absorption algorithms have been discussed in [6], there is little concern about the “best” absorption for optimal reasoning. The known algorithms also still heavily depend on the order and the format of axioms found in the KB of interest. In addition, in many cases, some restrictions in these algorithms prevent axioms from being absorbed [3]. 2 Tableau Algorithm and Lazy Unfolding Reasoning about a DL based KB is usually reduced to concept reasoning w.r.t. a TBox. For such kind of reasoning, a sound and complete tableau reasoning algorithm is usually employed. The basic idea behind a tableau algorithm is to take an input concept C w.r.t. a TBox T , and try to prove the satisfiability of C w.r.t. T by constructing a model I of C w.r.t. T . This is done by syntactically decomposing C so as to derive constraints on the structure of such a model. For example, any model of C must, by definition, contain some individual x such that x is an element of C I , and if C is of the form ∃R.D, then the model must also contain an individual y such that hx, yi ∈ RI and y is an element of DI ; if D is non-atomic, then continuing with the decomposition of D would lead to additional constraints. The construction fails if the constraints include an obvious contradiction, e.g., if some individual z must be an element of both C and ¬C for some concept C [2, 5]. The decomposition and construction are usually carried out by applying socalled tableau expansion rules as described in [2]. During the tableau expansion, disjunctions are added to the label of each node of the tableaux for each GCI (one disjunction is added for axioms of the form C1 ⊑ C2 ; two disjunctions are added for axioms of the form C1 ≡ C2 [5]). This leads to an exponential increase in the search space as the number of nodes and axioms increases [4]. An intuitive optimization technique is lazy unfolding — it only unfolds concepts if required during the expansion process [1]. It has been described by the additional tableau rules in [5]. Lazy unfolding cannot be applied to an arbitrary axiom in a TBox due to the atomic concept restriction on the left-hand side of the axiom. However, we can still divide an arbitrary TBox T into two parts: the unfoldable part Tu , to which we can apply lazy unfolding directly, and the general part Tg , in which we have to perform reasoning by general tableau expansion [5]. Therefore, there is an intuitive optimization technique to be considered: converting general axioms from Tg to Tu while keeping the semantics of TBox unchanged. This is the original idea of an “absorption”. Proceedings of DL 2006 3 161 Standard Absorption Let us first consider an absorption example. Suppose we have two TBoxes T and T ′ . T = Tu ∪ Tg and Tu = ∅; Tg = {A ⊑ C; ¬A ⊑ D}; ′ T ′ = Tu′ ∪ Tg′ and Tu′ = {A ⇒ C; ¬A ⇒ D}; Tg = ∅. An obvious question is whether T ′ ≡ T ? According to the definition of a correct absorption proposed in [6], T ′ is a correct absorption of T . Unfortunately, T ′ 6= T since T ′ |= T does not hold. To evaluate the correctness of an absorption, we introduce the notion of a valid absorption. Definition 3.1 (valid absorption) Let T be a TBox, and T ′ be an absorption of T . If T ′ |= T and T |= T ′ , then T ′ is called a valid absorption of T . Based on the above definitions, the following absorptions are all valid absorptions, provided that A is an atomic concept and C, D and E are arbitrary concepts, and T is an acyclic TBox [2]. Proposition 3.1 Let T = Tu ∪ Tg , Tu = ∅ and Tg = {A ⊑ D}, A ∈ N C, and T ′ = Tu′ ∪ Tg′ ; Tu′ = {A ⇒ D} and Tg′ = ∅. Then T ′ is a valid absorption of T . Proposition 3.2 Let T = Tu ∪ Tg , Tu = ∅ and Tg = {A ≡ D}, A ∈ N C, and T ′ = Tu′ ∪ Tg′ , Tu′ = {A ⇒ D; ¬A ⇒ ¬D} and Tg′ = ∅. Then T ′ is a valid absorption of T . Proposition 3.3 Let T = Tu ∪ Tg . (1) If T ′ is an arbitrary TBox, then (Tu , Tg ∪ T ′ ) is a valid absorption of T ∪ T ′. (2) If T ′ is a TBox that consists entirely of axioms in the form of A ⊑ D, where A ∈ N C and neither A nor ¬A occur on the left-hand side in Tu , then (Tu ∪ {A ⇒ D}, Tg ) is a valid absorption of T ∪ T ′ . A question rises from Proposition 3.3 whether it is possible to absorb an axiom into Tu if either A or ¬A occur on the left-hand side of Tu . Lemma 3.1 Let (Tu , Tg ) be a valid absorption of a TBox T . If T ′ is a TBox that consists entirely of axioms in the form of A ⊑ D, where A ∈ N C and A already has a rule definition in Tu , say A ⇒ C, if ¬A does not appear on the left-hand side of Tu , then (Tu ∪ {A ⇒ (D ⊓ C)}, Tg ) is a valid absorption of T ∪ T ′ . Lemma 3.2 Let (Tu , Tg ) be a valid absorption of a TBox T . If T ′ is a TBox that consists entirely of axioms of the form A ⊑ D, where A ∈ N C and ¬A already has a rule definition in Tu , say ¬A ⇒ C, if A does not appear on the left-hand side of Tu , then (Tu ∪ {A ⇒ D}, Tg ∪ {⊤ ⊑ C ⊔ D}) is a valid absorption of T ∪ T ′. Lemma 3.3 Let (Tu , Tg ) be a valid absorption of a TBox T , if T ′ is a TBox that consists entirely of axioms of the form A ⊑ E, where A ∈ N C. If both A 162 Regular Papers and ¬A have a rule definition in Tu , say A ⇒ C and ¬A ⇒ D, then (Tu ∪ {A ⇒ (C ⊓ E)}, Tg ∪ {⊤ ⊑ D ⊔ E}) is a valid absorption of T ∪ T ′ . The above mentioned propositions and lemmas also hold for a cyclic TBox as long as no right-hand side concept in Tu directly uses [2] an atomic concept (regardless of a negation sign) occurring in the left-hand side of the same axiom. 4 Heuristic Absorption Experimental experience suggests that reasoning efficiency is improved by either reducing the number of axioms in Tg or reducing the number of axioms in Tu . Thus, we propose the “best” absorption is the one which can absorb a maximal number of axioms from Tg and keep only a minimal number of axioms in Tu . A first possible way of reducing axioms in Tg and Tu is to convert a primitive definition into a complete definition, i.e., selecting a concept definition instead of a concept inclusion by checking all axioms in the specified TBox. This can be achieved as follows. Given an arbitrary TBox T . Suppose A is an atomic concept. 1. Simplify [8] and normalize T . After normalization, Tu = ∅ and Tg contains a set of axioms in the form ⊤ ⊑ C ⊔ D where C and D are either atomic concepts or role concepts. Then each axiom in Tg can be expressed as a set. For example, the set G = {C, D} represents the axiom in the form ⊤ ⊑ C ⊔ D. As a consequence, ¬G represents a set containing the concept ¬C ⊓ ¬D. Therefore, each axiom in Tg only contains A or ¬A or none of them. We also need a function con which returns for a given set G its represented concept, e.g., if G = {C, D}, then con(G) returns C ⊔ D. 2. Initialize two sets Tg1 , Tg2 to be empty and consider A the chosen (fixed) atomic concept. 3. For any set G, if A ∈ G, then remove G from Tg and add an item ¬(G\{A}) to Tg1 ; if ¬A ∈ G, then remove G from Tg and add an item G\{¬A} to Tg2 ; otherwise, keep G in Tg . 4. For each item G2 in Tg2 , if G2 also appears in Tg1 , (a) remove G2 from both Tg1 and Tg2 ; (b) add the axiom {A ⇒ con(G2 )} and {¬A ⇒ con(¬G2 )} to Tu . 5. For each item set G′1 left in Tg1 , create a new set ¬G′1 ∪ {A} and put it back into Tg ; for each item set G′2 in Tg2 , create a new set G′2 ∪ {¬A} and put it back into Tg . Proceedings of DL 2006 163 The above algorithm can be further improved in step (4) by checking more than one item set in G2 . For more general KBs, the following heuristic absorption procedure could be applied. Given an arbitrary TBox T = Tu ∪ Tg . Tu contains a set of axioms of the form C ≡ D or C ⇒ D. Tg contains a set of axioms of the form ⊤ ⊑ C. 1. Simplify and normalize T as described above. 2. Suppose cp is the total number of appearance of A in Tg ; and cn is the total number of appearance of ¬A in Tg . Among all cp s and cn s, select the greatest value and absorb the accordingly atomic concept to Tu . 3. Repeat step (2) until no concept can be absorbed anymore. In fact, the above mentioned two algorithms can be combined to achieve a better performance. 5 Experimental Results To check the effectiveness of the newly developed algorithms, we compare them with the ones currently employed by RACER. Firstly, we developed a customized RACER version by disabling its absorption module. After that, we developed a new external absorption module (as a stand-alone program) by implementing the algorithms described above. Each of our test KBs is processed by the external absorption module. Its output is used as input to the customized RACER version. We also process each original test KB with the standard RACER version. In our graphs we compare for each test KB the TBox classification time of the customized RACER version (denoted as “enhanced”) with the standard version of RACER (denoted as “normal”). 5.1 Primitive Definition to Complete Definition Suppose A, B, C, D are all atomic concepts in the following example: TBox T = Tu ∪ Tg ; Tu = {A ⇒ B; C ⇒ B; B ⇒ A ⊔ C} and Tg = {⊤ ⊑ A ⊔ C ⊔ ∃R.D} After normalization and simplification, the above TBox can be easily absorbed into the following TBox T ′ by heuristically creating these concept definitions: Tu′ = {B ≡ (A ⊔ C); ¬A ⇒ C ⊔ ∃R.D} Tg′ = ∅ The classification times for a KB where we replicated this pattern of axiom pairs are shown in the left graph in Figure 1. From the graph one can see that the CPU time for reasoning with the algorithms currently employed by RACER is exponential. However, the performance based on the newly developed absorption algorithm is roughly linear. 164 Regular Papers 100 100 CPU Time 1000 CPU Time 1000 10 1 10 1 0.1 Normal Enhanced Normal 20 40 60 Axiom pairs 80 Enhanced 0.1 0.01 100 20 30 40 50 60 70 80 Axiom pairs Figure 1: Classification times (seconds) for pattern “primitive to complete definition” (left graph) and for pattern “enhanced absorption” (right graph). 5.2 Enhanced Absorption Algorithm Based on Lemma 3.2 and 3.3, we were able to develop an absorption algorithm by allowing both positive or negative atomic concepts to occur on the left-hand side of Tu . Consider the following example (A, B ∈ N C): T = Tu ∪ Tg ; Tu = {A ⊑ B}; Tg = {⊤ ⊑ A ⊔ ∃R.K} By applying Lemma 3.3, we are able to completely absorb it as the following: Tu = {A ⇒ B; ¬A ⇒ ∃R.K; ¬B ⇒ ∃R.K}; Tg = ∅ The test result is shown in the right graph in Figure 1. They show that the new absorption algorithm is much more effective than the classical absorption algorithm due to the elimination of absorption restrictions. 5.3 Heuristic Absorption Suppose we have the following TBox T which consists of the following general axioms: {¬A⊔B; ¬C ⊔¬D⊔∃R1 .C1 ⊔∃R2 .C2 ; ¬D⊔K; ¬M ⊔N ; C ⊔D⊔∃R1 .C1 ⊔M ⊔A} To absorb T , we follow the procedure described in Section 4: Step 1: List the statistics of Tg for each atomic concept. The result is as follows. (The format is A(cp , cn ), where cp gives the number of positive (unnegated) occurrences and cn the number of negative (negated) occurrences, and we ignore the atomic concepts occurring in the qualifications of existential and universal restrictions.) A(0,1); B(1,0);C(1,1);D(1,2);M(1,1); N(1,0); K(1,0);C2 (0, 0); C1 (0, 0) We divide the atomic concepts into two groups by selecting the concepts where one of cp or cn values is zero and discarding the concepts that have both cp and cn values equal to zero. We obtain the following: 165 Proceedings of DL 2006 1000 CPU Time 100 10 1 Normal Enhanced 0.1 20 30 40 50 60 70 80 Axiom pairs Figure 2: Classification times (seconds) for pattern “heuristic absorption”. Group 1: B(1,0); N(1,0); K(1,0) Group 2: A(1,1); C(1,1);D(1,2);M(1,1) Step 2: We give the concepts in the first group a higher priority. Then, the concepts B, N, K have the same priority. Suppose we absorb B first. We have Tu and Tg as the following: Tu : {¬B ⇒ ¬A} Tg : {¬C ⊔ ¬D ⊔ ∃R1 .C1 ⊔ R2 .C2 ; ¬D ⊔ K; ¬M ⊔ N ; C ⊔ D ⊔ ∃R1 .C1 ⊔ M ⊔ A } Statistics group: Group 1: A(1,0); N(1,0); K(1,0) Group 2: C(1,1);D(1,2);M(1,1) We repeat step 1 and step 2 until Tg is empty. At the end, Tu contains the following axioms: ¬B ⇒ ¬A ¬A ⇒ C ⊔ D ⊔ ∃R1 .C1 ⊔ M D ⇒ K ⊓ (¬C ⊔ ∃R1 .C1 ⊔ R2 .C2 ) M ⇒N and Tg = ∅ The test results using the above absorption scheme are shown in Figure 2. The improvement of the heuristic absorption algorithm is significant compared with the one currently employed by RACER. 6 Conclusion We proposed criteria for the “best” absorption based on experimental experience. Then, we introduced novel heuristic absorption algorithms. We have demonstrated how these algorithms are working, and how they affect the reasoning performance. In addition, we have shown that some restrictions applied in the absorption algorithms of RACER could be eliminated. Therefore, the 166 Regular Papers absorption algorithms can be effectively applied to more general axioms. We have also implemented the heuristic algorithm by incorporating the optimizations known from the RACER reasoner. We have illustrated their effectiveness by analyzing the reasoning performance of RACER when classifying benchmark KBs. The analysis shows that, not only are the new techniques highly effective, but also the reasoning performance is not significantly affected by the order and format of the axioms occurring in a KB. References [1] F. Baader, E. Franconi, B. Hollunder, B. Nebel, and H. Profitlich. An empirical analysis of optimization techniques for terminological representation systems. In Proc. of the 3rd Int. Conf. on the Principles of Knowledge Representation and Reasoning (KR92), pages 270–281, 1992. [2] F. Baader and W. Nutt. Basic description logics. In F. Baader, D. Calvanese, D.L. McGuinness, D. Nardi, and P.F. Patel-Schneider, editors, The Description Logic Handbook: Theory, implementation, and applications, pages 47– 100. 2003. [3] V. Haarslev and R. Möller. High performance reasoning with very large knowledge bases. In Proceedings of Seventeenth International Joint Conference on Artificial Intelligence, pages 161–166, 2001. [4] I. Horrocks. Optimising Tableaux Decision Procedures for Description Logics. PhD thesis, University of Manchester, 1997. [5] I. Horrocks. Implementation and optimisation techniques. In F. Baader, D. Calvanese, D.L. McGuinness, D. Nardi, and P.F. Patel-Schneider, editors, The Description Logic Handbook: Theory, implementation, and applications, pages 313–355. 2003. [6] I. Horrocks and S. Tobies. Optimisation of terminological reasoning. In Proc. of the 2000 Description Logic Workshop, pages 183–192, 2000. [7] I. Horrocks and S. Tobies. Reasoning with axioms: Theory and practice. In Proceedings of the Seventh International Conference on Principles of Knowledge Representation and Reasoning, pages 285–296, 2000. [8] F. Massacci. Simplification: A general constraint propagation technique for propositional and modal tableaux. In Proceedings of the International Conference on Automated Reasoning with Analytic Tableaux and Related Methods, pages 217–231, 1998. 167 Proceedings of DL 2006 Automated Benchmarking of Description Logic Reasoners Tom Gardiner, Ian Horrocks, Dmitry Tsarkov University of Manchester Manchester, UK {gardiner|horrocks|tsarkov}@cs.man.ac.uk May 12, 2006 1 Introduction Reasoning for expressive DLs implemented in state-of-the-art systems has high worst case complexity. The hope/claim is, however, that these systems perform well in “realistic” applications. In practice, this means in ontology applications. To check the validity of this claim it is necessary to test the performance of these systems with (the widest possible range of) ontologies derived from applications. In addition, testing is useful in order to check the correctness of implementations. In small examples, it may be easy to check the correctness of a system’s reasoning. However, for typical real-world examples, manual checking is not feasible. In these instances, the best (perhaps the only) way to check correctness is often by checking for consistency with the reasoning of other existing systems. Real-world ontologies vary considerably in their size and expressivity. While they are all valuable test cases, it is still important to understand each ontology’s properties in order to provide efficient and relevant testing. System developers find this particularly useful, as it helps them to identify weaknesses in their systems and to devise and test new optimisations. Finally, testing is also useful for the developers and users of applications as they can use benchmarking results to determine if (the performance of) a DL reasoner is likely to satisfy their requirements, and if so which reasoner is likely to perform best in their application. 2 Background and Related Work For the above mentioned reasons, there is extensive existing work on benchmarking DL (as well as modal logic) reasoners. E.g., TANCS comparisons 1 168 Regular Papers and benchmark suites [10], DL comparisons and benchmark suite [1], work on M-SPASS [8], work on FaCT and DLP [7, 6], the OWL benchmark suite and test results, and various test results from papers describing systems such as FaCT++ [13], Pellet (http://www.mindswap.org/2003/pellet/), Racer [5], KAON2 (http://kaon2.semanticweb.org/), Vampire [12], etc. Due to the fact that relatively few (large and/or interesting) ontologies were available, earlier tests often used artificially generated test data. The Lehigh University Benchmark [4], for example, used a synthetic ontology and randomly generated data to test the capabilities of knowledge base systems using specific weightings to compare systems on characteristics of interest. Results from such tests are, however, of doubtful relevance when gauging performance on ontologies. The popularity of OWL has meant that many more ontologies are now available, and recent benchmarking work has focused on testing performance with such ontologies. One such example [11] involved benchmarking a number of reasoners against a broad range of realistic ontologies. However, not all reasoners used in that comparison supports OWL as an input language, so quantitative comparison of performance would have been difficult/un-justified. From the other hand, the DIG interface [2] is recognised as a preferred choice by application developers and thus is implemented into a wide range of DL Reasoners. Our work builds on these earlier efforts, taking advantage of the DIG standard to provide a generic benchmarking suite that allows the automatic quantitative testing and comparison of DL Reasoners on real-world examples with relevant properties. We aim to make the testing process as autonomous as possible, taking care, for example, of (re)starting and stopping reasoners as necessary, and the analysis of results be as flexible as possible, by allowing for arbitrary SQL queries against the collected data. We also aim to provide, as a publicly available resource, a library of test ontologies where each ontology has been checked for expressivity and syntactic conformance, translated into DIG syntax (which is much easier to work with that OWL’s RDF/XML syntax), and includes (where possible) results (such as the concept hierarchy) that can be used for testing the correctness of reasoning systems. 3 Methodology The system has two main functions. The first is to process ontologies and add them to the library, and the second is to benchmark one or more reasoners using the ontology library. When processing ontologies, the system takes as input a list of OWL-ontology URI’s. Before they can be used in testing, some preprocessing of these ontologies is required. The process involves generating valuable meta-data about each ontology, as well as converting each of the OWL-ontologies to DIG. Proceedings of DL 2006 169 The meta-data is generated by code written for SWOOP [9], and provides the details of the expressivity (i.e. the constructs present in the ontology) together with the number of classes, object properties, data properties, individuals, class axioms, property axioms and individual axioms present. This is invaluable information in helping to understand the meaning of any results obtained through testing, in finding, for example, strengths and weaknesses of particular systems. The OWL-to-DIG conversion uses the OWL-API (http: //sourceforge.net/projects/owlapi). This process is far from trivial as OWL’s RDF syntax is extremely complex, and it is easy to (inadvertently) cause ontologies to be outside of OWL DL, e.g., by simply forgetting to explicitly type every object. Moreover, the DIG interface supports only the most basic of data types, such as Strings and Integers. The result is that many of the available OWL Ontologies we found could not be successfully converted to DIG. Local copies are stored of both the OWL Ontology and the DIG version. This is not only for efficiency during the testing, but also to ensure consistency (as online ontologies rarely remain static). Moreover, this allows us to fix trivial errors in the OWL ontologies so that they can be used for testing purposes. The locations of these files, together with their properties/meta-data, are stored as database entries for easy access and manipulation. The main function of the benchmark suite itself is timing the classification of each ontology by each Reasoner. To promote fairness, each Reasoner is terminated and then restarted for every ontology. A problem with trying to compare different Reasoners is that they may perform tasks in different ways. For example, they may vary in the way in which they perform each part of the reasoning: some may take an “eager” approach, fully classifying the whole ontology and caching the results as soon as it is received; others may take a “lazy” approach, only performing reasoning tasks as required in order to answer queries. To try to get around this problem, we use a five step test, for each ontology, that forces every reasoners to fully classify that ontology. The steps are as follows: 1. TELL the reasoner the full ontology 2. ASK for all the concepts in the ontology 3. ASK for the satisfiability of the TOP concept 4. ASK for the satisfiability of all the concepts in the ontology 5. ASK for the ontology taxonomy (parents and children of all concepts) Each of these individual steps are timed, providing interesting information about when different reasoners do most their work. It is, however, the total time for this complete (classification) test that we are most interested in. Each test will end in one of three ways. It will either complete successfully, fail due to lack of time or fail for some other reasons. The latter may include failure due to lack of run-time memory, failure because the reasoner could not parse the ontology successfully, etc. The benchmark suite is fully automatic, dealing with most errors autonomously, 170 Regular Papers meaning that the testing can be left to run over-night or over a week-end (which may be necessary when using a large time-out). All data is recorded in a MySQL database, making it easy for the user to view and analyse the data in a variety of ways. As discussed in Section 1, in order to get a clearer indication of how DL Reasoners perform in the real world, we aim to build a large library of OWL ontologies from those that are publicly available. Currently, our library contains a little over 300 OWL-RDF Ontologies, but only 172 of these could successfully be converted to DIG. This has, however, provided us with a total of just under 72,000 classes and over 30,000 individuals in a DIG format. Only 18% of the ontologies were at least ALC, which suggests that the majority of real-world ontologies aren’t in fact very complex, but it also means we have a comfortable number of “interesting” examples too. 4 Testing Our system is currently fully automatic and runs the classification tests successfully through our whole library. It does not, however, at this stage verify the correctness of each Reasoner’s answers to the queries (from steps 2-5) and how they compare to the answers given by other Reasoners. This means that our measure of success is, for now, merely an indication that the Reasoner received and parsed the DIG successfully and returned a valid DIG response. This is generally a good indication, but should only be considered a preliminary result. We have performed some tests on our system, as it stands, and we provide here some examples of the kinds of information that our system can produce. FaCT++ v1.1.3, KAON2, Pellet v1.3 and RacerPro v1.8.1 are four of the most widely used OWL/DIG reasoners, and we therefore decided to use these to test the current capabilities of our system. The tests were performed using an Intel Pentium-M Processor 1.60 GHz and 1Gb of main memory on Windows XP. The time-out period was set to 10 minutes (in real time). Pellet and KAON2 are java applications, and for these tests were run with a maximum heap space of 200Mb. RacerPro and FaCT++ were left to run on their default settings. Our system does not try to optimise the performance of the Reasoners for particular ontologies, as we believe this is the job of the Reasoners themselves, not the application user. Table 1 shows how the individual Reasoners performed firstly on all our ontologies and then on Ontologies which have particular characteristics. Finally, it shows their performance on OWL-Lite ontologies, which includes all those with expressivity up to SHIF. In order to determine which were the most “challenging” ontologies (w.r.t. reasoning), we tried to order ontologies according to the difficulty of reasoning with them. To do this, we used all the ontologies that were successfully classified by at least two Reasoners and then ordered these by their average classification 171 Proceedings of DL 2006 Type All All All Nominals Nominals Nominals TransRoles TransRoles TransRoles Datatypes Datatypes Datatypes OWL-Lite OWL-Lite OWL-Lite Status FaCT++ KAON2 Pellet Success 138 45 152 Failed 29 124 18 TimedOut 5 3 2 Success 7 3 9 Failed 4 9 3 TimedOut 1 0 0 Success 15 9 18 Failed 4 11 3 TimedOut 3 2 1 Success 102 12 114 Failed 23 15 13 TimedOut 2 0 0 Success 33 31 33 Failed 5 6 5 TimedOut 2 3 2 RacerPro 110 62 0 7 5 0 13 9 0 75 52 0 34 6 0 Table 1: Sample of Overall Performance Figure 1: Comparison of Reasoners on the Top 10 Most Challenging Ontologies 172 Regular Papers Ontology 1 2 3 4 5 6 7 8 9 10 Expressivity nClass nIndiv DL-Lite 27652 0 SHF 3097 0 ALR+ 20526 0 SHF 2749 0 RDFS(DL) 1108 3635 RDFS(DL) 1514 0 ALCF(D) 87 0 SHIF 37 0 RDFS(DL) 4 1899 ALR+HI(D) 5 2744 URL http://...logy/nciOncology.owl http://...ibrary/not-galen.owl http://archive.godatabase.org/ http://...Ontologies/galen.owl http://...world-fact-book.daml http://...logy/data/center.owl http://...a/pizza/20041007.owl http://...s/DOLCE-Lite/397.owl http://...nt/AirportCodes.daml http://...ogicUnits/2003/09/hu Table 2: Properties of Top 10 Most Time-consuming Ontologies Reasoner Tells ConceptList SatOfTop SatOfClasses Hierarchy FaCT++ 23% 35% 11% 9% 21% KAON2 47% 45% 0% 3% 5% Pellet 70% 20% 1% 2% 6% RacerPro 58% 11% 4% 9% 19% Table 3: Average Division of Task Time time. Figure 1 shows the amount of time each Reasoner took to classify the 10 most challenging ontologies according to this measure (where negative time represents a failure to classify). Table 2 then shows some of the interesting information that is available on these “Top 10” Ontologies. This table is useful in helping us understand what makes these particular Ontologies so time-consuming to reason over. In the case of the NCI and Gene Ontology’s (1st and 3rd), it can be clearly seen that it is their shear size that provides the challenge. The 5th, 9th and 10th (world-fact-book, AirportCodes and Hydrolic Units) make up for their number of classes with an extensive array of individuals. Whereas Galen (2nd and 4th) simply uses some very complicated constructs and deep role hierarchy. Our final table, Table 3, shows the average proportion of each classification test that each Reasoner spent on the separate tasks. This shows, for example, that Pellet performs a lot of caching on receiving the Ontology (TELLS), while FaCT++ does relatively little until the first ASK query. 5 Discussion As we mentioned in the introduction, testing is useful for reasoner and tool developers as well as for users. Building on existing work, we have developed Proceedings of DL 2006 173 a system for testing reasoners with available ontologies. The benefits of our approach include autonomous testing, flexible analysis of results and the development of a test library that should be a valuable resource for both the DL and ontology community. We will continue to extend the library, and will add classification results from tested reasoners so that correctness testing can also be performed. While there are an increasingly large array of OWL-Ontologies available for public use, other Ontology formats (e.g. OBO: the Open Biomedical Ontologies, http://obo.sourceforge.net) are still widely in use and would make for valuable test examples. It is also the case, as describe in [3], that a large proportion of the available OWL-Full Ontologies, could in fact be validated as OWL-DL, just by adding a few extra clarifying statements. This means that of the 162 Ontologies that we had to throw away, many could be useful examples with a little work. In the future we hope to use these observations, together with any external contributions, to considerably increase the size of our ontology library. The results produced by our tests provide an interesting insight into the variety and depth of information that can be extracted from such testing/benchmarking. However, for the system and its results to become a valuable resource, we need to test their correctness. We are currently assuming that both the OWL-to-DIG conversions and the Reasoner’s responses are all valid and correct. With regard to the OWL-API’s conversions, this was the utility built alongside the original DIG specification. We therefore argue that this is the best conversion available and that our assumption is justified. Regarding the responses, as discussed earlier, they can be almost impossible to check for correctness. Our best option is therefore to analyse the difference in responses received from different reasoners, and this route is thus one we aim to explore further. It will be interesting to see if reasoners (that should, in theory, all produce the same inferences to the same problems) will actually agree on the test ontologies. So far we have focused on testing Tbox reasoning (classification). Although the use of nominals in SHOIQ blurs the separation between Tbox and Abox, it would still be useful to explicitly test Abox reasoning, e.g., by asking for the instances of some query class. This functionality will be added in a future version of the system. Apart from the future work described above, there are a number of extensions to our benchmarking system that would enhance its utility. Allowing users to define their own customised test, rather than the 5 step classification we are using, is one example that would allow Reasoner developers to test specific optimisations and implementations as they are developed. Other relevant tests would include testing how multiple concurrent tests on a Reasoner affects performance, as well as simply not restarting a Reasoner between tests. We intend for the whole system, including the ontology library, to be available for open-source use in the near future. 174 Regular Papers References [1] P. Balsiger and A. Heuerding. Comparison of theorem provers for modal logics. In Proceedings of Tableaux’98, May 1998. [2] Sean Bechhofer, Ralf Möller, and Peter Crowther. The DIG description logic interface. In Proceedings of DL2003 International Workshop on Description Logics, September 2003. [3] Sean Bechhofer and Raphael Volz. Patching syntax in OWL ontologies. In Proceedings of 3rd International Semantic Web Conference, ISWC, 2004. [4] Y. Guo, Z. Pan, and J. Heflin. LUBM: A benchmark for OWL knowledge base systems. Journal of Web Semantics, 3(2):158–182, 2005. [5] V. Haarslev and R. Möller. RACER system description. In R. Goré, A. Leitsch, and T. Nipkow, editors, International Joint Conference on Automated Reasoning, IJCAR’2001, June 18-23, Siena, Italy, pages 701–705. Springer-Verlag, 2001. [6] I. Horrocks. Benchmark analysis with FaCT. In Proc. of TABLEAUX 2000, number 1847, pages 62–66. Springer-Verlag, 2000. [7] I. Horrocks and P. F. Patel-Schneider. TABLEAUX 98, pages 27–30, 1998. FaCT and DLP. In Proc. of [8] U. Hustadt and R. A. Schmidt. MSPASS: Modal reasoning by translation and first-order resolution. 2000. [9] Aditya Kalyanpur, Bijan Parsia, Evren Sirin, Bernardo Cuenca-Grau, and James Hendler. Swoop: A ’web’ ontology editing browser. Journal of Web Semantics, 4(2), 2005. [10] Fabio Massacci and Francesco M. Donini. Design and results of TANCS-00. volume 1847, 2000. [11] Zhengxiang Pan. Benchmarking DL reasoners using realistic ontologies. In Proc. of the OWL: Experiences and Directions Workshop, 2005. [12] A. Riazanov and A. Voronkov. The Design and Implementation of Vampire. AI Communications, 15(2-3):91–110, 2002. [13] Dmitry Tsarkov and Ian Horrocks. FaCT++ Description Logic Reasoner: System Description. In Proc. of the Int. Joint Conf. on Automated Reasoning (IJCAR 2006), 2006. To Appear. 175 Proceedings of DL 2006 Will My Ontologies Fit Together? A preliminary investigation. Bernardo Cuenca Grau, Ian Horrocks, Oliver Kutz, and Ulrike Sattler School of Computer Science, The University of Manchester, UK 1 Motivation In realistic applications, it is often desirable to integrate different ontologies1 into a single, reconciled ontology. Ideally, one would expect the individual ontologies to be developed as independently as possible, and the final reconciliation to be seamless and free from unexpected results. This allows for the modular design of large ontologies and facilitates knowledge reuse tasks. Few ontology development tools, however, provide any support for integration, and there has been relatively little study of these issues at a fundamental level. Understanding at this fundamental level would help us predict, for example, what logical consequences to expect from the integrated ontology, and whether the integration of ontologies preserves some desirable properties of its parts. To the best of our knowledge, the problem of predicting and controlling the consequences of ontology integration has has been tackled only in [4]. The authors propose a set of reasoning services (with decidability and complexity results) to check whether, through integration with other ontologies, desirable properties of an ontology have been destroyed. In this paper, we propose first steps towards a different approach, the socalled normative approach.2 We specify certain properties that one would like to preserve in the integration and devise a set of restrictions that, when adhered to, guarantee to preserve these properties. Thus, while the approach of [4] determines the preservation of desirable properties ex post, our methodology prescribes some restrictions that guarantee the preservation of desirable properties. We introduce two ‘integration scenarios’ that, we believe, capture some of the common practices in ontology engineering, and postulate desirable properties that should be satisfied by the integrated ontology. We provide syntactic restrictions on the use of shared vocabulary that guarantee the preservation of 1 2 Throughout this paper, we do not distinguish between ontologies and TBoxes. Thanks to Frank Wolter for coining this expression. 176 Regular Papers these properties. The two basic ontology integration scenarios we analyze here are the following: 1. Foundational integration: an ontology is integrated with a foundational (or “upper”) ontology. The foundational ontology describes more general terms, and may be domain independent. 2. Broadening integration: two ontologies describing different (and largely independent) domains are integrated to cover a broader subject area. We define, for each scenario, semantic properties that one might want to be satisfied by the integrated ontology, that is, we specify how the consequences of the integrated ontology relate to those from its parts. Next, we specify syntactic constraints on the ontologies to be integrated and show that they guarantee these properties: these syntactic constraints are referred to as compliance conditions. Furthermore, we sometimes need global semantic safety constraints on the ontologies used in the integration. In this paper, we use a condition called localness, which is identical to a condition found in [3]. Clearly, the syntactic constraints depend on the DL used in the ontologies, and mainly concern the way the symbols occurring in the different ontologies (their signatures) are used. Finally, we discuss whether these constraints are realistic for the scenario, i.e., whether users could be expected to stick happily to these constraints in order to ensure that the integrated ontology will satisfy the desired semantic properties. Since all constraints are purely syntactic, they are decidable in polynomial time, and preliminary tests indicate that many ontologies satisfy the constraints already. We assume the reader to be familiar with the basics of description logics and use, throughout this paper, axiom for any kind of TBox, RBox, or ABox assertion, and Sig(T ) for the set of concept and roles names in T . This paper is accompanied by a technical report [2]. 2 Integration Scenarios Suppose that two ontologies T1 , T2 are to be integrated in some application. The ontologies may be the result of a collaborative ontology development process and may have been designed in a coordinated way by different groups of experts, or they may have been simply “borrowed” from the Web. In any case, we assume that they have both been tested and debugged individually prior to the integration and, hence, are consistent and do not contain unsatisfiable concept names. To capture this notion, we call an ontology T instantiable if there exists a model I of T s.t. AI 6= ∅ 6= RI for all concept and role names A, R in the Proceedings of DL 2006 177 signature of T .3 In the simplest case, one would construct an integrated ontology T by simply taking the union of the two ontologies T1 , T2 . In general, the ontologies T1 and T2 may be related and share symbols in their signatures Sig(T1 ) and Sig(T2 ).4 We will first postulate the semantic properties that T should satisfy in order to capture the modeling intuitions of each scenario, and then to investigate “acceptable” syntactic restrictions on the Ti that make sure that T will behave as expected. The intuition is simple: the more liberal the syntactic constraints including the use of shared symbols, the more freedom is given to the modeler, but the less likely it is that the integrated ontology will behave as desired. 2.1 Foundational Integration Often, interoperability between different domain ontologies Tdom and their data is achieved through the use of a foundational (or “upper”) ontology Tup . A well designed foundational ontology should provide a carefully conceived high level axiomatization of general purpose concepts. Foundational ontologies, thus, provide a structure upon which ontologies for specific subject matters can be based. A prominent example of an ontology conceived as the integration of a foundational ontology and a set of domain ontologies is GALEN [8], a large medical ontology designed for supporting clinical information systems. The foundational ontology contains generic concepts, such as Process or Substance. The domain ontologies contain concepts such as Gene or Research Institution, which are specific to a certain subject matter. The domain ontologies in GALEN are connected to the foundational ontology through subsumption relations between concept and role names. For example, Microorganism in one of the domain ontologies is a subconcept of Organism in the foundational ontology: Microorganism ⊑ Organism. Some prominent ontologies, such as CYC, SUMO and DOLCE have been designed specifically to be used in applications as foundational ontologies. For example, given a large dataset about chemicals annotated with concepts in a certain biomedical ontology, e.g., the National Cancer Institute Thesaurus (NCI) [5], one may want to annotate it semi-automatically with concepts of a different ontology. For such a purpose, one may align organic chemicals in NCI to substances in SUMO using the axiom: Organic Chemical ⊑ Substance. Similarly, one may want to use a foundational ontology to generalize the roles of a given domain ontology. For example, a University ontology may use SUMO to 3 For T a TBox in a logic whose models are closed under disjoint unions, such as SHIQ, T is instantiable if all concept and role names in T are satisfiable. 4 There may be some previous reconciliation w.r.t. symbols, e.g., to identify different symbols in the two ontologies that have the same intended meaning [7]. This is a separate problem, often referred to as ontology alignment, which we do not address here. 178 Regular Papers generalize the role writes as follows: writes ⊑ authors , where authors is defined in SUMO and does not occur in the University ontology. Foundational ontologies are well-established ontologies that one does not control and, typically, does not fully understand. When one of these ontologies is borrowed from the Web and integrated in an application, it is especially important to make sure that the merge preserves their semantics. In particular, we do not want the classification tree in Tup to change as a consequence of the merge. This property can be conveniently formalized by the notion of a conservative extension [4]. Definition 1 The TBox T = T1 ∪ T2 is a conservative extension of T1 if, for every axiom α in the signature of T1 : T |= α implies T1 |= α. Clearly, if T is a conservative extension of T1 and T1 , T2 are consistent, then so is T . However, conservativeness is a much stronger condition than instantiability: even if T is instantiable, new (and probably unintended) subsumptions between (possibly complex) concepts in T1 may still occur as a consequence of the merge. In general, it may still be tolerable, and even desirable, to allow new subsumptions to occur in the domain ontology as a consequence of the integration and, in such a case, T will not be a conservative extension of Tdom . Also, the notion of a conservative extension is not sufficient to capture all the intended and unintended consequences. In particular, one would not expect concept names originally in Tup to be subsumed by concepts originally in Tdom . In other words, the rôles of the foundational and domain ontologies should not be inverted after the merge. In contrast, new subsumptions may and should be entailed between concepts (respectively roles) in Tdom and concepts (roles) in Tup . For example, since the shared concept Substance is subsumed by SelfConnectedObject in SUMO, it is expected that T = TN CI ∪ TSU M O will entail the subsumption Organic Chemical ⊑ SelfConnectedObject, where Organic Chemical occurs in NCI, but not in SUMO, whereas SelfConnectedObject occurs in SUMO, yet not in NCI. Next, we specify syntactic restrictions that will ensure these “nice” properties of T = Tup ∪ Tdom . Given the examples, it seems reasonable to limit the coupling between Tup and Tdom to subsumptions relating concept (role) names in Tdom and concept (role) names occurring in Tup . Definition 2 The pair ℑ = hTup , Tdom i is f-compliant5 if, for S = Sig(Tup ) ∩ Sig(Tdom ) the shared signature, concept and role names A, R ∈ S occur in Tdom only in axioms of the form B ⊑ A and S ⊑ R respectively, where B, S ∈ Sig(Tdom ) \ S. 5 “f” stands for “foundational”. Proceedings of DL 2006 179 f-compliance suffices for capturing the coupling between the foundational and the domain ontologies in GALEN. However, is f-compliance enough to guarantee our “nice” properties for T = Tup ∪ Tdom ? A simple example will provide a negative answer: just assume that Tdom contains a GCI of the form ⊤ ⊑ A; after the merge, every concept in Tup will be subsumed by A ∈ Sig(Tdom ) and, thus, the foundational ontology does not act as such anymore. As mentioned above, we use an additional safety condition—called localness— which is defined as follows [3]: if I = (∆I , .I ) and J = (∆J , .J ) are interpretations such that ∆J = ∆I ∪ ∇, where ∇ is a non-empty set disjoint with ∆I , AJ = AI for each concept name, and RJ = RI for each role name, then J is called the expansion of I with ∇. Intuitively, the interpretation J is identical to I except for the fact that it contains some additional elements in the interpretation domain. These elements do not participate in the interpretation of concepts or roles. Now, local ontologies are precisely those whose models are closed under domain expansions, i.e., T is local if, for every I |= T and every set ∇ disjoint with ∆I , the expansion J of I with ∇ is a model of T . Intuitively, local ontologies contain only GCIs with a limited “global” effect. Examples of non-local axioms are GCIs that fix the size of the domain in every model of the ontology (e.g. ⊤ ⊑ bob for a nominal bob), or GCIs that establish the existence of a “universal” named concept (e.g. ⊤ ⊑ Car). In contrast, role domain and range and concept disjointness are local. In order to show that localness is a reasonable condition to impose, we have implemented a localness checker, tested it on about 800 ontologies available on the Semantic Web, and found that less than 1% of them contain non-local axioms. In [2], we provide the proofs of our initial results, a precise syntactic characterisation of localness for SHIQ and further details on our experimental results. Theorem 1 Let ℑ = hTup , Tdom i be f-compliant. If Tdom is a local SHOIQ TBox, Tup is a SHIQ TBox (not necessarily local), and T = Tup ∪ Tdom is instantiable, then 1. T = Tup ∪ Tdom is a conservative extension of Tup , 2. T |6 = A ⊑ B, for all concept names A ∈ Sig(Tup ) and B ∈ Sig(Tdom ) \ S, and 3. T 6|= R ⊑ S, for all role names R ∈ Sig(Tup ) and S ∈ Sig(Tdom ) \ S. This theorem states that our desirable properties are indeed preserved after the merge and, most importantly, the rôles of the foundational and domain ontologies are preserved (Items 2 and 3). Note, however, that f-compliance does not suffice for ensuring the instantiability of the merge: only if T is consistent and free from unsatisfiable names do the guarantees provided by the theorem apply. Although instantiability, as opposed to conservative extensions, can be easily checked using a reasoner, one might want to strengthen the theorem (and 180 Regular Papers the corresponding syntactic restrictions) to ensure the instantiability of T as well. Also, note that localness certainly is a too restrictive safety condition since it rules out “harmless” GCIs as well. The investigation of new f-compliance conditions that ensure the instantiability of the integrated ontology and of less strict safety conditions is the focus of our ongoing work. 2.2 Broadening Integration In this scenario, an ontology T1 is to be integrated with another T2 that describes in more detail one or more of the domains that are only touched on in T1 . For example, we may wish to integrate the Wine Ontology [9] with an ontology describing, in more detail, the regions in which wines are produced or the kinds of grapes they contain. The Wine Ontology illustrates a common pattern: although ontologies usually refer to a core application domain, they also refer to other secondary domains that deal with different objects. This modeling paradigm is not only characteristic of small and medium sized ontologies, but also occurs in large, high-quality knowledge bases, written by groups of experts. A prominent example is the NCI Thesaurus [5], a huge ontology covering areas of basic and clinical science. The core of NCI is focused on genes; other subject matters described in the ontology include diseases, drugs, chemicals, diagnoses treatments, professional organizations, anatomy, organisms, and proteins. In this scenario, concepts in the core application domain can be defined in terms of concepts in the secondary domains. For example, in the Wine Ontology, a Bordeaux is described as a Wine produced in France, where France is defined in the Regions ontology: Bordeaux ⊑ Wine ⊓ ∃producedIn.France In NCI, the gene ErbB2 is an Oncogene that is found in humans and is associated with a disease called Adrenocarcinoma. ErbB2 ⊑ Oncogene ⊓ ∃foundIn.Human ⊓ ∃associatedWith.Adrenocarcinoma Concepts in secondary ontologies, however, do not use the core concepts in their definitions, i.e., regions are not defined in terms of wines or diseases in terms of genes. Note, in this connection, that a ‘broadening scenario’ in this interpretation is closely related to the way ontologies would be integrated using the framework of E-connections, but is rather mimicking than directly adopting the syntax and semantics of E-connections [6]. Ontologies following this pattern can evolve by expanding their domain of discourse with knowledge about new subject matters. For example, we may extend the Wine ontology by representing the kinds of dishes each wine is most appropriate for, or NCI by adding information about useful publications on cancer research. This evolution process will typically consist of adding a new Proceedings of DL 2006 181 “secondary” ontology, either developed by a group of experts, or borrowed directly from the Web. As a consequence, this ontology should be “good” as it is, and thus we want to make sure that it will not be affected by the integration, i.e., we should require T = Tcore ∪ Tside to be a conservative extension of Tside . Furthermore, since we assume Tcore and Tside to cover different aspects of the world, we require that the merged ontology T does not entail subsumptions in any directions between non-shared concept names A ∈ Sig(Tcore ) and B ∈ Sig(Tside ). This condition ensures that the ontologies actually describe different objects. Let Tcore and Tside be ontologies with signatures Score = Ccore ∪ Rcore and Sside = Cside ∪ Rside , let the shared signature S = Score ∩ Sside contain only concept names, and let Rout ⊆ Rcore be a distinguished subset of roles. Intuitively, the roles in Rout connect objects in different ontologies. Some concepts in Tcore are defined in terms of restrictions on these roles; for example, the Bordeaux wines are related to France via the role producedIn and the ErbB2 oncogenes with organisms and diseases through the roles foundIn and associatedWith, respectively. Definition 3 The pair ℑ = hTcore , Tside i is b-compliant if: 1) S = Score ∩Sside = Ccore ∩Cside , ∅ 6= Rout ⊆ Rcore ; 2) for every role inclusion axiom R ⊑ S ∈ Tcore , either both R, S ∈ Rout or both R, S ∈ / Rout ; 3) for every GCI C1 ⊑ C2 ∈ Tcore , C1 , C2 can be generated using the following grammar: Ci ← A|C ⊓ D|¬Ci |∃R.Ci |∃P.A′ | ≥ nR.Ci | ≥ nP.A′ where A ∈ Ccore \ Cside , C, D and Ci are concepts generated using the grammar, A′ ∈ Cside , R ∈ / Rol(Rout ), and P ∈ Rout . As a consequence, concept names in Tside can only be used in Tcore through restrictions on the “outgoing” relations. Condition 2) makes sure that the hierarchies for the two kinds of roles are disconnected from each other. It turns put that the Wine Ontology and the “modules” that can be extracted from NCI [3] are local and b-compliant. As in the foundational scenario, the theorem requires the instantiability (and thus the consistency) of the merged ontology T . Theorem 2 Let ℑ = hTcore , Tside i be b-compliant. If Tcore is a local SHOIQ TBox, Tside is a local SHIQ TBox, and T = Tcore ∪ Tside is instantiable, then 1. 2. 3. 4. T = Tcore ∪ Tside is a conservative extension of Tside , For all A ∈ Sig(Tcore )\S and B ∈ Sig(Tside ): T 6|= A ⊑ B and T 6|= B ⊑ A, For all R ∈ Sig(Tside ) and S ∈ Sig(Tcore ): T 6|= R ⊑ S and T 6|= S ⊑ R, For all R ∈ Rout and S ∈ Rcore \ Rout : T 6|= R ⊑ S and T 6|= S ⊑ R. 182 3 Regular Papers Outlook So far, the problem of predicting and controlling the consequences of ontology integration has been largely overlooked by the Ontology Engineering and Semantic Web communities. In this paper, we have formalized two basic scenarios for ontology integration. In each case, we have identified a set of semantic properties that the integrated ontology should satisfy and, under certain simplifying assumptions, we have shown how these properties can be guaranteed by imposing certain syntactic constraints on the ontologies to be integrated. So far we have been very conservative in both the (syntactic) compliance and safety conditions (localness) in the scenarios. In the future, we aim at investigating how these can be relaxed in each case without losing the nice properties of the integrated ontology. We expect that our results will constitute the basis for a normative methodology for ontology integration that is both well-founded and understandable to modelers, and that can be supported by ontology development tools. References [1] F. Baader, C. Lutz, H. Sturm, and F. Wolter. Fusions of Description Logics and Abstract Description Systems. JAIR, 16:1–58, 2002. [2] B. Cuenca-Grau, I. Horrocks, O. Kutz, and U. Sattler. Will my Ontologies Fit Together? Technical report, University of Manchester, 2006. Available at http: //www.cs.man.ac.uk/~bcg/Integration-TR.pdf. [3] B. Cuenca-Grau, B. Parsia, E. Sirin, and A. Kalyanpur. Modularity and Web Ontologies. In Proc. of KR-2006, 2006. [4] S. Ghilardi, C. Lutz, and F. Wolter. Did I Damage My Ontology? A Case for Conservative Extensions in Description Logics. In Proc. of KR-2006, 2006. [5] J. Golbeck, G. Fragoso, F. Hartel, J. Hendler, B. Parsia, and J. Oberthaler. The National Cancer Institute’s Thesaurus and Ontology. J. of Web Semantics, 1(1), 2003. [6] O. Kutz, C. Lutz, F. Wolter, and M. Zakharyaschev. E-connections of Abstract Description Systems. Artificial Intelligence, 1(156):1–73, 2004. [7] N. Noy. Semantic Integration: A Survey on Ontology-based Approaches. SIGMOD Record, 2004. [8] A. Rector. Modularisation of Domain Ontologies Implemented in Description Logics and Related Formalisms, including OWL. In Proc. of FLAIRS, 2003. [9] M.K. Smith, C. Welty, and D.L. McGuinness. OWL Web Ontology Language Guide. W3C Recommendation, 2004. 183 Proceedings of DL 2006 Description logic reasoning using the PTTP approach Zsolt Nagy, Gergely Lukácsy, Péter Szeredi Budapest University of Technology and Economics Department of Computer Science and Information Theory {zsnagy, lukacsy, szeredi}@cs.bme.hu Abstract The goal of this paper is to present how the Prolog Technology Theorem Proving (PTTP) approach can be used for ABox-reasoning. This work presents an inference algorithm over the language ALC, and evaluates its performance highlighting the advantages and drawbacks of this method. 1 Introduction and motivation Work reported in this paper is being carried out in the Sintagma1 project, which aims at the development of a knowledge management tool-set for the integration of heterogenous information sources. This is an extension of the Silk2 [2] technology, for retrieving information spanning over several data sources stored in the model warehouse of the system. The model warehouse contains UML models as well as models given using description logics (DL) [1]. Currently we are working on extending the capabilities of the Sintagma tool-set by designing and implementing description logic inference methods used for querying information sources containing large amounts of data. The first step of this research process resulted in a resolution-based transformation of ABoxreasoning problems to Prolog [10]. This algorithm is able to answer instancecheck and instance-retrieval queries over the DL language ALC and an empty TBox. In this paper, we examine how ABox-reasoning services can be provided with respect to a non-empty TBox using Prolog technology. This paper is structured as follows: Section 2 presents related work on ABoxinference in description logics. Section 3 details the method how ABox-reasoning 1 2 Semantic INtegration Technology Applied in Grid-based Model-driven Architectures Semantic Integration via Logic and Knowledge 184 Regular Papers is performed in our framework. Section 4 evaluates the performance of our technique, highlighting its strong points and weaknesses. Finally, Section 5 concludes this work and addresses future research challenges. 2 Related Work Traditional tableau-based Description Logic reasoners such Racer are slow when performing ABox-reasoning on large amounts of instances [4]. The work [7] describes a resolution-based inference algorithm, which is not as sensitive to the increase of the ABox size as a tableau-based method. The system Kaon2 [8] implements this method and provides reasoning services over the description logic language SHIQ. The work [5] discusses how a first order theorem prover such as Vampire can be modified and optimized for reasoning over description logic knowledge bases. Paper [3] describes a direct transformation of ALC description logic axioms to Horn-clauses. Although [3] restricts the expressive power of ALC by disallowing constructs that result in non-Horn clauses, the main advantage of the approach is that the transformed clauses can be supplemented with other non-DL Hornclauses. Both the modified Vampire and Kaon2 aim to provide inference services over knowledge bases defined using the expressive power of the DL language in question plus the expressive power of a restricted fragment of first order logic. In case of Kaon2, the restrictions involving FOL components are such that the inference algorithm remains to be a decision procedure. It has been proved in [9] that query-answering over a knowledge base containing SHOIN axioms and so-called DL-safe rules is decidable. However in practice, this decision procedure has been shown to be highly inefficient due to don’t know nondeterminism (backtrack search). For efficiency reasons, only a subset of the SHOIN description logic language is used in Kaon2. In our previous work [10], we have provided a possible resolution-based alternative to ABox reasoning over the language ALC with respect to an empty TBox. In that approach, a query-plan was derived before the first ABox-access and the query-plan was executed using Prolog. This solution could be viewed as a two-phase proof of an ABox-query: first, the ABox-independent part of the proof is constructed, resulting in the query-plan as a Prolog program, and second, the query-plan is executed on the ABox. Our current work deals with ALC ABox-reasoning in the presence of nonempty TBoxes, with some restrictions on the form of the TBox-axioms. However, we do allow full negation and disjunction on each side of the DL axioms, generalizing the transformation of [3]. In contrast with the earlier approach, we delegate the whole reasoning process to Prolog, building on the Prolog Technology Proceedings of DL 2006 185 Theorem Proving (PTTP) approach [13]. Paper [6] introduces a fragment of the SHIQ language that can be transformed into Horn-clauses. The Horn-SHIQ language presented there allows more concept constructors than our restricted ALC framework. On the other hand, our approach poses less restrictions on use of disjunctions. 3 Transforming DL axioms to Prolog clauses In this section, we describe the transformation of ALC TBox-axioms into executable Horn-clauses. The aim of this transformation is to provide conceptinstance check and concept-instance retrieval services over an ALC knowledgebase containing both ABox- and TBox-axioms. In order to avoid the appearance of Skolem-functions in the transformed Horn-clauses, some restrictions are posed on the DL-axioms. We exclude subsumption axioms C ⊑ D where ∀R.E is a subconcept of the negational normal form of C or ∃R.E is a subconcept of the negational normal form of D. Although the method described below can cope with ABox-inference on some TBoxes containing such axioms, allowing them in general may lead to non-termination when transformed to Prolog. The problem of termination for transformed clauses containing Skolem-functions may be addressed by reverting to a two-phase transformation process (as in [10]) and using ordered resolution [7] in the first phase, or by applying a proper meta-level cycle-detection technique. The goal of this section is to show that an arbitrary DL knowledge-base obeying the above restriction can be transformed into a set of executable Prologclauses. There are three types of clauses: the TBox-clauses, ABox-facts and the clauses belonging to the instance-check and instance-retrieval queries. Currently, we use an interpreter written in Prolog for executing these Prolog clauses, in order to ease the development process and experimentation. However, it is fairly easy to transform these clauses further to code directly executable on a Prolog system. Description of the transformation. Let an ABox A and a TBox T be given, where T consists of axioms C ⊑ D, where C and D are in negational normal form, and C does not contain subconcepts of form ∀R.E, while D does not have a subconcept ∃R.E. The axioms of the TBox are transformed into Prolog clauses using the transformation steps below. 1. Based on the well-known mapping described e.g. in [1], we transform the description logic axioms into first order logic formulas. 2. The formulas corresponding to the TBox-axioms are then transformed into clausal form [12]. According to the properties of clause transformation, the generated clauses have the following properties: 186 Regular Papers • clauses are disjunctions of possibly negated literals; • all variables in the clauses are universally quantified. Due to our restrictions posed, no Skolem functions appear in the clausal form of the concepts. The general form of a transformed TBox-clause is thus the following: _ Cm (xim ) ∨ m _ n ¬Dn (xjn ) ∨ _ ¬Rp (xkp , xlp ), (1) p where the literals Cm and Dn correspond to atomic concepts, and literals Rp correspond to role names, while x-es denote variables. Note that while both positive and negative unary literals can appear in the clauses, binary literals are only negative. Positive binary literals do not appear in any clause, since this would correspond to a role negation in the corresponding DL axiom. 3. Each TBox-clause L1 ∨ L2 ∨ . . . ∨ L n (2) is transformed into n clauses of the following form (i = 1, . . . , n) neg neg Li ← Lneg ∧ Lneg ∧ . . . ∧ Lneg 1 2 i−1 ∧ Li+1 ∧ . . . ∧ Ln , (3) where Li is the head of the clause, and all other literals are body literals. Lneg is equal to ¬L if L is a positive literal, and Lneg = T if L = ¬T . A clause of form (3) is called a contrapositive of the clause (2). Execution in Prolog. The resulting contrapositives are then transformed to Prolog syntax and are executed by our interpreter. The transformation and interpretation techniques as well as the usage of contrapositives have been borrowed from PTTP (Prolog Technology Theorem Prover) [13]. We briefly describe how we handle these issues: • Occurence of positive and negative literals: To transform an arbitrary clause to Prolog format we introduce new predicate names. For each concept-name C (i.e. one of Cm or Dn of Formula (1)) we add a new predicate name nonC, and replace all occurrences of ¬C(X) by nonC(X) both in the head and in the body. The link between the separate predicates C and nonC is created by ancestor resolution, see below. • Ancestor resolution: open predicate calls3 are collected in an ancestor list. If the ancestor list contains a literal which can be unified with the first 3 I.e. calls which were entered or re-entered, but have not been exited yet, according to the Procedure-Box model of Prolog execution. [11] Proceedings of DL 2006 187 literal of the goal, then the call corresponding to the goal literal succeeds. Program execution is divided into two branches: one reflecting the modifications caused by the ancestor resolution step, and one without using ancestor resolution. • Loop elimination: if the first literal of the goal can be found in the ancestor list, we stop the given branch with a failure. The term ’can be found’ is interpreted by the == Prolog built-in predicate, which succeeds if its operands are identical. Prolog execution uses SLD-resolution [11], which is a linear resolution strategy always resolving the first literal of the goal with the head of a corresponding definite-clause in the Prolog-program. When all n contrapositives of a clause (2) are available, the goal can be resolved with any literal Li of the clause. Thus, any linear refutation can be simulated in Prolog at the expense of introducing multiple variants of the clauses. Soundness, completeness, termination. Soundness and completeness of this approach is based on the properties of the PTTP technique [13], since PTTP is a sound and complete first order theorem prover. A DL ABox-inference problem is handled with these theorem-proving techniques by resolving the set of produced TBox-, ABox- and query-clauses in a PTTP framework using Prolog. Regarding termination, consider the following example: if we transform the axiom C ⊑ ∀R.C 4 into clausal form, we get the clause ¬C(x) ∨ ¬R(x, y) ∨ C(y). Executing an instance-retrieval query on concept C may lead to an infinite loop if the literals in the contrapositives are not ordered properly. Whenever we call the contrapositive C(Y) :- C(X), R(X, Y). we introduce a new variable inside the literal C, which is not detected by the loop elimination technique. This example shows that without further provisions, the termination of the Prolog program is not guaranteed. Conjecture: The execution of the resulting clauses of the above described transformation always terminates if all role literals in the body of the clauses are moved before concept literals. This rearrangement ensures that at the time of a concept-predicate call the variable in the call either (a) occurs in a role literal previously called or (b) is equal to the head-argument of the clause. Role literals can only be resolved with ABox-facts, so all variables occurring in a role literal are unified with ABox-instances. In case (a), the variable in the conceptpredicate call is instantiated due to the previous role-predicate call. In case (b), the head-argument of the clause is either instantiated, or is identical to an 4 Suppose that C is an atomic concept. 188 Regular Papers older head argument. By induction, this means that any uninstantiated concept argument must be identical to the parameter of the instance-retrieval query. The number of clauses and instances is finite and only one variable, namely the parameter of the query may occur in a predicate call. Therefore, for a set of clauses, only a finite number of different predicate calls is possible. Since loop elimination ensures that the same predicate call never executes twice, execution always terminates. Optimizations. Note that not all contrapositives of the clauses are needed for acquiring a complete decision procedure. Contrapositives containing a role literal in the head can be omitted, since they cannot be called within the execution of an instance-check or an instance-retrieval query. Although these clauses are never called by the program, the size of the program gets smaller, reducing administration overhead. It is often the case that a concept predicate is called with a ground argument. In the presence of disjunctions, such a Prolog goal could be executed in multiple ways. Obviously, once the goal exited successfully, there is no point in exploring alternative branches within this goal. Therefore we modified the interpreter to perform a Prolog cut operation (!) after a successful exit from a ground goal. This optimization resulted in a measurable performance boost. Composite queries. The outcome of the transformation is a set of Prologclauses, which are usable for instance-check or instance-retrieval queries on possibly negated atomic concepts. For allowing ABox-inference queries containing a composite query-concept Q, an atomic concept-name A has to be introduced for the query-concept with the axiom A ≡ Q. The equivalence-axiom A ≡ Q can be written in form A ⊑ Q and Q ⊑ A. From these two subsumption axioms, only the second one has to be added to the TBox for answering the ABox query. This axiom is transformed to Prolog clauses in the same way as the other axioms in the TBox. Note that directly transforming the composite query-concept Q to a Prolog query is not sufficient, because all the contrapositives of the query-clause Q ⊑ A may be needed for handling case-analysis. This technique is an alternative for passing the parameter of the instance-check and the instance-retrieval queries when handling case-analysis, as detailed in [10]. 4 Performance evaluation We have carried out the preliminary performance-evaluation of our approach and compared it with the available state-of-the-art description logic reasoners, such as Racer and Kaon2. Since the capabilities and usage of these systems 189 Proceedings of DL 2006 are different, the goal of this comparison is to analyze the behavior of these approaches for different reasoning tasks and not to declare a winner among these systems. It is important to note that these inference engines provide reasoning services over different description logic languages, so the comparison has to be evaluated with care. The tests were run on an AMD Athlon CPU running at 1.81GHz with 1GB RAM and Windows XP operating system with Service Pack 2. After a test had been performed, Racer5 , Kaon26 and our Prolog interpreter7 were always reinitialized. We show the results for two instance-retrieval test cases. The first test (the first five-line block of Table 1) summarizes the results of a test-case over a TBox containing TBox-axioms with no disjunctions. The second test was run on a TBox containing complex TBox-axioms with disjunctions and composite concepts. The last line belongs to the second test case indicating a special case explained below. The ABox of the tests was randomly generated using a Prolog program. KB characteristics simple TBox axioms complex TBox axioms Special complex # instances 500 1000 2000 5000 10000 500 1000 2000 5000 5000 #role assertions 1269 2499 2133 12599 25036 261 503 972 2493 2493 #concept assertions 337 688 1333 3300 6627 323 635 1392 3367 3367 Racer Kaon2 SICStus 1.1s 3.1s 13.2s 91.4s >300s 0.0s 0.7s 1.5s 7.1s 7.0s 0.203s 0.531s 0.515s 0.468s 0.891s 0.078s 0.375s 1.062s 5.156s 3.579s 0.000s 0.000s 0.016s 0.016s 0.031s 0.890s 1.953s 7.875s 44.265s 0.813s Table 1: Test results The first block shows that the resolution-based approaches are not as sensitive to the increase of the size of the ABox as the tableau-based Racer, when not many disjunctions are present8 . When comparing execution times of Kaon2 and our interpreter, one should note that Kaon2 provides inference services over a description logic language with higher expressive power. 5 version 1.7.6 version released on 8th December 2005 7 running under SICStus Prolog version 3.12.2 8 Note that in special cases as shown in [10], Kaon2 fails to scale. 6 190 Regular Papers The second test case highlights that our interpreter does not handle disjunctions efficiently enough, due to the many introduced contrapositives that often make the program explore irrelevant parts of the search space. For instance, if we know that some TBox-axioms are not needed for answering a simple query, the clauses belonging to the axioms not needed can be left out, reducing execution time below one second for even the ABox with size 5000. This phenomenon is described as a special test case in the last row of Table 1. Here the axioms not needed for answering the instance-retrieval query are omitted from the TBox. Note that for TBoxes containing less disjunctions, the execution time was only reduced by a small constant factor when omitting irrelevant axioms. Kaon2 seems to handle disjunctions fairly well. Although Racer was faster than Kaon2 for the first test case, execution times increased with the overhead of examining all the instances of larger ABoxes. A possible reason why our approach does not handle disjunctions well enough is that – as opposed to our previous work [10] – no preprocessing is made on the transformed PTTP-clauses. We believe that the current approach can be optimized by cutting the search space at compile time. 5 Conclusion and future work This paper has described an ABox-reasoning technique for the DL language ALC which is able to handle TBoxes obeying certain restrictions. We have written an interpreter which executes the resolution-based proof belonging to instancecheck and instance-retrieval queries and have also evaluated the performance of this approach, pointing out its advantages and disadvantages. In the future, our plan is to examine how the services provided by the interpreter can be included in the Prolog-program serving as the query-plan. Our other aim is to apply optimizations guiding the Prolog execution of the refutation. By combining this approach with the approach seen in our previous work, we believe that the performance of this reasoning technique can be largely enhanced. A method handling all forms of refutation involving Skolem-functions and DL-constructs not addressed in this paper is also subject of future research. References [1] F. Baader, D. Calvanese, D. McGuinness, D. Nardi, and P. F. PatelSchneider, editors. The Description Logic Handbook: Theory, Implementation and Applications. Cambridge University Press, 2003. [2] Tamás Benkő, Gergely Lukácsy, Attila Fokt, Péter Szeredi, Imre Kilián, and Péter Krauth. Information integration through reasoning on meta-data. In Proceedings of the Workshop “AI Moves 191 Proceedings of DL 2006 to IA”, IJCAI’03, Acapulco, Mexico, pages 65–77, August 2003. http://www.dimi.uniud.it/workshop/ai2ia/cameraready/benko.pdf. [3] Benjamin N. Grosof, Ian Horrocks, Raphael Volz, and Stefan Decker. Description Logic Programs: Combining Logic Programs with Description Logics. In Proc. of the Twelfth International World Wide Web Conference (WWW 2003), pages 48–57. ACM, 2003. [4] V. Haarslev and R. Möller. Optimization techniques for retrieving resources described in OWL/RDF documents: First results. In Ninth International Conference on the Principles of Knowledge Representation and Reasoning, KR 2004, Whistler, BC, Canada, June 2-5, pages 163–173, 2004. [5] Ian Horrocks and Andrei Voronkov. Reasoning support for expressive ontology languages using a theorem prover. In FoIKS, volume 3861 of Lecture Notes in Computer Science, pages 201–218. Springer, 2006. [6] Ullrich Hustadt, Boris Motik, and Ulrike Sattler. Data complexity of reasoning in very expressive description logics. In Proceedings of the Nineteenth International Joint Conference on Artificial Intelligence (IJCAI 2005), pages 466–471. International Joint Conferences on Artificial Intelligence, 2005. [7] U. Hustadt, B. Motik, and U. Sattler. Reasoning for description logics around SHIQ in a resolution framework. Technical Report 3-8-04/04, FZI, Karlsruhe, Germany, June 2004. [8] KAON2: Ontology management http://kaon2.semanticweb.org/. tool for the semantic web. [9] Boris Motik, Ulrike Sattler, and Rudi Studer. Query answering for OWLDL with rules. Journal of Web Semantics: Science, Services and Agents on the World Wide Web, 3(1):41–60, July 2005. [10] Zsolt Nagy, Gergely Lukácsy, and Péter Szeredi. Translating description logic queries to Prolog. In PADL, volume 3819 of Lecture Notes in Computer Science, pages 168–182, 2006. [11] U. Nilsson and J. Maluszynski, editors. Logic, Programming and Prolog. John Wiley and Sons Ltd., 1990. [12] S.J. Russel and P. Norvig, editors. Artificial intelligence: a modern approach. Prentice Hall, 1994. [13] M. Stickel. A Prolog technology theorem prover: A new exposition and implementation in Prolog, Technical Note 464, SRI international, 1989. 192 Regular Papers Extending the SHOIQ(D) Tableaux with DL-safe Rules: First Results Vladimir Kolovski and Bijan Parsia and Evren Sirin University of Maryland College Park, MD 20740 kolovski@cs.umd.edu bparsia@isr.umd.edu evren@cs.umd.edu Abstract On the Semantic Web, there has been increasing demand for a ruleslike expressivity that goes beyond OWL-DL. Efforts of combining rules languages and description logics usually produce undecidable formalisms, unless constrained in a specific way. We look at one of the most expressive - but decidable - such formalisms proposed: DL-safe rules, and present a tableaux-based algorithm for query answering in OWL-DL augmented with a DL-safe rules component. In this paper we present our algorithm which is an extension of the SHOIQ tableaux algorithm and show the preliminary empirical results. Knowing that we pay a high price in performance for this expressivity, we also explore possible optimizations. 1 Introduction Even though OWL-DL [3] has been a great success as a language for ontology representation on the Semantic Web, there is already demand for even greater expressivity in the form of logic programming (LP) rules. Community interest in this area is growing, as evidenced by the recent (November 2005) creation of the Rule Interchange Format Working Group (RIF [2]). One approach to provide the needed additional expressivity is to couple in some way Description Logic with LP rule systems (the hybrid approach). However, combining expressive Description Logics with rules is non-trivial since it can easily lead to undecidability if the integration is not restricted in some manner. There have been a number of proposals that follow the hybrid approach 193 Proceedings of DL 2006 while still retaining decidability [12, 4, 9]. The logic of DL-safe rules [12] is one of the most expressive of these, combining SHIQ(D) and positive datalog rules. DL-safe rules allow classes and properties from the Description Logic component to occur freely in the head or the body of the rule, with the only restriction being that they can be applied only to explicitly named individuals. The same authors who coined the term also proposed the only practical reasoning algorithm for this formalism [11]. The algorithm is based on reducing the description logic knowledge base to a positive disjunctive datalog program, appending the DLsafe rules to this program and using optimized deductive database techniques for query answering. As an alternative to a reduction to disjunctive datalog, in this paper we present a direct tableaux algorithm for DL-safe rules, as an extension to the SHOIQ tableaux algorithm. Instead of converting the Description Logic knowledge base to a datalog program, we extend a highly optimized OWL-DL tableaux reasoner to handle these rules. We believe that we will benefit from layering our algorithm on top of an efficient tableaux reasoner and our initial empirical results support this claim. Also, this approach allows our algorithm to cover the full expressivity of OWL-DL (SHOIN (D)) and DL-safe rules. In the following section, we provide preliminaries and definitions of terms used later in this paper. Then, after presenting our algorithm, we discuss its performance in the preliminary tests, and possible optimizations and future work. 2 Background In this section we provide a brief overview of the terms and notation used later in the paper. We assume that the reader is familiar with the syntax and semantics of SHOIN (D). Before introducing DL-safe rules, we need to describe the standard notation we will be using for rules. A term is either a constant (denoted by a, b, c) or a variable (denoted by x, y, z ). An atom has the form P (s1 , ..., sn ), where P is a predicate symbol and si are terms. A literal is an atom or a negated atom. A rule has the form H ← B1 , . . . , Bn where H and Bi are atoms; H is called the rule head, and the set of all Bi is called the rule body. A program P is a finite set of rules. As for the semantics, we treat rules as logical implications, thus they can also be represented as: H ∨ ¬B1 ∨ ¬B2 ∨ . . . ¬Bn Definition 1 (Semantics of a DL-safe Knowledge Base) 194 Regular Papers We start with a SHOIN (D) knowledge base, K. Let VC , VIP , VDP be countable and pair-wise disjoint sets of class, object property and datatype property names respectively. Let VP be a set of predicate symbols that can be used as atoms in the rules, such that VC ∪ VIP ∪ VDP ⊆ VP . A DL-atom is an atom of the form A(s) were A belongs to VC , or of the form R(s, t) where R belongs to VIP ∪ VDP . A rule r is called DL-safe if each variable in r occurs in a non-DL-atom in the rule body. A program is DL-safe iff all of its rules are DL-safe. Let K be a SHOIN (D) knowledge base and P a set of DL-safe rules. A DL-safe Knowledge Base is a pair (K, P ). Since SHOIN (D) is a subset of first order logic, we can give the semantics of (K, P ) by π(K) ∪ P where π(K) is a translation mapping SHOIN (D) to first order logic. 3 Tableaux Algorithm In this section we present a tableaux-based algorithm for deciding the satisfiability of DL-safe knowledge bases. Our algorithm is inspired by the decidability proof for query answering in combined SHOIN (D) and DL-safe rules [12]. The main difference is that we push the rule reasoning inside the tableaux algorithm in order to get some goal directed behavior. Our approach extends the SHOIQ algorithm [7] thus we are able to handle the full expressivity of OWL-DL and DL-safe rules. We assume that the reader is familiar with the basics of the SHOIQ algorithm (detailed description is available in [7]). The main reasoning service that our algorithm provides is query answering. More specifically, answering for a given query α and a DL-safe knowledge base KB = (K, P ) whether KB |= α. This can be reduced to a consistency check of KB ∪ {¬α} , so KB |= α iff KB ∪ {¬α} is not consistent. To check whether a DL-safe KB (K, P ) is consistent, we need to perform a consistency check of its ABox with respect to the TBox, the RBox and the rules. Since it was shown in [7] that we can reduce reasoning w.r.t. general TBoxes and role hierarchies to reasoning w.r.t. role hierarchies only, from now on without loss of generality we will assume that we have internalized the TBox and we do reasoning w.r.t. to the RBox and the rules program. Since ABoxes in general involve multiple individuals with arbitrary role relationships between them, the completion algorithm will work on a forest instead of a tree. Such a forest is a collection of trees whose root nodes correspond to the individuals present in the input ABox. The individuals in the input ABox are the explicitly asserted individuals, and are the only individuals to which the rules in P are applicable. A formal description of a completion forest is given in the following definition. Definition 2 (SHOIQ + DL-safe Completion Forest) (extended version of [8]) A completion forest F for a SHOIQ Abox A w.r.t a role hierarchy R and a 195 Proceedings of DL 2006 DL-safe KB (K, P ) is a collection of trees whose distinguished root nodes may be connected by edges in an arbitrary way. The completion forest can be described as a directed graph G = (V, L, E, P, 6=) where each individual x ∈ V can be labeled with a set of concept labels L(x) and each edge (x, y) can be labeled with a set of role names E(x, y). P is a program consisting of DL-safe rules Ri ,each one of the form Hi ∨ ¬Bi1 ∨ ¬Bi2 ∨ . . . ¬Bin We also keep track of inequalities between nodes of the graph with a symmetric binary relation 6= between the nodes of G. Given a SHOIQ Abox A, a role hierarchy R and a DL-safe program P , the algorithm initializes a completion forest F that contains a root node xi0 for each individual ai ∈ A, and an edge (xi0 , xj0 ) if A contains an assertion (ai , aj ) : R for a role R. The labels of these nodes and edges are initialized as follows: L(xi0 ) = {C|ai : C ∈ A} L((xi0 , xj0 )) = {R|(ai , aj ) : R ∈ A} xi0 6= xj0 iff ai 6= aj ∈ A For the purpose of our paper, we assume standard blocking and clash definitions [7]. The tableaux algorithm starts with the completion forest F. It applies the completion rules and stops when a clash occurs. The ABox A is consistent w.r.t. to R and P iff the completion rules can be applied in a way that they yield a complete and clash-free completion forest, and inconsistent otherwise. Our extension of the algorithm is in the form of a new completion rule, R-rule 1 . We reuse all of the original SHOIQ completion rules, and add the Rrule. The R-rule starts with generating all of the possible ground instantiations for a DL-safe rule (we will refer to them as bindings henceforth). We need to be careful with the bindings because only named individuals not introduced by the tableaux expansion rules are considered. For every such binding, we check whether at least one of the ground literals holds true. If that is not the case, we have found a clash and the DL-safe knowledge base is inconsistent. Thus, for every literal in the rule we create a disjunction branch, in which we assert that the literal holds (in a manner explained in Figure 1 ) - this branch is then explored further. This is the most naive version of the algorithm, and optimizations are discussed in the next sections. Please note here that for brevity, we do not include all of the SHOIQ tableaux completion rules (they are defined in [7]). We only present our new expansion rule which is to be applied with lowest priority. 1 Thanks to the anonymous reviewer for the suggestion 196 Regular Papers → R rule: f oreach DN F clause Ri ∈ P : f oreach ground substitution to Ri that produces a ground clause G : f oreach monadic ground literal B(a) ∈ G : if B ∈ / L(a), then create a new branch where L(a) = L(a) ∪ {B} f oreach dyadic ground literal B(a, b) ∈ G : if B is of type ¬A(a, b) and ∀A.¬{b} ∈ / L(a), then create a new branch where L(a) = L(a) ∪ {∀A.¬{b}} if B is of type A(a, b) and (a, b) ∈ / G then create a new branch with G = G∪ {(a, b)} and L(a, b) = {A} if B is of type A(a, b), (a, b) ∈ G and A ∈ / L(a, b) then create a new branch where L(a, b) = L(a, b) ∪ {A} Figure 1: New Expansion Rule 4 Implementation and Optimizations We implemented a proof of concept by extending the open source reasoner Pellet [1]. Obviously, the bottleneck of the algorithm is the non-determinism introduced by creating and exploring tableaux branches for every binding. Thus, as an easy optimization, we check whether, for a particular binding, the rule ground clause is trivially satisfied (one of the disjuncts occurs in the tableaux). If this is the case, we do not generate any new branches for that clause in the tableaux. More advanced, yet practical, optimizations are possible. For example, we do not need to generate all possible groundings of the rules. Thus, we use a fix-point evaluation procedure as an optimization for our algorithm. By running that procedure first, we make sure that all of the obvious rules are fired - by obvious we mean those rules whose patterns we can match syntactically against the individuals in the completion forest. We use the efficent pattern matching RETE [5] algorithm for this purpose. After the fixpoint is reached, we continue with our tableaux-based algorithm. The speed up comes from the fact that for a given grounding for a rule, if the rule was already fired in the pattern-matching phase, now we do not have to try each disjunct of its horn clause separately, thus decreasing non-determinism. Another optimization would be to sort the rules after the fix point optimization and before running our algorithm. For a given rule r: H ← B1 , . . . , Bn we would like to try those groundings that satisfy the maximum amount of 197 Proceedings of DL 2006 conditions Bi first. By doing this we will succeed in firing the ’almost obvious’ applications of the rules first, and add more information in the concept labels of the tableaux. In general, the more information we have in the concept labels, the higher the chances to reach a clash when grounding the horn clauses of the rules, yielding less non-determinism in the algorithm. 5 Evaluation We conducted an experimental study to compare the performance of our approach with KAON2 [10]. Our test case of choice was a modified version of the LUBM benchmark [6], with one university and increasing ABox sizes. There are 46 defined classes and 30 object properties in the ontologies. We extended this ontology by adding a rules component consisting of 2 rules: GraduateStudent(X):P erson(X), takesCourse(X, Y ), GraduateCourse(Y ). SpecialCourse(Z):F ullP rof essor(X), headOf (X, Y ), teacherOf (X, Z). We ran the experiments on an IBM ThinkPad T42 with Pentium Centrino 1.6GHz processor and 1.5GB of memory. The performance results (time in milliseconds) for the consistency check of the ontologies are shown in table 1. Rule Branch stands for the number of additional branches introduced by the R-rule. No 1 2 3 4 5 6 7 Size of ontology LUBM, LUBM, LUBM, LUBM, LUBM, LUBM, LUBM, 1 1 1 2 2 2 2 rule, consistent, 17 individuals rule, consistent, 94 individuals rule, inconsistent, 94 individuals rules, consistent, 17 individuals rules, inconsistent, 94 individuals rules, inconsistent, 94 individuals rules, consistent, 94 individuals Pellet DL-Safe Rule Branches Consistency Check Time 34 100 107 250 120 381 109 421 422 951 0 90 422 1232 KAON2 Consistency Check Time 661 621 651 701 691 691 5748 Table 1: Evaluation Results for Consistency Checking. Rule Branches stands for the total number of branches introduced by the R-rule Please note that the first rule has 2 variables, and the second has 3. The additional variable in the second rule impacts the performance, since there are considerably more bindings possible for that rule. As an example of the exponential blow up of the bindings, consider that in the case of LUBM with two rules and 94 individuals, in the naive implementation there were 804264 bindings to try. This observation lead us to another optimization strategy - prune 198 Regular Papers the bindings search space. To accomplish this, we embed the trivial satisfiability check in the generation of the bindings. This strategy, along with the implementation of the RETE algorithm as a preprocessor, improved the performance considerably. We present our results compared to KAON2 in Table 1. As it can be seen, for smaller cases we perform favorably, however the faster rate of increase of consistency check time on our part suggests that for larger ontologies we will be slower than KAON2. The last two test cases merit more discussion. In case of 6), after the RETE algorithm fired the obvious rules we got a clash early and avoided generation of groundings. In the lasr test case, we added another class , OverachievingProfessor which is equivalent to a FullProfessor who teaches at least 9 courses. This was to demonstrate how we perform better in presence of cardinality constraints. 6 Related Work The most relevant related work to ours is the only other practical reasoning algorithm that processes DL-Safe KBs . The algorithm is described in [11] (implemented in [10]) and is based on the SHIQ(D) logic and having restricted the DL-atoms in rules to concepts and simple roles. The algorithm is based on reducing the description logic knowledge base to a positive disjunctive datalog program which entails the same set of ground facts as the original knowledge base. As shown in Section 5, our algorithm compares reasonably well for smaller ontologies and for cases when cardinality constraints are used. 7 Conclusions and Future Work This paper makes the following contributions: • Provides a direct tableaux procedure for the combination of OWL-DL and DL-safe rules. • Provides preliminary empirical results of an implementation and discussion of possible optimizations. As for our next steps, we noticed that a the reordering of the literals in the rule makes a noticeable difference in the running time, so we will try to work out the optimum orderings. Also, in longer term, we plan to work on evolving our algorithm toward SWRL by integrating a first order Free Variable tableaux procedure with the SHOIQ algorithm. 199 Proceedings of DL 2006 References [1] Pellet - OWL DL Reasoner. http://www.mindswap.org/2003/pellet. [2] Rule interchange format http://www.w3.org/2005/rules/wg. working group, 2005. [3] M. Dean, D. Connolly, F. van Harmelen, J. Hendler, I. Horrocks, D. L. McGuinness, P. F. Patel-Schneider, and L. A. Stein. Web Ontology Language (OWL) Reference Version 1.0. W3C Working Draft 12 November 2002 http://www.w3.org/TR/2002/WD-owl-ref-20021112/. [4] F. M. Donini, M. Lenzerini, D. Nardi, and A. Schaerf. Al-log: integrating datalog and description logics. Journal of Intelligent Information Systems, 10:227–252, 1998. [5] C. Forgy. Rete: A fast algorithm for the many pattern/many object pattern match problem. Artificial Intelligence, 19:17–37, 1982. [6] J. Heflin, Z. Pan, and Y. Guo. The lehigh university benchmark LUBM. http://swat.cse.lehigh.edu/projects/lubm/, 2003. [7] I. Horrocks and U. Sattler. A tableaux decision procedure for shoiq. In Proc. of IJCAI 2005, pages 448 – 453. [8] I. Horrocks, U. Sattler, and S. Tobies. Reasoning with individuals for the description logic shiq. In D. MacAllester, editor, Proc. of the CADE 2000, number 1831, pages 482–496. Springer-Verlag, 2000. [9] A. Levy and M.-C. Rousset. CARIN: A representation language combining horn rules and description logics. Artificial Intelligence, 104(1-2):165–209, 1998. [10] B. Motik. KAON2 - ontology management for the semantic web. http://kaon2.semanticweb.org/, 2005. [11] B. Motik. Reasoning in Description Logics using Resolution and Deductive Databases. PhD thesis, Univesitt Karlsruhe, Germany, January 2006. [12] B. Motik, U. Sattler, and R. Studer. Query answering for owl-dl with rules. In Proc. of ISWC 2004, pages 549–563. 200 Regular Papers Description Logic Reasoning for Dynamic ABoxes Christian Halaschek-Wiener, Bijan Parsia, Evren Sirin, and Adtiya Kalyanpur Maryland Information and Network Dynamics Laboratory 8400 Baltimore Ave., College Park, MD, 20740 USA {halasche,evren,aditya}@cs.umd.edu,bparsia@isr.umd.edu 1 Introduction Recently, there has been interest in providing formal representation of Web content, which can then be processed using automated reasoning techniques. Due to data sources that produce fluctuating data, there exists a variety of description logic reasoning use cases which require frequent updates at the assertional level. These include prominent web services frameworks (e.g., OWL-S) that use description logics for service discovery and matchmaking, where devices register or deregister their descriptions (and supporting ontologies) quite rapidly. Additionally, Semantic Web portals often allow content authors to modify or extend the ontologies which organize their site structure or page content. Lastly, one of the common uses of description logic reasoners is in ontology editors. Most editors do not do continuous reasoning while one is editing, relying on an analogue of the edit-compile-test loop of most programming environments. While there exists such use cases for reasoning under update, today’s description logic reasoning services have been developed considering relatively static knowledge bases. In this paper, we investigate the process of incrementally updating tableau completion graphs created during consistency checking in the expressive description logics SHOQ(D) and SHIQ(D), which correspond to a large subset of the W3C standard Web Ontology Language, OWL-DL. We present an algorithm for updating completion graphs under both the addition and removal of ABox assertions; this provides a critical step towards reasoning over fluctuating/streaming data, as it has been shown that in KBs with substantially sized ABoxes, consistency checking can dominate reasoning time. We also provide an empirical analysis of the optimizations through an experimental implementation in an open source OWL-DL reasoner, Pellet. Proceedings of DL 2006 2 201 Background DL tableau-based algorithms decide the consistency of an ABox A w.r.t a TBox T (by TBox, we are additionally referring to all axioms for properties) by trying to construct (an abstraction of) a common model for A and T, called a completion graph [5]. Formally, a completion graph for an ABox A with respect to ˙ ). Each node x ∈ V is labeled with a set T is a directed graph G = (V, E, L, 6= of concepts L(x) and each edge e = hx, yi with a set L(e) of role names. The ˙ is used for recording inequalities between nodes. This graph binary predicate 6= is constructed by repeatedly applying a set of expansion rules. For ABox updates, we consider addition and deletion of individual equality and inequality assertions x = y and x 6= y, concept assertions C (x ) and role assertions R(x , y). Updating ABox assertions in the presence of a TBox and an RBox brings up several issues with the semantics. For the purposes of this paper we use a straight-forward update semantics, which we call Edit Semantics. Intuitively, Edit Semantics can be described as an update in which all new ABox assertions are directly added (or removed) to the KB and no further changes/revisions are made. As the above example shows removing an assertion from the ABox under these semantics will not guarantee that the removed assertion will not be entailed anymore. Furthermore, an addition of a new axiom may cause inconsistencies in the KB as no additional changes can be made besides the addition or removal invoked by the update. Formally, we desribe this semantics as: Definition 1 (Edit Semantics) Let S be the set of assertions in an initial ABox A. Then under Edit Semantics, updating S with an an ABox addition (resp. deletion) α, written as A + α (resp. A − α), results in an updated set of ABox axioms S ′ such that S ′ = S ∪ {α} (resp. S ′ = S \ {α}). This semantics might be a little unintuitive (especially from a belief revision point of view) but real world use of the update semantics is directly present in ontology editors and many document-oriented servers, e.g. Semantic Web Service repositories. For example, an OWL-S Web Service description can be seen as a set of ABox assertions and publishing/retracting this service description to/from a repository would be typically done under Edit Semantics. Edit semantics additionally aligns with the Formula based update semantics defined in [9]. 3 Update Algorithm The goal of the algorithm presented here is to update a previously constructed completion graph in such a way that it is still a model of the KB (if one exists). 202 Regular Papers The approach presented here is applicable to the Description Logics SHOQ [3] and SHIQ [4], as the difference between the two completion algorithms is independent of the update algorithm. 3.1 ABox Additions Conceptually, tableau algorithms for SHOQ [3] and SHIQ [4] can be thought of as incremental in nature - expansion rules are applied in a non-deterministic manner to labels in the completion graph. Hence, new ABox assertions can be added even after previous completion rules have been fired for existing nodes and edges in the graph. After the addition, expansion rules can subsequently be fired for the newly added nodes, edges and their labels. In order to update a completion graph upon the addition of a type assertion, C(x), the algorithm first checks if the individual exists in the completion graph. If x 6∈ V, then x is added to V. Then C is added to L(x), if it does not already exist. If an individual inequality relation, x 6= y, is added to the completion graph, the algorithm checks if x ∈ V and y ∈ V. If either do not exists, then ˙ y, then it is they are added to the graph. Additionally, if the x 6= y 6∈ x6= added. Alternatively, if an individual equality relation, x = y, is added to the completion graph, the algorithm checks if x ∈ V and y ∈ V. If either do not exists, then they are added to the graph. Additionally, x and y are merged. Lastly, if a role, R(x, y), is added to the ABox and hx, yi 6∈ E, then hx, yi is added to E and R is added to L(hx, yi). If however, hx, yi ∈ E but R 6∈ L(e), then R is added to L(x). After the graph has been updated, the completion rules are reapplied to the updated completion graph, as the update may induce additional expansion rules to be fired. We note here that if there has previously been a deletion update, then previously explored branches which had a clash must be re-explored as the deletion could have removed the axiom which caused the clash. 3.2 ABox Deletions When updating a completion graph under ABox axiom removals, components (nodes, edges, labels, etc.) in the graph that correspond to the removed axiom cannot be simply removed. This is because as completion rules are applied, newly added portions of the graph are dependent on the presence of the original axioms in the KB. By deleting an ABox assertion, components of the graph that are dependent on that assertion need to be updated as well. In order to account for this, we propose using axiom pinpointing [6], which tracks the dependencies of graph components on original source axioms from the ontology through the tableau expansion process. More specifically, the application of the expansion rules triggers a set of events that change the state of Proceedings of DL 2006 203 the completion graph, or the flow of the algorithm. In [6] a set of change events is defined, including adding labels to nodes and edges, etc. In order to record the changes on the completion graph, [6] introduces a tracing function, which keeps track of the asserted axioms responsible for changes to occur. The tracing function, τ , maps each event e ∈ E to a collection of sets, each set containing a fragment of K (axioms) that cause the event to occur. This tracing function is maintained throughout the application of tableau expansion rules defined in [5]. For purpose of this work, the original set of change events has been extended [2] to include all possible events that can occur during the application of expansion rules. The extension of events includes removing nodes, edges, labels (in case of merges), adding nodes and edge, etc. Additionally the tracing function maintenance through expansion rule application has been extended. Although the tracing extension has been provided for SHOIQ, it is trivial to see how they are applied to SHIQ and SHOQ completion strategies. For brevity, further details are omitted, however they can be found in [2]. In general, the update algorithm for deletion works as follows. When an ABox axiom is removed, the algorithm performs a lookup in the graph for all change events whose axiom traces include the axiom number of the deleted axiom. These events are rolled-back if and only if their axiom trace sets only include sets which contain the deleted axiom, possibly among other axioms. By roll-back we refer to simply undoing (the inverse) the event (e.g., rolling back the event Add(x, V) would be the process of removing x from V). If there exists additional axiom traces for that particular event that do not include the removed axiom, then only the sets including the removed axiom are deleted from the axiom trace set; in this situation the actual event is not rolled-back. This is intuitive as there still exists support for that particular event. As in the approach for additions, the completion rules must be reapplied to the updated completion graph as it is possible for the graph to be incomplete for the KB. Axiom tracing additionally requires a slight modification to the update approach for ABox additions. For example, in the case that a individual type assertion is added to the KB, the algorithm must add a new tracing set to the axiom trace for the affected components (this set will consist of the new axiom number). The update algorithm (U P DAT E(G, α)) is provided in Figure 1. Note that deps (dependents) is the inverted tracing function index. 1 Additionally, the operator ∪ ∗ is defined as follows: let S1 = {S11 , ..., Sm } and 2 2 S2 = {S1 , ..., Sn } be two collections of sets, then: Si1 (1 ≤ i ≤ m) ∈ S1 ∪ ∗ S2 iff Si1 6⊂ Sj2 for all j, 1 ≤ j ≤ n 2 Sj (1 ≤ j ≤ n) ∈ S1 ∪ ∗ S2 iff Sj2 6⊂ Si1 for all i, 1 ≤ i ≤ m Due to space limitation soundness proofs for the update algorithm are omitted, however they can be found in a more detailed technical report1 . 1 Description Logic Reasoning for Dynamic ABoxes, UMIACS Technical Report. Available 204 Regular Papers function UPDATE( G, α ) if α is an addition then if α is a x 6= y or x = y then let op be the operation, such that op ∈ {=, 6=} if x 6∈ V then V ← V ∪ {x} if y 6∈ V then V ← V ∪ {y} if op is 6= then ˙ y then add it if x 6= y ∈ x6= if op is = then Merge x and y τ (x op y) ← τ (x op y) ∪ ∗ {{α}} τ (Add(x, V)) ← τ (Add(x, V)) ∪ ∗ {{α}} τ (Add(y, V)) ← τ (Add(y, V)) ∪ ∗ {{α}} deps(α) ← deps(α) ∪ {{x op y}{Add(x, V)}{Add(x, V)}} else if α is a individual type addition, (C(x)) then if x 6∈ V then V ← V ∪ {x} L(x) ← L(x) ∪ {C} τ (Add(x, V)) ← τ (Add(x, V)) ∪ ∗ {{α)}} τ (Add(C, L(x))) ← τ (Add(C, L(x))) ∪ ∗ {{α}} deps(α) ← deps(α) ∪ {{Add(x, V)}{Add(C, L(x))}} else if α is a role assertion addition, R(x,y) then if hx, yi 6∈ E then E ← E ∪ {hx, yi} L(hx, yi) ← L(e) ∪ {R} τ (Add(x, V)) ← τ (Add(x, V)) ∪ ∗ {{α)}} τ (Add(y, V)) ← τ (Add(y, V)) ∪ ∗ {{α)}} τ (Add(hx, yi, E)) ← τ (Add(hx, yi, E)) ∪ ∗ {{α)}} τ (Add(R, L(hx, yi))) ← τ (Add(R, L(hx, yi))) ∪ ∗ {{α}} deps(α) ← deps(α) ∪ {{Add(x, V)}{Add(y, V)}{Add(hx, yi, E)}{Add(R, L(hx, yi))}} Apply expansion rules to G if there is a clash then Perform backjumping else if α is a deletion then events ← deps(α) deps(α) ← ∅ for each e ∈ events do traces ← τ (e) for each t ∈ traces do if α ∈ t do traces ← traces \ t if traces = ∅ do roll-back e τ (e) ← traces Apply expansion rules to G if there is a clash then Perform backjumping return G Figure 1: Pseudo-code of update procedure for SHOQ(D) and SHIQ(D) ABoxes Proceedings of DL 2006 4 205 Implementation and Evaluation We have implemented the approach presented in this paper in an open source OWL-DL reasoner, Pellet 2 . In order to evaluate our update algorithm, we have performed an emperical evaluation using two different KBs with large ABoxes the Lehigh University Benchmark (LUBM)3 and AKT Reference Ontology 4 . Three tests were run over three KBs consisting of one, two, and lastly three universities from the LUBM dataset generator. First an initial consistency check was performed and then in each test, a random update was selected which was used to update the KB. In the regular version of the reasoner, the cached completion graph was discarded, while in the optimized reasoner the update algorithm was utilized. For each KB size, varying sized additions and deletions were randomly selected from the dataset. Update sizes include single axiom, twenty-five axioms, and fifty axioms (individual and/or role). Each test was performed twenty-five times and the results were averaged. Expressivity and KB statistics are provided in Table 1. Results for additions and removals in the LUBM Name Classes / Properties / Individuals / Assertions Expressivity LUBM-1 Univ 43 / 32 / 18,257 / 97,281 SHI LUBM-2 Univ 43 / 32 / 47,896 / 254,860 SHI LUBM-3 Univ 43 / 32 / 55,110 / 295,728 SHI AKT-1 160 / 152 / 16,505 / 70,948 SHIF AKT-2 160 / 152 / 32,926 / 143,334 SHIF Table 1: LUBM and AKT Portal Dataset Statistics test are presented in Figure 2 (timing results are shown in milliseconds and the scale is logarithmic). We note that the ’0’ axiom value represents the initial consistency check. In both versions of the reasoner, initial consistency checks are comparable. However for both update types, performance improvements ranging from one to three orders of magnitude are achieved under updates in the reasoner with the optimized update algorithm. This is due to the avoidance of re-firing of completion rules by maintaining the previous completion graph; therefore very few (if any in some cases) completion rules must be refired. This provides direct empirical evidence for the effectiveness of the update algorithm. In a second evaluation, two datasets5 adhering to the AKT Reference ontology were used (statistics shown in Table 1). The tests were structured in the same manner as the LUBM test. Again, each test was performed twenty-five times and the results are averaged over these iterations. All timings are in milliseconds and the scale is logarithmic. Similar to the LUBM test, update performance is at http://www.mindswap.org/papers/2006/aboxUpdateTR2006.pdf 2 Pellet OWL-DL Reasoner: http://www.mindswap.org/2003/pellet/ 3 LUBM Ontology: http://swat.cse.lehigh.edu/projects/lubm/ 4 AKT Ontology: http://www.aktors.org/publications/ontology/ 5 Hyphen-REA: http://www.hyphen.info/rdf/hero complete.zip 206 Regular Papers Figure 2: Addition and Removal Updates of LUBM and AKT datasets improved between one to three orders of magnitude. Note that the performance of the update is better in the LUBM test cases; this is primarily due to the increased complexity of the AKT Reference Ontology. Therefore, a larger number of expansion rules are applied after the update. However the update algorithm greatly outperforms the regular reasoner, again demonstrating the effectiveness and overall impact of the update algorithm. 5 Related Work and Conclusion To our knowledge there has been no previous work in DL reasoning algorithms for incremental maintenance of completion graphs. We do note that this work can be paralleled to view maintenance and truth maintenance; however we deal with a more expressive logic and a different proof theory. There has also been recent work in optimizing incremental instance retrieval in expressive description logics [1]; however previous work has not addressed the notion of updating the completion graphs for consistency checking. Additionally, in [7, 8] the authors specify update semantics for descriptions logics; however this work is less related to belief revision and is independent as we are concerned with maintaining the Proceedings of DL 2006 207 internal state of the reasoner. In this paper, we have presented an algorithm for updating completion graphs for the Description Logics SHIQ(D) and SHOQ(D) under both the addition and removal of ABox assertions, providing a critical step towards reasoning procedures for fluctuating or streaming data. We have provided an empirical analysis of the algorithm through an experimental implementation in the Pellet reasoner. Our initial results are very promising as they demonstrate orders of magnitude performance improvement. References [1] Volker Haarslev and Ralf Moller. Incremental query answering for implementing document retrieval services. In International Workshop on Description Logics, pages 85–94, 2003. [2] Christian Halaschek-Wiener, Aditya Kalyanpur, and Bijan Parsia. Extending tableau tracing for abox updates. In UMIACS Tech Report, 2006. http://www.mindswap.org/papers/2006/aboxTracingTR2006.pdf. [3] I. Horrocks and U. Sattler. Ontology reasoning in the SHOQ(D) description logic. In B. Nebel, editor, Proc. of the 17th Int. Joint Conf. on Artificial Intelligence (IJCAI 2001), pages 199–204. Morgan Kaufmann, 2001. [4] I. Horrocks, U. Sattler, and S. Tobies. Practical reasoning for expressive description logics. In Proc. of the 6th Int. Conference on Logic for Programming and Automated Reasoning (LPAR’99), number 1705 in Lecture Notes in Artificial Intelligence, pages 161–180. Springer-Verlag, 1999. [5] Ian Horrocks and Ulrike Sattler. A tableaux decision procedure for SHOIQ. In Proc. of the 19th Int. Joint Conf. on Artificial Intelligence (IJCAI 2005). Morgan Kaufman, 2005. [6] Aditya Kalyanpur, Bijan Parsia, Bernardo Cuenca-Grau, and Evren Sirin. Tableau tracing in shoin. UMIACS Tech Report. [7] H. Liu, C. Lutz, M. Milicic, and F. Wolter. Updating description logic aboxes. In International Conference of Principles of Knowledge Representation and Reasoning(KR), 2006. [8] Mathieu Roger, Ana Simonet, and Michel Simonet. Toward updates in description logics. In International Workshop on Knowledge Representation meets Databases, 2002. [9] M. Winslett. Updating logical databases. In Updating Logical Databases. Cambridge University Press, 1990. 208 Regular Papers Beyond Asserted Axioms: Fine-Grain Justifications for OWL-DL Entailments Aditya Kalyanpur1 and Bijan Parsia1 and Bernardo Cuenca Grau2 University of Maryland, USA1 , University of Manchester, UK2 aditya@cs.umd.edu, bparsia@isr.umd.edu, bcg@cs.man.ac.uk 1 Motivation The Ontology Engineering community widely agrees on the importance of helping the user understand the output of a DL reasoner. The most recent approaches to the problem [4] [3] are based on the notion of a Minimal Unsatisfiability Preserving SubTBoxes (MUPS). Roughly, a MUPS for an atomic concept A is a minimal fragment T ′ ⊆ T of a TBox T in which A is unsatisfiable. For example, given the TBox: 1: A ⊔ C ⊑ B ⊓ ∃R.D ⊓ E ⊓ ¬B, 2: C ⊑ F ⊔ ≥ 1.R 3: A ⊑ E ⊓ ∀R.¬D, 4: B ⊑ ¬D ⊔ E where the concept A is unsatisfiable, the TBox T ′ = {1} is a MUPS for A in T . In our earlier work [2], we extended the notion of a MUPS to arbitrary entailments in SHOIN and devised a non-standard inference service, axiom pinpointing, which, given T any of its logical consequences α, determines the minimal fragments of T in which α holds. However, these services, though useful for debugging and explanation purposes, suffer from a fundamental granularity problem: since they work at the asserted axiom level, they fail to determine which parts of the asserted axioms are irrelevant for the particular entailment under consideration to hold. For instance, in our example, the conjunct E in axiom 1 is irrelevant for the unsatisfiability of A. Moreover, additional parts of axioms that could contribute to the entailment are masked, e.g., the axioms 1, 3 can be broken down into A ⊑ ∃R.D and A ⊑ ∀R.¬D which also entail the unsatisfiability of A, however, this condition cannot be captured. In this paper, we aim at extending the axiom pinpointing service to capture precise justifications, which are at a finer granularity level than the original asserted axioms. In this context, we provide a formal notion of precise justification and propose a decision procedure for the problem. We discuss implementation details of the service Proceedings of DL 2006 209 and show that it is feasible in practice. Our results are applicable to SHOIN and hence to OWL-DL. 2 Precise Justifications Since we aim at identifying relevant parts of axioms, we define a function that splits the axioms in a TBox T into “smaller” axioms to obtain an equivalent TBox Ts that contains as many axioms as possible. Definition 1 (split KB) Given a SHOIN concept C in negation normal form (NNF), the function split(C) returns a set of concepts, inductively defined as follows: split(C) ← C, if C is A, ¬A, ≥ n.R, ≤ n.R, = n.R, ⊤, ⊥ or a nominal node {o} split(C ⊓ D) ← split(C) ∪ split(D) split(C ⊔ D) ← (split(C) ⊗⊔ split(D)) Q split(∀R.C) ← ∀R. (split(C)) split(∃R.C ′ ) – we get two cases depending on C ′ if C ′ is of the form C ⊓ D, split(∃R.C ′ ) ← ∃R.E ∪ split(¬E ⊔ C) ∪ split(¬E ⊔ D) ∪ split((¬C ⊔ ¬D) ⊔ E), where E is a fresh concept else, Q split(∃R.C ′ ) ← ∃R. split(C ′ ) Given a KB = {α1 , α2 , ...αn }, where each axiom αi is of the form Ci ⊑ Di , let Cα be the concept representing α, i.e., ¬Ci ⊔ Di , converted to NNF. Then, Ts = P split KB() = ⊤ ⊑ Cs for each concept Cs ∈ split(¬C1 ⊔ D1 ) ∪ split(¬C2 ⊔ D2 )..split(¬Cn ⊔ Dn ). The idea of the above function is to rewrite the axioms in in a convenient normal form and split across conjunctions in the normalized version, e.g., rewriting A ⊑ C ⊓ D as A ⊑ C, A ⊑ D.1 In some cases, we are forced to introduce new concept names, only for the purpose of splitting axioms into smaller sizes (which prevents any arbitrary introduction of new concepts); for example, since the axiom A ⊑ ∃R.(C ⊓ D) is not equivalent to A ⊑ ∃R.C, A ⊑ ∃R.D, we introduce a new concept name, say E, and transform the original axiom into the following set of “smaller” axioms: A ⊑ ∃R.E, E ⊑ C, E ⊑ D, C ⊓ D ⊑ E. Table 1 shows an algorithm to split a TBox based on the above definition. In this algorithm, we also keep track of the correspondence between the new axioms and the axioms in T by using a function σ. 1 Note that the ⊗⊔ operator generates a cross-productQ of disjunctions, e.g, split((A ⊓ B) ⊔ (C ⊓ D)) = {(A ⊔ C), (A ⊔ D), (B ⊔ C), (B ⊔ D)}; and the operator applies the set of concepts to the preceding universal or existential operator, e.g., split(∀R.(B ⊓ (C ⊔ D))) = {∀R.B, ∀R.(C ⊔ D)}. 210 Regular Papers Algorithm: Split KB Input: TBox T Output: TBox Ts , Axiom Correspondence Function σ Ts ← ∅ initialize axiom correspondence function σ initialize substitution cache for each subclass axiom α ∈ T from α := C ⊑ D generate Cα := ¬C ⊔ D normalize Cα to NNF (pushing negation inwards) Ts ← Ts ∪ {⊤ ⊑ Cα } σ({⊤ ⊑ Cα }) ← α while there exists an axiom {⊤ ⊑ Cα } ∈ Ts s.t. can-split(Cα ) 6= ∅, Ts ← Ts − {⊤ ⊑ Cα } hT, v, π, A, Bi ← can-split(Cα ) if Lt (h≺t (v), vi) 6= ∃R, then CA ← Cα [A]π ; σ(CA ) ← σ(CA ) ∪ σ(Cα ); Ts ← Ts ∪ {⊤ ⊑ CA } CB ← Cα [B]π ; σ(CB ) ← σ(CB ) ∪ σ(Cα ); Ts ← Ts ∪ {⊤ ⊑ CB } else if cache(A ⊓ B) = ∅, then let E be a new concept not defined in Ts Ts ← Ts ∪ {E ⊑ A, E ⊑ B, A ⊓ B ⊑ E} cache(A ⊓ B) ← E else E ← cache(A ⊓ B) CE ← Cα [E]π ; σ(CE ) ← σ(Cα ); Ts ← Ts ∪ {⊤ ⊑ CE } subroutine: can-split(Cα ) let T = (Wt , ≺t , Lt ) be the parse tree for the disjunction Cα if there exists a node v ∈ Wt in T s.t. Lt (v) = ⊓ with children A, B let π be the position of node v return hT, v, π, A, Bi else return ∅ Table 1: Splitting a TBox A justification is a generalization of the notion of a MUPS for arbitrary entailments: Definition 2 (Justification) Let T |= α where α is an axiom. A fragment T ′ ⊆ T is a justification for α in T if T ′ |= α, and T ′′ 6|= α for every T ′′ ⊂ T ′ . We denote by JUST(α, T ) the set of all justifications for α in T . Finer-grained justifications can be defined as follows: Definition 3 (Precise Justification) Let T |= α. A TBox T ′ is a precise justification for α in T if T ′ ∈ JUST(α, split TBox(T )). We denote by JUSTp (α, T ) the set of all precise justifications for α in T . In SHOIN , entailment can be reduced to concept unsatisfiability. As a consequence, it is easy to show that the problem of finding all the justifications for an Proceedings of DL 2006 211 unsatisfiable concept and the problem of finding all the justifications for a given entailment can be reduced to each other. In what follows, we shall restrict our attention, without loss of generality, to the problem of finding all the precise justifications for an unsatisfiable concept w.r.t to a SHOIN TBox. 3 Finding Precise Justifications The problem of finding all precise justifications for an entailment α of a TBox T now reduces to the problem of finding all justifications for α in the split T Box(T ). Thus, we can use the algorithm listed in Table 1 to split a TBox, and then apply any decision procedure to find all justifications for the entailment in the split version of the TBox. We briefly sketch the algorithm we have developed in our earlier work to find all justifications for an arbitrary entailment in a TBox. For details, we refer the reader to the technical report [2]. The first part of the algorithm is based on the decision procedure for concept satisfiability in SHOIN [1], and it finds any one arbitrary justification for the entailment. It keeps track of the axioms from the TBox responsible for each change in the completion graph, namely, the addition of a particular concept (or role) to the label of a specific node (or edge), the addition of an equality (merge) or inequality relation between nodes, or the detection of a contradiction (clash) in the label of a node. In order to ensure correctness, our algorithm imposes an ordering among the deterministic rules: the unfolding and CE rules are only applied when no other deterministic rule is applicable. The rationale for this strategy relies on the definition of justification that establishes minimality w.r.t. the number of axioms considered; the new rules cause new axioms to be considered in the tracing process and additional axioms should only be considered if strictly necessary. The algorithm works on a tree T of completion graphs. that is incrementally built using the set of available expansion rules, and the traces for the events triggered by the rules are updated on the fly. For a full specification of the expansion rules, we refer the reader to [2]. The application of non-deterministic rules results in the addition of new completion graphs as leaves of T, one for each different non-deterministic choice. However, since C is unsatisfiable w.r.t. T , the algorithm detects a clash in each of the leaves. Upon termination, the trace of the detected clash (or clashes) in the leaves of T yields a justification. Once a single justification has been found, we find the remaining justifications by employing a variation of the classical Hitting Set Tree (HST) algorithm. Given a collection S of conflict sets, Reiter’s algorithm constructs a labeled tree called Hitting Set Tree (HST). Nodes in an HST are labeled with a set s ∈ S and: 1) if H(v) is the set of edge labels on the path from the root to the node v, then L(v) ∩ H(v) = ∅; 2) for each σ ∈ L(v), v has a successor w and L(hv, wi) = σ; 3) if L(v) = ∅, then H(v) is a hitting set for S. 212 Regular Papers In our approach, we form an HST where nodes correspond to single justification sets (computed on the fly), edges correspond to the removal of axioms from the KB, and in building the tree to compute all the minimal hitting sets, we in turn obtain all the justification sets as well. The correctness and completeness of this approach is provided in [2]. 3.1 Optional Post-Processing Having derived the justifications for the entailment A ≡ ⊥ in the maximally split version of KB T , we remove any term in a justification set that was introduced in the KB in step 1 using the procedure described in Table 2. The output of this stage gives us precise justifications for the entailment in terms of sub-axioms. Algorithm: Remove New Terms Input: Collection of Axiom Sets J , Original KB T Output: J for each axiom set j ∈ J do, while there exists a term C ′ ∈ vocab(j) s.t. C ′ ∈ / vocab(T ), do S←∅ for each axiom C ′ ⊑ Ci ∈ j, do S ← S ∪ Ci if S 6= ∅, then C ← C1 ⊓ C2 ⊓ ..Cn (for all Ci ∈ S) else C←⊤ substitute C ′ with C in j Table 2: Post-Processing 3.2 Example We now present a detailed example to demonstrate how the algorithm finds precise justifications correctly. Consider a KB T composed of the following axioms: 1. A ⊔ B ⊑ ∃R.(C ⊓ ¬C) ⊓ D ⊓ E 2. A ⊑ ¬D ⊓ B ⊓ F ⊓ D ⊓ ∀R.⊥ 3. E ⊑ ∀R.(¬C ⊓ G) Note, vocab(T ) = {A, B, C, D, E, F, R}, and the concept A is unsatisfiable w.r.t T. Given A, T as input, the algorithm proceeds as follows: Step 1: After pre-processing, we obtain a maximally split equivalent KB Ts : Ts = {A ⊑ ∃R.H 1 ; B ⊑ ∃R.H 1 ; A ⊑ D1,2 ; B ⊑ D1 ; A ⊑ E 1 ; B ⊑ E 1 ; H ⊑ C 1 ; H ⊑ ¬C 1 ; A ⊑ ¬D2 ; A ⊑ B 2 ; A ⊑ F 2 ; A ⊑ ∀R.⊥2 ; E ⊑ ∀R.¬C 3 ; E ⊑ ∀R.G3 }. Proceedings of DL 2006 213 The superscript of each axiom in Ts denotes the corresponding axiom in T that it is obtained from. This correspondence is captured by the function σ in the SplitKB algorithm (see Table 1). Notice that the superscript of the axiom A ⊑ D in Ts is the set {1, 2} since it can be obtained from two separate axioms in T . Also, we have introduced a new concept H in the split KB, which is used to split the concept ∃R.(C ⊓ ¬C) in axiom 1. Step 2: Now, we obtain the justifications for the unsatisfiability of A w.r.t Ts . This gives us the following axiom sets J: J = {{A ⊑ ∃R.H 1 , H ⊑ C 1 , H ⊑ ¬C 1 }; {A ⊑ D1,2 , A ⊑ ¬D2 }; {A ⊑ ∃R.H 1 , H ⊑ C 1 , A ⊑ E 1 , E ⊑ ∀R.¬C 3 }; {A ⊑ ∃R.H 1 , A ⊑ ∀R.⊥2 }} Step 3: Finally, we remove the concept H introduced in Ts from the justification sets in J to get: T ′ = {{A ⊑ ∃R.(C⊓¬C)1 }; {A ⊑ D1 , A ⊑ ¬D2 }; {A ⊑ D2 , A ⊑ ¬D2 }; {A ⊑ ∃R.C 1 , A ⊑ E 1 , E ⊑ ∀R.¬C 3 }; {A ⊑ ∃R.⊤1 , A ⊑ ∀R.⊥2 }} As can be seen, the final output is the complete set of precise justifications for A ≡ ⊥ in T . 4 Implementation Issues We have shown in [3], [2] that the axiom pinpointing service used to find all justifications for an entailment of a SHOIN KB performs reasonably well on a lot of real-world OWL-DL ontologies. The main additional overhead incurred for capturing precise justifications is due to the pre-processing phase where we split the KB. The concern here, from a reasoning point of view, is the introduction of GCIs during the splitting process, e.g. A ≡ B ⊓ C is replaced by (among other things) B ⊓ C ⊑ A. Even though these GCIs are absorbed, they still manifest as disjunctions and hence adversely affect the tableau reasoning process. 2 Alternately, a more optimal implementation is the following: instead of splitting the entire KB beforehand, we can perform a lazy splitting of certain specific axioms (on the fly) in order to improve the performance of the algorithm. The modified algorithm with lazy splitting becomes: • Given A unsatisfiable w.r.t T , find a single justification set, J ∈ JUST(A ≡ ⊥, T ) • Split axioms in J to give Js . Prune Js to arrive at a minimal precise justification set Jp 2 In this case, it is possible to introduce a new absorption rule in the reasoner which would transform axioms of the form B ⊑ A, C ⊑ A, B ⊓ C ⊑ A to A ≡ B ⊓ C internally. This obviously seems odd given that we split the KB initially and re-combine axioms back in the reasoner, but note that the goal here is finding precise justifications. 214 Regular Papers • Replace J by Js in T . • Form Reiter’s HST using Jp as a node, with each outgoing edge being an axiom α ∈ Jp that is removed from T The advantage of this approach is that it only splits axioms in the intermediate justification sets in order to arrive at precise justifications, and re-inserts split axioms back into the KB dynamically. For details of the procedure, see [2] 5 Conclusion and Future Work We have implemented the axiom pinpointing service in the OWL-DL reasoner, Pellet, and exposed it in the OWL Ontology Editor, Swoop. We are in the process of extending it to capture precise justifications. From a UI perspective, maintaining the correspondence between the subaxioms in the precise justification and the original asserted axioms is useful, as it allows us to strike out irrelevant parts of the axioms directly, which is helpful to understand the entailment better. (see Figure 5). As future work, we plan to optimize the implementation and do a thorough performance and usability evaluation. Figure 1: Justification for MaleStudentWith3Daughters ⊑ Person in the Koala OWL Ontology References [1] Ian Horrocks and Ulrike Sattler. A tableaux decision procedure for SHOIQ. In Proc. of IJCAI 2005, 2005. [2] Aditya Kalyanpur, Bijan Parsia, Bernardo Cuenca, and Evren Sirin. Axiom pinpointing: Finding (precise) justifications for arbitrary entailments in OWL-DL, 2006. Available at http://www.mindswap.org/papers/2006/AxiomPinpointing.pdf. [3] Aditya Kalyanpur, Bijan Parsia, Evren Sirin, and James Hendler. Debugging unsatisfiable classes in OWL ontologies. J. of Web Semantics, Vol 3, Issue 4, 2005. [4] S. Schlobach and R. Cornet. Non-standard reasoning services for the debugging of description logic terminologies. In Proc. of IJCAI, 2003, 2003. Proceedings of DL 2006 215 Optimizations for Answering Conjunctive ABox Queries: First Results Evren Sirin and Bijan Parsia Maryland Information and Network Dynamics Lab, 8400 Baltimore Avenue, College Park, MD, 20740 USA evren@cs.umd.edu, bparsia@isr.umd.edu 1 Introduction Conjunctive query answering is an important task for many applications on Semantic Web. It is important to efficiently answer queries over knowledge bases with large ABoxes. Although answering conjunctive queries has been studied from a theoretical point of view, until very recently, there was no reasoner supporting such functionality. As a result, there is not enough implementation experience and optimization techniques developed far answering conjunctive queries. In this paper, we address the problem of answering conjunctive ABox queries efficiently without compromising soundness and completeness. Our focus is on answering queries asked against a very large ABox. We consider queries with only distinguished variables. We focus on the case of distinguished variables because such queries can be answered more efficiently and such queries occur more frequently in realistic scenarios. We start with the discussion of answering atomic ABox queries and then describe a sound and complete conjunctive query answering algorithm. We then present optimization methods to improve the query evaluation analogous to the optimization methods developed and studied in the context of relational databases. We discuss how the ordering of query evaluation can affect performance, describe some simple yet effective metrics of evaluating the cost of a given ordering and present some heuristics to find (near-)optimal orderings. In the end, we show that the cost model we described provides a sufficiently accurate approximation to the actual query answering time. 2 Answering Atomic ABox Queries Retrieving Instances The ground query C(a), so-called instance check, is answered by adding the negated statement ¬C(a) to the ABox and checking for (in)consistency. 216 Regular Papers Pseudo model merging technique [2] can be used to test if the pseudo-model of the individual can be merged with pseudo-model of the negated concept ¬C to detect obvious non-instances without doing a consistency test. The naive way to answer the unground atomic query C(x), so-called instance retrieval, is to iterate over all the individuals in the ABox and do a consistency check when the above methods fail to detect an obvious instance or non-instance. Generally, most of the remaining individuals are non-instances and would not cause an inconsistency when the negated statement is added to the KB. Binary instance retrieval technique presented in [1] exploits this characteristic and combines many instance checks in one ABox consistency test. If there is no inconsistency all candidates are proven to be non-instances, otherwise the method splits the set of candidates into two sets and continues. The effectiveness of binary instance retrieval is maximized if obvious instances are found upfront and not put into the candidate list. Model merging technique can be used to detect obvious instances by caching dependency set information in the pseudo models. Model merging technique checks for possible interactions between models but finding a clash between models does not mean these models are not mergable because the clash might depend on a non-deterministic choice in tableau completion. There might be other completions of the ABox without the clash. Using the cached dependency set information in pseudo models distinguish a deterministic clash form others and identifies where the models cannot be combined in any possible completion meaning that the the individual is necessarily an instance of the concept. One case where finding obvious instances fails is the case of defined concepts. Suppose a concept C is defined as C ≡ D ⊓ ∃p.A. Any instance of D that is related to an A instance with a p role is also an instance of C. Unfortunately, above methods would fail to detect such a case. If we are trying to find the instances of a defined concept then breaking up the concept description and applying the above method would help us to find an instance without doing a consistency check. This technique has proved to be very effective in our experiments. Retrieving Role Fillers In OWL-DL, the role constructors are much less expressive compared to concept constructors. Therefore, verifying p(a, b) holds only if in the original ABox it is asserted that a and b is related by p or one of its subroles. The interactions between the role hierarchy and number restrictions invalidate this assumption, e.g. a super role assertion combined with cardinality restrictions may cause the relation to hold. Transitive roles complicate the situation even more, now a path between individuals is enough for the relation to hold. Having nominals in the KB completely makes things even more complicated as nominals might relate individuals from disconnected parts of the ABox. Even if asserted facts in the ABox does not help to find identify all the role assertions between individuals, the completion graph generated for the ABox consistency test can be used to find obvious relations and non-relations. There might be a rela- Proceedings of DL 2006 217 tion between disconnected individuals only if such a relation occurs in every model. This suggests by examining the completion graph we can still detect non-relations because if two individuals are disconnected in a completion graph then there is at least one model they are not related and the entailment does not hold. The details of this approach can be found in [4] where we have described this technique in detail for detecting non-subsumptions between concepts. After finding all obvious relations and non-relations, one might still be left with some possible candidates that might or might not be related. At this point, we can reduce the query p(x, a) (resp. p(a, x)) to an instance retrieval query for concept ∃p.{a} (resp. ∃p− .{a}). If both arguments in the query are unground as in p(x, y), then we first need to generate all candidates for x and then use the above techniques to find corresponding y values. 3 Answering Conjunctive Queries In this section, we consider answering arbitrary conjunctive queries. W.l.o.g. we assume the query graph is connected. For queries with disconnected components, we can answer each component separately and then take the Cartesian product of generated solutions. 3.1 Query Answering Algorithm The pseudo-code of the conjunctive query answering algorithm is given in Figure 1. The algorithm simply iterates through all the atoms in the query and either generates bindings for a variable or tests if the previous bindings satisfy the query atom. Generating bindings are done by invoking the instance retrieval function retrieve which in turn might perform several consistency checks as described earlier. Theoretically, testing the satisfaction of a query atom might also require a consistency check. However, as explained in the previous section, most of these tests can be answered without doing a consistency test. Especially, the retrieval operations regarding the role assertions, e.g. retrieve(∃p.{u}), do not typically require any consistency check. Initially the algorithm is invoked by AnswerQuery(K, A, ∅, ∅) where A is an ordering of the atoms in the query. The correctness of this algorithm is quite clear as the satisfaction of every binding is reduced to KB entailment. Thus, this is a sound and complete procedure for answering conjunctive queries. The efficiency of this algorithm depends very much on the order query atoms are processed. For example, in the query C(x) ∧ p(x, y) ∧ D(y), suppose C has 100 instances, each instance has one p value and D has 10.000 instances. The ordering [C(x), p(x, y), D(y)] would be much more efficient compared to the ordering [D(x), p(x, y), C(y)]. We would do one instance retrieval operation to get 100 instances, find the corresponding p values and test whether these are D instances. The 218 Regular Papers function AnswerQuery(K, A, B, Sol) input K is the input KB, A is a list of query atoms, B is the binding built so far, Sol is the set of all bindings that satisfy the query if A = [ ] then return Sol ∪ {B} Let a = first(A) and R = rest(A) Substitute the variables in a based on the bindings in B if a = C(v) and K |= C(v) then return AnswerQuery(K, R, B, Sol) if a = C(x) then for each v ∈ retrieve(C) do Let Sol = AnswerQuery(R, B ∪ {x ← v}, Sol) if a = p(v, u) and K |= p(v, u) then return AnswerQuery(K, R, B, Sol) if a = p(x, v) (resp. p(v, x)) then for each u ∈ retrieve(∃p.{v}) (resp. u ∈ retrieve(∃p− .{v})) do Let Sol = AnswerQuery(K, R, B ∪ {x ← u}, Sol) if a = p(x, y) then for each v ∈ retrieve(∃p.⊤) do for each u retrieve(∃p.{v}) do Let Sol = AnswerQuery(R, B ∪ {x ← u} ∪ {y ← u}, Sol) return Sol Figure 1: Pseudo-code for the conjunctive query answering algorithm second ordering, on the other hand, requires us to iterate over 10.000 individuals and check for a p− value that does not exists for most d instances. 3.2 Cost-based Query Reordering There are several important challenges to finding an optimal query reordering. In query optimization for relational databases, the main objective is to find an optimal join order and generally the bottleneck is reading data from disk. In a DL reasoner, the most costly operation is consistency checking so we should try to minimize the number of consistency checks performed. There are two parameters that will help us to estimate the cost of answering a query. First we need to estimate how costly an atomic query is, e.g. for an instance retrieval query, estimate how long it will take to find all the instances, and then estimate the size of results, e.g. how many instances a concept has. These two parameters are interdependent to some degree. For example, if C has 100.000 instances and D has only 10 instances, retrieving C instances can be more costly. However, this is not always true because all the 100.000 individuals might be considered as possible D instances (if the methods described in Section 2 fail) and force us to do expensive consistency tests. For this reason, there is no easy way of estimating these parameters that would work for different ontologies. In the implementation section, we will briefly describe some preliminary methods we devised to compute these parameters. For now, we will assume that for each atomic query type there are cost functions Cir (C), Cic (C), Crr (r) and Crc (r) that returns the cost of instance retrieval for concept Proceedings of DL 2006 219 C, the cost of a single instance checking for concept C, the cost of role filler retrieval for role r and the cost of verifying a role filler for role r, respectively. Note that, we are assuming the cost of instance checking for a concept is same for all the different individuals in the KB. This assumption may not be very accurate but considering that we will typically deal with large number of individuals, it is not practical to compute estimates for every individual. In addition, we need to estimate the number of instances of a concept and how many role fillers exist for a given individual and a role. Assuming the size estimates are computed at a preprocessing step, we will use |C| to denote the number of C instances and |p| to denote the total number of tuples in p relation. The average number of p fillers for an individual is denoted by avg(p) and computed as |p|/|∃p.⊤|. Given the parameters for the cost computation and the size estimates, algorithm described in Figure 2 computes an estimate for the cost of query answering for a certain ordering. Cost estimation is linear in the number of query atoms, provided that size estimates are already computed. However, there are exponentially many orderings to try so an exhaustive search would still be very expensive. Again, as in relational databases, it is possible to use some heuristics to prune the search space. The heuristics we use are: 1) For each atom at position i > 1 in the ordered list, there should be at least one atom at position j < i s.t. two atoms share at least one variable. 2) Atoms of the form p(x, v) and p(v, x) should appear before other atoms involving x. 3) An atom of the form C(x) should come immediately after the first atom that contains x. First rule is similar to the general query optimization rule that cross products should be avoided. Second rule makes use of the fact that generally an individual is related to limited number of other individuals. And the last rule is to discard the orderings such as [C(x), p(x, y), q(y, z), D(y)]. This ordering is not desirable because if p(x, y) finds a binding for y such that D(y) is not satisfied, we would unnecessarily retrieve the q fillers before realizing the failure. function EstimateCost(A, B) if A = [ ] then return 1 Let a = first(A) and R = rest(A) if a = C(x) and x ∈ B then return Cic (C) + EstimateCost(R, B) if a = C(x) and x 6∈ B then return Cir (C) + |C| ∗ EstimateCost(R, B ∪ {x}) if a = p(x, y) and {x, y} ⊆ B then return Crc (p) + EstimateCost(R, B) if a = p(x, y) and {x, y} ∩ B = {x} then return Crr (p) + avg(p) ∗ EstimateCost(R, B ∪ {y}) if a = p(x, y) and {x, y} ∩ B = {y} then return Crr (p) + avg(p− ) ∗ EstimateCost(R, B ∪ {x}) if a = p(x, y) and {x, y} ∩ B = ∅ then return Cir (∃p.⊤) + |p| ∗ Crr (p) ∗ EstimateCost(R, B ∪ {x, y}) Figure 2: Pseudo-code for estimating the cost of an ordering 220 Regular Papers 3.3 Query Simplification In some cases there might be redundant axioms in a query that can be safely removed from the query without affecting the results. For example, if C ⊑ D then the query C(x) ∧ D(x) is logically equivalent to query C(x). Such redundant atoms do not cause to make additional consistency tests (methods described in Section 2 are quite effective for these cases) but even repeating computationally cheap operations many times causes a noticeable overhead in the end. The idea behind query simplification is to discover redundant atoms with cheap concept satisfiability tests. But performing too many concept satisfiability tests for simplifications that do not occur frequently in queries is wasteful. For example, simplification based on subsumption of named concepts and roles are nearly never applicable in real world queries or in the benchmarking problems for query answering. We have pinpointed the following two common query simplifications: • Simplify C(x) ∧ p(x, y) ∧ D(y) to – p(x, y) ∧ D(y) if ∃p.⊤ ⊑ C (Domain simplification) – C(x) ∧ p(x, y) if C ⊑ ∀p.D (Range simplification) Note that range simplification can also be done even if one of the atoms C(x) or D(y) is missing since we can simply insert ⊤(x) or ⊤(y) as an additional atom. In such cases global domain/range restrictions of properties can be directly used and simplification can be done with no subsumption test. 4 Implementation and Experimental Evaluation The optimization techniques described in this paper have been fully implemented in OWL-DL reasoner Pellet. Right now, size estimation for concepts is done by inspecting the completion graph generated by the initial ABox consistency test. Due to space constraints we will only outline the size estimation algorithm w.r.t concepts but the general idea is same for roles, too. The size estimation algorithm iterates over a random sample of individuals in the ABox and for each concept tries to determine if this individual is an instance of the given concept without doing a consistency check. The techniques described in Section 2 might return true, false, or unknown. A result of unknown means that the individual may or may not be an instance but the reasoner cannot conclude without a consistency test. In such cases, we estimate that with probability κ such individuals would indeed be instances of that concept. Thus, the total estimate for a concept is |C| = σ ∗ (|Cknown | + κ ∗ |Cunknown |) where σ is the sampling ratio. We also use |Cunknown | to have an estimate about Cir (C) and Cic (C). If |Cunknown | = 0 then it means that all the individuals can be retrieved without any consistency test. As |Cunknown | increases Cir (C) would typically increase. Of course there are other factors affecting Cir (C) but these are not yet considered in our implementation. 221 Proceedings of DL 2006 In our experiments, we first tested the accuracy of the size estimation. For this purpose, have used the data from Lehigh University Benchmark (LUBM) [5] and ontologies Vicodi and Semintec from [3]. The following tables show the number of individuals in each dataset, the time spent for estimating the size of all the concepts in each dataset, and the mean normalized error over all concepts in the given ontology. For example, an error of 3.6 means that if the actual number of instances for a concept was 200, the algorithm returned 200 ± 7.2. We have changed the sampling percentage from %20 to %100. Dataset LUBM Semintec Vicodi Sampling Percentage Size %20 %40 %60 %80 %100 55664 3.6 6.7 9.7 11.8 15.0 17941 0.9 1.6 2.4 3.2 3.9 16942 1.8 3.4 5.1 6.9 8.6 (a) Time spent in seconds Sampling Percentage Dataset %20 %40 %60 %80 %100 LUBM 0.7 0.3 0.6 0.4 0.0 Semintec 6.4 4.4 4.9 3.7 0.0 Vicodi 18.5 11.3 7.6 4.7 0.9 (b) The mean normalized error As expected, error in size estimation decreases as we inspect more and more individuals. More interestingly, for these ontologies, sizes can be computed with perfect accuracy if all the individuals are inspected. However, computation time also increases. Looking at these results we decided to use a sampling ratio of %20 which yields fairly accurate results with reasonable computation time. Next, we looked at the effectiveness of the cost model defined in this paper. Query ordering has a significant effect especially when there are many atoms in the query. Therefore, we used three conjunctive queries, Q2 (6 atoms), Q8 (5 atoms), Q9 (6 atoms), from LUBM and Q2 (5 atoms) from Semintec and Q2 (3 atoms) from Vicodi. We generated all the possible query orderings, pruned the orderings based on the aforementioned heuristics and computed the time to answer each query with that ordering. Figure 3 shows the scatter plot of different query orderings where X axis is the estimated cost and Y axis is the actual time it took to generate the answers. The correlation factor for each query is different ranging from low (∼ 0.5) to perfect score (= 1). More importantly, in each case, the lowest-cost query ordering found by the estimation algorithm is very close to the optimal value. Next table shows these results in more detail and displays query evaluation time (in milliseconds) for the minimum cost ordering, the minimum time ordering, the Figure 3: The correlation between the cost estimates and the actual query evaluation time. Each data point represents a different ordering of the corresponding query. Note that, due to simplification and heuristic pruning, number of data points is less than all possible orderings. 222 Regular Papers maximum time ordering and the median of all orderings (still excluding the heuristically pruned orderings). Although the minimum cost ordering does not always take minimum time, we can still see that the improvement in query evaluation time compared to an arbitrary ordering can be more than one order of magnitude. Min Cost Ordering Min Time Ordering Median Max Time Ordering 5 LUBM Q2 20 10 1183 1233 LUBM Q8 320 285 341 348 LUBM Q9 227 164 311 400 Semintec 100 100 135 140 Vicodi 81 81 255 2123 Conclusion and Discussion In this paper, we have described several different techniques to improve conjunctive query answering for DL reasoners. The query answering algorithm and the optimization techniques we describe do not compromise the soundness and completeness of the reasoner. Furthermore, the additional memory requirement is minimal (linear in the size of TBox but independent of the size of ABox). Our preliminary experimental evaluation shows that the preprocessing time spent for cost estimation is quite reasonable and Pellet can very efficiently answer conjunctive queries over large ABoxes. There are many open issues left for future work. We are investigating how to estimate the atomic query costs more accurately. Secondly, it is not clear to what extent the effectiveness of our techniques depend on the knowledge base and the query. For our experiments, we picked benchmark datasets that were used in recent publications and considered to be realistic. We are now looking into the evaluation of our techniques on datasets with different characteristics, typically with more complicated TBox components. References [1] V. Haarslev and R. Möller. Optimization techniques for retrieving resources described in OWL/RDF documents: First results. In Proc. KR 2004, 2004. [2] V. Haarslev, R. Möller, and A.Y. Turhan. Exploiting pseudo models for TBox and ABox reasoning in expressive description logics. In IJCAR 2001, Italy, 2001. [3] B. Motik and U. Sattler. Practical DL reasoning over large ABoxes with KAON2. In Proc. KR-2006, 2006. [4] Evren Sirin, Bernardo Cuenca Grau, and Bijan Parsia. From wine to water: Optimizing description logic reasoning for nominals. In Proc. KR-2006, 2006. [5] Z. Pan Y. Guo and J. Heflin. LUBM: A benchmark for OWL knowledge base systems. Journal of Web Semantics, 3(2):158–182, 2005. 223 Proceedings of DL 2006 Model checking the basic modalities of CTL with Description Logic Shoham Ben-David Richard Trefler Grant Weddell David R. Cheriton School of Computer Science University of Waterloo Abstract. Model checking is a fully automated technique for determining whether the behaviour of a finite-state reactive system satisfies a temporal logic specification. Despite the fact that model checking may require analyzing the entire reachable state space of a protocol under analysis, model checkers are routinely used in the computer industry. To allow for the analysis of large systems, different approaches to model checking have been developed, each approach allowing for a different class of systems to be analyzed. For instance, some model checkers represent program state spaces and transitions explicitly, others express these concepts implicitly. The determination of which flavour best suits a particular model must often be left to experimentation. Description Logic (DL) reasoners are capable of performing subsumption checks on large terminologies. In this paper, we show how to perform explicit state model checking with a DL reasoner. We formulate the check that a reactive system satisfies a temporal specification as a consistency check on a terminology in the DL ALC and demonstrate our method on an example. 1 Introduction Model checking [4] (cf. [5]) is a fully automated technique for verifying that the behaviour of a finite-state reactive system satisfies a temporal logic specification. As such, it is extremely useful in verifying important aspects of safety critical reactive systems. The main challenge in this area, known as the state explosion problem, arises because systems may have short textual descriptions encoding exponentially larger state spaces that are analyzed by the model checker. While model checking techniques are widely used in industry [1, 6, 11], methods of attacking the state explosion problem and increasing the applicability of this technique are of substantial interest. Given a finite state model M (a non-deterministic Kripke structure), a model checker verifies that the behaviours of M satisfy a temporal logic specification ϕ, typically given in Computation Tree Logic (CTL) [4], i.e. M |= ϕ.1 The following is a typical specification: it is always the case that at most one of several concurrent processes has access to a shared resource. Letting ci indicate that process i has access to the shared resource of interest, the specification is expressed succinctly in CTL as AG¬(c1 ∧ c2 ). Here, the basic modality AG is composed of two temporal operators A, representing all future paths, and G, representing all states on a path. Formulas of the form AG(p), with p being a Boolean expression, are of special importance. In our experience, over 90% of the formulas written in practice can be converted into AG(p) form. To cope with the state explosion problem several different techniques have been proposed. The different approaches work well on large classes of examples but no one technique best 1 The symbol |= is overloaded. We use it in this paper both in the context of model checking and in the context of DL reasoning. 224 Regular Papers suits all models. One method describes the model symbolically by representing the system under verification by boolean functions. Two main symbolic methods are used to perform model checking. The first, known as SMV [10], was introduced by McMillan in 1992. This method is based on Binary Decision Diagrams (BDDs) [3] for representing the state space as well as for performing the model checking procedure. The second is known as Bounded Model Checking [2]. Using this method, the model under verification is translated into a Boolean formula, and a satisfiability solver is applied to it to find a satisfying assignment. Such an assignment, if found, demonstrates a bug in the model. Other important methods represent states and transitions explicitly. Explicit state methods appear to be more amenable to sophisticated state space reduction techniques. In this paper we show how to use Description Logic reasoning to perform explicit state model checking of the basic modalities of CTL on a synchronous model of computation, with the hope of benefiting from the powerful DL reasoners currently available [7–9]. Let MD be a model description, whose sematics is given by the Kripke structure MMD , and let ϕ be a specification. We formulate a terminology TMD,ϕ over the DL dialect ALC, and define a concept CMD such that by checking if TMD,ϕ |= CMD is consistent, we can determine whether MMD |= ϕ. In the next section we give the necessary background and definitions. Section 3 presents the translation of a model checking problem into a terminology over ALC, and demonstrate it through an example. Section 4 concludes the paper. 2 Background and Definitions Definition 1 (Description Logic ALC) Let NC and NR be sets of atomic concepts {A1 , A2 , . . .} and atomic roles {R1 , R2 , . . .}, respectively. The set of concepts C of the description logic ALC is the smallest set including NC that satifies the following. – If C1 , C2 ∈ C, then so are • ¬C1 • C1 ⊓ C2 – If C ∈ C, and R ∈ NR, then so is • ∃R.C Additional concepts are defined as syntactic sugaring of those above: • ⊤ = A ⊔ ¬A, for some A • ∀R.C = ¬∃R.¬C • C1 ⊔ C2 = ¬(¬C1 ⊓ ¬C2 ) An inclusion dependency is an expression of the form C1 ⊑ C2 . A terminology T consists of a finite set of inclusion dependencies. The semantics of expressions is defined with respect to a structure I = (∆I , ·I ), where ∆I is a non-empty set, and ·I is a function mapping every concept to a subset of ∆I and every role to a subset of ∆I × ∆I such that the following conditions are satisfied. • (¬C)I = ∆I \ C I • (C1 ⊓ C2 )I = C1I ⊓ C2I • ∃R.C = {x ∈ ∆I | ∃y ∈ ∆I s.t. (x, y) ∈ RI ∧ y ∈ C I } A structure satisfies an inclusion dependency C1 ⊑ C2 if C1I ⊆ C2I . The consistency problem for ALC asks if T |= C holds; that is, if there exists I such that C I is non-empty and such that C1I ⊆ C2I holds for each C1 ⊑ C2 in T . Definition 2 (Kripke Structure) Let V be a set of Boolean variables. A Kripke structure M over V is a four tuple M = (S, I, R, L) where Proceedings of DL 2006 225 1. S is a finite set of states. 2. I ⊆ S is the set of initial states. 3. R ⊆ S × S is a transition relation that must be total, that is, for every state s ∈ S there is a state s′ ∈ S such that R(s, s′ ). 4. L : S → 2V is a function that labels each state with the set of variables true in that state. In practice, the full Kripke structure of a system is not explicitly given. Rather, a model is given as a set of Boolean variables V = {v1 , ..., vn }, their initial values and their next-state assignments. The definition we give below is an abstraction of the input language of SMV [10]. Definition 3 (Model Description) Let V = {v1 , ..., vk } be a set of Boolean variables. A Model Description over V is a tuple MD = (IMD , [hc1 , c′1 i, ..., hck , c′k i]), where IM D = {v1 = b1 , ..., vk = bk }, bi ∈ {0, 1}, and ci , c′i are Boolean expressions over V . The semantics of a model description is a Kripke structure MMD = (S, IM , R, L), where S = 2V , L(s) = s for s ∈ S , IM = {IMD } and R = {(s, s′ ) : ∀1 ≤ i ≤ k, s |= ci implies s′ |= (vi = 0) and s |= c′i ∧ ¬ci implies s′ |= (vi = 1)}. Intuitively, a pair hci , c′i i defines the next-state assignment of variable vi in terms of the current values of {v1 , ..., vk }. That is,  if ci 0 if c′i ∧ ¬ci next(vi ) = 1  {0, 1} otherwise where the assignment {0, 1} indicates that for every possible next-state value of variables v1 , ...vi−1 , vi+1 , ..., vn there must exist a next-state with vi = 1, and a next-state with vi = 0. We give the definition of Basic CTL formulas below. Our definition differs from full CTL in that temporal operators cannot be nested. Note though, that most of the formulas written in practice can be converted into AG(p) form, which is included in Basic CTL. Definition 4 (Basic CTL formulas [4]) – The formula (v = 1) is an atomic CTL formula – If p and q are atomic CTL formulas, then so are • ¬p • p ∧ q – If p and q are atomic CTL formulas then the following are Basic CTL formulas: • EXp • AXp • E[pV q] • A[pV q] – If ϕ is a Basic CTL formula then so is • ¬ϕ. Additional operators are defined as syntactic sugaring of those above: • E[pU q] = ¬A[¬pV ¬q] • A[pU q] = ¬E[¬pV ¬q] • AF p = A[true U p] • EF p = E[true U p] • AGp = ¬EF ¬p • EGp = ¬AF ¬p The semantics of a CTL formula is defined with respect to a Kripke structure M = (S, I, R, L) over a set of variables V = {v1 , ..., vk }. A path in M is an infinite sequence of states (s0 , s1 , ...) such that each successive pair of states (si , si+1 ) is an element of R. The notation M, s |= ϕ, means that the formula ϕ is true in state s of the model M . – M, s |= (v = 1) iff v ∈ L(s) – M, s |= p ∧ q iff M, s |= p and M, s |= q – M, s |= ¬ϕ iff M, s 6|= ϕ 226 Regular Papers – M, s0 |= AXp iff for all paths (s0 , s1 , ...), M, s1 |= p – M, s0 |= EXp iff for some path (s0 , s1 , ...), M, s1 |= p – M, s0 |= A[pV q] iff for all paths (s0 , s1 , ...), either for all i ≥ 0, M, si |= q or there exists n ≥ 0 such that M, sn |= p and for all 0 ≤ i ≤ n, M, si |= q – M, s0 |= E[pV q] iff for some path (s0 , s1 , ...), either for all i ≥ 0, M, si |= q or there exists n ≥ 0 such that M, sn |= p and for all 0 ≤ i ≤ n, M, si |= q We say that a Kripke structure M = (S, I, R, L) satisfies a Basic CTL formula ϕ (M |= ϕ) if for all si ∈ I, M, si |= ϕ. Definition 5 (Formula type) Let ϕ be a Basic CTL formula, expressed in terms of EX, AX, E[pV q] or A[pV q]. We say that ϕ is of Type A if the outermost path quantifier is A, and Type E otherwise. We say that ϕ is a negated formula if its path quantifier is preceded by an odd number of negations. 3 Model Checking Using Description Logic Reasoning We give a linear reduction of a model checking problem into a consistency check over ALC. Let MD = (I, [hc1 , c′1 i, ..., hck , c′k i]) be a model description for the model MMD = (S, I, R, L), over V = {v1 , ...vk }. Let ϕ be a Basic CTL formula. We generate a terminology TMD,ϕ , linear in the size of MD and constant in the size of ϕ, and a concept Init, such that by checking if TMD,ϕ |= Init is consistent, we can determine whether MMD |= ϕ. type We construct TMD,ϕ as the union of three terminologies, TMD,ϕ = Tk ∪ TMD ∪ Tϕ where type Tk depends only on the number k of variables in V , the terminology TMD depends on the model description as well as on the type of the formula ϕ (with type being A or E), and Tϕ depends only on the formula ϕ. We start by describing the primitive concepts and roles which are used in all of the terminologies, and then provide the construction for each of the three terminologies. We conclude this section with a proposition that relates the consistency of the concept Init with respect to TMD,ϕ to the satisfaction of ϕ in the model MMD . Concepts and Roles We introduce one primitive role R corresponding to the transition relation of the model. For each variable vi ∈ V we introduce three primitive concepts: Vi , Vi N and Vi T . The concept Vi corresponds to the variable vi , where Vi denotes vi = 1 and ¬Vi denotes vi = 0. The concept Vi N corresponds in a similar way to the next-state value of Vi . The concept Vi T is needed to encode an execution step of the model as a sequence through R, as will be explained in the sequel. Finally, one primitive concept Cϕ is introduced to assist the encoding of the specification ϕ. Depending on ϕ, this concept is not always needed. In total, ϕ for a set V with k variables, the terminology TM D will consist of 3k + 1 primitive concepts and one role. Constructing Tk For a transition (s, s′ )∈ R in the model MMD , the state s may differ from s′ in the values of some or all of the variables v1 , ..., vk . That is, in one transition, many variables may simultaneously change their values. To achieve this with our single role R, we encode every transition of the model MMD as a series of “micro-transitions” through R, each of which determines the next-state value of one variable only. To ensure that every variable Proceedings of DL 2006 227 makes a move only on its turn, we use the concepts Vi T . We allow exactly one of V1 T, ..., Vk T to hold on each state, and in the correct order, by introducing the following concept inclusions. – Vi T ⊑ (∀R.Vi+1 T ) Vk T ⊑ (∀R.V1 T ) ¬Vi T ⊑ (∀R.¬Vi+1 T ) for 1 ≤ i < k and ¬Vk T ⊑ (∀R.¬V1 T ) The actual model states correspond to where concept V1 T holds, after a cycle where each of the variables has taken a turn. Thus, we have to make sure to propagate Vi , Vi N values appropriately, by introducing the following inclusions for 1 ≤ i ≤ k. – When V1 T holds, Vi should assume its next value that has been stored in Vi N . (V1 T ⊓ Vi N ) ⊑ Vi (V1 T ⊓ (¬Vi N )) ⊑ (¬Vi ) – Propagate Vi at every step in the cycle, except the last one. ((¬Vk T ) ⊓ Vi ) ⊑ (∀R.Vi ) ((¬Vk T ) ⊓ (¬Vi )) ⊑ (∀R.(¬Vi )) – Propagate Vi N , unless Vi T holds, (in which case a new value is computed). ((¬Vi T )⊓Vi N ) ) ⊑ (∀R.Vi N ) ((¬Vi T ) ⊓ (¬Vi N )) ⊑ (∀R.(¬Vi N )) In total, for k variables, Tk will consist of 8k concept inclusions, each of them of constant size. type Constructing TMD We now translate the model description MD = (I, [hc1 , c′1 i, ..., hck , c′k i]). Let I = {v1 = b1 , ..., vk = bk }, bi ∈ {0, 1}. To encode the initial condition of the model, we introduce the concept inclusion – Init ⊑ (D1 ⊓, ..., ⊓Dk ⊓ V1 T ⊓ ¬V2 T ⊓, ..., ⊓¬Vk T ) Where Di = Vi if (vi = 1)∈ I, and Di = ¬Vi if (vi = 0)∈ I. The Vi T s are needed to ensure the initial condition corresponds to a real model state (V1 T ), and that only V1 is allowed to make a move (¬Vi T ). Let the pair hci , c′i i describe the next state behavior of the variable vi . That is,  if ci 0 if c′i ∧ ¬ci next(vi ) = 1  {0, 1} otherwise where ci , c′i are Boolean expressions over v1 , ..., vk , and {0, 1} is a non-deterministic assignment, allowing vi to assume both 0 and 1 in the next state. Let Ci be the concept generated by replacing every vi in ci with the concept Vi , and ∧ with ⊓. Let Ci′ be the concept corresponding to c′i in the same way. We introduce the following concept inclusions. (Vi T ⊓ Ci ) ⊑ ∃R.¬Vi N (Vi T ⊓ ¬Ci ⊓ Ci′ ) ⊑ ∃R.Vi N The encoding of the non-deterministic assignment as a concept inclusion, has two flavors, depending on the type of the formula ϕ. A , and introduce the inclusion: – If ϕ is of type A, we call the terminology TMD ′ (Vi T ⊓ ¬Ci ⊓ ¬Ci ) ⊑ (∃R.Vi N ⊓ ∃R.¬Vi N ). E , and introduce the inclusion: – If ϕ is of type E, we call the terminology TMD (VI T ⊓ ¬Ci ⊓ ¬Ci′ ) ⊑ (∃R.Vi N ⊔ ∃R.¬Vi N ). type In total, TMD will consist of one concept, Init, of size 2k, and 3 concept inclusions of constant size. 228 Regular Papers Constructing Tϕ Let ϕ be the formula to be verified, written in terms of EXp, AXp,E[pV q] or A[pV q]. Let ψ be the formula derived from ϕ by peeling off all negations preceding the outermost path quantifier, as well as the path quantifier itself. (e.g., ¬E[pV q] becomes [pV q]). ψ can be one of two formulas only: Xp or [pV q], where p, q are Boolean combinations of variables vi . Let P, Q be the translation of p, q using the corresponding concepts Vi . – If ψ = Xp, we introduce one concept inclusion to Tϕ : Init ⊑ |∀R.∀R...∀R {z } .P k We need a sequence of k transitions since one transition in the model MMD is translated into k micro-transition in our terminology. – If ψ = [pV q] we use the auxiliary concept Cϕ introduced for this purpose. Intuitively, [pV q] means “p releases q”. That is, q must hold along an execution path, unless p appears at one stage, in which case q is released, and does not have to hold any longer. We introduce the following concept inclusions to Tϕ . (Cϕ ⊓ ¬P ) (Cϕ ⊓ P ) ¬Cϕ V1 T ⊑ ⊑ ⊑ ⊑ ∀R.Cϕ ∀R.¬Cϕ ∀R.¬Cϕ (¬Cϕ ⊔ Q) The first three concept inclusions above record the behavior of the concept P . Cϕ holds in a state if and only if P has never held on the path leading to this state. The forth inclusion guarantees that on all the ‘real’ execution states (where V1 T holds), if P has not appeared until the previous state (¬Cϕ ) then Q must hold. In total, Tϕ will consist of at most 4 concept inclusions, with one of them possibly of size k, type and the rest of constant size. TMD,ϕ = Tk ∪ TMD ∪ Tϕ is therefore of size linear in k. The following proposition relates the consistency of the concept Init with respect to TMD,ϕ to the satisfaction of ϕ in the model MMD . Its proof will be given in a full version of the paper. Proposition 6 . Let MD denote a model description for a model MMD , and let ϕ be a Basic CTL specification. Then each of the following holds. 1. 2. 3. 4. 3.1 A ∪ T |= init consistent. If ϕ is of type A and not negated, then MMD |= ϕ iff Tk ∪ TMD ϕ E ∪ T |=init consistent. If ϕ is of type E and not negated, then MMD |= ϕ iff Tk ∪ TMD ϕ A ∪ T 6|=init consistent. If ϕ is of type A and negated, then MMD |= ϕ iff Tk ∪ TMD ϕ E ∪ T 6|=init consistent. If ϕ is of type E and negated, then MMD |= ϕ iff Tk ∪ TMD ϕ An Example We illustrate our method by an example. Consider the model description M D = (I, [hv1 ∧ v2 , v3 i, h¬v2 , v1 ∧ ¬v1 i, h¬v1 , v1 i]) over V = {v1 , v2 , v3 } with I = {v1 = 0, v2 = 1, v3 = 0}. Figure 1 draws the states and transitions of the Kripke structure MMD described by M D. Let the formula to be verified be 229 Proceedings of DL 2006 Fig. 1. A Kripke structure for MD ϕ = AG(¬v1 ∨ ¬v2 ∨ ¬v3 ). Note that MMD |= ϕ, as can be seen in Figure 1, since the state ϕ (1, 1, 1) can never be reached from the initial state. The terminology TM D derived from M D and ϕ will use the primitive concepts {V1 , V2 , V3 , V1 N, V2 N, V3 N, V1 T, V2 T, V3 T } and the primitive role R. By the construction given in section 3, the set of concept inclusions will be the following. The Construction of Tk – Concept inclusions ensuring control over the turn to make a move V1 T ⊑ (∀R.V2 T ) ¬V1 T ⊑ (∀R.¬V2 T ) V2 T ⊑ (∀R.V3 T ) ¬V2 T ⊑ (∀R.¬V3 T ) V3 T ⊑ (∀R.V1 T ) ¬V3 T ⊑ (∀R.¬V1 T ) – Concept inclusions to propagate the values of Vi ((¬V3 T ) ⊓ V1 ) ⊑ (∀R.V1 ) ((¬V3 T ) ⊓ (¬V1 )) ⊑ (∀R.(¬V1 )) ((¬V3 T ) ⊓ V2 ) ⊑ (∀R.V2 ) ((¬V3 T ) ⊓ (¬V2 )) ⊑ (∀R.(¬V2 )) ((¬V3 T ) ⊓ V3 ) ⊑ (∀R.V3 ) ((¬V3 T ) ⊓ (¬V3 )) ⊑ (∀R.(¬V3 )) – Concept inclusions to propagate the values of Vi N ((¬V1 T ) ⊓ V1 N ) ⊑ (∀R.V1 N ) ((¬V1 T ) ⊓ (¬V1 N )) ⊑ (∀R.(¬V1 N )) ((¬V2 T ) ⊓ V2 N ) ⊑ (∀R.V2 N ) ((¬V2 T ) ⊓ (¬V2 N )) ⊑ (∀R.(¬V2 N )) ((¬V3 T ) ⊓ V3 N ) ⊑ (∀R.V3 N ) ((¬V3 T ) ⊓ (¬V3 N )) ⊑ (∀R.(¬V3 N )) – Concept inclusions to move Vi equal to Vi N whenever V1 T holds (V1 T ⊓ V1 N ) ⊑ V1 (V1 T ⊓ (¬V1 N )) ⊑ (¬V1 ) (V1 T ⊓ V2 N ) ⊑ V2 (V1 T ⊓ (¬V2 N )) ⊑ (¬V2 ) (V1 T ⊓ V3 N ) ⊑ V3 (V1 T ⊓ (¬V3 N )) ⊑ (¬V3 ) type We need to determine the type of ϕ. Note that AG(p) = The Construction of TMD A[f alse V p], thus ϕ can be written as ϕ = A[f alse V (¬v1 ∨ ¬v2 ∨ ¬v3 )]. The type of A : ϕ is then A. We proceed to build TMD – The initial condition IN IT ⊑ (¬V1 ⊓ V2 ⊓ ¬V3 ⊓ V1 T ⊓ ¬V2 T ⊓ ¬V3 T ) 230 Regular Papers – Computation of V1 (V1 T ⊓ V1 ⊓ V2 ) ⊑ (∃R.(¬V1 N )) (V1 T ⊓ (¬(V1 ⊓ V2 )) ⊓ V3 ) ⊑ (∃R.V1 N ) (V1 T ⊓ (¬(V1 ⊓ V2 )) ⊓ (¬V3 )) ⊑ ((∃R.V1 N ) ⊓ (∃R.(¬V1 N ))) – Computation of V2 (V2 T ⊓ V2 ) ⊑ ((∃R.V2 N ) ⊓ (∃R.(¬V2 N ))) (V2 T ⊓ (¬V2 )) ⊑ (∃R.(¬V2 N )) – Computation of V3 (V3 T ⊓ V1 ) ⊑ (∃R.V3 N ) (V3 T ⊓ (¬V1 )) ⊑ (∃R.(¬V3 N )) The Construction of Tϕ Since ϕ = A[f alse V (¬v1 ∨ ¬v2 ∨ ¬v3 )], then according to the translation in section 3, we need to introduce a concept Cϕ , in order to record the behavior of ⊥ (the translation of false). However, the behavior of ⊥ cannot change along the execution path, and we get that ¬Cϕ is always false. Thus we can omit the concept Cϕ altogether, and add only the concept inclusion: V1 T ⊑ (¬V1 ⊔ ¬V2 ⊔ ¬V3 ). A ∪ T |= Init consistent. By Proposition 6 we get that MMD |= ϕ if and only if Tk ∪ TMD ϕ 4 Summary In this paper we have shown that model checking the basic modalities of CTL can be performed using DL reasoning. First experiments using the DL reasoner “Racer” [7] were conducted, with reassuring results. In the future, we plan to test our method on real models from the hardware industry. Several other related directions seem interesting for further investigation. Firstly, it seems possible, using additional calls to “Racer”, to handle full CTL model checking. Secondly, we are interested in implementing symbolic model checking algorithms in ALC and applying these different model checking approaches to available test beds. Acknowledgements The authors gratefully acknowledge the support for this result provided by Nortel networks Ltd. and by NSERC Canada. References 1. S. Ben-David, C. Eisner, D. Geist, and Y. Wolfsthal. Model checking at IBM. Formal Methods in System Design, 22(2):101–108, 2003. 2. A. Biere, A. Cimatti, E. Clarke, and Y. Zhu. Symbolic model checking without bdds. In TACAS’99, 1999. 3. R. Bryant. Graph-based algorithms for boolean function manipulation. In In IEEE Transactions on Computers, volume c-35 no. 8. 4. E. Clarke and E. Emerson. Design and synthesis of synchronization skeletons using branching time temporal logic. In Proc. Workshop on Logics of Programs, LNCS 131, pages 52–71. Springer-Verlag, 1981. 5. E. M. Clarke, O. Grumberg, and D. Peled. Model Checking. The MIT Press, 2000. 6. F. Copty, L. Fix, R. Fraer, E. Giunchiglia, G. Kamhi, A. Tacchella, and M. Y. Vardi. Benefits of bounded model checking at an industrial setting. In CAV’01, july 2001. 7. V. Haarslev and R. Moller. Racer system description. In International Joint Conference on Automated Reasoning (IJCAR’2001), volume 2083. 8. I. Horrocks. The FaCT system. pages 307–312, 1998. 9. I. Horrocks and U. Sattler. Decidability of SHIQ with complex role inclusion axioms. Artificial Intelligence, 160(1–2):79–104, Dec. 2004. 10. K. McMillan. Symbolic model checking, 1993. 11. K. Yorav, S. Katz, and R. Kiper. Reproducing synchronization bugs with model checking. In CHARME, 2001. 231 Proceedings of DL 2006 Towards Mobile Reasoning Thomas Kleemann http://www.kleemann-online.com tomkl@kleemann-online.com Abstract. Highly optimized reasoning support for Description Logics (DLs) has been developed during the past years. This paper presents our efforts to develop a reasoner suitable for mobile devices, namely mobile phones. This might become important upon the convergence of the mobile industry and the web, especially the semantic web. Details of the implementation and current limitations provide explanations to the differences in performance in comparison to one of the well-known desktop reasoners. 1 Motivation Mobile phones have become an ubiquitous companion for many users. There are western countries with more mobile contracts than inhabitants. The mobile industry is pushing users to adopt modern 3G services, i.e. to use the mobile phone as a client to messaging and news services. At the dawn of the semantic web we expect these messages to be semantically annotated. The device should be able to sort out unwanted messages and reduce the penetration of the user to messages of interest. We suggested a user profile and matchmaking in [6, 8] that copes with SPAM annotations. More DL based approaches to matchmaking can be found in [9, 10]. Unlike [15] we consider privacy a major issue. Due to the nature of user profiles, we would like to encourage users to keep their private data on their personal device. This requires the mobile device to decide the matchmaking without support of external reasoners. As a consequence we developed the reasoner Pocket KRHyper [7] that runs on a mobile phone or similar devices. The remainder of this paper presents some details of the software and hardware environment, explains how the DL reasoning is performed, finally gives some figures on performance compared to RacerPro 1.91 that is one of the highly developed desktop reasoners. 2 Environment The environment of mobile phones poses several restrictions on the development of the reasoner. Resources like computing power, memory and energy are tightly limited. Although phones offer hundreds of MB for the storage of pictures, sounds, and ringtones the memory offered to applications is restricted to a few hundreds kB. This is a hard limitation imposed by the manufacturer, that cannot be configured. Even 1 http://www.racer-systems.com 232 Regular Papers worse this small memory is used for the application code, the application data like the ontology and the working set of the current computation. Consequently whenever we had the choice between memory consumption or additional computation, we went for the additional computation. Computing power is reduced by a factor of 50 to 100 compared to an average desktop PC. The widest spread language on phones is JAVA 2 micro edition (J2ME)2 . J2ME is tailored for devices with limited resources. It offers a language comparable to standard JAVA 1.1.8. Unfortunately all modern container classes of JAVA2, that would ease development and speed up execution, are missing. 3 Reasoning The reasoning is based on a first-order model generating reasoner implementing the hyper-tableaux calculus [1]. The use of a first-order tableaux may be a little surprise, but turns out to be viable, as can be seen in section 4. The reasoning task offers a timelimit and throws Exceptions upon timing out or running into memory shortages. Thus the application may react appropriately. The reasoner comes as a library to be integrated into J2ME applications (midlets). 3.1 Translation To use the FO reasoner for DL purposes the knowledge base is transformed into a set of possibly disjunctive clauses. The approach is relational and preserves the open world assumption. Although the result is a logic program, the restrictions of DLP [3] do not apply. The knowledge base is considered to be a finite set of axioms C ⊑ D and C ≡ D, where C, D are concepts of the DL ALC extended by inverse and transitive roles and role hierarchies. The transformation into sets of clauses introduces subconcepts to reduce the complexity of the concept expression or axiom. As an example the axiom ∃R.C ⊑ ∀S.∀T.D is decomposed into ∃R.C ⊑ subi and subi ⊑ ∀S.sub j and sub j ⊑ ∀T.D to comply with the transformation primitives. Table 1 gives the transformation primitives in abstract DL syntax, a corresponding first order formula, and the generated clauses. The clauses marked with * share variables in a disjunctive head, they are not range-restricted. As an extension to previous work [12] Pocket KRHyper now handles these clauses by generating all ground instances up to the given term weight. Doing so often causes timeouts of the prover due to the limited resources. Clauses marked with ** are suitable for reasoning tasks in acyclic terminologies. Decidability commonly requires the tableau procedure to engage a blocking technique. The blocking techniques found in [4] may be adapted to the transformation as shown in [2]. 2 http://java.sun.com/j2me/ 233 Proceedings of DL 2006 description logic first order formula C⊓D ⊑ E ∀x.C(x) ∧ D(x) → E(x) C⊔D ⊑ E ∀x.C(x) ∨ D(x) → E(x) C ⊑ ¬D ∃R.C ⊑ D ∀R.C ⊑ D C ⊑ D⊓E ∀x.C(x) → ¬D(x) ∀x∀y.R(x, y) ∧C(y) → D(x) ∀x.(∀y.R(x, y) → C(y)) → D(x) ∀x.C(x) → D(x) ∧ E(x) C ⊑ D⊔E ¬C ⊑ D C ⊑ ∃R.D ∀x.C(x) → D(x) ∨ E(x) ∀x.¬C(x) → D(x) ∀x.C(x) → (∃y.R(x, y) ∧ D(y)) C ⊑ ∀R.D R ⊑S R− ≡ S ∀x.C(x) → (∀y.R(x, y) → D(y)) ∀x∀y.R(x, y) → S(x, y) ∀x∀y.R(x, y) ↔ S(y, x) R+ ∀x∀y∀z.R(x, y) ∧ R(y, z) → R(x, z) Table 1. Translation Primitives clauses e(x) :- c(x), d(x). e(x) :- c(x). e(x) :- d(x). false :- c(x), d(x). d(x) :- c(y), r(x,y). d(x); r(x, fR−C (x)). * d(x) :- c( fR−C (x)). e(x) :- c(x). d(x) :- c(x). e(x); d(x) :- c(x). c(x); d(x). * d( fR−D (x)) :- c(x). r(x, fR−D (x)) :- c(x). ** d(y) :- c(x), r(x,y). s(x,y) :- r(x,y) s(y,x) :- r(x,y). r(x,y) :- s(y,x). r(x,z) :- r(x,y), r(y,z). The effective test for satisfiability of a concept C inserts a single fact C(a) into the knowledge base. C is satisfiable if the Pocket KRHyper finds a model for the knowledge base. A refutation indicates the unsatisfiability of the concept. Subsumption is reduced to satisfiability. 3.2 Optimizations Common to DL reasoners are many optimizations [5]. In the following section some counterparts within the FO reasoner are presented. Backjumping. Backjumping is a technique to reduce the unnecessary evaluation of branches, that do not contribute to the clash in a branch. In hyper-tableaux the ’hyper’ eventually tracks back over multiple branching points to avoid the same. Semantic Branching. This optimization is derived from DPLL. As hyper-tableaux is also a descendant from DPLL a corresponding technique known as complement splitting is in use. Semantic branching adds the complement of already inspected branches to subsequent branches. This avoids the redundant inspection of clashed terms. Different from semantic branching the complements of subsequent branches are added to the branches, that are inspected first. Because of the symmetry the effect is the same for cases where all branches are closed. Boolean Constraint Propagation. The current mobile implementation of the hypertableaux tries to choose the disjunctive clause for the next expansion, that will immediately clash one of its branches. This is similar to BCP. 234 Regular Papers Lazy Unfolding. Beyond these optimizations a behavior similar to lazy unfolding is introduced by the transformation step. All subexpressions are named, and the transformation step tries to identify with already known subexpressions. The FO tableaux will expand these subexpressions only if no clash has been found prior to expansion. Absorption. Absorption is left to the preprocessing of the knowledge base. It absorbs general concept inclusions (GCI) into the definition of concepts. For a DL tableaux this reduces the number of disjunctive branches. Here absorption reduces the number of cases, that require the enumeration of all ground instances, see section 4 for an example. Reducing Memory Consumption. Currently the J2ME environment does not offer an preinstalled XML-parser. So we decided to use the lisp-like KRSS [11] syntax. The lisp-parser is significantly smaller than an XML-parser. The clausal knowledge base is partitioned. The knowledge base keeps track of these parts by setting a mark at each such step, so it is possible to revert it to the state it had before an update or query. This allows for the addition of clauses generated for query processing and a subsequent removal of them. The repeated transformation of unchanged DL axioms to clauses is avoided. The query related clauses are added and retracted as required by the query processing. Any form of indexing or caching requires additional memory. Because the memory constraints of the used platforms are tight, we dropped most of these enhancements. Consequently the current solution does not scale (wrt. the size of the model to search) as well as desktop reasoners. 3.3 Engineering The development of a reasoning engine is a challenging and error-prone task. To cope with these difficulties we adopted the idea of unit testing. Unit testing automates the execution of (parts of) your software on predefined tests with known results. The ease of use and high degree of automation enables the early detection of software glitches and sideeffects of changes throughout the whole development cycle. The tests are divided into a first-order part and a DL part. For the first-order reasoning kernel we used a subset of the TPTP [13]. These clausal problems are fed into the reasoner and evaluated by the FO tableaux. The result of the reasoning process is compared to the known result. Starting with some ’benchmarks’ taken from the DIG page3 many own tests, that focus on specific implementation details, were added to test the DL part. The results in the following section are derived from scaled tests. The automation of the tests includes the comparison of predefined results with the actual result of the reasoner. 3 http://dl.kr.org/dig/ Proceedings of DL 2006 235 test knowledge base 1 C ≡ C1 ; Ci ⊑ Ci+1 2 3 4 5 6 7 8 9 10 11 12 13 4 comments test the propagation of individuals and the ability to handle long branches C ≡ C1 ; Ci ⊑ Ci+1 ; Cm+1 ⊑ ⊥ like test1 but not satisfiable; test refutations on long branches C ≡ ∃R.C1 ; Ci ⊑ ∃R.Ci+1 test the handling of role successors C ≡ ∃R.C1 ; Ci ⊑ ∃R.Ci+1 ; Cm+1 ⊑ ⊥ like test 3, but with a refutation at the end of the branch C ≡ ∃R.C1 ; ∃R.Ci ⊑ ∃R.Ci+1 test the handling of role successors and concept inclusions C ≡ ∃R.C1 ; ∃R.Ci ⊑ ∃R.Ci+1 ; ∃R.Cm+1 ⊑ ⊥ like test 5 with a closing inclusion C ≡ ∃R.C1 ; ∃R.Ci ⊑ ∃R.Ci+1 ; ⊤ ⊑ ∀R.¬Cm+1 like test 6 but with differently formulated closing, that derives from a range restriction C ≡ ∃R.C1 ; ∃R.Ci ⊑ ∃R.Ci+1 ; ⊤ ⊑ ∀R.⊥ similar to test 7 but branches may be closed prior to the evaluation of the inclusions C ≡ ∃R.C0 ; ∃R.Ci ⊑ ∃R.Ci+1 ; ⊤ ⊑ ∀R.⊥ this time the inclusions are not related to the definition of C. Still not satisfiable. C ≡ ∃R.C0 ; Ci+1 ⊓ ∀R.Ci+2 ⊑ ∃R.Ci ; Ci+1 ⊑ ∃R.Ci+2 this test demonstrates the effect of not rangerestricted clauses for FO model generators C ≡ ∃R.C0 ; Ci+1 ⊑ ∃R.Ci+2 ⊓ (∃R.¬Ci+2 ⊔ ∃R.Ci ) Absorption in a preprocessing step solves this problem C ≡ ∃R1 .C1 ; Ri ⊑ Ri+1 test handling of role hierarchies C ≡ ∃R1 .C1 ; Ri ⊑ Ri+1 ; ⊤ ⊑ ∀Rm+1 .⊥ test refutation at the end of role hierarchies Table 2. Testsuite Comparison Based on the test cases for DL reasoning a generator of tests was developed. These tests are used in multiple sizes wrt. the number of axioms to offer a view into the scalability of the reasoning solution. In the primary application of Pocket KRHyper all models or refutations were computed in short branches of a tableaux (less than 25 proof steps) because the applications ontology was about 200 concepts large but not so deeply nested. To the best of my knowledge there are no competing reasoners on mobile phones. So I decided to compare the performance with RacerPro 1.9. The JAVA-library is compiled for the desktop version of JAVA (J2SE) without changes in the code. Consequently all indexing and caching is still missing even though the desktop environment would allow for the additional space. The integration of RacerPro into the automated test routine uses its socket interface. The syntax of the test cases is compatible due to the use of KRSS. Out of more than 50 tests the following section describes about a dozen tests to give an idea of the characteristics of Pocket KRHyper. The tests presented here are limited to satisfiability tests with satisfiable and unsatisfiable concepts. This is suitable to describe the behavior of subsumption tasks with positive and negative outcome. Checking for subsumption and non-subsumption is not a trivial task for all first-order reasoners, who are possibly better suited to find refutations than models [14]. 236 4.1 Regular Papers Testsuite All tests are scaled to the sizes m ∈ {2, 5, 10, 20, 50}. Table 2 lists the tests, where i ∈ {1, 2, ...m} for the corresponding size. C possibly indexed are concepts, R possibly indexed are roles. All 65 tests check for the satisfiability of concept C. A JAVA application runs all tests with Pocket KRHyper and RacerPro, compares the results and collects the execution time in ms for the reasoning tasks. Some comments in Table 2 indicate the targeted feature of the test. The automated execution of these tests led to quite stable results wrt. the time needed. Surprisingly only Racer had some glitches, where every now and then but reproducible single tests performed quite bad beyond the time-limit of 1500ms. In the calculation of the graphical representation (see Fig. 1) of the runtimes the median of five runs was taken to eliminate this phenomenon. The times for the FO reasoner include the transformation into clauses. Table 3 gives exact values, — indicates a timeout. All times are in milliseconds taken on a contemporary personal computer running WindowsXP with Java Runtime 1.5 (J2SE). Reasoners are Pocket KRHyper via the library and RacerPro 1.9 via TCP-Socket. Due to limitations in precision all runtimes below 10ms are presented as ≤10ms. 4.2 Evaluation Some weaknesses of the first-order approach are quite obvious. Test 10 is never solved within the timelimit. This is a consequence of the necessary enumeration of ground instances. The only solution to this problem is an improved preprocessing as test 11 indicates. As one might expect both tests are performing well with Racer. The only surprise is the increased runtime for test 10 with size 5 compared to the same test in size 10. An additional weakness is the scalability for tests 3 and 4. Following the transformation steps, a lot of functions are used. Pocket KRHyper tries to reduce the amount of storage and compares all new facts with existing ones in the current branch. This comparison is carried out by a unification method. This method suffers from the deeply nested functions and a lack of caching of intermediate results. In test 1 m reasoner m=2 racer 20 pKrh 30 m=5 racer 20 pKrh ≤10 m=10 racer 20 pKrh ≤10 m=20 racer 50 pKrh 30 m=50 racer 91 pKrh 60 2 3 4 5 6 7 8 9 10 11 12 13 10 ≤ 10 10 ≤ 10 30 ≤ 10 40 ≤ 10 100 20 10 ≤ 10 20 20 20 90 40 701 90 — 10 ≤ 10 20 30 20 70 40 681 90 — 10 ≤ 10 20 10 30 30 50 100 90 981 10 ≤ 10 30 11 30 20 50 100 100 1001 20 ≤ 10 20 ≤ 10 30 40 50 130 100 1402 10 ≤ 10 10 ≤ 10 30 ≤ 10 71 ≤ 10 90 20 20 ≤ 10 20 ≤ 10 20 30 40 ≤ 10 90 20 10 — 90 — 50 — 90 — 241 — 10 ≤ 10 20 ≤ 10 30 ≤ 10 60 ≤ 10 170 140 10 ≤ 10 10 ≤ 10 30 ≤ 10 40 20 90 40 10 ≤ 10 20 ≤ 10 30 ≤ 10 41 20 90 60 Table 3. Runtimes in comparision of Pocket KRHyper and RacerPro 1.9 237 Proceedings of DL 2006 Pocket KRHyper RacerPro 1.9 250 250 225 225 200 200 175 150 time in ms time in ms 175 125 100 75 50 25 0 2 5 150 10 125 20 100 50 2 5 10 20 50 75 50 25 1 2 3 4 5 6 7 8 9 10 11 50 12 13 2 5 10 0 1 2 3 4 5 6 7 8 9 10 11 50 12 13 2 5 10 Fig. 1. Runtimes in milliseconds, max. 250ms, timelimit 1500ms contrast Racer scales well for these two problems up to sizes between 100 and 200. Only above these limits Racer performs bad. Besides these weaknesses the first-order model generation approach gives competitive runtimes compared to a well established DL reasoner. For small test cases (up to 10) and special cases (e.g. role hierarchies: test 12 and 13) the performance is usually better than Racer. This is not to speak of superior performance, because Racer is designed for a richer DL and has to maintain all indexes and caches, that will speed up subsequent queries into the same TBox. One of Pocket KRHyper s nice features is the symmetry of satisfiable and non-satisfiable problems or respectively subsumption testing. The lack of scalability is most of all a consequence of the dropped indexing. That was chosen deliberately because of the tightly limited memory in mobile phones. Tests 8 and 9 demonstrate the local character of the FO tableaux and the transformation. The additional axioms in the knowledge base do not significantly influence the time for answering the satisfiability. This is an important property for the suitability into a resource scarce environment. 5 Conclusion In this paper some details about the Pocket KRHyper approach to DL reasoning were presented. Although the mobile reasoner was successful in its original application a more thorough testing and comparison was due. Out of many tests 13 were described in detail. For many other features like inverse roles or explicit disjuncts the comparison revealed similar results. Overall the developed reasoner proved to be a useful tool. The need to look into very specific details of the implementation and not into the average capability or performance to solve problems motivated the disregard of existing benchmarks. 238 Regular Papers Of course Racer is not the only competing system4 . To ease our purposes Racer supported the same syntax and I consider this a good basis for further developments. Especially because Racer is going to implement the SWRL rule language I will revisit the comparison. Rules are a natural extension for the first-order reasoner. In fact merely an interface has to be added. That was one of the reasons not to specialize the reasoning procedure for DL purposes. Furthermore the transformation is likely to include more features like normalizations and absorption in future versions. The current version of Pocket KRHyper is available for download at sourceforge5 . Finally I would like to thank Racer-Systems for granting a license for the current version. Compared to version 1.7 many improvements make a difference in this comparison. References 1. Peter Baumgartner. Hyper Tableaux — The Next Generation. Technical Report 32–97, Universität KoblenzLandau, 1997. 2. Peter Baumgartner, Ulrich Furbach, Margret Gross-Hardt, and Thomas Kleemann. Model based deduction for database schema reasoning. In Susanne Biundo, Thom Frühwirth, and Günther Palm, editors, KI 2004: Advances in Artificial Intelligence, volume 3238, pages 168–182. Springer Verlag, 2004. 3. Benjamin N. Grosof, Ian Horrocks, Raphael Volz, and Stefan Decker. Description logic programs: Combining logic programs with description logic. In Proc. of the Twelfth International World Wide Web Conference (WWW 2003), pages 48–57. ACM, 2003. 4. Volker Haarslev and Ralf Möller. Expressive ABox Reasoning with Number Restrictions, Role Hierarchies, and Transitively Closed Roles. In KR2000: Principles of Knowledge Representation and Reasoning, pages 273–284. Morgan Kaufmann, 2000. 5. I. Horrocks and P. F. Patel-Schneider. Optimising description logic subsumption. Journal of Logic and Computation, 9(3):267–293, 1999. 6. Thomas Kleemann and Alex Sinner. Description logic based matchmaking on mobile devices. In Joachim Baumeister and Dietmar Seipel, editors, Proc. of 1st Workshop on Knowledge Engineering and Software Engineering - KESE2005, Koblenz, ISSN 1860-4471, pages 37–48, 2005. 7. Thomas Kleemann and Alex Sinner. Krhyper - in your pocket, system description. In Robert Nieuwenhuis, editor, Automated Deduction - CADE-20: 20th International Conference on Automated Deduction, volume 3632 of Lecture Notes in Computer Science, pages 452–458. Springer Verlag, 2005. 8. Thomas Kleemann and Alex Sinner. User profiles and matchmaking on mobile phones. In Oscar Bartenstein, editor, Proc. of 16th International Conference on Applications of Declarative Programming and Knowledge Management INAP2005, Fukuoka, 2005. 9. Lei Li and Ian Horrocks. A software framework for matchmaking based on semantic web technology. In Proc. of the Twelfth International World Wide Web Conference (WWW’2003), pages 331–339. ACM, 2003. 10. Tommaso Di Noia, Eugenio Di Sciascio, Francesco M. Donini, and Marina Mongiello. Abductive matchmaking using description logics. In Proc. of IJCAI’03, pages 337–342, 2003. 11. Peter F. Patel-Schneider and B. Swartout. Description-logic knowledge representation system specification, November 1993. 12. A. Sinner and T. Kleemann. Krhyper - in your pocket, system description. In Proc. of Conference on Automated Deduction, CADE-20. Springer Verlag, 2005. 13. G. Sutcliffe and C.B. Suttner. The TPTP Problem Library: CNF Release v1.2.1. Journal of Automated Reasoning, 21(2):177–203, 1998. 14. Dmitry Tsarkov and Ian Horrocks. DL reasoner vs. first-order prover. In Proc. of the 2003 Description Logic Workshop (DL 2003), volume 81 of CEUR (http://ceur-ws.org/), pages 152–159, 2003. 15. Wolfgang Wahlster. Smartweb: Mobile applications of the semantic web. In GI Jahrestagung (1), pages 26–27, 2004. 4 5 see http://www.cs.man.ac.uk/˜ sattler/reasoners.html for a comprehensive list http://sourceforge.net/projects/mobilereasoner Part III Posters 241 Proceedings of DL 2006 Euclidian Roles in Description Logics Giorgos Stoilos and Giorgos Stamou National and Technical University of Athens Department of Electrical and Computer Engineering Abstract In the current paper we investigate the role of Euclidian roles in Description Logics. 1 Introduction The last years much research effort has been spend towards increasing the expressiveness of Description Logics with respect to what can be said about roles. For example, in [2] the Description Logic RIQ is extended with several role axioms, like reflexive and irreflexive role axioms, disjoint role axioms and simple negation on roles. These extensions has motivated us to investigate possibilities of extending Description Logics with other role axioms. In the following we investigate the extension of DLs with Euclidian role axioms. Euclidian roles are widely used in Modal Logics [1]. Formally, a role R is called Euclidian iff for each x, y, z, R(x, y) and R(x, z) imply R(y, z). Syntactically in order for a DL language L to include Euclidian role axioms we have to extend the RBox to allow expressions of the form Eucl(R). The semantics of such axioms are derived quite straightforwardly. Given an interpretation I = (∆I , ·I ), I satisfies Eucl(R) if for all x, y, z ∈ ∆I , {hx, yi, hx, zi} ⊆ RI → hy, zi ∈ RI . As with transitive role axioms, in order to efficiently handle Euclidian roles we have to understand the Euclidian closure of a relation R and handle properly value restrictions, ∀R.C. In Figure 1 (a) we can see the Euclidian closure of a relation R. As we can see the models of such role axioms include a root node, while all other nodes are interconnected with each other plus with themselves. That is because from R(x, y) ∧ R(x, y) we derive R(y, y). It is important to note here that the inverse of a Euclidian role is not necessarily Euclidian. An interesting question that is raised about Euclidian roles is if the can or can’t be used in qualified number restrictions. We remind here that if transitive roles are used in QCRs then the resulting logic is undecidable. It turns out that similarly if 242 Posters Euclidian roles are used in number restrictions, then the language is undecidable. More interestingly, if the inverse of a Euclidian role is used in a QCR, then the language is again undecidable, although the inverse of a Euclidian role is not necessarily Euclidian. The proof of this claim uses a reduction from the classical domino problem. Figure 1 (b), (c) and (d) illustrate the visualization of the grid and role hierarchy, where Sijε are Euclidian roles. Figure 1: The (a) Euclidean closure, (b) grid, (c) role hierarchy and (d) coincidence enforcing As it happens with many role axioms of SRIQ [2], it comes to no surprise that Euclidian roles are a syntactic sugar for SRIQ. More precisely, an axiom Eucl(R) can be represented by the RIA R− R ⊑ R. This means that if hx, yi ∈ (R− )I (or hy, xi ∈ RI ) and hy, zi ∈ RI , then hx, zi ∈ RI , which capture the semantics of Euclidian roles. Moreover, in [2] the definition of simple roles is also extended to cover the new expressive means of the language. As it was expected, according to the definition in [2], a role R that is defined by the Euclidianity RIA is not simple, since it is defined in terms of itself and its inverse, hence Euclidian roles are not simple and cannot participate in QCRs. Additionally, an inverse role R− is simple if R is [2], which agrees with our comment about the inverses of Euclidian roles. References [1] J.Y. Halpern and Y.Moses. A guide to completeness and complexity for modal logics of knowledge and belief. Artificial Intelligence, 54(3):319–379, 1992. [2] I. Horrocks, O. Kutz, and U. Sattler. The irresistible SRIQ. Proc. of the International Workshop on OWL: Experiences and Directions, 2005. Proceedings of DL 2006 243 Experiences with Load Balancing and Caching for Semantic Web Applications Alissa Kaplunova, Atila Kaya, Ralf Möller Hamburg University of Technology (TUHH) al.kaplunova|at.kaya|r.f.moeller@tu-harburg.de 1 Introduction In our work we consider applications which generate queries w.r.t. many different knowledge bases. We presuppose that for a particular KB there exists many possible query servers. In order to successfully build applications that exploit these KB servers, an appropriate middleware is required. In particular, if there are many servers for a specific KB, the middleware is responsible for managing request dispatching and load balancing. Load balancing must be accompanied by middleware-side caching in order to reduce network latency. In our view the KB servers we consider are managed by different organizations. Therefore, DL applications used in some company need some gateway inference server that provides local caching (in the intranet) to: (i) reduce external communication and (ii) avoid repetitive external server access operations in case multiple intranet applications pose the same queries. In our case study we investigate a server for answering OWL-QL− queries1 . This server (called RacerManager) acts as a proxy that delegates queries to back-end DL reasoners (RacerPro servers) that manage the KB mentioned in the query and load KBs on demand. Compared to previous versions, the functionality of RacerManager has been substantially enhanced. We address the problems of load balancing and caching strategies in order to exploit previous query results (possibly produced by different users of the local site). Caching is investigated in the presence of incrementally answered OWL-QL− queries. In addition, the effects of concurrent query executions on multiple (external) inference servers and corresponding transmissions of multiple partial result sets for queries are studied. OWL-QL− Server as a Middleware 2 Reasoning over ontologies with a large number of individuals in ABoxes is a big challenge for existing reasoners. To deal with this problem, RacerPro supports iterative query answering, where clients may request partial result sets in the form of tuples. For iterative query answering, RacerPro can be configured to compute the next tuples on demand (lazy mode). Moreover, it can be instructed to return cheap (easily inferable) tuples first. Although these configuration options enable the reasoner to achieve significant performance improvements for a single client, this effect decreases in scenarios where multiple clients pose queries concurrently. In fact, a single RacerPro instance cannot process several client requests in parallel. Thus, as long as RacerPro is processing a clients request, which usually includes activities such as parsing the query, reading the corresponding knowledge base, classifying it, finding requested number of answer tuples and returning them, all other clients have to wait in a queue. 1 OWL-QL− stands for OWL-QL with distinguished variables only. 244 Posters Motivated by the concurrency problem, our OWL-QL− server is implemented to act as a load-balancing middleware between clients and multiple RacerPro instances. We chose a common n-tier architecture as the base layout. RacerManager can initialize and manage an array of RacerPro instances. Multiple clients can use the web service offered by RacerManager to send their OWL-QL− queries concurrently. With respect to the states of the managed RacerPro instances and a naive load-balancing strategy (similar to round-robin), RacerManager dispatches the queries to RacerPro instances. More precisely, given a query, which requires some ontology, RacerManager prefers RacerPro instances, which already worked on this ontology. Before a OWL-QL− query is send to a reasoner instance, it is translated to the new Racer Query Language (nRQL) by the translator module. Preliminary test results showed that, the proposed architecture prevents clients from blocking each other, as it is the case if multiple clients interact with a single reasoner. Additionally, irrespective of load balancing and query dispatching, a client may benefit from the caching mechanism offered by RacerManager. In case he sends a query, which has been posed before, answer tuples are delivered directly from the cache. If the client requires more tuples than available in the cache, only the missing number of tuples are requested from an appropriate RacerPro instance. The cache expiration can be set to an arbitrary duration or turned off. In the latter case, the cache will never be cleared. 3 Features and Limitations When developing the OWL-QL− server, our main goal was to ensure scalability and high performance. Therefore we only take into account OWL-QL features, that could be efficiently implemented in the middleware tier. In fact, some features such as may-bind variables implemented by the middleware using rolling-up techniques and disjunctive queries would result in excessive computing and increased communication with reasoners. In our opinion, they should be supported by reasoners directly. We presuppose that for many Semantic Web applications, conjunctive queries with must-bind (distinguished) variables will be enough. Therefore, our current implementation supports such queries. Furthermore, it handles queries that include a premise (if-then queries). The server does not support scenarios where multiple knowledge bases are to be used to answer a query or where a knowledge base is not specified by the client. Furthermore, RacerManager does not provide proofs about the reasoning made. 4 Future Work In our future work we will conduct comprehensive experiments in order to empirically evaluate RacerManager. Moreover, we will compare alternative strategies to determine more efficient load balancing and cache usage algorithms. It is obvious, that in some situations the single RacerManager server may itself become a bottleneck. One possible solution is to replicate it and to set up a HTTP or hardware dispatcher in front of RacerManager instances. From our point of view, there are some open questions regarding the implementation of the OWL-QL standard which we will address in the future, e.g.: (i) How should queries without a KB reference be handled in different scenarios? (ii) In which scenarios should clients share results obtained by other clients? (iii) Is expiration of query results important for applications? (iv) Are subscription services required? 245 Proceedings of DL 2006 How sensor data interpretation could benefit from description logics: Position paper Sylvia Melzer, Ralf Möller Hamburg University of Technology, Germany {sylvia.melzer, r.f.moeller}@tuhh.de In many areas the interest in real-time and content-based data dissemination is increasing. Sensor data might be sent to an interested client automatically (via publish/subscribe facilities) or might be downloaded on demand by sending a query (pull model). Data dissemination and data access are important aspects in a sensor-based environment and both have a wide influence on the architectual design for an individual sensor data supply. Even simple sensors provide individual records of data by supporting web service calls (maybe via a proxy). In this scenario web service architectures are faced with high data rates, large profile population, variable query life span and high result volume. Technical details and an implementation of a service-based publish/subscribe communication architecture is described in detail in [2]. Content-based publish/subscribe systems support the required flexibility to interpret complex queries. Figure 1 illustrates a publish/subscribe system for sensor data information. Sensors deliver sensor data like multimedia data to the broker system which is a service. Based on the content of information and the user profiles (called demand sensors … servicei service profiles for channels (Si,KBSi) … Broker KBB Ch1 Ch2 demand demand demand subscription (D,KBD) … clients Figure 1: publish/subscribe system 246 Posters subscriptions, or demands D for short) the broker system delivers information to the client. Clients subscribe to the service with their demand profiles. After low-level filtering, aggregating, and combining raw sensor data, the broker component provides certain sensor data information channels (Chi ). Channels are described with some profiles (called service profiles (S)) as well. Both parts, services and demands are described with tuples (Si , KBSi ) or (Di , KBDi ). All knowledge bases KBS/D refer to some broker-specific background knowledge base KBB . If a certain demand subscription is sent to the broker, the problem is to find relevant channel-based services such that match with the demand specification. In the literature, several formalizations of this process are discussed [1, 3]: • Satisfiability of the conjunction Si ⊓ Di of supply and demand description with respect to KBSi ∪ KBDi ∪ KBB . • Subsumption Si ⊑ Di between supply and demand descriptions w.r.t. a background ontology KBSi ∪ KBDi ∪ KBB . In our scenario, the situation is slightly more complicated because some demands can only be fulfilled if some channels are combined (see the combination of Ch1 and Ch2 for the left client in Figure 1). In addition, maybe some filtering has to be done at client-side because there is no perfect match with existing services (channels) and incoming demands. In this context a feedback process (i.e. output data is fed back to the input of the system), currently discussed in BOEMIE1 , proves that clients get more relevant and enriched information because of the evolution of knowledge bases and the fusion of information from different channels in a bootstrapping fashion. In the e-commerce literature, service and demand adaptions have already been investigated in terms of service negotiation. According to this view, abduction and contraction operators can be used to configure supplies such that they match modified demands. This theory also provides a foundation for channel fusion (service modification) and a posteriori client-side filtering (demands taylored towards available services). References [1] Lei Li and Ian Horrocks. A software framework for matchmaking based on semantic web technology. Int. J. of Electronic Commerce, 8(4):39–60, 2004. [2] Sylvia Melzer. A content-based publish-subscribe architecture for individualized sensor data supply (in German). Master thesis, Hamburg University of Technology, January 2006. [3] David Trastour, Claudio Bartolini, and Javier Gonzalez-Castillo. A semantic web approach to service description for matchmaking of services. In Proceedings of the International Semantic Web Working Symposium (SWWS), 2001. 1 BOEMIE (Bootstrapping Ontology Evolution with Multimedia Information Extraction) is an IST 6th Framework Programme Project (FP6-027538) Proceedings of DL 2006 247 Cost-efficient web service composition for processes with distributed retrieval queries: Position paper Irma Sofia Espinosa Peraldi and Ralf Möller Hamburg University of Technology Software Systems Institute (STS) Hamburg, Germany sofia.espinosa@tuhh.de, r.f.moeller@tuhh.de 1 Problem description In the near future, description logic reasoning services will be offered as web services and initial versions of, for instance, OWL QL web services have already been developed (e.g., [1]). Due to the high acceptance of web service technologies to support processes across heterogeneous architectures, the amount of web service offering similar functionality is proliferating. Thus, the problem of selecting a particular service binding in order to minimize resource consumption in a web service composition has emerged. In particular we investigate optimization strategies for web service compositions that define large-scale inference processes with query correlation. Due to the business logic behind the process, there is an implicit knowledge about the enquired domain, the processing order of the queries and if a query subsumes another. Furthermore, the web service partners of such a composition provide reasoning services over (possibly heterogeneous) ontologies. Thus, the optimization criteria we are interested in is very much service-dependent, where reasoning tasks with query subsumption, optimization techniques with Abox indexing and KB availability are being considered. 2 Approach The optimization problem is expressed in terms of a configuration problem in which the web service partners (DL reasoners) become objects to be combined such that they satisfy the given criteria. The optimization algorithm was designed such that it can handle multiple criteria expressed as constraints, which 248 Posters are hard criteria that can not be relaxed, and objectives with no total order, of which a minimum or maximum number should not be violated. Furthermore, the considered criteria have dynamic values, due to the exposure of the web services partners to other (competing) calls for instance retrieval. Thus, it is not possible to a priori determine an execution plan. Therefore, we pursued an approach proposed by [3] using the notion of Pareto dominance, for local optimization, where for each invocation step in the composition, the set of given web service partners are being compared against the multiple objectives along the dimensions. A relaxation process is applied in case of over constraining. For details on the implementation see [4]. 3 Contribution Until now no solution has been presented to optimize large-scale inference processes (represented as web service compositions), where on the one side, the correlation of the process’s queries is being considered, and on the other side, reasoning tasks and optimization techniques offered by several DL reasoning services (representing the web service partners of the composition), is being used as criteria for optimizing resource consumption. In the current implementation only RacerPro[2] reasoners can be used to obtain required information about loaded Tboxes and Aboxes, about Abox index structures being computed, about whether a new query is subsumed by another query already answered by some server etc. However, since web service architecture are more and more accepted, current proposals for DL reasoner communication languages such as DIG might be extended with corresponding facilities in the future. References [1] J. Galinski, A. Kaya, and R. Möller. Development of a server to support the formal semantic web query language OWL-QL. In I. Horrocks, U. Sattler, and F. Wolter, editors, Proc. International Workshop on Description Logics, 2005. [2] Racer Systems GmbH & Co. KG. Racerpro 1.9. WWW page, March 2005. http://www.racer-systems.com (10.03.06). [3] D. Navinchandra. Exploration and innovation in Design. Towards a Computational Model. Springer-Verlag, 1 edition, 1991. [4] I. S. Espinosa Peraldi. Cost-efficient web service compositions. Master thesis, TU Hamburg-Harburg, June 2005. 249 Proceedings of DL 2006 Static Knowledge Representation of Multi-Agent System’s Specification by Description Logics Haiyan Che1 , Jigui Sun1,2 and Haibo Yu1 1 College of Computer Science and Technology, Jilin University Changchun 130012, China {chehy,jgsun,yuhb}@jlu.edu.cn 2 Key Laboratory of Symbolic Computation and Knowledge Engineering of Ministry of Education, Jilin University Changchun 130012, China Abstract Modularity and rigor are two key elements for multi-agent technology. Hong Zhu’s multi-agent system (MAS) development method provides proper language facilities supporting modularity. To enhance this method with rigor advocates a DL method to map the specification of MAS into a DL TBox. Thus, we can use the existing DL reasoners and systems to verify and validate some system’s properties. 1 Introduction Agent technology has been predicted to be the next generation mainstream computation paradigm. However, lack of rigor and language facilities directly supporting modularity and abstract mechanisms hamper the wide-scale adoption of it. Hong Zhu et al. contribute on the research of such language facilities. They advocate a model driven method for MAS development, which designs and implements CAMLE (Caste-centric Agent-oriented Modeling Language and Environment) [1] providing tools for constructing graphic MAS models, automatically checking consistency between various views and models, and automatically transforming these models into formal specifications in SLABS [2]. To enhance Hong Zhu’s method with rigor, we propose a DL method to map the specification of MAS written in SLABS into a DL TBox. Taking advantage of DL’s decidability and its existing reasoners and systems, we can perform certain reasonings about the system’s properties. 250 2 Posters Static Knowledge Representation with Description Logic ALCN IF reg The most important language facilities in SLABS are caste, agent and scenario. A MAS is regarded as a set of agents, and castes are the classifiers of agents, or the roles agents play. They define templates of the structure and behavior characteristics of agents. Scenarios are defined as the behavior patterns of the agents in an agent’s environment, perceiving which the agent can decide its action rather than driven by message communications. To represent the static part of the MAS’s specification we choose ALCN IF reg , which extends ALC with unqualified number restrictions (N ), inverse roles (I), agreement (F), and the composition of roles (reg).Based on the translation method from objectoriented model to DLs proposed by Calvanese et al. [3] we define a map from SLABS to DLs, which maps each caste and agent definition to corresponding concept, and depicts the instance relationship between agent and caste by the concept constructor of role agreement. 3 Conclusion This paper advocates a DL method to formalize the specification and perform certain reasonings about the properties of MAS. ALCN IF reg is chose to represent the static part of the specification and the satisfiability of concepts w.r.t. acyclic TBoxes is decidable with the complexity of NExpTime-complete [4]. To make our method practicable we need extend basic DL to represent dynamic knowledge as our further work. References [1] Zhu, H. and Shan, L., Caste-Centric Modelling of Multi-Agent Systems: The CAMLE Modelling Language and Automated Tools, in Beydeda, S. and Gruhn, V. (eds) Model-driven Software Development, Research and Practice in Software Engineering, Vol. II, Springer (2005) 57-89 [2] Zhu, H., ”SLABS: A Formal Specification Language for Agent-Based Systems”, Int. J. of Software Engineering and Knowledge Engineering 11(5) (2001) 529-558 [3] Diego Calvanese, Maurizio Lenzerini, and Daniele Nardi. Unifying classbased representation formalisms. J. of Artificial Intelligence Research, 11 (1999) 199-240 [4] F. Baader, D. McGuinness, D. Nardi, and P. Patel-Schneider. The Description Logic Handbook: Theory, Implementation and Applications, Cambridge University Press (2003) Proceedings of DL 2006 251 A Tableaux-based Mobile DL Reasoner F. Müller and M. Hanselmann and T. Liebig and O. Noppens Ulm University, D-89069 Ulm, Germany {felix.mueller|michael.hanselmann}@uni-ulm.de This is a preliminary experience report about designing and implementing a tableaux-based DL reasoner suitable to run on a mobile device. For now the reasoning system only offers pure TBox subsumption. Currently there is no preprocessing for efficient taxonomy computation nor ABox support. The reasoner supports the DIG standard for client communication. Nowadays most mobile devices are capable of running Java programs using the Micro Edition of the Java 2 platform (J2ME). In order to gain valuable experience in the course of developing a mobile DL reasoner we took the most ambiguous challenge by choosing the greatest common environment, namely pure J2ME, on very limited devices, namely mobile phones. Our approach is based on the well-known tableaux algorithm which is used in most modern DL reasoning systems. This has the advantage of starting with a relatively simple base algorithm which can be successively extended in order to support additional language constructs. The mobile reasoner currently can handle ALCN KBs with unique definitions. Experience has shown that a wide range of optimization techniques typically improve the performance of a naive tableaux implementation by orders of magnitude [1]. The most important ones are lazy unfolding, absorption and dependency directed backtracking. Not all of them are relevant within the current implementation due to the restricted expressivity of the supported language (e. g. absorption can be dropped in absence of GCIs). Within our mobile setting of very restricted memory and processing resources it is not only important to utilize those optimizations but to implement them in a resource-saving way. In this respect, the right choice of lean data structures is of exceptional importance. Our solution consists of an array based index model in order to implement an extended lazy unfolding technique called normalizing and naming/tagging (e.g. see [2]) very efficiently. Naming means that all concept expressions and sub-expressions are recursively indexed with an unambiguous identifier. In order to save memory we use integers as identifiers for concepts as well as expressions in contrast to strings or even Java objects. For example, an expression D ⊓ ∀r.E may be successively named as follows: 3 → (D ⊓ ∀r.E), 252 Posters 4 → D, and 5 → ∀r.E (E will then be named within a recursive call). Note that before introducing a new name the algorithm has to look-up whether this expression has already been named. A negated expression will receive a negative integer. All named TBox axioms, sub-axioms and elements have an associated integer matrix encoding their definition. Consider the TBox axiom A ≡ D⊓∀r.E and 6 → E, 1 → A. As a result of the naming phase the following integer arrays (among others) are generated: for 1 (resp. A): kn 4 5 where kn is an integer which encodes that the following entries are conjunctively connected. 5 (∀r.E) in turn is represented with km 6 where km encodes a universal quantification over a particular role, namely r (we use a special bit encoding in order to map language constructor, role, etc. into one integer). It can easily be seen that this reflects the original axiom by replacing the identifiers with their given expressions. The encoding from above is of advantage for detection of obvious syntactical clashes even between complex expressions which is known to be one of the most effective optimizations [1]. For example, we can use a fast integer operation in order to detect A and ¬A within a tableaux node simply by locally sorting it and checking whether there are two succeeding elements whose sum is 0. Our implementation successfully runs using the freely available Sun Wireless Toolkit emulator software as well as on real mobile phones. In order to test our reasoner we added a DIG/1.1 interface which allows to use Protégé as a front-end within the emulator setting. For linking Protégé with the reasoner running on a real phone we developed a small desktop application which serves as a proxy. More precisely, the proxy receives HTTP DIG messages from a client and will pass those via Bluetooth to the mobile reasoner. To our knowledge, there is no related work except Pocket KRHyper [3] a port of a subset of the hyper tableau calculus to a mobile phone. Pocket KRHyper covers unfoldable ALCI TBoxes extended by role hierarchies using a variant of the KRSS syntax. As far as can be seen within the log files of the system, FaCT++ seems to utilize a similar internal naming approach. References [1] Ian Horrocks. Applications of Description Logics: State of the Art and Research Challenges. In Proc. of the 13th Int. Conf. on Conceptual Structures (ICCS’05), pages 78–90, 2005. [2] Ian Horrocks and Peter Patel-Schneider. Optimising Description Logic Subsumption. Journal of Logic and Computation, 9(3):267–293, June 1999. [3] Alex Sinner and Thomas Kleemann. KRHyper – In Your Pocket. In Proc. of the International Conference on Automated Deduction (CADE-20), volume 3632 of LNCS, pages 452–458. Springer Verlag, 2005. Proceedings of DL 2006 253 Computing Maximally Satisfiable Terminologies for the Description Logic ALC with GCIs Kevin Lee and Thomas Meyer NICTA and University of New South Wales, Sydney, Australia {kevin.lee, thomas.meyer}@nicta.com.au Jeff Z. Pan University of Aberdeen, Aberdeen, UK jpan@csd.abdn.ac.uk 1 Introduction Existing description logic reasoners provide the means to detect logical errors in ontologies, but lack the capability to resolve them. We present a tableaubased algorithm for computing maximally satisfiable terminologies in ALC. Our main contribution is the ability of the algorithm to handle GCIs, using a refined blocking condition that ensures termination is achieved at the right point during the expansion process. Our work is closely related to that of [1], which considered the same problem for assertional (Abox) statements only, and [2], which deals only with unfoldable terminologies for ALC. 2 Reasoning with Unsatisfiability The algorithm receives as input a Tbox T and a concept name A in ALC, and returns as output the maximally A-satisfiable subsets (A-MSSs) of T . Each sentence in T is labelled with a unique propositional atom, hence T will be a set of . labelled axioms of the form (C ⊑ D)p and (C = D)p . Our algorithm starts by creating an Abox A containing only the labelled assertion A(x)⊤ , where x is an individual name. It then proceeds by continuously applying the expansion rules below, first to A, and then to the Aboxes created subsequently, until none of the rules are applicable. Note that clash-detection is not a condition for termination. Also, we assume that all concept assertions are in negation normal form. The expansion rules make use of the following abbreviations and definitions: A⊕C(x)φ stands for: (A\{C(x)ψ })∪{C(x)φ∨ψ } if C(x)ψ ∈ A, and A∪{C(x)φ } otherwise. Similarly, A ⊕ R(x, y)φ stands for: (A \ {R(x, y)ψ }) ∪ {R(x, y)φ∨ψ } if R(x, y)ψ ∈ A, and A∪{R(x, y)φ } otherwise. We refer to a labelled concept assertion C(x)φ as A-insertable iff, whenever there is a ψ such that C(x)ψ ∈ A, then 254 Posters ⊓-rule ⊔-rule ∃-rule ∀-rule ⊑-rule . =-rule if C1 ⊓ C2 (x)φ ∈ A, and either C1 (x)φ or C2 (x)φ is A-insertable, then A′ := (A ⊕ C1 (x)φ ) ⊕ C2 (x)φ . if C1 ⊔ C2 (x)φ ∈ A, and both C1 (x)φ and C2 (x)φ are A-insertable, then A′ := A ⊕ C1 (x)φ , A′′ := A ⊕ C2 (x)φ . if ∃R.C(x)φ ∈ A, x is not blocked, and either R(x, y)φ or C(y)φ is A-insertable, then A′ := (A⊕R(x, y)φ )⊕C(y)φ , where y is a new individual name and y > y ′ for all individual names y ′ in A. if {∀R.C(x)φ , R(x, y)ψ } ⊆ A, and C(y)φ∧ψ is A-insertable, then A′ := A ⊕ C(y)φ∧ψ . if (C ⊑ D)φ ∈ T , ¬C ⊔ D(x)φ is A-insertable for some individual name x, then A′ := A ⊕ ¬C ⊔ D(x)φ . . if (C = D)φ ∈ T , (¬C ⊔ D) ⊓ (C ⊔ ¬D)(x)φ is A-insertable for some individual name x, then A′ := A ⊕ (¬C ⊔ D) ⊓ (C ⊔ ¬D)(x)φ . φ 6|= ψ. After constructing an expansion tree using the above expansion rules, we compute a propositional formula called the clash-resolve formula as follows: Suppose A1 , . . . , An are the complete Aboxes obtained from the expansion. A particular clash {C(x)φ1 , ¬C(x)φ2 } ⊆ Ai is expressed by the propositional formula φ1 ∧ φ2 . Now suppose there are ki clashes in Ai , and let ψi,1 , . . . , ψi,ki be the formulas expressing all the clashes in Ai . The clash-resolve formula associV i W ¬ψi,j . To compute the A-MSSs, simply find the ated with T and A is: ni=1 kj=1 prime implicants of the clash-resolve formula. Each prime implicant is of the form (¬p1 ∧ . . . ∧ ¬pm ), and the corresponding A-MSS can be found by removing from the original set of axioms T the axioms whose labels are p1 , . . . , pm . Our result also show that classical blocking does not always block correctly at the right point, hence it will not always yield the desired results. The reason is that the labels associated with sentences are not taken into account when blocking is performed. Therefore, we define the refined blocking condition as follows: An individual y is blocked by x iff y > x and for every C(y)ψ ∈ A, it is the case that C(x)φ ∈ A for some φ such that ψ |= φ. 3 Conclusion and Future Work We presented an algorithm for computing maximally satisfiable terminologies for description logic represented in ALC. Unlike the existing algorithms, our proposed algorithm could also handle GCIs. We outlined some limitations with the classic subset blocking in the labelled satifiablity algorithm and addressed these issues by proposing a refined blocking condition. For future work, we will investigate on extending our algorithm to more expressive description logics, such as SI and ALCN . References [1] Franz Baader and Bernhard Hollunder. Embedding Defaults into Terminological Knowledge Representational Formalisms. Journal of Automated Reasoning, 14:149–180, 1995. [2] Stefan Schlobach. Diagnosing terminologies. In Proceedings of AAAI05, pages 670–675, 2005. Proceedings of DL 2006 255 Pellet System Description Evren Sirin and Bijan Parsia Maryland Information and Network Dynamics Lab, 8400 Baltimore Avenue, College Park, MD, 20740 USA evren@cs.umd.edu, bparsia@isr.umd.edu The description logic SHOIN (D) has attracted considerable interest as the foundation of the W3C standard Web Ontology Language variant, OWL-DL. Pellet is a sound and complete tableau reasoner for SHOIN (D) and incorporates a number of key features such as conjunctive ABox query, axiom pinpointing, rules, E-connection reasoning, and novel optimizations for nominals. In this paper we summarize Pellet’s features and special capabilities. Novel Optimizations Pellet implements most of the state of the art optimization techniques provided in the DL literature, e.g. absorption, dependency-directed backjumping, etc. In addition, there are also many novel optimization techniques implemented in Pellet especially to deal with nominals and large ABoxes. See [3] for details about these techniques. Axiom pinpointing Axiom pinpointing is a non-standard DL inference service that provides a justification for any arbitrary entailment derived by a reasoner from an OWL-DL knowledge base. Given a KB and any of its logical consequences, the axiom pinpointing service determines the premises in the KB that are sufficient for the entailment to hold. The justification is useful for understanding the output of the reasoner, which is key for many tasks, such as ontology debugging, design and evolution. See [2] for more details about axiom pinpointing service in Pellet. Conjunctive ABox query Query answering is yet another important feature for Semantic Web. Pellet includes a query engine that answers conjunctive ABox queries. In the presence of non-distinguished variables, the well-known “rolling-up” technique is used to answer tree-shaped queries. If there are only distinguished variables then every query atom can be answered in isolation and arbitrary shaped queries can be handled. See [4] for an explanation of the query simplification and query reordering techniques implemented in Pellet. 256 Posters E-Connections E-Connections are a framework for combining several families of decidable logics. In [1] we have proposed tableau algorithms for different E-Connection languages involving Description Logics so that an ontology can be refer to another ontology without fully importing the contents of that ontology. Pellet has been extended with tableau-based decision procedures for E-Connection languages involving combinations of SHOIN (D) ontologies [1]. Rules Pellet has support for AL-log (Datalog + SHOIN (D)) via a coupling with a Datalog reasoner. It incorporates the traditional AL-log algorithm and a new precompilation technique that is incomplete but more efficient. Pellet also has an experimental implementation of a direct tableau algorithm for a DL-safe rules extension to SHOIN (D) [5]. Preliminary empirical results have been encouraging and we think that the DL-safe implementation is practical for small to mid-sized ontologies esp. when the full expressivity of SHOIN (D) is needed. Usability Pellet provides many different interfaces. Pellet has a command line interface, an interactive web form, DIG protocol support, and programmatic interface with bindings to Jena and OWL-API libraries. It is used in conjunction with ontology editors Swoop, Protege, and TopBraid Composer. See the Pellet Web page at http://www.mindswap.org/2003/pellet for downloads and more detailed information about the system including the performance evaluation and comparison with other systems. References [1] B. Cuenca Grau, B. Parsia, and E.Sirin. Combining OWL ontologies using Econnections. Journal of Web Semantics, 4(1), January 2005. [2] A. Kalyanpur, B. Parsia, B. Cuenca-Grau, and E. Sirin. Axiom pinpointing: Finding (precise) justifications for arbitrary entailments in OWL-DL, 2006. Available at http://www.mindswap.org/papers/TracingTechReport.pdf. [3] E. Sirin, B. Cuenca-Grau, and B. Parsia. From wine to water: Optimizing description logic reasoning for nominals. In International Conf. on the Principles of Knowledge Representation and Reasoning (KR-2006), 2006. [4] E. Sirin and B. Parsia. Optimizations for answering conjunctive abox queries: First results. In Proc. of the Int. Description Logics Workshop (DL 2006), 2006. [5] B. Parsia V. Kolovski and E. Sirin. Extending the SHOIQ(D) tableaux with dl-safe rules: First results. In Proc. of the Int. Description Logics Workshop (DL 2006), 2006. 257 Proceedings of DL 2006 Topological Reasoning in Basic Description Logics Matteo Cristani, Nicoletta Gabrielli and Paolo Torelli Dipartimento di Informatica Università di Verona Strada Le Grazie 15, 37134 Verona (ITALY) 1 Introduction In the recent past, several scholars have shown interest in the development of an integration between general classification reasoning, as typically performed in Description Logic frameworks [DL2003], and Spatial Reasoning [CohnH01], usually carried out in a constraint-based context. Two approaches have been carried out in the recent past. One is based upon the extension ALCRP(D) of ALC with concrete domains, where the spatial reasoning capabilities of the framework are deployed by means of standard topological interpretation of rational numbers [HaLM1999]. The other one, instead, is based on the extension ALCIRCC [Wess2002] of ALC with role formation operators that are limited in scope to the definition of an algebraic-logic framework for spatial reasoning quite well-known in the reference literature and usually referred to as the Region Connection Calculus [Rand1989, Rand1992]. The goal of both these approaches is the representation of the topological properties and relationships between spatial objects that are in fact elements of the domain of the interpretation. This work aims at representing the topological properties of the sets of elements that correspond to the interpretations of the concepts defined in a ALC terminology. In particular we introduce a rewriting operator that can be proved to behave as a Kuratowski closure. With this closure operator we define the notion of connection between concepts. The definition of a closure operator induces a topology [Kell1975] on the domain of the interpretation in which concepts can be open or closed and therefore they can be connected or not. The notion of connection between concepts deals with the knowledge ontology, in fact we aspect that for example the concept of forest will be not connected with the concept of car. The introduction of rewriting operators in a description logic cannot interfere with the complexity of decision algorithms, so that if we introduce a rewriting 258 Posters operator in a description logic L that is decidable, then L remains decidable. However, a rewriting operator has its own computational cost, which is the complexity of applying the operator to generic descriptions of L. The complexity of the rewriting operator is therefore worth computing. In particular, we obtain three results. First, the extended case complexity - in which the Kuratowski operator is introduced in ALCU - is ExpTime, hence remaining decidable. The second result is that we have the same average case complexity as ALCU . The third aspect is that complexity is theoretically scalable with the operators. References [DL2003] F. Baader, D. Calvanese, D. McGuinness, D. Nardi, P. Patel-Schneider. The Description Logic Handbook: Theory, Implementation, and Applications. Cambridge University Press, 2003. [CohnH01] A. G. Cohn, S. M. Hazarika, Qualitative Spatial Representation and Reasoning: An Overview., In Fundamenta Informaticae volume 46, number 1-2, 2001, pp. 1-29 [HaLM1999] V. Haarslev, C. Lutz, R. Möller. A Description Logic with Concrete Domains and a Role-forming Predicate Operator. Journal of Logic Computation, Jun 1999; number 9, pp. 351-384. [Kell1975] J. L. Kelley. General Topology. Springer-Verlag, 1975. [Rand1989] D. A. Randell, A. G. Cohn. Modelling topological and metrical properties of physical processes. In Proceedings of the 1st International Conference on Knowledge Representation and Reasoning (KR-89), May 1989, pp. 55-66. Morgan Kaufmann, Toronto, ON, Canada [Rand1992] D. A. Randell, Z. Cui, A. G. Cohn. A spatial logic based on regions and connection. In Proceedings of the 3rd International Conference on Principles of Knowledge Representation and Reasoning (KR-92), October 1992, pp. 165-176. Morgan Kaufmann, Cambridge, MA, USA. [Wess2002] M. Wessel. Qualitative Spatial Reasoning with the ALCIRCC Family - First Results and Unanswered Questions. University of Hamburg, Computer Science Department, 2002 - 2003 259 Proceedings of DL 2006 The New ICom – Demo Paper – Pablo Fillottrani, Enrico Franconi, Sergio Tessaris Free University of Bozen-Bolzano, Italy lastname @inf.unibz.it ICom is an advanced CASE tool, which allows the user to design multiple UML class diagrams with inter- and intra-model constraints. Complete logical reasoning is employed by the tool to verify the specification, infer implicit facts, devise stricter constraints, and manifest any inconsistency. For the ontology creation and maintenance tasks, ICom interface supports ontology engineers in engineering ontologies that meets clear and measurable quality criteria. Indeed, recently we observe the development of large numbers of ontologies. These ontologies have, however, usually been developed in an ad hoc manner by domain experts, often with only a limited understanding of the semantics of ontology languages. The result is that many ontologies are of low quality—they make poor use of the languages in which they are written and do not accurately capture the author’s rich knowledge of the domain. This problem becomes even more acute as ontologies are maintained and extended over time, often by multiple authors. Poor quality ontologies usually require localised “tuning” in order to achieve the desired results within applications. This leads to further degradation in their overall quality, increases the brittleness of the applications that use them, and makes interoperability and reuse difficult or impossible. To overcome these problems tools are needed which support the design and the development of the basic infrastructure for building, merging, and maintaining ontologies. The Ontology Editor works on projects, which may contain one or more UML class diagram. The diagrams are referred as models. Multiple projects can be opened at the same time, but objects cannot be moved across them. Only one project is visible at a time and the editing of each project is independent. The user can switch between different projects using the tabs at the bottom of the project area. Figure 1 shows the main window of the Ontology Editor editing a single model. Classes are represented by boxes and n-ary associations by diamonds. Associations have so-called association classes specifying their name and attributes. Isa relationships are represented as arrows with a disc in the middle (e.g. see Enterprise and Business Organization). 260 Posters Figure 1: Ontology Editor main window Although the Ontology Editor can be used as a standalone modelling tool, exploiting its full capabilities require the coupling of the system with any DIG enabled Description Logic reasoner [3, 1]. The leverage of automated reasoning to support the domain modelling is enabled by a precise semantic definition of all the elements of the class diagrams. The diagrams and inter-model constraints are internally translated into a class-based logic formalism. The same underlying logic enables the use of a view definition language to specify additional contraints, not captured at the diagram level. The next section introduces this logic-based modelling language. After the verification process, the system provides the user with a visual account of the deductions by modifying the appearance of the model diagrams in the project. The user can discard the deductions and the entire project will be returned to its original state (and any information about unsatisfiability will be discarded). Alternatively, the equivalence, subsumption association, and role cardinality deductions can be added permanently to the project by committing them. ICom is a fairly mature project, its first release has been published in 2001 (see [4, 2]). This paper presents the new improved version of the tool. Although the theoretical underpinning is the same, ICom in its current version underwent major changes in several crucial aspects. First of all, the diagrammatic representation is now based on UML rather than Entity Relationship diagrams. The graphical interface has been completely rewritten to improve the usability and intuitiveness of the tool. Interoperability with other tools is a crucial aspect; so, import and export modules have been developed for XMI 2.x [5] and Description Logics based ontology languages. Proceedings of DL 2006 261 References [1] Sean Bechhofer. The dig description logic interface: Dig/1.1. Technical report, University of Manchester, 2003. [2] Diego Calvanese, Giuseppe De Giacomo, Maurizio Lenzerini, Daniele Nardi, and Riccardo Rosati. Description logic framework for information integration. In Proc. of the 6th Int. Conf. on the Principles of Knowledge Representation and Reasoning (KR’98), pages 2–13, 1998. [3] Diego Calvanese, Maurizio Lenzerini, and Daniele Nardi. Description logics for conceptual data modeling. In Jan Chomicki and Günter Saake, editors, Logics for Databases and Information Systems. Kluwer, 1998. [4] Enrico Franconi and Gary Ng. The icom tool for intelligent conceptual modelling. In 7th Intl. Workshop on Knowledge Representation meets Databases (KRDB’00), 2000. [5] OMG, 2005. http://www.omg.org/technology/documents/formal/xmi.htm. 262 Posters Index Artale, Alessandro . . . . . . . . . . . . . . . . . 97 Lu, Jianjiang . . . . . . . . . . . . . . . . . . 39, 111 Lukácsy, Gergely . . . . . . . . . . . . . . . . . . 183 Lutz, Carsten . . . . . . . . . . . . . . . 15, 27, 97 Baader, Franz . . . . . . . . . . . . . . . . . . . . . . 15 Ben-David, Shoham . . . . . . . . . . . . . . . 223 Booth, Richard . . . . . . . . . . . . . . . . . . . 253 Möller, Ralf . . . . . . . . 151, 243, 245, 247 Müller, Felix . . . . . . . . . . . . . . . . . . . . . . 251 Ma, Li . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 Mellish, Chris . . . . . . . . . . . . . . . . . . . . . 127 Melzer, Sylvia . . . . . . . . . . . . . . . . . . . . . 245 Meyer, Thomas . . . . . . . . . . . . . . . . . . . 253 Miličić, Maja . . . . . . . . . . . . . . . . . . . . . . . 27 Calvanese, Diego . . . . . . . . . . . . . . . 51, 62 Che, Haiyan . . . . . . . . . . . . . . . . . . . . . . 249 Cristani, Matteo . . . . . . . . . . . . . . . . . . 257 Cuenca Grau, Bernardo . . . . . . 175, 208 De Giacomo, Giuseppe . . . . . . . . . . . . . 51 Ding, Yu . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Nagy, Zsolt . . . . . . . . . . . . . . . . . . . . . . . 183 Noppens Olaf . . . . . . . . . . . . . . . . . . . . . 251 Eiter, Thomas. . . . . . . . . . . . . . . . . . . . . .62 Ortiz, Magdalena . . . . . . . . . . . . . . . . . . 62 Fillottrani, Pablo . . . . . . . . . . . . . . . . . 259 Fokoue, Achille . . . . . . . . . . . . . . . . . . . 135 Franconi, Enrico . . . . . . . . . . . . . . . . . . 259 Pan, Jeff . . . . . . . . . . . . . . . . 119, 127, 253 Parsia, Bijan . . . 192, 200, 208, 215, 255 Peñaloza Rafael . . . . . . . . . . . . . . . . . . . . 74 Peraldi, Irma Sofia Espinosa . . . . . . 247 Gabrielli, Nicoletta . . . . . . . . . . . . . . . . 257 Gardiner, Tom . . . . . . . . . . . . . . . . . . . . 167 Glimm, Brite . . . . . . . . . . . . . . . . . . . . . . . . 3 Rosati, Riccardo . . . . . . . . . . . . . . . . . . . 51 Haarslev, Volker . . . . . . . . . 143, 151, 159 Halaschek-Wiener, Christian . . . . . . 200 Hanselmann, Michael . . . . . . . . . . . . . 251 Hladik Jan . . . . . . . . . . . . . . . . . . . . . . . . . 74 Horrocks, Ian . . . . . . . . . . . . . . 3, 167, 175 Hudek, Alexander K. . . . . . . . . . . . . . . . 86 Sattler, Ulrike . . . . . . . . . . . . . . . . . . 3, 175 Sirin, Evren . . . . . . . . 192, 200, 215, 255 Stamou, Giorgos . . . . . . . . . . . . . 119, 241 Stoilos, Giorgos . . . . . . . . . . . . . . 119, 241 Sun, Jigui . . . . . . . . . . . . . . . . . . . . . . . . . 249 Suntisrivaraporn, Boontawee . . . . . . . 15 Szeredi, Peter . . . . . . . . . . . . . . . . . . . . . 183 Kalyanpur, Aditya . . . . . . . . . . . 200, 208 Kang, Dazhou . . . . . . . . . . . . . . . . . 39, 111 Kaplunova, Alissa . . . . . . . . . . . . . . . . . 243 Kaya, Atila . . . . . . . . . . . . . . . . . . . . . . . 243 Kershenbaum, Aaron. . . . . . . . . . . . . .135 Kleemann, Thomas . . . . . . . . . . . . . . . 231 Kolovski, Vladimir . . . . . . . . . . . . . . . . 192 Kutz, Oliver . . . . . . . . . . . . . . . . . . . . . . 175 Tessaris, Sergio . . . . . . . . . . . . . . . . . . . 259 Toman, David . . . . . . . . . . . . . . . . . . . . . . 97 Torelli, Paolo . . . . . . . . . . . . . . . . . . . . . 257 Trefler, Richard . . . . . . . . . . . . . . . . . . . 223 Tsarkov, Dmitry . . . . . . . . . . . . . . . . . . 167 Weddell, Grant . . . . . . . . . . . . . . . . 86, 223 Wessel, Michael . . . . . . . . . . . . . . . . . . . 151 Wolter, Frank . . . . . . . . . . . . . . . . . . . . . . 27 Lee, Kevin . . . . . . . . . . . . . . . . . . . . . . . . 253 Lembo, Domenico . . . . . . . . . . . . . . . . . . 51 Lenzerini, Maurizio. . . . . . . . . . . . . . . . .51 Li, Yanhui. . . . . . . . . . . . . . . . . . . . .39, 111 Liebig, Thorsten . . . . . . . . . . . . . . . . . . 251 Liu, Hongkai . . . . . . . . . . . . . . . . . . . . . . . 27 Xu, Baowen . . . . . . . . . . . . . . . . . . . 39, 111 Zuo, Ming . . . . . . . . . . . . . . . . . . . . . . . . 159 263