• Keine Ergebnisse gefunden

OWL 2 Profiles: An Introduction to Lightweight Ontology Languages

N/A
N/A
Protected

Academic year: 2022

Aktie "OWL 2 Profiles: An Introduction to Lightweight Ontology Languages"

Copied!
72
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

OWL 2 Profiles: An Introduction to Lightweight Ontology Languages

Markus Kr¨otzsch

Department of Computer Science, University of Oxford, UK markus.kroetzsch@cs.ox.ac.uk

Abstract. This chapter gives an extended introduction to the lightweight pro- files OWL EL, OWL QL, and OWL RL of the Web Ontology Language OWL.

The three ontology language standards are sublanguages of OWL DL that are restricted in ways that significantly simplify ontological reasoning. Compared to OWL DL as a whole, reasoning algorithms for the OWL profiles show higher per- formance, are easier to implement, and can scale to larger amounts of data. Since ontological reasoning is of great importance for designing and deploying OWL ontologies, the profiles are highly attractive for many applications. These advan- tages come at a price: various modelling features of OWL are not available in all or some of the OWL profiles. Moreover, the profiles are mutually incomparable in the sense that each of them offers a combination of features that is available in none of the others. This chapter provides an overview of these differences and explains why some of them are essential to retain the desired properties. To this end, we recall the relationship between OWL and description logics (DLs), and show how each of the profiles is typically treated in reasoning algorithms.

1 Introduction

The Web Ontology Language OWL has been standardised by the World Wide Web Consortium (W3C) as a powerful knowledge representation language for the Web. In spite of its name, OWL is not confined to the Web, and it has indeed been applied suc- cessfully for knowledge modelling in many application areas. Modelling information in OWL has two practical benefits: as a descriptive language, it can be used to express expert knowledge in a formal way, and as a logical language, it can be used to draw conclusions from this knowledge. The second aspect is what distinguishes OWL from other modelling languages such as UML. However, computing all interesting logical conclusions of an OWL ontology can be a challenging problem, and reasoning is typi- cally multi-exponential or even undecidable.

To address this problem, the recent updateOWL 2of the W3C standard introduced threeprofiles: OWL EL, OWL RL, and OWL QL. These lightweight sublanguages of OWL restrict the available modelling features in order to simplify reasoning. This has led to large improvements in performance and scalability, which has made the OWL 2 profiles very attractive for practitioners. OWL EL is used in huge biomedical ontologies, OWL RL became the preferred approach for reasoning with Web data, and OWL QL provides database applications with an ontological data access layer. The most impor- tant computation tasks aretractablein each of these cases, that is, they can be performed in polynomial time.

(2)

Besides their practical importance, however, there are many further reasons why the OWL profiles are of special interest to researchers and practitioners:

– More Understandable. The lower complexity of reasoning also leads to algorithms that are conceptually simpler than general reasoning techniques for OWL.

– Simpler Implementation. Simpler reasoning algorithms are easier to implement cor- rectly and (with some further effort) also efficiently.

– Better Tool Support. Users of OWL profiles have more reasoners to choose from.

Specialised implementations often provide best performance, but general-purpose OWL reasoners can also be used.

– Easier to Extend. Simpler ontology languages are easier to extend with new fea- tures, due to simpler algorithms and less complex semantic interactions.

In spite of the many motivations for studying the tractable profiles of OWL, the available resources for learning about this subject are very limited. Indeed, the inter- ested reader is largely left with the study of the official W3C standardisation documents, which are comprehensive and accurate, but also laden with technical details. Alterna- tively, one can resort to a plethora of academic papers that cover many related topics individually. Often the first task of the reader is to understand how a given work relates to the OWL standard at all. In any case, information remains distributed and usually focussed on one of the OWL profiles. Indeed, even researchers often have only a rather partial understanding of how the three OWL profiles compare to each other. This leads to unnecessary misconceptions among academics and practitioners alike.

This text sets out to tackle this problem by providing a comprehensive first intro- duction to the OWL profiles. Our overall premise is that the advantages and limitations of any one profile can best be understood by comparing it to the other two. The result should be a fresh perspective that opens up new possibilities: instead of depending on the (sometimes coincidental) design choices made when defining the OWL profiles, one can freely combine modelling features to suit the need of one’s very own application or research. The OWL specification allows us to do this without giving up standard con- formance or interoperability. The key for enjoying this flexibility is to understand the constraints that are at the very heart of the current language design.

1.1 Goals of this Document

The purpose of this text is to give a comprehensive introduction to the three lightweight profiles of OWL 2, with a particular focus on expressivity and efficient reasoning. A central goal is to explainhowthe three profiles differ, andwhythese differences are important to retain the desired properties. Our preferred perspective will be that of a computer scientist or ontology engineer who wants to gain a deeper understanding of the characteristics of the three profiles. This will not stop us, however, from discussing formal properties whenever they are important for practical usage or implementation.

In particular, we are interested in the correctness of algorithms and in the complexity of relevant computational problems.

The text does not intend to be a general introduction to OWL (it omits practical aspects such as URIs, RDF translation, syntactic forms, and advanced features), or to

(3)

description logics (it omits many advanced topics and formal details). Moreover, we mainly focus on the conceptual basics of language design and reasoning. Much could be said about practical aspects of implementation and optimisation, but this is well beyond the scope of one lecture. Readers who want to deepen their understanding of these topics can find many pointers to further literature in Section 6.

Intended Audience This text addresses two main audiences: practitioners who want to gain a deeper understanding of the OWL profiles, and researchers or students who are interested in tractable knowledge representation and reasoning. Hence the text is largely self-contained and does not assume prior knowledge in formal logics or ontology lan- guages, although some familiarity with these topics will come in handy. However, a graduate-level understanding of basic computer science topics is generally assumed.

For the benefit of advanced readers, we usually include full details and formal argu- ments, which can easily be skipped on a first reading.

How to Read this Text The text largely follows a linear structure, but still allows sec- tions to be skipped on a first reading. Sections are relatively short in general and are concluded by a short summary of their essential content. We include various proofs, mainly for their didactic value of explaining whyexactlysomething is the case. They can easily be skipped by the hurried reader.Examples andremarks are presented in visually distinguished boxes; both can typically be skipped without loss of continuity.

1.2 Overview

The remaining sections are organised as follows:

Section 2: An Introduction to OWL In this section, we take a first look at the Web On- tology Language OWL in general. We introduce the most important reasoning tasks for OWL ontologies, and discuss the computational challenges that they create. A num- ber of expressive features of OWL are introduced by means of examples in the OWL Functional-Style Syntax. The more concisedescription logic syntax is introduced as a convenient shorter notation for OWL axioms. Most of our discussions are based on a rather limited set of OWL features, that are encompassed by the description logic ALCI. Finally, we discuss the two formal semantics of OWL –Direct Semanticsand RDF-Based Semantics– and explain how they relate to each other.

