THE DESCRIPTION LOGIC HANDBOOK Theory, implementation, and applications Edited by
FRANZ BAADER DIEGO CALVANESE DEBORAH L. McGUINNESS DANIELE NARDI PETER F. PATEL-SCHNEIDER
Cambridge, New York, Melbourne, Madrid, Cape Town, Singapore, São Paulo Cambridge University Press The Edinburgh Building, Cambridge , United Kingdom Published in the United States of America by Cambridge University Press, New York www.cambridge.org Information on this title: www.cambridge.org/9780521781763 © Cambridge University Press 2003 This book is in copyright. Subject to statutory exception and to the provision of relevant collective licensing agreements, no reproduction of any part may take place without the written permission of Cambridge University Press. First published in print format 2003 - isbn-13 978-0-511-06694-8 eBook (NetLibrary) - isbn-10 0-511-06694-5 eBook (NetLibrary) - isbn-13 978-0-521-78176-3 hardback - isbn-10 0-521-78176-0 hardback
Cambridge University Press has no responsibility for the persistence or accuracy of s for external or third-party internet websites referred to in this book, and does not guarantee that any content on such websites is, or will remain, accurate or appropriate.
Contents
List of contributors Preface
page ix xiii
1 An Introduction to Description Logics D. Nardi and R. J. Brachman 1.1 Introduction 1.2 From networks to Description Logics 1.3 Knowledge representation in Description Logics 1.4 From theory to practice: Description Logic systems 1.5 Applications developed with Description Logic systems 1.6 Extensions of Description Logics 1.7 Relationship to other fields of Computer Science 1.8 Conclusion
Part I: Theory
1 1 4 12 16 20 30 36 39
41
2 Basic Description Logics F. Baader and W. Nutt 2.1 Introduction 2.2 Definition of the basic formalism 2.3 Reasoning algorithms 2.4 Language extensions 3 Complexity of Reasoning F. M. Donini 3.1 Introduction 3.2 OR-branching: finding a model 3.3 AND-branching: finding a clash 3.4 Combining sources of complexity 3.5 Reasoning in the presence of axioms 3.6 Undecidability 3.7 Reasoning about individuals in ABoxes 3.8 Discussion 3.9 A list of complexity results for subsumption and satisfiability
v
43 43 46 74 90 96 96 100 107 114 116 122 128 132 133
vi
Contents
4 Relationships with other Formalisms U. Sattler, D. Calvanese, and R. Molitor 4.1 AI knowledge representation formalisms 4.2 Logical formalisms 4.3 Database models 5 Expressive Description Logics D. Calvanese and G. De Giacomo 5.1 Introduction 5.2 Correspondence between Description Logics and Propositional Dynamic Logics 5.3 Functional restrictions 5.4 Qualified number restrictions 5.5 Objects 5.6 Fixpoint constructs 5.7 Relations of arbitrary arity 5.8 Finite model reasoning 5.9 Undecidability results 6 Extensions to Description Logics F. Baader, R. K¨usters, and F. Wolter 6.1 Introduction 6.2 Language extensions 6.3 Non-standard inference problems
Part II: Implementation 7 From Description Logic Provers to Knowledge Representation Systems D. L. McGuinness and P. F. Patel-Schneider 7.1 Introduction 7.2 Basic access 7.3 Advanced application access 7.4 Advanced human access 7.5 Other technical concerns 7.6 Public relations concerns 7.7 Summary 8 Description Logic Systems R. M¨oller and V. Haarslev 8.1 New light through old windows? 8.2 The first generation 8.3 Second generation Description Logic systems 8.4 The next generation: Fact, Dlp and Racer 8.5 Lessons learned 9 Implementation and Optimization Techniques I. Horrocks 9.1 Introduction 9.2 Preliminaries
137 137 149 161 178 178 179 186 193 197 201 204 209 215 219 219 220 250
263 265 265 267 270 274 280 280 281 282 282 283 291 301 303 306 306 308
Contents
9.3 9.4 9.5 9.6
Subsumption-testing algorithms Theory versus practice Optimization techniques Discussion
Part III: Applications 10 Conceptual Modeling with Description Logics A. Borgida and R. J. Brachman 10.1 Background 10.2 Elementary Description Logic modeling 10.3 Individuals in the world 10.4 Concepts 10.5 Subconcepts 10.6 Modeling relationships 10.7 Modeling ontological aspects of relationships 10.8 A conceptual modeling methodology 10.9 The ABox: modeling specific states of the world 10.10 Conclusions 11 Software Engineering C. A. Welty 11.1 Introduction 11.2 Background 11.3 Lassie 11.4 CodeBase 11.5 CSIS and CBMS 12 Configuration D. L. McGuinness 12.1 Introduction 12.2 Configuration description and requirements 12.3 The Prose and Questar family of configurators 12.4 Summary 13 Medical Informatics A. Rector 13.1 Background and history 13.2 Example applications 13.3 Technical issues in medical ontologies 13.4 Ontological issues in medical ontologies 13.5 Architectures: terminology servers, views, and change management 13.6 Discussion: key lessons from medical ontologies 14 Digital Libraries and Web-Based Information Systems I. Horrocks, D. L. McGuinness, and A. C. Welty 14.1 Background and history 14.2 Enabling the semantic web: DAML
vii
313 317 322 345
347 349 349 351 353 355 358 361 363 369 370 371 373 373 373 374 379 380 388 388 390 403 404 406 407 410 416 422 424 426 427 427 432
viii
Contents
14.3 OIL and DAML+OIL 14.4 Summary 15 Natural Language Processing E. Franconi 15.1 Introduction 15.2 Semantic interpretation 15.3 Reasoning with the logical form 15.4 Knowledge-based natural language generation 16 Description Logics for Databases A. Borgida, M. Lenzerini, and R. Rosati 16.1 Introduction 16.2 Data models and Description Logics 16.3 Description Logics and database querying 16.4 Data integration 16.5 Conclusions Appendix Description Logic Terminology F. Baader A.1 Notational conventions A.2 Syntax and semantics of common Description Logics A.3 Additional constructors A.4 A note on the naming scheme for Description Logics Bibliography Index
434 448 450 450 451 454 460 462 462 465 474 478 483 485 485 485 491 494 496 547
Contributors
Franz Baader Institut f¨ur Theoretische Informatik Fakult¨at Informatik TU Dresden 01062 Dresden, Germany
[email protected] http://wwwtcs.inf.tu-dresden.de/~baader/ Alex Borgida Department of Computer Science Rutgers University Piscataway, NJ 08855, U.S.A.
[email protected] http://www.cs.rutgers.edu/~borgida/ Ronald J. Brachman Corporation for National Research Initiatives, U.S.A.
[email protected] http://www.brachman.org/ Diego Calvanese Dipartimento di Informatica e Sistemistica Universit`a di Roma “La Sapienza” Via Salaria 113, 00198 Roma, Italy
[email protected] http://www.dis.uniroma1.it/~calvanese/ Giuseppe De Giacomo Dipartimento di Informatica e Sistemistica Universit`a di Roma “La Sapienza” Via Salaria 113, 00198 Roma, Italy
[email protected] http://www.dis.uniroma1.it/~degiacomo/
ix
x
List of contributors
Francesco M. Donini Dipartimento di Elettrotecnica ed Elettronica Politecnico di Bari Via Re David 200, 70125 Bari, Italy
[email protected] http://dee.poliba.it/dee-web/doniniweb/donini.html Enrico Franconi Faculty of Computer Science Free University of Bozen-Bolzano Dominikanerplatz 3, I-39100 Bozen, Italy
[email protected] http://www.inf.unibz.it/~franconi/ Volker Haarslev Computer Science Department Concordia University 1455 de Maisonneuve Blvd. W., Montreal, Quebec H3G IM8, Canada
[email protected] http://www.cs.concordia.ca/~faculty/haarslev/ Ian Horrocks Information Management Group Department of Computer Science University of Manchester Manchester M13 9PL, U.K.
[email protected] http://www.cs.man.ac.uk/~horrocks/ Ralf K¨usters Institut f¨ur Informatik und Praktische Mathematik Christian-Albrechts-Universit¨at zu Kiel Olshausenstraße 40, 24098 Kiel, Germany
[email protected] http://www.ti.informatik.uni-kiel.de/~kuesters/ Maurizio Lenzerini Dipartimento di Informatica e Sistemistica Universit`a di Roma “La Sapienza” Via Salaria 113, 00198 Roma, Italy
[email protected] http://www.dis.uniroma1.it/~lenzerini/ Deborah L. McGuinness Knowledge Systems Laboratory Gates Building 2A, Stanford University Stanford, CA 94305-9020, U.S.A.
[email protected] http://ksl.stanford.edu/people/dlm/
List of contributors Ralf Molitor Swiss Life IT Research and Development Group General Guisan Quai 40, CH-8002 Z¨urich, Switzerland
[email protected] http://research.swisslife.ch/~molitor/ Ralf M¨oller Computer Science Department University of Hamburg Vogt-K¨olln-Straße 30, 22527 Hamburg, Germany
[email protected] http://kogs-www.informatik.uni-hamburg.de/~moeller/ Daniele Nardi Dipartimento di Informatica e Sistemistica Universit`a di Roma “La Sapienza” Via Salaria 113, 00198 Roma, Italy
[email protected] http://www.dis.uniroma1.it/~nardi/ Werner Nutt Department of Computing and Electrical Engineering Heriot-Watt University Edinburgh, EH14 4AS, U.K.
[email protected] http://www.cee.hw.ac.uk/~nutt/ Peter F. Patel-Schneider Bell Labs Research 600 Mountain Avenue Murray Hill, NJ 07974, U.S.A.
[email protected] http://www.bell-labs.com/user/pfps/ Alan Rector Medical Informatics Group Department of Computer Science University of Manchester Manchester M13 9PL, U.K.
[email protected] http://www.cs.man.ac.uk/mig/ Riccardo Rosati Dipartimento di Informatica e Sistemistica Universit`a di Roma “La Sapienza” Via Salaria 113, 00198 Roma, Italy
[email protected] http://www.dis.uniroma1.it/~rosati/
xi
xii
List of contributors
Ulrike Sattler Institut f¨ur Theoretische Informatik Fakult¨at Informatik TU Dresden 01062 Dresden, Germany
[email protected] http://wwwtcs.inf.tu-dresden.de/~uli/ Christopher A. Welty Knowledge Structures Group IBM Watson Research Center 19 Skyline Dr., Hawthorne, NY 10532, U.S.A.
[email protected] Frank Wolter Institut f¨ur Informatik Universit¨at Leipzig Augustus-Platz 10–11, 04109 Leipzig, Germany
[email protected] http://www.informatik.uni-leipzig.de/~wolter/
Preface
Knowledge Representation is the field of Artificial Intelligence that focuses on the design of formalisms that are both epistemologically and computationally adequate for expressing knowledge about a particular domain. One of the main lines of investigation has been concerned with the principle that knowledge should be represented by characterizing classes of objects and the relationships between them The organization of the classes used to describe a domain of interest is based on a hierarchical structure, which not only provides an effective and compact representation of information, but also allows the relevant reasoning tasks to be performed in a computationally effective way. The above principle drove the development of the first frame-based systems and semantic networks in the 1970s. However, these systems were in general not formally defined and the associated reasoning tools were strongly dependent on the implementation strategies. A fundamental step towards a logic-based characterization of required formalisms was accomplished through the work on the Kl-One system, which collected many of the ideas stemming from earlier semantic networks and frame-based systems, and provided a logical basis for interpreting objects, classes (or concepts), and relationships (or links, roles) between them. The first goal of such a logical reconstruction was the precise characterization of the set of constructs used to build class and link expressions. The second goal was to provide reasoning procedures that are sound and complete with respect to the semantics. The article ‘The tractability of subsumption in Frame-Based Description Languages’ by Ron Brachman and Hector Levesque, presented at AAAI 1984, addressing the tradeoff between the expressiveness of Kl-One like languages and the computational complexity of reasoning, is usually regarded as the origin of research on Description Logics. Subsequent research came under the label terminological systems to emphasize the fact that classes and relationships were used to establish the basic terminology adopted in the modeled domain. Still later, the emphasis was on the set of concept xiii
xiv
Preface
forming constructs admitted in the language, giving rise to the name concept languages. Recently, attention has moved closer to the properties of the underlying logical systems, and the term Description Logics has become popular. Research on Description Logics has covered theoretical aspects, implementation of knowledge representation systems (modern frame-based systems) and the use of such systems to realize applications in several areas. This pattern of development is an example of one of the standard research methodologies, as is recognized by the Artificial Intelligence community. The key element has been the very close interaction between theory and practice. On the one hand, there are various implemented systems based on Description Logics, offering a palette of description formalisms with differing expressive power, and which are employed in various application domains (such as natural language processing, configuration of technical systems, databases). On the other hand, the formal and computational properties (like decidability, complexity) of various description formalisms have been studied in detail. These investigations are usually motivated by the use of certain constructors in systems or the need for these constructors in specific applications, and the results of such investigations have strongly influenced the design of new systems. The Description Logics research community currently consists of at least 100 active researchers. In addition, other communities are now becoming interested in Description Logics, most notably the Databases community and, more recently, the Semantic Web one. After more than a decade of research on Description Logics there is a substantial body of work and well-established technical literature. However, there is no comprehensive presentation of the major achievements in the field, although survey papers have been published and workshop proceedings are available. Now, since 1989 a workshop dedicated to Description Logics has been held, initially every two years but annually from 1994. At the 1997 workshop a Working Group was formed to develop a proposal for a book that would provide a systematic introduction to Description Logics, covering all aspects of the research in the field, namely: theory, implementation, and applications. Following the spirit that fostered this research, the Description Logic Handbook would provide a thorough introduction to Description Logics both for the more theoretically oriented reader interested in the formal study of Description Logics and for the more practically oriented reader aiming at a principled usage of knowledge representation systems based on Description Logics. Although some refinements have been made to the initial proposal to embody recent developments in the field, the final structure of the Handbook reflects the original intentions. The Handbook is organized into three parts plus an initial chapter providing a general introduction to the field.
Preface
xv
Part I addresses the theoretical work in Description Logics and includes five chapters. Chapter 2 introduces Description Logics as a formal language for representing knowledge and reasoning about it. Chapter 3 addresses the computational complexity of reasoning in several Description Logics. Chapter 4 explores the relationship with other representation formalisms, within and outside the field of Knowledge Representation. Chapter 5 covers extensions of the basic Description Logics introduced in Chapter 2 by very expressive constructs that require advanced reasoning techniques. Chapter 6 considers extensions of Description Logics by representation features and non-standard inference problems not available in the basic framework. Part II is concerned with the implementation of knowledge representation systems based on Description Logics. Chapter 7 describes the features that need to be provided, in addition to the inference engine for a particular Description Logic, to build a knowledge representation system. Chapter 8 reviews implemented knowledge representation systems based on Description Logics that have played or play an important role in the field. Chapter 9 describes the implementation of the reasoning services which form the core of Description Logic knowledge representation systems. Part III addresses the deployment of Description Logics in the design and implementation of fielded applications. Chapter 10 discusses the issues involved in the development of an ontology for some universe of discourse, which is to become a conceptual model or knowledge base represented and reasoned with using Description Logics. Chapter 11 presents applications of Description Logics in the area of software engineering. Chapter 12 introduces the problem of configuration and the largest and longest lived family of Description Logic-based configurators. Chapter 13 is concerned with the use of Description logics in various kinds of applications in medical informatics—terminology, intelligent user interfaces, decision support and semantic indexing, language technology, and systems integration. Chapter 14 reviews the applications of Description Logics in webbased information systems, and the more recent developments related to languages for the Semantic Web. Chapter 15 analyzes the uses of Description Logics for natural language processing to encode syntactic, semantic, and pragmatic elements needed to drive semantic interpretation and natural language generation processes. Chapter 16 surveys the major classes of application of Description Logics and their reasoning facilities to the issues of data management, including the expression of the conceptual domain model/ontology of the data source, the integration of multiple data sources, and the formulation and evaluation of queries. The syntax and semantics for Description Logics is summarized in an Appendix, which has been used as a reference to unify the notation throughout the book.
xvi
Preface
Finally, an extended, integrated bibliography is provided and, within each chapter, comprehensive guides through the relevant literature are given. The chapters are written by some of the most prominent researchers in the field, introducing the basic technical material before taking the reader to the current state of the subject. The chapters have been reviewed in a two step process, which involved two or three reviewers for each chapter. We have relied on the work of several external reviewers, selected both within the Description Logic community, and outside the field, to increase the readability for non experts. In addition, each chapter has been read also by authors of other chapters, to improve the overall coherence. As such, the book is conceived as a unique reference for the subject. Although not intended as a textbook, the Handbook can be used as a basis for specialized courses on Description Logics. In addition, some of the chapters can be used as teaching material in Knowledge Representation courses. The Handbook is also a comprehensive reference to the subject in more introductory courses in the field of Artificial Intelligence. We want to acknowledge the contribution and help of several people. First of all, the authors, who have successfully accomplished the hardest task of writing the chapters, carefully addressing the reviewers’ comments as well as the issues raised by the effort in making the presentation and notation uniform. Second, we thank the reviewers for their precious work, which led to significant improvements in the final outcome. The external reviewers were: Premkumar T. Devanbu, Peter L. Elkin, Jerome Euzenat, Erich Gr¨adel, Michael Gruninger, Frank van Harmelen, Jana Koehler, Diane Litman, Robert M. MacGregor, Amedeo Napoli, Hans-J¨urgen Ohlbach, Marie-Christine Rousset, Nestor Rychtyckyj, Renate Schmidt, James G. Schmolze, Roberto Sebastiani, Michael Uschold,
Preface
xvii
Moshe Y. Vardi, Grant Weddell, Robert A. Weida. A special thank you goes also to Christopher A. Welty who, besides serving as a reviewer, also coordinated the reviewing process for some of the chapters. Third, we express our gratitude to the Description Logics community as a whole (see also the Description Logics homepage at http://dl.kr.org/) for the outstanding research achievements and for applying the pressure that enabled us to complete the Handbook. Finally, we are indebted to Cambridge University Press, and, in particular, to David Tranah, for giving us the opportunity to put the Handbook together and for the excellent support in the editing process. The publisher has used its best endeavours to ensure that the URLs for external websites referred to in this book are correct and active at the time of going to press. However, the publisher has no responsibility for the websites and can make no guarantee that a site will remain live or that the content is or will remain appropriate.
1 An Introduction to Description Logics DANIELE NARDI RONALD J. BRACHMAN
Abstract This introduction presents the main motivations for the development of Description Logics (DLs) as a formalism for representing knowledge, as well as some important basic notions underlying all systems that have been created in the DL tradition. In addition, we provide the reader with an overview of the entire book and some guidelines for reading it. We first address the relationship between Description Logics and earlier semantic network and frame systems, which represent the original heritage of the field. We delve into some of the key problems encountered with the older efforts. Subsequently, we introduce the basic features of DL languages and related reasoning techniques. DL languages are then viewed as the core of knowledge representation systems, considering both the structure of a DL knowledge base and its associated reasoning services. The development of some implemented knowledge representation systems based on Description Logics and the first applications built with such systems are then reviewed. Finally, we address the relationship of Description Logics to other fields of Computer Science. We also discuss some extensions of the basic representation language machinery; these include features proposed for incorporation in the formalism that originally arose in implemented systems, and features proposed to cope with the needs of certain application domains.
1.1 Introduction Research in the field of knowledge representation and reasoning is usually focused on methods for providing high-level descriptions of the world that can be effectively used to build intelligent applications. In this context, “intelligent” refers to the ability 1
2
D. Nardi and R. J. Brachman
of a system to find implicit consequences of its explicitly represented knowledge. Such systems are therefore characterized as knowledge-based systems. Approaches to knowledge representation developed in the 1970s – when the field enjoyed great popularity – are sometimes divided roughly into two categories: logicbased formalisms, which evolved out of the intuition that predicate calculus could be used unambiguously to capture facts about the world; and other, non-logic-based representations. The latter were often developed by building on more cognitive notions – for example, network structures and rule-based representations derived from experiments on recall from human memory and human execution of tasks like mathematical puzzle solving. Even though such approaches were often developed for specific representational chores, the resulting formalisms were usually expected to serve in general use. In other words, the non-logical systems created from very specific lines of thinking (e.g., early production systems) evolved to be treated as general-purpose tools, expected to be applicable in different domains and to different types of problems. On the other hand, since first-order logic provides very powerful and general machinery, logic-based approaches were more general-purpose from the very start. In a logic-based approach, the representation language is usually a variant of first-order predicate calculus, and reasoning amounts to verifying logical consequence. In the non-logical approaches, often based on the use of graphical interfaces, knowledge is represented by means of some ad hoc data structures, and reasoning is accomplished by similarly ad hoc procedures that manipulate the structures. Among these specialized representations we find semantic networks and frames. Semantic networks were developed after the work of Quillian [1967], with the goal of characterizing by means of network-shaped cognitive structures the knowledge and the reasoning of the system. Similar goals were shared by later frame systems [Minsky, 1981], which rely on the notion of a “frame” as a prototype and on the capability of expressing relationships between frames. Although there are significant differences between semantic networks and frames, both in their motivating cognitive intuitions and in their features, they have a strong common basis. In fact, they can both be regarded as network structures, where the structure of the network aims at representing sets of individuals and their relationships. Consequently, we use the term network-based structures to refer to the representation networks underlying semantic networks and frames (see [Lehmann, 1992] for a collection of papers concerning various families of network-based structures). Owing to their more human-centered origins, the network-based systems were often considered more appealing and more effective from a practical viewpoint than the logical systems. Unfortunately, they were not fully satisfactory, because of their usual lack of precise semantic characterization. The end result of this was that every system behaved differently from the others, in many cases despite
1
An Introduction to Description Logics
3
virtually identical-looking components and even identical relationship names. The question then arose as to how to provide semantics to representation structures, in particular to semantic networks and frames, which carried the intuition that, by exploiting the notion of hierarchical structure, one could gain both in terms of ease of representation and in terms of the efficiency of reasoning. One important step in this direction was the recognition that frames (at least their core features) could be given a semantics by relying on first-order logic [Hayes, 1979]. The basic elements of the representation are characterized as unary predicates, denoting sets of individuals, and binary predicates, denoting relationships between individuals. However, such a characterization does not capture the constraints of semantic networks and frames with respect to logic. Indeed, although logic is the natural basis for specifying a meaning for these structures, it turns out that frames and semantic networks (for the most part) did not require all the machinery of first-order logic, but could be regarded as fragments of it [Brachman and Levesque, 1985]. In addition, different features of the representation language would lead to different fragments of first-order logic. The most important consequence of this fact is the recognition that the typical forms of reasoning used in structure-based representations could be accomplished by specialized reasoning techniques, without necessarily requiring first-order logic theorem provers. Moreover, reasoning in different fragments of first-order logic leads to computational problems of differing complexity. Subsequent to this realization, research in the area of Description Logics began under the label terminological systems, to emphasize that the representation language was used to establish the basic terminology adopted in the modeled domain. Later, the emphasis was on the set of concept-forming constructs admitted in the language, giving rise to the name concept languages. In more recent years, after attention was further moved towards the properties of the underlying logical systems, the term Description Logics became popular. In this book we mainly use the term “Description Logics” for the representation systems, but often use the word “concept” to refer to the expressions of a DL language, denoting sets of individuals, and the word “terminology” to denote a (hierarchical) structure built to provide an intensional representation of the domain of interest. Research on Description Logics has covered theoretical underpinnings as well as implementation of knowledge representation systems and the development of applications in several areas. This kind of development has been quite successful. The key element has been the methodology of research, based on a very close interaction between theory and practice. On the one hand, there are various implemented systems based on Description Logics, which offer a palette of description formalisms with differing expressive power, and which are employed in various application
4
D. Nardi and R. J. Brachman
domains (such as natural language processing, configuration of technical products, or databases). On the other hand, the formal and computational properties of reasoning (like decidability and complexity) of various description formalisms have been investigated in detail. The investigations are usually motivated by the use of certain constructors in implemented systems or by the need for these constructors in specific applications – and the results have influenced the design of new systems. This book is meant to provide a thorough introduction to Description Logics, covering all the above-mentioned aspects of DL research – namely theory, implementation, and applications. Consequently, the book is divided into three parts: r Part I introduces the theoretical foundations of Description Logics, addressing some of the most recent developments in theoretical research in the area; r Part II focuses on the implementation of knowledge representation systems based on Description Logics, describing the basic functionality of a DL system, surveying the most influential knowledge representation systems based on Description Logics, and addressing specialized implementation techniques; r Part III addresses the use of Description Logics and of DL-based systems in the design of several applications of practical interest.
In the remainder of this introductory chapter, we review the main steps in the development of Description Logics, and introduce the main issues that are dealt with later in the book, providing pointers for its reading. In particular, in the next section we address the origins of Description Logics and then we review knowledge representation systems based on Description Logics, the main applications developed with Description Logics, the main extensions to the basic DL framework, and relationships with other fields of Computer Science. 1.2 From networks to Description Logics In this section we begin by recalling approaches to representing knowledge that were developed before research on Description Logics began (i.e., semantic networks and frames). We then provide a very brief introduction to the basic elements of these approaches, based on Tarski-style semantics. Finally, we discuss the importance of computational analyses of the reasoning methods developed for Description Logics, a major ingredient of research in this field. 1.2.1 Network-based representation structures In order to provide some intuition about the ideas behind representations of knowledge in network form, we here speak in terms of a generic network, avoiding references to any particular system. The elements of a network are nodes and links.
1
An Introduction to Description Logics
5
v/r
Person
hasChild
(1,NIL)
Female Parent
Woman
Mother
Fig. 1.1. An example network.
Typically, nodes are used to characterize concepts, i.e., sets or classes of individual objects, and links are used to characterize relationships among them. In some cases, more complex relationships are themselves represented as nodes; these are carefully distinguished from nodes representing concepts. In addition, concepts can have simple properties, often called attributes, which are typically attached to the corresponding nodes. Finally, in many of the early networks both individual objects and concepts were represented by nodes. Here, however, we restrict our attention to knowledge about concepts and their relationships, deferring for now treatment of knowledge about specific individuals. Let us consider a simple example, whose pictorial representation is given in Figure 1.1, which represents knowledge concerning persons, parents, children, etc. The structure in the figure is also referred to as a terminology, and it is indeed meant to represent the generality or specificity of the concepts involved. For example the link between Mother and Parent says that “mothers are parents”; this is sometimes called an “IS-A” relationship. The IS-A relationship defines a hierarchy over the concepts and provides the basis for the “inheritance of properties”: when a concept is more specific than some other concept, it inherits the properties of the more general one. For example, if a person has an age, then a woman has an age, too. This is the typical setting of the so-called (monotonic) inheritance networks (see [Brachman, 1979]). A characteristic feature of Description Logics is their ability to represent other kinds of relationships that can hold between concepts, beyond IS-A relationships. For example, in Figure 1.1, which follows the notation of [Brachman and Schmolze, 1985], the concept of Parent has a property that is usually called a “role”, expressed by a link from the concept to a node for the role labeled hasChild. The role has what is called a “value restriction”, denoted by the label v/r, which expresses a limitation
6
D. Nardi and R. J. Brachman
on the range of types of objects that can fill that role. In addition, the node has a number restriction expressed as (1,NIL), where the first number is a lower bound on the number of children and the second element is the upper bound, and NIL denotes infinity. Overall, the representation of the concept of Parent here can be read as “A parent is a person having at least one child, and all of his/her children are persons.” Relationships of this kind are inherited from concepts to their subconcepts. For example, the concept Mother, i.e., a female parent, is a more specific descendant of both the concepts Female and Parent, and as a result inherits from Parent the link to Person through the role hasChild; in other words, Mother inherits the restriction on its hasChild role from Parent. Observe that there may be implicit relationships between concepts. For example, if we define Woman as the concept of a female person, it is the case that every Mother is a Woman. It is the task of the knowledge representation system to find implicit relationships such as these (many are more complex than this one). Typically, such inferences have been characterized in terms of properties of the network. In this case one might observe that both Mother and Woman are connected to both Female and Person, but the path from Mother to Person includes a node Parent, which is more specific then Person, thus enabling us to conclude that Mother is more specific than Person. However, the more complex the relationships established among concepts, the more difficult it becomes to give a precise characterization of what kind of relationships can be computed, and how this can be done without failing to recognize some of the relationships or without providing wrong answers. 1.2.2 A logical account of network-based representation structures Building on the above ideas, a number of systems were implemented and used in many kinds of applications. As a result, the need emerged for a precise characterization of the meaning of the structures used in the representations and of the set of inferences that could be drawn from those structures. A precise characterization of the meaning of a network can be given by defining a language for the elements of the structure and by providing an interpretation for the strings of that language. While the syntax may have different flavors in different settings, the semantics is typically given as a Tarski-style semantics. For the syntax we introduce a kind of abstract language, which resembles other logical formalisms. The basic step of the construction is provided by two disjoint alphabets of symbols that are used to denote atomic concepts, designated by unary predicate symbols, and atomic roles, designated by binary predicate symbols; the latter are used to express relationships between concepts.
1
An Introduction to Description Logics
7
Terms are then built from the basic symbols using several kinds of constructors. For example, intersection of concepts, which is denoted C D, is used to restrict the set of individuals under consideration to those that belong to both C and D. Notice that, in the syntax of Description Logics, concept expressions are variablefree. In fact, a concept expression denotes the set of all individuals satisfying the properties specified in the expression. Therefore, C D can be regarded as the firstorder logic sentence, C(x) ∧ D(x), where the variable ranges over all individuals in the interpretation domain and C(x) is true for those individuals that belong to the concept C. In this book, we will present other syntactic notations that are more closely related to the concrete syntax adopted by implemented DL systems, and which are more suitable for the development of applications. One example of concrete syntax proposed in [Patel-Schneider and Swartout, 1993] is based on a Lisp-like notation, where the concept of female persons, for example, is denoted by (and Person Female). The key characteristic features of Description Logics reside in the constructs for establishing relationships between concepts. The basic ones are value restrictions. For example, a value restriction, written ∀R.C, requires that all the individuals that are in the relationship R with the concept being described belong to the concept C (technically, it is all individuals that are in the relationship R with an individual described by the concept in question that are themselves describable as C’s). As for the semantics, concepts are given a set-theoretic interpretation: a concept is interpreted as a set of individuals, and roles are interpreted as sets of pairs of individuals. The domain of interpretation can be chosen arbitrarily, and it can be infinite. The non-finiteness of the domain and the open-world assumption are distinguishing features of Description Logics with respect to the modeling languages developed in the study of databases (see Chapters 4 and 16). Atomic concepts are thus interpreted as subsets of the intepretation domain, while the semantics of the other constructs is then specified by defining the set of individuals denoted by each construct. For example, the concept C D is the set of individuals obtained by intersecting the sets of individuals denoted by C and D, respectively. Similarly, the interpretation of ∀R.C is the set of individuals that are in the relationship R with individuals belonging to the set denoted by the concept C. As an example, let us suppose that Female, Person, and Woman are atomic concepts and that hasChild and hasFemaleRelative are atomic roles. Using the operators intersection, union and complement of concepts, interpreted as set operations, we can describe the concept of “persons that are not female” and the concept of “individuals that are female or male” by the expressions Person ¬Female
and
Female Male.
8
D. Nardi and R. J. Brachman
It is worth mentioning that intersection, union, and complement of concepts have been also referred to as concept conjunction, concept disjunction and concept negation, respectively, to emphasize the relationship to logic. Let us now turn our attention to role restrictions by looking first at quantified role restrictions and, subsequently, at what we call “number restrictions”. Most languages provide (full) existential quantification and value restriction that allow one to describe, for example, the concept of “individuals having a female child” as ∃hasChild.Female, and to describe the concept of “individuals all of whose children are female” by the concept expression ∀hasChild.Female. In order to distinguish the function of each concept in the relationship, the individual object that corresponds to the second argument of the role viewed as a binary predicate is called a role filler. In the above expressions, which describe the properties of parents having female children, individual objects belonging to the concept Female are the fillers of the role hasChild. Existential quantification and value restrictions are thus meant to characterize relationships between concepts. In fact, the role link between Parent and Person in Figure 1.1 can be expressed by the concept expression ∃hasChild.Person ∀hasChild.Person. Such an expression therefore characterizes the concept of Parent as the set of individuals having at least one filler of the role hasChild belonging to the concept Person; moreover, every filler of the role hasChild must be a person. Finally, notice that in quantified role restrictions the variable being quantified is not explicitly mentioned. The corresponding sentence in first-order logic is ∀y.R(x, y) ⊃ C(y), where x is again a free variable ranging over the interpretation domain. Another important kind of role restriction is given by number restrictions, which restrict the cardinality of the sets of role fillers. For instance, the concept ( 3 hasChild) ( 2 hasFemaleRelative) represents the concept of “individuals having at least three children and at most two female relatives”. Number restrictions are sometimes viewed as a distinguishing feature of Description Logics, although one can find some similar constructs in some database modeling languages (notably Entity–Relationship models). Beyond the constructs to form concept expressions, Description Logics provide constructs for roles, which can, for example, establish role hierarchies. However, the use of role expressions is generally limited to expressing relationships between concepts. Intersection of roles is an example of a role-forming construct. Intuitively, hasChild hasFemaleRelative yields the role “has-daughter”, so that the concept
1
An Introduction to Description Logics
9
expression Woman 2 (hasChild hasFemaleRelative) denotes the concept of “a woman having at most 2 daughters”. A more comprehensive view of the basic definitions of DL languages will be given in Chapter 2.
1.2.3 Reasoning The basic inference on concept expressions in Description Logics is subsumption, typically written as C D. Determining subsumption is the problem of checking whether the concept denoted by D (the subsumer) is considered more general than the one denoted by C (the subsumee). In other words, subsumption checks whether the first concept always denotes a subset of the set denoted by the second one. For example, one might be interested in knowing whether Woman Mother. In order to verify this kind of relationship one has in general to take into account the relationships defined in the terminology. As we explain in the next section, under appropriate restrictions, one can embody such knowledge directly in concept expressions, thus making subsumption over concept expressions the basic reasoning task. Another typical inference on concept expressions is concept satisfiability, which is the problem of checking whether a concept expression does not necessarily denote the empty concept. In fact, concept satisfiability is a special case of subsumption, with the subsumer being the empty concept, meaning that a concept is not satisfiable. Although the meaning of concepts had already been specified with a logical semantics, the design of inference procedures in Description Logics was influenced for a long time by the tradition of semantic networks, where concepts were viewed as nodes and roles as links in a network. Subsumption between concept expressions was recognized as the key inference and the basic idea of the earliest subsumption algorithms was to transform two input concepts into labeled graphs and test whether one could be embedded into the other; the embedded graph would correspond to the more general concept (the subsumer) [Lipkis, 1982]. This method is called structural comparison, and the relation between concepts being computed is called structural subsumption. However, a careful analysis of the algorithms for structural subsumption shows that they are sound, but not always complete in terms of the logical semantics: whenever they return “yes” the answer is correct, but when they report “no” the answer may be incorrect. In other words, structural subsumption is in general weaker than logical subsumption. The need for complete subsumption algorithms is motivated by the fact that in the usage of knowledge representation systems it is often necessary to have a
10
D. Nardi and R. J. Brachman
guarantee that the system has not failed in verifying subsumption. Consequently, new algorithms for computing subsumption have been devised that are no longer based on a network representation, and these can be proven to be complete. Such algorithms have been developed by specializing classical settings for deductive reasoning to the DL subsets of first-order logics, as done for tableau calculi by Schmidt-Schauß and Smolka [1991], and also by more specialized methods. In the paper “The tractability of subsumption in frame-based description languages”, Brachman and Levesque [1984] argued that there is a tradeoff between the expressiveness of a representation language and the difficulty of reasoning over the representations built using that language. In other words, the more expressive the language, the harder the reasoning. They also provided a first example of this tradeoff by analyzing the language FL− (Frame Language), which included intersection of concepts, value restrictions and a simple form of existential quantification. They showed that for such a language the subsumption problem could be solved in polynomial time, while adding a construct called role restriction to the language makes subsumption a conp-hard problem (the extended language was called FL). The paper by Brachman and Levesque introduced at least two new ideas: (i) “efficiency of reasoning” over knowledge structures can be studied using the tools of computational complexity theory; (ii) different combinations of constructs can give rise to languages with different computational properties.
An immediate consequence of the above observations is that one can study formally and methodically the tradeoff between the computational complexity of reasoning and the expressiveness of the language, which itself is defined in terms of the constructs that are admitted in the language. After the initial paper, a number of results on this tradeoff for concept languages were obtained (see Chapters 2 and 3), and these results allow us to draw a fairly complete picture of the complexity of reasoning for a wide class of concept languages. Moreover, the problem of finding the optimal tradeoff, namely the most expressive extensions of FL− with respect to a given set of constructs that still keep subsumption polynomial, has been studied extensively [Donini et al., 1991b; 1999]. One of the assumptions underlying this line of research is to use worst-case complexity as a measure of the efficiency of reasoning in Description Logics (and more generally in knowledge representation formalisms). Such an assumption has sometimes been criticized (see for example [Doyle and Patil, 1991]) as not adequately characterizing system performance or accounting for more average-case behavior. While this observation suggests that computational complexity alone may not be sufficient for addressing performance issues, research on the computational
1
An Introduction to Description Logics
11
complexity of reasoning in Description Logics has most definitely led to a much deeper understanding of the problems arising in implementing reasoning tools. Let us briefly address some of the contributions of this body of work. First of all, the study of the computational complexity of reasoning in Description Logics has led to a clear understanding of the properties of the language constructs and their interaction. This is not only valuable from a theoretical viewpoint, but gives insight to the designer of deduction procedures, with clear indications of the language constructs and their combinations that are difficult to deal with, as well as general methods to cope with them. Secondly, the complexity results have been obtained by exploiting a general technique for satisfiability checking in concept languages, which relies on a form of tableau calculus [Schmidt-Schauß and Smolka, 1991]. Such a technique has proved extremely useful for studying both the correctness and the complexity of the algorithms. More specifically, it provides an algorithmic framework that is parametric with respect to the language constructs. The algorithms for concept satisfiability and subsumption obtained in this way have also led directly to practical implementations by application of clever control strategies and optimization techniques. The most recent knowledge representation systems based on Description Logics adopt tableau calculi [Horrocks, 1998b]. Thirdly, the analysis of pathological cases in this formal framework has led to the discovery of incompleteness in the algorithms developed for implemented systems. This has also consequently proven useful in the definition of suitable test sets for verifying implementations. For example, the comparison of implemented systems (see for example [Baader et al., 1992b; Heinsohn et al., 1992]) has greatly benefitted from the results of the complexity analysis. The basic reasoning techniques for Description Logics are presented in Chapter 2, while a detailed analysis of the complexity of reasoning problems in several languages is developed in Chapter 3. After the tradeoff between expressiveness and tractability of reasoning was thoroughly analyzed and the range of applicability of the corresponding inference techniques had been experimented with, there was a shift of focus in the theoretical research on reasoning in Description Logics. Interest grew in relating Description Logics to the modeling languages used in database management. In addition, the discovery of strict relationships with expressive modal logics stimulated the study of so-called very expressive Description Logics. These languages, besides admitting very general mechanisms for defining concepts (for example cyclic definitions, addressed in the next section), provide a richer set of concept-forming constructs and constructs for forming complex role expressions. For these languages, the expressiveness is great enough that the new challenge became enriching the language while retaining the decidability of reasoning. It is worth pointing out that this new
12
D. Nardi and R. J. Brachman
direction of theoretical research was accompanied by a corresponding shift in the implementation of knowledge representation systems based on very expressive DL languages. The study of reasoning methods for very expressive Description Logics is addressed in Chapter 5. 1.3 Knowledge representation in Description Logics In the previous section a basic representation language for Description Logics was introduced along with some key associated reasoning techniques. Our goal now is to illustrate how Description Logics can be useful in the design of knowledge-based applications, that is to say, how a DL language is used in a knowledge representation system that provides a language for defining a knowledge base and tools to carry out inferences over it. The realization of knowledge systems involves two primary aspects. The first consists in providing a precise characterization of a knowledge base; this involves precisely characterizing the type of knowledge to be specified to the system as well as clearly defining the reasoning services the system needs to provide – the kind of questions that the system should be able to answer. The second aspect consists in providing a rich development environment where users can benefit from different services that can make their interaction with the system more effective. In this section we address the logical structure of the knowledge base, while the design of systems and tools for the development of applications is addressed in the next section. One of the products of some important historical efforts to provide precise characterizations of the behavior of semantic networks and frames was a functional approach to knowledge representation [Levesque, 1984]. The idea was to give a precise specification of the functionality to be provided by a knowledge base and, specifically, of the inferences performed by the knowledge base – independent of any implementation. In practice, the functional description of a reasoning system is productively specified through a so-called “Tell&Ask” interface. Such an interface specifies operations that enable knowledge base construction (Tell operations) and operations that allow one to get information out of the knowledge base (Ask operations). In the following we shall adopt this view for characterizing both the definition of a DL knowledge base and the deductive services it provides. Within a knowledge base one can see a clear distinction between intensional knowledge, or general knowledge about the problem domain, and extensional knowledge, which is specific to a particular problem. A typical DL knowledge base analogously comprises two components – a TBox and an ABox. The TBox contains intensional knowledge in the form of a terminology (hence the term “TBox”, but “taxonomy” could be used as well) and is built through declarations that describe general properties of concepts. Because of the nature of the subsumption
1
An Introduction to Description Logics
13
relationships among the concepts that constitute the terminology, TBoxes are usually thought of as having a lattice-like structure; this mathematical structure is entailed by the subsumption relationship – it has nothing to do with any implementation. The ABox contains extensional knowledge – also called assertional knowledge (hence the term “ABox”) – knowledge that is specific to the individuals of the domain of discourse. Intensional knowledge is usually thought not to change – to be “timeless”, in a way – and extensional knowledge is usually thought to be contingent, or dependent on a single set of circumstances, and therefore subject to occasional or even constant change. In the rest of the section we present a basic Tell&Ask interface by analyzing the TBox and the ABox of a DL knowledge base.
1.3.1 The TBox One key element of a DL knowledge base is given by the operations used to build the terminology. Such operations are directly related to the forms and the meaning of the declarations allowed in the TBox. The basic form of declaration in a TBox is a concept definition, that is, the definition of a new concept in terms of other previously defined concepts. For example, a woman can be defined as a female person by writing this declaration: Woman ≡ Person Female. Such a declaration is usually interpreted as a logical equivalence, which amounts to providing both sufficient and necessary conditions for classifying an individual as a woman. This form of definition is much stronger than the ones used in other kinds of representations of knowledge, which typically impose only necessary conditions; the strength of this kind of declaration is usually considered a characteristic feature of DL knowledge bases. In DL knowledge bases, therefore, a terminology is constituted by a set of concept definitions of the above form. However, there are some important common assumptions usually made about DL terminologies: r Only one definition for a concept name is allowed. r Definitions are acyclic in the sense that concepts are neither defined in terms of themselves nor in terms of other concepts that indirectly refer to them.
This kind of restriction is common to many DL knowledge bases and implies that every defined concept can be expanded in a unique way into a complex expression containing only atomic concepts by replacing every defined concept with the righthand side of its definition.
14
D. Nardi and R. J. Brachman
Nebel [1990b] showed that even simple expansion of definitions like this gives rise to an unavoidable source of complexity; in practice, however, definitions that inordinately increase the complexity of reasoning do not seem to occur. Under these assumptions the computational complexity of inferences can be studied by abstracting from the terminology and by considering all given concepts as fully expanded expressions. Therefore, much of the study of reasoning methods in Description Logics has been focused on concept expressions and, more specifically, as discussed in the previous section, on subsumption, which can be considered the basic reasoning service for the TBox. In particular, the basic task in constructing a terminology is classification, which amounts to placing a new concept expression in the proper place in a taxonomic hierarchy of concepts. Classification can be accomplished by verifying the subsumption relation between each defined concept in the hierarchy and the new concept expression. The placement of the concept will be in between the most specific concepts that subsume the new concept and the most general concepts that the new concept subsumes. More general settings for concept definitions have recently received some attention, deriving from attempts to establish formal relationships between Description Logics and other formalisms and from attempts to satisfy a need for increased expressive power. In particular, the admission of cyclic definitions has led to different semantic interpretations of the declarations, known as greatest/least fixed-point, and descriptive semantics. Although it has been argued that different semantics may be adopted depending on the target application, the more commonly adopted one is descriptive semantics, which simply requires that all the declarations be satisfied in the interpretation. Moreover, by dropping the requirement that on the left-hand side of a definition there can only be an atomic concept name, one can consider so-called (general) inclusion axioms of the form C D where C and D are arbitrary concept expressions. Notice that a concept definition can be expressed by two general inclusions. As a result of several theoretical studies concerning both the decidability of and implementation techniques for cyclic TBoxes, the most recent DL systems admit rather powerful constructs for defining concepts. The basic deduction service for such TBoxes can be viewed as logical implication and it amounts to verifying whether a generic relationship (for example a subsumption relationship between two concept expressions) is a logical consequence of the declarations in the TBox. The issues arising in the semantic characterization of cyclic TBoxes are dealt with in Chapter 2, while techniques for reasoning in
1
An Introduction to Description Logics
15
cyclic TBoxes are addressed in Chapter 2 and in Chapter 5, where very expressive Description Logics are presented.
1.3.2 The ABox The ABox contains extensional knowledge about the domain of interest, that is, assertions about individuals, usually called membership assertions. For example, Female Person(ANNA) states that the individual ANNA is a female person. Given the above definition of woman, one can derive from this assertion that ANNA is an instance of the concept Woman. Similarly, hasChild(ANNA, JACOPO) specifies that ANNA has JACOPO as a child. Assertions of the first kind are also called concept assertions, while assertions of the second kind are also called role assertions. As illustrated by these examples, in the ABox one can typically specify knowledge in the form of concept assertions and role assertions. In concept assertions general concept expressions are typically allowed, while role assertions, where the role is not a primitive role but a role expression, are typically not allowed, being treated in the case of very expressive languages only. The basic reasoning task in an ABox is instance checking, which verifies whether a given individual is an instance of (belongs to) a specified concept. Although other reasoning services are usually considered and employed, they can be defined in terms of instance checking. Among them we find knowledge base consistency, which amounts to verifying whether every concept in the knowledge base admits at least one individual; realization, which finds the most specific concept an individual object is an instance of; and retrieval, which finds the individuals in the knowledge base that are instances of a given concept. These can all be accomplished by means of instance checking. The presence of individuals in a knowledge base makes reasoning more complex from a computational viewpoint [Donini et al., 1994b], and may require significant extensions of some TBox reasoning techniques. Reasoning in the ABox is addressed in Chapter 3. It is worth emphasizing that, although we have separated out for convenience the services for the ABox, when the TBox cannot be dealt with by means of the simple substitution mechanism used for acyclic TBoxes, the reasoning services may have to take into account all of the knowledge base including both the TBox and the
16
D. Nardi and R. J. Brachman
ABox, and the corresponding reasoning problems become more complex. A full setting including general TBox and ABox is addressed in Chapter 5, where very expressive Description Logics are discussed. More general languages for defining ABoxes have also been considered. Knowledge representation systems providing a powerful logical language for the ABox and a DL language for the TBox are often considered hybrid reasoning systems, since completely different knowledge representation languages may be used to specify the knowledge in the different components. Hybrid reasoning systems were popular in the 1980s (see for example [Brachman et al., 1985]); lately, the topic has regained attention [Levy and Rousset, 1997; Donini et al., 1998b], focusing on knowledge bases with a DL component for concept definitions and a logic-programming component for assertions about individuals. Sound and complete inference methods for hybrid knowledge bases become difficult to devise whenever there is a strict interaction between the knowledge components. 1.4 From theory to practice: Description Logic systems A direct practical result of research on knowledge representation has been the development of tools for the construction of knowledge-based applications. As already noted, research on Description Logics has been characterized by a tight connection between theoretical results and implementation of systems. This has been achieved by maintaining a very close relationship between theoreticians, system implementors and users of knowledge representation systems based on Description Logics (DL-KRSs). The results of work on reasoning algorithms and their complexity have influenced the design of systems, and research on reasoning algorithms has itself been focused by a careful analysis of the capabilities and the limitations of implemented systems. In this section we first sketch the functionality of some knowledge representation systems and, subsequently, discuss the evolution of DL-KRSs. The reader can find a deeper treatment of the first topic in Chapter 7, while a survey of knowledge representation systems based on Description Logics is provided in Chapter 8. Chapter 9 is devoted to more specialized implementation and optimization techniques. 1.4.1 The design of knowledge representation systems based on Description Logics In order to appreciate the difficulties of implementing and maintaining a knowledge representation system, it is necessary to consider that in the usage of a knowledge representation system, the reasoning service is really only one aspect of a complex system, one which may even be hidden from the final user. The user, before getting
1
An Introduction to Description Logics
17
to “push the reasoning button”, has to model the domain of interest, and input knowledge into the system. Further, in many cases, a simple yes/no answer is of little use, so a simplistic implementation of the Tell&Ask paradigm may be inadequate. As a consequence, the path one follows to get from the identification of a suitable knowledge representation system to the design of applications based on it is a complex and demanding one (see for example [Brachman, 1992]). In the case of Description Logics, this is especially true if the goal is to devise a system to be used by users who are not DL experts and who need to obtain a working system as quickly as possible. In the 1980s, when frame-based systems (such as, for example, Kee [Fikes and Kehler, 1985]; see [Karp, 1992] for an overview) had reached the strength of commercial products, the burden on a user of moving to the more modern DL-KRSs had to be kept small. Consequently, a stream of research addressed important aspects of the pragmatic usability of DL systems. This issue was especially relevant for those systems aiming at limiting the expressiveness of the language, but providing the user with sound, complete and efficient reasoning services. The issue of embedding a DL language within an environment suitable for application development is further addressed in Chapter 7. In recent years, we might add, useful DL systems have often come as internal components of larger environments whose interfaces could completely hide the DL language and its core reasoning services. Systems like Imacs [Brachman et al., 1993] and Prose [Wright et al., 1993] were quite successful in classifying data and configuring products, respectively, without the need for any user to understand the details of the DL representation language (Classic) they were built upon. Nowadays, applications for gathering information from the World Wide Web, where the interface can be specifically designed to support the retrieval of such information, also hide the knowledge representation and reasoning component. In addition, some data modeling tools, where the system provides a more conventional interface, can provide additional facilities based on the capability of reasoning about models with a DL inference engine. The possible settings for taking advantage of Description Logics as components of larger systems are discussed in Part III; more specifically, Chapter 14 presents Web applications and Chapter 15 natural language applications, while the reasoning capabilities of Description Logics in database applications are addressed in Chapter 16. 1.4.2 Knowledge representation systems based on Description Logics The history of knowledge representation is covered in the literature in numerous ways (see for example [Woods and Schmolze, 1992; Rich, 1991; Baader et al., 1992b]). Here we identify three generations of systems, highlighting their historical evolution rather than their specific functionality. We shall characterize them as
18
D. Nardi and R. J. Brachman
Pre-DL systems, DL systems and Current Generation DL systems. Detailed references to implemented systems are given in Chapter 8. 1.4.2.1 Pre-Description Logic systems The ancestor of DL systems is Kl-One [Brachman and Schmolze, 1985], which signaled the transition from semantic networks to more well-founded terminological (description) logics. The influence of Kl-One was profound and it is considered the root of the entire family of languages [Woods and Schmolze, 1990]. Semantic networks were introduced around 1966 as a representation for the concepts underlying English words, and became a popular type of framework for representing a wide variety of concepts in AI applications. Important and commonsensical ideas evolved in this work, from named nodes and links for representing concepts and relationships, to hierarchical networks with inheritance of properties, to the notion of “instantiation” of a concept by an individual object. But semantic network systems were fraught with problems, including vagueness and inconsistency in the meaning of various constructs, and the lack of a level of structure on which to base application-independent inference procedures. In his PhD thesis [Brachman, 1977a] and subsequent work (e.g., see [Brachman, 1979]), Brachman addressed representation at what he called an “epistemological”, or knowledgestructuring level. This led to a set of primitives for structuring knowledge that was less application- and world-knowledge-dependent than “semantic” representations (like those for processing natural language case structures), yet richer than the impoverished set of primitives available in strictly logical languages. The main result of this work was a new knowledge representation framework whose primitive elements allowed cleaner, more application-independent representations than prior network formalisms. In the late 1970s, Brachman and his colleagues explored the utility and implications of this kind of framework in the Kl-One system. Kl-One introduced most of the key notions explored in the extensive work on Description Logics that followed. These included, for example, the notions of concepts and roles and how they were to be interrelated; the important ideas of “value restriction” and “number restriction”, which modified the use of roles in the definitions of concepts; and the crucial inferences of subsumption and classification. It also sowed the seeds for the later distinction between the TBox and ABox and a host of other significant notions that greatly influenced subsequent work. Kl-One also was the initial example of the substantial interplay between theory and practice that characterizes the history of Description Logics. It was influenced by work in logic and philosophy (and in turn itself influenced work in philosophy and psychology), and significant care was taken in its design to allow it to be consistent and semantically sound. But it was also used in multiple applications, covering intelligent information presentation and natural language understanding, among other things.
1
An Introduction to Description Logics
19
Most of the focus of the original work on Kl-One was on the representation of and reasoning with concepts, with only a small amount of attention paid to reasoning with individual objects. The first descendants of Kl-One were focused on architectures providing a clear distinction between a powerful logic-based (or rule-based) component and a specialized terminological component. These systems came to be referred to as hybrid systems. A major research issue was the integration of the two components to provide unified reasoning services over the whole knowledge base. 1.4.2.2 Description Logic systems The earliest “pre-DL” systems derived directly from Kl-One, which, while itself a direct result of formal analysis of the shortcomings of semantic networks, was mainly about the implementation of a viable classification algorithm and the data structures to adequately represent concepts. DL systems, per se, which followed as the next generation, were more derived from a wave of theoretical research on terminological logics that resulted from examination of Kl-One and some other early systems. This work was initiated in roughly 1984, inspired by a paper by Brachman and Levesque [Brachman and Levesque, 1984] on the formal complexity of reasoning in Description Logics. Subsequent results on the tradeoff between the expressiveness of a DL language and the complexity of reasoning with it, and more generally, the identification of the sources of complexity in DL systems, showed that a careful selection of language constructs was needed and that the reasoning services provided by the system are deeply influenced by the set of constructs provided to the user. We can thus characterize three different approaches to the implementation of reasoning services. The first can be referred to as limited+complete, and includes systems that are designed by restricting the set of constructs in such a way that subsumption would be computed efficiently, possibly in polynomial time. The Classic system [Brachman et al., 1991] is the most significant example of this kind. The second approach can be denoted as expressive+incomplete, since the idea is to provide both an expressive language and efficient reasoning. The drawback is, however, that reasoning algorithms turn out to be incomplete in these systems. Notable examples of this kind of system are Loom [MacGregor and Bates, 1987], and Back [Nebel and von Luck, 1988]. After some of the sources of incompleteness were discovered, often by identifying the constructs – or, more precisely, combinations of constructs – that would require an exponential algorithm to preserve the completeness of reasoning, systems with complete reasoning algorithms were designed. Systems of this sort (see for example Kris [Baader and Hollunder, 1991a]) are therefore characterized as expressive+complete; they were not as efficient as those following the other approaches, but they provided a testbed for the implementation of reasoning techniques developed in the theoretical investigations, and they played an important role
20
D. Nardi and R. J. Brachman
in stimulating comparison and benchmarking with other systems [Heinsohn et al., 1992; Baader et al., 1992b]. 1.4.2.3 Current generation Description Logic systems In the current generation of DL-KRSs, the need for complete algorithms for expressive languages has been the focus of attention. The expressiveness of the DL language required for reasoning on data models and semistructured data has contributed to the identification of the most important extensions for practical applications. The design of complete algorithms for expressive Description Logic has led to significant extensions of tableau-based techniques and to the introduction of several optimization techniques, partly borrowed from theorem proving and partly specifically developed for Description Logics. The first example of a system developed along these lines is Fact [Horrocks, 1998b]. This research has also been influenced by newly discovered relationships between Description Logics and other logics, leading to exchanging benchmarks and experimental comparisons with other deduction systems. The techniques that have been used in the implementation of very expressive Description Logics are addressed in detail in Chapter 9. 1.5 Applications developed with Description Logic systems The third component in the picture of the development of Description Logics is the implementation of applications in different domains. Some of the applications created over the years may have only reached the level of prototype, but many of them have the completeness of industrial systems and have been deployed in production use. A critical element in the development of applications based on Description Logics is the usability of the knowledge representation system. We have already emphasized that building a tool to be used in the design and implementation of knowledgebased applications requires significant work to make it suitable for interactive development, explanation and debugging, interface implementation, and so on. In addition, here we focus on the effectiveness of Description Logics as a modeling language. A modeling language should have intuitive semantics and the syntax must help convey the intended meaning. To this end, a somewhat different syntax than we have seen so far, closer to that of natural language, has often been adopted, and graphical interfaces that provide an operational view of the process of knowledge base construction have been developed. The issues arising in modeling application domains using Description Logics are dealt with in Chapter 10, and will be briefly addressed in the next subsection.
1
An Introduction to Description Logics
21
It is natural to expect that some classes of applications share similarities both in methodological patterns and in the design of specific structures or reasoning capabilities. Consequently, we identify several application domains in Section 1.5.2; these include software engineering, configuration, medicine, and digital libraries and Web-based information systems. In Subsection 1.5.3 we consider several application areas where Description Logics play a major role; these include natural language processing and database management, where Description Logics can be used in several ways. When addressing the design of applications it is also worth pointing out that there has been significant evolution in the way Description Logics have been used within complex applications. In particular, the DL-centered view that underlies the earliest generation of systems, wherein an application was developed in a single environment (the one provided by the DL system), was characterized by very loose interaction, if any, between the DL system and other applications. Later, an approach that viewed the Description Logic more as a component became evident; in this view the DL system acts as a component of a larger environment, typically leaving out functions, such those for data management, that are more effectively implemented by other technologies. The architecture where the component view is taken requires the definition of a clear interface between the components, possibly adopting different modeling languages, but focusing on Description Logics for the implementation of the reasoning services that can add powerful capabilities to the application. Obviously, the choice between the above architectural views depends upon the needs of the application at hand. Finally, we have already stressed that research in Description Logics has benefited from tight interaction between language designers and developers of DL-KRSs. Thus, another major impact on the development of DL research was provided by the implementation of applications using DL-KRSs. Indeed, work on DL applications not only demonstrated the effectiveness of Description Logics and of DL-KRSs, but also provided mutual feedback within the DL community concerning the weaknesses of both the representation language and the features of an implemented DL-KRS. 1.5.1 Modeling with Description Logics In order for designers to be able to use Description Logics to model their application domains, it is important for the DL constructs to be easily understandable; this helps facilitate the construction of convenient to use yet effective tools. To this end, the abstract notation that we have previously introduced and that is nowadays commonly used in the DL community is not fully satisfactory.
22
D. Nardi and R. J. Brachman
As already mentioned, there are at least two major alternatives for increasing the usability of Description Logics as a modeling language: (i) providing a syntax that resembles more closely natural language; (ii) implementing interfaces where the user can specify the representation structures through graphical operations.
Before addressing the above two possibilities, one brief remark is in order. While alternative ways of specifying knowledge, such as natural-language-style syntax, can be more appealing to the user, one should remember that Description Logics in part arose from a need to respond to the inadequacy – the lack of a formal semantic basis – of early semantic networks and frame systems. Those early systems often relied on an assumption of intuitive readings of natural-language-like constructs or graphical structures, which in the end made them unsatisfactory. Therefore, we need to keep in mind always the correspondence of the language used by the user and the abstract DL syntax, and consequently correspondences with the formal semantics should always be clear and available. The option of a more readable syntax has been pursued in the majority of DLKRSs. In particular, we refer to the concrete syntax proposed in [Patel-Schneider and Swartout, 1993], which is based on a Lisp-like notation, where, for example, the concept of a female person is denoted by (and Person Female). Similarly, the concept ∀hasChild.Female would be written (all hasChild Female). In addition, there are shorthand expressions, such as (the hasChild Female), which indicates the existence of a unique female child, and can be phrased using qualified existential restriction and number restriction. In Chapter 10 this kind of syntax is discussed in detail and the possible sources for ambiguities in the natural language reading of the constructs are discussed. The second option for providing the user with a concrete syntax is to rely on a graphical interface. Starting with the Kl-One system, this possibility has been pursued by introducing a graphical notation for the representation of concepts and roles, as well as their relationships. More recently, Web-based interfaces for Description Logics have been proposed [Welty, 1996a]; in addition, an XML standard has been proposed [Bechhofer et al., 1999; Euzenat, 2001], which is suitable not only for data interchange, but also for providing full-fledged Web interfaces to DL-KRSs or applications embodying them as components. The modeling language is the vehicle for the expression of the modeling notions that are provided to the designers. Modeling in Description Logics requires the designer to specify the concepts of the domain of discourse and characterize their relationships to other concepts and to specific individuals. Concepts can be regarded as classes of individuals and Description Logics as an object-centered modeling language, since they allow one to introduce individuals (objects) and
1
An Introduction to Description Logics
23
explicitly define their properties, as well as to express relationships among them. Concept definition, which provides for both necessary and sufficient conditions, is a characteristic feature of Description Logics. The basic relationship between concepts is subsumption, which allows one to capture various kinds of subclassing mechanisms; however, other kinds of relationships can be modeled, such as grouping, materialization, and part–whole aggregation. The model of a domain in Description Logics is embedded in a knowledge base. We have already addressed the TBox–ABox characterization of the knowledge base. We recall that the roles of TBox and ABox were motivated by the need to distinguish general knowledge about the domain of interest from specific knowledge about individuals characterizing a specific world or situation under consideration. Besides the TBox–ABox, other mechanisms for organizing a knowledge base such as contexts and views have been introduced in Description Logics. The use of the modeling notions provided by Description Logics and the organization of knowledge bases are addressed in greater detail in Chapter 10. Finally, we recall that Description Logics as modeling languages overlap to a large extent with other modeling languages developed in fields such as programming languages and database management. While we shall focus on this relationship later, we recall here that, when compared to modeling languages developed in other fields, the characteristic feature of Description Logics is in the reasoning capabilities that are associated with them. In other words, we believe that, while modeling has general significance, the capability of exploiting the description of the model to draw conclusions about the problem at hand is a particular advantage of modeling using Description Logics. 1.5.2 Application domains Description Logics have been used (and are being used) in the implementation of many systems that demonstrate their practical effectiveness. Some of these systems have found their way into production use, despite the fact that there was no real commercial platform that could be used for developing them. 1.5.2.1 Software engineering Software engineering was one of the first application domains for Desciption Logics undertaken at AT&T, where the Classic system was developed. The basic idea was to use a Description Logic to implement a software information system, i.e., a system that would support the software developer by helping him or her in finding out information about a large software system. More specifically, it was found that the information of interest for software development was a combination of knowledge about the domain of the application and
24
D. Nardi and R. J. Brachman
code-specific information. However, while the structure of the code can be determined automatically, the connection between code elements and domain concepts needs to be specified by the user. One of the most novel applications of Description Logics is the Lassie system [Devambu et al., 1991], which allowed users to incrementally build a taxonomy of concepts relating domain notions to the code implementing them. The system could thereafter provide useful information in response to user queries concerning the code, such as, for example “the function to generate a dial tone”. By exploiting the description of the domain, the information retrieval capabilities of the system went significantly beyond those of the standard tools used for software development. The Lassie system had considerable success but ultimately stumbled because of the difficulty of maintenance of the knowledge base, given the constantly changing nature of industrial software. Both the ideas of a software information system and the usage of Description Logics survived that particular application and have been subsequently used in other systems. The usage of Description Logics in applications for software engineering is described in Chapter 11. 1.5.2.2 Configuration One very successful domain for knowledge-based applications built using Description Logics is configuration, which includes applications that support the design of complex systems created by combining multiple components. The configuration task amounts to finding a proper set of components that can be suitably connected in order to implement a system that meets a given specification. For example, choosing computer components in order to build a home PC is a relatively simple configuration task. When the number, the type, and the connectivity of the components grow, the configuration task can become rather complex. In particular, computer configuration has been among the application fields of the first expert systems and can thus be viewed as a standard application domain for knowledge-based systems. Configuration tasks arise in many industrial domains, such as telecommunications, the automotive industry, building construction, etc. DL-based knowledge representation systems meet the requirements for the development of configuration applications. In particular, they enable the object-oriented modeling of system components, which combines powerfully with the ability to reason from incomplete specifications and to automatically detect inconsistencies. Using Description Logics one can exploit the ability to classify the components and organize them within a taxonomy. In addition a DL-based approach supports incremental specification and modularity. Applications for configuration tasks require at least two features that were not in the original core of DL-KRSs: the representation of rules (together with a rule propagation mechanism), and the ability to provide explanations. However, extensions with so-called “active rules” are now very common
1
An Introduction to Description Logics
25
in DL-KRSs, and a precise semantic account is given in Chapter 2; significant work on explanation capabilities of DL-KRSs has been developed in connection with the design of configuration applications [McGuinness and Borgida, 1995]. Chapter 12 is devoted to the applications developed in Description Logics for configuration tasks. 1.5.2.3 Medicine Medicine is also a domain where expert systems have been developed since the 1980s; however, the complexity of the medical domain calls for a variety of uses for a DL-KRS. In practice, decision support for medical diagnosis is only one of the tasks in need of automation. One focus has been on the construction and maintenance of very large ontologies of medical knowledge, the subject of some large government initiatives. The need to deal with large-scale knowledge bases (hundreds of thousands of concepts) led to the development of specialized systems, such as Galen [Rector et al., 1993], while the requirement for standardization arising from the need to deal with several sources of information led to the adoption of the DL standard language Krss [Patel-Schneider and Swartout, 1993] in projects like Snomed [Spackman et al., 1997]. In order to cope with the scalability of the knowledge base, the DL language adopted in these applications is often limited to a few basic constructs and the knowledge base turns out to be rather shallow, that is to say the taxonomy does not have very many levels of subconcepts below the top concepts. Nonetheless, there are several advanced language features that would be very useful in the representation of medical knowledge, such as, for example, specific support for PART-OF hierarchies (see Chapter 10), as well as defaults and modalities to capture lack of knowledge (see Chapter 6). Obviously, since medical applications most often must be used by doctors, a formal logical language is not well-suited; therefore special attention is given to the design of the user interface; in particular, natural language processing (see Chapter 15) is important both in the construction of the ontology and in the operational interfaces. Further, the DL component of a medical application usually operates within a larger information system, comprising several sources of information, which need to be integrated in order to provide a coherent view of the available data (on this topic see Chapter 16). Finally, an important issue that arises in the medical domain is the management of ontologies, which not only requires common tools for project management, such as versioning systems, but also tools to support knowledge acquisition and re-use (on this topic see Chapter 8). The use of Description Logics specifically in the design of medical applications is addressed in Chapter 13.
26
D. Nardi and R. J. Brachman
1.5.2.4 Digital libraries and Web-based information systems The relationship between semantic networks and the linked structures implied by hypertext has motivated the development of DL applications for representing bibliographic information and for supporting classification and retrieval in digital libraries [Welty and Jenkins, 2000]. These applications have proven the effectiveness of Description Logics for representing the taxonomies that are commonly used in library classification schemes, and they have shown the advantage of subsumption reasoning for classifying and retrieving information. In these instances, a number of technical questions, mostly related to the use of individuals in the taxonomy, have motivated the use of more expressive Description Logics. The possibility of viewing the World Wide Web as a semantic network has been considered since the advent of the Web itself. Even in the early days of the Web, thought was given to the potential benefits of enabling programs to handle not only simple unlabeled navigation structures, but also the information content of Web pages. The goal was to build systems for querying the Web “semantically”, allowing the user to pose queries of the Web as if it were a database, roughly speaking. Based on the relationship between Description Logics and semantic networks, a number of proposals were developed that used Description Logics to model Web structures, allowing the exploitation of DL reasoning capabilities in the acquisition and management of information [Kirk et al., 1995; De Rosa et al., 1998]. More recently, there have been significant efforts based on the use of markup languages to capture the information content of Web structures. The relationship between Description Logics and markup languages, such as XML, has been precisely characterized [Calvanese et al., 1999d], thus identifying DL language features for representing XML documents. Moreover, interest in the standardization of knowledge representation mechanisms for enabling knowledge exchange has led to the development of DAML-ONT [McGuinness et al., 2002], an ontology language for the Web inspired by object-oriented and frame-based languages, and OIL [Fensel et al., 2001], with a similar goal of expressing ontologies, but with a closer connection to Description Logics. Since the two initiatives have similar goals and use languages that are somewhat similar (see Chapter 4 for the relationships between frames and Description Logics), their merger is in progress. The use of Description Logics in the design of digital libraries and Web applications is addressed in Chapter 14, with specific discussion on DAML-ONT, OIL, and DAML+OIL. 1.5.2.5 Other application domains The above list of application domains, while presenting some of the most relevant applications designed with DL-KRSs, is far from complete. There are many other domains that have been addressed by the DL community. Among the application
1
An Introduction to Description Logics
27
areas that have resorted to Description Logics for useful functions are planning and data mining. With respect to planning, many knowledge-based applications rely on the services of a planning component. While Description Logics do not provide such a component themselves, they have been used to implement several general-purpose planning systems. The basic idea is to represent plans and actions, as well as their constituent elements, as concepts. The system can thus maintain a taxonomy of plan types and provide several reasoning services, such as plan recognition, plan subsumption, plan retrieval, and plan refinement. Two examples of planning components developed in a DL-KRS are Clasp [Yen et al., 1991b], developed on top of Classic, and Expect [Swartout and Gil, 1996], developed on top of Loom. In addition, the integration of Description Logics and other formalisms, such as constraint networks, has been proposed [Weida and Litman, 1992]. Planning systems based on Description Logics have been used in many application domains to support planning services in conjunction with a taxonomic representation of the domain knowledge. Such application domains include, among others, software engineering, medicine, campaign planning, and information integration. It is worth mentioning that Description Logics have also been used to represent dynamic systems and to automatically generate plans based on such representations. However, in such cases the use of Description Logics is limited to the formalization of properties that characterize the states of the system, while plan generation is achieved through the use of a rule propagation mechanism [De Giacomo et al., 1999]. Such use of Description Logics is inspired by the correspondence between Description Logics and Dynamic Logics described in Chapter 5. Description Logics have also been used in data mining applications, where their inferences can help the process of analyzing large amounts of data. In this kind of application, DL structures can represent views, and DL systems can be used to store and classify such views. The classification mechanism can help in discovering interesting classes of items in the data. We address this type of application briefly in the next subsection on database management. 1.5.3 Application areas From the beginning Description Logics have been considered general-purpose languages for knowledge representation and reasoning, and therefore suited for many applications. In particular, they were considered especially effective for those domains where the knowledge could be easily organized along a hierarchical structure, based on the “IS-A” relationship. The ability to represent and reason about taxonomies in Description Logics has motivated their use as a modeling language
28
D. Nardi and R. J. Brachman
in the design and maintenance of large, hierarchically structured bodies of knowledge as well as their adoption as the representation language for formal ontologies [Welty and Guarino, 2001]. We now briefly look at some other research areas that have a more general relationship with Description Logics. Such a relationship exists either because Description Logics are viewed as a basic representation language, as in the case of natural language processing, or because they can be used in a variety of ways in concert with the main technology of the area, as in the field of database management. 1.5.3.1 Natural language Description Logics, as well as semantic networks and frames, originally had natural language processing as a major field for application (see for example [Brachman, 1979]). In particular, when work on Description Logics began, not only was a large part of the DL community working on natural language applications, but Description Logics also bore a strong similarity to other formalisms used in natural language work, such as Feature Logics [Nebel and Smolka, 1991]. The use of Description Logics in natural language processing is mainly concerned with the representation of semantic knowledge that can be used to convey meanings of sentences. Such knowledge is typically concerned with the meaning of words (the lexicon), and with context, that is, a representation of the situation and domain of discourse. A significant body of work has been devoted to the problem of disambiguating different syntactic readings of sentences, based on semantic knowledge, a process called semantic interpretation. Moreover, semantic knowledge expressed in Description Logics has also been used to support natural language generation. Since the domain of discourse for a natural language application can be arbitrarily broad, work on natural language has also involved the construction of ontologies [Welty and Guarino, 2001]. In addition, the expressiveness of natural language has led also to investigations concerning extensions of Description Logics, such as default reasoning (see Chapter 6). Several large projects for natural language processing based on the use of Description Logics have been undertaken, some reaching the level of industrially-deployed applications. They are referenced in Chapter 15, where the role of Description Logics in natural language processing is addressed in more detail. 1.5.3.2 Database management The relationship between Description Logics and databases is rather strong. In fact, there is often the need to build systems where both a DL-KRS and a DataBase Management System (DBMS) are present. DBMSs deal with persistence of data and with the management of large amounts of it, while a DL-KRS manages intensional
1
An Introduction to Description Logics
29
knowledge, typically keeping the knowledge base in memory (possibly including assertions about individuals that correspond to data). While some of the applications created with DL-KRSs have developed ad hoc solutions to the problem of dealing with large amounts of persistent data, in a complex application domain it is very likely that a DL-KRSs and a DBMS would both be components of a larger system, and they would work together. In addition, Description Logics provide a formal framework that has been shown to be rather close to the languages used in semantic data modeling, such as the Entity–Relationship model [Calvanese et al., 1998g]. Description Logics are equipped with reasoning tools that can bring to the conceptual modeling phase significant advantages, as compared with traditional languages, whose role is limited to modeling. For instance, by using concept consistency one can verify at design time whether an entity can have at least one instance, thus clearly saving all the difficulties arising from discovering such a situation when the database is being populated [Borgida, 1995]. A second dimension of the enhancement of DBMSs with Description Logics involves the query language. By expressing the queries to a database in a Description Logic one gains the ability to classify them and therefore to deal with issues such as query processing and optimization. However, the basic DL machinery needs to be extended in order to deal with conjunctive queries; otherwise DL expressiveness with respect to queries is rather limited. In addition, Description Logics can be used to express constraints and intensional answers to queries. A corollary of the relationship between Description Logics and DBMS query languages is the utility of Description Logics in reasoning with and about views. In the Imacs system [Brachman et al., 1993], the Classic language was used as a “lens” [Brachman, 1994] with which data in a conventional relational database could be viewed. The interface to the data was made significantly more appropriate for a data analyst, and views that were found to be productive could be saved; in fact, they were saved in a taxonomy and could be classified with respect to one another. In a sense, this allows the schema to be viewed and queried explicitly, something normally not available when using a raw DBMS directly. A more recent use of Description Logics is concerned with so-called “semistructured” data models [Calvanese et al., 1998c], which are being proposed in order to overcome the difficulties in treating data that are not structured in a relational form, such as data on the Web, data in spreadsheets, etc. In this area Description Logics are sufficiently expressive to represent models and languages that are being used in practice, and they can offer significant advantages over other approaches because of the reasoning services they provide. Another problem that has recently increased the applicability of Description Logics is information integration. As already remarked, data are nowadays available
30
D. Nardi and R. J. Brachman
in large quantities and from a variety of sources. Information integration is the task of providing a unique coherent view of the data stored in the sources available. In order to create such a view, a proper relationship needs to be established between the data in the sources and the unified view of the data. Description Logics not only have the expressiveness needed in order to model the data in the sources, but their reasoning services can help in the selection of the sources that are relevant for a query of interest, as well as to specify the extraction process [Calvanese et al., 2001c]. The uses of Description Logics with databases are addressed in more detail in Chapter 16. 1.6 Extensions of Description Logics In this section we look at several types of extensions that have been proposed for Description Logics; these are addressed in more detail in Chapter 6. Such extensions are generally motivated by needs arising in applications. Unfortunately, some extended features in implemented DL-KRSs were created without precise, formal accounts; in some other cases, such accounts have been provided using a formal framework that is not restricted to first-order logic. A first group of extensions has the purpose of adding to DL languages some representational features that were common in frame systems or that are relevant for certain classes of applications. Such extensions provide a representation of some novel epistemological notions and address the reasoning problems that arise in the extended framework. Extensions of a second sort are concerned with reasoning services that are useful in the development of knowledge bases but are typically not provided by DL-KRSs. The implementation of such services relies on additional inference techniques that are considered non-standard, because they go beyond the basic reasoning services provided by DL-KRSs. Below we first address the extensions of the knowledge representation framework and then non-standard inferences. 1.6.1 Language extensions Some of the research associated with language extensions has investigated the semantics of the proposed extensions, but often the emphasis is only on finding reasoning procedures for the extended languages. Within these language extensions we find constructs for non-monotonic, epistemic, and temporal reasoning, and constructs for representing belief and uncertain and vague knowledge. In addition some constructs address reasoning in concrete domains.
1
An Introduction to Description Logics
31
1.6.1.1 Non-monotonic reasoning When frame-based systems began to be formally characterized as fragments of first-order logic, it became clear that those frame-based systems as well as some DL-KRSs that were used in practice occasionally provided the user with constructs that could not be given a precise semantic characterization within the framework of first-order logic. Notable among the problematic constructs were those associated with the notion of defaults, which over time have been extensively studied in the field of non-monotonic reasoning [Brachman, 1985]. While one of the problems arising in semantic networks was the oft-cited socalled “Nixon diamond” [Reiter and Criscuolo, 1981], a whole line of research in non-monotonic reasoning was developed in trying to characterize the system behavior by studying structural properties of networks. For example, the general property that “birds fly” might not be inherited by a penguin, because a rule that penguins do not fly would give rise to an arc in the network that would block the default inference. But as soon as the network becomes relatively complex (see for example [Touretzky et al., 1991]), we can see that attempts to provide semantic characterization in terms of network structure are inadequate. Another approach that has been pursued in the formalization of non-monotonic reasoning in semantic networks is based on the use of default logic [Reiter, 1980; Etherington, 1987; Nado and Fikes, 1987]. Following a similar approach is the treatment of defaults in DL-based systems [Baader and Hollunder, 1995a], where formal tools borrowed from work on non-monotonic reasoning have been adapted to the framework of Description Logics. Such adaptation is non-trivial, however, because Description Logics are not, in general, propositional languages. 1.6.1.2 Modal representation of knowledge and belief Modal logics have been widely studied to model a variety of features that in firstorder logic would require the application of special constraints on certain elements of the formalization. For example, the notions of knowing something or believing that some sentence is true can be captured by introducing modal operators, which characterize properties that sentences have. For instance the assertion B(Married(ANNA)) states a fact explicitly concerning the system’s beliefs (the system believes that Anna is married), rather than asserting the truth of something about the world being modeled (the system could believe something to be true without firm knowledge about its truth in the world). In general, by introducing a modal operator one gains the ability to model properties like knowledge, belief, time-dependence, obligation, and so on. On the one
32
D. Nardi and R. J. Brachman
hand, extensions of Description Logics with modal operators can be viewed very much like the corresponding modal extensions of first-order logic. In particular, the semantic issues arising in the interpretation of quantified modal sentences (i.e., sentences with modal operators appearing inside the scope of quantifiers) are the same. On the other hand, the syntactic restrictions that are suited to a DL language lead to formalisms whose expressiveness and reasoning problems inherit some of the features of a specialized DL language. Extensions of Description Logics with modal operators including those for representing knowledge and belief are discussed in [Baader and Ohlbach, 1995]. 1.6.1.3 Epistemic reasoning It is not sufficient to provide a semantics for defaults to obtain a full semantic account of frame-based systems. Frame-based systems have included procedural rules as well as other forms of closure and epistemic reasoning that need to be covered by the semantics as well as by the reasoning algorithms. In particular, if one looks at the most widely-used systems based on Description Logics, such features are still present, possibly in new flavors, while their semantics is given informally and the consequences of reasoning sometimes not adequately explained. Among the non-first-order features that are used in the practice of knowledgebased applications in both DL-based and frame-based systems we point out these: r procedural rules (also called trigger rules), which are normally described as if–then statements and are used to infer new facts about known individuals; r default rules, which enable default reasoning in inheritance hierarchies; r role closure, which limits the reasoning involving role restrictions to the individuals explicitly in the knowledge base; r integrity constraints, which provide consistency restrictions on admissible knowledge bases.
In Chapter 6, among other approaches an epistemic extension of Description Logics with a modal operator is addressed. In the resulting formalism [Donini et al., 1998a] one can express epistemic queries and, by admitting a simple form of epistemic sentences in the knowledge base, one can formalize the aforementioned procedural rules. This characterization of procedural rules in terms of an epistemic operator has been widely accepted in the DL community and is thus also included in Chapter 2. The approach has been further extended to what have been called Autoepistemic Description Logics (ADLs) [Donini et al., 1997b, 2002], where it is combined with default reasoning. This combination is achieved by relying on the non-monotonic modal logic MKNF [Lifschitz, 1991], thus introducing a second modal operator interpreted as autoepistemic assumption. The features mentioned above can be uniformly treated as epistemic sentences in the knowledge base,
1
An Introduction to Description Logics
33
without the need to give them special status as in the case of procedural rules, defaults, and epistemic constraints on the knowledge base. This expressiveness does not come without making reasoning more difficult. An extension of the reasoning methods available for deduction in the propositional formalizations of non-monotonic reasoning to the fragment of first-order logic corresponding to Description Logics has nonetheless been shown to be decidable. 1.6.1.4 Temporal reasoning One notion that is often required in the formalization of application domains is time. Temporal extensions of Description Logics have been treated as a special kind of modal extension. The first proposal for handling time in a DL framework [Schmiedel, 1990] was originated in the context of the DL system Back. Later, following the standard approaches in the representation of time, both intervalbased and point-based approaches have been studied, specifically focusing on the decidability and complexity of the reasoning problems (see [Artale and Franconi, 2001] for a survey the temporal extensions of Description Logics). Time intervals can also be treated as a form of concrete domain (see below). 1.6.1.5 Representation of uncertain and vague knowledge Another aspect of knowledge that is sometimes useful in representing and reasoning about application domains is uncertainty. As in other knowledge representation frameworks there are several approaches to the representation of uncertain knowledge in Description Logics. Two of them, namely probabilistic logic and fuzzy logic, have been proposed in the context of Description Logics. In the case of probabilistic Description Logics [Heinsohn, 1994; Jaeger, 1994] the knowledge about the domain is expressed in terms of probabilistic terminological axioms, which allow one to represent statistical information about the domain, and in terms of probabilistic assertions, which specify the degree of belief of asserted properties. The reasoning tasks aim at finding the probability bounds for subsumption relations and assertions. A more recent line of work tries to combine Description Logics with Bayesian networks. In the case of fuzzy Description Logics [Yen, 1991] the goal is to characterize notions that cannot be properly defined with a “crisp” numerical bound. For example, the concept of living near Rome cannot be always defined with a crisp boundary on the map, but must be represented with a membership or degree function, which expresses closeness to the city in a continuous way. Proposed approaches to fuzzy Description Logics not only define the semantics of assertions in terms of fuzzy sets, but also introduce new operators to express notions like “mostly”, “very”, etc. Reasoning algorithms are also provided for computing fuzzy subsumption within the framework of tableau-based methods.
34
D. Nardi and R. J. Brachman
1.6.1.6 Concrete domains One of the limitations of basic Description Logics is related to the difficulty of integrating knowledge (and, consequently, performing reasoning) of specific domains, such as numbers or strings, which are needed in many applications. For example, in order to model the concept of a young person it seems rather natural to introduce the (functional) role age and to use a concrete value (or range of values) in the definition of the concept. In addition, one would like to be able to conclude that a person of school age is also a young person. Such a conclusion might require the use of properties of numbers to establish that the expected subsumption relation holds. While for some time such extensions were designed in ad hoc ways, in [Baader and Hanschke, 1991a] a general method was established for integrating knowledge about concrete domains within a DL language. If a domain can be properly formalized, it is shown that the tableau-based reasoning technique can be suitably extended to handle the reasoning services in the extended language. Concrete domains include not only data types such as numerical types, but also more elaborate domains, such as tuples of the relational calculus, spatial regions, or time intervals.
1.6.2 Additional reasoning services Non-standard inference tasks can serve a variety of purposes, among them support in building and maintaining the knowledge base, as well as in obtaining information about the knowledge represented in it. Among the more useful non-standard inference tasks in Description Logics we find the computation of the least common subsumer and the most specific concept, matching/unification, and concept rewriting. 1.6.2.1 Least common subsumer and most specific concept The least common subsumer (lcs) of a set of concepts is the minimal concept that subsumes all of them. The minimality condition implies there is no other concept that subsumes all the concepts in the set and is less general (subsumed by) the lcs. This notion was first studied in [Cohen et al., 1992] and it has subsequently been used for several tasks: inductive learning of concept description from examples; knowledge base vivification (as a way to represent disjunction in languages that do not admit it); and in the bottom-up construction of DL knowledge bases (starting from instances of the concepts). The notion of lcs is closely related to that of most specific concept (msc) of an individual, i.e., the least concept description that the individual is an instance of,
1
An Introduction to Description Logics
35
given the assertions in the knowledge base; the minimality condition is specified as before. More generally, one can define the msc of a set of assertions about individuals as the lcs of the msc associated with each individual. Based on the computation of the msc of a set of assertions about individuals one can incrementally construct a knowledge base [Baader and K¨usters, 1999]. It interesting to observe that the techniques that have been proposed to compute the lcs and mcs rely on compact representations of concept expressions, which are built either following the structural subsumption approach, or through the definition of a well-suited normal form. 1.6.2.2 Unification and matching Another tool to support the construction and maintenance of DL knowledge bases that goes beyond the standard inference services provided by DL-KRSs is the unification of concepts. Concept unification [Baader and Narendran, 1998] is an operation that can be regarded as weakening the equivalence between two concept expressions. More precisely, two concept expressions unify if one can find a substitution of concept variables into concept expressions such that the result of applying the substitution gives equivalent concepts. The intuition is that, in order to find possible overlaps between concept definitions, one can treat certain concept names as variables and discover, via unification, that two concepts (possibly independently defined by distinct knowledge designers) are in fact equivalent. The knowledge base can consequently be simplified by introducing a single definition of the unifiable concepts. As usual, matching is defined as a special case of unification, where variables occur only in one of the two concept expressions. In addition, in the framework of Description Logics, one can define matching and unification based on the subsumption relation instead of equivalence [Baader et al., 1999a]. As with other non-standard inferences, the computation of matching and unification relies on the use of specialized representations for concept expressions, and it has been shown to be decidable for rather simple Description Logics. 1.6.2.3 Concept rewriting Finally, there has been a significant body of work on the problem of concept rewriting. Given a concept expressed in a source language, concept rewriting amounts to finding a concept, possibly expressed in a target language, which is related to the given concept according to equivalence, subsumption, or some other relation. In order to specify the rewriting, one can provide a suitable set of constraints between concepts in the source language and concepts in the target language. Concept rewriting can be applied to the translation of concepts from one knowledge base to
36
D. Nardi and R. J. Brachman
another, or in the reformulation of concepts during the process of knowledge base construction and maintenance. In addition, concept rewriting has been addressed in the context of the rewriting of queries using views, in database management (see also Chapter 16), and has recently been investigated in the framework of information integration. In this setting, one can apply concept rewriting techniques to automatically generate the queries that enable a system to gather information from a set of sources [Beeri et al., 1997]. Given an initial specification of the query according to a common, global language, and a set of constraints expressing the relationship between the global schema and the individual sources where information is stored, the problem is to compute the queries to be posed to the local sources that provide answers, possibly approximate, to the original query [Calvanese et al., 2000a]. 1.7 Relationship to other fields of Computer Science Description Logics were developed with the goals of providing formal, declarative meanings to semantic networks and frames, and of showing that such representation structures can be equipped with efficient reasoning tools. However, the underlying ideas of concept/class and hierarchical structure based upon the generality and specificity of a set of classes have appeared in many other fields of Computer Science, such as database management and programming languages. Consequently, there have been a number of attempts to find commonalities and differences among formalisms with similar underlying notions, but which were developed in different fields. Moreover, by looking at the syntactic form of Description Logics – logics that are restricted to unary and binary predicates and allow restricted forms of quantification – other logical formalisms that have strong relationships with Description Logics have been identified. In this section we briefly address such relationships; in particular, we focus our attention on the relationship of Description Logics to other class-based languages, and then we address the relationship between Description Logics and other logics. These topics are addressed in more detail in Chapter 4. 1.7.1 Description Logics and other class-based formalisms As we have mentioned, Description Logics can, in principle, be related to other class-based formalisms. Before looking at other fields, it is worth relating Description Logics to other formalisms developed within the field of knowledge representation that share the intuitions underlying network-based representation structure. In [Lehmann, 1992] several languages aiming at structured representations of knowledge are reviewed. We have already discussed the relationship between Description Logics and semantic networks and frames, since they provided the
1
An Introduction to Description Logics
37
basic motivations for developing Description Logics in the first place. Among others, conceptual graphs [Sowa, 1991] have been regarded as a way of representing conceptual structures very closely related to semantic networks (and consequently, to Description Logics). However, only recently has there been a detailed analysis of the relationship between conceptual graphs and Description Logics [Baader et al., 1999c]. The outcome of this work makes it apparent that, although one can establish a relationship between simple conceptual graphs and a DL language, there are substantial differences between the two formalisms. The most significant one is that Description Logics are characterized by the universally quantified role restriction, which is not present in conceptual graphs. Consequently, the interpretation of the representation structures becomes substantially different. In many other fields of Computer Science we find formalisms for the representation of objects and classes [Motschnig-Pitrik and Mylopoulous, 1992]. Such formalisms share the notion of a class that denotes a subset of the domain of discourse, and they allow one to express several kinds of relationships and constraints (e.g., subclass constraints) that hold among classes. Moreover, class-based formalisms aim at taking advantage of the class structure in order to provide various types of information, such as whether an element belongs to a class, whether a class is a subclass of another class, and more generally, whether a given constraint holds between two classes. In particular, formalisms that are built upon the notions of class and class-based hierarchies have been developed in the field of database management, in semantic data modeling (see for example [Hull and King, 1987]), in object-oriented languages (see for example [Kim and Lochovsky, 1989]), and more generally, in programming languages (see for example [Lenzerini et al., 1991]). There have been several attempts to establish relationships among the class-based formalisms developed in different fields. In particular, the common intuitions behind classes and concepts have stimulated several pieces of work aimed at establishing a precise relationship between class-based formalisms and Description Logics. However, it is difficult to find a common framework for carrying out a precise comparison. In Chapter 4 a specific Description Logic is taken as a basis for identifying the common features of frame systems and object-oriented and semantic data models (see also [Calvanese et al., 1999e]). Specifically, a precise correspondence between the chosen DL and the Entity–Relationship model [Chen, 1976], as well as with an object-oriented language in the style of [Abiteboul and Kanellakis, 1989], is presented there. This kind of comparison shows that one can indeed identify a large common basis, but also that there are features that are currently missing in each formalism. For example, to capture semantic data models one needs a cyclic form of inclusion assertion, as well as the inverses of roles for modeling relationships that work in
38
D. Nardi and R. J. Brachman
both directions, while DL roles have a directionality from one concept to another. Moreover, in order to make a comparison with frame-based systems, one has to leave out both the non-monotonic features of frames, such as defaults and closures (which are addressed among the extensions of Description Logics in the previous section) and their dynamic aspects such as daemons and and triggers (with the exception of trigger rules, which are also addressed in the previous section). Finally, with respect to object-oriented data models the main difference is that although Description Logics provide the expressiveness to model record and set structures, they are not explicitly available in Description Logics and thus their representation is a little cumbersome. On the other hand, semantic and object-oriented data models are typically not equipped with reasoning tools that are available with Description Logics. This issue is further developed in Chapter 16, where the applications of Description Logics in the field of database management are addressed. However, if the language is sufficiently expressive, as it needs to be in order to establish relationships among various class-based formalisms, one needs to distinguish between finite model reasoning, which is required for database languages that are designed to represent a closed domain of discourse, and unrestricted reasoning, which is typical of knowledge representation formalisms and, therefore, of Description Logics. 1.7.2 Relationships to other logics The initial observation for addressing the relationship of Description Logics to other logics is the fact that Description Logics are subsets of first-order logic. This has been known since the earliest days of Description Logics, and has been thoroughly investigated in [Borgida, 1996]. In fact, the Description Logic ALC corresponds to the fragment of first-order logic obtained by restricting the syntax to formulas containing two variables. The importance of this and subsequent studies on this issue is related to finding adequate characterizations of the expressiveness of Description Logics. Since Description Logics focus on a language formed by unary and binary predicates, it turned out that they are closely related to modal languages, if one regards roles as accessibility relations. In particular, Schild [1991] pointed out that some Description Logics are notational variants of certain propositional modal logics; specifically, the Description Logic ALC has a modal logic counterpart, namely the multi-modal version of the logic K (see [Halpern and Moses, 1992]). Actually, ALC-concepts and formulas in multi-modal K can immediately be translated into each other. Moreover, an ALC-concept is satisfiable if and only if the corresponding K-formula is satisfiable. Research in the complexity of the satisfiability problem for modal propositional logics was initiated quite some time before the complexity of Description Logics was investigated. Consequently, this relationship made it
1
An Introduction to Description Logics
39
possible to borrow from modal logic complexity results, reasoning techniques, and language constructs that had not been previously considered in Description Logics. On the other hand, there are features of Description Logics that did not have counterparts in modal logics and therefore needed ad hoc extensions of the reasoning techniques developed for modal logics. In particular, number restrictions as well as the treatment of individuals in the ABox required specific treatments based on the idea of reification, which amounts to expressing the extensions through a special kind of axiom within the logic. Finally, we mention that recent work has pointed out a relationship between Description Logics and guarded fragments, which can be regarded as generalizations of modal logics. Most of the research on very expressive Description Logics, addressed in Chapter 5, has its roots in the correspondence with modal logic. 1.8 Conclusion From their humble origins in the late 1970s as a remedy for logical and semantic problems in frame and semantic network representations, Description Logics have grown to be a unique and important keystone in the history of knowledge representation. DL formalisms certainly evoked interest in their earliest days, with the invention and application of the Kl-One system, but international attention and research was given a significant boost in 1984 when Brachman and Levesque used the simple and intuitive structure of Description Logics as the basis for their observation about the tradeoff between knowledge representation language expressiveness and computational complexity of reasoning. The way Description Logics were able to separate out the structure of concepts and roles into simple term-forming operators opened the door to extensive analysis of a broad family of languages. One could add and subtract these operators to and from the language and explore both the computational ramifications and the relationship of the resulting language to other formal languages in Computer Science, such as modal logics and data models for database systems. As a result, the family of Description Logic languages is probably the most thoroughly understood set of formalisms in all of knowledge representation. The computational space has been thoroughly mapped out, and a wide variety of systems have been built, testing out different styles of inference computation and being used in many applications. Description Logics are responsible for many of the cornerstone notions used in knowledge representation and reasoning. They helped crystallize many of the ideas treated informally in earlier notations, such as concepts and roles. But they added many new important building blocks for later work in the field: the terminology/assertion distinction (TBox/ABox), number and value restrictions on
40
D. Nardi and R. J. Brachman
roles, internal structure for concepts, Tell&Ask interfaces, and others. They have been the subject of a great deal of comparison and analysis with their cousins in other fields of Computer Science, and DL systems run the gamut from simple, restricted systems with provably advantageous computational properties to extremely expressive systems that can support very powerful applications. Perhaps the most important aspect of work on Description Logics has been the very tight coupling between theory and practice. The exemplary give-and-take between the formal, analytical side of the field and the pragmatic, implemented side – notable throughout the entire history of Description Logics – has been a role model for other areas of AI. Acknowledgements We are grateful to Franz Baader, Francesco M. Donini, Maurizio Lenzerini, and Riccardo Rosati for reading the manuscript and making suggestions for improving the final version of the chapter.
Part I Theory
2 Basic Description Logics FRANZ BAADER WERNER NUTT
Abstract This chapter provides an introduction to Description Logics as a formal language for representing knowledge and reasoning about it. It first gives a short overview of the ideas underlying Description Logics. Then it introduces syntax and semantics, covering the basic constructors that are used in systems or have been introduced in the literature, and the way these constructors can be used to build knowledge bases. Finally, it defines the typical inference problems, shows how they are interrelated, and describes different approaches for effectively solving these problems. Some of the topics that are only briefly mentioned in this chapter will be treated in more detail in subsequent chapters.
2.1 Introduction As sketched in the previous chapter, Description Logics is the most recent name1 for a family of knowledge representation (KR) formalisms that represent the knowledge of an application domain (the “world”) by first defining the relevant concepts of the domain (its terminology), and then using these concepts to specify properties of objects and individuals occurring in the domain (the world description). As the name Description Logics indicates, one of the characteristics of these languages is that, unlike some of their predecessors, they are equipped with a formal, logic-based semantics. Another distinguished feature is the emphasis on reasoning as a central service: reasoning allows one to infer implicitly represented knowledge from the knowledge that is explicitly contained in the knowledge base. Description Logics support inference patterns that occur in many applications of intelligent information processing systems, and which are also used by humans to structure and understand 1
Previously used names are terminological knowledge representation languages, concept languages, term subsumption languages, and Kl-One-based knowledge representation languages.
43
44
F. Baader and W. Nutt
the world: classification of concepts and individuals. Classification of concepts determines subconcept–superconcept relationships (called subsumption relationships in Description Logics) between the concepts of a given terminology, and thus allows one to structure the terminology in the form of a subsumption hierarchy. This hierarchy provides useful information on the connection between different concepts, and it can be used to speed up other inference services. Classification of individuals (or objects) determines whether a given individual is always an instance of a certain concept (i.e., whether this instance relationship is implied by the description of the individual and the definition of the concept). It thus provides useful information on the properties of an individual. Moreover, instance relationships may trigger the application of rules that insert additional facts into the knowledge base. Because Description Logics are a KR formalism, and since in KR one usually assumes that a KR system should always answer the queries of a user in reasonable time, the reasoning procedures DL researchers are interested in are decision procedures, i.e., unlike first-order theorem provers, for example, these procedures should always terminate, both for positive and for negative answers. Since the guarantee of an answer in finite time need not imply that the answer is given in reasonable time, investigating the computational complexity of a given Description Logic with decidable inference problems is an important issue. Decidability and complexity of the inference problems depend on the expressive power of the Description Logic at hand. On the one hand, very expressive Description Logics are likely to have inference problems of high complexity, or they may even be undecidable. On the other hand, very weak Description Logics (with efficient reasoning procedures) may not be sufficiently expressive to represent the important concepts of a given application. As mentioned in the previous chapter, investigating this tradeoff between the expressivity of Description Logics and the complexity of their reasoning problems has been one of the most important issues in DL research. Description Logics are descended from so-called “structured inheritance networks” [Brachman, 1977b; 1978], which were introduced to overcome the ambiguities of early semantic networks and frames, and which were first realized in the system Kl-One [Brachman and Schmolze, 1985]. The following three ideas, first put forward in Brachman’s work on structured inheritance networks, have largely shaped the subsequent development of Description Logics: r The basic syntactic building blocks are atomic concepts (unary predicates), atomic roles (binary predicates), and individuals (constants). r The expressive power of the language is restricted in that it uses a rather small set of (epistemologically adequate) constructors for building complex concepts and roles. r Implicit knowledge about concepts and individuals can be inferred automatically with the help of inference procedures. In particular, subsumption relationships between concepts and instance relationships between individuals and concepts play an important role: unlike
2
Basic Description Logics
45
IS-A links in semantic networks, which are explicitly introduced by the user, subsumption relationships and instance relationships are inferred from the definition of the concepts and the properties of the individuals.
After the first logic-based semantics for Kl-One-like KR languages were proposed, the inference problems like subsumption could also be provided with a precise meaning, which led to the first formal investigations of the computational properties of such languages. It has turned out that the languages used in early DL systems were too expressive, which led to undecidability of the subsumption problem [Schmidt-Schauß, 1989; Patel-Schneider, 1989b]. The first worst-case complexity results [Levesque and Brachman, 1987; Nebel, 1988] showed that the subsumption problem is intractable (i.e., not polynomially solvable) even for very inexpressive languages. As mentioned in the previous chapter, this work was the starting point of a thorough investigation of the worst-case complexity of reasoning in Kl-One-like KR languages (see Chapter 3 for details). Later on it has turned out, however, that intractability of reasoning (in the sense of being non-polynomial in the worst case) does not prevent a Description Logic from being useful in practice, provided that sophisticated optimization techniques are used when implementing a system based on such a Description Logic (see Chapter 9). When implementing a DL system, the efficient implementation of the basic reasoning algorithms is not the only issue, though. On the one hand, the derived system services (such as classification, i.e., constructing the subsumption hierarchy between all concepts defined in a terminology) must be optimized as well [Baader et al., 1994]. On the other hand, one needs a good user and application programming interface (see Chapter 7 for more details). Most implemented DL systems provide for a rule language, which can be seen as a very simple, but effective, application programming mechanism (see Subsection 2.2.5 for details). Section 2.2 introduces the basic formalism of Description Logics. By way of a prototypical example, it first introduces the formalism for describing concepts (i.e., the description language), and then defines the terminological (TBox) and the assertional (ABox) formalisms. Next, it introduces the basic reasoning problems and shows how they are related to each other. Finally, it defines the rule language that is available in many of the implemented DL systems. Section 2.3 describes algorithms for solving the basic reasoning problems in Description Logics. After shortly sketching structural subsumption algorithms, it concentrates on tableau-based algorithms. Finally, it comments on the problem of reasoning w.r.t. terminologies. Finally, Section 2.4 describes some additional language constructors that are not included in the prototypical family of description languages introduced in
46
F. Baader and W. Nutt
TBox Description Language
Reasoning
ABox KB Application Programs
Rules
Fig. 2.1. Architecture of a knowledge representation system based on Description Logics.
Section 2.2, but have been considered in the literature and are available in some DL systems. 2.2 Definition of the basic formalism A KR system based on Description Logics provides facilities to set up knowledge bases, to reason about their content, and to manipulate them. Figure 2.1 sketches the architecture of such a system (see Chapter 8 for more information on DL systems). A knowledge base (KB) comprises two components, the TBox and the ABox. The TBox introduces the terminology, i.e., the vocabulary of an application domain, while the ABox contains assertions about named individuals in terms of this vocabulary. The vocabulary consists of concepts, which denote sets of individuals, and roles, which denote binary relationships between individuals. In addition to atomic concepts and roles (concept and role names), all DL systems allow their users to build complex descriptions of concepts and roles. The TBox can be used to assign names to complex descriptions. The language for building descriptions is a characteristic of each DL system, and different systems are distinguished by their description languages. The description language has a model-theoretic semantics. Thus, statements in the TBox and in the ABox can be identified with formulae in first-order logic or, in some cases, a slight extension of it. A DL system not only stores terminologies and assertions, but also offers services that reason about them. Typical reasoning tasks for a terminology are to determine whether a description is satisfiable (i.e., non-contradictory), or whether one description is more general than another one, that is, whether the first subsumes the second. Important problems for an ABox are to find out whether its set of assertions is consistent, that is, whether it has a model, and whether the assertions in the ABox entail that a particular individual is an instance of a given concept description. Satisfiability checks of descriptions and consistency checks of sets of
2
Basic Description Logics
47
assertions are useful to determine whether a knowledge base is meaningful at all. With subsumption tests, one can organize the concepts of a terminology into a hierarchy according to their generality. A concept description can also be conceived as a query, describing a set of objects one is interested in. Thus, with instance tests, one can retrieve the individuals that satisfy the query. In any application, a KR system is embedded into a larger environment. Other components interact with the KR component by querying the knowledge base and by modifying it, that is, by adding and retracting concepts, roles, and assertions. A restricted mechanism for adding assertions uses rules. Rules are an extension of the logical core formalism, which can still be interpreted logically. However, many systems, in addition to providing an application programming interface that consists of functions with a well-defined logical semantics, provide an escape hatch by which application programs can operate on the KB in arbitrary ways. 2.2.1 Description languages Elementary descriptions are atomic concepts and atomic roles. Complex descriptions can be built from them inductively with concept constructors. In abstract notation, we use the letters A and B for atomic concepts, the letter R for atomic roles, and the letters C and D for concept descriptions. Description languages are distinguished by the constructors they provide. In the sequel we shall discuss various languages from the family of AL-languages. The language AL (= attributive language) has been introduced in [Schmidt-Schauß and Smolka, 1991] as a minimal language that is of practical interest. The other languages of this family are extensions of AL. 2.2.1.1 The basic description language AL Concept descriptions in AL are formed according to the following syntax rule: C, D
−→
A| | ⊥| ¬A | CD| ∀R.C | ∃R.
(atomic concept) (universal concept) (bottom concept) (atomic negation) (intersection) (value restriction) (limited existential quantification).
Note that, in AL, negation can only be applied to atomic concepts, and only the top concept is allowed in the scope of an existential quantification over a role. For historical reasons, the sublanguage of AL obtained by disallowing atomic
48
F. Baader and W. Nutt
negation is called FL− and the sublanguage of FL− obtained by disallowing limited existential quantification is called FL0 . To give examples of what can be expressed in AL, we suppose that Person and Female are atomic concepts. Then Person Female and Person ¬Female are AL-concepts describing, intuitively, those persons that are female, and those that are not female. If, in addition, we suppose that hasChild is an atomic role, we can form the concepts Person ∃hasChild. and Person ∀hasChild.Female, denoting those persons that have a child, and those persons all of whose children are female. Using the bottom concept, we can also describe those persons without a child by the concept Person ∀hasChild.⊥. In order to define a formal semantics of AL-concepts, we consider interpretations I that consist of a non-empty set I (the domain of the interpretation) and an interpretation function, which assigns to every atomic concept A a set AI ⊆ I and to every atomic role R a binary relation R I ⊆ I × I . The interpretation function is extended to concept descriptions by the following inductive definitions: I ⊥I (¬A)I (C D)I (∀R.C)I (∃R.)I
= I = ∅ = I \ A I = C I ∩ DI = {a ∈ I | ∀b. (a, b) ∈ R I → b ∈ C I } = {a ∈ I | ∃b. (a, b) ∈ R I }.
We say that two concepts C, D are equivalent, and write C ≡ D, if C I = D I for all interpretations I. For instance, going back to the definition of the semantics of concepts, one easily verifies that ∀hasChild.Female ∀hasChild.Student and ∀hasChild.(Female Student) are equivalent. 2.2.1.2 The family of AL-languages We obtain more expressive languages if we add further constructors to AL. The union of concepts (indicated by the letter U) is written as C D, and interpreted as (C D)I = C I ∪ D I . Full existential quantification (indicated by the letter E) is written as ∃R.C, and interpreted as (∃R.C)I = {a ∈ I | ∃b. (a, b) ∈ R I ∧ b ∈ C I }. Note that ∃R.C differs from ∃R. in that arbitrary concepts are allowed to occur in the scope of the existential quantifier.
2
Basic Description Logics
49
Number restrictions (indicated by the letter N ) are written as n R (at-least restriction) and as n R (at-most restriction), where n ranges over the nonnegative integers. They are interpreted as ( n R)I = a ∈ I |{b | (a, b) ∈ R I }| ≥ n , and
I ( n R) = a ∈ |{b | (a, b) ∈ R I }| ≤ n , I
respectively, where “| · |” denotes the cardinality of a set. From a semantic viewpoint, the coding of numbers in number restrictions is immaterial. However, for the complexity analysis of inferences it can matter whether a number n is represented in binary (or decimal) notation or by a string of length n, since binary (decimal) notation allows a more compact representation. The negation of arbitrary concepts (indicated by the letter C, for “complement”) is written as ¬C, and interpreted as (¬C)I = I \ C I . With the additional constructors, we can, for example, describe those persons that have either not more than one child or at least three children, one of whom is female: Person ( 1 hasChild ( 3 hasChild ∃hasChild.Female)). Extending AL by any subset of the above constructors yields a particular ALlanguage. We name each AL-language by a string of the form AL[U][E][N ][C], where a letter in the name stands for the presence of the corresponding constructor. For instance, ALEN is the extension of AL by full existential quantification and number restrictions (see the appendix on DL terminology for how to extend this naming scheme to more expressive Description Logics). From the semantic point of view, not all these languages are distinct, however. The semantics enforces the equivalences C D ≡ ¬(¬C ¬D) and ∃R.C ≡ ¬∀R.¬C. Hence, union and full existential quantification can be expressed using negation. Conversely, the combination of union and full existential quantification gives us the ability to express negation of concepts (through their equivalent negation normal form, see Subsection 2.3.2). Therefore, we assume w.l.o.g. that union and full existential quantification are available in every language that contains negation, and vice versa. It follows that (modulo the equivalences mentioned above), all AL-languages can be written using the letters U, E, N only. It is not hard to see that the eight languages obtained this way are indeed pairwise non-equivalent. In
50
F. Baader and W. Nutt
the sequel, we shall not distinguish between an AL-language with negation and its counterpart that has union and full existential quantification instead. In the same vein, we shall use the letter C instead of the letters UE in language names. For instance, we shall write ALC instead of ALUE and ALCN instead of ALUEN . 2.2.1.3 Description languages as fragments of predicate logic The semantics of concepts identifies description languages as fragments of firstorder predicate logic. Since an interpretation I respectively assigns to every atomic concept and role a unary and binary relation over I , we can view atomic concepts and roles as unary and binary predicates. Then, any concept C can be translated effectively into a predicate logic formula φC (x) with one free variable x such that for every interpretation I the set of elements of I satisfying φC (x) is exactly C I : An atomic concept A is translated into the formula A(x); the constructors intersection, union, and negation are translated into logical conjunction, disjunction, and negation, respectively; if C is already translated into φC (x) and R is an atomic role, then value restriction and existential quantification are captured by the formulae φ∃R.C (y) φ∀R.C (y)
= =
∃x. R(y, x) ∧ φC (x) ∀x. R(y, x) → φC (x),
where y is a new variable; number restrictions are expressed by the formulae φ n R (x) = ∃y1 , . . . , yn . R(x, y1 ) ∧ · · · ∧ R(x, yn ) ∧ yi = y j i< j
φ n R (x)
=
∀y1 , . . . , yn+1 . R(x, y1 ) ∧ · · · ∧ R(x, yn+1 ) →
yi = y j .
i< j
Note that the equality predicate “=” is needed to express number restrictions, while concepts without number restrictions can be translated into equality-free formulae. One may argue that, since concepts can be translated into predicate logic, there is no need for a special syntax. However, the above translations show that, in particular for number restrictions, the variable-free syntax of Description Logics is much more concise. As can be seen from Section 2.3, it also lends itself easily to the development of algorithms. A more detailed analysis of the connection between fragments of first-order predicate logic and Description Logics can be found in Chapter 4.
2.2.2 Terminologies We have seen how we can form complex descriptions of concepts to describe classes of objects. Now, we introduce terminological axioms, which make statements about
2
Basic Description Logics
51
how concepts or roles are related to each other. Then we single out definitions as specific axioms and identify terminologies as sets of definitions by which we can introduce atomic concepts as abbreviations or names for complex concepts. If the definitions in a terminology contain cycles, we may have to adopt fixpoint semantics to make them unequivocal. We discuss for which types of terminologies fixpoint models exist. 2.2.2.1 Terminological axioms In the most general case, terminological axioms have the form C D
(R S)
or
C≡D
(R ≡ S),
where C, D are concepts (and R, S are roles). Axioms of the first kind are called inclusions, while axioms of the second kind are called equalities. To simplify the exposition, we deal in the following only with axioms involving concepts. The semantics of axioms is defined as one would expect. An interpretation I satisfies an inclusion C D if C I ⊆ D I , and it satisfies an equality C ≡ D if C I = D I . If T is a set of axioms, then I satisfies T iff I satisfies each element of T . If I satisfies an axiom (resp. a set of axioms), then we say that it is a model of this axiom (resp. set of axioms). Two axioms or two sets of axioms are equivalent if they have the same models. 2.2.2.2 Definitions An equality whose left-hand side is an atomic concept is a definition. Definitions are used to introduce symbolic names for complex descriptions. For instance, by the axiom Mother ≡ Woman ∃hasChild.Person we associate to the description on the right-hand side the name Mother. Symbolic names may be used as abbreviations in other descriptions. If, for example, we have defined Father analogously to Mother, we can define Parent as Parent ≡ Mother Father. A set of definitions should be unequivocal. We call a finite set of definitions T a terminology or TBox if no symbolic name is defined more than once, that is, if for every atomic concept A there is at most one axiom in T whose left-hand side is A. Figure 2.2 shows a terminology with concepts concerned with family relationships. Suppose T is a terminology. We divide the atomic concepts occurring in T into two sets, the name symbols NT that occur on the left-hand side of some axiom and the base symbols BT that occur only on the right-hand side of axioms. Name
52
F. Baader and W. Nutt Woman Man Mother Father Parent Grandmother MotherWithManyChildren MotherWithoutDaughter Wife
≡ ≡ ≡ ≡ ≡ ≡ ≡ ≡
Person Female Person ¬Woman Woman ∃hasChild.Person Man ∃hasChild.Person Father Mother Mother ∃hasChild.Parent Mother 3 hasChild Mother ∀hasChild.¬Woman Woman hasHusband.Man
Fig. 2.2. A terminology (TBox) with concepts about family relationships.
symbols are often called defined concepts and base symbols primitive concepts.2 We expect that the terminology defines the name symbols in terms of the base symbols, which now we make more precise. A base interpretation for T is an interpretation that interprets only the base symbols. Let J be such a base interpretation. An interpretation I that interprets also the name symbols is an extension of J if it has the same domain as J , i.e., I = J , and if it agrees with J for the base symbols. We say that T is definitorial if every base interpretation has exactly one extension that is a model of T . In other words, if we know what the base symbols stand for, and T is definitorial, then the meaning of the name symbols is completely determined. Obviously, if a terminology is definitorial, then every equivalent terminology is also definitorial. The question whether a terminology is definitorial or not is related to the question whether or not its definitions are cyclic. For instance, the terminology that consists of the the single axiom Human ≡ Animal ∀hasParent.Human
(2.1)
contains a cycle, which in this special case is very simple. In general, we define cycles in a terminology T as follows. Let A, B be atomic concepts occurring in T . We say that A directly uses B in T if B appears on the right-hand side of the definition of A, and we define uses to be the transitive closure of the relation directly uses. Then T contains a cycle iff there exists an atomic concept in T that uses itself. Otherwise, T is called acyclic. Unique extensions need not exist if a terminology contains cycles. Consider, for instance, the terminology that contains only Axiom (2.1). Here, Human is a name symbol and Animal and hasParent are base symbols. For an interpretation where hasParent relates every animal to its progenitors, many extensions are possible to interpret Human in a such a way that the axiom is satisfied: Human can, among others, be interpreted as the set of all animals, as some species, or any other set of animals with the property that for each animal it contains also its progenitors. 2
Note that some papers use the notion “primitive concept” with a different meaning; e.g., synonymous with what we call atomic concepts, or to denote the (atomic) left-hand sides of concept inclusions.
2
Basic Description Logics
Woman Man Mother Father Parent
≡ ≡ ≡ ≡ ≡
Person Female Person ¬(Person Female) (Person Female) ∃hasChild.Person (Person ¬(Person Female)) ∃hasChild.Person ((Person ¬(Person Female)) ∃hasChild.Person) ((Person Female) ∃hasChild.Person)
Grandmother
≡
((Person Female) ∃hasChild.Person) ∃hasChild.(((Person ¬(Person Female)) ∃hasChild.Person) ((Person Female) ∃hasChild.Person)) ((Person Female) ∃hasChild.Person) 3 hasChild ((Person Female) ∃hasChild.Person) ∀hasChild.(¬(Person Female)) (Person Female) hasHusband.(Person (Person Female))
MotherWithManyChildren ≡ MotherWithoutDaughter ≡ Wife
≡
53
Fig. 2.3. The expansion of the Family TBox in Figure 2.2.
In contrast, if a terminology T is acyclic, then it is definitorial. The reason is that we can expand through an iterative process the definitions in T by replacing each occurrence of a name on the right-hand side of a definition by the concepts that it stands for. Since there is no cycle in the set of definitions, the process eventually stops and we end up with a terminology T consisting solely of definitions of the form A ≡ C , where C contains only base symbols and no name symbols. We call T the expansion of T . Note that the size of the expansion can be exponential in the size of the original terminology [Nebel, 1990b]. The Family TBox in Figure 2.2 is acyclic. Therefore, we can compute the expansion, which is shown in Figure 2.3. Proposition 2.1 Let T be an acyclic terminology and T be its expansion. Then (i) T and T have the same name and base symbols; (ii) T and T are equivalent; (iii) both T and T are definitorial.
Proof Let T1 be a terminology. Suppose A ≡ C and B ≡ D are definitions in T1 such that B occurs in C. Let C be the concept obtained from C by replacing each occurrence of B in C by D, and let T2 be the terminology obtained from T1 by replacing the definition A ≡ C by A ≡ C . Then both terminologies have the same name and base symbols. Moreover, since T2 has been obtained from T1 by replacing equals by equals, both terminologies have the same models. Since T is obtained from T by a sequence of replacement steps like the ones above, this proves claims (i) and (ii). Suppose now that J is an interpretation of the base symbols. We extend it to an interpretation I that covers also the name symbols by setting AI = C J , if A ≡ C
54
F. Baader and W. Nutt
is the definition of A in T . Clearly, I is a model of T , and it is the only extension of J that is a model of T . This shows that T is definitorial. Moreover, T is definitorial as well, since it is equivalent to T . It is characteristic of acyclic terminologies, in a sense to be made more precise, to uniquely define the name symbols in terms of the base symbols. Of course, there are also terminologies with cycles that are definitorial. Consider for instance the one consisting of the axiom A
≡
∀R.B ∃R.(A ¬A),
(2.2)
which has a cycle. However, since ∃R.(A ¬A) is equivalent to the bottom concept, Axiom (2.2) is equivalent to the acyclic axiom A
≡
∀R.B.
(2.3)
This example is typical of the general situation. Theorem 2.2 Every definitorial ALC-terminology is equivalent to an acyclic terminology. The theorem is a reformulation of Beth’s Definability Theorem [Gabbay, 1972] for the modal propositional logic Kn , which, as shown by Schild [1991], is a notational variant of ALC. 2.2.2.3 Fixpoint semantics for terminological cycles Under the semantics we have studied so far, which is essentially the semantics of first-order logic, terminologies have definitorial effect only if they are essentially acyclic. Following Nebel [1991], we shall call this semantics descriptive semantics to distinguish it from the fixpoint semantics introduced below. Fixpoint semantics are motivated by the fact that there are situations where intuitively cyclic definitions are meaningful and the intuition can be captured by least or greatest fixpoint semantics. Example 2.3 Suppose that we want to specify the concept of a “man who has only male descendants”, for short Momd. In particular, such a man is a Mos, that is, a “man who has only sons”. A Mos can be defined without cycles as Mos
≡
Man ∀hasChild.Man.
For a Momd, however, we want to make a statement about the fillers of the transitive closure of the role hasChild. Here a recursive definition of Momd seems to be natural. A man having only male descendants is himself a man, and all his children
2
Basic Description Logics
55
are men having only male descendants: Momd
≡
Man ∀hasChild.Momd.
(2.4)
In order to achieve the desired meaning, we have to interpret this definition under an appropriate fixpoint semantics. We shall show below that greatest fixpoint semantics captures our intuition here. Cycles also appear when we want to model recursive structures, e.g., binary trees.3 Example 2.4 We suppose that there is a set of objects that are Trees and a binary relation has-branch between objects that leads from a tree to its subtrees. Then the binary trees are the trees with at most two subtrees that are themselves binary trees: BinaryTree ≡
Tree 2 has-branch ∀has-branch.BinaryTree.
As with the definition of Momo, a fixpoint semantics will yield the desired meaning. However, for this example we have to use least fixpoint semantics. We now give a formal definition of fixpoint semantics. In a terminology T , every name symbol A occurs exactly once as the left-hand side of an axiom A ≡ C. Therefore, we can view T as a mapping that associates to a name symbol A the concept description T (A) = C. With this notation, an interpretation I is a model of T if, and only if, AI = (T (A))I . This characterization has the flavor of a fixpoint equation. We exploit this similarity to introduce a family of mappings such that an interpretation is a model of T iff it is a fixpoint of such a mapping. Let T be a terminology, and let J be a fixed base interpretation of T . By ExtJ we denote the set of all extensions of J . Let TJ : ExtJ → ExtJ be the mapping that maps the extension I to the extension TJ (I) defined by ATJ (I) = (T (A))I for each name symbol A. Now, I is a fixpoint of TJ iff I = TJ (I), i.e., iff AI = ATJ (I) for all name symbols. This means that, for every definition A ≡ C in T , we have AI = ATJ (I) = (T (A))I = C I , which means that I is a model of T . This proves the following result. Proposition 2.5 Let T be a terminology, I be an interpretation, and J be the restriction of I to the base symbols of T . Then I is a model of T if, and only if, I is a fixpoint of TJ . According to the preceding proposition, a terminology T is definitorial iff every base interpretation J has a unique extension that is a fixpoint of TJ . 3
The following example is taken from [Nebel, 1991].
56
F. Baader and W. Nutt
Example 2.6 To get a feel for why cyclic terminologies are not definitorial, we discuss as an example the terminology T Momd that consists only of Axiom (2.4). Consider the base interpretation J defined by J ManJ hasChildJ
= {Charles1 , Charles2 , . . .} ∪ {James1 , . . . , JamesLast }, = J , = {(Charlesi , Charles(i+1) ) | i ≥ 1} ∪ {(Jamesi , James(i+1) ) | 1 ≤ i < Last}.
This means that the Charles dynasty does not die out, whereas there is a last member of the James dynasty. Momd We want to identify the fixpoints of TJ . Note that an individual without children, i.e., without fillers of hasChild, is always in the interpretation of ∀hasChild.Momd, no matter how Momd is interpreted. Therefore, if I is a fixpoint extension of J , then JamesLast is in (∀hasChild.Momd)I , and thus in MomdI . We conclude that every James is a Momd. Let I1 be the extension of J such that MomdI1 comprises exactly the James dynasty. Then it is easy to check that I1 is a fixpoint. If, in addition to the James dynasty, some Charles is a Momd, then all the members of the Charles dynasty before and after him must belong to the concept Momd. One can easily check that the extension I2 that interprets Momd as the entire domain is also a fixpoint, and that there is no other fixpoint. In order to give definitorial effect to a cyclic terminology T , we must single out a particular fixpoint of the mapping TJ if there are more than one. To this end, we define a partial ordering “ ” on the extensions of J . We say that I I if AI ⊆ AI for every name symbol in T . In the above example, Momd is the only name symbol. Since MomdI1 ⊆ MomdI2 , we have I1 I2 . A fixpoint I of TJ is the least fixpoint (lfp) if I I for every other fixpoint I . We say that I is a least fixpoint model of T if I is the least fixpoint of TJ for some base interpretation J . Under least fixpoint semantics we only admit the least fixpoint models of T as intended interpretations. Greatest fixpoints (gfp), greatest fixpoint models, and greatest fixpoint semantics are defined analogously. In the Momd example, I1 is the least and I2 the greatest fixpoint of TJ . 2.2.2.4 Existence of fixpoint models Least and greatest fixpoint models need not exist for every terminology. Example 2.7 As a simple example, consider the axiom A
≡
¬A.
(2.5)
2
Basic Description Logics
57
If I is a model of this axiom, then AI = I \ AI , which implies I = ∅, an absurdity. A terminology containing Axiom (2.5) thus does not have any models, and therefore also no gfp (lfp) models. There are also cases where models (i.e., fixpoints) exist, but there is neither a least one nor a greatest one. As an example, consider the terminology T with the single axiom A
≡
∀R.¬A.
(2.6)
Let J be the base interpretation with J = {a, b} and R J = {(a, b), (b, a)}. Then there are two fixpoint extensions I1 , I2 , defined by AI1 = {a} and AI2 = {b}. However, they are not comparable with respect to “ ”. In order to identify terminologies with the property that for every base interpretation there exists a least and a greatest fixpoint extension, we draw upon results from lattice theory. Recall that a lattice is complete if every family of elements has a least upper bound. On ExtJ we have introduced the partial ordering “ ”. For a family of interpreta tions (Ii )i∈I in ExtJ we define I0 = i∈I Ii as the pointwise union of the Ii s, that is, for every name symbol A we have AI0 = i∈I AIi . Then I0 is the least upper bound of the Ii s, which shows that (ExtJ , ) is a complete lattice. A function f : L → L on a lattice (L , ) is monotone if f (x) f (y) whenever x y. Tarski’s Fixpoint Theorem [Tarski, 1955] says that for a monotone function on a complete lattice the set of fixpoints is nonempty and itself forms a complete lattice. In particular, there is a least and a greatest fixpoint. We define that a terminology T is monotone if the mapping TJ is monotone for all base interpretations J . By Tarski’s theorem, such terminologies have greatest and least fixpoints. However, to apply the theorem, we must be able to recognize monotone terminologies. A simple syntactic criterion is the following. We call a terminology negation-free if no negation occurs in it. By an induction over the depth of concept descriptions one can check that every negation-free ALCN -terminology is monotone. Proposition 2.8 If T is a negation-free terminology and J a base interpretation, then there exist extensions of J that are an lfp-model and a gfp-model of T , respectively. Negation-free terminologies are not the most general class of terminologies having least and greatest fixpoints. We have seen in Proposition 2.1 that acyclic terminologies are definitorial and thus for a given base interpretation admit only a
58
F. Baader and W. Nutt
single extension that is a model, which then is both a least and a greatest fixpoint model. We obtain a more refined criterion for the existence of least and greatest fixpoints if we pay attention to the interplay between cycles and negation. To this end, we associate to a terminology T a dependency graph G T , whose nodes are the name symbols in T . If T contains the axiom A ≡ C, then for every occurrence of the name symbol A in C, there is an arc from A to A in G T . Arcs are labeled as positive and negative. The arc from A to A is positive if A occurs in C in the scope of an even number of negations, and it is negative if A occurs in the scope of an odd number of negations. A sequence of nodes A1 , . . . , An is a path if there is an arc in G T from Ai to Ai+1 for all i = 1, . . . , n − 1. A path is a cycle if A1 = An . Proposition 2.9 Let T be a terminology such that each cycle in G T contains an even number of negative arcs. Then T is monotone. We call a terminology satisfying the precondition of this proposition syntactically monotone. 2.2.2.5 Terminologies with inclusion axioms For certain concepts we may be unable to define them completely. In this case, we can still state necessary conditions for concept membership using an inclusion. We call an inclusion whose left-hand side is atomic a specialization. For example, if a (male) knowledge engineer thinks that the definition of “woman” in our example TBox (Figure 2.2) is not satisfactory, but if he also feels that he is not able to define the concept “woman” in all detail, he can require that every woman is a person with the specialization Woman Person.
(2.7)
If we also allow specializations in a terminology, then the terminology loses its definitorial effect, even if it is acyclic. A set of axioms T is a generalized terminology if the left-hand side of each axiom is an atomic concept and for every atomic concept there is at most one axiom where it occurs on the left-hand side. We shall transform a generalized terminology T into a regular terminology T¯ , containing definitions only, such that T¯ is equivalent to T in a sense that will be specified below. We obtain T¯ from T by choosing for every specialization A C in T a new base symbol A¯ and by replacing the specialization A C with the definition A ≡ A¯ C. The terminology T¯ is the normalization of T .
2
Basic Description Logics
59
If a TBox contains the specialization (2.7), then the normalization contains the definition Woman ≡ Woman Person. Intuitively, the additional base symbol Woman stands for the qualities that distinguish a woman among persons. Thus, normalization results in a TBox with a definition for Woman that is similar to the one in the Family TBox. Proposition 2.10 Let T be a generalized terminology and T¯ its normalization. r Every model of T¯ is a model of T . r For every model I of T there is a model I¯ of T¯ that has the same domain as I and agrees with I on the atomic concepts and roles in T . ¯ ¯ Proof The first claim holds because a model I¯ of T¯ satisfies AI = ( A¯ C)I = ¯ I ¯ ¯ ¯ A¯ ∩ C I , which implies AI ⊆ C I . Conversely, if I is a model of T , then the ¯ I extension I¯ of I, defined by A¯ = AI , is a model of T¯ , because AI ⊆ C I implies I¯ ¯ AI = AI ∩ C I = A¯ ∩ C I , and therefore I¯ satisfies A ≡ A¯ C.
Thus, in theory, inclusion axioms do not add to the expressivity of terminologies. However, in practice, they are a convenient means to introduce terms into a terminology that cannot be defined completely. 2.2.3 World descriptions The second component of a knowledge base, in addition to the terminology or TBox, is the world description or ABox. 2.2.3.1 Assertions about individuals In the ABox, one describes a specific state of affairs of an application domain in terms of concepts and roles. Some of the concept and role atoms in the ABox may be defined names of the TBox. In the ABox, one introduces individuals, by giving them names, and one asserts properties of these individuals. We denote individual names by a, b, c. Using concepts C and roles R, one can make assertions of the following two kinds in an ABox: C(a),
R(b, c).
By the first kind, called concept assertions, one states that a belongs to (the interpretation of) C. By the second kind, called role assertions, one states that c is a filler of the role R for b. For instance, if PETER, PAUL, and MARY are individual
60
F. Baader and W. Nutt MotherWithoutDaughter(MARY) hasChild(MARY, PETER) hasChild(MARY, PAUL)
Father(PETER) hasChild(PETER, HARRY)
Fig. 2.4. A world description (ABox).
names, then Father(PETER) means that Peter is a father, and hasChild(MARY, PAUL) means that Paul is a child of Mary. An ABox, denoted by A, is a finite set of such assertions. Figure 2.4 shows an example of an ABox. In a simplified view, an ABox can be seen as an instance of a relational database with only unary or binary relations. However, contrary to the “closed-world semantics” of classical databases, the semantics of ABoxes is an “open-world semantics”, since normally knowledge representation systems are applied in situations where one cannot assume that the knowledge in the KB is complete.4 Moreover, the TBox imposes semantic relationships between the concepts and roles in the ABox that do not have counterparts in database semantics. We give a semantics to ABoxes by extending interpretations to individual names. From now on, an interpretation I = (I , ·I ) not only maps atomic concepts and roles to sets and relations, but in addition maps each individual name a to an element a I ∈ I . We assume that distinct individual names denote distinct objects. Therefore, this mapping has to respect the unique name assumption (UNA), that is, if a, b are distinct names, then a I = bI . The interpretation I satisfies the concept assertion C(a) if a I ∈ C I , and it satisfies the role assertion R(a, b) if (a I , bI ) ∈ R I . An interpretation satisfies the ABox A if it satisfies each assertion in A. In this case we say that I is a model of the assertion or of the ABox. Finally, I satisfies an assertion α or an ABox A with respect to a TBox T if in addition to being a model of α or of A, it is a model of T . Thus, a model of A and T is an abstraction of a concrete world where the concepts are interpreted as subsets of the domain as required by the TBox and where the membership of the individuals to concepts and their relationships with one another in terms of roles respect the assertions in the ABox. 2.2.3.2 Individual names in the description language Sometimes, it is convenient to allow individual names (also called nominals) not only in the ABox, but also in the description language. Some concept constructors employing individuals occur in systems and have been investigated in the literature. The most basic one is the “set” (or one-of ) constructor, written {a1 , . . . , an }, 4
We discuss implications of this difference in semantics in Subsection 2.2.4.4.
2
Basic Description Logics
61
where a1 , . . . , an are individual names. As one would expect, such a set concept is interpreted as {a1 , . . . , an }I
=
{a1I , . . . , anI }.
(2.8)
With sets in the description language one can for instance define the concept of permanent members of the UN security council as {CHINA, FRANCE, RUSSIA, UK, USA}. In a language with the union constructor “”, a constructor {a} for singleton sets alone adds sufficient expressiveness to describe arbitrary finite sets since, according to the semantics of the set constructor in Equation (2.8), the concepts {a1 , . . . , an } and {a1 } · · · {an } are equivalent. Another constructor involving individual names is the “fills” constructor R : a, for a role R. The semantics of this constructor is defined as (R : a)I
=
{d ∈ I | (d, a I ) ∈ R I },
(2.9)
that is, R : a stands for the set of those objects that have a as a filler of the role R. To a description language with singleton sets and full existential quantification, “fills” does not add anything new, since Equation (2.9) implies that R : a and ∃R.{a} are equivalent. We note, finally, that “fills” allows one to express role assertions through concept assertions: an interpretation satisfies R(a, b) iff it satisfies (∃R.{b})(a). 2.2.4 Inferences A knowledge representation system based on Description Logics is able to perform specific kinds of reasoning. As said before, the purpose of a knowledge representation system goes beyond storing concept definitions and assertions. A knowledge base – comprising TBox and ABox – has a semantics that makes it equivalent to a set of axioms in first-order predicate logic. Thus, like any other set of axioms, it contains implicit knowledge that can be made explicit through inferences. For example, from the TBox in Figure 2.2 and the ABox in Figure 2.4 one can conclude that Mary is a grandmother, although this knowledge is not explicitly stated as an assertion. The different kinds of reasoning performed by a DL system (see Chapter 8) are defined as logical inferences. In the following, we shall discuss these inferences, first for concepts, then for TBoxes and ABoxes, and finally for TBoxes and ABoxes together. It will turn out that there is one main inference problem, namely the consistency check for ABoxes, to which all other inferences can be reduced.
62
F. Baader and W. Nutt
2.2.4.1 Reasoning tasks for concepts When modeling a domain, a knowledge engineer constructs a terminology, say T , by defining new concepts, possibly in terms of others that have been defined before. During this process, it is important to find out whether a newly defined concept makes sense or whether it is contradictory. From a logical point of view, a concept makes sense for us if there is some interpretation that satisfies the axioms of T (that is, a model of T ) such that the concept denotes a nonempty set in that interpretation. A concept with this property is said to be satisfiable with respect to T and unsatisfiable otherwise. Checking satisfiability of concepts is a key inference. As we shall see, a number of other important inferences for concepts can be reduced to (un)satisfiability. For instance, in order to check whether a domain model is correct, or to optimize queries that are formulated as concepts, we may want to know whether some concept is more general than another one: this is the subsumption problem. A concept C is subsumed by a concept D if in every model of T the set denoted by C is a subset of the set denoted by D. Algorithms that check subsumption are also employed to organize the concepts of a TBox in a taxonomy according to their generality. Further interesting relationships between concepts are equivalence and disjointness. These properties are formally defined as follows. Let T be a TBox. Satisfiability A concept C is satisfiable with respect to T if there exists a model I of T such that C I is nonempty. In this case we say also that I is a model of C. Subsumption A concept C is subsumed by a concept D with respect to T if C I ⊆ D I for every model I of T . In this case we write C T D or T |= C D. Equivalence Two concepts C and D are equivalent with respect to T if C I = D I for every model I of T . In this case we write C ≡T D or T |= C ≡ D. Disjointness Two concepts C and D are disjoint with respect to T if C I ∩ D I = ∅ for every model I of T . If the TBox T is clear from the context, we sometimes drop the qualification “with respect to T ”. We also drop the qualification in the special case where the TBox is empty, and we simply write |= C D if C is subsumed by D, and |= C ≡ D if C and D are equivalent. Example 2.11 With respect to the TBox in Figure 2.2, Person subsumes Woman, both Woman and Parent subsume Mother, and Mother subsumes Grandmother. Moreover, Woman and Man, and Father and Mother are disjoint. The subsumption relationships follow from the definitions because of the semantics of “” and “”. That Man is disjoint from Woman is due to the fact that Man is subsumed by the negation of Woman.
2
Basic Description Logics
63
Traditionally, the basic reasoning mechanism provided by DL systems checked the subsumption of concepts. This, in fact, is sufficient to implement also the other inferences, as can be seen by the following reductions. Proposition 2.12 (Reduction to Subsumption) For concepts C, D we have (i) C is unsatisfiable ⇔ C is subsumed by ⊥; (ii) C and D are equivalent ⇔ C is subsumed by D and D is subsumed by C; (iii) C and D are disjoint ⇔ C D is subsumed by ⊥.
The statements also hold with respect to a TBox. All description languages implemented in actual DL systems provide the intersection operator “” and almost all of them contain an unsatisfiable concept. Thus, most DL systems that can check subsumption can perform all four inferences defined above. If, in addition to intersection, a system allows one to form the negation of a description, one can reduce subsumption, equivalence, and disjointness of concepts to the satisfiability problem (see also Smolka [1988]). Proposition 2.13 (Reduction to Unsatisfiability) For concepts C, D we have (i) C is subsumed by D ⇔ C ¬D is unsatisfiable; (ii) C and D are equivalent ⇔ both (C ¬D) and (¬C D) are unsatisfiable; (iii) C and D are disjoint ⇔ C D is unsatisfiable.
The statements also hold with respect to a TBox. The reduction of subsumption can easily be understood if one recalls that, for sets M, N , we have M ⊆ N iff M \ N = ∅. The reduction of equivalence is correct because C and D are equivalent if, and only if, C is subsumed by D and D is subsumed by C. Finally, the reduction of disjointness is just a rephrasing of the definition. Because of the above proposition, in order to obtain decision procedures for any of the four inferences we have discussed, it is sufficient to develop algorithms that decide the satisfiability of concepts, provided the language for which we can decide satisfiability supports conjunction as well as negation of arbitrary concepts. In fact, this observation motivated researchers to study description languages in which, for every concept, one can also form the negation of that concept [Smolka, 1988; Schmidt-Schauß and Smolka, 1991; Donini et al., 1991b; 1997a]. The approach that considers satisfiability checking as the principal inference gave rise to a new kind of algorithms for reasoning in Description Logics,
64
F. Baader and W. Nutt
which can be understood as specialized tableau calculi (see Section 2.3 in this chapter and Chapter 3). Also, the most recent generation of DL systems, like Kris [Baader and Hollunder, 1991b], Crack [Bresciani et al., 1995], Fact [Horrocks, 1998b], Dlp [Patel-Schneider, 1999], and Race [Haarslev and M¨oller, 2001e], are based on satisfiability checking, and a considerable amount of research work is spent on the development of efficient implementation techniques for this approach [Baader et al., 1994; Horrocks, 1998b; Horrocks and Patel-Schneider, 1999; Haarslev and M¨oller, 2001c]. In an AL-language without full negation, subsumption and equivalence cannot be reduced to unsatisfiability in the simple way shown in Proposition 2.13 and therefore these inferences may be of different complexity. As seen in Proposition 2.12, from the viewpoint of worst-case complexity, subsumption is the most general inference for any AL-language. The next proposition shows that unsatisfiability is a special case of each of the other problems. Proposition 2.14 (Reducing Unsatisfiability) Let C be a concept. Then the following are equivalent: (i) (ii) (iii) (iv)
C C C C
is unsatisfiable; is subsumed by ⊥; and ⊥ are equivalent; and are disjoint.
The statements also hold with respect to a TBox. From Propositions 2.12 and 2.14 we see that, in order to obtain upper and lower complexity bounds for inferences on concepts in AL-languages, it suffices to assess lower bounds for unsatisfiability and upper bounds for subsumption. More precisely, for each AL-language, an upper bound for the complexity of the subsumption problem is also an upper bound for the complexity of the unsatifiability, the equivalence, and the disjointness problem. Moreover, a lower bound for the complexity of the unsatifiability problem is also a lower bound for the complexity of the subsumption, the equivalence, and the disjointness problem. 2.2.4.2 Eliminating the TBox In applications, concepts usually come in the context of a TBox. However, for developing reasoning procedures it is conceptually easier to abstract from the TBox or, what amounts to the same, to assume that it is empty. We show that, if T is an acyclic TBox, we can always reduce reasoning problems with respect to T to problems with respect to the empty TBox. As we have seen in Proposition 2.1, T is equivalent to its expansion T . Recall that in the expansion every definition is of the form A ≡ D such that D contains only base symbols, not
2
Basic Description Logics
65
name symbols. Now, for each concept C we define the expansion of C with respect to T as the concept C that is obtained from C by replacing each occurrence of a name symbol A in C by the concept D, where A ≡ D is the definition of A in T , the expansion of T . For example, we obtain the expansion of the concept Woman Man
(2.10)
with respect to the TBox in Figure 2.2 by considering the expanded TBox in Figure 2.3, and replacing Woman and Man by the right-hand sides of their definitions in this expansion. This results in the concept Person Female Person ¬(Person Female).
(2.11)
We can readily deduce a number of facts about expansions. Since the expansion C is obtained from C by replacing names by descriptions in such a way that both are interpreted in the same way in any model of T , it follows that r C ≡ C . T
Hence, C is satisfiable w.r.t. T iff C is satisfiable w.r.t. T . However, C contains no defined names, and thus C is satisfiable w.r.t. T iff it is satisfiable. This yields that r C is satisfiable w.r.t. T iff C is satisfiable.
If D is another concept, then we have also D ≡T D . Thus, C T D iff C T D , and C ≡T D iff C ≡T D . Again, since C and D contain only base symbols, this implies r T |= C D iff |= C D ; r T |= C ≡ D iff |= C ≡ D .
By similar arguments we can show that r C and D are disjoint w.r.t. T
iff C and D are disjoint.
Summing up, expanding concepts with respect to an acyclic TBox allows one to get rid of the TBox in reasoning problems. Going back to our example from above, this means that, in order to verify whether Man and Woman are disjoint with respect to the Family TBox, which amounts to checking whether Man Woman is unsatisfiable, it suffices to check that the concept (2.11) is unsatisfiable. Expanding concepts may be computationally costly, since in the worst case the size of T is exponential in the size of T , and therefore C may be larger than C by a factor that is exponential in the size of T . A complexity analysis of the difficulty of reasoning with respect to TBoxes shows that the expansion of definitions is a
66
F. Baader and W. Nutt
source of complexity that cannot always be avoided (see Subsection 2.3.3 of this chapter and Chapter 3). 2.2.4.3 Reasoning tasks for ABoxes After a knowledge engineer has designed a terminology and has used the reasoning services of the DL system to check that all concepts are satisfiable and that the expected subsumption relationships hold, the ABox can be filled with assertions about individuals. We recall that an ABox contains two kinds of assertions, concept assertions of the form C(a) and role assertions of the form R(a, b). Of course, the representation of such knowledge has to be consistent, because otherwise – from the viewpoint of logic – one could draw arbitrary conclusions from it. If, for example, the ABox contains the assertions Mother(MARY) and Father(MARY), the system should be able to find out that, together with the Family TBox, these statements are inconsistent. In terms of our model-theoretic semantics we can easily give a formal definition of consistency. An ABox A is consistent with respect to a TBox T , if there is an interpretation that is a model of both A and T . We simply say that A is consistent if it is consistent with respect to the empty TBox. For example, the set of assertions {Mother(MARY), Father(MARY)} is consistent (with respect to the empty TBox), because without any further restrictions on the interpretation of Mother and Father, the two concepts can be interpreted in such a way that they have a common element. However, the assertions are not consistent with respect to the Family TBox, since in every model of it, Mother and Father are interpreted as disjoint sets. Similarly as for concepts, checking the consistency of an ABox with respect to an acyclic TBox can be reduced to checking an expanded ABox. We define the expansion of A with respect to T as the ABox A that is obtained from A by replacing each concept assertion C(a) in A by the assertion C (a), where C is the expansion of C with respect to T .5 In every model of T , a concept C and its expansion C are interpreted in the same way. Therefore, A is consistent w.r.t. T iff A is so. However, since A does not contain a name symbol defined in T , it is consistent w.r.t. T iff it is consistent. We conclude: r A is consistent w.r.t. T
iff its expansion A is consistent.
A technique to check the consistency of ALCN -ABoxes is discussed in Subsection 2.3.2. 5
We expand only concept assertions because the description language considered until now does not provide constructors for role descriptions and therefore we have not considered TBoxes with role definitions. If the description language is richer, and TBoxes contain also role definitions, then they clearly have to be taken into account in the definition of expansions.
2
Basic Description Logics
67
Other inferences that we are going to introduce can also be defined with respect to a TBox or for an ABox alone. As in the case of consistency, reasoning tasks for ABoxes with respect to acyclic TBoxes can be reduced to reasoning on expanded ABoxes. For the sake of simplicity, we shall give only definitions of inferences with ABoxes alone, and leave it to the reader to formulate the appropriate generalization to inferences with respect to TBoxes and to verify that they can be reduced to inferences about expansions, provided the TBox is acyclic. Over an ABox A, one can pose queries about the relationships between concepts, roles and individuals. The prototypical ABox inference on which such queries are based is instance checking, or the check whether an assertion is entailed by an ABox. We say that an assertion α is entailed by A and we write A |= α, if every interpretation that satisfies A, that is, every model of A, also satisfies α. If α is a role assertion, instance checking is easy, since our description language does not contain constructors to form complex roles. If α is of the form C(a), we can reduce instance checking to the consistency problem for ABoxes because there is the following connection: r A |= C(a) iff A ∪ {¬C(a)} is inconsistent.
Also reasoning about concepts can be reduced to consistency checking. We have seen in Proposition 2.13 that the important reasoning problems for concepts can be reduced to that of deciding whether a concept is (un)satisfiable. Similarly, concept satisfiability can be reduced to ABox consistency because for every concept C we have r C is satisfiable iff {C(a)} is consistent,
where a is an arbitrarily chosen individual name. Conversely, Schaerf [1994b] has shown that ABox consistency can be reduced to concept satisfiability in languages with the “set” and the “fills” constructor. If these constructors are not available, however, then instance checking may be harder than the satisfiability and the subsumption problem [Donini et al., 1994b]. For applications, more complex inferences than consistency and instance checking are usually required. If we consider a knowledge base as a means to store information about individuals, we may want to know all individuals that are instances of a given concept description C, that is, we use the description language to formulate queries. In our example, we may want to know from the system all parents that have at least two children – for instance, because they are entitled to a specific family tax break. The retrieval problem is, given an ABox A and a concept C, to find all individuals a such that A |= C(a). A non-optimized algorithm for a retrieval query can be realized by testing for each individual occurring in the ABox whether it is an instance of the query concept C.
68
F. Baader and W. Nutt
The dual inference to retrieval is the realization problem: given an individual a and a set of concepts, find the most specific concepts C from the set such that A |= C(a). Here, the most specific concepts are those that are minimal with respect to the subsumption ordering . Realization can, for instance, be used in systems that generate natural language if terms are indexed by concepts and if a term as precise as possible is to be found for an object occurring in a discourse. 2.2.4.4 Closed- vs. open-world semantics Often, an analogy is established between databases on the one hand and DL knowledge bases on the other hand (see also Chapter 16). The schema of a database is compared to the TBox and the database instance with the actual data is compared to the ABox. However, the semantics of ABoxes differs from the usual semantics of database instances. While a database instance represents exactly one interpretation, namely the one where classes and relations in the schema are interpreted by the objects and tuples in the instance, an ABox represents many different interpretations, namely all its models. As a consequence, absence of information in a database instance is interpreted as negative information, while absence of information in an ABox only indicates lack of knowledge. For example, if the only assertion about Peter is hasChild(PETER, HARRY), then in a database this is understood as a representation of the fact that Peter has only one child, Harry. In an ABox, the assertion only expresses that, in fact, Harry is a child of Peter. However, the ABox has several models, some in which Harry is the only child and others in which he has brothers or sisters. Consequently, even if one also knows (by an assertion) that Harry is male, one cannot deduce that all of Peter’s children are male. The only way of stating in an ABox that Harry is the only child is by doing so explicitly, that is by adding the assertion ( 1 hasChild)(PETER). This means that, while the information in a database is always understood to be complete, the information in an ABox is in general viewed as being incomplete. The semantics of ABoxes is therefore sometimes characterized as an “open-world” semantics, while the traditional semantics of databases is characterized as a “closed-world” semantics. This view has consequences for the way queries are answered. Essentially, a query is a description of a class of objects. In our setting, we assume that queries are concept descriptions. A database (in the sense introduced above) is a listing of a single finite interpretation. A finite interpretation, say I, could be written up as a set of assertions of the form A(a) and R(b, c), where A is an atomic concept and R an atomic role. Such a set looks syntactically like an ABox, but is not an ABox because of the difference in semantics. Answering a query, represented by a complex concept C, over that database amounts to computing C I as it was defined in Section 2.2.1. From a logical point of view this means that query evaluation in
2
Basic Description Logics
hasChild(JOCASTA, OEDIPUS) hasChild(OEDIPUS, POLYNEIKES) Patricide(OEDIPUS)
69
hasChild(JOCASTA, POLYNEIKES) hasChild(POLYNEIKES, THERSANDROS) Patricide(THERSANDROS)
Fig. 2.5. The Oedipus ABox Aoe .
a database is not logical reasoning, but finite model checking (i.e., evaluation of a formula in a fixed finite model). Since an ABox represents possibly infinitely many interpretations, namely its models, query answering is more complex: it requires nontrivial reasoning. Here we are only concerned with semantical issues (algorithmic aspects will be treated in Section 2.3). To illustrate the difference between a semantics that identifies a database with a single model, and the open-world semantics of ABoxes, we discuss the so-called Oedipus example, which has stimulated a number of theoretical developments in DL research. Example 2.15 The example is based on the Oedipus story from ancient Greek mythology. In a nutshell, the story recounts how Oedipus killed his father, married his mother Jocasta, and had children with her, among them Polyneikes. Finally, Polyneikes also had children, among them Thersandros. We suppose the ABox Aoe in Figure 2.5 represents some rudimentary facts about these events. For the sake of the example, our ABox asserts that Oedipus is a patricide and that Thersandros is not, which is represented using the atomic concept Patricide. Suppose now that we want to know from the ABox whether Jocasta has a child that is a patricide and that itself has a child that is not a patricide. This can be expressed as the entailment problem Aoe |= (∃hasChild.(Patricide ∃hasChild.¬Patricide))(JOCASTA) ? One may be tempted to reason as follows. Jocasta has two children in the ABox. One, Oedipus, is a patricide. He has one child, Polyneikes. But nothing tells us that Polyneikes is not a patricide. So, Oedipus is not the child we are looking for. The other child is Polyneikes, but again, nothing tells us that Polyneikes is a patricide. So, Polyneikes is also not the child we are looking for. Based on this reasoning, one would claim that the assertion about Jocasta is not entailed. However, the correct reasoning is different. All the models of Aoe can be divided into two classes, one in which Polyneikes is a patricide, and another one in which he is not. In a model of the first kind, Polyneikes is the child of Jocasta that is a patricide and has a child, namely Thersandros, that isn’t. In a model of the second kind, Oedipus is the child of Jocasta that is a patricide and has a child, namely Polyneikes, that isn’t. Thus, in all models Jocasta has a child that is a patricide and that itself has
70
F. Baader and W. Nutt
a child that is not a patricide (though this is not always the same child). This means that the assertion (∃hasChild.(Patricide ∃hasChild.¬Patricide))(JOCASTA) is indeed entailed by Aoe . As this example shows, open-world reasoning may require case analyses. As will be explained in more detail in Chapter 3, this is one of the reasons why inferences in Description Logics are often more complex than query answering in databases. 2.2.5 Rules The knowledge bases we have discussed so far consist of a TBox T and an ABox A. We denote such a knowledge base as a pair K = (T , A). In some DL systems, such as Classic [Brachman et al., 1991] or Loom [MacGregor, 1991a], in addition to terminologies and world descriptions, one can also use rules to express knowledge. The simplest variant of such rules is an expression of the form C ⇒ D, where C, D are concepts. The meaning of such a rule is “if an individual is proved to be an instance of C, then derive that it is also an instance of D”. Such rules are often called trigger rules. Operationally, the semantics of a finite set R of trigger rules can be described by a forward reasoning process. Starting with an initial knowledge base K, a series of knowledge bases K(0) , K(1) , . . . is constructed, where K(0) = K and K(i+1) is obtained from K(i) by adding a new assertion D(a) whenever R contains a rule C ⇒ D such that K(i) |= C(a) holds, but K(i) does not contain D(a). This process eventually halts because the initial knowledge base contains only finitely many individuals and there are only finitely many rules. Hence, there are only finitely many assertions D(a) that can possibly be added. The result of the rule applications is a knowledge base K(n) that has the same TBox as K(0) and whose ABox is augmented by the membership assertions introduced by the rules. We call this final ¯ It is easy to knowledge base the procedural extension of K and denote it by K. see that this procedural extension is independent of the order of rule applications. Consequently, a set of trigger rules R uniquely specifies how to generate, for each ¯ The semantics of a knowledge knowledge base K, an extended knowledge base K. base K, augmented by a set of trigger rules, can thus be understood as the set of ¯ models of K. This defines the semantics of trigger rules only operationally. It would be preferable to specify the semantics declaratively and then to prove that the extension computed with the trigger rules correctly represents this semantics. It might be tempting to use the declarative semantics of inclusion axioms as semantics for rules.
2
Basic Description Logics
71
However, this does not correctly reflect the operational semantics given above. An important difference between the trigger rule C ⇒ D and the inclusion axiom C D is that the trigger rule is not equivalent to its contrapositive ¬D ⇒ ¬C. In addition, when applying trigger rules one does not make a case analysis. For example, the inclusions C D and ¬C D imply that every object belongs to D, whereas neither of the trigger rules C ⇒ D and ¬C ⇒ D applies to an individual a for which neither C(a) nor ¬C(a) can be proven. In order to capture the meaning of trigger rules in a declarative way, we must augment Description Logics by an operator K, which does not refer to objects in the domain, but to what the knowledge base knows about the domain. Therefore, K is an epistemic operator. More information on epistemic operators in Description Logics can be found in Chapter 6. To introduce the K operator, we enrich both the syntax and the semantics of description languages. Originally, the K operator was defined for ALC [Donini et al., 1992b; 1998a]. In this subsection, we discuss only how to extend the basic language AL. For other languages, one can proceed analogously (see also Chapter 6). First, we add one case to the syntax rule in Subsection 2.2.1.1 that allows us to construct epistemic concepts: C, D
−→
KC
(epistemic concept).
Intuitively, the concept KC denotes those objects for which the knowledge base knows that they are instances of C. Next, using K, we translate trigger rules C ⇒ D into inclusion axioms KC D.
(2.12)
Intuitively, the K operator in front of the concept C has the effect that the axiom is only applicable to individuals that appear in the ABox and for which ABox and TBox imply that they are instances of C. Such a restricted applicability prevents the inclusion axiom from influencing satisfiability or subsumption relationships between concepts. In the sequel, we will define a formal semantics for the operator K that has exactly this effect. A rule knowledge base is a triple K = (T , A, R), where T is a TBox, A is an ABox, and R is a set of rules written as inclusion axioms of the form (2.12). The ¯ that is procedural extension of such a triple is the knowledge base K¯ = (T , A) obtained from (T , A) by applying the trigger rules as described above. The semantics of epistemic inclusions will be defined in such a way that it applies only to individuals in the knowledge base that provably are instances of C, but not to arbitrary domain elements, which would be the case if we dropped K. The semantics will go beyond first-order logic because we not only have to interpret concepts, roles and individuals, but also have to model the knowledge of a knowledge base. The
72
F. Baader and W. Nutt
fact that a knowledge base has knowledge about the domain can be understood in such a way that it considers only a subset W of the set of all interpretations as possible states of the world. Those individuals that are interpreted as elements of C under all interpretations in W are then “known” to be in C. To make this formal, we modify the definition of ordinary (first-order) interpretations by assuming that: (i) there is a fixed countably infinite set that is the domain of every interpretation (common domain assumption); (ii) there is a mapping γ from the individuals to the domain elements that fixes the way individuals are interpreted (rigid term assumption).
The common domain assumption guarantees that all interpretations speak about the same domain. The rigid term assumption allows us to identify each individual symbol with exactly one domain element. These assumptions do not essentially reduce the number of possible interpretations. As a consequence, properties like satisfiability and subsumption of concepts are the same independently of whether we define them with respect to arbitrary interpretations or those that satisfy the above assumptions. Now, we define an epistemic interpretation as a pair (I, W), where I is a firstorder interpretation and W is a set of first-order interpretations, all satisfying the above assumptions. Every epistemic interpretation gives rise to a unique mapping ·I,W associating concepts and roles with subsets of and × , respectively. For , ⊥, atomic concepts, negated atomic concepts, and atomic roles, ·I,W agrees with ·I . For intersections, value restrictions, and existential quantifications, the definition is similar to that of ·I : (C D)I,W (∀R.C)I,W (∃R.)I,W
= C I,W ∩ D I,W = {a ∈ | ∀b. (a, b) ∈ R I,W → b ∈ C I,W } = {a ∈ | ∃b. (a, b) ∈ R I,W }.
For other constructors, ·I,W can be defined analogously. Note that for a concept C without an occurrence of K, the sets C I,W and C I are identical. The set of interpretations W comes into play when we define the semantics of the epistemic operator: C J ,W . (KC)I,W = J ∈W
It would also be possible to allow the operator K to occur in front of roles and to define the semantics of role expressions of the form KR analogously. However, since epistemic roles are not needed to explain the semantics of rules, we restrict ourselves to epistemic concepts.
2
Basic Description Logics
73
An epistemic interpretation (I, W) satisfies an inclusion C D if C I,W ⊆ D I,W , and an equality C ≡ D if C I,W = D I,W . It satisfies an assertion C(a) if a I,W = γ (a) ∈ C I,W , and an assertion R(a, b) if (a I,W , bI,W ) = (γ (a), γ (b)) ∈ R I,W . It satisfies a rule knowledge base K = (T , A, R) if it satisfies every axiom in T , every assertion in A, and every rule in R. An epistemic model for a rule knowledge base K is a maximal nonempty set W of first-order interpretations such that, for each I ∈ W, the epistemic interpretation (I, W) satisfies K. Note that, if (T , A) is first-order satisfiable, then the set of all first-order models of (T , A) is the only epistemic model of the rule knowledge base K = (T , A, ∅), whose rule set is empty. A similar statement holds for arbitrary rule knowledge bases. One can show that, if W1 and W2 are epistemic models, then the union W1 ∪ W2 is one, too, which implies W1 = W2 because of the maximality of epistemic models. Proposition 2.16 Let K = (T , A, R) be a rule knowledge base such that (T , A) is first-order satisfiable. Then K has a unique epistemic model. Example 2.17 Let R consist of the rule KStudent ∀eats.JunkFood.
(2.13)
The rule states that “those individuals that are known to be students eat only junk food”. We consider the rule knowledge base K1 = (∅, A1 , R), where A1 = {Student(PETER)}. Let us determine the epistemic model W of K1 . Every first-order interpretation I ∈ W must satisfy A1 . Therefore, in every such I, we have that Student(PETER) is true, and thus Peter is known to be a student. Since W satisfies Rule (2.13), the assertion ∀eats.JunkFood(PETER) also holds in every I. For any other domain element a ∈ , there is at least one interpretation in W where a is not a student. Thus, Peter is the only domain element to which the rule applies. Summing up, the epistemic model of K1 consists exactly of the first-order models of A1 ∪ {∀eats.JunkFood(PETER)}. Next we demonstrate with this example that the epistemic semantics for rules disallows contrapositive reasoning. We consider the rule knowledge base K2 = (∅, A2 , R), where A2 = {¬∀eats.JunkFood(PETER)}. In this case, ¬∀eats.JunkFood(PETER) is true in every first-order interpretation of
74
F. Baader and W. Nutt
the epistemic model W. However, because of the maximality of W, there is at least one interpretation in W in which Peter is a student and another one where Peter is not a student. Therefore, Peter is not known to be a student. Thus, the epistemic model of K2 consists exactly of the first-order models of A2 . The rule is satisfied because the antecedent is false. Clearly, the procedural extension of a rule knowledge base K contains only assertions that must be satisfied by the epistemic model of K. It can be shown that the assertions added to K by the rule applications are in fact, as stated in the following proposition, a first-order representation of the information that is implicit in the rules (see [Donini et al., 1998a] for a proof). Proposition 2.18 Let K = (T , A, R) be a rule knowledge base. If (T , A) is firstorder satisfiable, then the epistemic model of K consists precisely of the first-order ¯ models of the procedural extension K¯ = (T , A). 2.3 Reasoning algorithms In Subsection 2.2.4 we have seen that all the relevant inference problems can be reduced to the consistency problem for ABoxes, provided that the Description Logic at hand allows conjunction and negation. However, the description languages of all the early and also of some of the present day DL systems do not allow negation. For such Description Logics, subsumption of concepts can usually be computed by so-called structural subsumption algorithms, i.e., algorithms that compare the syntactic structure of (possibly normalized) concept descriptions. In the first subsection, we will consider such algorithms in more detail. While they are usually very efficient, they are only complete for rather simple languages with little expressivity. In particular, Description Logics with (full) negation and disjunction cannot be handled by structural subsumption algorithms. For such languages, so-called tableau-based algorithms have turned out to be very useful. In the area of Description Logics, the first tableau-based algorithm was presented by Schmidt-Schauß and Smolka [1991] for satisfiability of ALC-concepts. Since then, this approach has been employed to obtain sound and complete satisfiability (and thus also subsumption) algorithms for a great variety of Description Logics extending ALC (see, e.g., [Hollunder et al., 1990; Hollunder and Baader, 1991a; Donini et al., 1997a; Baader and Sattler, 1999] for languages with number restrictions; [Baader, 1991] for transitive closure of roles and [Sattler, 1996; Horrocks and Sattler, 1999] for transitive roles; and [Baader and Hanschke, 1991a; Hanschke, 1992; Haarslev et al., 1999] for constructors that allow one to refer to concrete domains such as numbers). In addition, it has been extended to the
2
Basic Description Logics
75
consistency problem for ABoxes [Hollunder, 1990; Baader and Hollunder, 1991b; Donini et al., 1994b; Haarslev and M¨oller, 2000], and to TBoxes allowing general sets of inclusion axioms and more [Buchheit et al., 1993a; Baader et al., 1996]. In the second subsection, we will first present a tableau-based satisfiability algorithm for ALCN -concepts, then show how it can be extended to an algorithm for the consistency problem for ABoxes, and finally explain how general inclusion axioms can be taken into account. The third subsection is concerned with reasoning w.r.t. acyclic and cyclic terminologies. Instead of designing new algorithms for reasoning in Description Logics, one can also try to reduce the problem to a known inference problem in logics (see also Chapter 4). For example, decidability of the inference problems for ALC and many other Description Logics can be obtained as a consequence of the known decidability result for the two-variable fragment of first-order predicate logic. The language L2 consists of all formulae of first-order predicate logic that can be built with the help of predicate symbols (including equality) and constant symbols (but without function symbols) using only the variables x, y. Decidability of L2 has been shown in [Mortimer, 1975]. It is easy to see that, by appropriately re-using variable names, any concept description of the language ALC can be translated into an L2 -formula with one free variable (see [Borgida, 1996] for details). A direct translation of the concept description ∀R.(∃R.A) yields the formula ∀y.(R(x, y) → (∃z.(R(y, z) ∧ A(z)))). Since the subformula ∃z.(R(y, z) ∧ A(z)) does not contain x, this variable can be re-used: renaming the bound variable z to x yields the equivalent formula ∀y.(R(x, y) → (∃x.(R(y, x) ∧ A(x)))), which uses only two variables. This connection between ALC and L2 shows that any extension of ALC by constructors that can be expressed with the help of only two variables yields a decidable Description Logic. Number restrictions and composition of roles are examples of constructors that cannot be expressed within L2 . Number restrictions can, however, be expressed in C 2 , the extension of L2 by counting quantifiers, which has recently been shown to be decidable [Gr¨adel et al., 1997b; Pacholski et al., 1997]. It should be noted, however, that the complexity of the decision procedures obtained this way is usually higher than necessary: for example, the satisfiability problem for L2 is NExpTime-complete, whereas satisfiability of ALCconcept descriptions is “only” PSpace-complete. Decision procedures with lower complexity can be obtained by using the connection between Description Logics and propositional modal logics. Schild [1991] was the first to observe that the language ALC is a syntactic variant of the propositional multi-modal logic K, and that the extension of ALC by transitive closure of roles [Baader, 1991] corresponds to Propositional Dynamic Logic (pdl). In particular, some of the algorithms used in propositional modal logics for deciding satisfiability are very similar to the tableau-based algorithms newly developed
76
F. Baader and W. Nutt
for Description Logics. This connection between Description Logics and modal logics has been used to transfer decidability results from modal logics to Description Logics [Schild, 1993; 1994; De Giacomo and Lenzerini, 1994a; 1994b] (see also Chapter 5). Instead of using tableau-based algorithms, decidability of certain propositional modal logics (and thus of the corresponding Description Logics) can also be shown by establishing the finite model property (see, e.g., [Fitting, 1993], Section 1.14) of the logic (i.e., showing that a formula or concept is satisfiable iff it is satisfiable in a finite interpretation) or by employing tree automata (see, e.g., [Vardi and Wolper, 1986]). 2.3.1 Structural subsumption algorithms These algorithms usually proceed in two phases. First, the descriptions to be tested for subsumption are normalized, and then the syntactic structure of the normal forms is compared. For simplicity, we first explain the ideas underlying this approach for the small language FL0 , which allows conjunction (C D) and value restrictions (∀R.C). Subsequently, we show how the bottom concept (⊥), atomic negation (¬A), and number restrictions ( n R and n R) can be handled. Evidently, FL0 and its extension by bottom and atomic negation are sublanguages of AL, while adding number restrictions to the resulting language yields the Description Logic ALN . An FL0 -concept description is in normal form iff it is of the form A1 · · · Am ∀R1 .C1 · · · ∀Rn .Cn , where A1 , . . . , Am are distinct concept names, R1 , . . . , Rn are distinct role names, and C1 , . . . , Cn are FL0 -concept descriptions in normal form. It is easy to see that any description can be transformed into an equivalent one in normal form, using associativity, commutativity and idempotence of , and the fact that the descriptions ∀R.(C D) and (∀R.C) (∀R.D) are equivalent. Proposition 2.19 Let A1 · · · Am ∀R1 .C1 · · · ∀Rn .Cn be the normal form of the FL0 -concept description C, and B1 · · · Bk ∀S1 .D1 · · · ∀Sl .Dl the normal form of the FL0 -concept description D. Then C D iff the following two conditions hold: (i) for all i, 1 ≤ i ≤ k, there exists j, 1 ≤ j ≤ m such that Bi = A j . (ii) For all i, 1 ≤ i ≤ l, there exists j, 1 ≤ j ≤ n such that Si = R j and C j Di .
2
Basic Description Logics
77
It is easy to see that this characterization of subsumption is sound (i.e., the “if” direction of the proposition holds) and complete (i.e., the “only if” direction of the proposition holds as well). This characterization yields an obvious recursive algorithm for computing subsumption, which can easily be shown to be of polynomial time complexity [Levesque and Brachman, 1987]. If we extend FL0 by language constructors that can express unsatisfiable concepts, then we must, on the one hand, change the definition of the normal form. On the other hand, the structural comparison of the normal forms must take into account that an unsatisfiable concept is subsumed by every concept. The simplest Description Logic where this occurs is FL⊥ , the extension of FL0 by the bottom concept ⊥. An FL⊥ -concept description is in normal form iff it is ⊥ or of the form A1 · · · Am ∀R1 .C1 · · · ∀Rn .Cn , where A1 , . . . , Am are distinct concept names different from ⊥, R1 , . . . , Rn are distinct role names, and C1 , . . . , Cn are FL⊥ -concept descriptions in normal form. Again, such a normal form can easily be computed. In principle, one just computes the FL0 -normal form of the description (where ⊥ is treated as an ordinary concept name): B1 · · · Bk ∀R1 .D1 · · · ∀Rn .Dn . If one of the Bi s is ⊥, then replace the whole description by ⊥. Otherwise, apply the same procedure recursively to the D j s. For example, the FL0 -normal form of ∀R.∀R.B A ∀R.(A ∀R.⊥) is A ∀R.(A ∀R.(B ⊥)), which yields the FL⊥ -normal form A ∀R.(A ∀R.⊥). The structural subsumption algorithm for FL⊥ works just like the one for FL0 , with the only difference that ⊥ is subsumed by any description. For example, ∀R.∀R.B A ∀R.(A ∀R.⊥) ∀R.∀R.A A ∀R.A since the recursive comparison of their FL⊥ -normal forms A ∀R.(A ∀R.⊥) and A ∀R.(A ∀R.A) finally leads to the comparison of ⊥ and A. The extension of FL⊥ by atomic negation (i.e., negation applied to concept names only) can be treated similarly. During the computation of the normal form, negated concept names are just treated like concept names. If, however, a name and its negation occur on the same level of the normal form, then ⊥ is added, which can then be treated as described above. For example, ∀R.¬A A ∀R.(A ∀R.B) is first transformed into A ∀R.(A ¬A ∀R.B), then into A ∀R.(⊥ A ¬A ∀R.B), and finally into A ∀R.⊥. The structural comparison of the normal forms treats negated concept names just like concept names.
78
F. Baader and W. Nutt
Finally, if we consider the language ALN , the additional presence of number restrictions leads to a new type of conflict. On the one hand, as in the case of atomic negation, number restrictions may be in conflict with each other (e.g., 2 R and 1 R). On the other hand, at-least restrictions n R for n ≥ 1 are in conflict with value restrictions ∀R.⊥ that prohibit role successors. When computing the normal form, one can again treat number restrictions like concept names, and then take care of the new types of conflicts by introducing ⊥ and using it for normalization as described above. During the structural comparison of normal forms, one must also take into account inherent subsumption relationships between number restrictions (e.g., n R m R iff n ≥ m). A more detailed description of a structural subsumption algorithm working on a graph-like data structure for a language extending ALN can be found in [Borgida and Patel-Schneider, 1994]. For larger Description Logics, structural subsumption algorithms usually fail to be complete. In particular, they cannot treat disjunction, full negation, and full existential restriction ∃R.C. For languages including these constructors, the tableau approach to designing subsumption algorithms has turned out to be quite useful. 2.3.2 Tableau algorithms Instead of directly testing subsumption of concept descriptions, these algorithms use negation to reduce subsumption to (un)satisfiability of concept descriptions: as we have seen in Subsection 2.2.4, C D iff C ¬D is unsatisfiable. Before describing a tableau-based satisfiability algorithm for ALCN in more detail, we illustrate the underlying ideas by two simple examples. Let A, B be concept names, and let R be a role name. As a first example, assume that we want to know whether (∃R.A) (∃R.B) is subsumed by ∃R.(A B). This means that we must check whether the concept description C = (∃R.A) (∃R.B) ¬(∃R.(A B)) is unsatisfiable. First, we push all negation signs as far as possible into the description, using De Morgan’s rules and the usual rules for quantifiers. As a result, we obtain the description C0 = (∃R.A) (∃R.B) ∀R.(¬A ¬B), which is in negation normal form, i.e., negation occurs only in front of concept names. Then, we try to construct a finite interpretation I such that C0I = ∅. This means that there must exist an individual in I that is an element of C0I .
2
Basic Description Logics
79
The algorithm just generates such an individual, say b, and imposes the constraint b ∈ C0I on it. Since C0 is the conjunction of three concept descriptions, this means that b must satisfy the following three constraints: b ∈ (∃R.A)I , b ∈ (∃R.B)I , and b ∈ (∀R.(¬A ¬B))I . From b ∈ (∃R.A)I we can deduce that there must exist an individual c such that (b, c) ∈ R I and c ∈ AI . Analogously, b ∈ (∃R.B)I implies the existence of an individual d with (b, d) ∈ R I and d ∈ B I . In this situation, one should not assume that c = d since this would possibly impose too many constraints on the individuals newly introduced to satisfy the existential restrictions on b. Thus: r For any existential restriction the algorithm introduces a new individual as role filler, and this individual must satisfy the constraints expressed by the restriction.
Since b must also satisfy the value restriction ∀R.(¬A ¬B), and c, d were introduced as R-fillers of b, we obtain the additional constraints c ∈ (¬A ¬B)I and d ∈ (¬A ¬B)I . Thus: r The algorithm uses value restrictions in interaction with already defined role relationships to impose new constraints on individuals.
Now c ∈ (¬A ¬B)I means that c ∈ (¬A)I or c ∈ (¬B)I , and we must choose one of these possibilities. If we assume c ∈ (¬A)I , this clashes with the other constraint c ∈ AI , which means that this search path leads to an obvious contradiction. Thus we must choose c ∈ (¬B)I . Analogously, we must choose d ∈ (¬A)I in order to satisfy the constraint d ∈ (¬A ¬B)I without creating a contradiction to d ∈ B I . Thus: r For disjunctive constraints, the algorithm tries both possibilities in successive attempts. It must backtrack if it reaches an obvious contradiction, i.e., if the same individual must satisfy constraints that are obviously conflicting.
In the example, we have now satisfied all the constraints without encountering an obvious contradiction. This shows that C0 is satisfiable, and thus (∃R.A) (∃R.B) is not subsumed by ∃R.(A B). The algorithm has generated an interpretation I as witness for this fact: I = {b, c, d}; R I = {(b, c), (b, d)}; AI = {c} and B I = {d}. For this interpretation, b ∈ C0I . This means that b ∈ ((∃R.A) (∃R.B))I , but b ∈ (∃R.(A B))I . In our second example, we add a number restriction to the first concept of the above example, i.e., we now want to know whether (∃R.A) (∃R.B) 1 R is subsumed by ∃R.(A B). Intuitively, the answer should now be “yes” since 1 R in the first concept ensures that the R-filler in A coincides with the R-filler in B, and thus there is an R-filler in A B. The tableau-based satisfiability algorithm first proceeds as above, with the only difference that there is the additional constraint
80
F. Baader and W. Nutt
b ∈ ( 1 R)I . In order to satisfy this constraint, the two R-fillers c, d of b must be identified with each other. Thus: r If an at-most number restriction is violated then the algorithm must identify different role fillers.
In the example, the individual c = d must belong to both AI and B I , which together with c = d ∈ (¬A ¬B)I always leads to a clash. Thus, the search for a counterexample to the subsumption relationship fails, and the algorithm concludes that (∃R.A) (∃R.B) 1 R ∃R.(A B). 2.3.2.1 A tableau-based satisfiability algorithm for ALCN Before we can describe the algorithm more formally, we need to introduce an appropriate data structure in which to represent constraints like “a belongs to (the interpretation of) C” and “b is an R-filler of a”. The original paper by SchmidtSchauß and Smolka [1991], and also many other papers on tableau algorithms for Description Logics, introduce the new notion of a constraint system for this purpose. However, if we look at the types of constraints that must be expressed, we see that they can actually be represented by ABox assertions. As we have seen in the second example above, the presence of at-most number restrictions may lead to the identification of different individual names. For this reason, we will not impose the unique name assumption on the ABoxes considered by the algorithm. Instead, we . allow explicit inequality assertions of the form x = y for individual names x, y, . with the obvious semantics that an interpretation I satisfies x = y iff x I = y I . . These assertions are assumed to be symmetric, i.e., saying that x = y belongs to . an ABox A is the same as saying that y = x belongs to A. Let C0 by an ALCN -concept in negation normal form. In order to test satisfiability of C0 , the algorithm starts with the ABox A0 = {C0 (x0 )}, and applies consistency-preserving transformation rules (see Figure 2.6) to the ABox until no more rules apply. If the “complete” ABox obtained this way does not contain an obvious contradiction (called clash), then A0 is consistent (and thus C0 is satisfiable), and inconsistent (unsatisfiable) otherwise. The transformation rules that handle disjunction and at-most restrictions are non-deterministic in the sense that a given ABox is transformed into finitely many new ABoxes such that the original ABox is consistent iff one of the new ABoxes is so. For this reason we will consider finite sets of ABoxes S = {A1 , . . . , Ak } instead of single ABoxes. Such a set is consistent iff there is some i, 1 ≤ i ≤ k, such that Ai is consistent. A rule of Figure 2.6 is applied to a given finite set of ABoxes S as follows: it takes an element A of S, and replaces it by one ABox A , by two ABoxes A and A , or by finitely many ABoxes Ai, j . The following lemma is an easy consequence of the definition of the transformation rules:
2
Basic Description Logics
81
The → -rule Condition A contains (C1 C2 )(x), but it does not contain both C1 (x) and C2 (x). Action A = A ∪ {C1 (x), C2 (x)}. The → -rule Condition A contains (C1 C2 )(x), but neither C1 (x) nor C2 (x). Action A = A ∪ {C1 (x)}, A = A ∪ {C2 (x)}. The →∃ -rule Condition A contains (∃R.C)(x), but there is no individual name z such that C(z) and R(x, z) are in A. Action A = A ∪ {C(y), R(x, y)} where y is an individual name not occurring in A. The →∀ -rule Condition A contains (∀R.C)(x) and R(x, y), but it does not contain C(y). Action A = A ∪ {C(y)}. The →≥ -rule Condition A contains ( n R)(x), and there are no individual names z1 , . . . , zn such . that R(x, zi ) (1 ≤ i ≤ n) and zi = zj (1 ≤ i < j ≤ n) are contained in A. . Action A = A ∪ {R(x, yi ) | 1 ≤ i ≤ n} ∪ {yi = yj | 1 ≤ i < j ≤ n}, where y1 , . . . , yn are distinct individual names not occurring in A. The →≤ -rule Condition A contains distinct individual names y1 , . . . , yn+1 such that ( n R)(x) . and R(x, y1 ), . . . , R(x, yn+1 ) are in A, and yi = yj is not in A for some i = j. . yj is not in A, the ABox Action For each pair yi , yj such that i > j and yi = Ai,j = [yi /yj ]A is obtained from A by replacing each occurrence of yi by yj .
Fig. 2.6. Transformation rules of the satisfiability algorithm.
Lemma 2.20 (Soundness) Assume that S is obtained from the finite set of ABoxes S by application of a transformation rule. Then S is consistent iff S is consistent. The second important property of the set of transformation rules is that the transformation process always terminates: Lemma 2.21 (Termination) Let C0 be an ALCN -concept description in negation normal form. There cannot be an infinite sequence of rule applications {{C0 (x0 )}} → S1 → S2 → · · · . The main reasons for this lemma to hold are the following.6 Lemma 2.22 Let A be an ABox contained in Si for some i ≥ 1. r For every individual x = x occurring in A, there is a unique sequence R , . . . , R 0 1 l (l ≥ 1) of role names and a unique sequence x1 , . . . , xl−1 of individual names such that {R1 (x0 , x1 ), R2 (x1 , x2 ), . . . , Rl (xl−1 , x)} ⊆ A. In this case, we say that x occurs on level l in A. 6
A detailed proof of termination for a set of rules extending the one of Figure 2.6 can be found in [Baader and Sattler, 1999]. A termination proof for a slightly different set of rules has been given in [Donini et al., 1997a].
82
F. Baader and W. Nutt
r If C(x) ∈ A for an individual name x on level l, then the maximal role depth of C (i.e., the maximal nesting of constructors involving roles) is bounded by the maximal role depth of C0 minus l. Consequently, the level of any individual in A is bounded by the maximal role depth of C0 . r If C(x) ∈ A, then C is a subdescription of C . Consequently, the number of different 0 concept assertions on x is bounded by the size of C0 . r The number of different role successors of x in A (i.e., individuals y such that R(x, y) ∈ A for a role name R) is bounded by the sum of the numbers occurring in at-least restrictions in C0 plus the number of different existential restrictions in C0 .
Starting with {{C0 (x0 )}}, we thus obtain after a finite number of rule applications a set of ABoxes S to which no more rules apply. An ABox A is called complete iff none of the transformation rules applies to it. Consistency of a set of complete ABoxes can be decided by looking for obvious contradictions, called clashes. The ABox A contains a clash iff one of the following three situations occurs: (i) {⊥(x)} ⊆ A for some individual name x; (ii) {A(x), ¬A(x)} ⊆ A for some individual name x and some concept name A; . y j | 1 ≤ i < j ≤ n + 1} ⊆ A for (iii) {( n R)(x)} ∪ {R(x, yi ) | 1 ≤ i ≤ n + 1} ∪ {yi = individual names x, y1 , . . . , yn+1 , a nonnegative integer n, and a role name R.
Obviously, an ABox that contains a clash cannot be consistent. Hence, if all the ABoxes in S contain a clash, then S is inconsistent, and thus by the soundness lemma {C0 (x0 )} is inconsistent as well. Consequently, C0 is unsatisfiable. If, however, one of the complete ABoxes in S is clash-free, then S is consistent. By soundness of the rules, this implies consistency of {C0 (x0 )}, and thus satisfiability of C0 . Lemma 2.23 (Completeness) Any complete and clash-free ABox A has a model. This lemma can be proved by defining the canonical interpretation IA induced by A: (i) the domain IA of IA consists of all the individual names occurring in A; (ii) for all atomic concepts A we define AIA = {x | A(x) ∈ A}; (iii) for all atomic roles R we define R IA = {(x, y) | R(x, y) ∈ A}.
By definition, IA satisfies all the role assertions in A. By induction on the structure of concept descriptions, it is easy to show that it satisfies the concept assertions . as well. The inequality assertions are satisfied since x = y ∈ A only if x, y are different individual names. The facts stated in Lemma 2.22 imply that the canonical interpretation has the shape of a finite tree whose depth is linearly bounded by the size of C0 and whose branching factor is bounded by the sum of the numbers occurring in at-least
2
Basic Description Logics
83
restrictions in C0 plus the number of different existential restrictions in C0 . Consequently, ALCN has the finite tree model property, i.e., any satisfiable concept C0 is satisfiable in a finite interpretation I that has the shape of a tree whose root belongs to C0 . To sum up, we have seen that the transformation rules of Figure 2.6 reduce satisfiability of an ALCN -concept C0 (in negation normal form) to consistency of a finite set S of complete ABoxes. In addition, consistency of S can be decided by looking for obvious contradictions (clashes). Theorem 2.24 It is decidable whether or not an ALCN -concept is satisfiable. 2.3.2.2 Complexity issues The tableau-based satisfiability algorithm for ALCN presented above may need exponential time and space. In fact, the size of the canonical interpretation built by the algorithm may be exponential in the size of the concept description. For example, consider the descriptions Cn (n ≥ 1), which are inductively defined as follows: C1 Cn+1
= =
∃R.A ∃R.B, ∃R.A ∃R.B ∀R.Cn .
Obviously, the size of Cn grows linearly in n. However, given the input description Cn , the satisfiability algorithm introduced above generates a complete and clash-free ABox whose canonical model is the full binary tree of depth n, and thus consists of 2n+1 − 1 individuals. Nevertheless, the satisfiability algorithm can be modified such that it needs only polynomial space. The main reason is that different branches of the tree model to be generated by the algorithm can be investigated separately. Since the complexity class NPSpace coincides with PSpace [Savitch, 1970], it is sufficient to describe a non-deterministic algorithm using only polynomial space, i.e., for every non-deterministic rule we may simply assume that the algorithm chooses the correct alternative. In principle, the modified algorithm works as follows: it starts with {C0 (x0 )} and (i) applies the → - and → -rules as long as possible, and checks for clashes of the form A(x0 ), ¬A(x0 ) and ⊥(x0 ); (ii) generates all the necessary direct successors of x0 using the →∃ - and the →≥ -rule; (iii) generates the necessary identifications of these direct successors using the →≤ -rule, and checks for clashes caused by at-most restrictions; (iv) successively handles the successors in the same way.
Since after identification the remaining successors can be treated separately, the algorithm needs to store only one path of the tree model to be generated, together
84
F. Baader and W. Nutt
with the direct successors of the individuals on this path and the information which of these successors must be investigated next. We already know that the length of the path is linear in the size of the input description C0 . Thus, the only remaining obstacle on our way to a PSpace-algorithm is the fact that the number of direct successors of an individual on the path also depends on the numbers in the at-least restrictions. If we assumed these numbers to be written in base 1 representation (where the size of the representation coincides with the number represented), this would not be a problem. However, for bases larger than 1 (e.g., numbers in decimal notation), the number represented may be exponential in the size of the representation. For example, the representation of 10n − 1 requires only n digits in base 10 representation. Thus, we cannot introduce all the successors required by at-least restrictions while only using polynomial space in the size of the concept description if the numbers in this description are written in decimal notation. It turns out, however, that most of the successors required by the at-least restrictions need not be introduced at all. If an individual x obtains at least one R-successor due to the application of the →∃ -rule, then the →≥ -rule need not be applied to x for the role R. Otherwise, we simply introduce one R-successor as representative. In order to detect inconsistencies due to conflicting number restrictions, we need to add a new type of clash: {( n R)(x), ( m R)(x)} ⊆ A for nonnegative integers n < m. The canonical interpretation obtained by this modified algorithm need not satisfy the at-least restrictions in C0 . However, it can easily be modified to an interpretation that does, by duplicating R-successors (more precisely, the whole subtrees starting at these successors). Theorem 2.25 Satisfiability of ALCN -concept descriptions is PSpace-complete. The above argument shows that the problem is in PSpace. The hardness result follows from the fact that the satisfiability problem is already PSpace-hard for the sublanguage ALC, which can be shown by a reduction from validity of Quantified Boolean Formulae [Schmidt-Schauß and Smolka, 1991]. Since subsumption and satisfiability of ALCN -concept descriptions can be reduced to each other in linear time, this also shows that subsumption of ALCN -concept descriptions is PSpacecomplete. 2.3.2.3 Extension to the consistency problem for ABoxes The tableau-based satisfiability algorithm described in Subsection 2.3.2.1 can easily be extended to an algorithm that decides consistency of ALCN -ABoxes. Let A be an ALCN -ABox such that (w.l.o.g.) all concept descriptions in A are in negation . normal form. To test A for consistency, we first add inequality assertions a = b for
2
Basic Description Logics
85
every pair of distinct individual names a, b occurring in A.7 Let A0 be the ABox obtained this way. The consistency algorithm applies the rules of Figure 2.6 to the singleton set {A0 }. Soundness and completeness of the rule set can be shown as before. Unfortunately, the algorithm need not terminate, unless one imposes a specific strategy on the order of rule applications. For example, consider the ABox A0 = {R(a, a), (∃R.A)(a), ( 1 R)(a), (∀R.∃R.A)(a)}. By applying the →∃ -rule to a, we can introduce a new R-successor x of a: A1 = A0 ∪ {R(a, x), A(x)}. The →∀ -rule adds the assertion (∃R.A)(x), which triggers an application of the →∃ -rule to x. Thus, we obtain the new ABox A2 = A1 ∪ {(∃R.A)(x), R(x, y), A(y)}. Since a has two R-successors in A2 , the →≤ -rule is applicable to a. By replacing every occurrence of x by a, we obtain the ABox A3 = A0 ∪ {A(a), R(a, y), A(y)}. Except for the individual names (and the assertion A(a), which is, however, irrelevant), A3 is identical to A1 . For this reason, we can continue as above to obtain an infinite chain of rule applications. We can easily regain termination by requiring that generating rules (i.e., the rules →∃ and →≥ ) may only be applied if none of the other rules is applicable. In the above example, this strategy would prevent the application of the →∃ -rule to x in the ABox A1 ∪ {(∃R.A)(x)} since the →≤ -rule is also applicable. After applying the →≤ -rule (which replaces x by a), the →∃ -rule is no longer applicable since a already has an R-successor that belongs to A. Using a similar idea, one can reduce the consistency problem for ALCN -ABoxes to satisfiability of ALCN -concept descriptions [Hollunder, 1996]. In principle, this reduction works as follows: In a preprocessing step, one applies the transformation rules only to old individuals (i.e., individuals present in the original ABox). Subsequently, one can forget about the role assertions, i.e., for each individual name in the preprocessed ABox, the satisfiability algorithm is applied to the conjunction of its concept assertions (see [Hollunder, 1996] for details). Theorem 2.26 Consistency of ALCN -ABoxes is PSpace-complete. 7
This takes care of the UNA.
86
F. Baader and W. Nutt
2.3.2.4 Extension to general inclusion axioms In the above subsections, we have considered the satisfiability problem for concept descriptions and the consistency problem for ABoxes without an underlying TBox. In fact, for acyclic TBoxes one can simply expand the definitions (see Subsection 2.2.4). Expansion is, however, no longer possible if one allows general inclusion axioms of the form C D, where C and D may be complex descriptions. Instead of considering finitely many such axioms C1 D1 , . . . , Cn Dn , it where is sufficient to consider the single axiom C, = (¬C1 D1 ) · · · (¬Cn Dn ). C simply says that any individual must belong to the concept C. The axiom C The tableau algorithm introduced above can easily be modified such that it takes this axiom into account: all individuals (both the original individuals and the ones newly generated by the →∃ -rule and the →≥ -rule) are simply asserted to belong to C. However, this modification may obviously lead to nontermination of the algorithm. For example, consider what happens if this algorithm is applied to test consistency of the ABox A0 = {A(x0 ), (∃R.A)(x0 )} w.r.t. the axiom ∃R.A: the algorithm generates an infinite sequence of ABoxes A1 , A2 , . . . and individuals x1 , x2 , . . . such that Ai+1 = Ai ∪ {R(xi , xi+1 ), A(xi+1 ), (∃R.A)(xi+1 )}. Since all individuals xi receive the same concept assertions as x0 , we may say that the algorithms has run into a cycle. Termination can be regained by trying to detect such cyclic computations, and then blocking the application of generating rules: the application of the rules →∃ and →≥ to an individual x is blocked by an individual y in an ABox A iff {D | D(x) ∈ A} ⊆ {D | D (y) ∈ A}. The main idea underlying blocking is that the blocked individual x can use the role successors of y instead of generating new ones. For example, instead of generating a new R-successor for x1 in the above example, one can simply use the R-successor of x0 . This yields an interpretation I with I = {x0 , x1 }, AI = I , and R I = {(x0 , x1 ), (x1 , x1 )}. Obviously, I is a model of A0 and of the axiom ∃R.A. To avoid cyclic blocking (of x by y and vice versa), we consider an enumeration of all individual names, and define that an individual x may only be blocked by individuals y that occur before x in this enumeration. This, together with some other technical assumptions, makes sure that an algorithm using this notion of blocking is sound and complete as well as terminating (see [Buchheit et al., 1993a; Baader et al., 1996] for details). Thus, consistency of ALCN -ABoxes w.r.t. general inclusion axioms is decidable. It should be noted that the algorithm is no longer in PSpace since it may generate role paths of exponential length before blocking occurs. In fact, even for the language ALC, satisfiability w.r.t. a single general
2
Basic Description Logics
87
inclusion axiom is known to be ExpTime-hard [Schild, 1994] (see also Chapter 3). The tableau-based algorithm sketched above is a NExpTime algorithm. However, using the translation technique mentioned at the beginning of this section, it can be shown [De Giacomo, 1995] that ALCN -ABoxes and general inclusion axioms can be translated into pdl, for which satisfiability can be decided in exponential time. An ExpTime tableau algorithm for ALC with general inclusion axioms was described by Donini and Massacci [2000]. Theorem 2.27 Consistency of ALCN -ABoxes w.r.t. general inclusion axioms is ExpTime-complete. 2.3.2.5 Extension to other language constructors The tableau-based approach to designing concept satisfiability and ABox consistency algorithms can also be employed for languages with other concept and/or role constructors. In principle, each new constructor requires a new rule, and this rule can usually be obtained by simply considering the semantics of the constructor. Soundness of such a rule is often very easy to show. More problematic are completeness and termination since they must also take interactions between different rules into account. As we have seen above, termination can sometimes only be obtained if the application of rules is restricted by an appropriate strategy. Of course, one may only impose such a strategy if one can show that it does not destroy completeness.
2.3.3 Reasoning w.r.t. terminologies Recall that terminologies (TBoxes) are sets of concept definitions (i.e., equalities of the form A ≡ C where A is atomic) such that every atomic concept occurs at most once as a left-hand side. We will first comment briefly on the complexity of reasoning w.r.t. acyclic terminologies, and then consider in more detail reasoning w.r.t. cyclic terminologies. 2.3.3.1 Acyclic terminologies As shown in Subsection 2.2.4, reasoning w.r.t. acyclic terminologies can be reduced to reasoning without terminologies by first expanding the TBox, and then replacing name symbols by their definitions in the terminology. Unfortunately, since the expanded TBox may be exponentially larger than the original one [Nebel, 1990b], this increases the complexity of reasoning. Nebel [1990b] also shows that this complexity can, in general, not be avoided: for the language FL0 , subsumption between concept descriptions can be tested in polynomial time (see Subsection 2.3.1),
88
F. Baader and W. Nutt
whereas subsumption w.r.t. acyclic terminologies is conp-complete (see also Subsection 2.3.3.2 below). For more expressive languages, the presence of acyclic TBoxes may or may not increase the complexity of the subsumption problem. For example, subsumption of concept descriptions in the language ALC is PSpace-complete, and so is subsumption w.r.t. acyclic terminologies [Lutz, 1999a]. Of course, in order to obtain a PSpace-algorithm for subsumption in ALC w.r.t. acyclic TBoxes, one cannot first expand the TBox completely since this might need exponential space. The main idea is that one uses a tableau-based algorithm like the one described in Subsection 2.3.2, with the difference that it receives concept descriptions containing name symbols as input. Expansion is then done on demand: if the tableau-based algorithm encounters an assertion of the form A(x), where A is a name occurring on the left-hand side of a definition A ≡ C in the TBox, then it adds the assertion C(x). However, it does not further expand C at this stage. It is not hard to show that this really yields a PSpace-algorithm for satisfiability (and thus also for subsumption) of concepts w.r.t. acyclic TBoxes in ALC [Lutz, 1999a]. There are, however, extensions of ALC for which this technique no longer works. One such example is the language ALCF, which extends ALC by functional roles as well as agreements and disagreements on chains of functional roles (see Section 2.4 below). Satisfiability of concepts is PSpace-complete for this language [Hollunder and Nutt, 1990], but satisfiability of concepts w.r.t. acyclic terminologies is NExpTime-complete [Lutz, 1999a]. 2.3.3.2 Cyclic terminologies For cyclic terminologies, expansion is no longer possible since it would not terminate. If we use descriptive semantics, then cyclic terminologies are a special case of terminologies with general inclusion axioms. Thus, the tableau-based algorithm for handling general inclusion axioms introduced in Subsection 2.3.2.4 can also be used for cyclic ALCN -TBoxes with descriptive semantics. For cyclic ALC-TBoxes with fixpoint semantics, the connection between Description Logics and propositional modal logics turns out to be useful. In fact, syntactically monotone ALCTBoxes with least or greatest fixpoint semantics can be expressed within the propositional µ-calculus, which is an extension of the propositional multi-modal logic Km by fixpoint operators (see [Schild, 1994; De Giacomo and Lenzerini, 1994b; 1997] and Chapter 5 for details). Since reasoning w.r.t. general inclusion axioms in ALC and reasoning in the propositional µ-calculus are both ExpTime-complete, these reductions yield an ExpTime upper bound for reasoning w.r.t. cyclic terminologies in sublanguages of ALC. For less expressive Description Logics, more efficient algorithms can, however, be obtained with the help of techniques based on finite automata. Following [Baader,
2
Basic Description Logics
89
1996b], we will sketch these techniques for the small language FL0 . The results can, however, be extended to the language ALN [K¨usters, 1998]. We will develop the results for FL0 in two steps, starting with an alternative characterization of subsumption between FL0 -concept descriptions, and then extending this characterization to cyclic TBoxes with greatest fixpoint semantics. Baader [1996b] also considers cyclic FL0 -TBoxes with descriptive and with least fixpoint semantics. For these semantics, the characterization of subsumption is more involved; in particular, the characterization of subsumption w.r.t. descriptive semantics depends on finite automata working on infinite words, so-called B¨uchi automata. Acyclic TBoxes can be seen as a special case of cyclic TBoxes, where all three types of semantics coincide. In Subsection 2.3.1, the equivalence (∀R.C) (∀R.D) ≡ ∀R.(C D) was used as a rewrite rule from left to right in order to compute the structural subsumption normal form of FL0 -concept descriptions. If we use this rule in the opposite direction, we obtain a different normal form, which we call concept-centered normal form since it groups the concept description w.r.t. concept names (and not w.r.t. role names, as the structural subsumption normal form does). Using this rule, any FL0 -concept description can be transformed into an equivalent description that is a conjunction of descriptions of the form ∀R1 . · · · ∀Rm .A for m ≥ 0 (not necessarily distinct) role names R1 , . . . , Rm and a concept name A. We abbreviate ∀R1 . · · · ∀Rm .A by ∀R1 · · · Rm .A, where R1 · · · Rm is viewed as a word over the alphabet of all role names. In addition, instead of ∀w1 .A · · · ∀wl .A we write ∀L .A where L = {w1 , . . . , wl } is a finite set of words over . The term ∀∅.A is considered to be equivalent to the top concept , which means that it can be added to a conjunction without changing the meaning of the concept. Using these abbreviations, any pair of FL0 -concept descriptions C, D containing the concept names A1 , . . . , Ak can be rewritten as C ≡ ∀U1 .A1 · · · ∀Uk .Ak and D ≡ ∀V1 .A1 · · · ∀Vk .Ak , where Ui , Vi are finite sets of words over the alphabet of all role names. This normal form provides us with the following characterization of subsumption of FL0 -concept descriptions [Baader and Narendran, 1998]: C D iff Ui ⊇ Vi for all i, 1 ≤ i ≤ k. Since the size of the concept-based normal forms is polynomial in the size of the original descriptions, and since the inclusion tests Ui ⊇ Vi can also be realized in polynomial time, this yields a polynomial-time decision procedure for subsumption in FL0 . In fact, as shown in [Baader et al., 1998a], the structural subsumption algorithm for FL0 can be seen as a special implementation of these inclusion tests.
90
F. Baader and W. Nutt R A ≡ B ≡ C ≡
∀R.A ∀S.C ∀R.∀S.C P ∀S.C
A
S S
C
ε
P
RS B
Fig. 2.7. A TBox and the corresponding automaton.
This characterization of subsumption via inclusion of finite sets of words can be extended to cyclic TBoxes with greatest fixpoint semantics as follows. A given TBox T can be translated into a finite automaton8 AT whose states are the concept names occurring in T and whose transitions are induced by the value restrictions occurring in T (see Figure 2.7 for an example and [Baader, 1996b] for the formal definition). For a name symbol A and a base symbol P in T , the language L AT (A, P) is the set of all words labeling paths in AT from A to P. The languages L AT (A, P) represent all the value restrictions that must be satisfied by instances of the concept A. With this intuition in mind, the following characterization of subsumption w.r.t. cyclic FL0 -TBoxes with greatest fixpoint semantics should not be surprising: A T B iff L AT (A, P) ⊇ L AT (B, P) for all base symbols P. In the example of Fig. 2.7, we have L AT (A, P) = R ∗ SS ∗ ⊃ RSS ∗ = L AT (B, P), and thus A T B, but not B T A. Obviously, the languages L AT (A, P) are regular, and any regular language can be obtained as such a language. Since inclusion of regular languages is a PSpacecomplete problem [Garey and Johnson, 1979], this shows that subsumption w.r.t. cyclic FL0 -TBoxes with greatest fixpoint semantics is PSpace-complete [Baader, 1996b]. For an acyclic terminology T , the automaton AT is acyclic as well. Since inclusion of languages accepted by acyclic finite automata is conp-complete, this proves Nebel’s result that subsumption w.r.t. acyclic FL0 -TBoxes is conp-complete [Nebel, 1990b]. 2.4 Language extensions In Section 2.2 we have introduced the language ALCN as a prototypical Description Logic. For many applications, the expressive power of ALCN is not sufficient. For this reason, various other language constructors have been introduced in the literature and are employed by systems. Roughly, these language extensions can be put into two categories, which (for lack of a better name) we will call “classical” 8
Strictly speaking, we obtain a finite automaton with word transitions, i.e., transitions that may be labeled by a word over rather than a letter of .
2
Basic Description Logics
91
and “nonclassical” extensions. Intuitively, a classical extension is one whose semantics can easily be defined within the model-theoretic framework introduced in Section 2.2, whereas defining the semantics of a nonclassical constructor is more problematic and requires an extension of the model-theoretic framework (such as the semantics of the epistemic operator K introduced in Subsection 2.2.5). In this section, we briefly introduce the most important classical extensions of Description Logics. Inference procedures for such expressive Description Logics are discussed in Chapter 5. Nonclassical extensions are the subject of Chapter 6. In addition to constructors that can be used to build complex roles, we will introduce more expressive number restrictions, and constructors that allow one to express relationships between the role-filler sets of different (complex) roles.
2.4.1 Role constructors Since roles are interpreted as binary relations, it is quite natural to employ the usual operations on binary relations (such as Boolean operators, composition, inverse, and transitive closure) as role-forming constructors. Syntax and semantics of these constructors can be defined as follows: Definition 2.28 (Role constructors) Every role name is a role description (atomic role), and if R, S are role descriptions, then R S (intersection), R S (union), ¬R (complement), R ◦ S (composition), R + (transitive closure), R − (inverse) are also role descriptions. A given interpretation I is extended to (complex) role descriptions as follows: (i) (ii) (iii) (iv)
(R S)I = R I ∩ S I , (R S)I = R I ∪ S I , (¬R)I = I × I \ R I ; (R ◦ S)I = {(a, c) ∈ I × I | ∃b. (a, b) ∈ R I ∧ (b, c) ∈ S I }; (R + )I = i≥1 (R I )i , i.e., (R + )I is the transitive closure of (R I ); (R − )I = {(b, a) ∈ I × I | (a, b) ∈ R I }.
For example, the union of the roles hasSon and hasDaughter can be used to define the role hasChild, and the transitive closure of hasChild expresses the role hasDescendants. The inverse of hasChild yields the role hasParent. The complexity of satisfiability and subsumption of concepts in the language ALCN (also called ALCN R in the literature), which extends ALCN by intersection of roles, has been investigated in [Donini et al., 1997a]. It is shown that these problems are still PSpace-complete, provided that the numbers occurring in number restrictions are written in base 1 representation (where the size of the representation coincides with the number represented). Tobies [2001b] shows that this result also holds for non-unary coding of numbers. Decidability of the
92
F. Baader and W. Nutt
extension of ALCN by the three Boolean operators and the inverse operator is an immediate consequence of the fact that concepts of the extended language can be expressed in C 2 , i.e., first-order predicate logic with two variables and counting quantifiers, which is known to be decidable in NExpTime [Gr¨adel et al., 1997b; Pacholski et al., 1997]. Lutz and Sattler [2000a] show that ALC extended by role complement is ExpTime-complete, whereas ALC extended by role intersection and (atomic) role complement is NExpTime-complete. In [Baader, 1991], the Description Logic ALC trans, which extends ALC by transitive closure, composition, and union of roles, has been introduced, and subsumption and satisfiability of ALC trans-concepts has been shown to be decidable. Schild’s observation [Schild, 1991] that ALC trans is just a syntactic variant of Propositional Dynamic Logic (pdl) [Fischer and Ladner, 1979] yields the exact complexity of subsumption and satisfiability in ALC trans: they are ExpTime-complete [Fischer and Ladner, 1979; Pratt, 1979; 1980]. The extension of ALC trans by the inverse constructor corresponds to converse pdl [Fischer and Ladner, 1979], which can also be shown to be decidable in deterministic exponential time [Vardi, 1985]. Whereas this extension of ALC trans does not change the properties of the obtained Description Logic in a significant way, things become more complex if both number restrictions and the inverse of roles are added to ALC trans. Whereas ALC trans and ALC trans with inverse still have the finite model property, ALC trans extended by inverse and number restrictions does not. Indeed, it is easy to see that the concept ¬A ∃R − .A ( 1 R) ∀(R − )+ .(∃R − .A ( 1 R)) is satisfiable in an infinite interpretation, but not in a finite one. Nevertheless, this Description Logic still has an ExpTime-complete subsumption and satisfiability problem. In fact, in [De Giacomo, 1995], number restrictions, the inverse of roles, and Boolean operators on roles are added to ALC trans, and ExpTime-decidability is shown by a rather ingenious reduction to the decision problem for ALC trans. It should be noted, however, that in this work only atomic roles and their inverse may occur in number restrictions, and that the complement of roles is built with respect to a fixed role any, which must contain all other roles, but need not be interpreted as the universal role (i.e., I × I ). As we shall see below, allowing more complex roles inside number restrictions may easily cause undecidability. 2.4.2 Expressive number restrictions There are three different ways in which the expressive power of number restrictions can be enhanced. First, one can consider so-called qualified number restrictions, where the number restrictions are concerned with role fillers belonging to a certain concept. For
2
Basic Description Logics
93
example, given the role hasChild, the simple number restrictions introduced above can only state that the number of all children is within certain limits, such as in the concept 2 hasChild 5 hasChild. Qualified number restrictions can also express that there are at least 2 sons and at most 5 daughters: 2 hasChild.Male 5 hasChild.Female.
Adding qualified number restrictions to ALC leaves the important inference problems (like subsumption and satisfiability of concepts, and consistency of ABoxes) decidable: the worst-case complexity is still PSpace-complete. Membership in PSpace was first shown for the case where numbers occurring in number restrictions are written in base 1 representation [Hollunder and Baader, 1991a; Hollunder, 1996]. More recently, this has been proved even for the case of binary (or, equivalently, decimal) representation of numbers [Tobies, 1999c; 2001b]. The language stays decidable if general sets of inclusion axioms are allowed [Buchheit et al., 1993a]. Second, one can allow complex role expressions inside number restrictions. As already mentioned above, allowing the three Boolean operators and the inverse operator in number restrictions of ALCN leaves us within C 2 , which is known to be decidable. In [Baader and Sattler, 1996b; 1999], languages that allow composition of roles in number restrictions have been considered.9 The extension of ALC by number restrictions involving composition has a decidable satisfiability and subsumption problem. On the other hand, if either number restrictions involving composition, union and inverse, or number restrictions involving composition and intersection are added, then satisfiability and subsumption become undecidable [Baader and Sattler, 1996b; 1999]. For ALC trans, the extension by number restrictions involving composition is already undecidable [Baader and Sattler, 1999]. Third, one can replace the explicit numbers n in number restrictions by variables α that stand for arbitrary nonnegative integers [Baader and Sattler, 1996a; 1999]. This allows one, for example, to define the concept of all persons having at least as many daughters as sons, without explicitly saying how many sons and daughters the person has: Person α hasDaughter α hasSon. The expressive power of this language can further be increased by introducing explicit quantification of the numeric variables. For example, it is important to know whether the numeric variables are introduced before or after a value restriction. This is illustrated by the following concept Person ↓α.(∀hasChild.( α hasChild α hasChild)), 9
Note that composition cannot be expressed within C 2 .
94
F. Baader and W. Nutt
in which introducing the numerical variable before the universal value restriction makes sure that all the children of the person have the same number of children. Here, ↓α stands for an existential quantification of α. Universal quantification of numerical variables comes in via negation. In [Baader and Sattler, 1996a; 1999] it is shown that ALCN extended by such symbolic number restrictions with universal and existential quantification of numerical variables has an undecidable satisfiability and subsumption problem. If one restricts this language to existential quantification of numerical variables and negation on atomic concepts, then satisfiability becomes decidable, but subsumption remains undecidable. 2.4.3 Role-value-maps Role-value-maps are a family of very expressive concept constructors, which were, however, available in the original Kl-One system. They allow one to relate the sets of role fillers of role chains. Definition 2.29 (Role-value-maps) A role chain is a composition R1 ◦ · · · ◦ Rn of role names. If R, S are role chains, then R ⊆ S and R = S are concepts (rolevalue-maps). The former is called a containment role-value-map, while the latter is called an equality role-value-map. A given interpretation I is extended to role-value-maps as follows: (i) (R ⊆ S)I = {a ∈ I | ∀b. (a, b) ∈ R I → (a, b) ∈ S I }, (ii) (R = S)I = {a ∈ I | ∀b. (a, b) ∈ R I ↔ (a, b) ∈ S I }.
For example, the concept Person (hasChild ◦ hasFriend ⊆ knows) describes the persons knowing all the friends of their children, and Person (marriedTo ◦ likesToEat = likesToEat) describes persons having the same favorite foods as their spouse. Unfortunately, in the presence of role-value-maps, the subsumption problem is undecidable, even if the language allows only conjunction and value restriction as additional constructors [Schmidt-Schauß, 1989] (see also Chapter 3). To avoid this problem, one may restrict attention to role chains of functional roles, also called attributes or features in the literature. An interpretation I interprets the role R as a functional role iff {(a, b), (a, c)} ⊆ R I implies b = c. In the following, we assume that the set of role names is partitioned into the set of functional roles and the set of ordinary roles. Any interpretation must interpret the functional roles
2
Basic Description Logics
95
as such. Usually, we write functional roles with small letters f, g, possibly with index. Definition 2.30 (Agreements) If f , g are role chains of functional roles, then . . f = g and f = g are concepts (agreement and disagreement). A given interpretation I is extended to agreements and disagreements as follows: . (i) ( f = g)I = {a ∈ I | ∃b. (a, b) ∈ f I ∧ (a, b) ∈ g I }, . (ii) ( f = g)I = {a ∈ I | ∃b1 , b2 . b1 = b2 ∧ (a, b1 ) ∈ f I ∧ (a, b2 ) ∈ g I }.
In the literature, the agreement constructor is sometimes also called the same-as constructor. Note that, since f , g are role chains between functional roles, there can be at most one role filler for a w.r.t. the respective role chain. Also note that the semantics of agreements and disagreements requires these role fillers to exist (and be equal or distinct) for a to belong to the concept. For example, hasMother, hasFather, and hasLastName with their usual interpretation are functional roles, whereas hasParent and hasChild are not. The concept . Person (hasLastName = hasMother ◦ hasLastName) . (hasLastName = hasFather ◦ hasLastName) describes persons whose last name coincides with the last name of their mother, but not with the last name of their father. The restriction to functional roles makes reasoning in ALC extended by agreements and disagreements decidable [Hollunder and Nutt, 1990]. A structural subsumption algorithm for the language provided by the Classic system, which includes the same-as constructor, can be found in [Borgida and Patel-Schneider, 1994]. However, if general inclusion axioms (or transitive closure of functional roles or cyclic definitions) are allowed, then agreements and disagreements between chains of functional roles again cause subsumption to become undecidable [Nebel, 1991; Baader et al., 1993]. Additional types of role interaction constructors similar to agreements and role-value-maps are investigated in [Hanschke, 1992]. Acknowledgement We would like to thank Maarten de Rijke for his pointers to the literature on Beth definability in modal logics.
3 Complexity of Reasoning FRANCESCO M. DONINI
Abstract We present lower bounds on the computational complexity of satisfiability and subsumption in several Description Logics. We interpret these lower bounds as coming from different “sources of complexity”, which we isolate one by one. We consider both reasoning with simple concept expressions and reasoning with an underlying TBox. We discuss also complexity of instance checking in simple ABoxes. We have tried to enhance clarity and ease of presentation, sometimes sacrificing exhaustiveness for lack of space. 3.1 Introduction Complexity of reasoning has been one of the major issues in the development of Description Logics. This is because such logics are conceived [Brachman and Levesque, 1984] as the formal specification of subsystems for representing knowledge, to be used in larger knowledge-based systems. Since using knowledge also means deriving implicit facts from the given ones, the implementation of derivation procedures should take into account the optimality of reasoning algorithms. The study of optimal algorithms starts from the elicitation of the computational complexity of the problem the algorithm should solve. Initially, studies about the complexity of reasoning problems in Description Logics were more focused on polynomialtime versus intractable (np- or conp-hard) problems. The idea was that a knowledge representation system based on a Description Logic with polynomial-time inference problems would guarantee timely answers to the rest of the system. However, once systems based on very expressive Description Logics with exponential-time reasoning problems were implemented [Horrocks, 1998b], it was recognized that knowledge bases of realistic size could be processed in reasonable time. This shifted most of the complexity analysis to Description Logics whose reasoning problems are ExpTime-hard, or worse. 96
3
Complexity of Reasoning
97
This chapter presents some lower bounds on the complexity of basic reasoning tasks in simple Description Logics. The reasoning services taken into account are: first, satisfiability and subsumption of concept expressions alone (no TBox), then the same reasoning services considering a TBox also, and in the last part of the chapter, instance checking w.r.t. an ABox. We show in detail some reductions from problems that are hard for complexity classes np, conp, PSpace, ExpTime, and from semidecidable problems to satisfiability/subsumption in various Description Logics. Then, we show how these reductions can be adapted to other Description Logics as well. In several reductions, we use tableau expansions to prove the correctness of the reduction. Thus, a secondary aim in this chapter is to show how tableaux are useful not only in devising reasoning algorithms and complexity upper bounds – as seen in Chapter 2 – but also in finding complexity lower bounds. This is because tableaux untangle two different aspects of the computational complexity of reasoning in Description Logics: r The first aspect is the structure of possible models of a concept. Such a structure is – in many Description Logics – a tree of individual names, linked by arcs labeled by roles. We consider such a tree an AND-tree, in the sense that all branches must be followed to obtain a candidate model. Following [Schmidt-Schauß and Smolka, 1991], we call each branch of such a tree a trace. Readers familiar with tableaux terminology should observe that traces are not tableau branches; in fact, they form a structure inside a single tableau branch. r The second aspect is the structure of proofs or refutations. Clearly, if a trace contains an inconsistency – a clash in the terminology set up in Chapter 2—the candidate models containing this trace can be discarded. When all candidate models are discarded this way, we obtain a proof of subsumption, or unsatisfiability. Hence, the structure of refutations is often best viewed as an OR-tree of traces containing clashes.
Here we have chosen to mark the nodes with AND, OR when considering a satisfiability problem; if either unsatisfiability or subsumption is considered, AND and OR labels should be exchanged. Before starting with the various results, we elaborate on this subject in the next subsection. 3.1.1 Intuition: sources of complexity The deterministic version of the calculus for ALCN in Chapter 2 can be seen as exploring an AND–OR tree, where an AND-branching corresponds to the (independent) check of all successors of an individual, while an OR-branching corresponds to the different choices of application of a nondeterministic rule. Realizing that, one can see that the exponential-time behavior of the calculus is due to two independent origins: the AND-branching, responsible for the
98
F. M. Donini
exponential size of a single candidate model, and the OR-branching, responsible for the exponential number of different candidate models. We call these two different combinatorial explosions sources of complexity. 3.1.1.1 OR-branching The OR-branching is due to the presence of disjunctive constructors, which make a concept satisfiable by more than one model. The obvious disjunctive constructor is ; hence ALU is a good sublanguage to see this source of complexity. Recall that ALU allows one to form concepts using negation of concept names, conjunction , disjunction , universal role quantification ∀R.C, and unqualified existential role quantification ∃R. This source of complexity is the same that makes propositional satisfiability np-hard: in fact, satisfiability in ALU can be trivially proved np-hard by rewriting propositional letters as atomic concepts, ∧ as , and ∨ as . Many proofs of conp-hardness of subsumption were found by exploiting this source of complexity ([Levesque and Brachman, 1987; Nebel, 1988]), by reducing an nphard problem to non-subsumption. In Subsection 3.2.1, we show how disjunction can also be introduced by combining role restrictions and universal quantification, and in Subsection 3.2.2 by combining number restrictions and role intersection. 3.1.1.2 AND-branching The AND-branching is more subtle. Its exponential behaviour is due to the interplay of qualified existential and universal quantifiers; hence ALE is now a minimal sublanguage of ALCN with these features. As mentioned in Chapter 2 one can see the effects of this source of complexity by expanding the tableau {D(x)}, when D is the following concept (whose pattern appears in many papers, from [Schmidt-Schauß and Smolka, 1991], to [Hemaspaandra, 1999]) – see Chapter 2 for its general form: ∃P1 .∀P2 .∀P3 .C11 ∃P1 .∀P2 .∀P3 .C12 ∀P1 .(∃P2 .∀P3 .C21 ∃P2 .∀P3 .C22 ∀P2 .(∃P3 .C31 ∃P3 .C32 )). For each level l of nested quantifiers, we use a different role Pl (but using the same role R would produce the same results). The structure of the tableau for {D(x)}, which is the candidate model for D, is a binary tree of height 3: the nodes are the individual names, the arcs are given by the Pl -successor relation, and the branches are the traces in the tableau.
3
Complexity of Reasoning
99
Each trace ends with an individual that belongs to C1i , C2 j , C3k , for i, j, k ∈ {1, 2}. Hence, a clash may be found independently in each trace, i.e., in each branch of the tree. To verify that this structure is indeed a model, one has to check every AND-branch of it; and branches can be exponentially many in the nesting of quantifiers. This source of complexity causes an exponential number of possible refutations to be searched through (each refutation being a trace containing a clash). This second source of complexity is not evident in propositional calculus, but a similar problem appears in predicate calculus – where the interplay of existential and universal quantifiers may lead to large models – and in Quantified Boolean Formulae. Remark 3.1 For Description Logics that are not closed under negation, a source of complexity could be absent in satisfiability while it might appear in subsumption. This is because C is subsumed by D iff C ¬D is unsatisfiable, where ¬D could belong a Description Logic which is more expressive than the DL of C and D. 3.1.2 Overview of the chapter We first present separately the effect of each source of complexity. In the next section, we discuss intractability results stemming from disjunction (ORbranching), which lead to conp-hard lower bounds. We discuss both the case of plain logical disjunction (as the Description Logic FL), and the case of disjunction arising from alternative identification of individuals (ALEN ). Then in Section 3.3 we present an np lower bound stemming from AND-branching, namely a Description Logic in which concepts have one candidate model of exponential size. A PSpace lower bound combining the two sources of complexity is presented in Section 3.4, and then in Section 3.5 we show how axioms can combine in a succinct way the sources of complexity, leading to ExpTime-hardness of satisfiability. In Section 3.6 we examine one of the first undecidability results found for a Description Logic, using the powerful construct of role-value-maps – now recognized as very expressive, because of this result. Finally, we analyze intractability arising from reasoning with individuals in ABoxes (Section 3.7), and add a final discussion (Section 3.8) about the significance of these results – beyond the initial study of theoretical complexity of reasoning – also for benchmark testing of implemented procedures. Section 3.9, with a list of complexity results for satisfiability and subsumption, closes the chapter.
100
F. M. Donini
Table 3.1. Syntax and semantics of the Description Logic FL. For FL− , omit role restriction.
concept name concept intersection limited exist. quant. value restriction
role name role restriction
concept expressions
semantics
A CD ∃R ∀R.C
⊆ I C I ∩ DI I {x ∈ | ∃y. (x, y) ∈ R I } {x ∈ I | ∀y. (x, y) ∈ R I → y ∈ C I }
role expressions
semantics
P R|C
⊆ I × I {(x, y) ∈ × I | (x, y) ∈ R I ∧ y ∈ C I } I
3.2 OR-branching: finding a model When the number of candidate models is exponential in the size of the concepts involved, it is a combinatorial problem to find the right candidate model to check. In Description Logics, this may lead to np-hardness of satisfiability, and conphardness of subsumption. 3.2.1 Intractability in FL Brachman and Levesque [1984] (see also [Levesque and Brachman, 1987]) were the first to point out that a slight increase in the expressiveness of a Description Logic may result in a drastic change in the complexity of reasoning. They called this effect a “computational cliff” of structured knowledge representation languages. They considered the language FL, which admits concept conjunction, universal role quantification, unqualified existential quantification, and role restriction. For readability, the syntax and semantics of FL are recalled in Table 3.1. Role restriction allows one to construct a subrole of a role R, i.e., a role whose extension is a subset of the extension of R. For example, the role child|male may be used for the “son-of ” relation. Observe two properties of role restriction, whose proofs easily follow from the semantics in Table 3.1: (i) for every role R, the role R| is equivalent to R; (ii) for every role R, and concepts A, C, D, the concept (∀(R|C ).A) (∀(R| D ).A) is equivalent to ∀(R|(CD) ).A.
The second property highlights that disjunction – although not explicitly present in the syntax of the language – arises from semantics. Brachman and Levesque defined also the language FL− , derived from FL by omitting role restriction. They first showed that for FL− , subsumption can be
3
Complexity of Reasoning
101
decided by a structural algorithm, with polynomial-time complexity, similar to the one shown in Chapter 2. Then they showed that subsumption in FL is conp-hard, exhibiting the first “computational cliff ” in Description Logics. Since the original proof of conp-hardness is somewhat complex, we give here a simpler proof, found by Calvanese [1990]. The proof is based on the observation that if C1 · · · Cn ≡ , then, given a role R and a concept A, we have (∀(R|C1 ).A) · · · (∀(R|Cn ).A) ≡ (from (ii)) ∀R|(C1 ···Cn ) .A ≡ ∀R| .A ≡ (from (i)) ∀R.A.
(3.1) (3.2) (3.3)
Moreover, observe that, for every role Q and every concept C, the disjunction ∃Q ∀Q.C is equivalent to the concept . Hence ∀(R|∃Q ).A ∀(R|∀Q.C ).A is equivalent to ∀R.A. These observations are the key to the reduction from tautology checking of propositional 3DNF formulae to subsumption in FL. Theorem 3.2 Subsumption in FL is conp-hard. Proof Given an alphabet of propositional variables L = { p1 , . . . , pk }, define a propositional formula F = G 1 ∨ · · · ∨ G n in 3DNF over L, where each disjunct G i is made of three literals li1 ∧ li2 ∧ li3 , and for every i ∈ {1, . . . , n}, and j ∈ {1, 2, 3}, j each literal li is either a variable p ∈ L, or its negation p. Given a set of role names {R, P1 , . . . , Pk } (one role Pi for each variable pi ) and a concept name A, define the concept C F = (∀R|C1 .A) · · · (∀R|Cn .A) where, for each i ∈ {1, . . . , n}, Ci is the conjunction of three concepts Di1 Di2 Di3 , and j each Di is
j ∀Ph .A, if li = ph j for j ∈ {1, 2, 3}, i ∈ {1, . . . , n}. Di = j ∃Ph , if li = ph Then the claim follows from the following lemma. Lemma 3.3 F is a tautology if and only if C F ≡ ∀R.A. Proof The proof of the claim is straightforward; however, since it appears only in Calvanese’s Master thesis (in Italian), we present it here in full. Only if If F is a tautology, then C1 · · · Cn ≡ . This can be shown by contradiction: suppose C1 · · · Cn is not equivalent to . Then, there exists an interpretation I in which there is an element x ∈ CiI , for every i ∈ {1, . . . , n}. Since each Ci = Di1 Di2 Di3 , it follows that for each i there is a j ∈ {1, 2, 3} such that j x ∈ Di . Define a truth assignment τ to L as follows. For each h ∈ {1, . . . , k},
102
F. M. Donini
r τ ( ph ) = false iff l j = ph , and x ∈ D j i i r τ ( ph ) = true iff l j = ph , and x ∈ D j . i i
Observe that we cannot have both τ ( ph ) = false and τ ( ph ) = true at the same time, since this would imply both x ∈ ∃Ph and x ∈ ∀Ph .A, which is impossible since ∃Ph ∀Ph .A ≡ . Evidently, τ assigns false to at least one literal for each disjunct of F, contradicting the hypothesis that F is a tautology. Therefore C1 · · · Cn ≡ . The claim is now implied by equivalences (3.1)–(3.3). If Suppose F is not a tautology. Then, there exists a truth assignment τ such that j for each i ∈ {1, . . . , n}, there exists a j ∈ {1, 2, 3} such that τ (li ) = false. I I I Define an interpretation ( , · ), with containing three elements x, y, z, such that PhI = (y, z) if τ ( ph ) = false, and PhI = ∅ otherwise. Moreover, let AI = ∅, and R I = {x, y}. Observe that in this way, y ∈ (∃Ph )I iff τ ( ph ) = false, and y ∈ (∀Ph .A)I iff τ ( ph ) = true. This implies that x ∈ (∀R.A)I . To prove the claim, we now show that x ∈ C FI . j Observe that, for each i ∈ {1, . . . , n}, there exists a j ∈ {1, 2, 3} such that τ (li ) = j false. For such a j, we show by case analysis that y ∈ (Di )I : r if l j = ph then D j = ∀Ph .A, and in this case, τ ( ph ) = false, hence y ∈ (∀Ph .A)I ; i i r if l j = ph then D j = ∃Ph , and in this case, τ ( ph ) = true, hence y ∈ (∃Ph )I . i i
Therefore, for every i ∈ {1, . . . , n} we have y ∈ CiI . This implies that (x, y) ∈ R|I(C1 ···Cn ) , hence x ∈ (∀R|(C1 ···Cn ) .A)I , which is a concept equivalent to C F . The above proof shows only that subsumption in FL is conp-hard. However, role restrictions could also be used to obtain qualified existential quantification, since ∃R.C = ∃R|C . Hence, FL contains also the AND-branching source of complexity. Combining the two sources of complexity, Donini et al. [1997a] proved a PSpace lower bound for subsumption in FL, matching the upper bound found by SchmidtSchauß and Smolka [1991]. 3.2.2 Intractability in FL− plus qualified existential quantification and number restrictions As shown in Chapter 2, disjunction arises also from qualified existential quantification and number restrictions. This can be easily seen examining the construction of the tableau checking the satisfiability of the concept (∃R.A) (∃R.(¬A ¬B)) (∃R.B) 2 R
3
Complexity of Reasoning
103
in which, once three objects are introduced to satisfy the existentials, one has to choose between three non-equivalent identifications of pairs of objects, where only one identification leads to a consistent tableau branch. Remark 3.4 When a Description Logic includes number restrictions, then negation of concept names is included for free, at least from a computational viewpoint. In fact, a concept name A and its negation ¬A can be coded as, say, 4 R A and 3 R A where R A is a new role name introduced for A. Now these two concepts obey the same axioms as A and ¬A – namely, their conjunction is ⊥ and their union is . Hence, everything we say about computational properties of Description Logics including FL− plus number restrictions holds also for AL plus number restrictions. We now present a proof of intractability based on this property. The reduction was first published by Nebel [1988], who reduced the np-complete problem of set splitting [Garey and Johnson, 1979, p. 221] to non-subsumption in the Description Logic of the Back system, which included the basic FL− plus intersection of roles and number restrictions. set splitting is the following problem: Definition 3.5 (Set splitting) Given a collection C of subsets of a basic set S, decide if there exists a partition of S into two subsets S1 and S2 such that no subset of C is entirely contained in either S1 or S2 . We simplify the original reduction. We start from a variant of set splitting (still np-complete) in which all c ∈ C have exactly three elements, and reduce it to satisfiability in FL− plus qualified existential role quantification and number restrictions.1 Since role intersection can simulate qualified existential role quantification (see next Subsection 3.2.2.1) this result implies the original one. Theorem 3.6 Satisfiability in FL− EN is np-hard. Proof Let S = {1, . . . , n}, and let c1 , . . . , ck be the subsets of S. There exists a splitting of S iff the concept D1 D2 D3 is satisfiable, where D1 , D2 , D3 are defined as follows: D1 = ∃R.B1 · · · ∃R.Bn D2 = ∀R.( 2 Q 1 · · · 2 Q k ) D3 = 2 R where each concept Bi codes which subsets element i appears in, as follows: Bi = 1
j | i∈cj ∃Q j .Ai
From Remark 3.4, this DL has the same computational properties of ALEN [Donini et al., 1997a]
(3.5) (3.6) (3.7)
104
F. M. Donini x R
···
R yi
y1
yn
···
Qj1 zij1
Qj2 zij2
···
Qjk zijk
Fig. 3.1. The AND-tree structure of the tableau obtained by applying rules for and ∃R.C to D1 D2 D3 (x). Applying the rule for 2 R(x) would lead to several OR-branches (as many as the possible identifications of ys).
and concepts A1 , . . . , An are defined in such a way that they are pairwise disjoint – say, for i ∈ {1, . . . , n} let Ai = i R i R. Intuitively, when tableau rules dealing with and qualified existential quantification are applied to D1 D2 D3 (x), one obtains a tableau whose tree structure of individual names can be visualized as in Figure 3.1. The rest of the proof strictly follows the original one [Nebel, 1988], hence we do not present it here. The intuition is that D3 forces every ys generated by D1 to be identified with one of only two successors of the root individual name x. Such identifications correspond to the sets S1 and S2 . Then D2 forces the split of each 3-subset, since it makes sure that neither of these successors has more than two Q j -successors, and thus both have at least one Q j -successor (since there are three of them). We clarify the construction and show its relevant properties by an example. Example 3.7 Suppose S = {1, 2, 3, 4}, and let c1 = {1, 2, 4}, c2 = {2, 3, 4}, c3 = {1, 3, 4}. Applying the tableau rules of Chapter 2 to D1 , one obtains the following tree of individual names (definitions of each Bi are expanded):
Q 1 (y1 , z 11 ) A1 (z 11 ) R(x, y ) B (y ) 1 1 1 Q (y , z ) A (z )
3 1 13 1 13 Q 1 (y2 , z 21 ) A2 (z 21 ) R(x, y2 ) B2 (y1 ) Q (y , z ) A (z )
2 2 22 2 22 D1 (x) Q 2 (y3 , z 32 ) A3 (z 32 ) R(x, y3 ) B3 (y1 ) Q 3 (y3 , z 33 ) A3 (z 33 ) Q 1 (y4 , z 41 ) A4 (z 41 ) R(x, y4 ) B4 (y1 ) Q 2 (y4 , z 42 ) A4 (z 42 ) Q 3 (y4 , z 43 ) A4 (z 43 ) where the individual names y1 , . . . , y4 stand for the four elements of S, and each z i j codes the fact that element i appears in subset c j . Because of assertions Ai (z i j ),
3
Complexity of Reasoning
105
no two z’s disagreeing on the first index – e.g., z 32 and z 42 – can be safely identified, since they must satisfy assertions on incompatible A’s. This is the same as if the constraints z i j = z h j , for all i, h ∈ {1, . . . , |S|} with i = h, and all j ∈ {1, . . . , |C|}, were present. Now D3 states that y1 , . . . , y4 must be identified into only two individual names. Observe that identifying y2 , y3 , y4 leads to an individual name (say, y2 ) having among others, three unidentifiable Q 2 -fillers z 22 , z 32 , z 42 . But D2 states that all R-fillers of x, including y2 , have no more than 2 fillers for Q 2 . This rules out the identification of y2 , y3 , y4 in the tableau. Observe that this identification corresponds to a partition of S into {1} and {2, 3, 4}, which is not a solution of set splitting because the subset c2 is not split. Following the same line of reasoning, one could prove that the only identifications of all R-fillers into two individual names, leading to a satisfiable tableau, are one-to-one with solutions of set splitting. The same reduction works for non-subsumption, since D1 D2 D3 is satisfiable iff D1 D2 is not subsumed by ¬D3 ≡ 3 R. This type of reduction has also been applied (see [Donini et al., 1999]) to prove that subsumption in ALN I is conp-hard, where ALN I is the Description Logic including AL, number restrictions and inverse roles. Observe that also FL− EN contains the AND-branching source of complexity, since qualified existential restriction is present. With a more complex reduction from Quantified Boolean Formulae, combining the two sources of complexity, satisfiability and non-subsumption in ALEN has been proved PSpace-complete by Hemaspaandra [1999]. Note that in the above proof of intractability, pairwise disjointness of A1 , . . . , An could be also expressed by conjoining log n concept names and their negations in all possible ways. Hence, the proof needs only the concept 2 R, and when qualified existentials are simulated by subroles, only 1 R is used. This shows that the above proof of intractability is quite sharp: intractability arises independently of the size of the numbers involved. The computational cliff is evident if one moves to having 0 and 1 only in number restrictions, which leads to socalled functional roles – since the assertion 1 R(x) forces R to be a partial function of x. In that case, the tractability of a Description Logic can usually be established, e.g., the Description Logic of the system Classic [Borgida and Patel-Schneider, 1994]. The intuitive reason for tractability of functional roles can be found in the corresponding tableau rules, which for number restrictions of the form 1 R(x) become deterministic: there is no choice in identifying individuals names y1 , . . . , yk which are all R-fillers for x, but to collapse them all into one individual.
106
F. M. Donini
3.2.2.1 Simulating ∃R.C with role conjunction Donini et al. [1997a] showed that a concept D containing qualified existential role quantifications ∃R.C is satisfiable iff the concept D is satisfiable, where in D each occurrence of a concept ∃R.C is replaced by the concept ∃(R Q C ) ∀(R Q C ).C, adding Q C as a new role name (a different Q C for each occurrence of ∃R.C, to be used nowhere else). We call D an -simulation of D in the rest of the chapter. The proof that the simulation is correct can be easily given by referring to tableaux. Example 3.8 Considering the concept D below on the left, and simulating qualified existential quantifications in D by role intersections, one obtains the concept D on the right, ∃R.A ∃(R Q A ) ∀(R Q A ).A D = ∃R.B D = ∃(R Q B ) ∀(R Q B ).B ∀R.C ∀R.C where subscripts on new role names help to identify which existential they simulate. Applying the tableau rules of Chapter 2 to D(x), one obtains the model R(x, y) Q A (x, y) R(x, z) Q B (x, z)
A(y) C(y) B(z) C(z)
which satisfies both concepts. D is satisfiable. Proposition 3.9 A concept D is satisfiable iff Proof The proof of the proposition follows the example. Namely, an open tableau branch for D is also an open tableau branch for D (ignoring assertions on new role names), and an open tableau branch for D can be transformed to an open tableau branch for D just by adding the assertions about new role names. As observed by Nebel [1990a], an acyclic role hierarchy in a Description Logic can be always simulated by conjunctions of existing roles and new role names. In the above example, using two role names Q A , Q B and the inclusions Q A R, Q B R yields the same simulation. Applying -simulation, one could obtain from the reduction in Theorem 3.6 the original reduction by Nebel, proving that satisfiability (and non-subsumption) in ALN () is np-hard. Using a more complex reduction, Donini et al. [1997a] proved that satisfiability in ALN () is in fact PSpace-complete.
3
Complexity of Reasoning
107
3.3 AND-branching: finding a clash When candidate models of a concept have exponential size – as for the ALE-concept of Subsection 3.1.1.2 – models cannot be guessed and checked in polynomial time. In this case, it is a combinatorial problem to find the clash – if any – in the candidate model. This leads to np-hardness of unsatisfiability and subsumption. However, for many Description Logics the AND-tree structure of a model is such that its traces (branches of the AND-tree) have polynomial size. A concept C is satisfiable iff there is no trace containing a clash; hence it is sufficient to guess such a trace to show that C is unsatisfiable. From this argument,Schmidt-Schauß and Smolka [1991] proved that satisfiability in ALE is in conp. 3.3.1 Intractability of satisfiability in ALE We now report a proof that satisfiability in ALE is conp-complete. The original proof was based on a polynomial-time reduction from a variant of the np-complete problem one-in-three 3sat [Garey and Johnson, 1979, p. 259]. Here we present a proof based on the same idea, but with a slightly different construction, relying on a reduction from the np-complete problem exact cover (xc) [Garey and Johnson, 1979, p. 221]. Such a problem is defined as follows. Definition 3.10 (Exact cover xc) Let U = {u 1 , . . . , u n } be a finite set, and let M be a family M1 , . . . , Mm of subsets of U . Decide if there are q mutually disjoint subsets Mi1 , . . . , Miq such that their union equals U , i.e., Mih ∩ Mik = ∅ for 1 ≤ h < k ≤ q, q and k=1 Mik = U . The reduction consists in associating every instance of xc with an ALE-concept CM , such that M has an exact cover if and only if CM is unsatisfiable. It is important to note that, differently from the previous sections, here a solution of the np-complete source problem is related to a proof of the absence of a model. In fact, exact covers of M are related to those traces of {CM (x)} that contain a clash; hence proving the existence of a solution of an np-complete problem is related to a refutation in the target Description Logic. In the following we assume R to be a role name. We translate M into the concept CM = C11 · · · C1m D1 j
where each concept C1 represents a subset M j , and is inductively defined as j ∃R.Cl+1 , if either l ≤ n, u l ∈ M j or l > n, u l−n ∈ M j j Cl = for l ∈ {1, . . . , 2n} j ∀R.Cl+1 , if either l ≤ n, u l ∈ M j or l > n, u l−n ∈ M j
108
F. M. Donini j
and by the base case C2n+1 = . The concept D1 is defined by D1 = ∀R. · · ∀R. ⊥ · 2n
and each of D2 , D3 , . . . has one universal quantifier less than the previous one. Intuitively, for every element u l in U there are two corresponding levels l, l + n j in the concepts C1 ’s, where “level” refers to the nesting of quantifiers. The element j u l is present in M j if and only if there is an existential quantifier in the concept C1 at level l + n – which implies by construction that ∃ is also at level l. The concept D1 is designed in such a way that a clash for {CM (x)} can only occur in a trace containing at least 2n + 1 individual names. Example 3.11 Consider the following instance of xc: let U = {u 1 , . . . , u 3 }, and M = {M1 = {u 1 , u 2 }, M2 = {u 2 , u 3 }, M3 = {u 3 }}. The corresponding ALE-concept CM is given by the conjunction of C11 , C12 , C13 and D1 , defined as follows. u1 u2 u3 u1 u2 u3 M1 ↔ C11 = ∃R.∃R.∀R.∃R.∃R.∀R. M2 ↔ C12 = ∀R.∃R.∃R.∀R.∃R.∃R. M3 ↔ C13 = ∀R.∀R.∃R.∀R.∀R.∃R. D1 = ∀R.∀R.∀R.∀R.∀R.∀R.⊥ j
where on the left we put the subset M j corresponding to each C1 , and above we put the elements of U corresponding to each level of the concepts. Observe that the elements of U appear twice. The conjunction of the above concepts is unsatisfiable if and only if the interplay of the various existential and universal quantifiers, represented by a trace, forces an individual name in the tableau for {CM (x)} to belong to the extension of ⊥. This reduction creates a correspondence between such a trace and an exact cover of U . In order to formally characterize such a correspondence, we define the activeness of a concept in a trace. Let T be a trace and C be a concept. We say that C is active in T if C is of the form ∃R.D and there are individual names y, z such that T contains C(y), R(y, z), and D(z). Therefore, an existentially quantified concept ∃R.D is active in T if the →∃ -rule has been applied to the assertion ∃R.D(y) in T . j Intuitively, if Ck is active in a trace of {CM (x)} containing a clash, then u k belongs to an exact cover of M.
3
Complexity of Reasoning
109
Lemma 3.12 ([Donini et al., 1992a], Lemma 3.1) Let T be a trace of {CM (x)}. j
j
(i) Suppose Ck is active in T . Then for all l ∈ {1, . . . , k} if the concept Cl is of the form j ∃R.Cl+1 , then it is active in T . (ii) If T contains a clash, then for every l ∈ {1, . . . , 2n} there exists exactly one j such that j Cl is active in T .
Example 3.13 The reader can gain an insight into the importance of the above properties by constructing the tableau for the concept (∃R.∀R.∃R.A) (∃R.∀R.∃R.B) (∀R.∃R.) and verifying that the trace reaching the concept A has both existentials of the first line active (and neither existential of the second line), and vice versa for the trace reaching B. Example 3.14 (Example 3.11 Continued) Note that in Example 3.11 the two subsets M1 and M2 form a (non-exact) cover of U , and indeed, the tableau for {C11 C21 D1 (x)} is satisfiable. Moreover, observe the importance of the two levels. If concepts were formed by just one level, the following concepts would be unsatisfiable (choose the highlighted existentials): C11 = ∃R.∃R.∀R. C21 = ∀R.∃R.∃R. D1 = ∀R.∀R.∀R.⊥ corresponding to a cover by M1 and M2 which is non-exact. The second level ensures that once an existential is chosen, all nested existentials must be chosen too to form a trace. Theorem 3.15 Unsatisfiability in ALE is np-hard. Proof We show that an instance (U, M) of xc has an exact cover if and only if CM is unsatisfiable. Let M = {M1 , . . . , Mm } be a set of subsets of U and CM = C11 . . . C1m D1 be the corresponding concept. Since this proof is the base for three others in the chapter, we present it in some detail. Only if Let Mi1 , . . . , Miq be an exact cover of U . Let T be a trace of {CM (x1 )} defined inductively as follows: j
T1 = {C1 (x1 ) | j ∈ {1, . . . , m}} ∪ {D1 (x1 )} j
Tl+1 = Tl ∪ {R(xl , xl+1 )} ∪ {Cl+1 (xl+1 ) | u l+1 ∈ M j } ∪ {Dl+1 (xl+1 )}.
110
F. M. Donini
Obviously, T = T2n+1 contains a clash, because D2n+1 = ⊥. For each level l there j j is exactly one j such that Cl = ∃R.Cl+1 . Using this fact, one can easily show that T is a trace by induction on l. If If CM is unsatisfiable, then there exists a trace T of {CM (x)} such that T contains a clash. We show that the subsets in j
{M j | ∃l ∈ {1, . . . , n} : Cn+l is active in T } form an exact cover of U . First of all, since T is a trace, for every level j l ∈ {1, . . . , 2n} there exists a j such that Cl is active in T (Lemma 3.12(ii)). Hence the union of these subsets covers U . We now prove that no two subsets overlap: in fact, suppose there are i, j such that Mi , M j intersect non-trivially in an element u l . Here we exploit the two-layered j i construction of CM . By definition, there are h, k such that Cn+h and Cn+k are active i in T . Since u l is in both Mi and M j , by construction of CM we have Cli = ∃R.Cl+1 j j j and Cl = ∃R.Cl+1 . From Lemma 3.12(i), we know that Cli and Cl are both active in T . Hence i = j from Lemma 3.12(ii). The above reduction works also for the special case of xc in which every subset has at most three elements, which corresponds to at most six nested existential j quantifications in each concept C1 . Hence, bounding the number of nested existential quantifications by a constant k ≥ 6 does not yield tractability. The original reduction from one-in-three 3sat shows moreover that bounding the number of existentials in each level by a constant k ≥ 3 does not yield tractability. Simulating qualified existential quantifications in CM by role intersection (see Subsection 3.2.2.1), we conclude that unsatisfiability of concepts in AL() – AL plus role conjunction – is np-hard, too. Theorem 3.16 Satisfiability and subsumption of concepts are np-hard in AL(). We note that this source of intractability is not due to the presence of the concept ⊥, but to the interplay of universal and existential quantification. In fact, the above reduction works also for the Description Logic FL− E, which is FL− plus qualified existential quantification. Theorem 3.17 Subsumption is np-hard in FL− E. Proof The proof is based on the reduction given for ALE. The ALE-concept CM = C11 · · · C1m D1 in that reduction is unsatisfiable if and only if C11 · · · C1m is subsumed by ¬D1 . Now C11 · · · C1m is a concept in FL− E and ¬D1 can be
3
Complexity of Reasoning
111
rewritten to the equivalent concept E, defined as E = ∃R. · · ∃R. · 2n
i.e., a chain of 2n qualified existential quantifications terminating with the concept . Obviously, E is in FL− E, hence subsumption in FL− E is np-hard. We now use the above construction to show that in three other Description Logics – extending FL− with each pair of role constructs for role conjunction, role inverse, and role chain – subsumption is np-hard. The fact that reductions can be easily reused is a characteristic of Description Logics. It depends on the compositional semantics of constructs – hardness proofs obviously carry over to more general Description Logics – but also on the extensional semantics, that allows one to simulate a construct with others. 3.3.2 FL− plus role conjunction and role inverse We abbreviate this Description Logic as FL− (,− ). We prove that FL− (,− ) is hard for np by an argument similar to that for FL− E. One may be tempted to use -simulation, defined in Subsection 3.2.2.1, which replaces qualified existential quantifications by role intersections. However, a direct -simulation of the concepts used in the reduction for FL− E does not work. In fact, simulation preserves satisfiability, not subsumption; e.g., while ∃R.C D is subsumed by ∃R.C, its -simulation ∃(R Q 1 ) ∀Q 1 .C D is not subsumed by ∃(R Q 2 ) ∀Q 2 .C. To carry over the proof, it is useful to have a tableau rule for role inverse: Condition T contains R(x, y), where R is either a role name P or its inverse P − ; Action T = T ∪ {R − (y, x)}, where if R = P − , then R − = P. Theorem 3.18 Subsumption in FL− (,− ) is np-hard. Proof We refer to the concept CM defined in the reduction given for ALE. Let n be the cardinality of U in xc. First define the concept F as follows: F = ∀R. · · ∀R. ∀(R − ). · · · ∀(R − ). A · 2n
2n
where A is a concept name (recall that CM does not contain any concept name but and ⊥). F is a concept of FL− (,− ).
112
F. M. Donini
Observe now that the ALE-concept CM = C11 · · · C1m D1 is unsatisfiable m F is subsumed by A (where C is the -simulation of 1 · · · C if and only if C 1 1 1 · · · C). In fact, the subsumption holds if and only if the complete tableau for {C 1 m F(x), ¬A(x)} contains the only possible clash {A(x), ¬A(x)}. This tableau C 1 contains a clash if and only if there is a trace of length 2n in the tableau, and such a trace is in one-to-one correspondence with the exact covers of the problem xc. Hence subsumption in FL− (,− ) is np-hard. 3.3.3 FL− plus role conjunction and role chain We abbreviate this Description Logic as FL− (, ◦). Theorem 3.19 Subsumption in FL− (, ◦) is np-hard. Proof Again, we refer to the concept CM defined in the reduction given for ALE. Observe that the ALE-concept CM = C11 . . . C1m D1 is unsatisfiable if and m is subsumed by ¬D1 (again, C is the -simulation of C). 1 . . . C only if C 1 1 m 1 − The claim holds, since C . . . C is in FL () and ¬D1 can be expressed as 1
1
the equivalent concept G, defined as follows: G = ∃ (R ◦ · · · ◦ R) .
(3.8)
2m
Obviously, G is in FL− (◦), hence subsumption in FL− (, ◦) is np-hard. We note that in the above reduction, subsumption is proved intractable by using only role conjunction in the subsumee (to simulate existential quantification), and only role chain in the subsumer. We will exploit the subsumer (3.8) also in Subsection 3.3.4. 3.3.4 FL− plus role chain and role inverse We abbreviate this Description Logic as FL− (◦,− ). We first show that, similarly to Subsection 3.2.2.1, qualified existential quantifications in a concept D can be replaced by a combination of role chains and role inverses, obtaining a new concept D that is satisfiable iff D is. 3.3.4.1 Simulating ∃R.C via role chains and role inverses Donini et al. [1991b; 1999] showed that a concept D containing qualified existential role quantifications ∃R.C is satisfiable iff the concept D is satisfiable, where in D each occurrence of a concept ∃R.C is replaced by the concept ∃(R ◦ Q C ) ∀(R ◦ Q C ◦ Q C− ).C, adding Q C as a new role name (a different Q for
3
Complexity of Reasoning
113
is a ◦-simulation each occurrence of ∃R.C, to be used nowhere else). We say that C of C. This simulation too can be explained by referring to tableaux, through an example concept. Example 3.20 Consider the concept D below on the left, and its ◦-simulation D on the right: ∃R.A ∃(R ◦ Q A ) ∀(R ◦ Q A ◦ Q −A ).A D = ∃R.B D = ∃(R ◦ Q B ) ∀(R ◦ Q B ◦ Q −B ).B ∀R.C ∀R.C where subscripts on new role names help to identify which existential they simulate. Applying the tableau rules of Chapter 2 to D(x), one obtains the model R(x, y) R(x, z)
A(y) C(y) B(z) C(z)
Q A (y, u y ) Q B (z, u z )
where subscripts on individuals u y , u z highlight that there is a new individual name for each individual name used to satisfy an existential quantification. That is, the number of individual names in the tableau for D is at most twice that in the tableau for D. Lemma 3.21 Let D be an ALE-concept and D its ◦-simulation. Then D is satisfiable if and only if D is satisfiable. Proof The proof extends the above example. In one direction, an open tableau for D is also an open tableau for D (ignoring assertions on new role names). In the other direction, an open tableau for D can be transformed to an open tableau for D: to every role assertion R(x, y) – added to satisfy an existential ∃R.C in D – chain an assertion Q C (y, u y ). is a concept belonging to the language If C is an ALE-concept, its ◦-simulation C − AL(◦, ), that is, AL plus role inverses and role chains. Of course, ◦-simulations could be defined for concepts belonging to Description Logics more expressive than ALE. For Description Logics in which every concept is satisfiable (like FL− (◦,− )) this simulation can be interesting only in subsumptions. We can now come back to subsumption in the Description Logic FL− plus role inverses and role chains.
114
F. M. Donini
Theorem 3.22 Subsumption in FL− (◦,− ) is np-hard. Proof For every ALE-concept C, one can compute in quadratic time an ◦ For a given instance (U, M) of xc, CM is unsatisfiable iff (by simulation C. m is subsumed by ¬D1 . Now the 1 . . . C M is satisfiable iff C Lemma 3.21) C 1 1 subsumee contains no negated concept, hence it belongs to FL− (◦,− ). The subsumer is equivalent to the concept G in (3.8), which again is in FL− (◦,− ). 3.4 Combining sources of complexity In a Description Logic containing both sources of complexity, one might expect to code any problem involving the exploration of polynomial-depth, rooted AND–OR graphs. The computational analog of such graphs is the class APTime (problems solved in polynomial time by an alternating Turing machine) which is equivalent to PSpace (e.g., see [Johnson, 1990, p. 98]). A well-known PSpace-complete problem is Validity of Quantified Boolean Formulae: Definition 3.23 (Quantified Boolean Formulae qbf) Decide the validity of the (second-order logic) closed sentence (Q 1 X 1 )(Q 2 X 2 ) · · · (Q n X n )[F(X 1 , . . . , X n )], where each Q i is a quantifier (either ∀ or ∃) and F(X 1 , . . . , X n ) is a Boolean formula with Boolean variables X 1 , . . . , X n . The problem remains PSpace-complete if F is in 3CNF, i.e., conjunctive normal form with at most three literals per clause. We call the string of quantifiers the prefix of the quantified formula, and the 3CNF formula F its matrix. This problem can be encoded in an AND–OR graph, using AND-nodes to encode ∀-quantifiers, and OR-nodes for ∃-quantifiers. In the leaves, there is the matrix F. We use this analogy to illustrate the reduction, taken from [Schmidt-Schauß and Smolka, 1991]. 3.4.1 PSpace -hardness of satisfiability in ALC Without loss of generality, we assume that each clause is non-tautological, i.e., a literal and its complement do not appear both in the same clause. Let F = G 1 ∧ · · · ∧ G m . The QBF (Q 1 X 1 ) · · · (Q n X n )[G 1 ∧ · · · ∧ G m ] is valid iff the ALCconcept C = D C11 · · · C1n
(3.9)
3
Complexity of Reasoning
115
is satisfiable, where in C all concepts are formed using the concept name A and the atomic role name R. The concept D encodes the prefix, and is of the form D1 ∀R.(D2 ∀R.(. . . (Dn−1 ∀R.Dn ) . . .) where for i ∈ {1, . . . , n} each Di corresponds to a quantifier of the QBF in the following way:
Di =
(∃R.A) (∃R.¬A), if Q i = ∀ ∃R., if Q i = ∃.
The concept C1i is obtained from the clause G i using the concept name A when a Boolean variable occurs positively in G i , ¬A when it occurs negatively, and nesting l universal role quantifications to encode the variable X l . In detail, let k be the maximum index of all Boolean variables appearing in G i . Then, for l ∈ {1, . . . , (k−1)} one defines i ∀R.(A Cl+1 ), i i Cl = ∀R.(¬A Cl+1 ), i ∀R.Cl+1 ,
if X l appears positively in G i if X l appears negatively in G i if X l does not appear in G i
and the last concept of the sequence is defined as
Cki =
∀R.A, if X k appears positively in G i ∀R.¬A, if X k appears negatively in G i .
It can be shown that each trace in a tableau branch for D corresponds to a truth assignment to the Boolean variables, and that all traces of a tableau branch correspond to a set of truth assignments consistent with the prefix. Therefore, Schmidt-Schauß and Smolka conclude that satisfiability in ALC is PSpace-hard. Combining this result with the polynomial-space calculus given for ALCN in Chapter 2, one obtains that satisfiability (and subsumption) in ALCN are PSpace-complete, and that the exponential-time behavior of the calculus cannot be improved unless PSpace =PTime. Satisfiability and subsumption are still in PSpace if role conjuctions are added to ALCN [Donini et al., 1997a], or if inverse roles and transitive roles are added to ALC [Horrocks et al., 2000b]. Using -simulations, one can use the same reduction to prove that both satisfiability and subsumption in ALU() are PSpace-hard (and thus PSpace-complete). By a more complex reduction, Donini et al. [1991a] proved that satisfiability in ALN () is also PSpace-hard. Hemaspaandra [1999] proved that satisfiability in ALEN is PSpace-hard using a reduction from qbf, where the prefix was coded with a concept similar to D (more precisely, similar to the concept D in Subsection 3.1.1.2), and the matrix was coded in a more complex way. Also FL was
116
F. M. Donini
proved PSpace-hard in [Donini et al., 1997a]. Observe that all these Description Logics contain both sources of complexity. 3.4.2 A remark on reductions Schild [1991] observed that ALC is a notational variant of multi-modal logic K, whose satisfiability was proved PSpace-hard by Ladner [1977], using a different reduction from qbf. This gives us the occasion to point out a characteristic of reductions from a different, fairly experimental viewpoint. The target modal formula in Ladner’s reduction has size quadratic w.r.t. the given instance of qbf, while one can observe that the concept C in (3.9) has only linear size. From a theoretical perspective of the PSpace reduction, this is irrelevant. However, qbf has also been studied from an experimental point of view (e.g., [Cadoli et al., 2000; Gent and Walsh, 1999]): trivial cases have been identified, easy-hard-easy patterns have been found, and one can use ratios of clauses/variables for which the probability that a random QBF is valid is around 0.5 – which have been proved experimentally to contain the “hard” instances. This experimental work can be transferred to Description Logics, to compare the various algorithms and systems for reasoning in ALC. This transfer yields the benefits that r concepts which are trivially (un)satifiable do not need to be isolated again; r the translation of “hard” QBFs can be used to test reasoning algorithms for ALC; r the performance of algorithms for ALC can be compared with best known algorithms for solving qbf (see [Cadoli et al., 2000; Rintanen, 1999; Giunchiglia et al., 2001]), and optimizations can be carried over.
However, using Ladner’s reduction to obtain “hard-to-reason” concepts, the quadratic blowup of the reduction soon makes the resulting concepts too big to be significantly tested. Using Schmidt-Schauß and Smolka linear reduction, instead, one can use a spectrum of “hard” concepts as wide as the original instances of qbf. Thus, experimental analysis might make significant differences between (theoretically equivalent) polynomial many-to-one transformations used in reductions [Donini and Massacci, 2000]. 3.5 Reasoning in the presence of axioms In this section we consider the impact of axioms on reasoning. Intuitively, axioms introduce new concept expressions in every individual generated in a tableau, so that simple arguments on termination and complexity based on the nesting of operators do not apply. We start with a comparison with Dynamic Logic, and then we show how axioms can encode a succinct representation of AND–OR graphs, leading to an ExpTime lower bound.
3
Complexity of Reasoning
117
3.5.1 Results from Propositional Dynamic Logic Propositional Dynamic Logic (pdl) [Harel et al., 2000] is a formalism able to express propositional properties of programs. Instead of introducing yet another logical syntax, we will talk about pdl in terms of Description Logics. A precise correspondence between Description Logics and pdl can be found in Chapter 5. The counterpart of pdl in Description Logics is ALC trans [Baader, 1991], already defined in Chapter 2. We recall that ALC trans is ALC plus a rich set of role constructors: union of roles, composition, and transitive closure. To be precise, pdl has also a role-forming constructor which is role identity, and the closure of a role is the reflexive–transitive one, denoted as R ∗ . Reflexive–transitive closure is defined similarly to transitive closure, but considering also every pair (a, a) to be in the interpretation of R ∗ . However, Schild [1991] showed that these are minor differences, as long as we are concerned with computational behavior only. pdl and ALC trans are relevant in this section about axioms, because using union and transitive closure of roles, one can “internalize” axioms in a concept in the following way [Baader, 1991; Schild, 1991]. Let C be an ALC concept, T a set of axioms of the form Ci Di , i ∈ {1, . . . , m}. Observe that every axiom can also be thought of as a concept ¬C D which every individual in a model must belong to. Let R1 , . . . , Rn be all the role names used in either C or T . Then C is satisfiable w.r.t. T iff the following concept is satisfiable: C ∀(R1 · · · Rn )∗ .((¬C1 D1 ) · · · (¬Cm Dm )).
(3.10)
The key property that makes this reduction correct is the connected model property [Streett, 1982]: if C has a model w.r.t. a set of axioms, then it has also a model in which one element a ∈ I is in C I , and for every other element b in the model, there is a path of roles from a to b. Concept (3.10) is just a syntactic variant of a pdl expression. Hence, every upper bound on complexity of satisfiability for pdl applies also to concept satisfiability in ALC w.r.t. axioms, including all role constructors of pdl. Namely, satisfiability in pdl was proved to be decidable in deterministic exponential time, first by Pratt [1979], and then by Vardi and Wolper [1986] using an embedding into tree automata. This upper bound holds also for ALC plus axioms. It is interesting to observe that the deterministic exponential time upper bound was nontrivial; simple nondeterministic upper bounds were proved by Fischer and Ladner [1979] for pdl and by Buchheit et al. [1993a] for Description Logics, using tableaux. Only recently a tableau with lemmas providing a deterministic exponential upper bound has been found [Donini and Massacci, 2000]. Regarding hardness, every lower bound on reasoning in ALC with axioms carries over to pdl. However, lower bounds for pdl were already known. Fischer and
118
F. M. Donini
Ladner [1979] proved that pdl is ExpTime-hard using a reduction from Alternating Turing Machines working in polynomial space (recall that the complexity class Alternating Polynomial Space is the same as ExpTime [Johnson, 1990]). van Emde Boas [1997] proved the same result using a reduction from alternating domino games. However, both hardness proofs use a very small part of pdl, and in particular, transitive closure on roles appears only in one expression of the form (3.10), so that proofs could be adapted to ALC concept satisfiability w.r.t. a set of inclusions, in a very simple way. Moreover, the proofs use ∀R.C to code an AND-node, and ∃R.C to code an OR-node. Hence, they follow the same intuition presented in the previous section, where we showed the correspondence between AND–OR trees and satisfiability of ALC without axioms. Here, we want to present yet another proof, of a very different nature, that highlights the fact that concept inclusions can express a large structure in a succinct way.
3.5.2 Axioms and succinct representations of AND–OR graphs We now need more precise definitions about AND–OR graphs. An AND–OR graph is a graph in which nodes are partitioned into AND-nodes and OR-nodes. An ORnode is reachable if one of its predecessors is reachable (as in ordinary graphs), while an AND-node is reachable only if all its predecessors are reachable. Definition 3.24 (AND–OR graph Accessibility Problem (agap)) Given an AND– OR graph, a set of source nodes S1 , . . . , Sm , and a target node T , is T reachable from S1 , . . . , Sm ? Let n be the number of nodes of the graph, and d (a constant) the maximum number of predecessors of a node. It is well known that agap can be solved in time polynomial in n (e.g., it can be reduced to Monotone Circuit Value, which is PTime-complete [Papadimitriou, 1994]). However, agap becomes ExpTime-complete when one considers its succinct version [Balcazar, 1996]. Let the out-degree of a node be bounded by a constant d. Let C be a Boolean circuit with log n inputs, and with 1 + d log n outputs; when the input of C is the binary encoding of a node N , its outputs are the encodings of the type of N (AND/OR) and of the d predecessors of N (using a dummy node if there are fewer than d predecessors). Definition 3.25 (Succinct AND–OR Graph Accessibility Problem (s(agap))) Given a circuit C representing an AND–OR graph, a set of source nodes S1 , . . . , Sm , and a target node T , is T reachable from S1 , . . . , Sm ?
3
Complexity of Reasoning
119
Now, s(agap) is ExpTime-complete [Balcazar, 1996]. The intuition for this exponential blowup in complexity is that there are many circuits which can encode graphs whose size is exponentially larger than the circuit size. This intuition applies to many other succinct representations of problems with circuits [Papadimitriou, 1994, p. 492] or with propositional formulae [Veith, 1997], yielding complete problems for high complexity classes. We reduce s(agap) for graphs with in-degree d = 2 to unsatisfiability of an ALC concept C w.r.t. a set of inclusions T . Intuitively, the axioms can succinctly encode either a proof of unsatisfiability for a concept, or a model for C w.r.t. T . We note that, since we are coding reachability into unsatisfiability, we will use to code OR-nodes – a conjunction is unsatisfiable when at least one of its conjuncts is – and to code AND-nodes. First of all, let A1 , . . . , Alog n be a set of concept names one-to-one with the inputs of the circuit C. Each node N in the graph is then mapped into a conjunction of As and their negations, denoted by concept(N ), depending on the code of N : if the ith bit in the code of N is 1, use Ai , if it is 0, use ¬Ai . For example, if N has code 1101 then concept(N ) is A1 A2 ¬A3 A4 . 1 2 2 Then, let B11 , . . . , Blog n and B1 , . . . , Blog n be two sets of concept names oneto-one with the outputs of C. Conjunctions of Bs with negations code predecessor nodes. Moreover, let two concept names AND , OR represent the type of a graph node. If C has k internal gates, we use also k concept names W1 , . . . , Wk . For each gate, we use a concept equality that mimics the Boolean formula defining the gate. E.g., if C has an ∧-gate x1 ∧ x2 = x3 , we use the equality X 1 X 2 = X 3 , where X 1 , X 2 , X 3 can either be concept names among W1 , . . . , Wk denoting input/output of internal gates, or be some of the As and Bs, denoting inputs/outputs of the whole circuit. For the output of C encoding the type of the node, we use directly the two concept names AND , OR in the concept equality coding the output gate of C. Moreover, to model the different interpretation of predecessors for the two type of nodes, we use the inclusions AND ∃R 1 . ∃R 2 . OR ∃R 1 . ∃R 2 .
(3.11) (3.12)
where R 1 and R 2 are two role names (we use indices 1,2 to parallel indices of the Bs). Observe that concept AND implies a disjunction , and concept OR implies a conjunction . This is because we reduce reachability to unsatisfiability, as we said before. Moreover, observe that predecessors in the AND–OR graph are coded into role successors in the target Description Logic.
120
F. M. Donini
For the output of C encoding the predecessors of a node, we add the following inclusions for i ∈ {1, . . . , log n}: Bi1 ¬Bi1 Bi2 ¬Bi2
∀R 1 .Ai ∀R 1 .¬Ai ∀R 2 .Ai ∀R 2 .¬Ai .
(3.13) (3.14) (3.15) (3.16)
We denote by TC the set of all of the above axioms. We now give an example of what the axioms imply. Suppose C computes the two predecessors 1011 and 0110 for node 1101. Then, equalities coding C force concept(1101) = A1 A2 ¬A3 A4 to be included in B11 , ¬B21 , B31 , B41 (first predecessor) and ¬B12 , B22 , B32 , ¬B42 (second predecessor). Then inclusions (3.13)– (3.16) say that every R 1 -successor is included in A1 , ¬A2 , A3 , A4 – which conjoined, make concept(1011) – and that every R 2 -successor is included in ¬A1 , A2 , A3 , ¬A4 (concept(0110)). Moreover, if C computes an AND-type for node 1101, then axiom (3.11) implies that the corresponding concept is included in AND , and this implies that either an R 1 -successor or an R 2 -successor exists. For OR-type nodes, both successors exist. Theorem 3.26 Let C be a circuit, T be the target node, and S1 , . . . , Sm be the source nodes in an instance of s(agap). Then T is reachable from S1 , . . . , Sm iff concept(T ) is unsatisfiable in the TBox TC ∪ {concept(S1 ) ⊥} ∪ · · · ∪ {concept(Sm ) ⊥}. Proof Most of the rationale of the proof has been informally given above. We sketch what is needed to complete the proof. If Suppose T is unreachable from S1 , . . . , Sm . We construct a model (I, I ) for concept(T ) satisfying the axioms as follows. Let I be the set of all nodes in the graph which are unreachable from S1 , . . . , Sm . Then, (R 1 )I is the set of pairs (a, b) of nodes in I , such that b is the first predecessor of a, and similarly for (R 2 )I (second predecessor). For i ∈ {1, . . . , log n}, (Ai )I is the set of nodes in I whose binary code has the ith bit equal to 1. The interpretation of the Bs, W s, and AND , OR concepts is according to the 1-value of the circuit: node a is in their interpretation iff the output they correspond to is 1 when the code of a is the input of the circuit. Then, T ∈ (concept(T ))I , and moreover (I, I ) satisfies by construction all axioms in TC ; e.g., if an OR-node is unreachable, then both its predecessors are unreachable, hence both predecessors are in I , and axiom (3.12) is satisfied. Similarly for an AND-node.
3
Complexity of Reasoning
121
Only if Let N be any node reachable from S1 , . . . , Sm , and let d(N ) be the depth of the shortest hyperpath leading from S1 , . . . , Sm to N . We show by induction on d(N ) that concept(N ) is unsatisfiable in the TBox. If d(N ) = 0, the claim holds by construction. Let N be a reachable node, with d(N ) = k + 1. If N is an OR-node, at least one of its predecessors – let it be the first predecessor, and call it M – is reachable with d(M) = k. Then concept(M) is unsatisfiable by inductive hypothesis. But axiom (3.12) implies that concept(N ) is included in ∃R 1 . ∃R 2 ., while (3.13)–(3.16) imply that concept(N ) is included in ∀R 1 .concept(M), that is, ∀R 1 .⊥. Hence, also concept(N ) is unsatisfiable. A similar proof holds in case N is an AND-node. Then, the claim holds for N = T . Observe that in the above proof we did not use qualified existential quantification; hence, the proof works for the sublanguage of ALC called ALU. Now, axioms coding the circuit can be propositionally rewritten without union. Moreover, the only other axiom in which union is needed is (3.11), which could be rewritten equivalently as ∀R 1 .⊥ ∀R 2 .⊥ ¬OR , which is now in the language AL. Theorem 3.27 Let C be a concept and T a set of inclusions in AL, with at least two role names. Deciding whether C is unsatisfiable w.r.t. T is ExpTime-hard. The above theorem sharpens a result by Calvanese [1996b], who proved ExpTime-hardness for ALU. McAllester et al. [1996] proved ExpTime-hardness for a logic that includes FL− E, and their proof can be rewritten to work with ALU. Remark 3.28 The above proof does not follow the correspondence used by Fischer and Ladner [1979] between AND-nodes and ∀R.C concepts on one side, and OR-nodes and ∃R.C concepts on the other side. There, quantifications ∃R and ∀R.C were used to code predecessors in the graph, node type was coded by , constructors, while axioms were crucial to mimic the behavior of the circuit.
3.5.3 Syntax restrictions on axioms In the proof, no restriction on axioms was imposed. A significant syntactic restriction is to allow only concept names on the left-hand side of axioms. In this case, a dependency graph induced by the axioms of a TBox T can be constructed, whose nodes are labeled by concept names. A node A is connected to a node B if the concept name B appears (also as a subconcept) in a concept C, and A C is an axiom. Then, it makes sense to distinguish between cyclic axioms, in which the dependency graph contains a cycle, and acyclic axioms.
122
F. M. Donini
Acyclicity is significant, because if only acyclic axioms are allowed, then reasoning in ALC can be performed in PSpace by expanding axioms when needed [Baader and Hollunder, 1991b; Calvanese, 1996b]. The only case for ALC (till now) in which acyclic axioms make reasoning ExpTime-hard is when concrete domains are also added [Lutz, 2001b]. Also sublanguages of ALC can be considered. With regard to acyclic axioms in AL, Buchheit et al. [1998] proved that subsumption in acyclic AL TBoxes is conp-hard, and in PSpace. Calvanese [1996b] proved that cyclic axioms in AL are PSpace-complete, and other results for ALE and ALU. A second possible restriction is to allow axioms of the form A ≡ C, but in which a concept name can appear only once on the left-hand side. For axioms of this form in ALN , K¨usters [1998] proved that reasoning is PSpace-complete when the TBox is cyclic, and np-complete when it is acyclic.
3.6 Undecidability One of the main reasons why satisfiability and subsumption in many Description Logics are decidable – although highly complex – is that most of the concept constructors can express only local properties about an element [Vardi, 1997; Libkin, 2000]. Let C be a concept in ALC: recalling the tableau methods in Chapter 2, an assertion C(x) states properties about x, and about elements which are linked to x by a chain of at most |C| role assertions. Intuitively, this implies that a constraint regarding x will not “talk about” elements which are arbitrarily far (w.r.t. role links) from x. This also means that in ALC, and in many Description Logics, an assertion on an individual cannot state properties about a whole structure satisfying it. However, not every Description Logic satisfies locality.
3.6.1 Undecidability of role-value-maps The first notable non-local Description Logic is a subset of the language of the knowledge representation system Kl-One, isolated by Schmidt-Schauß [1989], which we call2 FL− (◦, =). It contains conjunction, universal quantification, role composition, and equality role-value-maps R = Q. A role-value-map allows one to express concepts like “persons whose co-workers coincide with their relatives”, as it could be, e.g., a small family-based firm. Using two role names co-worker and relative, this concept would be expressed as (co-worker = relative person). The Description Logic proved undecidable by Schmidt-Schauß used equality role-value-maps. Here we present a simpler proof for a Description Logic 2
In his paper, Schmidt-Schauß used the name ALR.
3
Complexity of Reasoning
123
Table 3.2. Syntax and semantics of the Description Logic FL− (◦, ⊆). concept expressions concept name value restriction concept intersection role-value-map
role name role composition
semantics
A ∀R.C CD R⊆Q
⊆ I {x ∈ | ∀y. (x, y) ∈ R I → y ∈ C I } C I ∩ DI I {x ∈ | ∀y. (x, y) ∈ R I → (x, y) ∈ Q I }
role expressions
semantics
P R◦Q
⊆ I × I {(x, y) ∈ I × I | ∃c. (x, z) ∈ R I , (z, y) ∈ Q I }
I
using containment role-value-maps R ⊆ Q. We call this Description Logic FL− (◦, ⊆). Clearly, FL− (◦, ⊆) is (slightly) more expressive than FL− (◦, =), since R = Q can be expressed by (R ⊆ Q) (Q ⊆ R), but not vice versa. Most of the original reduction is preserved, though. Although all constructs of FL− (◦, ⊆) have already been defined in different parts of Chapter 2, we recall for convenience their syntax and semantics in the single Table 3.2. Recall that R ⊆ Q is a concept: namely, the concept of all elements whose set of fillers for role R is included in the set of fillers for role Q. To avoid many parentheses, we assume ◦ has always precedence over ⊆. Before giving the proof that subsumption in FL− (◦, ⊆) is undecidable, let us consider an example illustrating why FL− (◦, ⊆) is not local. Example 3.29 Let Q, R, S, U, V be role names. Consider whether the concept C = ∀S.∀U.A (R ◦ Q ⊆ S) ∀R.(Q ◦ U ⊆ V ) is subsumed by the concept D = ∀R.∀Q.∀U.B. The answer is no: in fact, a model satisfying C and not satisfying D is shown in Fig. 3.2. This model can be obtained by trying to satisfy ¬D = ∃R.∃Q.∃U.¬B with individual x, y, z, w, and then adding role assertions satisfying C. Observe that a model of C cannot be a tree because of concepts like (R ◦ Q ⊆ S). Hence, any notion of “distance” between two individuals in a model, as the number of role links connecting them, is ambiguous when a Description Logic has role-value-maps. Moreover, the satisfaction of the assertions (R ◦ Q ⊆ S)(x) and ∀S.A(x) in an interpretation depends on the satisfaction of the assertion A(z), for every individual z connected to x via a path of role fillers that can be composed according to role-value-maps. In fact, replacing B with A in D yields a concept D which now subsumes C – and indeed, the previous model satisfies also D .
124
F. M. Donini V (y, w) ∀S.∀U.A(x)
R(x, y)
(Q ◦ U ⊆ V )(y)
(R ◦ Q ⊆S)(x)
A(w) Q(y, z)
U (z, w)
¬B(w)
∀U.A(z)
∀R.(Q ◦ U ⊆V )(x)
S(x, z)
Fig. 3.2. A possible countermodel for C D in Example 3.29. Boxes group assertions about an individual; arrows represent role assertions.
These properties are crucial for the reduction from ground rewriting systems to subsumption in FL− (◦, ⊆). For basics about rewriting systems, consult [Dershowitz and Jouannaud, 1990]. Definition 3.30 (Ground rewriting system) Let be a finite alphabet {a, b, . . .}. A term w on is an element of ∗ , i.e., a finite sequence of 0 or more letters from . If v, w are terms, their concatenation is a term, denoted by vw. A ground rewriting system is a finite set of rewriting rules ρ = {si → ti }i=1,...,n , where for ∗ every i ∈ {1, . . . , n} both si and ti are terms on . The rewriting relation → induced by a set of rewriting rules ρ is the minimal relation which is reflexive, transitive, and satisfies the following conditions: ∗
(i) if s → t ∈ ρ then s → t; ∗ ∗ ∗ (ii) for every letter a ∈ , if p → q then both ap → aq and pa → qa.
The rewriting problem for ground rewriting systems is: Given a set of rewriting ∗ rules ρ and two terms v, w, decide whether v → w. Remark 3.31 In general, a single rewriting step of a term v consists in finding a substring of v which coincides with the antecedent s of a rewriting rule s → t, ∗ and then substituting t for s in v. Hence, v → w if there exist n terms u 1 , . . . , u n such that u 1 = v, u n = w, and for each i ∈ {1, . . . , n − 1} the two terms u i , u i+1 are such that for some terms p and q, we have u i = psq, u i+1 = ptq, and s → t ∈ ρ. This proves that the term problem is recursively enumerable. However, it is semidecidable (recursively enumerable, but nonrecursive). We reduce this problem to subsumption in FL− (◦, ⊆) as follows. First of all, observe that we can define the following one-to-one correspondence between terms and role chains: r For every letter a in , let Pa be a role name. r For every term w, let R be the composition of the role names corresponding to the letters w of w. For example, if w = aab, then Rw = Pa ◦ Pa ◦ Pb .
3
Complexity of Reasoning
125
Now for each set of rewriting rules ρ, we define the concept Cρ as Cρ =
s→t∈ρ (Rs
⊆ Rt ).
Let Q be a new atomic role: we define a concept C as C =
a∈ (Q
◦ Pa ⊆ Q).
Intuitively, if a model I satisfies C (x), then for every term w, if (Q ◦ Rw )(x, z) holds in I, then Q(x, z) also holds, i.e., x is directly connected via Q to every other element z to which it is indirectly connected via Q ◦ Rw . If also I |= ∀Q.Cρ (x), then Cρ (z) holds for every such z. This is a key property of the reduction. Remark 3.32 The two concepts ∀Q.Cρ and C are a way to internalize simple axioms in a concept. Consider a TBox T = { Cρ } which states that every individual in a model must satisfy concept Cρ . One could prove that in FL− (◦, ⊆) a concept C is subsumed by a concept D w.r.t. T iff C ∀Q.Cρ ∀Q.C is subsumed by ∀Q.D, where the latter is plain subsumption between concept expressions. Theorem 3.33 Subsumption in FL− (◦, ⊆) is undecidable. Let ρ be a set of rewriting rules, and v, w be two terms. Define the following two concepts: C = C ∀Q.Cρ D = ∀Q.(Rv ⊆ Rw ).
(3.17) (3.18)
We divide the proof in two lemmas. ∗
Lemma 3.34 If v → w then the concept C is subsumed by D. Proof We first prove that the claim holds for the base case of the inductive definition ∗ of → (Condition (i) in Definition 3.30). Then, we prove the claim for the two inductive cases (Condition (ii)). Finally, we prove that the proof carries over the closure conditions. In all cases, let s → t ∈ ρ. Base case The concept D is ∀Q.(Rs ⊆ Rt ). Observe that the concept ∀Q.Cρ is equivalent to s→t∈ρ ∀Q.(Rs ⊆ Rt ). Hence, C is subsumed by D because D is one of the conjuncts of (an equivalent form of ) C. Inductive cases For the first inductive case, let D = ∀Q.(Pa ◦ R p ⊆ Pa ◦ Rq ), and let the inductive hypothesis be that C is subsumed by ∀Q.R p ⊆ Rq . For a contradiction, suppose C is not subsumed by D: then, there is a model I in which
126
F. M. Donini
both C(x) and ¬D(x) hold. The latter constraint implies that there is an element y such that (i) I |= Q(x, y) (ii) I |= (Pa ◦ R p )(y, z) (iii) I |= (Pa ◦ Rq )(y, z).
From (ii), there is an element y such that both Pa (y, y ) and R p (y , z) hold. Now from C (x), we must have I |= Q(x, y ), and from the inductive hypothesis this implies (R p ⊆ Rq )(y ). Then, I |= Rq (y , z) holds, hence I |= (Pa ◦ Rq )(y, z), contradicting (iii). The second inductive case is simpler, since one does not need to consider C (x). The interested reader can use it as an exercise. We conclude the proof by showing that the reduction carries over the reflexive ∗ and transitive closure of →. First, from the semantics in Table 3.2 it follows that Rw ⊆ Rw is equivalent to ∗ , which implies also that D ≡ . Hence the claim holds also for w → w (i.e., reflexivity). ∗ ∗ For transitivity, the induction is easy: suppose u → v and v → w: then by induction C is subsumed by D1 and by D2 , where D1 = ∀Q.(Ru ⊆ Rv ) and D2 = ∀Q.(Rv ⊆ Rw ). Then C is subsumed also by D1 D2 which is equivalent to ∀Q.((Ru ⊆ Rv ) (Rv ⊆ Rw )). This concept is subsumed by ∀Q.(Ru ⊆ Rw ), which is the claim. We now prove the other direction of the reduction. ∗
Lemma 3.35 If v → w, then the concept C is not subsumed by D. Proof We give the rule for constructing an infinite tableau branch T and show that it defines a model that satisfies C, and does not satisfy D. The tableau is one-to-one with an infinite automaton accepting the term v, and every other term into which v can be rewritten. Let v[1], . . . , v[n] denote the n letters of v (v[i] is the ith letter of v). Let x, y, z be individual names. Start from the set of assertions T0 = Pv[1] (y, y1 ), . . . , Pv[i+1] (yi , yi+1 ), . . . , Pv[n] (yn−1 , z). Then add role assertions to T following the →⊆ -rule: Condition there is a rewriting rule s → t ∈ ρ where s = s[1] · · · s[h] and t = t[1] · · · t[k]; T contains h + 1 individuals y0 , . . . , yh and h assertions Ps[i] (yi−1 , yi ) for i ∈ {1, . . . , h} T does not contain all assertions Pt[1] (y0 , y1 ), . . . , Pt[k] (yk−1 , yh )
3
Complexity of Reasoning
127
Action T = T ∪ {Pt[1] (y0 , y1 ), . . . , Pt[k] (yk−1 , yh )}, where y1 , . . . , yk−1 , are k − 1 individual names not occurring in T .
Intuitively, if there is in T a path of role assertions such that Rs (y0 , yh ) holds, the →⊆ -rule adds another path such that also Rt (y0 , yh ) holds. Of course, Tω can have an infinite number of individuals and role assertions between them; this is reasonable, since its role paths from y to z are one-to-one with the possible transformations on v one can make using the rewriting rules. One can also think of Tω as an infinite-state ∗ automaton accepting v = {u | v → u}. The →⊆ -rule always adds new assertions to T , and its application given some premises does not destroy other premises of application of the →⊆ -rule itself, since we keep in T all the rewritten terms. Therefore, the construction is monotonic over the ⊆-lattice of all tableaux with a countable number of individuals and role assertions between individuals. Hence there exists a fixpoint Tω . In building Tω , however, a fair strategy must be adopted. That is, if at a given stage Ti of the construction, the →⊆ -rule is applicable for individuals y0 , . . . , yh , then for some finite k, in Ti+k the →⊆ -rule has been applied for those premises – i.e., a possible rule application is not indefinitely deferred. This could be achieved by, e.g., inserting possible rule applications in a queue. Proposition 3.36 Let Tω be constructed using the →⊆ -rule, and a fair strategy. ∗ For every term u = u[1] · · · u[k], v → u iff in Tω there are k − 1 individual names y1 , . . . , yk−1 and k assertions Pu[1] (y, y1 ), . . . , Pu[k] (yk−1 , z). ∗
Proof If v → u, then there are a minimum finite number n of applications of rewriting rules in ρ transforming v into u. By induction on such n, the premises of the →⊆ -rule are fulfilled, and since Tω is built adopting a fair strategy, from some finite stage of its construction onwards, Ru (y, z) must hold. For the other direction, if Ru (y, z) holds in Tω , then for each →⊆ -rule application leading to Ru (y, z) one can apply a rewriting rule to v, leading to u. We can now define the model I satisfying C and not satisfying D. Let N be the set of individual names of Tω . I has domain {x} ∪ N . Let I = Tω ∪ {Q(x, y)|y ∈ N }. Then I satisfies C(x) straightforwardly; moreover, it does not satisfy D from Proposition 3.36. To prove that subsumption is undecidable in the less expressive Description Logic FL− (◦, =), Schmidt-Schauß [1989] started from the word problem for groups. Starting from the Post correspondence problem, with a more complex construction,
128
F. M. Donini
Patel-Schneider [1989b] proved that subsumption is also undecidable in the more expressive Description Logic FL− (◦, ⊆) plus role inverses, functional roles, and role restrictions. Starting from the word problem – which is less general than the term rewriting problem, but still semidecidable – Baader [1998] showed that subsumption in FL− (◦, ⊆) is undecidable without referring to tableaux. We report here the second part of his proof (corresponding to Lemma 3.35), since it is quite short and elegant, and shows a different way of proving the only-if direction, namely, giving a direct definition of an infinite structure satisfying the concepts. The word problem follows Definition 3.30, but considers the reflexive∗ symmetric-transitive closure ↔ of rewriting rules. This is also known as the word problem for semigroups, or Thue systems. In this case, ground term and word are ∗ synonyms. Of course, ↔ is an equivalence relation on words; let [v] denote the ∗ ∗ ↔-equivalence classes. Note that [u] = [v] iff u ↔ v. There is a natural multipli∗ cation on these classes induced by concatenation: [u][v] = [uv] (since ↔ is even a congruence, this is well-defined). Taking the equivalence classes plus one distinguished element x as the domain of the model I, the roles can be interpreted as Q I = {(x, [u])|u ∈ ∗ } (Pa )I = {([u], [ua])|a ∈ , u ∈ ∗ }.
(3.19) (3.20)
∗
Then, it can be shown that if v ↔ w, then x belongs to C I but not to D I , as follows. (i) x belongs to C I : from (3.20), for every word u we have (x, [u]) ∈ Q I and ([u], [ua]) ∈ (Pa )I ; but also from (3.19), (x, [ua]) ∈ Q I , hence C (x) is satisfied by I. Regarding ∀Q.Cρ (x), suppose ([u], [w]) ∈ (Rs )I , where s → t ∈ ρ. Then [w] = [us] by defini∗ tion of (Pa )I . Moreover, from s → t ∈ ρ it follows that us ↔ ut, hence [us] = [ut]. I Consequently, ([u], [w]) = ([u], [ut]) ∈ (Rt ) from (3.20). (ii) x does not belong to D I : for the empty word , [] is a Q-filler of x; however, [] does / (Rw )I , since not satisfy the concept Rv ⊆ Rw . In fact, ([], [v]) ∈ (Rv )I ; but ([], [v]) ∈ ∗ [w] is the only Rw -filler of [] but [v] = [w] from the assumption that v ↔ w.
3.7 Reasoning about individuals in ABoxes When an ABox is considered, the reasoning problem of instance checking arises: Given an ABox A, an individual a and a concept C, decide whether A |= C(a). For the instance check problem, the size of the input is formed by the size of the concept expression C plus the size of A. Since the size of one input may be much larger than the other in real applications, it makes sense to distinguish the complexity w.r.t. the two inputs – as is usually done in databases with data complexity and query complexity [Vardi, 1982].
3
Complexity of Reasoning
129
A common intuition [Schmolze and Lipkis, 1983] about instance checking was that it could be performed via subsumption, using the so-called most specific concept (msc) method. Definition 3.37 (Most specific concepts) Let A be an ABox in a given Description Logic, and let a be an individual in A. A concept C is the most specific concept of a in A, written msc (A, a), if, for every concept D in the given Description Logic, A |= D(a) implies C D. Recall from Chapter 2 a slightly different definition of msc in the realization problem: given an individual a and an ABox A, find the most specific concepts C (w.r.t. subsumption) such that A |= C(a) [Nebel, 1990a, p. 104]. Since conjunction is always available in every Description Logic, the two definitions are equivalent (just conjoin all specific concepts of realization into one msc). Clearly, once msc (A, a) is known, to decide whether a is an instance of a concept D it should be sufficient to check whether msc (A, a) is subsumed by D, turning instance checking into subsumption. Moreover, when a TBox is present, off-line classification of all msc’s in the TBox may provide a way to pre-compute many instance checks, providing an on-line speed-up. The intuition about how to compute msc (A, a) was to gather the concepts/properties explicitly stated for a in A. However, this approach is quite sensitive to the Description Logic chosen to express msc (A, a) and the queries. In fact, most specific concepts can be easily computed for simple Description Logics, like AL. However, it may not be possible when slightly more expressive languages are considered. Example 3.38 A simple example (simplified from [Baader and K¨usters, 1998]) is the ABox made just by the assertion R(a, a). If FL− is used for most specific concepts and queries, then msc ({R(a, a)}, a) = ∃R. However, if qualified existential quantification is allowed for most specific concepts, then each of the concepts ∃R, ∃R.∃R, ∃R.∃R.∃R, . . . , is more specific than the previous one. Using this argument, it is possible to prove that msc ({R(a, a)}, a) has no finite representation, unless transitive closure on roles is also allowed. Using the axiom A ∃R.A in an ad hoc TBox, msc ({R(a, a)}, a) = A for the simple ABox of this example – but this does not simplify instance checking. An alternative approach would be to raise individuals in the language to express concepts, through the concept constructor {. . .} that enumerates the individuals belonging to it (called “one-of ” in Classic). In that case, msc ({R(a, a)}, a) = ∃R.{a} (see [Donini et al., 1990]). But this “solution” to instance checking becomes now a problem for subsumption, which must take individuals into account (for a treatment of Description Logics with one-of, see [Schaerf, 1994a]).
130
F. M. Donini
The msc method makes an implicit assumption: to work well, the size of msc (A, a) should be comparable with the size of the whole ABox, and in most cases much shorter. However, consider the Description Logic ALE, in which subsumption is in np. Then, solving instance checking by means of subsumption in polynomial space and time would imply that instance checking was in np, too. However, suppose that we prove that instance checking is hard for conp. Then, solving instance checking by subsumption implies that either conp ⊆ np, or msc (A, a), if ever exists, has superpolynomial size w.r.t. A. The former conclusion is unlikely to hold, while the latter would make unfeasible the entire method of msc’s. In general, this argument works whenever subsumption in a Description Logic belongs to a complexity class C, while instance checking is proved hard for a different complexity class C , for which C ⊆ C is believed to be false. We present here a proof using this argument, found by Schaerf [1993; 1994b; 1994a]. We first start with a simple example highlighting the construction. Example 3.39 Let f, c1 , c2 , x, y, z be individuals, R, P, N be role names, and A be a concept name. Let A be the following ABox, whose structure we highlight by means of arrows between assertions:
f
)
R( f, c1 )
* R( f, c ) 2
) * ) *
P(c1 , x) A(x) N (c1 , y) P(c2 , y) N (c2 , z) ¬A(z).
The query ∃R.(∃P.A ∃N .¬A)( f ) is entailed by A. That is, one among c1 and c2 has its P-filler in A and its N -filler in ¬A. This can be verified by case analysis on y: in every model either A(y) or ¬A(y) must be true. For models in which A(y) holds, c2 is the R-filler of f satisfying the query; for models in which ¬A(y) holds, c1 is. Observe that if ALE is used to express most specific concepts, the best approximation we can find for msc (A, f ), by collecting assertions along the role paths starting from f , is the concept C = ∃R.(∃P.A ∃N ) ∃R.(∃P ∃N .¬A), in which the fact that the same individual y is both the N -filler of ∃N and the P-filler of ∃P is lost. Indeed, C is not subsumed by the query, as one can see by constructing an open tableau for C ¬∃R.(∃P.A ∃N .¬A)( f ). The above example can be extended to a proof that deciding A |= C(a), where C is an ALE-concept, is conp-hard. Observe that this is a different source of complexity w.r.t. unsatisfiability in ALE. In fact, a concept C is unsatisfiable iff {C(a)} |= ⊥(a). This problem is np-complete when C is a concept in ALE (Subsection 3.3.1).
3
Complexity of Reasoning
131
The source conp-complete problem is the complement of 2+2-sat, which is the following problem. Definition 3.40 (2+2-sat) Given a 4CNF propositional formula F, in which every clause has exactly two positive literals and two negative ones, decide whether F is satisfiable. The problem 2+2-sat is a simple variant of the well-known 3-sat. Indeed, for 3-literal clauses mixing both positive and negative literals, add a fourth disjunct, constantly false; e.g., X ∨ Y ∨ ¬Z is transformed into the 2+2-clause X ∨ Y ∨ ¬Z ∨ ¬true. Unmixed clauses can be replaced by two mixed ones using a new variable (see [Schaerf, 1994a, Theorem 4.2.6]). Given an instance of 2+2-sat F = C1 ∧ C2 ∧ · · · ∧ Cn , where each clause Ci = L i1+ ∨ L i2+ ∨ ¬L i1− ∨ ¬L i2− , we construct an ABox A F as follows. A F has one individual l for each variable L in F, one individual ci for each clause Ci , one individual f for the whole formula F, plus two individuals true and false for the corresponding propositional constants. The roles of A F are Cl (for Clause), P1 , P2 (for positive literals), N1 , N2 (for negative literals), and the only concept name is A. Finally, A F is given by (we group role assertions on first individual to ease reading): 1 P1 (c1 , l1+ ) 1 ) P2 (c1 , l2+ Cl( f, c1 ) 1 N (c , l ) 1 1 1− 1 ) N2 (c1 , l2− .. .. A(tr ue), ¬A( f alse). . . n P1 (cn , l1+ ) n ) P2 (cn , l2+ Cl( f, cn ) n N (c , l ) 1 n 1− n ) N2 (cn , l2− Now let D be the following, fixed, query concept: D = ∃Cl.((∃P1 .¬A) (∃P2 .¬A) (∃N1 .A) (∃N2 .A)). Intuitively, an individual name l is in the extension of A or ¬A iff the propositional variable L is assigned true or false, respectively. Then, checking whether A F |= D( f ) corresponds to checking that in every truth assignment for F there exists a clause whose positive literals are interpreted as false, and whose negative literals are interpreted as true – i.e., a clause that is not satisfied. If one applies the above idea to translate the two clauses (having just two literals each) false ∨ ¬Y , Y ∨ ¬true, one obtains exactly the ABox of Example 3.39.
132
F. M. Donini
The correctness of this reduction was proved by Schaerf [1993; 1994a]. We report here only the concluding lemma. Lemma 3.41 A 2+2-CNF formula F is unsatisfiable if and only if A F |= D( f ). Hence, instance checking in ALE is conp-hard. This implies that instance check in ALE cannot be efficiently solved by subsumption, unless conp ⊆ np. We remark that only the size of A F depends on the source formula F, while D is fixed. Hence, instance checking in ALE is conp-hard with respect to knowledge base complexity – and it is also np-hard from Subsection 3.3.1. The upper bound for knowledge p base complexity of instance checking in ALE is in 2 , but it is still not known p whether the problem is 2 -complete. Regarding combined complexity – that is, neither the size of the ABox nor that of the query is fixed – in [Schaerf, 1994a; Donini et al., 1994b] it was proved that instance checking in ALE is PSpacecomplete. Since the above reduction makes use of negated concept names, it may seem that conp-hardness arises from the interaction between qualified existential quantification and negated concept names. However, all that is needed are two concepts whose union covers all possible cases. We saw in Subsection 3.2.1 that ∃R and ∀R.B have this property. Therefore, if we replace A and ¬A in A F with ∃R and ∀R.B, respectively (where R is a new role name and B is a new concept name), we obtain a new reduction for which Lemma 3.41 still holds. Hence, instance checking in FL− E (i.e., ALE without negation of concept names) is conp-hard too, thus confirming that conp-hardness is originated by qualified existential quantification alone. In other words, intractability arises from a query language containing both qualified existential quantification, and pairs of concepts whose union is equivalent to . Hence, for languages containing these constructs, the msc method is not effective. Regarding the expressivity of the language for assertions in the ABox, conphardness of instance checking arises already when assertions in the ABox involve just concept and role names. However, note that a key point in the reduction is the fact that two individuals in the ABox can be linked via different role paths, as f and y were in Example 3.39. 3.8 Discussion In this chapter we analyzed various lower bounds on the complexity of reasoning about simple concept expressions in Description Logics. Our presentation appealed to the intuitive notions of exploring AND–OR trees, in the special case when the tree is derived from a tableau. We remark that an alternative approach to reasoning is to reduce it to the emptiness test for automata (e.g., [Vardi, 1996]), which has been quite successfully applied
3
Complexity of Reasoning
133
to temporal logics, and propositional logics of programs. However, till now such techniques have been used to obtain upper bounds in reasoning, while in order to obtain lower bounds one would need a way to reduce problems on automata to unsatisfiability/subsumption in Description Logic. The only example of this reduction is [Nebel, 1990b], for a very simple Description Logic, which we have omitted in this chapter for lack of space. We end the chapter with a perspective on the significance of the np, conp, and PSpace complexity lower bounds we have presented. Present reasoning systems in Description Logics (see Chapter 8) can now cope with reasonable size ExpTime-complete problems. Hence the computational complexity of the problems now reachable is above PSpace. However, in our opinion, for implemented systems the significance of a reduction lies not just in the theoretical lower bound obtained, but also in the reduction itself. In fact, when experimenting with algorithms for subsumption, satisfiability, etc. [Baader et al., 1992b; Hustadt and Schmidt, 1997] on an implemented system, one can exploit already known “hard” cases of a source problem like 3-sat, 2+2-sat, set splitting, or qbf validity to obtain “hard” instances for the algorithm under test. These instances isolate the influence of each source of combinatorial explosion on the performance of the overall reasoning system, and can be used to optimize reasoning algorithms in a piecewise fashion [Horrocks and Patel-Schneider, 1999], separately for the various sources of complexity. In this respect, the issue of finding “efficient” reductions (w.r.t. the size of the resulting concepts) is still open, and can make the difference when concepts to be tested scale up (see [Donini and Massacci, 2000]). 3.9 A list of complexity results for subsumption and satisfiability Many names have been invented for languages of different Description Logics, e.g., FL for Frame Language, ALC for Attributive Descriptions Language with Complement, etc. Although suggestive, these names are not very explicit about which constructs are in the named language. This makes the huge mass of results about complexity of reasoning in Description Logics often difficult to screen by non-experts in the field. To clarify the constructs each language is equipped with, we use two lists of constructors: the first one for concept constructors, and the second one for role constructors. For example, the pair of lists (, ∃R, ∀R.C) (, ◦) denotes a language whose concept constructors are conjunction , unqualified existential quantification ∃R, and universal role quantification ∀R.C, and whose role constructors are conjunction and composition ◦. Many combinations of concept constructors have been given a name which is now commonly used. For instance, the first list of the above example is known as FL− . In these cases,
134
F. M. Donini
we follow a syntax first proposed in [Baader and Sattler, 1996b], and write just FL− (, ◦) – that is, FL− augmented with role conjunction and composition – to make it immediately recognizable by researchers in the field. 3.9.1 Notation In the following catalog, satisfiability and subsumption refer to the problems with plain concept expressions. When satisfiability and subsumption are w.r.t. a set of axioms, we state it explicitly. Moreover, when the constructs of the Description Logic allow one to reduce subsumption between C and D to satisfiability of C ¬D, we mention only satisfiability. In the lists, we have tried to use the symbol of the DL construct whenever possible. We have abbreviated some constructs, however: unqualified number restrictions n R, n R are denoted by ≶ R, while qualified number restrictions n R.C, n.RC are ≶ R.C. When a construct is allowed only for names (either concept names in the first list, or role names in the second one) we apply the construct to the word name . 3.9.2 Subsumption in PTime To the best of the author’s knowledge, no proof of PTime-hardness has been given for any Description Logic so far. Therefore the following results refer only to membership in PTime. r r r r r r
(, ∃R, ∀R.C) () known as FL− [Levesque and Brachman, 1987]. (, ∃R, ∀R.C, ¬(name)) () known as AL [Schmidt-Schauß and Smolka, 1991]. (, ∃R, ∀R.C, ≶ R) () known as ALN [Donini et al., 1997a]. AL(◦), AL(− ) [Donini et al., 1999]. FL− () [Donini et al., 1991a]. (, ∃R.C, {individual }) (,− ) known as ELIRO1 [Baader et al., 1998b].
3.9.3 np and conp r (, ∃R.C, ∀R.C, ¬(name)) () (known as ALE) subsumption and unsatisfiability are npcomplete [Donini et al., 1992a] (see Subsection 3.3.1). r AL(), ALE(), and (, ∃R.C, ∀R.C) () (known as ALR, ALER and FL− E respectively) subsumption and unsatisfiability are np-complete [Donini et al., 1997a] (see Theorems 3.16, 3.17 for hardness, and [Donini et al., 1992a] for membership). r (, , ∃R, ∀R.C, ¬(name)) () (known as ALU) subsumption and unsatisfiability are conp-complete [Donini et al., 1997a] (see Subsection 3.1.1.1). r ALN (− ) subsumption is conp-complete, while satisfiability is decidable in polynomial time [Donini et al., 1999]. r FL− (,− ), FL− (, ◦), and FL− (◦,− ) [Donini et al., 1999] (see Subsections 3.3.2, 3.3.3, and 3.3.4).
3
Complexity of Reasoning
135
r AL(), satisfiability w.r.t. a set of acyclic axioms is conp-hard [Buchheit et al., 1994a; Calvanese, 1996b; Buchheit et al., 1998] (conp-complete for ALE() [Calvanese, 1996b]).
3.9.4 PSpace r (, , ¬, ∃R.C, ∀R.C) () (known as ALC) [Schmidt-Schauß and Smolka, 1991] (see Subsection 3.4.1). r (, ¬(name), ∃R.C, ∀R.C, ≶ R) () (known as ALEN ) [Hemaspaandra, 1999]. r FL− (R|C ) (known as FL), ALN (), ALU(), (, ∃R.C, ∀R.C, ¬, ≶ R) () (known as ALCN R) [Donini et al., 1997a]. r ALC(, , ◦) satisfiability [Massacci, 2001]. Membership is nontrivial. r ALE() satisfiability w.r.t. a set of cyclic axioms is PSpace-complete [Calvanese, 1996b]. r ALN () satisfiability w.r.t. a set of cyclic axioms of the form A ≡ C, where each concept name A can appear only once on the left-hand side, is PSpace-complete [K¨usters, 1998].
3.9.5 ExpTime r AL w.r.t. a set of axioms (see Section 3.5 for hardness). r (, , ¬, ∃R.C, ∀R.C) (, ◦,∗ , id (),− ) which includes ALC trans [Baader, 1991; Schild, 1991]. Membership is nontrivial, and was proved by Pratt [1979] without inverse, and by Vardi and Wolper [1986] for converse-pdl, reducing the problem to emptiness of tree automata. r (, , ¬, ∃R.C, ∀R.C, ≶ name.C, ≶ name − .C) (, ◦,∗ ,− , id ()), known as ALCQI r eg (see Chapter 5). Membership is nontrivial. r (, , ¬, ∃R.C, ∀R.C, µx.C[x], {individual }) (− ), where µx.C[x] denotes the least fixpoint of x [Sattler and Vardi, 2001]. Membership is nontrivial.
3.9.6 NExpTime r adding concrete domains (see [Baader and Hanschke, 1991a]), satisfiability in ALC w.r.t. a set of acyclic axioms, and ALC(− ) [Lutz, 2001a]. r ALC(, , ¬) satisfiability [Lutz and Sattler, 2001]. r (, , ∃R.C, ∀R.C, ¬, {individual }, ≶ R.C) () satisfiability [Tobies, 2001b]. r (, , ¬, ∃R.C, ∀R.C, ≤≥ R) () (known as ALCN R) satisfiability w.r.t. a set of axioms (only membership was proved) in [Buchheit et al., 1993a]).
3.9.7 Undecidability results r FL− (◦, =), which is a subset of the language of the knowledge representation system Kl-One [Schmidt-Schauß, 1989] (see Subsection 3.6.1 for undecidability of FL− (◦, ⊆) ). r FL− (◦, ⊆,− , functionality, R|C ), which is a subset of the language of the knowledge representation system Nikl [Patel-Schneider, 1989a]. r (), (, ◦, ¬) (known as U ) [Schild, 1989].
136
F. M. Donini
r ALCN (◦, ,− ), ALCN (◦, ) satisfiability w.r.t. a set of axioms [Baader and Sattler, 1999].
Acknowledgements I thank Franz Baader for useful and stimulating discussions on the proofs of Lemmas 3.34, 3.35, and many other comments and help. I am indebted to Maurizio Lenzerini, Daniele Nardi, Werner Nutt and Andrea Schaerf, co-authors of many papers containing results presented in this chapter. I thank also Fabio Massacci for involving me in the experimental evaluation of reasoning algorithms. Giuseppe De Giacomo spent some time discussing automata with me, and Diego Calvanese made helpful comments on an early draft; I thank them both. The work has been supported by the Italian CNR (projects LAICO, DeMAnD, “Metodi di Ragionamento Automatico nella modellazione ed analisi di dominio”), and the Italian MURST (project MOSES).
4 Relationships with other Formalisms ULRIKE SATTLER DIEGO CALVANESE RALF MOLITOR
Abstract In this chapter, we are concerned with the relationship between Description Logics and other formalisms, regardless of whether they were designed for knowledge representation issues or not. We concentrate on those representation formalisms that either (1) had or have a strong influence on Description Logics (e.g., modal logics), (2) are closely related to Description Logics for historical reasons (e.g., semantic networks and structured inheritance networks), or (3) have similar expressive power (e.g., semantic data models). There are far more knowledge representation formalisms than those mentioned in this chapter. For example, “verb-centered” graphical formalisms like those introduced by Simmons [1973] are not mentioned since we believe that their relationship with Description Logics is too weak. 4.1 AI knowledge representation formalisms In artificial intelligence (AI), various “non-logical” knowledge representation formalisms were developed, motivated by the belief that classical logic is inadequate for knowledge representation in AI applications. This belief was mainly based upon cognitive experiments carried out with human beings and the wish to have representational formalisms that are close to the representations in human brains. In this section, we discuss some of these formalisms, namely semantic networks, frame systems, and conceptual graphs. The first two formalisms are mainly presented for historical reasons since they can be regarded as ancestors of Description Logics. In contrast, the third formalism can be regarded as a “sibling” of Description Logics since both have similar ancestors and live in the same time. 4.1.1 Semantic networks Semantic networks originate in Quillian’s semantic memory models [Quillian, 1967], a graphical formalism designed to represent “word concepts” in a 137
138
U. Sattler, D. Calvanese, and R. Molitor Animal
Bird
Canary
- can sing - is yellow
- has skin - can move around - eats - breathes
- has wings - can fly - has feathers
Ostrich
- has long, thin legs - is tall - can’t fly
Fish
Shark
- has fins - can swim - has gills
- can bite - is dangerous
- is pink
Salmon - is edible
- swims upstreams to lay eggs
Fig. 4.1. A semantic network describing animals.
definitorial way, i.e., similar to the one that can be found in an encyclopedia definition. This formalism is based on labeled graphs with different kinds of edges and nodes. Besides others, Quillian’s networks allow subclass–superclass edges, and and or edges, and subject–object edges between nodes. Following Quillian’s memory models, a great variety of semantic network formalisms were proposed; an overview of their history can be found in [Brachman, 1979]. In general, semantic networks distinguish between concepts (denoted by generic nodes) and individuals (denoted by individual nodes), and between subclass–superclass edges and property edges. Using subclass–superclass links, concepts can be organised in a specialization hierarchy. Using property edges, properties can be associated to concepts, that is, to the individuals belonging to the concept the properties are associated with. Figure 4.1 contains a hierarchy of animals, birds, fishes, etc. Interestingly, the cognitive adequacy of this approach was proven empirically [Collins and Quillian, 1970]. The two kinds of edges interact with each other: a property is inherited along subclass–superclass edges – if not modified in a more specific class. For example, birds are equipped with skin because animals are equipped with skin, and birds inherit this property because of the subclass–superclass edge between birds and animals. In contrast, although ostriches are birds, they do not inherit the property “can fly” from birds because this property is “modified” for ostriches.
4
Relationships with other Formalisms
139
Intuitively, it should be possible to translate subclass–superclass edges into concept definitions, for example,1 Shark ≡ Fish CanBite IsDangerous. According to Brachman [1985], the above translation is not always intended. Subclass–superclass edges can also be read as primitive concept definitions, that is, they impose only necessary properties but not sufficient ones. Hence the above translation might better be Shark Fish CanBite IsDangerous. Due to the lack of a precise semantics, there are even more readings of subclass– superclass edges, which are discussed in [1975; 1977b; 1985]. A prominent reading is that of inheritance by default, which can be specified in different ways, thus leading to misunderstandings and to the question which of these specifications is the “right” one (see also Chapter 6). As a consequence of this ambiguity, new formalisms mainly evolved along two lines: (1) To capture inheritance by default, various non-monotonic inheritance systems, respectively various ways of reasoning in non-monotonic inheritance systems, were investigated [Touretzky et al., 1987; 1991; Selman and Levesque, 1993]. (2) To capture the monotonic aspects of semantic networks, a new graphical formalism, structured inheritance networks, was introduced and implemented in the system KlOne [Brachman, 1979; Brachman and Schmolze, 1985]. It was designed to cover the declarative, monotonic aspects of semantic networks, and hence did not specify the way in which (non-monotonic multiple) inheritance was supposed to function in conflicting situations. Brachman and Schmolze [1985] argue that Kl-One does not allow cancellation or inheritance by default because such mechanisms would make taxonomies meaningless. Indeed, all properties of a given concept could be canceled, so that it would fit everywhere in the taxonomy. Their proposition is to make a strict separation of default assertions and conceptual descriptions. Brachman and Schmolze [1985], besides pointing out the computation of the taxonomy as a core system service, describe the meaning of various concept constructors that were implemented in Kl-One, for example conjunction, universal value restrictions, role hierarchies, role-value-maps, etc. Moreover, we find a clear distinction between individuals and concepts, and between a terminological and an assertional formalism. Later [Levesque and Brachman, 1987], Kl-One was provided with a well-defined “Tarski-style” semantics which fixed the precise meaning of its graphical constructs and led to the definition of the first Description Logic [Levesque and Brachman, 1987], at that time also called terminological languages, concept languages, or 1
In the following, we use standard Description Logics as defined in Chapter 2.
140
U. Sattler, D. Calvanese, and R. Molitor
Kl-One based languages. Besides giving a precise meaning to semantic networks, this formalization allowed the investigation of inference algorithms with respect to their soundness, completeness, and computational complexity. For example, it turned out that subsumption in Kl-One is undecidable, mainly due to role-valuemaps [Schmidt-Schauß, 1989].
4.1.2 Frame systems Minsky [1981] introduced frame systems as an alternative to logic-oriented approaches to knowledge representation, which he thought were not adequate to “simulate common-sense thinking” for various reasons. His system provides recordlike data structures to represent prototypical knowledge concerning situations and objects and includes defaults, multiple perspectives, and analogies. Nowadays, semantic networks and frame systems are often viewed as the same family of formalisms. However, in standard semantic networks, properties are restricted to primitive, atomic ones, whereas, in general, properties in frame systems can be complex concepts described by frames. One goal of the frame approach was to gather all relevant knowledge about a situation (e.g., entering a restaurant) in one object instead of distributing this knowledge across various axioms. Roughly speaking, a situation (or an object) is described in one frame. A frame contains slots, similar to entries in a record, to represent properties of the situation described by the frame. Reasoning comes in two shapes: (1) Using a “partial matching”, more specific frames are embedded into more general ones, thus giving, for example, meaning to a new situation or classifying an object as a kind of, say, bird. (2) Searching for slot fillers to collect more information concerning a specific situation. A variety of expert systems [Fikes and Kehler, 1985; Christaller et al., 1992; Gen, 1995; Flex, 1999] are based on a frame-based formalism and are further enhanced with rules, triggers, daemons, etc. Despite the fact that frame systems were designed as an alternative to logic, the monotonic, declarative part of this formalism could be shown to be captured using first-order predicate logic [Hayes, 1977; 1979]. To our knowledge, no precise semantics could be given for the non-declarative, non-logical, or non-monotonic aspects of frame systems. Hence neither their expressive power nor the quality of the corresponding reasoning algorithms and services can be compared with other formalisms. In the remainder of this section, we show how the monotonic part of a framebased knowledge base can be translated into an ALUN TBox [Calvanese et al., 1994].2 Since there is no standard syntax for frame systems, we have chosen to use 2
Not only the translation but also the example are by Calvanese et al. [1994].
4
Relationships with other Formalisms
141
basically the notation adopted by Fikes and Kehler [1985], which is used also in the Kee3 system. A frame definition is of the form Frame: F in KB F E, where F is a frame name and E is a frame expression, i.e., an expression formed according to the following syntax: E −→ SuperClasses: F1 , . . . , Fh MemberSlot: S1 ValueClass: H1 Cardinality.Min: m 1 Cardinality.Max: n 1 ··· MemberSlot: Sk ValueClass: Hk Cardinality.Min: m k Cardinality.Max: n k . Fi denotes a frame name, S j denotes a slot name, m j and n j denote positive integers, and H j denotes slot constraints. A slot constraint can be specified as follows: H −→ F | (INTERSECTION H1 H2 ) | (UNION H1 H2 ) | (NOT H ). A frame knowledge base F is a set of frame definitions. For example, Figure 4.2 shows a simple Kee knowledge base describing courses in a university. Cardinality restrictions are used to impose a minimum and maximum number of students that may be enrolled in a course, and to express that each course is taught by exactly one individual. The frame AdvCourse represents courses which enroll only graduate students, i.e., students who already have a degree. Basic courses, on the other hand, may be taught only by professors. Hayes [1979] gives a semantics to frame definitions by translating them to firstorder formulae in which frame names are translated to unary predicates, and slots are translated to binary predicates. In order to translate frame knowledge bases to ALUN knowledge bases, we first define the function that maps each frame expression into an ALUN concept expression as follows: Each frame name F is mapped onto an atomic concept (F), each slot name S onto an atomic role (S), and each slot constraint H onto the corresponding Boolean combination (H ) of concepts. Then, every frame 3
Kee is a trademark of Intellicorp. Note that Kee users does not directly specify their knowledge base in this notation, but are allowed to define frames interactively via the graphical system interface.
142
U. Sattler, D. Calvanese, and R. Molitor Frame: Course in KB University MemberSlot: enrolls ValueClass: Student Cardinality.Min: 2 Cardinality.Max: 30 MemberSlot: taughtby ValueClass: (UNION GradStudent Professor) Cardinality.Min: 1 Cardinality.Max: 1 Frame: AdvCourse in KB University SuperClasses: Course MemberSlot: enrolls ValueClass: (INTERSECTION GradStudent (NOT Undergrad)) Cardinality.Max: 20
Frame: BasCourse in KB University SuperClasses: Course MemberSlot: taughtby ValueClass: Professor Frame: Professor in KB University Frame: Student in KB University Frame: GradStudent in KB University SuperClasses: Student MemberSlot: degree ValueClass: String Cardinality.Min: 1 Cardinality.Max: 1 Frame: Undergrad in KB University SuperClasses: Student
Fig. 4.2. A Kee knowledge base.
expression of the form SuperClasses: F1 , . . . , Fh MemberSlot: S1 ValueClass: H1 Cardinality.Min: m 1 Cardinality.Max: n 1 ··· MemberSlot: Sk ValueClass: Hk Cardinality.Min: m k Cardinality.Max: n k is mapped into the concept (F1 ) · · · (Fh ) ∀(S1 ).(H1 ) m 1 (S1 ) n 1 (S1 ) ··· ∀(Sk ).(Hk ) m k (Sk ) n k (Sk ). Making use of the mapping , we obtain the ALUN knowledge base (F) corresponding to a frame knowledge base F, by introducing in (F) an inclusion assertion (F) (E) for each frame definition Frame: F in KB F E in F. The ALUN knowledge base corresponding to the Kee knowledge base given in Figure 4.2 is shown in Figure 4.3. The correctness of the translation follows from the correspondence between the set-theoretic semantics of ALUN and the first-order interpretation of frames [Hayes, 1979; Borgida, 1996; Donini et al., 1996b]. Consequently,
4
Relationships with other Formalisms
143
Course # ∀enrolls.Student 2 enrolls 30 enrolls ∀taughtby.(Professor GradStudent) = 1 taughtby AdvCourse Course ∀enrolls.(GradStudent ¬Undergrad) 20 enrolls BasCourse Course ∀taughtby.Professor Student ∀degree.String = 1 degree GradStudent Undergrad Student
Fig. 4.3. The ALUN knowledge base corresponding to the Kee knowledge base in Figure 4.2. r verifying whether a frame F is satisfiable in a knowledge base and r identifying which of the frames are more general than a given frame
are captured by concept satisfiability and concept subsumption in ALUN knowledge bases. Hence reasoning for the monotonic, declarative part of frame systems can be reduced to concept satisfiability and concept subsumption in ALUN knowledge bases. 4.1.3 Conceptual graphs Besides Description Logics, conceptual graphs [Sowa, 1984] can be viewed as descendants of frame systems and semantic networks. Conceptual graphs (CGs) are a rather popular (especially in natural language processing) and expressive formalism for representing knowledge about an application domain in a graphical way. They are given a formal semantics, e.g., by translating them into (first-order) formulae. In the CG formalism, one is, just as for Description Logics, not only interested in representing knowledge, but also in reasoning about it. Reasoning services for CGs are, for example, deciding whether a given graph is valid, i.e., whether the corresponding formula is valid, or whether a graph g is subsumed by a graph h, i.e., whether the formula corresponding to g implies the formula corresponding to h. Since CGs can express all of first-order predicate logic [Sowa, 1984], these reasoning problems are undecidable for general CGs. In the literature [Sowa, 1984; Wermelinger, 1995; Kerdiles and Salvat, 1997] one can find complete calculi for validity of CGs, but implementations of these calculi may not terminate for formulae that are not valid. An approach to overcoming this problem, which has also been employed in the area of Description Logics, is to identify decidable fragments of the formalism. The most prominent decidable fragment of CGs is the class of simple conceptual graphs (SGs) [Sowa, 1984], which corresponds to the conjunctive, positive, and existential fragment of first-order predicate logic (i.e., existentially quantified conjunctions of atoms). Even for this simple fragment, however, subsumption is still an np-complete problem [Chein and Mugnier, 1992].4 4
Since SGs are equivalent to conjunctive queries (see also Chapter 16), the np-completeness of subsumption of SGs is also an immediate consequence of np-completeness of containment of conjunctive queries [Chandra and Merlin, 1977].
144
U. Sattler, D. Calvanese, and R. Molitor
Although Description Logics and CGs are employed in very similar applications, precise comparisons were published, to our knowledge, only recently [Coupey and Faron, 1998; Baader et al., 1999c]. These comparisons are based on translations of CGs and DL concepts into first-order formulae. It turned out that the two formalisms are quite different for several reasons: (i) CGs are translated into closed first-order formulae, whereas DL concepts are translated into formulae in one free variable; (ii) since Description Logics use a variable-free syntax, certain identifications of variables expressed by cycles in SGs and by co-reference links in CGs cannot be expressed in Description Logics; (iii) in contrast to CGs, most Description Logics considered in the literature only allow unary and binary relations and not relations of arity greater than 2; (iv) SGs are interpreted by existential sentences, whereas almost all Description Logics considered in the literature allow for universal quantification.
Possibly as a consequence of these differences, so far no natural fragment of CGs that corresponds to a Description Logic has been identified. In the sequel, we will illustrate the main aspects of the correspondence result presented by Baader et al. [1999c], which strictly extends the one proposed by Coupey and Faron [1998]. Simple conceptual graphs Simple conceptual graphs (SGs) as introduced by Sowa [1984] are the most prominent decidable fragment of CGs. They are defined with respect to a so-called support. Roughly speaking, the support is a partially ordered signature that can be used to fix the a primitive ontology of a given application domain. It introduces a set of concept types (unary predicates), a set of relation types (n-ary predicates), and a set of individual markers (constants). As an example, consider the support S shown in Figure 4.4, where is the most general concept type representing the entire domain. The partial ordering on the individual markers is flat, i.e., all individual markers are pairwise incomparable and the so-called generic marker ∗ is more general than all individual markers. In this example, all relation types are assumed to have arity 2 and to be pairwise incomparable except for hasDescendants, which is more general than hasChild. The partial orderings on the types yield a fixed specialization hierarchy for these types that must be taken into account when computing subsumption relations between SGs. For binary relation types, this partial ordering resembles a role hierarchy in Description Logics. An SG over the support S is a labeled bipartite graph of the form g = (C, R, E, ), where C is a set of concept nodes, R is a set of relation nodes, E ⊆ C × R is the edge relation L, and l is a labeling of concept nodes.
4
Relationships with other Formalisms
concept types:
relation types:
145 individual marker: ∗
hasDescendants Human
CSCourse
Male
PETER
MARY attends
hasChild
KR101
likes
Female Student
Fig. 4.4. An example of a support.
g:
h: c0
Female : Mary 1
2
1
Student : ∗
2
1
likes
1 attends
1 hasChild
hasChild
2 c2
Female : ∗ 2
hasChild
hasChild
c1 Human : PETER
d0
1 d1
Human : ∗ 2
2 Human : ∗
d2 1
likes
2 c3
CScourse : KR101
Fig. 4.5. Two simple graphs.
As an example, consider the SGs depicted in Figure 4.5: the SG g describes a woman Mary having a child who likes its grandfather Peter and who attends the computer science course number KR101; the node d0 in the SG h describes all mothers having a child who likes one of its grandparents. Each concept node is labeled by l with a concept type (such as Female) and a referent, i.e., an individual marker (such as MARY) or the generic marker ∗. A concept node is called generic if its referent is the generic marker; otherwise, it is called an individual concept node. Each relation node is labeled with a relation type r (such as hasChild), and its outgoing edges are labeled with indices according to the arity of r . For example, for the binary relation hasChild, there is one edge labeled with 1 (leading to the parent), and one edge labeled with 2 (leading to the child). Simple graphs are given a formal semantics in first-order predicate logic (FOL) by the operator [Sowa, 1984]: each generic concept node is related to a unique variable, and each individual concept node is related to its individual marker. Concept types and relation types are translated into atomic formulae, and the whole SG g is translated into the existentially closed conjunction of all atoms obtained from the nodes in g.
146
U. Sattler, D. Calvanese, and R. Molitor (1)
(2) Female
c0
Female: MARY
c1
Student: MARY
(3)
Student
FemStud
d0 FemStud: MARY
e0 {Female, Student}: MARY
Fig. 4.6. Expressing conjunction of concept types in SGs.
In our example, this operator yields (g) = ∃x1 .(Female(MARY) ∧ Human(PETER) ∧ Student(x1 ) ∧ CScourse(KR101) ∧ hasChild(PETER, MARY) ∧ hasChild(MARY, x1 ) ∧ likes(x1 , PETER) ∧ attends(x1 , KR101)), (h) = ∃x0 x1 x2 .(Female(x0 ) ∧ Human(x1 ) ∧ Human(x2 ) ∧ hasChild(x1 , x0 ) ∧ hasChild(x0 , x2 ) ∧ likes(x2 , x1 )), where x1 in (g) is (resp. x0 , x1 , and x2 in (h) are) introduced for the generic concept node c2 (resp. the generic concept nodes d0 , d1 , and d2 ). In general, there are three different ways of expressing conjunction of concept types. For example, suppose we want to express that Mary is both female and a student. This can be expressed by an SG containing one individual concept node for each statement (see Figure 4.6(1)).5 A second possibility is to introduce a new concept type in the support for a common specialization of Female(MARY) and Student(MARY) (see Figure 4.6(2)). Finally, such a conjunction can be represented by labeling the corresponding concept node with a set of concept types instead of a single concept type (see Figure 4.6(3); for details on how to handle SGs labeled with sets of concept types see [Baader et al., 1999c]). Subsumption with respect to a support S for two SGs g, h is defined by a so-called projection from h to g [Sowa, 1984; Chein and Mugnier, 1992]: g is subsumed by h w.r.t. S iff there exists a mapping from h to g that (1) maps concept nodes (resp. relation nodes) in h onto more specific (w.r.t. the partial ordering in S) concept nodes (resp. relation nodes) in g and that (2) preserves adjacency. In our example (Figure 4.5), it is easy to see that g is subsumed by h, since mapping di onto ci for 0 ≤ i ≤ 2 yields a projection w.r.t. S from h to g. Subsumption for SGs is an np-complete problem [Chein and Mugnier, 1992]. In the restricted case where the subsumer h is a tree, subsumption can be decided in polynomial time [Mugnier and Chein, 1992]. 5
Note that this solution could not be applied if the individual marker MARY were replaced by the generic marker ∗, because the two resulting generic concept nodes would be interpreted by different variables.
4
Relationships with other Formalisms
147
Concept descriptions and simple graphs In order to determine a Description Logic corresponding to (a fragment of) SGs, one must take into account the differences between Description Logics and CGs mentioned before. r Most Description Logics only allow role terms corresponding to binary relations and concept descriptions describing connected structures. Thus, Baader et al. [1999c] and Coupey and Faron [1998] restrict their attention to connected SGs over a support S containing only unary and binary relation types. r Due to the different semantics of SGs and concept descriptions (closed formulae vs. formulae in one free variable), Coupey and Faron restrict their attention to SGs that are trees. Baader et al. introduce so-called rooted SGs, i.e., SGs that have one distinguished node called the root. An adaption of the operator yields a translation of a rooted SG g into an FO formula (g)(x0 ) with one free variable x0 . r Since all Description Logics considered in the literature allow conjunction of concepts, Baader et al. allow concept nodes labeled with a set of concept types instead of a single concept type in order to express conjunction of atomic concepts in SGs. Coupey and Faron avoid the problem of expressing conjunction of atomic concepts: they just do not allow (1) conjunctions of atomic concepts in concept descriptions, and (2) individual concept nodes in SGs.
The Description Logic considered by Baader et al., denoted by ELIRO1 , allows existential restrictions and intersection of concept descriptions (EL), inverse roles (I), intersection of roles (R), and unary one-of concepts (O1 ). For the constants occurring in the one-of concepts the unique name assumption applies, i.e., all constants are interpreted as different objects. Coupey and Faron only consider a fragment of the Description Logic ELI. In both papers, the correspondence result is based on translating concept descriptions into syntax trees. For example, consider the ELIRO1 -concept C = Female ∃hasChild− .(Human {PETER}) ∃(hasChild likes).(Male Student ∃attends.CScourse) describing all daughters of Peter who have a fond child that is a student attending a computer science course. The syntax tree corresponding to C is depicted on the left-hand side of Figure 4.7. One can show [Baader et al., 1999c] that, if concept descriptions C are restricted to contain at most one unary one-of concept in each conjunction, the corresponding syntax tree TC can be easily translated into an equivalent rooted SG gC that is a tree6 (see Figure 4.7). Conversely, every rooted SG g that is a tree and that contains only binary relation types can be translated into an equivalent 6
In this context, a tree may contain more than one relation between two adjacent concept nodes.
148
U. Sattler, D. Calvanese, and R. Molitor
TC :
gC :
c0 : Female
c0
{Female} : ∗ 2
hasChild−
likes hasChild
c1
{Human} : PETER
hasChild
likes
1 c1 : Human, {PETER}c2 : Male, Student
1
1
hasChild
2
2
c2 {Male, Student} : ∗ 1 attends
attends
2 c3 : CScourse
c3
{CScourse} : ∗
Fig. 4.7. Translating concept descriptions into simple graphs.
ELIRO1 -concept description C g . There are, however, rooted SGs that can be translated into equivalent ELIRO1 -concept descriptions though they are not trees. For example, the rooted SG g depicted in Figure 4.5 is equivalent to the concept description C g = {MARY} Female ∃hasChild− .(Human {PETER}) ∃hasChild.(Student ∃attends.({KR101} CScourse) ∃likes.{PETER}).
In general, the above correspondence result can be strengthened as follows [Baader et al., 1999c]: every rooted SG g containing only binary relation types can be transformed into an equivalent rooted SG that is a tree if each cycle in g with more than two concept nodes contains at least one individual concept node. Hence, each such rooted SG can be translated into an equivalent ELIRO1 -concept description. Note that the SG h with root d0 in Figure 4.5 cannot be translated into an equivalent ELIRO1 -concept description C h because, in ELIRO1 , one cannot express that the grandparent (represented by the concept node d1 ) and the human liked by the child (represented by the concept node d2 ) must be the same person. The correspondence result between ELIRO1 and rooted SGs allows the tractability result for subsumption between SGs that are trees to be transferred to ELIRO1 . Furthermore, the characterization of subsumption based on projections between graphs was adapted to ELIRO1 and other Description Logics, e.g., ALE, and is used in the context of inference problems like matching and computing least common subsumers [Baader and K¨usters, 1999; Baader et al., 1999b]. Conversely, the correspondence result can be used as a basis for determining more expressive fragments of conceptual graphs, for which validity and subsumption are decidable. Based on an appropriate characterization of a fragment of conceptual graphs corresponding to a more expressive Description
4
Relationships with other Formalisms
149
Logic (like ALC), one could use algorithms for these Description Logics to decide validity or subsumption of graphs in this fragment.
4.2 Logical formalisms In this section, we will investigate the relationship between Description Logics and other logical formalisms. Traditionally, the semantics of Description Logics is given in a Tarski-style model-theoretic way. Alternatively, it can be given by a translation into predicate logic, where it depends on the Description Logic whether this translation yields first-order formulae or whether it goes beyond first-order, as is the case for Description Logics that allow, e.g., the transitive closure of roles or fixpoints. Due to the variable-free syntax of Description Logics and the fact that concepts denote sets of individuals, the translation of concepts yields formulae in one free variable. Following the definition by Borgida [1996], a concept C and its translation π(C)(x) are said to be equivalent if and only if, for all interpretations7 I = (I , ·I ) and all a ∈ I , we have a ∈ C I iff I |= π(C)(a). A Description Logic DL is said to be less expressive than a logic L if there is a translation that translates all DL-concepts into equivalent L formulae. Such a translation is called preserving. Note that there are various other ways in which equivalence of formulae and logics being “less expressive than” others could have been defined [Baader, 1996a; Kurtonina and de Rijke, 1997; Areces and de Rijke, 1998]. For example, a less strict definition is the one that only asks the translation to preserve satisfiability. To start with, we give a translation π that translates ALC-concepts into predicate logic and which will be useful in the remainder of this section. For those familiar with modal logics, note that this translation parallels the one from propositional modal logic [van Benthem, 1983; 1984]; the close relationship between modal logic and Description Logic will be discussed in Subsection 4.2.2. For ALC, the translation of concepts into predicate logic formulae can be defined in such a way that the resulting formulae involve only two variables, say x, y, and only unary and binary predicates. In the following, Lk denotes the first-order predicate logic over unary and binary predicates with k variables. The translation is given by two mappings πx and π y from ALC-concepts into 2 L formulae in one free variable. Each concept name A is also viewed as a unary predicate symbol, and each role name R is viewed as a binary predicate symbol. 7
In the following, we view interpretations both as DL and predicate logic interpretations.
150
U. Sattler, D. Calvanese, and R. Molitor
For ALC-concepts, the translation is inductively defined as follows: πx (A) πx (C D) πx (C D) πx (∃R.C) πx (∀R.C)
= = = = =
A(x), π y (A) πx (C) ∧ πx (D), π y (C D) πx (C) ∨ πx (D), π y (C D) ∃y.R(x, y) ∧ π y (C), π y (∃R.C) ∀y.R(x, y) ⊃ π y (C), π y (∀R.C)
= = = = =
A(y), π y (C) ∧ π y (D), π y (C) ∨ π y (D), ∃x.R(y, x) ∧ πx (C), ∀x.R(y, x) ⊃ πx (C).
Other concept and role constructors that can easily be translated into first-order predicate logic without involving more than two variables are inverse roles, conjunction, disjunction, and negation on roles, and one-of.8 If a Description Logic allows number restrictions n R, n R, the translation involves either counting quantifiers ∃≥n , ∃≤n (and still involves only two variables) or equality (and involves an unbounded number of variables): πx ( n R) = ∃≥n y.R(x, y) = ∃y1 , . . . , yn . i= j yi = y j ∧ i R(x, yi ) πx ( n R) = ∃≤n y.R(x, y) = ∀y1 , . . . , yn+1 . i= j yi = y j ⊃ i ¬R(x, yi ). For qualified number restrictions, the translations can easily be modified with the same effect on the number of variables involved. So far, all Description Logics have been less expressive than first-order predicate logic (possibly with equality or counting quantifiers). In contrast, the expressive power of a Description Logic including the transitive closure of roles goes beyond first-order logic: First, it is easy to see that expressing transitivity (ρ + (x, y) ∧ ρ + (y, z)) ⊃ ρ + (x, z) involves at least three variables. To express that a relation ρ + is the transitive closure of ρ, we first need to enforce that ρ + is a transitive relation including ρ – which can easily be axiomatized in first-order predicate logic. Secondly, we must enforce that ρ + is the smallest transitive relation including ρ – which, as a consequence of the Compactness Theorem, cannot be expressed in first-order logic. Internalization of Knowledge Bases: So far, we have been concerned with preserving translations of concepts into logical formulae, and thus could reduce satisfiability of concepts to satisfiability of formulae in the target logic. In Description Logics, however, we are also concerned with concept consistency and logical implication w.r.t. a TBox, and with ABox consistency w.r.t. a TBox. Furthermore, TBoxes differ in whether they are restricted to be acyclic, allow cyclic definitions, or allow general concept inclusion axioms (see Chapter 2 for details). In first-order logic, the equivalent to a TBox assertion is simply a universally quantified formula, and thus it is not necessary to make the above-mentioned distinction between, for example, pure concept satisfiability and satisfiability with 8
In this case, the translation is to L2 with constants.
4
Relationships with other Formalisms
151
respect to a TBox – provided that cyclic TBoxes are read with descriptive semantics [Baader, 1990a; Nebel, 1991] (cyclic TBoxes read with least or greatest fixpoint semantics go beyond the expressive power of first-order predicate logic). In the following, we consider only the most expressive form of TBoxes, namely those allowing general concept inclusion axioms. Given a preserving translation π from DL concepts into first-order formulae and a TBox T = {Ci Di | 1 ≤ i ≤ n}, we define n π(T ) = ∀x. (πx (Ci ) ⊃ πx (Di )). i=1
Then it is easy to show that: r A concept C is satisfiable with respect to T iff the formula π (C) ∧ π (T ) is satisfiable. x r A concept C is subsumed by a concept D with respect to T iff the formula πx (C) ∧ ¬πx (D) ∧ π(T ) is unsatisfiable. r Given two index sets I , J , an ABox {Rk (ai , a j ) | +i, j, k, ∈ I } ∪ {C j (ai ) | +i, j, ∈ J } is consistent with T iff the formula Rk (ai , a j ) ∧ πx (C j )(ai ) ∧ π (T ) +i, j,k,∈I
+i, j,∈J
is satisfiable, where the ai -s in the formula are constants corresponding to the individuals in the ABox.
Observe that, if all concepts in a TBox T can be translated to L2 (resp. C 2 ), then the translation π(T ) of T is also a formula of L2 (resp. C 2 ). Hence in first-order logic, reasoning with respect to a knowledge base (consisting of a TBox and possibly an ABox) is not more complex than reasoning about concept expressions alone – in contrast to the complexity of reasoning for most Description Logics, where considering even acyclic TBoxes can make a considerable difference (for example, see [Calvanese, 1996b; Lutz, 1999a]). This gap is not surprising since first-order predicate logic is far more complex than most Description Logics, namely undecidable. In the following, we investigate logics that are more closely related to Description Logics, namely restricted variable fragments, modal logics, and guarded fragments.
4.2.1 Restricted variable fragments One way to define decidable fragments of first-order logic is to restrict the set of variables which are allowed inside formulae and the arity of relation symbols. As mentioned in the previous section, we use Lk to denote first-order predicate logic over unary and binary predicates with at most k variables. Analogously, C k denotes
152
U. Sattler, D. Calvanese, and R. Molitor
first-order predicate logic over unary and binary predicates with at most k variables and counting quantifiers ∃≥n , ∃≤n . With the exception of the Description Logics introduced by Calvanese et al. [1998a] and Lutz et al. [1999], the translation of DL concepts into predicate logic formulae involves predicates of arity at most 2. From the translations in the previous section, it follows immediately that r ALCR is less expressive than L2 and that r ALCN R is less expressive than C 2 .
As we have shown above, general TBox assertions can be translated into L2 formulae. These facts together with the linearity of the translation yield upper bounds for the complexity of ALCR and ALCN R (even though these bounds are far from being tight): L2 and C 2 are known to be NExpTime-complete [Gr¨adel et al., 1997a; Pacholski et al., 2000] (for C 2 , this is true only if numbers in counting quantifiers are assumed to be coded in unary, an assumption often made in Description Logics); hence satisfiability and subsumption with respect to a (possibly cyclic) TBox are in NExpTime for ALCR and ALCN R. However, both L2 and C 2 are far more expressive than ALCR and ALCN R, respectively. For example, both logics allow the negation of binary predicates, i.e., subformulae of the form ¬R(x, y). In Description Logics, this corresponds to negation of roles, an operator that is rarely considered in Description Logics, except in the weakened form of difference9 [De Giacomo, 1995; Calvanese et al., 1998a] (exceptions are the work by Mameide and Montero [1993] and Lutz and Sattler [2000b], which deal with genuine negation of roles). Moreover, L2 and C 2 allow “global” quantification, i.e., formulae of the form ∃x.(x) or ∀x.(x) that talk about the whole interpretation domain. In contrast, quantification in Description Logics is, in general, “local”, e.g., concepts of the form ∀R.C only constrain all R-successors of an individual. Borgida [1996] presents a variety of results stating that a certain Description Logic is less expressive than, or as expressive as, a certain fragment of first-order logic. We mention only the most important ones: r ALC extended with (role constructors) full Boolean operators on roles, inverse roles, cross-product of two concepts, an identity role id, and (concept constructors) individuals (“one-of”), is as expressive as L2 (and therefore decidable and, more precisely, NExpTime-complete). 9
Difference of roles is easier to deal with than genuine negation, since it does not destroy “locality” of quantification.
4
Relationships with other Formalisms
153
r A further extension of this logic with all sorts of role-value-maps is as expressive as L3 (and therefore undecidable).
Since both extensions include full Boolean operators on roles, they can simulate a universal role using the complex role R ¬R, and thus general TBox assertions can be internalized (see Chapter 5). Thus, for these two extensions, reasoning with respect to (possibly cyclic) TBoxes can be reduced to pure concept reasoning – i.e., the TBox can be internalized – and the above complexity results include both sorts of reasoning problems. Later, a second Description Logic was presented that is as expressive as L2 [Lutz et al., 2001a]. In contrast to the logic in [Borgida, 1996], this logic does not allow a role to be built as the cross-product of two concepts, and it does not provide individuals. However, using the identity role id (with idI = {(x, x) | x ∈ I } for all interpretations I), we can guarantee that (the atomic concept) N is interpreted as an individual, i.e., a singleton set, using the following TBox axiom: ∃(R ¬R).(N ∀¬id.¬N ).
4.2.2 Modal logics Modal logics and Description Logics have a very close relationship, which was first described in [Schild, 1991]. In a nutshell, Schild [1991] points out that ALC can be seen as a notational variant of the multi-modal logic Km . Later, a similar relationship was observed between more expressive modal logics and Description Logics [De Giacomo and Lenzerini, 1994a; Schild, 1994], namely between (extensions of) Propositional Dynamic Logic pdl and (extensions of) ALC reg , i.e., ALC extended with regular roles. Following and exploiting these observations, various (complexity) results for Description Logics were found by translating results from modal or propositional dynamic logics and the µ-calculus to Description Logics [De Giacomo and Lenzerini, 1994a; 1994b; Schild, 1994; De Giacomo, 1995]. Moreover, upper bounds for the complexity of satisfiability problems were tightened considerably, mostly in parallel with the development of decision procedures suitable for implementations and optimization techniques for these procedures [De Giacomo and Lenzerini, 1995; De Giacomo, 1995; Horrocks et al., 1999]. In the following, we will describe the relation between modal logics and Description Logics in more detail. We start by introducing the basic modal logic K; for a nice introduction and overview see [Halpern and Moses, 1992; Blackburn et al., 2001]. Given a set of propositional letters p1 , p2 ,. . . , the set of formulae of the modal logic K is the smallest set that
154
U. Sattler, D. Calvanese, and R. Molitor
r contains p , p , . . . , 1 2 r is closed under Boolean connectives ∧, ∨, and ¬, and r if it contains φ, then it also contains ✷φ and ✸φ.
The semantics of modal formulae is given by so-called Kripke structures M = +S, π, K,, where S is a set of so-called states or worlds (which correspond to individuals in Description Logics), π is a mapping from the set of propositional letters into sets of states (i.e., π( pi ) is the set of states in which pi holds), and K is a binary relation on the states S, the so-called accessibility relation (which can be seen as the interpretation of a single role). The semantics is then given as follows, where, for a modal formula φ and a state s ∈ S, the expression M, s |= φ is read as “φ holds in M in state s”. M, s M, s M, s M, s M, s M, s
|= pi |= φ1 ∧ φ2 |= φ1 ∨ φ2 |= ¬φ |= ✸φ |= ✷φ
iff iff iff iff iff iff
s ∈ π( pi ) M, s |= φ1 and M, s |= φ2 M, s |= φ1 or M, s |= φ2 M, s |= φ there exists s ∈ S with (s, s ) ∈ K and M, s |= φ for all s ∈ S, if (s, s ) ∈ K, then M, s |= φ.
In contrast to many other modal logics, K does not impose any restrictions on the Kripke structures. For example, the modal logic S4 is obtained from K by restricting the Kripke structures to those where the accessibility relation K is reflexive and transitive. Other modal logics restrict K to be symmetric, well-founded, an equivalence relation, etc. Moreover, the number of accessibility relations may be different from one. Then we are talking about multi-modal logics, where each accessibility relation Ki can be thought to correspond to one agent, and is quantified using the multi-modal operators ✷i and ✸i (or, alternatively [i] and +i,). For example, Km stands for the multi-modal logic K with m agents. To establish the correspondence between the modal logic Km and the Description Logic ALC, Schild [1991] gave the following translation f from ALC-concepts using role names R1 , . . . , Rm to Km : f (A) f (C D) f (C D) f (¬(C)) f (∀Ri .C) f (∃Ri .C)
= = = = = =
A, f (C) ∧ f (D), f (C) ∨ f (D), ¬( f (C)), ✷i ( f (C)), ✸i ( f (C)).
Now, Kripke structures can easily be viewed as DL interpretations and vice versa. Then, from the semantics of Km and ALC, it follows immediately that a is an
4
Relationships with other Formalisms
155
instance of an ALC-concept C in an interpretation I iff its translation f (C) holds in a in the Kripke structure corresponding to I. Obviously, we can define an analogous translation from Km formulae into ALC. There exists a large variety of modal logics for a variety of applications. In the following, we will sketch some of them together with their relation to Description Logics. Propositional Dynamic Logics are designed for reasoning about the behavior of programs. Propositional Dynamic Logic (pdl) was introduced by Fischer and Ladner [1979], and proven to have an ExpTime-complete satisfiability problem by Fischer and Ladner [1979] and Pratt [1979]; for an overview, see [Harel et al., 2000]. pdl was designed to describe the (dynamic) behavior of programs: complex programs can be built starting from atomic programs by using non-deterministic choice (∪), composition (;), and iteration (·∗ ). pdl formulae can be used to describe the properties that should hold in a state after the execution of a complex program. For example, the following pdl formula holds in a state if the following condition is satisfied: whenever program α or β is executed, a state is reached where p holds, and there is a sequence of alternating executions of α and β such that a state is reached where ¬ p ∧ q holds: [α ∪ β] p ∧ +(α; β)∗ ,(¬ p ∧ q). Its DL counterpart, ALC reg , was introduced independently by Baader [1991]. ALC reg is the extension of ALC with regular expressions over roles10 and can be seen as a notational variant of Propositional Dynamic Logic. For this correspondence, see the work by Schild [1991] and De Giacomo and Lenzerini [1994a], and Chapter 5. There exist a variety of extensions of pdl (or ALC reg ), for example with inverse roles, counting, or difference of roles, most of which still have an ExpTime satisfiability problem; see, e.g., [Kozen and Tiuryn, 1990; De Giacomo, 1995; De Giacomo and Lenzerini, 1996] and Chapter 5. The µ-calculus can be viewed as a generalization of dynamic logic, with similar applications, and was introduced by Pratt [1981] and Kozen [1983]. It is obtained from multi-modal Km by allowing (least and greated) fixpoint operators to be used on propositional letters. For example, for µ the least fixpoint operator and X a variable for propositional letters, the formula µX. p ∨ +α,X describes the states with a (possibly empty) chain of α edges into a state in which p holds. In pdl, this formula is written +α ∗ , p, and its ALC reg counterpart is ∃Rα∗ . p. However, the µ-calculus is strictly more expressive than pdl or ALC reg : for example, the 10
Regular expressions over roles are built using union (), composition (◦), and the Kleene operator (·∗ ) on roles and can be used in ALC reg -concepts in the place of atomic roles (see Chapter 5).
156
U. Sattler, D. Calvanese, and R. Molitor
µ-calculus can express well-foundedness of a program (binary relation), i.e., there is a µ-calculus formula that has only models in which α is interpreted as a wellfounded relation (that is, a relation without any infinite chains). In [De Giacomo and Lenzerini, 1994b; 1997; Calvanese et al., 1999c], this additional expressive power is shown to be useful in a variety of DL applications. The DL counterpart of the µ-calculus extended with number restrictions [De Giacomo and Lenzerini, 1994b; 1997] and additionally with inverse roles [Calvanese et al., 1999c] is proven to have an ExpTime-complete satisfiability problem. There are two other classes of Description Logics with other forms of fixpoints: in Description Logics, fixpoints first came in through (1) the transitive closure operator [Baader, 1991], which is naturally defined using a least fixpoint, and (2) terminological cycles [Baader, 1990a], which have a different meaning according to whether a greatest, least, or arbitrary fixpoint semantics is employed [Nebel, 1991; Baader, 1996b; K¨usters, 1998]. Temporal logics are designed for reasoning about time-dependent information. They have applications in databases, automated verification of programs, hardware, distributed systems, natural language processing, planning, etc. and come in various shapes; for a survey of temporal logics, see, e.g., [Gabbay et al., 1994]. Firstly, they can differ in whether the basic temporal entities are time points or time intervals. Secondly, they differ in whether they are based on a linear or on a branching temporal structure. In the latter structures, the flow of time might “branch” into various succeeding future times. Finally, they differ in the underlying logic (e.g., Boolean logic or first-order predicate logic) and in the operators provided to speak about the past and the future (e.g., operators that refer to the next time point, to all future time points, to a future time point and all its respective future time points, etc.). In contrast to some other modal logics, temporal logics do not have very close Description Logic relatives. However, they are mentioned here because they are used to “temporalize” Description Logics; for a survey on temporal Description Logics, see [Artale and Franconi, 2001] and Chapter 6. When speaking of the “temporalization” of a logic, e.g., ALC, one usually refers to a logic with twodimensional interpretations. One dimension refers to the flow of time, and each state in this flow of time comprises an interpretation of the underlying logic, e.g., an ALC interpretation. Obviously, the logic obtained depends on the temporal logic chosen for the temporal dimension and on the underlying (description) logic. Moreover, one has the choice of requiring that the interpretation domain of each time point is the same for all states (“constant domain assumption”) or that it is a subset of the domains of the interpretations underlying future states. Examples of temporalized Description Logics can be found in [Wolter and
4
Relationships with other Formalisms
157
Zakharyaschev, 1999d; Sturm and Wolter, 2002; Artale et al., 2001; Schild, 1993; Lutz et al., 2001b]. An alternative to this temporalization is to extend a Description Logic with a temporal concrete domain [Baader and Hanschke, 1991a]. This yields a “two-sorted” interpretation domain, consisting of abstract individuals on the one hand and time points or intervals on the other hand. Abstract individuals are then related to the temporal structure using features (functional roles) and the standard concrete domain constructs. An example of such a logic is described by Lutz [2001a]. Hybrid logics extend standard modal logics with the ability to refer to single states (individuals in the interpretation domain) using so-called nominals (see, e.g., [Blackburn and Seligman, 1995; Areces et al., 2000; Areces, 2000] for hybrid logics related to Description Logics). Nominals are simply special propositional variables which hold in exactly one state. Hybrid logics enjoy a variety of “nice” properties whose description goes beyond the scope of this article; for a summary, see [Areces, 2000]. In Description Logics, there are three standard ways to refer to individuals: (1) we can use ABox individuals in ABoxes, (2) we can use the “oneof” concept constructor {o1 , . . . , ok } which can be applied to individual names oi and which is present in only a few Description Logics (e.g., in the Description Logic described in [Bresciani et al., 1995]), and (3) we can use nominals in a similar way as in hybrid logics (e.g., [De Giacomo, 1995; Tobies, 2000; Horrocks and Sattler, 2001]), namely as special atomic concepts that are interpreted as singleton sets. For most Description Logics, there is a direct mapping between nominals and the “oneof” constructor and back: let oi stand for individual names and, at the same time, nominals. Then we can extend the translation f mentioned above to the “one-of” constructor as follows – provided that we make the unique name assumption (see Chapter 2) either for both the individual names and the nominals or for neither of them: f ({o1 , . . . , ok }) = f ({o1 } · · · {ok }) = o1 ∨ · · · ∨ ok . ABox individuals can be viewed as a restricted form of nominals, and each ABox in a Description Logic L can be translated into a single concept of (the extension of) L with conjunction, existential restriction, and “one-of”: first, translate each assertion of the form C(a) into {a} C and R(a, b) into {a} ∃R.{b}. Next, for C1 , . . . , Cm the resulting concepts of this translation and U a role name not occurring in any Ci , define C = ∃U.Ci . Then each model of
1≤i≤m
158
U. Sattler, D. Calvanese, and R. Molitor
C is a model of the original ABox – provided, again, that the unique name assumption holds either for both individual names and nominals or for neither. Vice versa, each model of the original ABox can easily be extended to a model of C. So far, we have only mentioned the weakest way in which nominals occur in hybrid logics. The next stronger form is formulae of the form ϕ@oi which describes, intuitively, that ϕ holds in the state oi . For U a universal role and Cϕ the translation of ϕ, this formula corresponds to the concept ∃U.(oi Cϕ ). Finally, we only point out that there are even more expressive ways of talking about nominals in hybrid logics using, for example, variables for nominals and quantification over them. So much for the relation between certain modal logics and certain Description Logics. In the remainder of this section, the relationship between standard DL constructors and their counterpart in modal logics is discussed. Number restrictions: In modal logics, the equivalent to qualified number restrictions n R.C and n R.C [Hollunder and Baader, 1991b] is known as graded modalities [Fine, 1972; Van der Hoek and de Rijke, 1995], whereas no equivalent to the standard, weaker form of number restrictions, n R and n R, has been considered explicitly. Number restrictions can be said to play a central role in Description Logics: they are present in almost all knowledge representation systems based on Description Logics, several variants have been investigated with respect to their computational complexity (e.g., see [Tobies, 1999c] for qualified number restrictions, [Baader and Sattler, 1999] for symbolic number restrictions and number restrictions on complex roles), and it was proved by De Giacomo and Lenzerini [1994a] that reasoning with respect to (possibly cyclic) TBoxes for the DL equivalent to converse-pdl extended with qualified number restrictions (on atomic and inverse atomic roles) is ExpTimecomplete. In contrast, they play a minor role in modal and dynamic logics. A more prominent role in dynamic logics is played by deterministic programs, i.e., programs that are to be interpreted as functional relations (see Chapter 2). Ben-Ari et al. [1982] and Parikh [1981] show that validity (and hence satisfiability) of dpdl (i.e., the logic that is obtained from pdl by restricting programs to be deterministic) is ExpTimecomplete. Moreover, Parikh [1981] has shown that pdl formulae can be linearly translated into dpdl formulae, and this translation was used by De Giacomo and Lenzerini [1994a] to code qualified number restrictions into dpdl formulae. As a consequence, we have that satisfiability and subsumption with respect to (possibly cyclic) TBoxes in ALC extended with regular expressions over roles and qualified number restrictions is in ExpTime.
4
Relationships with other Formalisms
159
Transitivity: In modal logics and Description Logics, transitivity comes in (at least) two different shapes, as transitive roles (or frames whose accessibility relation is transitive, as in K4m ) and as the transitive closure operator on roles (or the Kleene star operator on programs in pdl). Interestingly, these two sorts of transitivity differ in their complexity. Fischer and Ladner [1979] prove that satisfiability in pdl is ExpTime-complete. However, the only operator on programs (or roles) used in the hardness proof is the transitive closure operator. Translated to Description Logics, this yields ExpTimecompleteness of satisfiability in ALC extended with the transitive closure operator on roles. In contrast, K4m is known to be of the same complexity as Km (or ALC), namely PSpace-complete [Halpern and Moses, 1992], while providing transitivity: K4m is obtained from Km by restricting Kripke structures to those where the accessibility relations are transitive. Translated into Description Logics, this means that concept satisfiability in ALC extended with transitive roles (i.e., the ability to say that certain roles are interpreted as transitive relations) is in PSpace [Sattler, 1996]. An extension of this Description Logic with role hierarchies was implemented in the Description Logic system Fact [Horrocks, 1998a]. Although pure concept satisfiability of this extension is ExpTime-hard, its highly optimized implementation behaves quite well [Horrocks, 1998b]. Inverse roles: Without the converse operator on programs/time (or the inverse operator on roles), binary relations are restricted to be used asymmetrically: for example, one is restricted to modeling either “into the future” or “into the past”, or one must decide whether to use a role “has-child” or “is-child-of”, but may not use both and relate them in the proper way. Hence in both modal and Description Logics, the converse/inverse operator plays an important role since it overcomes this asymmetry, and a variety of logics allowing this operator have been investigated [Streett, 1982; Vardi, 1985; De Giacomo and Massacci, 1996; Calvanese, 1996a; De Giacomo, 1996; Horrocks et al., 1999].
4.2.3 Guarded fragments Andr´eka et al. [1996] introduce guarded fragments as natural generalizations of modal logics to relations of arbitrary arity. Their definition and investigation was motivated by the question why modal logics have such “nice” properties, e.g., finite axiomatizability, Craig interpolation, and decidability. Guarded fragments are obtained from first-order logic by allowing the use of quantified variables only
160
U. Sattler, D. Calvanese, and R. Molitor
if these variables are guarded by appropriate atoms11 before they are used in the body of a formula. More precisely, quantifiers are restricted to appear only in the form ∃y(P(x, y) ∧ (y)) ∃y(P(x, y) ∧ (x, y))
or or
∀y(P(x, y) ⊃ (y)) (First Guarded Fragment) ∀y(P(x, y) ⊃ (x, y)) (Guarded Fragment)
for atoms P, vectors of variables x and y, and (first) guarded fragment formulae with free variables in y and x (resp. in y). The loosely guarded fragment further allows a restricted form of conjunction as guards. Obviously, the translation (∃y.R(x, y) ∧ ϕ(y))(x) of the K formula ✸ϕ (or of the ALC concept ∃R.Cϕ ) is a formula in the first guarded fragment since the quantified variable y is “guarded” by R. A more complex guarded fragment formula is ∃z 1 , z 2 .(parents(x, z 1 , z 2 ) ∧ (married(z 1 , z 2 ) ∧ (∀y.parents(y, z 1 , z 2 ) ⊃ rich(y)))) in one free variable x, a guard atom parents, and describing all those persons that have married parents and whose siblings (including oneself) are rich. All guarded fragments have been shown to be decidable [Andr´eka et al., 1996]. Gr¨adel [1999] proves that satisfiability of the guarded fragment is in ExpTime – provided that the arity of the predicates is bounded – and 2ExpTime-complete for unbounded signatures. Interestingly, the guarded fragment was shown to remain in 2ExpTime when extended with fixpoints [Gr¨adel and Walukiewicz, 1999]. These “nice” properties together with their close relationship to modal logics and Description Logics suggest that they are a good starting point for the development of a Description Logic with n-ary predicates [Gr¨adel, 1998]: in [Lutz et al., 1999], a restriction of the guarded fragment was proven to be PSpace-complete, where the restriction concerns the way in which variables are used in guard atoms. Roughly speaking, each predicate A comes with a two-fold arity (i, j) and, when A is used as a guard, either all first i variables are quantified and none of the last j are or, symmetrically, all last j variables are quantified and none of the first i are. Hence one might think of the predicates as having two-fold “groupings”. A similar logic, the so-called action-guarded fragment AGF, is proposed in [Gon¸calv`es and Gr¨adel, 2000]: it comes with a similar grouping of variables in predicates (which is, when extended with “inverse actions”, the same as the grouping in [Lutz et al., 1999]) and, additionally, it divides predicates into those allowed as guards and those allowed in the body of formulae. From a DL perspective, this should not be too severe a restriction since it parallels the distinction between role and concept names. Interestingly, the extension of AGF with counting quantifiers (the first-order counterpart of number restrictions), inverse actions, and fixpoints yields an ExpTime logic – provided that the arity of the predicates is bounded and that numbers in counting 11
Atoms are formulae P(x1 , . . . , xk ) where P is a k-ary predicate symbol and xi are variables.
4
Relationships with other Formalisms
161
quantifiers are coded unarily [Gon¸calv`es and Gr¨adel, 2000]. This result is even more interesting when we note that the guarded fragment, when extended with number restrictions, functional restrictions, or transitivity (i.e., statements saying that certain binary relations are to be interpreted as transitive relations) becomes undecidable [Gr¨adel, 1999]. To the best of our knowledge, the only other n-ary Description Logics with sound and complete inference algorithms are DLR [Calvanese et al., 1998a] and DLRµ [Calvanese et al., 1999c], which seem to be orthogonal to the guarded fragment. An exact description of the relationship between DLR (resp. DLRµ ) and the guarded fragment (resp. its extension with fixpoints) is missing so far.
4.3 Database models In this section we will describe the relationship between Description Logics and data models used in databases. We will consider both traditional data models used in the conceptual modeling of an application domain, such as semantic and objectoriented data models, and more recently introduced formalisms for representing semistructured data and data on the web. We will concentrate on the relationship between the formalisms and refer to Chapter 16 for a more detailed discussion on the use of Description Logics in data management [Borgida, 1995].
4.3.1 Semantic data models Semantic data models were introduced primarily as formalisms for database schema design [Abrial, 1974; Chen, 1976], and are currently adopted in most of the database and information system design methodologies and Computer Aided Software Engineering (CASE) tools [Hull and King, 1987; Batini et al., 1992]. In semantic data models, classes provide an explicit representation of objects with their attributes and their relationships to other objects, and subtype– supertype relationships are used to specify the inheritance of properties. Here, we concentrate on the Entity–Relationship (ER) model [Chen, 1976; Teorey, 1989; Batini et al., 1992; Thalheim, 1993], which is one of the most widespread semantic data models. However, the considerations we make hold also for other formalisms for conceptual modeling, such as UML class diagrams [Rumbaugh et al., 1998; Jacobson et al., 1998]. 4.3.1.1 Formalization The basic elements of the ER model are entities, relationships, and attributes, which are used to model the domain of interest by means of an ER schema.
162
U. Sattler, D. Calvanese, and R. Molitor name/String
code/Integer cust (1,∞)
Customer
Registration
serv (0,∞)
loc (0,∞) (exclusive, complete)
Business Customer
Private Customer
field/String
SSN/String
Location street/String city/String
Service (1,1) serv
Supply com (0,20)
Department name/String
Fig. 4.8. An Entity–Relationship schema.
Figure 4.8 shows a simple ER schema representing the registration of customers for (telephone) services provided by departments (e.g., of a telephone company). The schema is drawn using the standard graphical ER notation, in which entities are represented as boxes, and relationships as diamonds. An attribute is shown as a circle attached to the entity for which it is defined. An entity type (or simply entity) denotes a set of objects, called its instances, with common properties. Elementary properties are modeled through attributes, whose values belong to one of several predefined domains, such as Integer, String, Boolean, etc. Relationships between instances of different entities are modeled through relationship types (or simply relationships). A relationship denotes a set of tuples, each one representing an association among a combination of instances of the entities that participate in the relationship. The participation of an entity in a relationship is called an ER role and has a unique name. It is depicted by connecting the relationship to the participating entity. The number of ER roles for a relationship is called its arity. Cardinality constraints can be attached to an ER role in order to restrict the minimum or maximum number of times an instance of an entity may participate via that ER role in instances of the relationship [Abrial, 1974; Grant and Minker, 1984; Lenzerini and Nobili, 1990; Ferg, 1991; Ye et al., 1994; Thalheim, 1992; Calvanese and Lenzerini, 1994b]. Minimal and maximal cardinality constraints can be arbitrary non-negative integers. However, typical values for minimal cardinality constraints are 0, denoting no constraint, and 1, denoting mandatory participation of the entity in the relationship; typical values for maximal cardinality constraints are 1, denoting functionality, and ∞, denoting no constraint. In Figure 4.8, cardinality constraints are used to impose that each customer must be registered for at least one service. Also, each service is provided by exactly one department, which in turn may not provide more than 20 different services. To represent inclusions between the sets of instances of two entities or two relationships, so called IS-A relations are used. An IS-A relation states the inheritance of properties from a more general entity (resp. relationship) to a more specific one. A
4
Relationships with other Formalisms
163
generalization is a set of IS-A relations which share the more general entity (resp. relationship). Multiple generalizations can be combined in a generalization hierarchy. A generalization can be mutually exclusive, meaning that all the specific entities (resp. relationships) are mutually disjoint, or complete, meaning that the union of the more specific entities (resp. relationships) completely covers the more general entity (resp. relationship). In Figure 4.8, a mutually exclusive and complete generalization is used to represent the fact that customers are partitioned into private and business customers. Additionally, keys are used to represent the fact that an instance of an entity is uniquely identified by a certain set of attributes, or that an instance of a relationship is uniquely identified by a set of instances of the entities participating in the relationship. Although we do not provide a formal definition here, the semantics of an ER schema can be given by specifying which database states are consistent with the information structure represented by the schema; for details see e.g., [Calvanese et al., 1999e]. Traditionally, the ER model has been used in the design phase of commercial applications, and modern CASE tools usually provide sophisticated schema editing facilities and automatic generation of code for the interaction with the database management system. However, these tools do not provide any support beyond the graphical user interface, for dealing with the complexity of schemas. In particular, the designer is responsible for checking schemas for important properties such as consistency and redundancy. This may be a complex and time-consuming task if performed by hand. By translating an ER schema into a DL knowledge base in such a way that the verification of schema properties corresponds to traditional DL reasoning tasks, the reasoning facilities of a DL system can be profitably exploited to support conceptual database design. 4.3.1.2 Correspondence with Description Logics Both in Description Logics and in the ER model, the domain of interest is modeled through classes and relationships, and various proposals have been made for establishing a correspondence between the two formalisms. Bergamaschi and Sartori [1992] provide a translation of ER schemas into acyclic ALN knowledge bases. However, due to the limited expressiveness of the target language, several features of the ER model and desired reasoning tasks could not fully be captured by the proposed translation. Indeed, when relating the ER model to Description Logics, one has to take into account the following aspects: (i) The ER model allows relations of arbitrary arity, while in traditional Description Logics only unary and binary relations are considered.
164
U. Sattler, D. Calvanese, and R. Molitor Registration #
Supply
#
Customer # Location # Service # Department Customer BusinessCustomer PrivateCustomer Customer
# # # # #
∀custRegistration.Customer = 1 custRegistration ∀locRegistration.Location = 1 locRegistration ∀servRegistration.Service = 1 servRegistration ∀servSupply.Service = 1 servSupply ∀comSupply.Customer = 1 comSupply ∀custRegistration− .Registration 1 custRegistration− ∀locRegistration− .Registration ∀servRegistration− .Registration ∀servSupply− .Supply = 1 servSupply− ∀comSupply− .Supply 20 comSupply− BusinessCustomer PrivateCustomer Customer Customer ¬BusinessCustomer ∀name.String = 1 name
Fig. 4.9. Part of the knowledge base corresponding to the Entity–Relationship schema in Figure 4.8. (ii) The assumption of acyclicity is unrealistic in an ER schema, while it is common in DL knowledge bases. (iii) Database states are considered to be finite structures, while no assumption on finiteness is usually made on the interpretation domain of a DL knowledge base.
Before discussing these issues in more detail, we show in Figure 4.9 part of the ALUN I knowledge base corresponding to the ER schema in Figure 4.8, derived according to the translation proposed by Calvanese et al. [1994; 1999e]. We have omitted the part corresponding to the translation of most attributes, showing as an example only the translation of the attribute name of the entity Customer. Due to point (i), when translating ER schemas into knowledge bases of a traditional Description Logic, it becomes necessary to reify relationships, i.e., to translate each relationship into a concept whose instances represent the tuples of the relationship. Each entity is also translated into a concept, while each ER role is translated into a Description Logic role. Then, using functional roles, one can enforce that each instance of the atomic concept C corresponding to a relationship R represents a tuple of R, i.e., for each role representing an ER role of R, the instance of C is connected to exactly one instance of the entity associated to the ER role. There is, however, one condition, which is implicit in the semantics of the ER model, but which does not necessarily hold once relationships are reified, and which can also not be enforced in Description Logics on the models of a knowledge base: the condition is that the extension of a relationship R does not contain some tuple twice. After reification this corresponds to the fact that there are no two instances of the concept corresponding to R that are connected through all roles of R exactly to the same instances of the entities associated to the roles. However, it can be shown that, when reasoning on a knowledge base corresponding to an ER schema, nothing is lost by ignoring this condition. Indeed, given an arbitrary model of such
4
Relationships with other Formalisms
165
a knowledge base, one can always find a model in which the condition holds, and thus one that corresponds directly to a legal database state [Calvanese et al., 1994; De Giacomo, 1995; Calvanese et al., 1999e]. Cardinality constraints are translated using number restrictions on the inverse of the roles connecting relationships to entities. To avoid the need for qualified number restrictions, in the translation in Figure 4.9 we have disambiguated the roles by appending to their name the name of the relationship they belong to. An alternative would be to allow the same role to appear in several places, and use qualified number restrictions instead of unqualified ones. While considerably complicating the language, this makes it possible to translate also IS-A relations between relationships, which cannot be captured using the translation proposed by Calvanese et al. [1999e]. Also more general forms of cardinality constraints have been proposed for the ER model [Thalheim, 1992], allowing one, e.g., to limit the number of locations a customer may be registered for, independently of the service. To the best of our knowledge, such types of cardinality constraints cannot be captured in Description Logics in general. Borgida and Weddell [1997] have studied reasoning in Description Logics in the presence of functional dependencies that are more general than unary ones, and which allow one to represent keys of relations. Decidability of reasoning in a very expressive Description Logic augmented with non-unary key constraints has been shown by Calvanese et al. [2000b], and Calvanese et al. [2001a] have shown that also general functional dependencies can be added without losing ExpTime-completeness. IS-A relations are simply translated using concept inclusion assertions. Generalization hierarchies additionally require negation, if they are mutually disjoint, and union, if they are complete. With respect to point (ii), we observe that the translation of an ER schema containing cycles obviously gives rise to a cyclic DL knowledge base. However, due to the necessity of properly relating a relationship via an ER role to an entity, even when translating an acyclic ER schema, the resulting knowledge base contains cycles. On the other hand, it is sufficient to use inclusion assertions rather than equivalence, since the former naturally correspond to the semantics of ER schemas. With respect to point (iii), we observe that one cannot simply ignore it and adopt algorithms that reason with respect to arbitary models. Indeed, the ER model itself does not have the finite model property [Cosmadakis et al., 1990; Calvanese and Lenzerini, 1994b], which states that, if a knowledge base (resp. schema) has an arbitrary, possibly infinite model (resp. database state), then it also has a finite one (see also Chapter 5 for more details). A further confirmation comes from the fact that, for correctly capturing ER schemas in Description Logics, possibly cyclic knowledge bases expressed in a Description Logic including functional restrictions and inverse roles are required, and
166
U. Sattler, D. Calvanese, and R. Molitor
such knowledge bases do not have the finite model property [Calvanese et al., 1994; 1999e]. Therefore one must resort to techniques for finite model reasoning. Calvanese et al. [1994] show that reasoning w.r.t. finite models in ALUN I knowledge bases containing only inclusion assertions is ExpTime-complete, and Calvanese [1996a] presents a 2ExpTime algorithm for reasoning in ALCQI knowledge bases with general inclusion assertions. 4.3.1.3 Applications of the correspondence The study of the correspondence between Description Logics and semantic data models has led to significant advantages in both fields. On the one hand, the richness of constructs that is typical of Description Logics makes it possible to add them to semantic data models and take them fully into account when reasoning on a schema [Calvanese et al., 1998g]. Notable examples are: r the ability to specify not only IS-A and generalization hierarchies, but also arbitrary Boolean combinations of entities or relationships, which can correspond to forms of negative and incomplete knowledge [Di Battista and Lenzerini, 1993]; r the ability to refine properties along an IS-A hierarchy, such as restricting the numeric range for cardinality constraints, or refining the participation in relationships using universal quantification over roles; r the ability to define classes by means of equality assertions, and not only to state necessary properties for them.
The correspondence between semantic data models and Description Logics has been recently exploited to add such advanced capabilities to CASE tools. A notable example is the i•com tool [Franconi and Ng, 2000] for conceptual modeling, which combines a user-friendly graphical interface with the ability to automatically infer properties of a schema (e.g., inconsistency of a class, or implicit IS-A relations) by invoking the Fact Description Logic reasoner [Horrocks, 1998a; 1999]. On the other hand, the basic ideas behind the translation of semantic data models into Description Logics, namely reification and the fact that one can restrict the attention to models in which distinct instances of a reified relation correspond to distinct tuples, have led to the development of Description Logics in which relations of arbitrary arity are first class citizens [De Giacomo and Lenzerini, 1994c; Calvanese et al., 1997; 1998a]. Using such Description Logics, the translation of an ER schema is immediate, since now relationships of arbitrary arity also have their direct counterpart. For example, using DLR [Calvanese et al., 1998a], the part of the schema in Figure 4.8 relative to the ternary relation Registration can be translated as follows: Registration ($1: Customer) ($2: Location) ($3: Service) Customer ∃[$1]Registration. We refer to Chapter 16, Subsection 16.2.2 for the details of the translation.
4
Relationships with other Formalisms
167
Description Logics could also be considered as expressive variants of semantic data models with incorporated reasoning facilities. This is of particular importance in the context of information integration, where a high expressiveness is required to capture in the best possible way the complex relationships that hold between data in different information sources [Levy et al., 1995; Calvanese et al., 1998d; 1998e].
4.3.2 Object-oriented data models Object-oriented data models have been proposed recently with the goal of devising database formalisms that could be integrated with object-oriented programming systems [Abiteboul and Kanellakis, 1989; Kim, 1990; Cattell and Barry, 1997; Rumbaugh et al., 1998]. Object-oriented data models rely on the notion of object identifier at the extensional level (as opposed to traditional data models which are value-oriented) and on the notion of class at the intensional level. The structure of the classes is specified by means of typing and inheritance. Since we aim at discussing the relationship with Description Logics, which are well-suited to describe structural rather than dynamic properties, we restrict our attention to the structural component of object-oriented models. Hence we do not consider all those aspects that are related to the specification of the behavior and evolution of objects, which nevertheless constitute an important part of these data models. Although in our discussion we do not refer to any specific formalism, the model we use is inspired by the one presented by Abiteboul and Kanellakis [1989], and embodies the basic features of the static part of the ODMG standard [Cattell and Barry, 1997]. 4.3.2.1 Formalization An object-oriented schema is a finite set of class declarations, which impose constraints on the instances of the classes that are used to model the application domain. A class declaration for a class C has the form class C is-a C1 , . . . , Ck type-is T, where the is-a part, which is optional, specifies inclusions between the sets of instances of the classes involved, while the type-is part specifies through the type expression T the structure assigned to the objects that are instances of the class. We consider union, set, and record types, built according to the following syntax, where the letter A is used to denote attributes: T −→ C | union T1 , . . . , Tk end | set-of T | record A1 : T1 , . . . , Ak : Tk end.
168
U. Sattler, D. Calvanese, and R. Molitor class Customer type-is union BusinessCustomer, PrivateCustomer end class PrivateCustomer is-a Customer type-is record SSN: String end
class Registration type-is record cust: Customer, regis: set-of record serv: Service loc: Location end end
class Service type-is record code: Integer, suppliedBy: Department end
Fig. 4.10. Part of an object-oriented schema.
Figure 4.10 shows part of an object-oriented schema modeling the same reality as the Entity–Relationship schema of Figure 4.8. Notice that now registrations are represented as a class and grouped according to the customer, since all registrations related to one customer are collected in the set-valued attribute regis. The meaning of an object-oriented schema is given by specifying the characteristics of a database state for the schema. The definition of a database state makes use of the notions of object identifier and value. Starting from a finite set OJ of object identifiers, the set of complex values over OJ is built inductively by grouping values into finite sets and records. A database state J for a schema is constituted by the set of object identifiers, a mapping π J assigning to each class a subset of OJ , and a mapping ρ J assigning to each object in OJ a value over OJ . Notice that, although the set of values that can be constructed from a set OJ of object identifiers is infinite, for a database state one only needs to consider the finite subset VJ of values assigned by ρ J to the elements of OJ , including the values that are not explicitly associated with object identifiers, but are used to form other values. The interpretation of type expressions in a database state J is defined through an interpretation function ·J that assigns to each type expression T a set T J of values in VJ as follows: r if T is a class C, then T J = π J (C); r if T is a union type union T , . . . , T end, then T J = T J ∪ · · · ∪ T J ; 1 k k 1 r it T is a record type (resp. set type), then T J is the set of record values (resp. set values) compatible with the structure of T . For records we are using an open semantics, meaning that the records that are instances of a record type may have more components than those explicitly specified in the type [Abiteboul and Kanellakis, 1989].
A database state J for an object-oriented schema S is said to be legal (with respect to S) if for each declaration class C is-a C1 , . . . , Cn type-is T
4
Relationships with other Formalisms
169
in S, we have (1) C J ⊆ CiJ for each i ∈ {1, . . . , n}, and (2) ρ J (C J ) ⊆ T J . Therefore, for a legal database state, the type expressions that are present in the schema determine the (finite) set of values that must be considered. The construction of such values is limited by the depth of type expressions. 4.3.2.2 Correspondence with Description Logics When establishing a correspondence between an object-oriented model such as the one presented above, and Description Logics, one must take into account that the interpretation domain for a DL knowledge base consists of atomic objects, whereas each object of an object-oriented schema is assigned a possibly structured value. Therefore one needs to explicitly represent in Description Logics the type structure of classes [Calvanese et al., 1994; 1999e; Artale et al., 1996a]. We describe now the translation proposed by Calvanese et al. [1994; 1999e], that overcomes this difficulty by introducing into the DL knowledge base concepts and roles with a specific meaning: the concepts AbstractClass, RecType, and SetType are used to denote instances of classes, record values, and set values, respectively. The associations between classes and types induced by the class declarations, as well as the basic characteristics of types, are modeled by means of specific roles: the functional role value models the association between classes and types, and the role member is used for specifying the type of the elements of a set. Moreover, the concepts representing types are assumed to be mutually disjoint, and disjoint from the concepts representing classes. These constraints are expressed by the following inclusion assertions, which are always part of the knowledge base that is obtained from an object-oriented schema: AbstractClass = 1 value RecType ∀value.⊥ SetType ∀value.⊥ ¬RecType. The translation from object-oriented schemas to Description Logic knowledge bases is defined through a mapping , which maps each type expression to a concept expression as follows: r r r r
Each class C is mapped to an atomic concept (C). Each type expression union T1 , . . . , Tk end is mapped to (T1 ) · · · (Tk ). Each type expression set-of T is mapped to SetType ∀member.(T ). Each attribute A is mapped to an atomic role (A), and each type expression record A1 : T1 , . . . , Ak : Tk end is mapped to RecType ∀(A1 ).(T1 ) = 1 (A1 ) · · · ∀(Ak ).(Tk ) = 1 (Ak ).
170
U. Sattler, D. Calvanese, and R. Molitor Customer # PrivateCustomer # Service # Customer #
AbstractClass ∀value.(BusinessCustomer PrivateCustomer) AbstractClass Customer ∀value.(RecType = 1 SSN ∀SSN.String) AbstractClass ∀value.(RecType = 1 code ∀code.Integer = 1 suppliedBy ∀suppliedBy.Department) AbstractClass ∀value.(RecType = 1 cust ∀cust.Customer = 1 regis ∀regis.(SetType ∀member.(RecType serv ∀serv.Service loc loc.Location)))
Fig. 4.11. The specific part of the knowledge base corresponding to the object-oriented schema in Figure 4.10.
Then, the knowledge base (S) corresponding to an object-oriented schema S is obtained by taking for each class declaration class C is-a C1 , . . . , Cn type-is T an inclusion assertion (C) AbstractClass (C1 ) · · · (Cn ) ∀value.(T ). We show in Figure 4.11 the knowledge base resulting from the translation of the fragment of object-oriented schema shown in Figure 4.10. Analogously to the ER model, it is sufficient to use inclusion assertions instead of equivalence assertions to capture the semantics of object-oriented schemas. A translation to an acyclic knowledge base is possible under the assumption that no class in the schema refers to itself, either directly in its type or indirectly via the class declarations12 [Artale et al., 1996a]. However, since this assumption represents a rather strong limitation in expressiveness, cycles are typically present in object-oriented schemas, and in this case the resulting DL knowledge base will contain cyclic assertions. No inverse roles are needed for the translation, since in object-oriented models the inverse of an attribute is rarely considered. Furthermore, the use of number restrictions is limited to functionality, since all attributes are implicitly functional. To establish the correctness of the transformation, and thus ensure that the reasoning tasks on an object-oriented schema can be reduced to reasoning tasks on its translation into Description Logics, we would like to establish a one-toone correspondence between database states legal for the schema and models of the knowledge base resulting from the translation. However, as for the ER model, the knowledge base may have models that do not correspond directly to legal database states. In this case, this is due to the fact that, while values have a treelike structure, the corresponding individuals in a model of the Description Logic knowledge base may be part of cyclic substructures. One way of ruling 12
Note that cyclic references cannot appear directly in a type, which is constructed inductively, but only through the class declarations.
4
Relationships with other Formalisms
171
out such cyclic substructures would be to adopt a specific constructor that allows one to impose well-foundedness [Calvanese et al., 1995], or even exploit general fixed points on concepts [Schild, 1994; De Giacomo and Lenzerini, 1994a; 1997; Calvanese et al., 1999c]. However, it turns out that, in this case, it is not necessary to explicitly enforce such a condition. Indeed, due to the finite depth of nesting of types in a schema, it can be shown that each model of the translation of the schema can be unfolded into one that directly corresponds to a legal database state (more details are provided by Calvanese et al. [1999e]). 4.3.2.3 Applications of the correspondence Similarly to the ER model, the existence of property-preserving transformations from object-oriented schemas into DL knowledge bases makes it possible to exploit the reasoning capabilities of a DL system for checking relevant schema properties, such as consistency and redundancy [Bergamaschi and Nebel, 1994; Artale et al., 1996a; Calvanese et al., 1998g]. Additionally, several extensions of the objectoriented formalism that are useful for the purpose of conceptual modeling can be considered: r Not only IS-A, but also disjointness, and, more generally, Boolean combinations of classes can be used. r Class definitions can be used to specify not only necessary but also necessary and sufficient properties for an object to be an instance of a class [Bergamaschi and Nebel, 1994]. r Cardinality constraints and not only implicit functionality can be imposed on attributes. Having attributes with multiple values could in some cases be a useful alternative to set-valued attributes. r By admitting also the use of inverse roles in the language, one gains the ability to impose constraints using a relation in both directions, as is customary in semantic data models. The increase in expressiveness that one obtains this way has indeed been recognized as extremely important by the database community [Albano et al., 1991], and has been included in the recent ODMG standard [Cattell and Barry, 1997].
The basic characteristics of object-oriented data models have also been included in the structural part of the Unified Modeling Language (UML) [Rumbaugh et al., 1998; Jacobson et al., 1998], which is becoming the standard language for the analysis phase of software and information system development. Additionally, UML allows the definition of generic recursive data structures (both inductive and coinductive) such as lists and trees, and their specialization to specific types. In order to capture also these aspects of UML in Description Logics and take them fully into account when reasoning over a schema, the Description Logic must provide the ability to represent and reason over data structures. In particular, to represent UML schemas, it is necesary to resort to very expressive Description Logics including
172
U. Sattler, D. Calvanese, and R. Molitor
number restrictions, inverse roles or n-ary relations, and fixpoint constructs on concepts [Calvanese et al., 1999c]. Also in this case, the reasoning services provided by a DL system can be integrated into CASE tools and profitably exploited to support the designer in the analysis phase [Franconi and Ng, 2000].
4.3.3 Semistructured data models and XML In recent application areas such as data integration, access to data on the web, and digital libraries, the structure of the data is usually not rigid, as in conventional databases, and thus it is difficult to describe it using traditional data models. Therefore, so called semistructured data models have been proposed, which are graph-based data models that provide flexible structuring mechanisms, and thus allow one to represent data that is neither raw nor strictly typed [Abiteboul et al., 2000; Abiteboul, 1997; Buneman et al., 1997; Mendelzon et al., 1997]. The Extensible Markup Language (XML) [Bray et al., 1998; Abiteboul et al., 2000], which has been introduced as a mechanism for representing structured documents on the Web, can in fact also be considered a model for semistructured data. Indeed, XML is by now much the most popular model for data on the Web, and there is a tremendous effort related to XML and the associated standards,13 both in the research community and in industry. Description Logics have traditionally been used to describe and organize data in a more flexible way than is done in databases, basically using graph-like structures. Hence it seems natural to adopt Description Logics and the associated reasoning services for representing and reasoning on semistructured data and XML as well. In the following, we discuss the (rather few) proposals made in the literature. What these proposals have in common is the necessity to resort to fixpoints, either by adopting fixpoint semantics [Nebel, 1991; Baader, 1991], or by using reflexive– transitive closure or explicit fixpoint constructs [De Giacomo and Lenzerini, 1997] (see also Chapter 5). For the recent extensive work on the use of Description Logics to provide a semantically richer representation of data on the Web we refer to Chapter 14. 4.3.3.1 Relationship between semistructured data and Description Logics Michaeli et al. [1997] propose to extend a semistructured data model that is an abstraction of the OEM model [Abiteboul et al., 1997] with a layer of classes, representing objects with common properties. Class expressions correspond to DL concepts and the properties for the classes are specified by a set of classification rules, which provide sufficient conditions for class membership and are interpreted 13
http://www.w3.org/
4
Relationships with other Formalisms
173
under a least fixpoint semantics. By a reduction to reasoning in a Description Logic with fixpoint operators [De Giacomo and Lenzerini, 1997; Calvanese et al., 1999c], it is shown that determining class satisfiability and containment under a set of rules is ExpTime-decidable (and in fact ExpTime-complete). In the following, we discuss in more detail the use of Description Logics to represent and reason on semistructured data, on the example of one typical representative for semistructured data models. In semistructured data models, data is organized in the form of a graph, and information on both the values and the schema for the data is attached to the edges of the graph. In the formalism proposed by Buneman et al. [1997], the labels of edges in a schema are formulae of a complete first order theory, and the conformance of a database to a schema is defined in terms of a special relation, called simulation. The notion of simulation is less rigid than the usual notion of satisfaction, and suitably reflects the need for dealing with less strict data structures. In order to capture in Description Logics the notion of simulation, it is necessary on the one hand to express the local conditions that a node must satisfy, and on the other hand to deal with the fact that the simulation relation is the greatest relation satisfying the local conditions. Since semistructured data schemas may contain cycles, the local conditions may depend on each other in a cyclic way. Therefore, while the local conditions can be encoded by means of suitable inclusion assertions in ALU, the maximality condition on the simulation relation can only be captured correctly by resorting to a greatest fixpoint semantics [Calvanese et al., 1998c; 1998b]. Then, using a Description Logic with fixpoint constructs, such as µALCQ [De Giacomo and Lenzerini, 1994b; 1997] (see also Chapter 5), a so-called characteristic concept for a semistructured data schema can be constructed, which captures exactly the properties of the schema. Subsumption between two schemas, which is the task of deciding whether every semistructured database conforming to one schema also conforms to another schema [Buneman et al., 1997], can be decided by checking subsumption between the characteristic concepts of the schemas [Calvanese et al., 1998c]. The correspondence with Description Logics can again be exploited to enrich semistructured data models, without losing the ability to check schema subsumption. Indeed, the requirement already raised by Buneman et al. [1997], to extend semistructured data models with several types of constraints, has been addressed by Calvanese et al. [1998b], who propose several types of constraints, such as existence and cardinality constraints, which are naturally derived from DL constructs. Reasoning in the presence of constraints is done by encoding also the constraints in the characteristic concept of a schema. Calvanese et al. deal also with the presence of incomplete information in the theory describing the properties of edge labels, by proposing the use of a theory expressed in µALCQ, instead of a complete first order theory.
174
U. Sattler, D. Calvanese, and R. Molitor
FIAT manufacturing Torino ... ... ...
call-back when busy ... ... three-party call
... ... ... ...
conference call ...
Fig. 4.12. Two XML documents specifying respectively customers and services.
4.3.3.2 Relationship between XML and Description Logics XML [Bray et al., 1998] is a formalism for representing documents that are structured by means of nested tags. Recently, XML has gained popularity also as a formalism for representing (semistructured) data and exchanging it over the Web. Figure 4.12 shows two example XML documents containing respectively data about customers and their registration to services provided by various departments (e.g., of a telephone company). A part of an XML document consisting of a start tag (e.g., ), the matching end tag (e.g., ), and everything in between is called an element. Elements can be arbitrarily nested, and can have associated attributes, specified by means of attribute–value pairs inside the start tag (e.g., type="business"). Intuitively, each XML document can be viewed as a finite ordered unranked tree,14 where each element represents a node, and the children of an element are those elements directly contained in it. How XML documents are viewed as trees is defined, together with an API for accessing and manipulating such trees/XML-documents, by the Document Object Model,15 which defines, besides element nodes, other types of nodes, such as attributes, comments, etc. 14 15
In an unranked tree each node can have an arbitrary finite number of child nodes. The tree is ordered since the order among children of the same node matters. http://www.w3.org/DOM/
4
Relationships with other Formalisms
175
Customer (Name, (Field|SSN), Registered+) > Registered (Location)+ > Services Department Service Name
(Department)+ > (Service)* > (Name, Cost?, ...) > #PCDATA >
#REQUIRED> #REQUIRED> #REQUIRED>
Fig. 4.13. Part of the Document Type Declaration S for the XML documents in Figure 4.12.
In XML, it is possible to impose a structure on documents by means of a Document Type Declaration (DTD) [Bray et al., 1998]. A DTD consists of a set of declarations: For each element type used in the XML document, the DTD must contain a declaration that specifies, by means of a regular expression, how elements can be nested within elements of that type. The keyword #PCDATA is used to specify that the element content (i.e., the part enclosed by the tags) is free text without nested elements. For each attribute appearing in the XML document, the DTD must contain a declaration specifying the name of the attribute, the type of the elements it is associated to, and additional properties (e.g., the type and whether the attribute is optional or mandatory). Figure 4.13 shows part of the DTD for the XML documents in Figure 4.12. We refer to [Bray et al., 1998] for a precise definition of the syntax and semantics of XML DTDs. We illustrate the method for encoding XML DTDs into DL knowledge bases proposed in [Calvanese et al., 1999d]. For simplicity, we do not consider XML attributes, although they can easily be dealt with by introducing suitable roles. Due to the presence of regular expressions, to encode DTDs into Description Logics, it is necessary to resort to a Description Logic equipped with constructs for building regular expressions over roles (see Chapter 5). Notice that the encoding of DTDs into DL knowledge bases must allow for representing unranked trees and at the same time for preserving the order of the children of a node. For example, the DTD in Figure 4.13 enforces that the content of a Customer element consists of a Name element, followed by (in DTDs, concatenation is denoted by “,”) either a Field or an SSN element (alternative is denoted by “|”), followed by an arbitrary number (but at least one) of Registered elements (transitive closure is denoted by “+”). To overcome these difficulties, Calvanese et al. [1999d] propose to represent XML documents (i.e., ordered unranked trees) by means of binary trees, and provide
176
U. Sattler, D. Calvanese, and R. Molitor f
r
f f
r f
r f
r
f
r
f
r
f
r
r f
f FIAT
r
r r
f
f
r f
r f
r r r
manufacturing
Fig. 4.14. The binary tree corresponding to the XML document on the left-hand side of Figure 4.12.
an encoding of DTDs in Description Logics that exploits such a representation. Figure 4.14 shows the binary tree corresponding to one of the XML documents in Figure 4.12. Figure 4.15 shows part of the axioms encoding the DTD in Figure 4.13. The two roles f and r are used to encode binary trees, and such roles are globally functional (axiom (4.1)). Moreover, the well-founded construct (see Chapter 5) wf (f r) is used to express that there can be no infinite chain of objects, each one connected to the next by means of f r. Such a condition turns out to be necessary to correctly capture the fact that XML documents correspond to trees that are finite. For each element type E, the atomic concepts StartE and EndE represent respectively the start tags (4.2) and end tags (4.3) for E, and such tags are leaves of the tree (4.4). The remaining leaves of the tree are free text, represented by the atomic concept PCDATA (4.5). Using such concepts and roles, one can introduce for each element type E appearing in a DTD D an atomic concept E D , and encode the regular expression specifying the structure of elements of type E in a suitable complex role, exploiting constructs for regular expressions over roles (including the id(·) construct). This is illustrated in Figure 4.15 for part of the element types of the DTD in Figure 4.13. We refer to [Calvanese et al., 1999d] for the precise definition of the encoding.
4 & StartE EndE Tag PCDATA CustomersS CustomerS
NameS
Relationships with other Formalisms
177
≡ # # # # ≡ ≡
(4.1) 1 f 1 r wf (f r) Tag for each element type E (4.2) Tag for each element type E (4.3) ∀(f r).⊥ (4.4) ∀(f r).⊥ ¬Tag (4.5) ∃f.StartCustomers ∃(r ◦ (id (∃f.CustomerS ) ◦ r)+ ).EndCustomers ∃f.StartCustomers ∃(r ◦ id (∃f.NameS ) ◦ r ◦ (id (∃f.FieldS ) id (∃f.SSNS )) ◦ r ◦ (id (∃f.RegisteredS ) ◦ r)+ ).EndCustomer ≡ ∃f.StartName ∃(r ◦ id (∃f.PCDATA) ◦ r).EndName .. .
Fig. 4.15. Part of the encoding of the DTD S in Figure 4.13 into a DL knowledge base.
The encoding of DTDs into Description Logics can be exploited to verify different kinds of properties on DTDs, namely inclusion, equivalence, and disjointness between the sets of documents conforming respectively to two DTDs. Such reasoning tasks come in different forms. For strong inclusion (resp. equivalence, disjointness) both the document structure and the actual tag names are of importance when comparing documents, while for structural inclusion (resp. equivalence, disjointness) one abstracts away from the actual tag names, and considers only the document structure [Wood, 1995]. Parametric inclusion (resp. equivalence, disjointness) generalizes both notions, by considering an equivalence relation between tag names, and comparing documents modulo such an equivalence relation. By exploiting the encoding of DTDs into Description Logics presented above, all forms of inference on DTDs can be carried out in deterministic exponential time [Calvanese et al., 1999d].
5 Expressive Description Logics DIEGO CALVANESE GIUSEPPE DE GIACOMO
Abstract This chapter covers extensions of the basic Description Logics introduced in Chapter 2 by very expressive constructs that require advanced reasoning techniques. In particular, we study reasoning in Description Logics that include general inclusion axioms, inverse roles, number restrictions, reflexive–transitive closure of roles, fixpoint constructs for recursive definitions, and relations of arbitrary arity. The chapter will also address reasoning w.r.t. knowledge bases including both a TBox and an ABox, and discuss more general ways to treat objects. Since the logics considered in the chapter lack the finite model property, finite model reasoning is of interest and will also be discussed. Finally, we mention several extensions to Description Logics that lead to undecidability, confirming that the expressive Description Logics considered in this chapter are close to the boundary between decidability and undecidability.
5.1 Introduction Description Logics have been introduced with the goal of providing a formal reconstruction of frame systems and semantic networks. Initially, the research has concentrated on subsumption of concept expressions. However, for certain applications, it turns out that it is necessary to represent knowledge by means of inclusion axioms without limitation on cycles in the TBox. Therefore, recently there has been a strong interest in the problem of reasoning over knowledge bases of a general form. See Chapters 2, 3, and 4 for more details. When reasoning over general knowledge bases, it is not possible to gain tractability by limiting the expressive power of the Description Logic, because the power of arbitrary inclusion axioms in the TBox alone leads to high complexity in the inference mechanisms. Indeed, logical implication is ExpTime-hard even for the 178
5
Expressive Description Logics
179
very simple language AL (see Chapter 3). This has led to the investigation of very powerful languages for expressing concepts and roles, for which the property of interest is no longer tractability of reasoning, but rather decidability. Such logics, called here expressive Description Logics, have the following characteristics: (i) The language used for building concepts and roles comprises all classical conceptforming constructs, plus several role-forming constructs such as inverse roles and reflexive–transitive closure. (ii) No restriction is posed on the axioms in the TBox.
The goal of this chapter is to provide an overview of the results and techniques for reasoning in expressive Description Logics. The chapter is organized as follows. In Section 5.2, we outline the correspondence between expressive Description Logics and Propositional Dynamic Logics, which has given the basic tools to study reasoning in expressive Description Logics. In Section 5.3, we exploit automata-theoretic techniques developed for variants of Propositional Dynamic Logics to address reasoning in expressive Description Logics with functionality restrictions on roles. In Section 5.4 we illustrate the basic technique of reification for reasoning with expressive variants of number restrictions. In Section 5.5, we show how to reason with knowledge bases composed of a TBox and an ABox, and discuss extensions to deal with names (one-of construct). In Section 5.6, we introduce Description Logics with explicit fixpoint constructs, which are used to express in a natural way inductively and coinductively defined concepts. In Section 5.7, we study Description Logics that include relations of arbitrary arity, which overcome the limitations of traditional Description Logics of modeling only binary links between objects. This extension is particularly relevant for the application of Description Logics to databases. In Section 5.8, the problem of finite model reasoning in Description Logics is addressed. Indeed, for expressive Description Logics, reasoning w.r.t. finite models differs from reasoning w.r.t. unrestricted models, and requires specific methods. Finally, in Section 5.9, we discuss several extensions to Description Logics that lead in general to undecidability of the basic reasoning tasks. This shows that the expressive Description Logics considered in this chapter are close to the limit of undecidability, and are carefully designed in order to retain decidability.
5.2 Correspondence between Description Logics and Propositional Dynamic Logics In this section, we focus on expressive Description Logics that, besides the standard ALC constructs, include regular expression over roles and possibly inverse roles [Baader, 1991; Schild, 1991]. It turns out that such Description Logics correspond directly to Propositional Dynamic Logics, which are modal logics used to express
180
D. Calvanese and G. De Giacomo
properties of programs. We first introduce the syntax and semantics of the Description Logics we consider, then introduce Propositional Dynamic Logics, and finally discuss the correspondence between the two formalisms. 5.2.1 Description Logics We consider the Description Logic ALCI reg , in which concepts and roles are formed according to the following syntax: C, C −→ A | ¬C | C C | C C | ∀R.C | ∃R.C R, R −→ P | R R | R ◦ R | R ∗ | id(C) | R − where A and P denote respectively atomic concepts and atomic roles, and C and R denote respectively arbitrary concepts and roles. In addition to the usual concept-forming constructs, ALCI reg provides constructs to form regular expressions over roles. Such constructs include role union, role composition, reflexive-transitive closure, and role identity. Their meaning is straightforward, except for role identity id(C) which, given a concept C, allows one to build a role which connects each instance of C to itself. As we shall see in the next section, there is a tight correspondence between these constructs and the operators on programs in Propositional Dynamic Logics. The presence in the language of the constructs for regular expressions is specified by the subscript “reg” in the name. ALCI reg also includes the inverse role construct, which allows one to denote the inverse of a given relation. One can, for example, state with ∃child− .Doctor that someone has a parent who is a doctor, by making use of the inverse of the role child. It is worth noticing that, in a language without inverse of roles, in order to express such a constraint one must use two distinct roles (e.g., child and parent) that cannot be put in the proper relation to each other. We use the letter I in the name to specify the presence of inverse roles in a Description Logic; by dropping inverse roles from ALCI reg , we obtain the Description Logic ALC reg . From the semantic point of view, given an interpretation I, concepts are interpreted as subsets of the domain I , and roles as binary relations over I , as follows:1 A I ⊆ I (¬C)I = I \ C I (C C )I = C I ∩ C I 1
We use R∗ to denote the reflexive–transitive closure of the binary relation R, and R1 ◦ R2 to denote the chaining of the binary relations R1 and R2 .
5
Expressive Description Logics
181
(C C )I = C I ∪ C I (∀R.C)I = {o ∈ I | ∀o . (o, o ) ∈ R I ⊃ o ∈ C I } (∃R.C)I = {o ∈ I | ∃o . (o, o ) ∈ R I ∧ o ∈ C I } PI (R R )I (R ◦ R )I (R ∗ )I id(C)I (R − )I
⊆ = = = = =
I × I R I ∪ R I R I ◦ R I (R I )∗ {(o, o) ∈ I × I | o ∈ C I } {(o, o ) ∈ I × I | (o , o) ∈ R I }.
We consider the most general form of TBoxes constituted by general inclusion axioms of the form C C , without any restriction on cycles. We use C ≡ C as an abbreviation for the pair of axioms C C and C C. We adopt the usual descriptive semantics for TBoxes (see Chapter 2). Example 5.1 The following ALCI reg TBox Tfile models a file system constituted by file-system elements (FSelem), each of which is either a Directory or a File. Each FSelem has a name, a Directory may have children while a File may not, and Root is a special directory which has no parent. The parent relationship is modeled through the inverse of the role child. FSelem FSelem Directory Directory File Root Root
≡
∃name.String Directory File ¬File ∀child.FSelem ∀child.⊥ Directory ∀child− .⊥.
The axioms in Tfile imply that in a model every object connected by a chain of role child to an instance of Root is an instance of FSelem. Formally, Tfile |= ∃(child− )∗ .Root FSelem. To verify that the implication holds, suppose that there exists a model in which an instance o of ∃(child− )∗ .Root is not an instance of FSelem. Then, reasoning by induction on the length of the chain from the instance of Root to o, one can derive a contradiction. Observe that induction is required, and hence such reasoning is not first-order. In the following, when convenient, we assume, without loss of generality, that and ∀R.C are expressed by means of ¬, , and ∃R.C. We also assume that the
182
D. Calvanese and G. De Giacomo
inverse operator is applied to atomic roles only. This can again be done without loss of generality, since the following equivalences hold: (R1 ◦ R2 )− = R1− ◦ R2− , (R1 R2 )− = R1− R2− , (R ∗ )− = (R − )∗ , and (id(C))− = id(C).
5.2.2 Propositional Dynamic Logics Propositional Dynamic Logics (PDLs) are modal logics specifically developed for reasoning about computer programs [Fischer and Ladner, 1979; Kozen and Tiuryn, 1990; Harel et al., 2000]. In this subsection, we provide a brief overview of PDLs, and illustrate the correspondence between Description Logics and PDLs. Syntactically, a PDL is constituted by expressions of two sorts: programs and formulae. Programs and formulae are built by starting from atomic programs and propositional letters, and applying suitable operators. We denote propositional letters by A, arbitrary formulae by φ, atomic programs by P, and arbitrary programs by r , all possibly with subscripts. We focus on converse-pdl [Fischer and Ladner, 1979] which, as it turns out, corresponds to ALCI reg . The abstract syntax of converse-pdl is as follows: φ, φ −→ | ⊥ | A | φ ∧ φ | φ ∨ φ | ¬φ | +r ,φ | [r ]φ r, r −→ P | r ∪ r | r ; r | r ∗ | φ? | r − . The basic Propositional Dynamic Logic pdl [Fischer and Ladner, 1979] is obtained from converse-pdl by dropping converse programs r − . The semantics of PDLs is based on the notion of (Kripke) structure, defined as a triple M = (S, {R P }, ), where S denotes a non-empty set of states, {R P } is a family of binary relations over S, each of which denotes the state transitions caused by an atomic program P, and is a mapping from S to propositional letters such that (s) determines the letters that are true in state s. The basic semantical relation is “a formula φ holds at a state s of a structure M”, written M, s |= φ, and is defined by induction on the formation of φ: M, s M, s M, s M, s M, s M, s M, s M, s
|= A |= |= ⊥ |= φ ∧ φ |= φ ∨ φ |= ¬φ |= +r ,φ |= [r ]φ
iff A ∈ (s) always never iff M, s |= φ and M, s |= φ iff M, s |= φ or M, s |= φ iff M, s |= φ iff there is s such that (s, s ) ∈ Rr and M, s |= φ iff for all s , (s, s ) ∈ Rr implies M, s |= φ
where the family {R P } is systematically extended so as to include, for every program
5
Expressive Description Logics
183
r , the corresponding relation Rr defined by induction on the formation of r : RP Rr ∪r Rr ;r Rr ∗ Rφ? Rr −
⊆ = = = = =
S ×S Rr ∪ Rr Rr ◦ Rr (Rr )∗ {(s, s) ∈ S × S | M, s |= φ} {(s1 , s2 ) ∈ S × S | (s2 , s1 ) ∈ Rr }.
If, for each atomic program P, the transition relation R P is required to be a function that assigns to each state a unique successor state, then we are dealing with the deterministic variants of PDLs, namely dpdl and converse-dpdl [Ben-Ari et al., 1982; Vardi and Wolper, 1986]. It is important to understand, given a formula φ, which are the formulae that play some role in establishing the truth-value of φ. In simpler modal logics, these formulae are simply all the subformulae of φ, but due to the presence of reflexive– transitive closure this is not the case for PDLs. Such a set of formulae is given by the Fischer–Ladner closure of φ [Fischer and Ladner, 1979]. To be concrete we now illustrate the Fischer–Ladner closure for converse-pdl. However, the notion of Fischer–Ladner closure can be easily extended to other PDLs. Let us assume, without loss of generality, that ∨ and [·] are expressed by means of ¬, ∧, and +·,. We also assume that the converse operator is applied to atomic programs only. This can again be done without loss of generality, since the following equivalences hold: (r ∪ r )− = r − ∪ r − , (r ; r )− = r − ; r − , (r ∗ )− = (r − )∗ , and (φ?)− = φ?. The Fischer–Ladner closure of a converse-pdl formula ψ, denoted CL(ψ), is the least set F such that ψ ∈ F and such that: if if if if if if if if
φ∈F ¬φ ∈ F φ ∧ φ ∈ F +r ,φ ∈ F +r ∪ r ,φ ∈ F +r ; r ,φ ∈ F +r ∗ ,φ ∈ F +φ ?,φ ∈ F
then then then then then then then then
¬φ ∈ F (if φ is not of the form ¬φ ) φ∈F φ, φ ∈ F φ∈F +r ,φ, +r ,φ ∈ F +r ,+r ,φ ∈ F +r ,+r ∗ ,φ ∈ F φ ∈ F.
Note that CL(ψ) includes all the subformulae of ψ, but also formulae of the form +r ,+r ∗ ,φ derived from +r ∗ ,φ, which are in fact bigger than the formula they derive from. On the other hand, both the number and the size of the formulae in CL(ψ) are linearly bounded by the size of ψ [Fischer and Ladner, 1979],
184
D. Calvanese and G. De Giacomo
exactly like the set of subformulae. Note also that, by definition, if φ ∈ CL(ψ), then CL(φ) ⊆ CL(ψ). A structure M = (S, {R P }, ) is called a model of a formula φ if there exists a state s ∈ S such that M, s |= φ. A formula φ is satisfiable if there exists a model of φ, otherwise the formula is unsatisfiable. A formula φ is valid in a structure M if for all s ∈ S, M, s |= φ. Formulae that are used to select the interpretations of interest are called axioms. Formally, a structure M is a model of an axiom φ, if φ is valid in M. A structure M is a model of a finite set of axioms if M is a model of all axioms in . An axiom is satisfiable if it has a model, and a finite set of axioms is satisfiable if it has a model. We say that a finite set of axioms logically implies a formula φ, written |= φ, if φ is valid in every model of . It is easy to see that satisfiability of a formula φ as well as satisfiability of a finite set of axioms can be reformulated by means of logical implication, as ∅ |= ¬φ and |= ⊥ respectively. Interestingly, logical implication can, in turn, be reformulated in terms of satisfiability, by making use of the following theorem (see [Kozen and Tiuryn, 1990]). Theorem 5.2 (Internalization of axioms) Let be a finite set of converse-pdl axioms, and φ a converse-pdl formula. Then |= φ if and only if the formula ¬φ ∧ [(P1 ∪ · · · ∪ Pm ∪ P1− ∪ · · · ∪ Pm− )∗ ] is unsatisfiable, where P1 , . . . , Pm are all atomic programs occurring in ∪ {φ} and is the conjunction of all axioms in . Such a result exploits the power of program constructs (union, reflexive–transitive closure) and the connected model property (i.e., if a formula has a model, it has a model which is connected) of PDLs in order to represent axioms. The connected model property is typical of modal logics and it is enjoyed by all PDLs. As a consequence, a result analogous to Theorem 5.2 holds for virtually all PDLs. Reasoning in PDLs has been thoroughly studied from the computational point of view, and the results for the PDLs considered here are summarized in the following theorem [Fischer and Ladner, 1979; Pratt, 1979; Ben-Ari et al., 1982; Vardi and Wolper, 1986]: Theorem 5.3 Satisfiability in pdl is ExpTime-hard. Satisfiability in pdl, in converse-pdl, and in converse-dpdl can be decided in deterministic exponential time.
5
Expressive Description Logics
185
5.2.3 The correspondence The correspondence between Description Logics and PDLs was first published by Schild [1991].2 In the work by Schild, it was shown that ALCI reg can be considered a notational variant of converse-pdl. This observation allowed the results on converse-pdl to be exploited for instantly closing long-standing issues regarding the decidability and complexity of both satisfiability and logical implication in ALC reg and ALCI reg .3 The paper was very influential for the research in expressive Description Logics in the following decade, since thanks to the correspondence between PDLs and Description Logics, first results but especially formal techniques and insights could be shared by the two communities. The correspondence between PDLs and Description Logics has been extensively used to study reasoning methods for expressive Description Logics. It has also led to a number of interesting extensions of PDLs in terms of those constructs that are typical of Description Logics and have never been considered in PDLs. In particular, there is a tight relation between qualified number restrictions and graded modalities in modal logics [Van der Hoek, 1992; Van der Hoek and de Rijke, 1995; Fattorosi-Barnaba and De Caro, 1985; Fine, 1972]. The correspondence is based on the similarity between the interpretation structures of the two logics: at the extensional level, individuals (members of I ) in Description Logics correspond to states in PDLs, and links between two individuals correspond to state transitions. At the intensional level, concepts correspond to propositions, and roles correspond to programs. Formally, the correspondence is realized through a one-to-one and onto mapping τ from ALCI reg concepts to converse-pdl formulae, and from ALCI reg roles to converse-pdl programs. The mapping τ is defined inductively as follows: τ (A) τ (¬C) τ (C C ) τ (C C ) τ (∀R.C) τ (∃R.C)
= = = = = =
A ¬τ (C) τ (C) ∧ τ (C ) τ (C) ∨ τ (C ) [τ (R)]τ (C) +τ (R),τ (C)
τ (P) τ (R − ) τ (R R ) τ (R ◦ R ) τ (R ∗ ) τ (id(C))
= = = = = =
P τ (R)− τ (R) ∪ τ (R ) τ (R); τ (R ) τ (R)∗ τ (C)?
Axioms in TBoxes of Description Logics correspond in the obvious way to axioms in PDLs. Moreover all forms of reasoning (satisfiability, logical implication, etc.) have their natural counterpart. 2
3
In fact, the correspondence was first noticed by Levesque and Rosenschein at the beginning of the 1980s, but never published. In those days Levesque just used it in seminars to show the intractability of certain Description Logics. In fact, the decidability of ALC reg without the id(C) construct was independently established by Baader [1991].
186
D. Calvanese and G. De Giacomo
One of the most important contributions of the correspondence is obtained by rephrasing Theorem 5.2 in terms of Description Logics. It says that every TBox can be “internalized” into a single concept, i.e., it is possible to build a concept that expresses all the axioms of the TBox. In doing so we rely on the ability to build a “universal” role, i.e., a role linking all individuals in a (connected) model. Indeed, a universal role can be expressed by using regular expressions over roles, and in particular the union of roles and the reflexive–transitive closure. The possibility of internalizing the TBox when dealing with expressive Description Logics tells us that for such Description Logics reasoning with TBoxes, i.e., logical implication, is no harder than reasoning with a single concept. Theorem 5.4 Concept satisfiability and logical implication in ALC reg are ExpTime-hard. Concept satisfiability and logical implication in ALC reg and ALCI reg can be decided in deterministic exponential time. Observe that for Description Logics that do not allow the expression of a universal role, there is a sharp difference between reasoning techniques used in the presence of TBoxes, and techniques used to reason on concept expressions. The profound difference is reflected by the computational properties of the associated decision problems. For example, the logic AL admits simple structural algorithms for deciding reasoning tasks not involving axioms, and these algorithms are sound and complete and work in polynomial time. However, if general inclusion axioms are considered, then reasoning becomes ExpTime-complete (see Chapter 3), and the decision procedures that have been developed include suitable termination strategies [Buchheit et al., 1993a]. Similarly, for the more expressive logic ALC, reasoning tasks not involving a TBox are PSpace-complete [Schmidt-Schauß and Smolka, 1991], while those that do involve one are ExpTime-complete. 5.3 Functional restrictions We have seen that the logics ALC reg and ALCI reg correspond to standard pdl and converse-pdl respectively, which are both well-studied. In this section we show how the correspondence can also be used to deal with constructs that are typical of Description Logics, namely functional restrictions, by exploiting techniques developed for reasoning in PDLs. In particular, we will adopt automata-based techniques, which have been very successful in studying reasoning for expressive variants of PDL and characterizing their complexity. Functional restrictions are the simplest form of number restrictions considered in Description Logics, and allow one to specify local functionality of roles, i.e., that instances of certain concepts have unique role fillers for a given role. By adding
5
Expressive Description Logics
187
functional restrictions on atomic roles and their inverse to ALCI reg , we obtain the Description Logic ALCFI reg . The PDL corresponding to ALCFI reg is a PDL that extends converse-dpdl [Vardi and Wolper, 1986] with determinism of both atomic programs and their inverse, and such that determinism is no longer a global property, but one that can be imposed locally. Formally, ALCFI reg is obtained from ALCI reg by adding functional restrictions of the form 1 Q, where Q is a basic role, i.e., either an atomic role or the inverse of an atomic role. Such a functional restriction is interpreted as follows: ( 1 Q)I = {o ∈ I | |{o ∈ I | (o, o ) ∈ Q I }| ≤ 1}. We show that reasoning in ALCFI reg is in ExpTime, and, since reasoning in ALC reg is already ExpTime-hard, is in fact ExpTime-complete. Without loss of generality we concentrate on concept satisfiability. We exploit the fact that ALCFI reg has the tree model property, which states that if an ALCFI reg concept C is satisfiable then it is satisfied in an interpretation which has the structure of a (possibly infinite) tree with bounded branching degree (see later). This allows us to make use of techniques based on automata on infinite trees. In particular, we make use of two-way alternating automata on infinite trees (2ATAs) introduced by Vardi [1998]. 2ATAs were used by Vardi [1998] to derive a decision procedure for modal µ-calculus with backward modalities. We first introduce 2ATAs and then show how they can be used to reason in ALCFI reg . 5.3.1 Automata on infinite trees Infinite trees are represented as prefix-closed (infinite) sets of words over N (the set of positive natural numbers). Formally, an infinite tree is a set of words T ⊆ N∗ , such that if x·c ∈ T , where x ∈ N∗ and c ∈ N, then also x ∈ T . The elements of T are called nodes, the empty word ε is the root of T , and for every x ∈ T , the nodes x·c, with c ∈ N, are the successors of x. By convention we take x·0 = x, and x·i·−1 = x. The branching degree d(x) of a node x denotes the number of successors of x. If the branching degree of all nodes of a tree is bounded by k, we say that the tree has branching degree k. An infinite path P of T is a prefix-closed set P ⊆ T such that for every i ≥ 0 there exists a unique node x ∈ P with |x| = i. A labeled tree over an alphabet is a pair (T, V ), where T is a tree and V : T →
maps each node of T to an element of . Alternating automata on infinite trees are a generalization of nondeterministic automata on infinite trees, introduced by Muller and Schupp [1987]. They allow an elegant reduction of decision problems for temporal and program logics [Emerson and Jutla, 1991; Bernholtz et al., 1994]. Let B(I ) be the set of positive Boolean formulae over I , built inductively by applying ∧ and ∨ starting from true, false,
188
D. Calvanese and G. De Giacomo
and elements of I . For a set J ⊆ I and a formula ϕ ∈ B(I ), we say that J satisfies ϕ if and only if assigning true to the elements in J and false to those in I \J makes ϕ true. For a positive integer k, let [k] = {−1, 0, 1, . . . , k}. A two-way alternating automaton over infinite trees with branching degree k is a tuple A = + , Q, δ, q0 , F,, where is the input alphabet, Q is a finite set of states, δ : Q ×
→ B([k] × Q) is the transition function, q0 ∈ Q is the initial state, and F specifies the acceptance condition. The transition function maps a state q ∈ Q and an input letter σ ∈ to a positive Boolean formula over [k] × Q. Intuitively, if δ(q, σ ) = ϕ, then each pair (c, q ) appearing in ϕ corresponds to a new copy of the automaton going to the direction suggested by c and starting in state q . For example, if k = 2 and δ(q1 , σ ) = ((1, q2 ) ∧ (1, q3 )) ∨ ((−1, q1 ) ∧ (0, q3 )), when the automaton is in the state q1 and is reading the node x labeled by the letter σ , it proceeds either by sending off two copies, in the states q2 and q3 respectively, to the first successor of x (i.e., x·1), or by sending off one copy in the state q1 to the predecessor of x (i.e., x·−1) and one copy in the state q3 to x itself (i.e., x·0). A run of a 2ATA A over a labeled tree (T, V ) is a labeled tree (Tr , r ) in which every node is labeled by an element of T × Q. A node in Tr labeled by (x, q) describes a copy of A that is in the state q and reads the node x of T . The labels of adjacent nodes have to satisfy the transition function of A. Formally, a run (Tr , r ) is a T × Q-labeled tree satisfying: (i) ε ∈ Tr and r (ε) = (ε, q0 ). (ii) Let y ∈ Tr , with r (y) = (x, q) and δ(q, V (x)) = ϕ. Then there is a (possibly empty) set S = {(c1 , q1 ), . . . , (cn , qn )} ⊆ [k] × Q such that: • S satisfies ϕ and • for all 1 ≤ i ≤ n, we have that y·i ∈ Tr , x·ci is defined, and r (y·i) = (x·ci , qi ).
A run (Tr , r ) is accepting if all its infinite paths satisfy the acceptance condition.4 Given an infinite path P ⊆ Tr , let inf (P) ⊆ Q be the set of states that appear infinitely often in P (as second components of node labels). We consider here B¨uchi acceptance conditions. A B¨uchi condition over a state set Q is a subset F of Q, and an infinite path P satisfies F if inf (P) ∩ F = ∅. The non-emptiness problem for 2ATAs consists in determining, whether a given 2ATA accepts a nonempty set of trees. The results by Vardi [1998] provide the following complexity characterization of non-emptiness of 2ATAs. Theorem 5.5 ([Vardi, 1998]) Given a 2ATA A with n states and an input alphabet with m elements, deciding non-emptiness of A can be done in time exponential in n and polynomial in m. 4
No condition is imposed on the finite paths of the run.
5
Expressive Description Logics
189
5.3.2 Reasoning in ALCFI reg The (Fischer–Ladner) closure for ALCFI reg extends immediately the analogous notion for converse-pdl (see Subsection 5.2.2), treating functional restrictions as atomic concepts. In particular, the closure CL(C0 ) of an ALCFI reg concept C0 is defined as the smallest set of concepts such that C0 ∈ CL(C0 ) and such that (assuming and ∀ to be expressed by means of and ∃, and the inverse operator applied only to atomic roles):5 if if if if if if if if
C ∈ CL(C0 ) ¬C ∈ CL(C0 ) C C ∈ CL(C0 ) ∃R.C ∈ CL(C0 ) ∃(R R ).C ∈ CL(C0 ) ∃(R ◦ R ).C ∈ CL(C0 ) ∃R ∗ .C ∈ CL(C0 ) ∃id(C).C ∈ CL(C0 )
then then then then then then then then
¬C ∈ CL(C0 ) (if C is not of the form ¬C ) C ∈ CL(C0 ) C, C ∈ CL(C0 ) C ∈ CL(C0 ) ∃R.C, ∃R .C ∈ CL(C0 ) ∃R.∃R .C ∈ CL(C0 ) ∃R.∃R ∗ .C ∈ CL(C0 ) C ∈ CL(C0 ).
The cardinality of CL(C0 ) is linear in the length of C0 . It can be shown, following the lines of the proof in [Vardi and Wolper, 1986] for converse-dpdl, that ALCFI reg enjoys the tree model property, i.e., every satisfiable concept has a model that has the structure of a (possibly infinite) tree with branching degree linearly bounded by the size of the concept. More precisely, we have the following result. Theorem 5.6 Every satisfiable ALCFI reg concept C0 has a tree model with branching degree kC0 equal to twice the number of elements of CL(C0 ). This property allows us to check satisfiability of an ALCFI reg concept C0 by building a 2ATA that accepts the (labeled) trees that correspond to tree models of C0 . Let A be the set of atomic concepts appearing in C0 , and B = {Q 1 , . . . , Q n } the set of atomic roles appearing in C0 and their inverses. We construct from C0 a 2ATA AC0 that checks that C0 is satisfied at the root of the input tree. We represent in each node of the tree the information about which atomic concepts are true in the node, and about the basic role that connects the predecessor of the node to the node itself (except for the root). More precisely, we label each node with a pair σ = (α, q), where α is the set of atomic concepts that are true in the node, and q = Q if the node is reached from its predecessor through the basic role Q. That is, if Q stands for an atomic role P, then the node is reached from its predecessor through P, and if Q stands for P − , then the predecessor is reached from the node through P. In the root, q = Pdum , where Pdum is a new symbol representing a dummy role. 5
We recall that C and C stand for arbitrary concepts, and R and R stand for arbitrary roles.
190
D. Calvanese and G. De Giacomo
Given an ALCFI reg concept C0 , we construct an automaton AC0 that accepts trees that correspond to tree models of C0 . For technical reasons, it is convenient to consider concepts in negation normal form (i.e., negations are pushed inside as much as possible). It is easy to check that the transformation of a concept into negation normal form can be performed in linear time in the size of the concept. Below, we denote by nnf(C) the negation normal form of C, and by CLnnf (C0 ) the set {nnf(C) | C ∈ CL(C0 )}. The automaton AC0 = ( , S, δ, sini , F) is defined as follows. r The alphabet is = 2A × (B ∪ {Pdum }), i.e., the set of pairs whose first component is a set of atomic concepts, and whose second component is a basic role or the dummy role Pdum . This corresponds to labeling each node of the tree with a truth assignment to the atomic concepts, and with the role used to reach the node from its predecessor. r The set of states is S = {sini } ∪ CLnnf (C0 ) ∪ {Q, ¬Q | Q ∈ B}, where sini is the initial state, CLnnf (C0 ) is the set of concepts (in negation normal form) in the closure of C0 , and {Q, ¬Q | Q ∈ B} are states used to check whether a basic role labels a node. Intuitively, when the automaton in a state C ∈ CLnnf (C0 ) visits a node x of the tree, this means that the automaton has to check that C holds in x. r The transition function δ is defined as follows. 1. For each α ∈ 2A , there is a transition from the initial state δ(sini , (α, Pdum )) = (0, nnf(C0 )). Such a transition checks that the root of the tree is labeled with the dummy role Pdum , and moves to the state that verifies C0 in the root itself. 2. For each (α, q) ∈ and each atomic concept A ∈ A, there are transitions
true, if A ∈ α δ(A, (α, q)) = false, if A ∈ α
true, if A ∈ α δ(¬A, (α, q)) = false, if A ∈ α. Such transitions check the truth value of atomic concepts and their negations in the current node of the tree. 3. For each (α, q) ∈ and each basic role Q ∈ B, there are transitions
true, if q = Q δ(Q, (α, q)) = false, if q = Q
true, if q = Q δ(¬Q, (α, q)) = false, if q = Q. Such transitions check through which role the current node is reached. 4. For the concepts in CLnnf (C0 ) and each σ ∈ , there are transitions δ(C C , σ ) = (0, C) ∧ (0, C ) δ(C C , σ ) = (0, C) ∨ (0, C ) δ(∀Q.C, σ ) = ((0, ¬Q − ) ∨ (−1, C)) ∧ 1≤i≤kC ((i, ¬Q) ∨ (i, C)) 0
5
Expressive Description Logics
191
δ(∀(R R ).C, σ ) = (0, ∀R.C) ∧ (0, ∀R .C) δ(∀(R ◦ R ).C, σ ) = (0, ∀R.∀R .C) δ(∀R ∗ .C, σ ) = (0, C) ∧ (0, ∀R.∀R ∗ .C) δ(∀id(C).C , σ ) = (0, nnf(¬C)) ∨ (0, C ) δ(∃Q.C, σ ) = ((0, Q − ) ∧ (−1, C)) ∨ 1≤i≤kC ((i, Q) ∧ (i, C)) δ(∃(R R ).C, σ ) = (0, ∃R.C) ∨ (0, ∃R .C) δ(∃(R ◦ R ).C, σ ) = (0, ∃R.∃R .C) δ(∃R ∗ .C, σ ) = (0, C) ∨ (0, ∃R.∃R ∗ .C)
0
δ(∃id(C).C , σ ) = (0, C) ∧ (0, C ). All such transitions, except for those involving ∀R ∗ .C and ∃R ∗ .C, inductively decompose concepts and roles, and move to appropriate states of the automaton and nodes of the tree. The transitions involving ∀R ∗ .C treat ∀R ∗ .C as the equivalent concept C ∀R.∀R ∗ .C, and the transitions involving ∃R ∗ .C treat ∃R ∗ .C as the equivalent concept C ∃R.∃R ∗ .C. 5. For each concept of the form 1 Q in CLnnf (C) and each σ ∈ , there is a transition δ( 1 Q, σ ) = ((0, Q − ) ∧ 1≤i≤k (i, ¬Q)) ∨ C0 − ((0, ¬Q ) ∧ 1≤i< j≤kC ((i, ¬Q) ∨ ( j, ¬Q))). 0
Such transitions check that, for a node x labeled with 1 Q, there exists at most one node (among the predecessor and the successors of x) reachable from x through Q. 6. For each concept of the form ¬ 1 Q in CLnnf (C) and each σ ∈ , there is a transition δ(¬ 1 Q, σ ) = ((0, Q − ) ∧ 1≤i≤kC0 (i, Q)) ∨ 1≤i< j≤kC ((i, Q) ∧ ( j, Q)). 0
Such transitions check that, for a node x labeled with ¬ 1 Q, there exist at least two nodes (among the predecessor and the successors of x) reachable from x through Q. r The set F of final states is the set of concepts in CLnnf (C0 ) of the form ∀R ∗ .C. Observe that concepts of the form ∃R ∗ .C are not final states, and this is sufficient to guarantee that such concepts are satisfied in all accepting runs of the automaton.
A run of the automaton AC0 on an infinite tree starts in the root, checking that C0 holds there (item 1 above). It does so by inductively decomposing nnf(C0 ) while appropriately navigating the tree (items 3 and 4) until it arrives at atomic concepts, functional restrictions, and their negations. These are checked locally (items 2, 5, and 6). Concepts of the form ∀R ∗ .C and ∃R ∗ .C are propagated using the equivalent concepts C ∀R.∀R ∗ .C and C ∃R.∃R ∗ .C, respectively. It is only the propagation of such concepts that may generate infinite branches in a run. Now, a run of the automaton may contain an infinite branch in which ∃R ∗ .C is always resolved by choosing the disjunct ∃R.∃R ∗ .C, without ever choosing the disjunct C. This infinite branch in the run corresponds to an infinite path in the tree where
192
D. Calvanese and G. De Giacomo
R is iterated forever and in which C is never fulfilled. However, the semantics of ∃R ∗ .C requires that C is fulfilled after a finite number of iterations of R. Hence such an infinite path cannot be used to satisfy ∃R ∗ .C. The acceptance condition of the automaton, which requires that each infinite branch in a run contains a state of the form ∀R ∗ .C, rules out such infinite branches in accepting runs. Indeed, a run always deferring the fulfillment of C will contain an infinite branch where all states have the form ∃R1 . · · · ∃Rn .∃R ∗ .C, with n ≥ 0 and R1 ◦ · · · ◦ Rn a postfix of R. Observe that the only remaining infinite branches in a run are those that arise by propagating concepts of the form ∀R ∗ .C indefinitely often. The acceptance condition allows for such branches. Given a labeled tree T = (T, V ) accepted by AC0 , we define an interpretation IT = (I , ·I ) as follows. First, we define for each atomic role P, a relation R P as follows: R P = { (x, xi) | xi ∈ T and V (xi) = (α, P) for some α ∈ 2A } ∪ { (xi, x) | xi ∈ T and V (xi) = (α, P − ) for some α ∈ 2A }. Then, using such relations, we define: r I = { x | (ε, x) ∈ ( (R P ∪ R− ))∗ }; P P r AI = I ∩ { x | V (x) = (α, q) and A ∈ α, for some α ∈ 2A and q ∈ B ∪ {P } }, for dum each atomic concept A; r P I = (I × I ) ∩ R P , for each atomic role P.
Lemma 5.7 If a labeled tree T is accepted by AC0 , then IT is a model of C0 . Conversely, given a tree model I of C0 with branching degree kC0 , we can obtain a labeled tree TI = (T, V ) (with branching degree kC0 ) as follows: r T = I ; r V (ε) = (α, P ), where α = {A | ε ∈ AI }; dum r V (xi) = (α, Q), where α = {A | xi ∈ AI } and (x, xi) ∈ Q I .
Lemma 5.8 If I is a tree model of C0 with branching degree kC0 , then TI is a labeled tree accepted by AC0 . From the lemmas above and the tree model property of ALCFI reg (Theorem 5.6), we get the following result. Theorem 5.9 An ALCFI reg concept C0 is satisfiable if and only if the set of trees accepted by AC0 is not empty. From this theorem, it follows that we can use algorithms for non-emptiness of 2ATAs to check satisfiability in ALCFI reg . It turns out that such a decision
5
Expressive Description Logics
193
procedure is indeed optimal w.r.t. the computational complexity. The 2ATA AC0 has a number of states that is linear in the size of C0 , while the alphabet is exponential in the number of atomic concepts occurring in C0 . By Theorem 5.5 we get an upper bound for reasoning in ALCFI reg that matches the ExpTime lower bound. Theorem 5.10 Concept satisfiability (and hence logical implication) in ALCFI reg is ExpTime-complete. Functional restrictions, in the context of expressive Description Logics that include inverse roles and TBox axioms, were originally studied in [De Giacomo and Lenzerini, 1994a; De Giacomo, 1995] using the so called axiom schema instantiation technique. The technique is based on the idea of devising an axiom schema corresponding to the property of interest (e.g., functional restrictions) and instantiating such a schema to a finite (polynomial) number of concepts. A nice illustration of this technique is the reduction of converse-pdl to pdl in [De Giacomo, 1996]. Axiom schema instantiation can be used to show that reasoning w.r.t. TBoxes is ExpTime-complete in significant subcases of ALCFI reg (such as reasoning w.r.t. ALCFI TBoxes [Calvanese et al., 2001b]). However, it is still open whether it can be applied to show ExpTime-completeness of ALCFI reg . The attempt in this direction presented in [De Giacomo and Lenzerini, 1994a; De Giacomo, 1995] turned out to be incomplete [Zakharyaschev, 2000].
5.4 Qualified number restrictions Next we deal with qualified number restrictions, which are the most general form of number restrictions, and allow one to specify arbitrary cardinality constraints on roles with role fillers belonging to a certain concept. In particular we will consider qualified number restrictions on basic roles, i.e., atomic roles and their inverse. By adding such constructs to ALCI reg we obtain the Description Logic ALCQI reg . The PDL corresponding to ALCQI reg is an extension of converse-pdl with “graded modalities” [Fattorosi-Barnaba and De Caro, 1985; Van der Hoek and de Rijke, 1995; Tobies, 1999c] on atomic programs and their converse. Formally, ALCQI reg is obtained from ALCI reg by adding qualified number restrictions of the form n Q.C and n Q.C, where n is a nonnegative integer, Q is a basic role, and C is an ALCQI reg concept. Such constructs are interpreted as follows: ( n Q.C)I = {o ∈ I | |{o ∈ I | (o, o ) ∈ Q I ∧ o ∈ C I }| ≤ n} ( n Q.C)I = {o ∈ I | |{o ∈ I | (o, o ) ∈ Q I ∧ o ∈ C I }| ≥ n}.
194
D. Calvanese and G. De Giacomo
Reasoning in ALCQI reg is still ExpTime-complete under the standard assumption in Description Logics, that numbers in number restrictions are represented in unary.6 This could be shown by extending the automata-theoretic techniques introduced in Section 5.3 to deal also with qualified number restrictions. Here we take a different approach and study reasoning in ALCQI reg by exhibiting a reduction from ALCQI reg to ALCFI reg [De Giacomo and Lenzerini, 1995; De Giacomo, 1995]. Since the reduction is polynomial, we get as a result ExpTime-completeness of ALCQI reg . The reduction is based on the notion of reification. Such a notion plays a major role in dealing with Boolean combinations of (atomic) roles [De Giacomo and Lenzerini, 1995; 1994c], as well as in extending expressive Description Logics with relations of arbitrary arity (see Section 5.7).
5.4.1 Reification of roles Atomic roles are interpreted as binary relations. Reifying a binary relation means creating for each pair of individuals (o1 , o2 ) in the relation an individual which is connected by means of two special roles V1 and V2 to o1 and o2 , respectively. The set of such individuals represents the set of pairs forming the relation. However, the following problem arises: in general, there may be two or more individuals all connected by means of V1 and V2 to o1 and o2 respectively, and thus all representing the same pair (o1 , o2 ). Obviously, in order to have a correct representation of a relation, such a situation must be avoided. Given an atomic role P, we define its reified form to be the role V1− ◦ id(A P ) ◦ V2 where A P is a new atomic concept denoting individuals representing the tuples of the relation associated with P, and V1 and V2 denote two functional roles that connect each individual in A P respectively to the first and the second component of the tuple represented by the individual. Observe that there is a clear symmetry between the role V1− ◦ id(A P ) ◦ V2 and its inverse V2− ◦ id(A P ) ◦ V1 . Definition 5.11 Let C be an ALCQI reg concept. The reified counterpart ξ1 (C) of C is the conjunction of two concepts, ξ1 (C) = ξ0 (C) 1 , where: r ξ0 (C) is obtained from the original concept C by (i) replacing every atomic role P by the complex role V1− ◦ id(A P ) ◦ V2 , where V1 and V2 are new atomic roles (the only ones present after the transformation) and A P is a new atomic concept; (ii) and then 6
In [Tobies, 2001a] techniques for dealing with qualified number restrictions with numbers coded in binary are presented, and are used to show that even under this assumption reasoning over ALCQI knowledge bases can be done in ExpTime.
5
Expressive Description Logics
195
re-expressing every qualified number restriction n (V1− ◦ id(A P ) ◦ V2 ).D n (V1− ◦ id(A P ) ◦ V2 ).D n (V2− ◦ id(A P ) ◦ V1 ).D n (V2− ◦ id(A P ) ◦ V1 ).D
as as as as
n V1− .(A P n V1− .(A P n V2− .(A P n V2− .(A P
∃V2 .D) ∃V2 .D) ∃V1 .D) ∃V1 .D)
r = ∀(V V V − V − )∗ .( 1 V 1 V ). 1 1 2 1 2 1 2
The next theorem guarantees that, without loss of generality, we can restrict our attention to models of ξ1 (C) that correctly represent relations associated with atomic roles, i.e., models in which each tuple of such relations is represented by a single individual. Theorem 5.12 If the concept ξ1 (C) has a model I then it has a model I such that for each (o, o ) ∈ (V1− ◦ id(A Pi ) ◦ V2 )I there is exactly one individual ooo such that (ooo , o) ∈ V1I and (ooo , o ) ∈ V2I . That is, for all o1 , o2 , o, o ∈ I such that o1 = o2 and o = o , the following condition holds:
o1 , o2 ∈ AIPi ⊃ ¬((o1 , o) ∈ V1I ∧ (o2 , o) ∈ V1I ∧ (o1 , o ) ∈ V2I ∧ (o2 , o ) ∈ V2I ). The proof of Theorem 5.12 exploits the disjoint union model property: let C be an ALCQI reg concept and I = (I , ·I ) and J = (J , ·J ) be two models of C, then also the interpretation I / J = (I / J , ·I / ·J ), which is the disjoint union of I and J , is a model of C. We remark that most Description Logics have such a property, which is, in fact, typical of modal logics. Without going into details, we just mention that the model I is constructed from I as the disjoint union of several copies of I, in which the extension of role V2 is modified by exchanging, in those instances that cause a wrong representation of a role, the second component with a corresponding individual in one of the copies of I. By using Theorem 5.12 we can prove the result below. Theorem 5.13 An ALCQI reg concept C is satisfiable if and only if its reified counterpart ξ1 (C) is satisfiable. 5.4.2 Reducing ALCQI reg to ALCFI reg By Theorem 5.13, we can concentrate on the reified counterparts of ALCQI reg concepts. Note that these are themselves ALCQI reg concepts, but their special form allows us to convert them into ALCFI reg concepts. Intuitively, we represent the role Vi− , i = 1, 2 (recall that Vi is functional while Vi− is not), by the role
196
D. Calvanese and G. De Giacomo
FVi ◦ FV i ∗ , where FVi and FV i are new functional roles.7 The main point of such a transformation is that it is easy to express qualified number restrictions as constraints on the chain of (FVi ◦ FV i ∗ )-successors of an individual. Formally, we define the ALCFI reg -counterpart of an ALCQI reg concept as follows. Definition 5.14 Let C be an ALCQI reg concept and ξ1 (C) = ξ0 (C) 1 its reified counterpart. The ALCFI reg -counterpart ξ2 (C) of C is the conjunction of two concepts, ξ2 (C) = ξ0 (C) ∧ 2 , where: r ξ (C) is obtained from ξ0 (C) by simultaneously replacing:8 0 – every occurrence of role Vi in constructs different from qualified number restrictions by (FVi ◦ FV i ∗ )− , where FVi and FV i are new atomic roles; – every n Vi− .D by ∀(FVi ◦ FV i ∗ ◦ (id(D) ◦ FV i + )n ).¬D; – every n Vi− .D by ∃(FVi ◦ FV i ∗ ◦ (id(D) ◦ FV i + )n−1 ).D. − − ∗ r 2 = ∀( i=1,2 (FVi FVi FVi FVi )) .(θ1 θ2 ), with θi of the form: 1 FVi 1 FV i 1 FV−i 1 FV i − ¬(∃FV−i . ∃FV i − .).
Observe that 2 constrains each model I of ξ2 (C) so that the relations FVIi , FV i I , (FV−i )I , and (FV i − )I are partial functions, and each individual cannot be linked to other individuals by both (FV−i )I and (FV i − )I . As a consequence, we get that ((FVi ◦ FV i ∗ )− )I is a partial function. This allows us to reconstruct the extension of Vi , as required. We illustrate the basic relationships between a model of an ALCQI reg concept and the models of its reified counterpart and ALCFI reg -counterpart by means of an example. Example 5.15 Consider the concept C0 = ∃P.(= 2 P − .(= 2 P.)) and consider the model I of C0 depicted in Figure 5.1, in which a ∈ C0I . Such a model corresponds to a model I of the reified counterpart ξ1 (C0 ) of C0 , shown in Figure 5.2. The model I of ξ1 (C0 ) in turn corresponds to a model I of the ALCFI reg -counterpart ξ2 (C0 ) of C0 , shown in Figure 5.3. Notice that from I we can easily reconstruct I , and from I the model I of the original concept. It can be shown that ξ1 (C) is satisfiable if and only if ξ2 (C) is satisfiable. Since, as it is easy to see, the size of ξ2 (C) is polynomial in the size of C, we get the following characterization of the computational complexity of reasoning in ALCQI reg . 7 8
The idea of expressing nonfunctional roles by means of chains of functional roles is due to Parikh [1981], who used it to reduce standard pdl to dpdl. Here R + stands for R ◦ R ∗ and R n stands for R ◦ · · · ◦ R (n times).
5
Expressive Description Logics a
197
b
P
P
c
P
P
d
e
Fig. 5.1. A model of the ALCQI reg concept C0 = ∃P.(= 2 P − .(= 2 P.)). a V1
b V1
1
2
AP V2
V1
AP
AP
AP
4
V2
V2
c
V1 3
V2
d
e
Fig. 5.2. A model of the reified counterpart ξ1 (C0 ) of C0 .
Theorem 5.16 Concept satisfiability (and hence logical implication) in ALCQI reg is ExpTime-complete. 5.5 Objects In this section, we review results involving knowledge about individuals expressed in terms of membership assertions. Given an alphabet O of symbols for individuals, a (membership) assertion has one of the following forms: C(a)
P(a1 , a2 )
where C is a concept, P is an atomic role, and a, a1 , a2 belong to O. An interpretation I is extended so as to assign to each a ∈ O an element a I ∈ I in such a way that the unique name assumption is satisfied, i.e., different elements are assigned to different symbols in O. I satisfies C(a) if a I ∈ C I , and I satisfies P(a1 , a2 ) if (a1I , a2I ) ∈ P I . An ABox A is a finite set of membership assertions, and an interpretation I is called a model of A if I satisfies every assertion in A. A knowledge base is a pair K = (T , A), where T is a TBox, and A is an ABox. An interpretation I is called a model of K if it is a model of both T and A. K is satisfiable if it has a model, and K logically implies an assertion β, denoted K |= β, where β is either an inclusion or a membership assertion, if every model of K satisfies β. Logical implication can be reformulated in terms of unsatisfiability: e.g., K |= C(a) iff K ∪ {¬C(a)} is unsatisfiable; similarly K |= C1 C2 iff K ∪ {(C1 ¬C2 )(a )} is unsatisfiable, where a does not occur in K. Therefore, we only need a procedure for checking satisfiability of a knowledge base.
198
D. Calvanese and G. De Giacomo a FV1 1
b
FV 1
AP
2
FV 2
FV1 3
AP FV2
FV2 c
AP
FV 1
4
AP FV2
d
e
Fig. 5.3. A model of the ALCFI reg -counterpart ξ2 (C0 ) of C0 .
Next we illustrate the technique for reasoning on ALCQI reg knowledge bases [De Giacomo and Lenzerini, 1996]. The basic idea is as follows: checking the satisfiability of an ALCQI reg knowledge base K = (T , A) is polynomially reduced to checking the satisfiability of an ALCQI reg knowledge base K = (T , A ), whose ABox A is made of a single membership assertion of the form C(a). In other words, the satisfiability of K is reduced to the satisfiability of the concept C w.r.t. the TBox T of the resulting knowledge base. The latter reasoning service can be realized by means of the method presented in Section 5.4, and, as we have seen, is ExpTimecomplete. Thus, by means of the reduction, we get an ExpTime algorithm for satisfiability of ALCQI reg knowledge bases, and hence for all standard reasoning services on ALCQI reg knowledge bases. Definition 5.17 Let K = (T , A) be an ALCQI reg knowledge base. The reduced form of K is the ALCQI reg knowledge base K = (T , A ) defined as follows. We introduce a new atomic role create, and also for each individual ai , i = 1, . . . , m, occurring in A, a new atomic concept Ai . Then: A = {(∃create.A1 · · · ∃create.Am )(g)}, where g is a new individual (the only one present in A ), and T = T ∪ TA ∪ Taux , where: r T is constituted by the following inclusion axioms: A – for each membership assertion C(ai ) ∈ A, one inclusion axiom Ai C – for each membership assertion P(ai , a j ) ∈ A, two inclusion axioms Ai Aj
∃P.A j 1 P.A j ∃P − .Ai 1 P − .Ai
– for each pair of distinct individuals ai and a j occurring in A, one inclusion axiom Ai ¬A j
5
Expressive Description Logics
199
r Taux is constituted by one inclusion axiom (U stands for (P1 · · · Pn P − · · · 1 Pn− )∗ , where P1 , . . . , Pn are all atomic roles in T ∪ TA ): Ai C ∀U.(¬Ai C) for each Ai occurring in T ∪ TA and each C ∈ C L ext (T ∪ TA ), where C L ext (T ∪ TA ) is a suitably extended syntactic closure9 of T ∪ TA whose size is polynomially related to the size of T ∪ TA [De Giacomo and Lenzerini, 1996].
To understand how the reduced form K = (T , A ) relates to the original knowledge base K = (T , A), first observe that the ABox A is used to force the existence of the only individual g connected by the role create to one instance of each Ai . It can be shown that this allows us to restrict our attention to models of K that represent a graph connected to g, i.e., models I = (I , ·I ) of K such that − I = {g} ∪ {s | (g, s ) ∈ createI ◦ ( P (P I ∪ P I )∗ )}. The TBox T consists of three parts T , TA , and Taux . T is the original inclusion axioms. TA is what we may call a “naive encoding” of the original ABox A as inclusion axioms. Indeed, each individual ai is represented in TA as a new atomic concept Ai (disjoint from the other A j ’s), and the membership assertions in the original ABox A are represented as inclusion axioms in TA involving such new atomic concepts. However T ∪ TA alone does not suffice to represent faithfully (w.r.t. the reasoning services we are interested in) the original knowledge base, because an individual ai in K is represented by the set of instances of Ai in K . In order to reduce the satisfiability of K to the satisfiability of K, we must be able to single out, for each Ai , one instance of Ai representative of ai . For this purpose, we need to include in T a new part, called Taux , which contains inclusion axioms of the form Ai C ∀U.(¬Ai C). Intuitively, such axioms say that, if one instance of Ai is also an instance of C, then every instance of Ai is an instance of C. Observe that, if we could add an infinite set of axioms of this form, one for each possible concept of the language (i.e., an axiom schema), we could safely restrict our attention to models of K with just one instance for every concept Ai , since there would be no way in the logic to distinguish two instances of Ai one from the other. What is shown by De Giacomo and Lenzerini [1996] is that in fact we do need only a polynomial number of such inclusion axioms (as specified by Taux ) in order to be able to identify, for each i, an instance of Ai as representative of ai . This allows us to prove that the existence of a model of K implies the existence of a model of K. 9
The syntactic closure of a TBox is the syntactic closure of the concept obtained by internalizing the axioms of the TBox.
200
D. Calvanese and G. De Giacomo
Theorem 5.18 Knowledge base satisfiability (and hence every standard reasoning service) in ALCQI reg is ExpTime-complete. Using a similar approach, De Giacomo and Lenzerini [1994a] and De Giacomo [1995] extend ALCQreg and ALCI reg by adding special atomic concepts Aa , called nominals, having exactly one single instance a, i.e., the individual they name. Nominals may occur in concepts exactly as atomic concepts, and hence they constitute one of the most flexible ways to express knowledge about single individuals. By using nominals we can capture the “one-of” construct, having the form {a1 , . . . , an }, denoting the concept made of exactly the enumerated individuals a1 , . . . , an .10 We can also capture the “fills” construct, having the form R : a, denoting those individuals having the individual a as a role filler of R.11 (See [Schaerf, 1994b] and references therein for further discussion on these constructs.) Let us denote by ALCQOreg and ALCIOreg the Description Logics resulting from adding nominals to ALCQreg and ALCI reg respectively. De Giacomo and Lenzerini [1994a] and De Giacomo [1995] polynomially reduce satisfiability in ALCQOreg and ALCIOreg knowledge bases to satisfiability of ALCQreg and ALCI reg concepts respectively, hence showing decidability and ExpTimecompleteness of reasoning in these logics. ExpTime-completeness does not hold for ALCQIOreg , i.e., ALCQI reg extended with nominals. Indeed, a result by Tobies [1999a; 1999b] shows that reasoning in such a logic is NExpTime-hard. Its decidability remains an open problem. The notion of nominal introduced above has a correspondent in modal logic [Prior, 1967; Bull, 1970; Blackburn and Spaan, 1993; Gargov and Goranko, 1993; Blackburn, 1993]. Nominals have also been studied within the setting of PDLs [Passy and Tinchev, 1985; Gargov and Passy, 1988; Passy and Tinchev, 1991]. The results for ALCQOreg and ALCIOreg are immediately applicable also in the setting of PDLs. In particular, the PDL corresponding to ALCQOreg is standard pdl augmented with nominals and graded modalities (qualified number restrictions). It is an extension of deterministic combinatory PDL, dcpdl, which is essentially dpdl augmented with nominals. The decidability of dcpdl is established by Passy and Tinchev [1985], who also prove that satisfiability can be checked in nondeterministic double exponential time. This is tightened by the result above on ExpTime-completeness of ALCQOreg , which says that dcpdl is in fact ExpTime-complete, thus closing the previous gap between the upper bound and the lower bound. The PDL corresponding to ALCIOreg is converse-pdl augmented 10 11
Actually, nominals and the one-of construct are essentially equivalent, since a name Aa is equivalent to {a} and {a1 , . . . , an } is equivalent to Aa1 · · · Aan . The “fills” construct R : a is captured by ∃R.Aa .
5
Expressive Description Logics
201
with nominals, which is also called converse combinatory PDL, ccpdl [Passy and Tinchev, 1991]. Such a logic was not known to be decidable [Passy and Tinchev, 1991]. Hence the results mentioned above allow us to establish the decidability of ccpdl and to precisely characterize the computational complexity of satisfiability (and hence of logical implication) as ExpTime-complete.
5.6 Fixpoint constructs Decidable Description Logics equipped with explicit fixpoint constructs have been devised in order to model inductive and coinductive data structures such as lists, streams, trees, etc. [De Giacomo and Lenzerini, 1994d; Schild, 1994; De Giacomo and Lenzerini, 1997; Calvanese et al., 1999c]. Such logics correspond to extensions of the propositional µ-calculus [Kozen, 1983; Streett and Emerson, 1989; Vardi, 1998], a variant of PDL with explicit fixpoints that is used to express temporal properties of reactive and concurrent processes [Stirling, 1996; Emerson, 1996]. Such logics can also be viewed as a well-behaved fragment of first-order logic with fixpoints [Park, 1970; 1976; Abiteboul et al., 1995]. Here, we concentrate on the Description Logic µALCQI studied by Calvanese et al. [1999c]. Such a Description Logic is derived from ALCQI by adding least and greatest fixpoint constructs. The availability of explicit fixpoint constructs allows inductive and coinductive concepts to be expressed in a natural way. Example 5.19 Consider the concept Tree, representing trees, inductively defined as follows: (i) An individual that is an EmptyTree is a Tree. (ii) If an individual is a Node, has at most one parent, has some children, and all children are Trees, then such an individual is a Tree.
In other words, Tree is the concept with the smallest extension among those satisfying the assertions (i) and (ii). Such a concept is naturally expressed in µALCQI by making use of the least fixpoint construct µX.C: Tree ≡ µX.(EmptyTree (Node 1 child− ∃child. ∀child.X )). Example 5.20 Consider the well-known linear data structure, called stream. Streams are similar to lists except that, while lists can be considered as finite sequences of nodes, streams are infinite sequences of nodes. Such a data structure is captured by the concept Stream, coinductively defined as follows: (i) An individual that is a Stream, is a Node and has a single successor which is a Stream.
202
D. Calvanese and G. De Giacomo
In other words, Stream is the concept with the largest extension among those satisfying condition (i). Such a concept is naturally expressed in µALCQI by making use of the greatest fixpoint construct ν X.C: Stream ≡ ν X.(Node 1 succ ∃succ.X ). Let us now introduce µALCQI formally. We make use of the standard firstorder notions of scope, bound and free occurrences of variables, closed formulae, etc., treating µ and ν as quantifiers. The primitive symbols in µALCQI are atomic concepts, (concept) variables, and atomic roles. Concepts and roles are formed according to the following syntax: C −→ A | ¬C | C1 C2 | n R.C | µX.C | X R −→ P | P − where A denotes an atomic concept, P an atomic role, C an arbitrary µALCQI concept, R an arbitrary µALCQI role (i.e., either an atomic role or the inverse of an atomic role), n a natural number, and X a variable. The concept C in µX.C must be syntactically monotone, that is, every free occurrence of the variable X in C must be in the scope of an even number of negations [Kozen, 1983]. This restriction guarantees that the concept C denotes a monotonic operator and hence both the least and the greatest fixpoints exist and are unique (see later). In addition to the usual abbreviations used in ALCQI, we introduce the abbreviation ν X.C for ¬µX.¬C[X/¬X ], where C[X/¬X ] is the concept obtained by replacing all free occurrences of X by ¬X . The presence of free variables prevents us from extending the interpretation function ·I directly to every concept of the logic. For this reason we introduce valuations. A valuation ρ on an interpretation I is a mapping from variables to subsets of I . Given a valuation ρ, we denote by ρ[X/E] the valuation identical to ρ except that ρ[X/E](X ) = E. Let I be an interpretation and ρ a valuation on I. We assign meaning to concepts of the logic by associating to I and ρ an extension function ·Iρ , mapping concepts to subsets of I , as follows: X ρI = ρ(X ) ⊆ I AIρ = AI ⊆ I
(¬C)Iρ = I \ CρI
(C1 C2 )Iρ = (C1 )Iρ ∩ (C2 )Iρ
n R.CρI = {s ∈ I | | {s | (s, s ) ∈ R I and s ∈ CρI } | ≥ n} I (µX.C)Iρ = {E ⊆ I | Cρ[X/E] ⊆ E }.
5
Expressive Description Logics
203
I Observe that Cρ[X/E] can be seen as an operator from subsets E of I to subsets of I , and that, by the syntactic restriction enforced on variables, such an operator is guaranteed to be monotonic w.r.t. set inclusion. µX.C denotes the least fixpoint of the operator. Observe also that the semantics assigned to ν X.C is I {E ⊆ I |E ⊆ Cρ[X/E] }. (ν X.C)Iρ =
Hence ν X.C denotes the greatest fixpoint of the operator. In fact, we are interested in closed concepts, whose extension is independent of the valuation. For closed concepts we do not need to consider the valuation explicitly, and hence the notions of concept satisfiability, logical implication, etc. extend straightforwardly. Exploiting a recent result on ExpTime decidability of modal µ-calculus with converse [Vardi, 1998], and exploiting a reduction technique for qualified number restrictions similar to the one presented in Section 5.4, Calvanese et al. [1999c] have shown that the same complexity bound holds also for reasoning in µALCQI. Theorem 5.21 Concept satisfiability (and hence logical implication) in µALCQI is ExpTime-complete. For certain applications, variants of µALCQI that allow for mutual fixpoints, denoting least and greatest solutions of mutually recursive equations, are of interest [Schild, 1994; Calvanese et al., 1998c; 1999b]. Mutual fixpoints can be re-expressed by suitably nesting the kind of fixpoints considered here (see, for example, [de Bakker, 1980; Schild, 1994]). It is interesting to notice that, although the resulting concept may be exponentially large in the size of the original concept with mutual fixpoints, the number of (distinct) subconcepts of the resulting concept is polynomially bounded by the size of the original one. By virtue of this observation, and using the reasoning procedure of Calvanese et al. [1999c], we can strengthen the above result. Theorem 5.22 Checking satisfiability of a closed µALCQI concept C can be done in deterministic exponential time w.r.t. the number of (distinct) subconcepts of C. Although µALCQI does not have the rich variety of role constructs of ALCQI reg , it is actually an extension of ALCQI reg , since any ALCQI reg concept can be expressed in µALCQI using the fixpoint constructs in a suitable way. To express concepts involving complex role expressions, it suffices to resort to the
204
D. Calvanese and G. De Giacomo
following equivalences: ∃(R1 ◦ R2 ).C ∃(R1 R2 ).C ∃R ∗ .C ∃id(D).C
= = = =
∃R1 .∃R2 .C ∃R1 .C ∃R2 .C µX.(C ∃R.X ) C D.
Note that, according to such equivalences, we have also that ∀R ∗ .C = ν X.(C ∀R.X ). Calvanese et al. [1995] advocate a further construct corresponding to an implicit form of fixpoint, the so called well-founded concept construct wf (R). Such a construct is used to impose well-foundedness of chains of roles, and thus allows one to correctly capture inductive structures. Using explicit fixpoints, wf (R) is expressed as µX.(∀R.X ). We remark that, in order to gain the ability to express inductively and coinductively defined concepts, it has been proposed to adopt ad hoc semantics for interpreting knowledge bases, specifically the least fixpoint semantics for expressing inductive concepts and the greatest fixpoint semantics for expressing coinductive ones (see Chapter 2 and also [Nebel, 1991; Baader, 1990a; 1991; Dionne et al., 1992; K¨usters, 1998; Buchheit et al., 1998]). Logics equipped with fixpoint constructs allow statements interpreted according to the least and greatest fixpoint semantics to be mixed in the same knowledge base [Schild, 1994; De Giacomo and Lenzerini, 1997], and thus can be viewed as a generalization of these approaches. Recently, using techniques based on alternating two-way automata, it has been shown that the propositional µ-calculus with converse programs remains ExpTime-decidable when extended with nominals [Sattler and Vardi, 2001]. This logic corresponds to a Description Logic which could be called µALCIO. 5.7 Relations of arbitrary arity A limitation of traditional Description Logics is that only binary relationships between instances of concepts can be represented, while in some real world situations it is required to model relationships among more than two objects. Such relationships can be captured by making use of relations of arbitrary arity instead of (binary) roles. Various extensions of Description Logics with relations of arbitrary arity have been proposed [Schmolze, 1989; Catarci and Lenzerini, 1993; De Giacomo and Lenzerini, 1994c; Calvanese et al., 1997; 1998a; Lutz et al., 1999]. We concentrate on the Description Logic DLR [Calvanese et al., 1997; 1998a], which represents a natural generalization of traditional Description Logics towards
5
Expressive Description Logics
205
n-ary relations. The basic elements of DLR are atomic relations and atomic concepts, denoted by P and A respectively. Arbitrary relations, of given arity between 2 and n max , and arbitrary concepts are formed according to the following syntax: R −→ n | P | ($i/n: C) | ¬R | R1 R2 C −→ 1 | A | ¬C | C1 C2 | ∃[$i]R | k [$i]R where i denotes a component of a relation, i.e., an integer between 1 and n max , n denotes the arity of a relation, i.e., an integer between 2 and n max , and k denotes a nonnegative integer. Concepts and relations must be well-typed, which means that only relations of the same arity n can be combined to form expressions of type R1 R2 (which inherit the arity n), and i ≤ n whenever i denotes a component of a relation of arity n. The semantics of DLR is specified through the usual notion of interpretation I = (I , ·I ), where the interpretation function ·I assigns to each concept C a subset C I of I , and to each relation R of arity n a subset RI of (I )n , such that the following conditions are satisfied: In PI (¬R)I (R1 R2 )I ($i/n: C)I
⊆ ⊆ = = =
(I )n In In \ RI RI1 ∩ RI2 {(d1 , . . . , dn ) ∈ In | di ∈ C I }
I1 AI (¬C)I (C1 C2 )I (∃[$i]R)I ( k [$i]R)I
= ⊆ = = = =
I I I \ C I C1I ∩ C2I I I {d ∈ I | ∃(d1 , . . . , dn ) ∈ R I. di = d} d ∈ | | {(d1 , . . . , dn ) ∈ R1 | di = d |} ≤ k}
where P, R, R1 , and R2 have arity n. Observe that 1 denotes the interpretation domain, while n , for n > 1, does not denote the n-cartesian product of the domain, but only a subset of it, that covers all relations of arity n that are introduced. As a consequence, the “¬” construct on relations expresses difference of relations rather than complement. The construct ($i/n: C) denotes all tuples in n that have an instance of concept C as their ith component, and therefore represents a kind of selection. Existential quantification and number restrictions on relations are a natural generalization of the corresponding constructs using roles. This can be seen by observing that, while for roles the “direction of traversal” is implicit, for a relation one needs to explicitly say which component is used to “enter” a tuple and which component is used to “exit” it.
206
D. Calvanese and G. De Giacomo
DLR is in fact a proper generalization of ALCQI. The traditional DL constructs can be re-expressed in DLR as follows: ∃P.C ∃P − .C ∀P.C ∀P − .C k P.C k P − .C
as as as as as as
∃[$1](P ($2/2: C)) ∃[$2](P ($1/2: C)) ¬∃[$1](P ($2/2: ¬C)) ¬∃[$2](P ($1/2: ¬C)) k [$1](P ($2/2: C)) k [$2](P ($1/2: C)).
Observe that the constructs using direct and inverse roles are represented in DLR by using binary relations and explicitly specifying the direction of traversal. A TBox in DLR is a finite set of inclusion axioms on both concepts and relations of the form C C
R R
where R and R are two relations of the same arity. The notions of an interpretation satisfying an assertion, and of model of a TBox are defined as usual. The basic technique used in DLR to reason on relations is reification (see Subsection 5.4.1), which allows one to reduce logical implication in DLR to logical implication in ALCQI. Reification for n-ary relations is similar to reification of roles (see Definition 5.11): a relation of arity n is reified by means of a new concept and n functional roles f 1 , . . . , f n . Let the ALCQI TBox T be the reified counterpart of a DLR TBox T . A tuple of a relation R in a model of T is represented in a model of T by an instance of the concept corresponding to R, which is linked through f 1 , . . . , f n respectively to n individuals representing the components of the tuple. In this case reification is further used to encode Boolean constructs on relations into the corresponding constructs on the concepts representing relations. As for reification of roles (see Subsection 5.4.1), performing the reification of relations requires some care, since the semantics of a relation rules out that there may be two identical tuples in its extension, i.e., two tuples constituted by the same components in the same positions. In the reified counterpart, on the other hand, one cannot explicitly rule out (e.g., by using specific axioms) the existence of two individuals o1 and o2 “representing” the same tuple, i.e., that are connected through f 1 , . . . , f n to exactly the same individuals denoting the components of the tuple. A model of the reified counterpart T of T in which this situation occurs may not correspond directly to a model of T , since by collapsing the two equivalent individuals into a tuple, axioms may be violated (e.g., cardinality constraints). However, also in this case the analog of Theorem 5.12 holds, ensuring that from any model of T one can construct a new one in which no two individuals represent the same tuple.
5
Expressive Description Logics
207
Therefore one does not need to take this constraint explicitly into account when reasoning on the reified counterpart of a knowledge base with relations. Since reification is polynomial, from ExpTime-decidability of logical implication in ALCQI (and ExpTime-hardness of logical implication in ALC) we get the following characterization of the computational complexity of reasoning in DLR [Calvanese et al., 1997]. Theorem 5.23 Logical implication in DLR is ExpTime-complete. DLR can be extended to include regular expressions built over projections of relations on two of their components, thus obtaining DLRreg . Such a logic, which represents a generalization of ALCQI reg , allows the internalization of a TBox. ExpTime-decidability (and hence completeness) of DLRreg can again be shown by exploiting reification of relations and reducing logical implication to concept satisfiability in ALCQI reg [Calvanese et al., 1998a]. Recently, DLRreg has been extended to DLRµ , which includes explicit fixpoint constructs on concepts, like those introduced in Section 5.6. The ExpTime-decidability result extends to DLRµ as well [Calvanese et al., 1999c]. Recently it has been observed that guarded fragments of first-order logic [Andr´eka et al., 1996; Gr¨adel, 1999] (see Subsection 4.2.1), which include n-ary relations, share with Description Logics the “locality” of quantification. This makes them of interest as extensions of Description Logics with n-ary relations [Gr¨adel, 1998; Lutz et al., 1999]. Such Description Logics are incomparable in expressive power with DLR and its extensions: On the one hand the Description Logics corresponding to guarded fragments allow one to refer, by the use of explicit variables, to components of relations in a more flexible way than is possible in DLR. On the other hand such Description Logics lack number restrictions, and extending them with number restrictions leads to undecidability of reasoning. Also, reasoning in the guarded fragments is in general NExpTime-hard [Gr¨adel, 1998; 1999] and thus more difficult than in DLR and its extensions, although PSpacecomplete fragments have been identified [Lutz et al., 1999]. 5.7.1 Boolean constructs on roles and role inclusion axioms Observe also that DLR (and DLRreg ) allows Boolean constructs on relations (with negation interpreted as difference) as well as relation inclusion axioms R R . In fact, DLR (resp. DLRreg ) can be viewed as a generalization of ALCQI (resp. ALCQI reg ) extended with Boolean constructs on atomic and inverse atomic roles. Such extensions of ALCQI were first studied in [De Giacomo and Lenzerini, 1994c; De Giacomo, 1995], where logical implication was shown to be
208
D. Calvanese and G. De Giacomo
ExpTime-complete by a reduction to ALCQI (resp. ALCQI reg ). The logics above do not allow atomic roles to be combined with inverse roles in Boolean combinations and role inclusion axioms. Tobies [2001a] shows that, for ALCQI extended with arbitrary Boolean combinations of atomic and inverse atomic roles, logical implication remains in ExpTime. Note that, in all logics above, negation on roles is interpreted as difference. For results on the impact of full negation on roles see [Lutz and Sattler, 2001; Tobies, 2001a]. Horrocks et al. [2000b] investigate reasoning in SHIQ, which is ALCQI extended with roles that are transitive and with role inclusion axioms on arbitrary roles (direct, inverse, and transitive). SHIQ does not include reflexive–transitive closure. However, transitive roles and role inclusions allow a universal role to be expressed (in a connected model), and hence allow TBoxes to be internalized. Satisfiability and logical implication in SHIQ are ExpTime-complete [Tobies, 2001a]. The importance of SHIQ lies in the fact that it is the logic implemented by the current state-of-the-art DL-based systems (see Chapters 8 and 9). 5.7.2 Structured objects An alternative way to overcome the limitations that result from the restriction to binary relationships between concepts, is to consider the interpretation domain as being constituted by objects with a complex structure, and extend the Description Logics with constructs that allow one to specify such a structure [De Giacomo and Lenzerini, 1995]. This approach is in the spirit of object-oriented data models used in databases [Lecluse and Richard, 1989; Bancilhon and Khoshafian, 1989; Hull, 1988], and has the advantage, with respect to introducing relationships, that all aspects of the domain to be modeled can be represented in a uniform way, as concepts whose instances have certain structures. In particular, objects can either be unstructured or have the structure of a set or of a tuple. For objects having the structure of a set a particular role allows one to refer to the members of the set, and similarly each component of a tuple can be referred to by means of the (implicitly functional) role that labels it. In general, reasoning over structured objects can have a very high computational complexity [Kuper and Vardi, 1993]. However, reasoning over a significant fragment of structuring properties can be reduced in polynomial time to reasoning in traditional Description Logics, again by exploiting reification to deal with tuples and sets. Thus, for such a fragment, reasoning can be done in ExpTime [De Giacomo and Lenzerini, 1995]. An important aspect in exploiting Description Logics for reasoning over structured objects is being able to limit the depth of the structure of an object to avoid infinite nesting of tuples or sets. This requires the use of a well-founded construct, which is a restricted form of fixpoint (see Section 5.6).
5
Expressive Description Logics
209
5.8 Finite model reasoning For expressive Description Logics, in particular for those containing inverse roles and functionality, a TBox may admit only models with an infinite domain [Cosmadakis et al., 1990; Calvanese et al., 1994]. Similarly, there may be TBoxes in which a certain concept can be satisfied only in an infinite model. This is illustrated in the following example by Calvanese [1996c]. Example 5.24 Consider the TBox FirstGuard Guard ∀shields− .⊥ Guard ∃shields ∀shields.Guard 1 shields− . In a model of this TBox, an instance of FirstGuard can have no shields-predecessor, while each instance of Guard can have at most one. Therefore, the existence of an instance of FirstGuard implies the existence of an infinite sequence of instances of Guard, each one connected through the role shields to the following one. This means that FirstGuard can be satisfied in an interpretation with a domain of arbitrary cardinality, but not in interpretations with a finite domain. Note that the TBox above is expressed in a very simple Description Logic, in particular AL (see Chapter 2) extended with inverse roles and functionality. A logic is said to have the finite model property if every satisfiable formula of the logic admits a finite model, i.e., a model with a finite domain. The example above shows that virtually all Description Logics including functionality, inverse roles, and TBox axioms (or having the ability to internalize them) lack the finite model property. The example shows also that to lose the finite model property, functionality in only one direction is sufficient. In fact, it is well known that converse-dpdl, which corresponds to a fragment of ALCFI reg , lacks the finite model property [Kozen and Tiuryn, 1990; Vardi and Wolper, 1986]. For all logics that lack the finite model property, reasoning with respect to unrestricted and finite models are fundamentally different tasks, and this needs to be taken explicitly into account when devising reasoning procedures. Restricting reasoning to finite domains is not common in knowledge representation. However, it is typically of interest in databases, where one assumes that the data available are always finite [Calvanese et al., 1994; 1999e]. When reasoning w.r.t. finite models, some properties that are essential for the techniques developed for unrestricted model reasoning in expressive Description Logics fail. In particular, all reductions exploiting the tree model property (or similar properties that are based on “unraveling” structures) [Vardi, 1997] cannot be applied since this property does not hold when only finite models are considered.
210
D. Calvanese and G. De Giacomo
An intuitive justification can be given by observing that, whenever a (finite) model contains a cycle, the unraveling of such a model into a tree generates an infinite structure. Therefore alternative techniques have been developed. In this section, we study decidability and computational complexity of finite model reasoning over TBoxes expressed in various sublanguages of ALCQI. Specifically, by using techniques based on reductions to linear programming problems, we show that finite concept satisfiability w.r.t. to ALUN I TBoxes12 constituted by inclusion axioms only is ExpTime-complete [Calvanese et al., 1994], and that finite model reasoning in arbitrary ALCQI TBoxes can be done in deterministic double exponential time [Calvanese, 1996a]. 5.8.1 Finite model reasoning using linear inequalities A procedure for finite model reasoning must specifically address the presence of number restrictions, since it is only in their presence that the finite model property fails. We discuss a method which is indeed based on an encoding of number restrictions into linear inequalities, and which generalizes the one developed by Lenzerini and Nobili [1990] for the Entity–Relationship model with disjoint classes and relationships (hence without IS-A). We first describe the idea underlying the reasoning technique in a simplified case. In the next subsection we show how to apply the technique to various expressive Description Logics [Calvanese and Lenzerini, 1994b; 1994a; Calvanese et al., 1994; Calvanese, 1996a]. Consider an ALN I TBox13 T containing the following axioms: for each pair of distinct atomic concepts A and A , an axiom A ¬A ; and for each atomic role P, an axiom of the form ∀P.A2 ∀P − .A1 , for some atomic concepts A1 and A2 (not necessarily distinct). Such axioms enforce that in all models of T the following hold: P1 : The atomic concepts have pairwise disjoint extensions. P2 : Each role is “typed”, which means that its domain is included in the extension of an atomic concept A1 , and its codomain is included in the extension of an atomic concept A2 .
Assume further that the only additional axioms in T are used to impose cardinality constraints on roles and inverse roles, and are of the form m 1 P n1 P m 2 P − n2 P − where m 1 , n 1 , m 2 , and n 2 are positive integers with m 1 ≤ n 1 and m 2 ≤ n 2 . 12 13
ALUN I is the Description Logic obtained by extending ALUN (see Chapter 2) with inverse roles. ALN I is the Description Logic obtained by extending ALN (see Chapter 2) with inverse roles.
5
Expressive Description Logics
211
Due to the fact that properties P1 and P2 hold, the local conditions imposed by number restrictions on the number of successors of each individual are reflected into global conditions on the total number of instances of atomic concepts and roles. Specifically, it is not difficult to see that, for a model I of such a TBox, and for each P, A1 , A2 , m 1 , m 2 , n 1 , and n 2 as above, the cardinalities of P I , AI1 , and AI2 must satisfy the following inequalities: m 1 · |AI1 |
≤
|P I |
≤
n 1 · |AI1 |
m 2 · |AI2 |
≤
|P I |
≤
n 2 · |AI2 |.
On the other hand, consider the system T of linear inequalities containing for each atomic role P typed by A1 and A2 the inequalities m 1 · Var(A1 ) m 2 · Var(A2 )
≤ ≤
Var(P) Var(P)
≤ ≤
n 1 · Var(A1 ) n 2 · Var(A2 )
(5.1)
where we denote by Var(A) and Var(P) the unknowns, ranging over the nonnegative integers, corresponding to the atomic concept A and the atomic role P respectively. It can be shown that, if the only axioms in T are those mentioned above, then certain non-negative integer solutions of T (called acceptable solutions) can be put into correspondence with finite models of T . More precisely, for each acceptable solution S, one can construct a model of T in which the cardinality of each concept or role X is equal to the value assigned by S to Var(X ) [Lenzerini and Nobili, 1990; Calvanese et al., 1994; Calvanese, 1996c]. Moreover, given T , it is possible to verify, in time polynomial in its size, whether it admits an acceptable solution. This property can be exploited to check finite satisfiability of an atomic concept A w.r.t. a TBox T as follows: (i) Construct the system T of inequalities corresponding to T . (ii) Add to T the inequality Var(A) > 0, which enforces that the solutions correspond to models in which the cardinality of the extension of A is positive. (iii) Check whether T admits an acceptable solution.
Observe that for simple TBoxes of the form described above, this method works in polynomial time, since (i) T is of size polynomial in the size of T , and can also be constructed in polynomial time, and (ii) checking the existence of acceptable solutions of T can be done in time polynomial in its size. Notice also that the applicability of the technique heavily relies on conditions P1 and P2 , which ensure that, from an acceptable solution of T , a model of T can be constructed.
212
D. Calvanese and G. De Giacomo
5.8.2 Finite model reasoning in expressive Description Logics The method we have presented above is not directly applicable to more complex languages or TBoxes not respecting the particular form above. In order to extend it to more general cases we make use of the following observation: Linear inequalities capture global constraints on the total number of instances of concepts and roles. So we have to represent local constraints expressed by number restrictions by means of global constraints. This can be done only if P1 and the following generalization of P2 hold: P2 : For each atomic role P and each concept expression C appearing in T , the domain of P is either included in the extension of C or disjoint from it. Similarly for the codomain of P.
This condition guarantees that, in a model, all instances of a concept “behave” in the same way, and thus the local constraints represented by number restrictions are indeed correctly captured by the global constraints represented by the system of inequalities. It is possible to enforce conditions P1 and P2 for expressive Description Logics, by first transforming the TBox, and then deriving the system of inequalities from the transformed version. We briefly sketch the technique to decide finite concept satisfiability in ALUN I TBoxes consisting of specializations, i.e., inclusion axioms in which the concept on the left-hand side is atomic. A detailed account of the technique and an analysis of its computational complexity has been presented by Calvanese [1996c]. First of all, it is easy to see that, by introducing at most a linear number of new atomic concepts and TBox axioms, we can transform the TBox into an equivalent one in which the nesting of constructs is eliminated. Specifically, in such a TBox the concept on the right-hand side of an inclusion axiom is of the form L, L 1 L 2 , ∀R.L, n R, or n R, where L is an atomic or negated atomic concept. For example, given the axiom A C1 C2 where C1 and C2 do not have the form above, we introduce two new atomic concepts AC1 and AC2 , and replace the axiom above by the following ones: A AC1 AC2
AC1 AC2
C1
C2 .
Then, to ensure that conditions P1 and P2 are satisfied, we use instead of atomic concepts, sets of atomic concepts, called compound concepts14 and instead of atomic 14
A similar technique, called atomic decomposition there, was used by Ohlbach and Koehler [1999].
5
Expressive Description Logics
213
1 , C 2 ) conroles, so called compound roles. Each compound role is a triple (P, C sisting of an atomic role P and two compound concepts C1 and C2 . Intuitively, the are all those individuals of the domain that instances of a compound concept C are instances of all concepts in C and are not instances of any concept not in C. 2 ) is interpreted as the restriction of role P to the pairs 1 , C A compound role (P, C 1 and whose second component is an whose first component is an instance of C 2 . instance of C This means that two different compound concepts have necessarily disjoint extensions, and hence that the property corresponding to P1 holds. The same observation 2 ) and (P, C , C ) that corre 1 , C holds for two different compound roles (P, C 1 2 spond to the same role P. Moreover, for compound roles, the property corresponding to property P2 holds by definition, and, considering that the TBox contains only specializations and that nesting of constructs has been eliminated, P2 also holds. We first consider the set T of axioms in the TBox that do not involve number restrictions. Such axioms force certain compound concepts and compound roles to be inconsistent, i.e., have an empty extension in all interpretations that satisfy T . For example, the axiom A1 ¬A2 makes all compound concepts that contain both A1 and A2 inconsistent. Similarly, the axiom A1 ∀P.A2 makes all compound 2 ) such that C 1 contains A1 and C 2 does not contain A2 inconsistent. 1 , C roles (P, C Checking whether a given compound concept is inconsistent essentially amounts to evaluating a propositional formula in a given propositional model (the one corresponding to the compound concept), and hence can be done in time polynomial in the size of the TBox. Similarly, one can check in time polynomial in the size of the TBox whether a given compound role is inconsistent. Observe, however, that since the total number of compound concepts and roles is exponential in the number of atomic concepts in the TBox, doing the check for all compound concepts and roles takes in general exponential time. Once the consistent compound concepts and roles have been determined, we can introduce for each of them an unknown in the system of inequalities (the inconsistent compound concepts and roles are discarded). The axioms in the TBox involving number restrictions are taken into account by encoding them into suitable linear inequalities. Such inequalities are derived in a way similar to inequalities (5.1), except that now each inequality involves one unknown corresponding to a compound concept and a sum of unknowns corresponding to compound roles. Then, to check finite satisfiability of an atomic concept A, we can add to the system the inequality A C⊆2
| A∈C
≥1 Var(C)
214
D. Calvanese and G. De Giacomo
which forces the extension of A to be nonempty. Again, if the system admits an acceptable solution, then we can construct from such a solution a finite model of the TBox in which A is satisfied; if no such solution exists, then A is not finitely satisfiable. To check finite satisfiability of an arbitrary concept C, we can introduce a new concept name A, add to the TBox the axiom A C, and then check the satisfiability of A. Indeed, if A is finitely satisfiable, then so is C. Conversely, if the original TBox admits a finite model I in which C has a nonempty extension, then we can simply extend I to A by interpreting A as C I , thus obtaining a finite model of the TBox plus the additional axiom in which A is satisfied. The system of inequalities can be effectively constructed in time exponential in the size of the TBox, and checking for the existence of acceptable solutions is polynomial in the size of the system [Calvanese et al., 1994; Calvanese, 1996a]. Moreover, since verifying concept satisfiability is already ExpTime-hard for TBoxes consisting of specializations only and expressed in the much simpler language ALU [Calvanese, 1996b], the above method provides a computationally optimal reasoning procedure. Theorem 5.25 Finite concept satisfiability in ALUN I TBoxes consisting of specializations only is ExpTime-complete. The method can be extended to decide finite concept satisfiability for a wider class of TBoxes, in which a negated atomic concept and, more generally, an arbitrary Boolean combination of atomic concepts may appear on the left-hand side of axioms. In particular, this makes it possible to deal also with knowledge bases containing definitions of concepts that are Boolean combinations of atomic concepts, and to reason on such knowledge bases in deterministic exponential time. Since ALUN I is not closed under negation, we cannot immediately reduce logical implication to concept satisfiability. However, the technique presented above can be adapted in specific cases to decide also finite logical implication in deterministic exponential time [Calvanese, 1996c]. A further extension of the above method can be used to decide logical implication in ALCQI. The technique uses two successive transformations on the TBox, each of which introduces a worst-case exponential blowup, and a final polynomial encoding into a system of linear inequalities [Calvanese, 1996c; 1996a]. Theorem 5.26 Logical implication w.r.t. finite models in ALCQI can be decided in worst-case deterministic double exponential time. For more expressive Description Logics, and in particular for all those Description Logics containing the construct for reflexive–transitive closure of roles, the decidability of finite model reasoning is still an open problem. Decidability of
5
Expressive Description Logics
215
finite model reasoning for C 2 , i.e., first-order logic with two variables and counting quantifiers (see also Chapter 4, Section 4.2) was shown recently [Gr¨adel et al., 1997b]. C 2 is a logic that is strictly more expressive than ALCQI TBoxes, since it allows one, for example, to impose cardinality restrictions on concepts [Baader et al., 1996] or to use the full negation of a role. However, apart from decidability, no complexity bound is known for finite model reasoning in C 2 . Techniques for finite model reasoning have also been studied in databases. In the relational model, the interaction between inclusion dependencies and functional dependencies causes the loss of the finite model property, and finite implication of dependencies under various assumptions has been investigated by Cosmadakis et al. [1990]. A method for finite model reasoning has been presented by Calvanese and Lenzerini [1994b; 1994a] in the context of a semantic and an object-oriented database model, respectively. The reasoning procedure, which represents a direct generalization of the one discussed above to relations of arbitrary arity, does not exploit reification to handle relations (see Section 5.7) but directly encodes the constraints on them into a system of linear inequalities.
5.9 Undecidability results Several additional DL constructs besides those discussed in the previous sections have been proposed in the literature. In this section we present the most important of these extensions, discussing how they influence decidability, and what modifications to the reasoning procedures are needed to take them into account. In particular, we discuss Boolean constructs on roles, variants of role-value-maps or role agreements, and number restrictions on complex roles. Most of these constructs lead to undecidability of reasoning, if used in an unrestricted way. Roughly speaking, this is mainly due to the fact that the tree model property is lost [Vardi, 1997].
5.9.1 Boolean constructs on complex roles In those Description Logics that include regular expressions over roles, such as ALCQI reg , since regular languages are closed under intersection and complementation, the intersection of roles and the complement of a role are already expressible, if we consider them applied to the set of role expressions. Here we consider the more common approach in PDLs, namely to regard Boolean operators as applied to the binary relations denoted by complex roles. The logics thus obtained are more expressive than traditional pdl [Harel, 1984] and reasoning is usually harder. We notice that the semantics immediately implies that intersection of roles can be expressed by means of union and complementation.
216
D. Calvanese and G. De Giacomo
Satisfiability in pdl augmented with intersection of arbitrary programs is decidable in deterministic double exponential time [Danecki, 1984], and so is satisfiability in ALC reg augmented with intersection of complex roles, even though these logics have neither the tree model nor the finite model property. On the other hand, satisfiability in pdl augmented with complementation of programs is undecidable [Harel, 1984], and so is reasoning in ALC reg augmented with complementation of complex roles. Also, dpdl augmented with intersection of complex roles is highly undecidable [Harel, 1985; 1986], and since global functionality of roles (which corresponds to determinism of programs) can be expressed by means of local functionality, the undecidability carries over to ALCF reg augmented with intersection of roles. These proofs of undecidability make use of a general technique based on the reduction from the unbounded tiling (or domino) problem [Berger, 1966; Robinson, 1971], which is the problem of checking whether a quadrant of the integer plane can be tiled using a finite set of tile type – i.e., square tiles with a color on each side – in such a way that adjacent tiles have the same color on the sides that touch.15 We sketch the idea of the proof using the terminology of Description Logics, instead of that of PDLs. The reduction uses two roles right and up which are globally functional (i.e., 1 right, 1 up) and denote pairs of tiles that are adjacent in the x and y directions, respectively. By means of intersection of roles, right and up are constrained to effectively define a two-dimensional grid. This is achieved by imposing for each point of the grid (i.e., reachable through right and up) that by following right ◦ up one reaches a point reached also by following up ◦ right: ∀(right up)∗ .∃((right ◦ up) (up ◦ right)). To enforce this condition, the use of intersection of compositions of atomic roles is essential. Reflexive–transitive closure (i.e., ∀(right up)∗ .C) is then also exploited to impose the required constraints on all tiles of the grid. Observe that, in the above reduction, one can use TBox axioms instead of reflexive–transitive closure to enforce the necessary conditions in every point of the grid. The question arises whether decidability can be preserved if one restricts Boolean operations to basic roles, i.e., atomic roles and their inverse. This is indeed the case if complementation of basic roles is used only to express difference of roles, as demonstrated by the ExpTime decidability of DLR and its extensions, in which intersection and difference of relations are allowed (see Section 5.7).
15
In fact the reduction is from the 11 -complete – and thus highly undecidable – recurring tiling problem [Harel, 1986], where one additionally requires that a certain tile occurs infinitely often on the x-axis.
5
Expressive Description Logics
217
5.9.2 Role-value-maps Another construct, which stems from frame systems, and which provides an additional useful means to specify structural properties of concepts, is the so called role-value-map [Brachman and Schmolze, 1985], which comes in two forms: An equality role-value-map, denoted R1 = R2 , represents the individuals o such that the set of individuals that are connected to o via role R1 equals the set of individuals connected to o via role R2 . The second form of role-value-map is containment role-value-map, denoted R1 ⊆ R2 , whose semantics is defined analogously, using set inclusion instead of set equality. Using these constructs, one can denote, for example, by means of owns ◦ madein ⊆ livesin the set of all persons that own only products manufactured in the country they live in. When role-value-maps are added, the logic loses the tree model property, and this construct leads immediately to undecidability of reasoning when applied to role chains (i.e., compositions of atomic roles). For ALC reg , this can be shown by a reduction from the tiling problem in a similar way to that used in [Harel, 1985] for dpdl with intersection of roles. In this case, the concept right ◦ up = up ◦ right involving role-value-map can be used instead of role intersection to define the constraints on the grid. The proof is slightly more involved than that for dpdl, since one needs to take into account that the roles right and up are not functional (while in dpdl all programs/roles are functional). However, undecidability holds already for concept subsumption (with respect to an empty TBox) in AL (in fact FL− ) augmented with role-value-maps, where the roles involved are compositions of atomic roles [Schmidt-Schauß, 1989] – see Chapter 3 for the details of the proof. As for role intersection, in order to show undecidability, it is necessary to apply role-value-maps to compositions of roles. Indeed, if the application of role-value-maps is restricted to Boolean combinations of basic roles, it can be added to ALCQI reg without influencing decidability and worst-case complexity of reasoning. This follows directly from the decidability results for the extension with Boolean constructs on atomic and inverse atomic roles (captured by DLR). Indeed, R1 ⊆ R2 is equivalent to ∀(R1 ¬R2 ).⊥, and thus can be expressed using difference of roles. We observe also that universal and existential role agreements introduced in [Hanschke, 1992], which allow one to define concepts by posing various types of constraints that relate the sets of fillers of two roles, can be expressed by means of intersection and difference of roles. Thus reasoning in the presence of role agreements is decidable, provided these constructs are applied only to basic roles. 5.9.3 Number restrictions on complex roles In ALCFI reg , the use of (qualified) number restrictions is restricted to atomic and inverse atomic roles, which guarantees that the logic has the tree model property.
218
D. Calvanese and G. De Giacomo
This property is lost, together with decidability, if functional restrictions may be imposed on arbitrary roles. The reduction to show undecidability is analogous to the one used for intersection of roles, except that now functionality of a complex role (i.e., 1 (right ◦ up) (up ◦ right)) is used instead of role intersection to define the grid. An example of decidable logic that does not have the tree model property is obtained by allowing the use of role composition (but not transitive closure) inside number restrictions. Let us denote by N (X ), where X is a subset of {, , ◦,− }, unqualified number restrictions on roles that are obtained by applying the role constructs in X to atomic roles. Let us denote by ALCN (X ) the Description Logic obtained by extending ALC (see Chapter 2) with number restrictions in N (X ). As shown by Baader and Sattler [1999], concept satisfiability is decidable for the logic ALCN (◦), even when extended with number restrictions on union and intersection of role chains of the same length. Notice that decidability for ALCN (◦) holds only for reasoning on concept expressions and is lost if one considers reasoning with respect to a TBox (or alternatively adds transitive closure of roles) [Baader and Sattler, 1999]. Reasoning even with respect to the empty TBox is undecidable if one adds to ALCN number restrictions on more complex roles. In particular, this holds for ALCN (, ◦) (if no constraints on the lengths of the role chains are imposed) and for ALCN (, ◦,− ) [Baader and Sattler, 1999]. The reductions again exploit the tiling problem, and make use of number restrictions on complex roles to simulate a universal role that is used for imposing local conditions on all points of the grid. Summing up, we can state that the borderline between decidability and undecidability of reasoning in the presence of number restrictions on complex roles has been traced quite precisely, although there are still some open problems. E.g., it is not known whether concept satisfiability in ALCN (, ◦) is decidable (although logical implication is undecidable) [Baader and Sattler, 1999].
6 Extensions to Description Logics FRANZ BAADER ¨ RALF K USTERS FRANK WOLTER
Abstract This chapter considers, on the one hand, extensions of Description Logics by features not available in the basic framework, but considered important for using Description Logics as a modeling language. In particular, it addresses the extensions concerning: concrete domain constraints; modal, epistemic, and temporal operators; probabilities and fuzzy logic; and defaults. On the other hand, it considers non-standard inference problems for Description Logics, i.e., inference problems that – unlike subsumption or instance checking – are not available in all systems, but have turned out to be useful in applications. In particular, it addresses the non-standard inference problems: least common subsumer and most specific concept; unification and matching of concepts; and rewriting.
6.1 Introduction Chapter 2 introduces the language ALCN as a prototypical Description Logic, defines the most important reasoning tasks (like subsumption, instance checking, etc.), and shows how these tasks can be realized with the help of tableau-based algorithms. For many applications, the expressive power of ALCN is not sufficient to express the relevant terminological knowledge of the application domain. Some of the most important extensions of ALCN by concept and role constructs have already been briefly introduced in Chapter 2; these and other extensions have then been treated in more detail in Chapter 5. All these extensions are “classical” in the sense that their semantics can easily be defined within the model-theoretic framework introduced in Chapter 2. Although combinations of these constructs may lead to very expressive Description Logics (the unrestricted combination even to undecidable ones), all the Description Logics obtained this way can only be used 219
220
F. Baader, R. K¨usters, and F. Wolter
to represent time-independent, objective, and certain knowledge. In addition, they do not allow “built-in data structures” like numerical domains. The “nonclassical” language extensions considered in the first part of this chapter try to overcome some of these deficiencies. The extension by concrete domains allows us to integrate numerical and other domains in a schematic way into Description Logics. The extension of Description Logics by modal operators allows the representation of time-dependent and subjective knowledge (e.g., knowledge about knowledge and belief of intelligent agents). Description Logics that can explicitly represent time have also been introduced outside the modal framework. The extension by epistemic operators provides a model-theoretic semantics for rules; it can be used to impose “local” closed world assumptions, and to integrate integrity constraints into Description Logics. In order to represent vague and uncertain knowledge, different approaches based on probabilistic, possibilistic, and fuzzy logics have been proposed. Finally, non-monotonic Description Logics are obtained by the integration of defaults into Description Logics. When building and maintaining large DL knowledge bases, inference services like subsumption and satisfiability are very helpful, but in general not quite sufficient for an adequate support of the knowledge engineer. For this reason, some DL systems (e.g., Classic) provide their users with additional system services, which can formally be reconstructed as new types of inference problems. In the second part of this chapter we will motivate and introduce the most prominent of these “non-standard” inference problems, and try to give an intuition on how they can be solved.
6.2 Language extensions The extensions introduced in this section are “nonclassical” in the sense that defining their semantics is not obvious and requires an extension of the model-theoretic framework considered until now; for many (but not all) of these extensions, nonclassical logics (such as modal and non-monotonic logics) are employed to provide the right framework.
6.2.1 Concrete domains A drawback that all Description Logics introduced until now share is that all the knowledge must be represented on the abstract logical level. In many applications, one would like to be able to refer to concrete domains and predefined predicates on these domains when defining concepts. An example of such a concrete domain could be the set of nonnegative integers, with predicates such as ≥ (greater or equal) or < (less than). For example, assume that we want to give an adequate definition of
6
Extensions to Description Logics
221
the concept Woman. The first idea could be to use the concept description Human Female for this purpose. However, a newborn female baby would probably not be called a woman, and neither would a three-year-old toddler. Thus, as an additional property, one could require that a female human being should be old enough (e.g., at least 18) to be called a woman. In order to express this property, one would like to introduce a new (functional) role has-age, and define Woman by an expression of the form Human Female ∃has-age.≥18 . Here ≥18 stands for the unary predicate {n | n ≥ 18} of all nonnegative integers greater than or equal to 18. Stating such properties directly with reference to a given numerical domain seems to be easier and more natural than encoding them somehow into abstract concept expressions. In addition, such a direct representation makes it possible to use existing reasoners for the concrete domain. For example, we could have also decided to introduce a new atomic concept AtLeast18 to express the property of being at least 18 years old. However, if for some reason we also need the property of being at least 21 years old, we must make sure that the appropriate subsumption relationship between AtLeast18 and AtLeast21 is asserted as well. While this could still be done by adding appropriate inclusion axioms, it does not appear to be an elegant solution, and it would still not take care of other relationships, e.g., the fact that AtLeast18 AtMost16 is unsatisfiable. In contrast, an appropriate reasoner for intervals of nonnegative integers would automatically take care of these relationships. The need for such a language extension was already evident to the designers of early DL systems such as Meson [Edelmann and Owsnicki, 1986; Patel-Schneider et al., 1990], K-Rep [Mays et al., 1988; 1991a], and Classic [Brachman et al., 1991; Borgida and Patel-Schneider, 1994]: in addition to abstract individuals, these systems also allow one to refer to “concrete” individuals such as numbers and strings. Both the Classic and the K-Rep reasoner can deal correctly with intervals, whereas in Meson the user had to supply the adequate relationships between the concrete predicates in a separate hierarchy. All these approaches are, however, ad hoc in the sense that they are restricted to a specific collection of concrete objects. In contrast, Baader and Hanschke [1991a] propose a scheme for integrating (almost) arbitrary concrete domains into Description Logics. This extension was designed such that r it still has a formal declarative semantics that is very close to the usual semantics employed for Description Logics; r it is possible to combine the tableau-based algorithms available for Description Logics with existing reasoning algorithms in the concrete domain in order to obtain the appropriate algorithms for the extension; r it provides a scheme for extending Description Logics by various concrete domains rather than constructing a single ad hoc extension for a specific concrete domain.
222
F. Baader, R. K¨usters, and F. Wolter
In the following, we will first introduce the original proposal by Baader and Hanschke, and then describe two extensions of this proposal [Hanschke, 1992; Haarslev et al., 1999]. 6.2.1.1 The family of Description Logics ALC(D) Before we can define the members of this family of Description Logics, we must formalize the notion of a concrete domain. Definition 6.1 A concrete domain D consists of a set D , the domain of D, and a set pred(D), the predicate names of D. Each predicate name P ∈ pred(D) is associated with an arity n, and an n-ary predicate P D ⊆ (D )n . Let us illustrate this definition by examples of interesting concrete domains. Let us start with some numerical ones: r The concrete domain N , which we have employed in our introductory example, has the set N of all nonnegative integers as its domain, and pred(N ) consists of the binary predicate names and the unary predicate names n for n ∈ N, which are interpreted by predicates on N in the obvious way. r The concrete domain R has the set R of all real numbers as its domain, and the predicates of R are given by formulae that are built by first-order means (i.e., by using Boolean connectives and quantifiers) from equalities and inequalities between integer polynomials in several indeterminates. For example, x + z 2 = y is an equality between the polynomials p(x, z) = x + z 2 and q(y) = y; and x > y is an inequality between very simple polynomials. From these equalities and inequalities one can for instance build the formulae ∃z.(x + z 2 = y) and ∃z.(x + z 2 = y) ∨ (x > y). The first formula yields a predicate name of arity 2 (since it has two free variables), and it is easy to see that the associated predicate is {(r, s) | r and s are real numbers and r ≤ s}. Consequently, the predicate associated to the second formula is {(r, s) | r and s are real numbers} = R × R. r The concrete domain Z is defined just like R, with the only difference that Z is the set of all integers instead of all real numbers.
In addition to numerical domains, Definition 6.1 also captures more abstract domains: r A given (fixed) relational database DB can be seen as a concrete domain DB, whose domain is the set of atomic values occurring in DB, and whose predicates are the relations that can be defined over DB using a query language (such as SQL). r One can also consider Allen’s interval calculus [Allen, 1983] as concrete domain IC. Here IC consists of time intervals, and the predicates are built from Allen’s basic interval relations (such as before, after, . . . ) with the help of Boolean connectives. r Instead of time intervals one can also consider spatial regions (e.g., in R × R), and use as predicates Boolean combinations of the basic relations of the Region Connection Calculus RCC-8 [Randell et al., 1992; Bennett, 1997].
6
Extensions to Description Logics
223
Although the syntax and semantics of Description Logics extended by concrete domains could be defined with the general notion of a concrete domain introduced in Definition 6.1, the requirement that the extended language should still have decidable reasoning problems adds some additional restrictions. To be able to compute the negation normal form of concepts in the extended language, we must require that the set of predicate names of the concrete domain is closed under negation, i.e., if P is an n-ary predicate name in pred(D) then there has to exist a predicate name Q in pred(D) such that Q D = (D )n \ P D . We will refer to this predicate name by P. In addition, we need a unary predicate name that denotes the predicate D . The domain N from above satisfies these two properties since, e.g., 0. In rectangle-cond, the first two arguments are assumed to express the x and y coordinates of the lower left corner of the rectangle, while the third and fourth argument express the breadth and height of the rectangle. We leave it to the reader to define the concept “pairs of rectangles” where the first component is a square that is contained in the second component. A tableau-based algorithm for deciding consistency of ALC(D)-ABoxes for admissible D was introduced in [Baader and Hanschke, 1991b]. The algorithm has an additional rule that treats existential predicate restrictions according to their semantics. The main new feature is that, in addition to the usual “abstract” clashes, there may be concrete ones, i.e., one must test whether the given combination of concrete predicate assertions is non-contradictory. This is the reason why we must require that the satisfiability problem for D is decidable. As described in [Baader and Hanschke, 1991b], the algorithm is not in PSpace. Using techniques similar to the ones employed for ALC it can be shown, however, that the algorithm can be modified such that it needs only polynomial space [Lutz, 1999b], provided that the satisfiability procedure for D is in PSpace. In the presence of acyclic TBoxes, reasoning in ALC(D) may become NExpTime-hard even for rather simple concrete domains with a polynomial satisfiability problem [Lutz, 2001b]. This technique of combining a tableau-based algorithm for the Description Logics with a satisfiability procedure for the concrete domain can be extended to more expressive Description Logics (e.g., ALCN and ALCN with agreements and disagreements). However, this is not true for arbitrary Description Logics with tableau-based decision procedures. For example, the technique does not work if the tableau-based algorithm requires some sort of blocking (see Chapter 2, Subsection 2.3.2.4) to ensure termination. Technically, the problem is that concrete predicates can be used to state properties concerning different individuals in the ABox, and that blocking, which is concerned only with the properties of a single individual, cannot take this into account. The main idea underlying an undecidability proof for such a logic is that elements of the concrete domain (e.g., R) can encode configurations of a Turing machine and that one can define a concrete predicate stating that one configuration is a direct successor of the other. Finally, the Description Logic must provide some means of representing sequences of configurations of arbitrary length, which is usually the case for Description Logics
226
F. Baader, R. K¨usters, and F. Wolter
requiring blocking. More concretely, it was shown in [Baader and Hanschke, 1992] (by reduction from Post’s correspondence problem) that satisfiability of concepts becomes undecidable if transitive closure (of a single functional role) is added to ALC(R). Post’s correspondence problem can also be used to show undecidability of ALC(R) with general inclusion axioms, although one cannot use exactly the same reduction as for transitive closure (see [Haarslev et al., 1998] for a similar reduction). A notable exception to the rule of thumb that concrete domains together with general inclusion axioms lead to undecidability has recently been shown by Lutz [2001a], who combines ALC with the concrete domain of rational numbers with equality and inequality predicates. 6.2.1.2 Predicate restrictions on role chains The role chains occurring in predicate restrictions of ALC(D) are restricted to chains of functional roles. In [Hanschke, 1992] this restriction was removed. To be more precise, the syntax rules for ALC are extended by the two rules C, D −→ ∃(u 1 , . . . , u n ).P | ∀(u 1 , . . . , u n ).P, where P is an n-ary predicate of D and u 1 , . . . , u n are chains of (not necessarily functional) roles. In this setting, ordinary roles are also allowed to have fillers in the concrete domain, i.e., both functional and ordinary roles are interpreted as subsets of I × (I ∪ D ). Of course, functional roles must still be be interpreted as partial functions. The extension of the predicate restrictions is defined as (∃(u 1 , . . . , u n ).P)I = {x ∈ I | there exist r1 , . . . , rn ∈ D such that (x, r1 ) ∈ u I1 , . . . , (x, rn ) ∈ u In and (r1 , . . . , rn ) ∈ P D }, (∀(u 1 , . . . , u n ).P)I = {x ∈ I | for all r1 , . . . , rn : (x, r1 ) ∈ u I1 , . . . , (x, rn ) ∈ u In implies (r1 , . . . , rn ) ∈ P D }.
Using the universal predicate restriction one can, for example, define the concept of parents all of whose children are younger than 4 by the description Parent ∀has-child ◦ has-age. ≤4 . Hanschke [1992] shows that an extension of the Description Logic we have just introduced still has a decidable ABox consistency problem, provided that the concrete domain D is admissible. 6.2.1.3 Predicate restrictions defining roles In [Haarslev et al., 1998; 1999], ALC(D) was extended in a different direction: predicate restrictions can now also be used to define new roles. To be more precise, if P is a predicate of D of arity n + m, and u 1 , . . . , u n and v1 , . . . , vm are chains
6
Extensions to Description Logics
227
of functional roles, then ∃(u 1 , . . . , u n )(v1 , . . . , vm ).P is a complex role. These complex roles may be used both in value restrictions and in the existential quantification construct. The semantics of complex roles is defined as (∃(u 1 , . . . , u n )(v1 , . . . , vm ).P)I = {(x, y) ∈ I × I | there exist r1 , . . . , rn , s1 , . . . , sm ∈ D such that u I1 (x) = r1 , . . . , u In (x) = rn , v1I (y) = s1 , . . . , vmI (y) = sm and (r1 , . . . , rn , s1 , . . . , sm ) ∈ P D }.
For example, the complex role ∃(has-age)(has-age).> consists of all pairs of individuals having an age such that the first is older than the second. Unfortunately, it has turned out that the full logic obtained by this extension has an undecidable satisfiability problem [Haarslev et al., 1998]. To overcome this problem, Haarslev et al. [1999] define syntactic restrictions on concepts such that the restricted language (i) is closed under negation, and (ii) has a decidable ABox consistency problem. Consequently, the subsumption and the instance problem are also decidable. The complexity of reasoning in this Description Logic is investigated in [Lutz, 2001b]. As in the case of acyclic TBoxes, rather simple concrete domains can already make reasoning NExpTime-hard. An approach for integrating arithmetic reasoning into Description Logics that considerably differs from the concrete domain approach described above was proposed by Ohlbach and Koehler [1999]. 6.2.2 Modal extensions Although the Description Logics discussed so far provide a wide choice of constructors, usually they are intended to represent only static knowledge and are not able to express various dynamic aspects such as time-dependence, beliefs of different agents, obligations, etc. For example, in every standard description language we can define a concept “good car” as, say, a car with an air-conditioner: GoodCar ≡ Car ∃part.Airconditioner.
(6.1)
However, we have no means to represent the subtler knowledge that only John believes (6.1) to be the case, while Mary does not think so: [John believes](6.1) ∧ ¬[Mary believes](6.1). Nor can we express the fact that (6.1) holds now, but in the future the notion of a good car may change (since, for instance, all cars will have air conditioners): (6.1) ∧ +eventually, ¬(6.1).
228
F. Baader, R. K¨usters, and F. Wolter
A way to bridge this gap seems quite clear and will be discussed in this and the next section: one can simply combine a Description Logic with a suitable modal language treating belief, temporal, deontic or some other intensional operators. However, there are a number of parameters that determine the design of a modal extension of a given Description Logic. (I) First, modal operators can be applied to different kinds of well-formed expressions of the Description Logic. One may apply them only to conceptual and assertional axioms, thereby forming new axioms of the form [John believes](GoodCar ≡ Car ∃part.Airconditioner), [Mary believes] +eventually, (Rich(JOHN)). Modal operators may also be applied to concepts in order to form new ones: [John believes]expensive i.e., the concept of all objects John believes to be expensive, or HumanBeing ∃child.[Mary believes] +eventually, GoodStudent i.e., the concept of all human beings with a child that Mary believes will eventually be a good student. By allowing applications of modal operators to both concepts and axioms we obtain expressions of the form [John believes](GoodCar ≡ [Mary believes]GoodCar) i.e., John believes that a car is good if and only if Mary thinks so. Finally, one can supplement the options above with modal operators applicable to roles. For example, using the temporal operator [always] (in future) and the role loves, we can form the new role [always]loves (which is understood as a relation between objects x and y that holds if and only if x will always love y) to say (∃[always]loves.Woman)(JOHN) i.e., John will always love the very same woman (but perhaps not only her), which is not the same as ([always]∃loves.Woman)(JOHN). (II) All these languages are interpreted with the help of the possible worlds semantics, in which the accessibility relations between worlds (or points in time, . . . ) treat the modal operators, and the worlds themselves are Description Logic interpretations. The properties of the modal operators are determined by the conditions we impose on the corresponding accessibility relations. For example, by imposing no condition at all we obtain what is known as the minimal normal modal logic K – although of definite theoretical interest, it does not have the properties required to model
6
Extensions to Description Logics
229
operators like [agent A knows], +eventually,, etc. In the temporal case, depending on the application domain we may assume time to be linear and discrete (for example, the usual strict ordering of the natural numbers), or branching, or dense, etc. (see [Gabbay et al., 1994; van Benthem, 1996]). Moreover, we have the possibility to work with intervals instead of points in time (see Subsection 6.2.4). In epistemic logic, transitivity of the accessibility relation for agent A’s knowledge means what is called positive introspection (A knows what A knows), euclideanness corresponds to negative introspection (A knows what A does not know), and reflexivity means that everything known by A is true; see Subsection 6.2.3 for a formulation of these principles in terms of Description Logics. For more information and further references consult [Fagin et al., 1995; Meyer and van der Hoek, 1995]. (III) When connecting worlds – that is, ordinary interpretations of the pure description language – by accessibility relations, we are faced with the problem of connecting their objects. Depending on the particular application, we may assume worlds to have arbitrary domains (the varying domain assumption), or we may assume that the domain of a world accessible from a world w contains the domain of w (the expanding domain assumption), or that all the worlds share the same domain (the constant domain assumption); see [van Benthem, 1996] for a discussion in the context of first-order temporal logic. Consider, for instance, the following axioms: ¬[agent A knows](Unicorn ≡ ⊥), ([agent A knows]¬Unicorn) ≡ . The former means that agent A does not know that unicorns do not exist, while according to the latter, for every existing object, A knows that it is not a unicorn. Such a situation can be modeled under the expanding domain assumption, but these two formulas cannot be simultaneously satisfied in a model with constant domains. (IV) Finally, one should take into account the difference between global (or rigid) and local (or flexible) symbols. In our context, the former are the symbols which have the same extension in every world in the model under consideration, while the latter are those whose interpretation is not fixed. Again the choice between these depends on the application domain: if the knowledge base is talking about employees of a company then the name John Smith should probably denote the same person no matter what world we consider, while President of the company may refer to different persons in different worlds. For a more detailed discussion consult, e.g., [Fitting, 1993; Kripke, 1980]. To describe the syntax and semantics more precisely we briefly introduce the modal extension LnALC of ALC with n unary modal operators ✷1 , . . . , ✷n , and their duals ✸1 , . . . , ✸n .
230
F. Baader, R. K¨usters, and F. Wolter
Definition 6.4 (Concepts, roles, axioms) Concepts and roles of LnALC are defined inductively as follows: all concept names are concepts, and if C, D are concepts, R is a role, and ✸i is a modal operator, then C D, ¬C, ✸i C, and ∃R.C are concepts.2 All role names are roles, and if R is a role, then ✷i R and ✸i R are roles. Let C and D be concepts, R a role, and a, b object names. Then expressions of the form C ≡ D, R(a, b), and C(a) are axioms. If ϕ and ψ are axioms then so are ✸i ϕ, ¬ϕ, and ϕ ∧ ψ. We remind the reader that models of a propositional modal language are based on Kripke frames, i.e., structures of the form F = +W, ✁1 , . . . , ✁n , in which each ✁i is a binary (accessibility) relation on the set of worlds W . What is going on inside the worlds is of no importance in the propositional framework (see, e.g., [Chagrov and Zakharyaschev, 1997] for more information on propositional modal logics). Models of LnALC are also constructed on Kripke frames; however, in this case their worlds come equipped with interpretations of ALC. Definition 6.5 (model) A model of LnALC based on a frame F = +W, ✁1 , . . . , ✁n , is a pair M = +F, I , in which I is a function associating with each w ∈ W an ALC-interpretation I (w) = + I,w , · I,w ,. M has constant domain iff I (v) = I (w) , for all v, w ∈ W . M has expanding domains iff I (v) ⊆ I (w) whenever v ✁i w, for some i.
Definition 6.6 For a model M = +F, I , and a world w in it, the extensions C I,w and R I,w , and the satisfaction relation w |= ϕ (ϕ an axiom) are defined inductively. The interesting new steps of the definition are: (i) x ∈ (✸i C) I,w iff ∃v. v ✄i w and x ∈ C I,v ; (ii) (x, y) ∈ (✸i R) I,w iff ∃v. v ✄i w and (x, y) ∈ R I,v ; (iii) w |= ✸i ϕ iff ∃v. v ✄i w and v |= ϕ.
An axiom ϕ (resp. a concept C) is satisfiable in a class of models M if there is a model M ∈ M and a world w in M such that w |= ϕ (resp. C I,w = ∅). Given a class of frames K, the satisfiability problems for axioms and concepts in K are the most important reasoning tasks; others are reducible to them (see [Wolter and Zakharyaschev, 1998; 1999b]). Notice that the satisfiability problem for concepts is reducible to that for axioms since ¬(C ≡ ⊥) is satisfiable iff C is satisfiable. 2
Note that value restrictions (the modal box operators ✷i ) need not explicitly be included here since they can be expressed using negation and existential restrictions (the modal diamond operators ✸i ).
6
Extensions to Description Logics
231
Also, the satisfiability problem for models with expanding or varying domain is reducible to that for models with constant domain (see [Wolter and Zakharyaschev, 1998]). We are now going to survey briefly the state of the art in the field. We will restrict ourselves first to modal Description Logics which are not temporal logics. The latter will be considered in Subsection 6.2.4. Chronologically, the first investigations of modal Description Logics are [Laux, 1994; Gr¨aber et al., 1995; Baader and Laux, 1995; Baader and Ohlbach, 1993; 1995]. The papers [Laux, 1994; Gr¨aber et al., 1995] construct multi-agent epistemic Description Logics in which the belief operators apply only to axioms; the accessibility relations are transitive, serial, and euclidean. The decidability of the satisfiability problem for axioms follows immediately from the decidability of both the propositional fragment of the logic and ALC, because in languages without modalized concepts and roles there is no interaction between the modal operators and role quantification (see [Finger and Gabbay, 1992]). Baader and Laux [1995] introduce a Description Logic in which modal operators can be applied to both axioms and concepts (but not to roles); it is interpreted in models with arbitrary accessibility relations under the expanding domain assumption. The decidability of the satisfiability problem for axioms is proved by constructing a complete tableau calculus. This tableau calculus was modified and extended for checking satisfiability in models with constant domain in [Lutz et al., 2002]. It decides satisfiability in constant domain models in NExpTime, which matches the lower bound established in [Mosurovic and Zakharyaschev, 1999] (see also [Gabbay et al., 2002]). The papers [Wolter and Zakharyaschev, 1998; 1999a; 1999c; 1999b; Wolter, 2000; Mosurovic and Zakharyaschev, 1999] investigate the decision problem for various families of modal Description Logics in detail. For example, in [Wolter and Zakharyaschev, 1999c; 1999b] it is shown that the satisfiability problem for arbitrary axioms (possibly containing modalized roles) is decidable in the class of all frames and in the class of polymodal S5-frames – frames in which all accessibility relations are equivalence relations – based on constant, expanding, and varying domains. It becomes undecidable, however, if common-knowledge epistemic operators (in the sense of [Fagin et al., 1995]) are added to the language or if the class of frames consists of the flow of time +N, t such that x ∈ C I,t (eventually x is an instance of C). Often, however, more expressive temporal operators are required. The operator U (until), for example, is a binary temporal operator with the following truth-conditions, for all concepts C, D and axioms ϕ, ψ:
(i) x ∈ (CU D) I,t iff there exists t > t such that x ∈ D I,t and, for all t with t < t < t , x ∈ C I,t , (ii) t |= ϕUψ iff there exists t > t such that t |= ψ and, for all t with t < t < t , t |= ϕ.
In this language we can define a mortal as, say, a living being that is alive until it dies: Mortal ≡ LivingBeing (LivingBeing U ✷¬LivingBeing). This language, interpreted in the flow of time +N,