Section 3: Reasoning in the OWL Profiles Here we introduce for the first time the OWL Profiles EL, RL, and QL by means of three very simple ontology languagesELtiny, RLtiny, andQLtiny. We then explain how reasoning tasks are typically solved for each of these languages. We begin withRLtiny, for which we present a saturation-based in- stance retrieval calculus that is based on a simple set of inference rules. ForELtiny, we then develop a classification calculus that works in a similar fashion, although it com- putes subclass inclusion axioms rather than instance assertions. The task we consider forQLtinyis query answering, a generalised form of instance retrieval. Our reasoning method of choice in this case is query rewriting, which is an interesting alternative to the saturation-based approaches in EL and RL. In each of the three cases, we show

(4)

that the proposed methods are correct, and a number of interesting proof techniques are introduced in the process.

Section 4: The Limits of Lightweight Ontology Languages We now ask how far the ex- pressive power of the lightweight profiles of OWL can be extended without loosing their good properties (especially the possibility to use the polynomial time reasoning meth- ods of Section 3). We will see that some extensions are indeed possible, and that even the official OWL standard is overly restrictive in various cases. However, many exten- sions lead to considerably higher computational complexities. To explain this, we first recall some basic ideas of complexity theory, and show that unrestricted class unions must make reasoning NP-hard. We then demonstrate that the combination of any two of the three OWL profiles leads to an even higher exponential reasoning complexity.

This result also justifies the existence of three different profiles. To show this, we use an ontology to simulate the computation of anAlternating Turing Machine, which is an interesting technique in its own right.

Section 5: Advanced Modelling Features This short section completes the overview of the three OWL profiles by discussing a number of additional features that had not been introduced before. In most cases, these features do not significantly change the way in which reasoning is implemented, and we do not present reasoning methods for them.

Section 6: Summary and Further Reading We conclude with a short summary of the main insights, and provide many pointers to related literature. References are avoided in the rest of the text.

2 An Introduction to OWL

2.1 The Web Ontology Language

The Web Ontology Language OWL is a formal language for expressing ontologies. In computer science, an ontology is a description of knowledge about a domain of inter- est, the core of which is a machine-processable specification with a formally defined meaning.1This is best explained by an example.

Example 1. A classical kind of ontology are biological taxonomies as used to classify species.

For example, the species of house cats (Felis catus) belongs to the class of mammals (Mammalia), i.e., every instance of the former is also an instance of the latter. In OWL, we could formally express this as follows:

SubClassOf(FelisCatus Mammalia)

This allows us to formally state a subclass relation in a way that is understood by OWL reasoners.

Note that this formal relationship does not capture all theknowledgethat we intend to express

1The term is derived from the philosophical discipline ofOntology– the study of existence and the basic relationships between the things that are – since a basic purpose of ontologies in computer science is to describe the existing entities and their interrelation.

(5)

here: it is also important to know what is actuallymeantby the classesFelisCatusandMammalia. This aspect is essential if we want to view ontologies as representations of knowledge about the world, but it cannot be captured formally.

OWL statements as in the previous example are known asOWL axioms. There are many additional kinds of axioms that one can express in OWL – we will introduce a number of further expressive features later on. For now, however, we focus on the most basic aspects of OWL that do not depend on concrete features.

When speaking of an(OWL) ontologybelow, we always mean its formal, machine- readable content, which essentially is a set of OWL axioms. The informal documenta- tion of the intended meaning is an important part of ontology engineering, but will not be discussed here. Information that is formally expressed in OWL can be used to draw interesting new conclusions, even without taking the informal meaning into account.

Example 2. If we happen to learn that a particular individual, saySilvester, is a cat, then from Example 1 above we can conclude that Silvester is also a mammal. In OWL, the fact that there is an individual in a class is expressed as follows:

ClassAssertion(FelisCatus silvester)

and, together with the axiom from Example 1, an OWL reasoner would now be able to draw the expected conclusionClassAssertion(Mammalia silvester).

Reasoning (more precisely:deductivereasoning) is the task of computing such con- clusions. The W3C standard defines which conclusions are entailed by an ontology, thus specifying thesemanticsof OWL. While this provides the official requirements for correct implementations, it does not explain how to actually compute the required inferences in practice. Indeed, there are many deduction methods for OWL, and the de- velopment of efficient approaches is an active area of research. We will look at various concrete algorithms in more detail later on.

Users of OWL can actually select between two slightly different semantics:

– The Direct Semantics defines the meaning of OWL axioms directly by relating them todescription logic(DL), a fragment of first-order logic that provides similar expressive features as OWL.

– TheRDF-Based Semanticsfirst translates OWL axioms into directed graphs in the W3C’s data exchange languageRDF, where each axiom can lead to many edges (calledtriples) in the graph. The semantics is then defined for arbitrary RDF graphs, whether or not they can be obtained by translating an actual set of axioms.

Both semantics have advantages and disadvantages, and they can also lead to differ- ent conclusions. The Direct Semantics is not applicable to all RDF databases that use OWL features, whereas the RDF-Based Semantics does not allow for algorithms that compute all specified conclusions in all cases (i.e., reasoning isundecidable). In prac- tice, however, both limitations are not as severe as one might expect. Direct Semantics

(6)

tools can handle arbitrary RDF data using tolerant, “best effort” parsing. RDF-Based Semantics tools often specialise to decidable sublanguages (typically OWL RL) and ignore “unreasonable” combinations of features. In this chapter, we mainly use the Di- rect Semantics, since it is easier to explain, without having to introduce RDF first. This perspective is also closer to the view of ontology engineers, who normally design an ontology by editing OWL axioms, not RDF triples. However, actual reasoning algo- rithms for either semantics can be very similar, and lead to the same conclusions in many practical cases.

The above discussion also hints at the fact that there are many ways of writing OWL ontologies syntactically. The notation used in our above examples is known as theFunctional-Style Syntax(FSS), since expressive features, such asSubClassOf, are written like function symbols in prefix notation. Two additional syntax standards for OWL axioms areOWL/XMLand theManchester Syntax. Moreover, OWL axioms can be faithfully represented in RDF graphs, which in turn can be written (i.e.,serialised) in various syntactic forms, such as theRDF/XMLsyntax or the more conciseTurtlesyn- tax. Among those many options, FSS represents the data model of OWL most closely, whereas RDF/XML is the main exchange syntax that is most common on the Web. We will prefer FSS here since it is much more concise.2Moreover, we will soon introduce an even more concise writing based on description logics.

Summary The W3C OWL standard can represent machine-readable ontologies in a variety of syntactic encodings. Two semantics formally define the entailments of OWL.

2.2 OWL Reasoning Tasks

When deploying an OWL ontology in applications, explicitly stated axioms are just as relevant as the ones that are entailed. In other words, the meaningof an ontology is given by all the conclusions one can draw from it, no matter which of these conclusions are explicitly stated. Reasoning therefore is important for using and also for designing ontologies. Indeed, ontology engineers must be able to check the consequences of an ontology, just as as a software engineer must be able to test a program.

Every ontology (even if it is empty) entails an infinite number of OWL axioms.

Therefore, the purpose of reasoning algorithms is generally not to compute all entail- ments, but merely all entailmentsof a particular form. This leads to variousreasoning tasksthat are of particular importance. This section gives an overview of the most com- mon such tasks.

Example 2 illustrated a particular kind of deductive reasoning where we are inter- ested in deriving aClassAssertionaxiom. The reasoning task of computing the indi- viduals that belong to a given class (or set of classes) is calledinstance retrieval. If we merely want to find out whether one particular individual belongs to the given class, this task is calledinstance checking. Analogous tasks exist forSubClassOfaxioms: com- puting all subclass relationships between a set of classes is calledclassification, and checking a particular subclass relationship is calledsubsumption checking.

2Contrary to popular belief, FSS is also easier to parse than RDF/XML, since the latter requires multiple passes to re-assemble OWL axioms from XML-encoded RDF triples. The practical importance of RDF/XML mainly stems from its wide use for encoding RDF data on the Web.

(7)

Another important reasoning task isconsistency checking, the task of determining whether an ontology is logicallyconsistentorcontradictory. All OWL axioms in our previous examples required a particular relationship to hold, but axioms can also be used to state that a relationship must not hold, as illustrated in the next example.

Example 3. OWL allows us to express thedisjointnessof two classes, i.e., to say that two classes must never have any instances in common. For example, we can state that humans are distinct from cats using the axiom

DisjointClasses(FelisCatus HomoSapiens)

If an additional axiomClassAssertion(HomoSapiens silvester)would now assert that Silvester is also human (in addition to him being a cat as stated in Example 2), then a reasoner would infer the ontology to be inconsistent.

According to (both of) the OWL semantics, an inconsistent ontology entails every axiom, and is therefore of no practical use. Inconsistency detection is thus important when developing ontologies. A closely related problem isinconsistency(or incoher- ence) of classes. A class is inconsistent if it is necessarily empty, i.e., if the ontology can only be consistent if the class contains no elements. For example, we could formalise an inconsistent class by requiring it to be disjoint with itself. Inconsistent classes are typ- ically modelling errors, of which the ontology engineer should be alerted. Especially, OWL already includes a special class nameowl:Nothing3 to refer to an empty class, so it is never necessary to define additional inconsistent classes.

This completes our overview of the most important reasoning tasks. Luckily, many of these standard reasoning tasks can be solved by very similar algorithms. This is due to the following relationships:

– An ontology is inconsistent if some arbitrary classSomeClassthat is not used in any axiom is inconsistent.

– A classSomeClass is inconsistent if the subsumption SubClassOf( SomeClass owl:Nothing )is entailed.

– A subsumptionSubClassOf(ClassA ClassB ) is entailed if the factClassAsser- tion(ClassB something)is entailed when extending the ontology with the axiom ClassAssertion(ClassA something), wheresomethingis a new individual name.

– A factClassAssertion(SomeClass something)is entailed if the ontology becomes inconsistent when adding the axiomsDisjointClasses(SomeClass AnotherClass) andClassAssertion(AnotherClass something), whereAnotherClassis a new class not used anywhere yet.

This cyclic reduction allows us to reformulate each of the above reasoning problems in terms of any other, although we might need to modify the ontology for this purpose.

Note that only very few features are needed for this reduction: all sublanguages of OWL that we consider in this chapter will thus allow us to do this. Instance retrieval and

3The actual name ofowl:Nothingis http://www.w3.org/2002/07/owl#Nothing but we do not go into the details of class naming in OWL, and thus use a common abbreviation.

(8)

classification tasks can be solved by using many individual instance and subsumption checks. However, this is rarely the most efficient approach, and dedicated algorithms rather try to perform many instance or subsumption checks at once.

Summary The need to compute deductions for OWL ontologies leads to a number of standard reasoning tasks, which can be reduced to each other with only little effort.

2.3 Hardness of Reasoning

How difficult is it to actually compute entailments of OWL ontologies? To answer this question, we need to be more specific. Indeed, it is very easy to computesomeOWL entailments – the challenge is to computeallentailments of a certain kind. Our require- ments towards a “good” reasoner are usually as follows:

– Soundness:All computed inferences are really entailed.

– Completeness:All entailed inferences (of the kind we are interested in) are really computed.

The lack of completeness is sometimes accepted if it allows for simpler or more ef- ficient implementations. This depends on the application: ontology engineers usually want to know all relevant consequences, while users of ontologies might already be content to retrieve some of the relevant information. Ideally, it should be clear and well- documented under which circumstances certain entailments will be missed, so that users can decide whether this is acceptable or not. The lack of soundness, in contrast, is usu- ally not desirable, since unsound systems can only reliably tell us which axioms arenot entailed, and this information is less interesting in most applications.

The other main requirement beyond soundness and completeness is efficiency: we want reasoning algorithms to use as little time and memory as possible. So our question should be: how hard is it to implement efficient, sound and complete reasoning proce- dures for OWL? A partial answer to this is given by computational complexity theory, which allows us to classify reasoning tasks according to their worst-case requirements in terms of time or memory. In their most common form, complexity measures refer to decision problems, i.e., to the complexity of solving problems that can only have either yesornoas an answer. Clearly, all the above checks for instances, subsumptions, and inconsistency are decision problems in this sense. The following can be stated:

– The standard entailment checks for OWL under RDF-Based Semantics are unde- cidable, i.e., there is no sound and complete reasoning algorithm that terminates in finite time.

– The standard entailment checks for OWL under Direct Semantics are N2ExpTime- complete, i.e., there are sound and complete, non-deterministic reasoning algo- rithms that terminate in doubly exponential time.

Recall that the RDF-Based Semantics covers a more general RDF-based language;

the above undecidability result refers to arbitrary ontologies from this language. The N2ExpTimecomplexity for reasoning under Direct Semantics can roughly be described by saying: even if we are lucky enough to guess the right answer, it still takes dou- bly exponentially long to verify this guess. Recall that a double exponential function

(9)

innis linear inkknfor some constantk, which is not to be confused withkn×kn(e.g., 224=65536 while 24×24=256). Given that already NP algorithms (those that perform this check in polynomial time) are often considered infeasible in practice, this paints a rather gloomy picture indeed.

However, reasoning in practice rarely is close to this worst-case estimation. Imple- mentations have been optimised to efficiently deal with typical ontologies, and often perform very well in these cases. Yet, the complexity result shows that it will always be possible to construct inputs that reasoners will fail to process (in practice, reasoners rarely succeed after running for a very long time; they rather run out of memory or need to use secondary memory that is so slow that processing must be aborted). Moreover, although the worst case is not typical in practice, even highly optimised implementa- tions cannot be expected to scale up linearly to very large ontologies. What is worse, the performance of reasoners is very hard to predict, and small changes or errors may lead to significant differences.

The three profiles of OWL have been proposed as a way to overcome this problem.

The high worst-case complexity of OWL is based on the interaction of many different expressive features. By restricting the supported features syntactically, each OWL pro- file defines a subset of ontologies for which standard reasoning tasks aretractable, i.e., for which reasoning is possible in polynomial time (or even less). In general, atractable ontology languageis one for which standard reasoning is tractable in this sense.

In practice, worst-case complexities can only provide partial information about the hardness of a problem. For example, an algorithm that solves a problem of size nin timen42is polynomial, but it would still be infeasible to use it in practice. Indeed, even quadratic runtime behaviour is often not tolerable. Nevertheless, optimised reasoners for the OWL profiles have also been shown to achieve excellent performance in many practical cases. Moreover, algorithms that are worst-case polynomial are usually less complicated and easier to implement efficiently than algorithms of exponential com- plexity. This is certainly the case for the OWL profiles.

Summary Sound and complete OWL reasoning is of high complexity or even undecid- able. The OWL profiles restrict OWL to improve complexity and practical performance.

2.4 Further Expressive Features in OWL

So far, we have only introduced a few expressive features of OWL by means of exam- ples. In this section, we take a closer look at the basic expressive features of OWL, and introduce a slightly bigger set of basic features. The complete feature set of OWL is a lot bigger (see Section 5), but the features we select here are interesting enough to explain many important concepts related to OWL and its profiles.

OWL axioms are formed by combiningvocabulary entities(e.g.,FelisCatusorsil- vester) by means oflanguage constructorsfor axioms and other expressions (e.g.,Sub- ClassOfandDisjointClasses). Vocabulary entities can have three different basic types:

– Individual namesrefer to individual objects.

– Class namesrefer to sets of objects.

– Property namesrefer to binary relationships between objects.

(10)

Example 4. We have already used the class nameFelisCatusto represent the set of all cats, and the individual namesilvester to represent Silvester the cat. For an example of a property, let preysOnexpress the relationship between a predator and its prey. For instance, we could state that Silvester preys on Tweety:

ObjectPropertyAssertion(preysOn silvester tweety)

It is customary to use lower case letters for the names of individuals and properties, and upper case letters for the names of classes, as we already did in all examples above.

Remark 5. OWL does not require entities to have a unique type. For example, we could use FelisCatusas a class name as above, and additionally use it as an individual name to assert that it is a species:

ClassAssertion(Species FelisCatus)

Under the Direct Semantics, this does not establish any formal relationship betweenFelisCatus the class andFelisCatusthe individual. They still represent either an object or a set of objects, depending on the context they are used in, but never both at the same time. The use of the same name for two things is therefore known aspunning. In spite of its weak semantics, it can still be convenient in ontological modelling.

Under the RDF-Based Semantics, the relationship is stronger and leads to additional semantic entailments. However, it is difficult to compute these entailments in all cases: it is one of the reasons why reasoning under RDF-Based Semantics is undecidable.

OWL provides many language constructors to express statements about vocabulary entities. So far, we have encountered examples of various types of axioms:

– SubClassOf: a class is a subclass of another

– DisjointClasses: two (or more) classes must not share elements – ClassAssertion: a class contains an individual

– ObjectPropertyAssertion: a property relates two individuals

There are a number of further types of axioms in OWL. However, most of the expressiv- ity of OWL is in itsclass constructorsthat allow us to build complex class descriptions from basic vocabulary entities. Since classes represent sets, the standard set operations are an obvious candidate for this:

– ObjectIntersectionOf: the intersection of two (or more) classes – ObjectUnionOf: the union of two (or more) classes

– ObjectComplementOf: the complement of a class

Example 6. The following examples show how these constructors could be used:

ObjectIntersectionOf(FelisCatus Hungry): the class of objects that are in the classFelisCatus and in the classHungry

ObjectUnionOf(FelisCatus SerinusCanaria): the class of objects that are cats (FelisCatus) or canary birds (SerinusCanaria)

(11)

ObjectComplementOf(HomoSapiens): the class of objects that are not humans

Such class descriptions can be used in all OWL axioms that work with class names, e.g., to say that birds are not cats:

SubClassOf(SerinusCanariaObjectComplementOf(FelisCatus) )

or that Silvester is either a cat or a human (or both – this case is not excluded here):

ClassAssertion(silvesterObjectUnionOf(FelisCatus HomoSapiens) )

Note that intersection, union, and complement therefore correspond to the logical operations of conjunction (and), disjunction (or), and negation (not). The empty class owl:Nothingthat we encountered earlier can be viewed as a class constructor without arguments. Its dual is the classowl:Thingthat contains all objects. The logical counter- parts ofowl:Nothingandowl:Thingwould be constantsfalseandtrue.

Remark 7. Many features of OWL have overlapping expressivity, and the same statement can usually be expressed in various ways. For example, the following five axioms are semantically equivalent:

DisjointClasses(FelisCatus HomoSapiens)

SubClassOf(FelisCatusObjectComplementOf(HomoSapiens) ) SubClassOf(HomoSapiensObjectComplementOf(FelisCatus) )

SubClassOf( ObjectIntersectionOf(FelisCatus HomoSapiens) owl:Nothing ) SubClassOf( owl:Thing ObjectUnionOf( ObjectComplementOf(FelisCatus)

ObjectComplementOf(HomoSapiens) )

Therefore,DisjointClassesis not really needed and merely makes some statements more conve- nient. We call such featuressyntactic sugar.

The operations we have encountered so far are only related to basic Boolean opera- tions of classes. In many cases, however, we would like to take properties into account when defining classes. This is possible usingproperty restrictions. We will discuss two features of this type here:ObjectSomeValuesFromandObjectAllValuesFrom.

Example 8. In Example 4 we have stated that Silvester is preying on Tweety. Using property restrictions, we can define the class of all objects that prey on some canary bird:

ObjectSomeValuesFrom(preysOn SerinusCanaria)

Note that this is not an axiom but merely a class expression. A predator can be described as something that preys on anything (not just on canary birds). The classowl:Thingis handy for relaxing the description accordingly:

SubClassOf( ObjectSomeValuesFrom(preysOnowl:Thing )Predator)

(12)

In other words, ObjectSomeValuesFrom expresses an existential restriction that refers to the existence a certain property relationship. Dually,ObjectAllValuesFromen- codes auniversal restrictionthat refers to all relationships of a property:

Example 9. The following defines the class of objects for which allpreysOnrelations point to some canary bird, i.e., the class of the things that prey on canary birds only:

ObjectAllValuesFrom(preysOn SerinusCanaria)

This can be used, e.g., to state that one can only prey on animals. In this case, we use the class owl:Thingto state that something is true for all things:

SubClassOf( owl:Thing ObjectAllValuesFrom(preysOn Animal) )

This yields aproperty range axiom, stating that everything that somebody preys on must be an animal. Importantly, this does not mean that every object preys on something in the first place: if something has nopreysOnrelations, then all of its (zero)preysOnrelations satisfy the require- ment. This is the usual reading of universal quantifiers in logic, but it can be a source of confusion.

In daily live, statements like “all of my children have won the Nobel prize” are suggesting that at least one such child exists.

This completes the set of class constructors that we want to consider here, although there are a number of further features of this kind. In contrast, expressions for con- structing complex properties are much less frequent in OWL. In fact, the only such constructor in OWL isObjectInverseOf, which allows us to reverse the direction of a property:

Example 10. The inverse ofpreysOncan be described in OWL asObjectInverseOf(preysOn); it is the property relating a prey to its predator. One could use it, e.g., to describe the class of objects that are preyed on by some cat:

ObjectSomeValuesFrom( ObjectInverseOf(preysOn)FelisCatus)

Using inverses, the property range axiom of Example 9 could also be written as

SubClassOf( ObjectSomeValuesFrom( ObjectInverseOf(preysOn) owl:Thing )Animal)

which again can be read as “everything that is preyed on by anybody must be an animal.”

Summary Statements in OWL are built from a vocabulary of individual, class, and prop- erty names using various constructors for axioms, and class and property expressions.

2.5 From OWL to Description Logics

OWL is closely related to (and partly based on) a family of knowledge representation languages calleddescription logics(DLs). DLs have inspired many of the current ex- pressive features of OWL, and they are the basis for defining OWL’s Direct Semantics.

(13)

Table 1.Translating OWL expressions to description logics OWL Functional-Style Syntax DL Syntax

Axioms SubClassOf(C D) CvD

ClassAssertion(C a) C(a) ObjectPropertyAssertion(P a b) P(a,b) Class expressions ObjectIntersectionOf(C D) CuD

ObjectUnionOf(C D) CtD

ObjectComplementOf(C) ¬C

owl:Thing >

owl:Nothing

ObjectSomeValuesFrom(P C)P.C ObjectAllValuesFrom(P C)P.C Property expressions ObjectInverseOf(P) P

A typical DL is a fragment of first-order predicate logic, and OWL reasoning under Di- rect Semantics can therefore be viewed as a special case of first-order logic reasoning.

In addition, DLs come with a very convenient syntax for writing OWL axioms in much less space. In this section, we briefly introduce description logics from the perspective of OWL.

The building blocks of DL are very similar to that of OWL. DL axioms are con- structed from vocabulary elements and various constructors (i.e., logical operators).

Ontologies in DL are usually called knowledge bases; classes and properties in DL are calledconceptsandroles. To avoid confusion, however, we will stick to the OWL terminology throughout this chapter. The OWL axioms and expressions that we have encountered so far can easily be written in description logics according to Table 1.

Example 11. The following ontology illustrates some expressive features of DL:

FelisCatus(silvester) Silvester is a cat. (1) preysOn(silvester,tweety) Silvester preys on Tweety. (2)

FelisCatusvMammalia Cats are mammals. (3)

preysOn.> vPredator What preys on something is a predator. (4)

> v ∀preysOn.Animal What is preyed on is an animal. (5) AnimaluPlaysChessvHomoSapiens All animals that play chess are humans. (6) Mammaliav ∃hasFather.Mammalia Every mammal has a mammal father. (7)

Note that, intuitively speaking, the meaning ofu,t, andvcorresponds to the well- known set theoretic operations and relations∩,∪, and⊆. We will see in Section 2.6 below that this intuition also agrees with the precise definition of the DL semantics.

As in the case of OWL, one can obtain different DLs by adding or omitting expres- sive features. The description logic that supports all class expressions with>,⊥,u,t,

¬,∃, and∀is known asALC(which originally used to be an abbreviation forAttribute Language with Complement). Inverse properties are not supported byALC, and the DL we have introduced above is actually calledALCI(forALCwith inverses). Many

(14)

description logics can be defined by simply listing their supported features, but there are also cases where some features are only allowed in certain places (we will see ex- amples of this in the profiles OWL RL and OWL QL later on). It is therefore easy to obtain a big number of different DLs, and many of them have been named and studied.

The motivation for considering that many different DLs is that even slight changes in the supported features can lead to very different computational properties. In general, the more features we allow, the more complex and complicated reasoning becomes. On the other hand, the following example shows that the omission of a (syntactic) feature does not necessarily reduce expressivity, since we might still be able to express the same thing indirectly.

Example 12. The OWL axiomDisjointClasses(FelisCatus HomoSapiens)cannot be directly expressed in DLs, but we can easily encode it using any of the following four axioms (see also Remark 7):

FelisCatusv ¬HomoSapiens HomoSapiensv ¬FelisCatus FelisCatusuHomoSapiensv ⊥

> v ¬FelisCatust ¬HomoSapiens

Comparing this with Remark 7, it is evident that the DL notation saves a lot of space.

By discarding syntactic sugar such asDisjointClasses, we can also reduce the number of cases that we need to consider in definitions and algorithms, which will generally simplify the presentation.

DL ontologies are often structured into two sets:ABoxandTBox. The ABox consists of all (class or property) assertions. The TBox consists of allterminologicalaxioms, i.e., of all subclass inclusion axioms. The ABox provides information about concrete individuals while the TBox describes general rules that hold for all individuals. In con- sequence, ABoxes tend to be much larger than TBoxes. Moreover, TBoxes are usually more general (e.g., a biological taxonomy of species) while ABoxes are specific to an application (e.g., a database of a zoo that stores the species of each of its animals).

Ontology engineers often develop TBoxes, which users of ontologies combine with ex- isting ABox information (that might also come from traditional databases). In spite of these practical differences, TBox and ABox axioms can be treated in mostly the same way when explaining the underlying theory.

Summary Description logics provide a concise language for OWL axioms and expres- sions. DLs are characterised by their expressive features. The DL we use here isALCI.

2.6 The OWL Direct Semantics

For following the rest of this chapter, it will suffice to understand the intuitive semantics of each of the above description logic constructs (and the corresponding OWL expres- sions). When developing reasoning algorithms, however, a more precise definition of

(15)

Table 2.Interpreting description logic expressions semantically Expressionex InterpretationexI

Class expressions CuD CIDI CtD CIDI

¬CI\CI

> ∆I

⊥ ∅

P.C {e|there is fwithhe,fi ∈PIand f∈CI}

P.C {e|for all fwithhe,fi ∈PIwe havef ∈CI} Property expressions P {hf,ei | he,fi ∈PI}

the semantics is needed to check if the algorithm really computes the right results. In this section, we will therefore define the semantics of DL, which is known as theDi- rect Semanticsof OWL. This section and the next could be skipped by readers who are interested in a general overview only.

The semantics of DL is based on the simple idea that every ontology specifies in- formation about a possible “state of the world.” Initially, all that we know is that indi- vidual names represent objects, classes represent sets of objects, and properties repre- sent binary relations between objects. Many different situations are possible: we do not know which objects, sets, or relations our vocabulary symbols are meant to represent.

By asserting a DL axiom, we narrow down the possibilities. For example, the axiom FelisCatus vMammaliacan only be satisfied if the set represented byFelisCatusis a subset of the set represented byMammalia, even if we still have infinitely many possible ways to interpret these sets. Adding more axioms will further restrict the possible inter- pretations (i.e., “states of the world”). An entailment of an ontology then is simply an axiom that is satisfied by every interpretation that satisfies all axioms of the ontology.

To make this idea formal, we need to define what aninterpretationreally is, math- ematically speaking, and which conditions need to be met by it in order to satisfy a particular axiom. In other words, we need to define amodel theory. This approach is similar to first-order logic, but our interpretations can be a bit simpler due to the restric- tions imposed by DL.

Definition 13. AninterpretationIconsist of a non-empty set∆I(called itsdomain), and an interpretation function·Ithat assigns

– every individual nameato an elementaI∈∆I, – every class nameCto a setCI⊆∆I,

– every property namePto a binary relationPI⊆∆I×∆I.

This definition merely formalises what we have said above: individuals are objects, classes are sets, and properties are relations. Once we have such an interpretation of the basic vocabulary, the meaning of class and property expressions, and the truth of axioms can be calculated.

(16)

Definition 14. The value of an interpretationIfor class and property expressions is defined as in Table 2. A DL axiomaxissatisfiedbyI, writtenI |= ax, if the corre- sponding condition holds:

– I |=CvDifCI⊆DI, – I |=C(a) ifaI∈CI, – I |=P(a,b) ifhaI,bIi ∈PI.

Isatisfies an ontologyO, writtenI |=O, if it satisfies all axioms inO. In this case,Iis called amodelofO.

Example 15. Consider the interpretationIwith domain∆I={♥,♣, ?}, and the following inter- pretations for vocabulary symbols:

silvesterI=♣ tweetyI=♥

FelisCatusI={♣} preysOnI={h♣,♥i,h?, ?i}

MammaliaI={♣, ?} PredatorI={♣, ?}

AnimalI={?,♥} PlaysChessI={?} hasFatherI={h♣, ?i,h?, ?i} HomoSapiensI={}

This interprets all vocabulary symbols that occur in Example 11. It is easy to check that axiom (6) is the only axiom of that example that is not satisfied byI. Indeed,?∈(AnimaluPlaysChess)I but?<HomoSapiens.

Note that interpretations do usually not fully capture our intuition about the domain that we model. For example, the interpretation asserts that?is its own father – none of our axioms state that this should not be possible. Moreover, we might be surprised thatMammaliaI *AnimalI and that there are no humans in our model. It is usually impossible to fully enforce one particular interpretation, and it is also unnecessary, since we are interested in the logical conclusions rather than in the exact shape of possible models. Indeed, modelling too many details can also slow down reasoning without leading to any new consequences that are relevant to the application.

The challenge in modelling ontologies therefore is to understand to which extent the models can and should mirror reality.

Definition 16. A DL ontologyOentailsa DL axiomax, writtenO |=ax, if every model ofOis also a model ofax.Oisinconsistentif it has no models.Oentails that a classC isinconsistentifCI=∅in all modelsIofO.

An OWL axiom is entailed by an OWL ontology under Direct Semantics if the corresponding DL axiom is entailed by the corresponding DL ontology. Inconsistency of OWL ontologies and classes under Direct Semantics is defined analogously.

Note that this standard definition of entailment means that inconsistent ontologies entail every axiom. Indeed, each of the (zero) models of an inconsistent ontology sat- isfies any axiom. Inconsistency of ontologies and classes can be expressed as axiom entailment problems:

– Ois inconsistent exactly ifO |=> v ⊥.

– Oentails a classCto be inconsistent exactly ifO |=Cv ⊥.

(17)

Summary Entailments of DL ontologies are defined with a model theoretic semantics by interpreting individual names as objects, classes as sets, and properties as relations.

By translating OWL to DL, this also provides the Direct Semantics for OWL.

2.7 The OWL RDF-Based Semantics

As explained above, the RDF-Based Semantics of OWL is not based on description logics. It uses a similar model theoretic approach, but interpretations are based on the graph-based data model of RDF, which is not the topic of this chapter. Nevertheless, the underlying intuitive interpretation of individuals, classes, and properties is the same as in the case of DL and the Direct Semantics. Fortunately, this similarity extends to the formal semantics, and many entailments under RDF-Based Semantics can also be obtained under Direct Semantics. This section explains the practical impact of this re- lationship.

The main ingredient of our discussion is the followingcorrespondence theorem, which we will discuss in detail below. This theorem is derived from a more general correspondence theorem in the OWL 2 standard, where a full proof can be found [40, Section 7.2].

Theorem 17. LetObe an OWL ontology and letaxbe an OWL axiom that contains only individuals, class expressions, and property expressions that also occur inO. IfO entailsaxunder Direct Semantics, thenOentailsaxunder RDF-Based Semantics.

Moreover, ifOis inconsistent under the Direct Semantics, thenOis also inconsis- tent under the RDF-Based Semantics. In this case,Oentails every axiom under either semantics.

Let us first discuss the significance of this theorem. In essence, it states that, under certain conditions, entailments under Direct Semantics are also valid under RDF-Based Semantics. In practice, this means that we can use a Direct Semantics algorithm to build a sound but incomplete reasoner for RDF-Based Semantics. Considering the fact that there can be no sound and complete, terminating algorithm for the RDF-Based Semantics (since it is undecidable), this is actually not too bad. However, in many cases one could obtain a “more complete” procedure by taking additional aspects of the RDF-Based Semantics into account. Even if this is done, the actual reasoning al- gorithms could use similar principles, and might be faced with similar implementation challenges. From the viewpoint of a practitioner, the relevance of this correspondence strongly depends on two further questions:

(1) Is the theorem applicable in many practical cases?

(2) Are the RDF-based entailments that we can obtain from the Direct Semantics enough for being useful in practice?

Question (1) essentially asks if the requirements of Theorem 17 are too restrictive to apply it in realistic cases. We require that individuals, classes, and properties inaxmust occur inO. From the viewpoint of Direct Semantics (and DLs), this turns out to be a very weak (and even strange) condition. For example, one could ensure thatOcontains Cby adding an axiomSubClassOf(Cowl:Thing )(in DL terms:Cv >). This does not

(18)

change the meaning under Direct Semantics: we simply have stated that all objects in the classCare contained in the domain of interpretation. Similartautologicalaxioms can be used to introduce arbitrary individual names and property expressions. There- fore, every OWL ontology can be extended to satisfy the preconditions of Theorem 17 without changing its Direct Semantics.

Under RDF-Based Semantics, however, such additional axioms do make a differ- ence: it only supports entailments about entities that are syntactically present in the on- tology. On the other hand, many natural reasoning tasks relate to expressions that occur in the ontology. The second part of the theorem illustrates that inconsistency checking is also very similar under both semantics, even without additional side conditions. In summary, we find that Theorem 17 is applicable in many practical situations.

There is another “hidden” precondition in Theorem 17 that should be noted. Namely, we start from the assumption that ontologies are given as sets of OWL axioms. The RDF-Based Semantics, in contrast, can also be applied to arbitrary RDF graphs that may not correspond to any set of OWL axioms in a clean way. In other words, the theorem restricts to the part of RDF-based OWL ontologies that can be represented in terms of OWL axioms. Thus, if we want to process arbitrary RDF documents un- der RDF-Based Semantics, there is a second source of incompleteness, since ignoring some of the input (the part that does not represent OWL axioms) may lead us to fewer conclusions.4Hence, this aspect is more closely related to our second question.

Question (2) can be rephrased as follows: if a Direct Semantics reasoner is incom- plete for RDF-Based Semantics, how many practically interesting conclusions will it be missing? We cannot expect a quantitative answer (such as “85.3% of all entailments are found”), because there are infinitely many entailments under either semantics. In general, it is difficult to measure the degree of incompleteness. However, even a coarse answer to the question is difficult to give, partly due to the fact that there has not been much research on this topic. We already mentioned that some RDF documents can- not be mapped to OWL ontologies without loosing some information, and it is clear that in such cases we can expect additional entailments under RDF-Based Semantics.

Moreover, even valid OWL ontologies contain some information that is not taken into account when reasoning under the Direct Semantics. For example, every OWL ontol- ogy has anontology headerthat can be used to specify, e.g., the name of the ontology.

Under RDF-Based Semantics, this information is used during reasoning (e.g., the on- tology name is treated in the same way as Silvester the cat, and both might be inferred to occur in classes and properties). Again, it is obvious and well-understood that this will lead to conclusions that we cannot obtain under the Direct Semantics. Therefore the essential remaining question is:

Is there an OWL ontologyOand an axiomaxthat has a logical meaning in DL (i.e., that is not something like the ontology header), such thatOentailsax under the RDF-Based Semantics but not under the Direct Semantics?

In general, the answer to this question isyes. An example is given in Remark 18 below, which possibly covers the most important practical difference between the two seman-

4Fortunately, disregarding part of the input can never lead tomoreconclusions. In other words, the RDF-Based Semantics ismonotone, just like the Direct Semantics.

(19)

tics. However, this example uses some features that we have not introduced so far. It is an open question if there is any such case if we restrict to axioms that are expressible inALCI. In fact, it is conceivable that the logical entailments under Direct Semantics and RDF-Based Semantics are exactly the same for an interesting part of OWL.

Remark 18. The most prominent example where OWL’s RDF-Based Semantics is notably dif- ferent from the Direct Semantics is related to equality. In OWL, it is possible to state that two individuals are equal, i.e., that two different individual names refer to the same object. As ex- plained in Remark 5, we can also do this for entities that represent classes in other contexts, e.g., to state that the speciesFelis catusis the same ashousecat:

SameIndividual(FelisCatus Housecat)

In the Direct Semantics, this only means that theindividualsrepresented by these names are equal, but it would not imply anything about the classes of the same name. In the RDF-Based Semantics, in contrast, classes are identified with individuals, and the above statement would imply, e.g., that every member of the speciesFelis catusis also a housecat:

SubClassOf(FelisCatus Housecat)

This would not follow from the Direct Semantics. However, it would be easy to add this RDF- based entailment to a Direct Semantics reasoner by silently adding, for every equality assertion between two individuals, two mutual subclass inclusion axioms (and, to cover the case that equal entities are also used as properties, additional property inclusion axioms; we have not discussed this here).

The situation becomes more complicated if the equality of two individuals is not asserted but entailed indirectly. Again, this is not possible when restricting to the features we have discussed so far, but it can happen when using additional OWL features. In general, the interpretation of inferred equalities as subclass relationships makes reasoning undecidable, but there are cases (notably OWL RL) where inferred equalities can still be treated like asserted ones.

In practice, covering asserted equalities can be very important since users may (intentionally or accidentally) useSameIndividualto state that two classes or two properties are the same. In- ferred equalities between class or property names, in contrast, should rarely have that practical importance.

Summary OWL’s RDF-Based Semantics is based on a model theory that is defined on RDF documents. Yet, many entailments agree with those under the Direct Semantics.

3 Reasoning in the OWL Profiles

Equipped with basic background knowledge about OWL and its semantics, we are now ready to discuss the lightweight profiles of OWL. We first define small sublanguages of OWL that we use for explaining the core ideas underlying each profile, and then dis- cuss typical reasoning algorithms for each language that illustrate how many practical systems operate.

Throughout this section, we use the DL syntax introduced above for its brevity. It should be understood as an abbreviation for OWL axioms, that does not necessarily

(20)

require Direct Semantics to be used for defining entailments. Indeed, the algorithms that we discuss are also applicable to reasoning under RDF-Based Semantics, as shown in Theorem 17.

3.1 Three Tiny OWLs

To explain the characteristics of the three OWL profiles, we introduce three small on- tology languages ELtiny, RLtiny, and QLtiny that represent typical features of the profiles. To do this, let us first sum up the features ofALCI. An easy way to do this is to describe the syntax using formal grammars. The following languageAxiomde- scribes the three possible forms ofALCIaxioms, based on some auxiliary languages for class and property expressions:

ALCI

AxiomFCvC|C(IName)|P(IName,IName)

CFCName| > | ⊥ |CuC|CtC| ¬C| ∃P.C| ∀P.C PFPName|PName

Here and in the following, we use IName,CName, and PName for the sets of individual names, class names, and property names in our vocabulary. Recall that an expression likeCvCrepresents any axiom of the formDvEwithD,E∈C, including the case whereD,E.

The three profiles of OWL are defined by restricting the features ofALCIappro- priately. We first introduceELtiny, the language related to OWL EL, since it is easiest to define. It can be obtained by restrictingALCIto allow only conjunction, existential restrictions, top and bottom:

ELtiny

AxiomFCvC|C(IName)|P(IName,IName) CFCName| > | ⊥ |CuC| ∃P.C

PFPName

This ontology language is very similar to a lightweight description logic known asEL (the only difference is thatELdoes not allow>). This relationship is also the reason why the according OWL profile has been called EL. OWL EL actually also supports additionalALCIaxioms of the form> v ∀P.C(i.e.,property range axioms as discussed in Example 9), but no other uses of universal quantifiers. We exclude this special case here for simplicity.

(21)

Example 19. The following is an example of anELtinyontology:

FelisCatusv ∃preysOn.(AnimaluSmall) (8)

Animalu ∃preysOn.AnimalvPredator (9)

FelisCatusvAnimal (10)

where the axioms state that every cat preys on some animal that is small (8), every animal that preys on some animal is a predator (9), and cats are animals (10).

When compared to other lightweight ontology languages, the characteristic feature ofELtinyis that it allows for arbitrary existential quantifiers but not for universal quan- tifiers. As shown in Example 10, inverse properties would be a loophole in this restric- tion, so they must be forbidden as well. Moreover, all tractable ontology languages dis- allow or restrict the use of uniont, since this could otherwise require non-deterministic choices during reasoning (see Section 4.3). Complement¬must therefore also be re- stricted; otherwise one could simply expressCtDby writing¬(¬Cu ¬D). We will see other approaches to restricttand¬inRLtinyandQLtiny.

The most typical usage of OWL EL in practice is the modelling of large biomedi- cal ontologies. Such ontologies are carefully modelled by a group of experts to capture general domain knowledge (e.g., the fact that all cats are mammals). Existential quan- tifiers can be useful for defining general concepts, e.g., to express that a heart disease is a disease that occurs insomepart of the heart.

The axioms ofELtinyare exactly thoseALCIaxioms that use only a certain subset of constructors (u,∃,⊥,>). The languageRLtinytakes a slightly different approach for restrictingALCI. Whether a constructor is allowed or not now depends on its position within an axiom. Roughly speaking, the constructors that are allowed on the left-hand side of class inclusions are different from those that are allowed on the right-hand side.

We can capture this by defining two languages of class expressions as follows:

RLtiny

AxiomFCLvCR|CR(IName)|P(IName,IName) CLFCName| ⊥ |CLuCL|CLtCL| ∃P.CL CRFCName| ⊥ |CRuCR| ¬CL| ∀P.CR

PFPName|PName

Hence, for example, the axiomCtDvEis inRLtiny, butEvCtDis not. Indeed, the meaning ofCtDvEcould also be captured using two axiomsCvEandDvE, so we can see that the union on the left of class inclusions does not really add expressive power. The situation for complement is similar:Cv ¬Dcan be expressed asCuDv ⊥, as we already observed in Example 12. This explains why negated classes on the right- hand side are of the form¬CLinstead of¬CR. Therefore, union and complement in

(22)

RLtinyare mainly syntactic sugar that one could add toELtinyas well (but at the cost of requiring separate left and right class expression languages, which are not otherwise needed inELtiny).

The characteristic feature ofRLtinyis its asymmetric use of quantifiers: existen- tials are allowed only on the left and universals are allowed only on the right. Inverse properties can be allowed without weakening these restrictions. Also note thatRLtiny does not allow>.5

Example 20. The following is an example of anRLtinyontology:

FelisCatusv ∀preysOn.(AnimaluSmall) (11) Animalu ∃preysOn.AnimalvPredator (12)

FelisCatusvAnimal (13)

where axiom (11) states that cats prey only on small animals. Axioms (12) and (13) are the same as in Example 19.

The nameRLhints at the fact that the restrictions lead to a kind ofrule language, where all axioms can be expressed as rules (logical implications). For instance, axioms of Example 20 could be expressed as follows:

FelisCatus(x)∧preysOn(x,y)→Animal(y)∧Small(y) (14) Animal(x)∧preysOn(x,y)∧Animal(y)→Predator(x) (15) FelisCatus(x)→Animal(x) (16) If we read this as first-order logic implications where all variables are universally quan- tified, then these rule capture exactly the Direct Semantics of the example ontology. The RDF-Based Semantics is not fully defined in this way, but the rule-based forms can still be used to draw valid conclusions in this case.

The ontology languageQLtinyis defined in a similar way toRLtinyusing separate grammars for class expressions on the left and right of class inclusion axioms:

QLtiny

AxiomFCLvCR|CR(IName)|P(IName,IName) CLFCName| > | ⊥ | ∃P.>

CRFCName| > | ⊥ |CRuCR| ¬CL| ∃P.CR PFPName|PName

Notably, QLtiny is a lot more restricted than ELtiny and RLtiny regarding its Boolean constructors: it does not even allow intersectionuon the left-hand side. The

5This restriction of OWL RL does not have a deeper technical reason but is based on the pref- erences of OWL RL tool developers who participated in the W3C OWL Working Group.

(23)

reasons for this seem to be mostly historic – at least there is no big computational chal- lenge in allowinguas inELtiny andRLtiny. The left-hand side also is restricted to a very specific form of existential restriction, where only>can be used as a filler; as opposed to the case of u, this restriction is very important for reasoning inQLtiny. On the other hand,QLtinysupports inverse properties (which are not inELtiny) and existential quantifiers on the right-hand side (which are not inRLtiny).

Example 21. The following is an example of anQLtinyontology:

FelisCatusv ∃preysOn.(AnimaluSmall) (17)

preysOn.> vPredator (18)

preysOn.> vAnimal (19)

FelisCatusvAnimal (20)

As before, we can state that every cat preys on some small animal (17), and that cats are animals (20). We can also say that everything that preys on anything else is a predator (18), without being able to specify the additional restriction to animals as in (9) above. On the other hand, we can state that everything that is preyed on must be an animal (19), which expresses a range axiom using inverses as in Example 10.

The specific feature combination supported byQLtinyis motivated by its intended usage as a richquery language (hence the nameQL). Inontology-based data access (OBDA), an ontology is used to augment an existing database (viewed as a set of facts/ABox). A (database) query then should return not only the data that is stored explicitly in the database, but also additional facts that can be inferred from it using the ontological information. OWL QL (andQLtiny) allows this to be done without needing to write inferred facts to the database, but rather by using a query rewriting approach that we will explain in Section 3.8.

Summary The characteristics of the OWL profiles are exemplified by three languages:

ELtinythat allows∃but no∀,RLtiny that allows∃on the left and∀on the right of class inclusions, andQLtinythat even restrictsubut allows∃and inverse properties.

3.2 Rule-based Reasoning for Instance Retrieval inRLtiny

The first reasoning method that we present for the OWL profiles is for instance retrieval in OWL RL, that is, in our little fragmentRLtinyof OWL RL. The common approach to RL reasoning is to use a set ofinference rulesthat are applied to an input ontology to derive new consequences. This is a fundamental technique that we will also encounter forELtiny, and we will use the example ofRLtinyto introduce related concepts that will also come in handy later on.

Instance retrieval is the most important inference task for OWL RL. Applications of RL often involve a large amount of explicit facts, which are augmented by a set of TBox axioms that is much smaller (typically by at least one order of magnitude). This situation is common for input ontologies that are obtained by crawling the Semantic

Referenzen

ÄHNLICHE DOKUMENTE

- MOWLCorpus: TBoxes with less 1000 axioms and containing role chain axioms - 187 TBoxes: 121 computed rewritings w/o OOM errors.. Eiter, Ortiz, Simkus, Tran,

As usual in combined approaches (e.g., see [Stefanoni et al., 2013]), query processing times depend on the num- ber of candidate answers; thus, the applicability of the com-

For example, each Prolog fact in the senses file denotes exactly one word sense and also states a synset ID5. Hence we can conclude that a WordSense always belongs to exactly one

The second is the expansion of traditional ser vice industries, in which secondary labor markets characterize employment relations, and where the unbalanced growth cost

Because Scala traits are modeled as a abstract classes, each trait, like each class, also defines a type.. This is important because it means that in Scala, traits without any

Coronary revascularization, either by CABG or PTCA, has been proven unequivocally to improve survival in selected patients, especially in those with triple vessel disease and

In our view, the OBSE process should be a combination of both (Software and Ontology Engineering) life cycles following some sort of rendezvous principle: Software Engine-

The weight of the valve, therefore, is equivalent to a much greater pressure per square inch of this area than in the case of the old valves, and hence, when towards the end of