Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate...

90
Intelligence Artificielle Introduction to Description Logics Master Recherche, Marseille Nicola Olivetti INCA-LSIS Universit ´ e Paul Cezanne 2009-10 Intelligence ArtificielleIntroduction to Description Logics – p. 1/9

Transcript of Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate...

Page 1: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Intelligence ArtificielleIntroduction to Description Logics

Master Recherche, Marseille

Nicola OlivettiINCA-LSIS

Universite Paul Cezanne

2009-10

Intelligence ArtificielleIntroduction to Description Logics – p. 1/90

Page 2: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Plan of The Course

History and Motivation of Description Logics

The language ALCN

Relations with first-order logic

Structure and properties of TBox

Structure and properties of ABox

Reasoning problems and Mechanisms

Extensions of ALCN

Relation with OWL and semantic web languages

Intelligence ArtificielleIntroduction to Description Logics – p. 2/90

Page 3: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Main References:

F. Baader, D. Calvanese, D. L. McGuinness, D. Nardiand P. F. Patel-Schneider (eds.)The Description Logic Handbook: Theory,Implementation, and Applications.Cambridge University Press, 2003.

DL, web resources: http://dl.kr.org/

OWL, web resources:http://www.w3.org/TR/owl-features/

(Various authors) An informal description of OIL-Coreand Standard OIL: a layered proposal for DAML-O.Posted athttp://www.ontoknowledge.org/oil/downl/dialects.pdf.

Intelligence ArtificielleIntroduction to Description Logics – p. 3/90

Page 4: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Some history: past and present

Description logics: a logical formalism fordefining Concepts and their Relations (Terminologies )specifying properties of individuals (Assertions )

Main advantages:well-defined semantic: subset of first-order logicfeasibility: decidability and efficient reasoningalgorithmsflexibility: DL-systems form a hierarchy of languagesof increasing expressivity (but also of increasingcomplexity)

Intelligence ArtificielleIntroduction to Description Logics – p. 4/90

Page 5: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Some history: past and present

The ancestors of DL are the languages of AI for knowledgerepresentation:

Semantic networks

Frame based systems (i.e. KEE)

The system KL-ONE (Brachman and Schmolze 1985)distinction between concept and rolesclear semantic based on first-order logica reacher set of primitives than first order logic (thenotion of value and number restrictions on roles)

Intelligence ArtificielleIntroduction to Description Logics – p. 5/90

Page 6: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Some history: past and present

Today DL represent one the main language ofKnowledge representation, with applications in anumber of areas of computer science

Semantic web: DL are a foundation of ontologylanguages (OWL) which have been recentlystandarized by WC3 group

Software engineering: one can translate UML diagramsinto DL

Database theory: one can translate E/R-models into DL

Intelligence ArtificielleIntroduction to Description Logics – p. 6/90

Page 7: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Principles of DL in a nutshell

A Knowledge base KB is made of two parts:

TBox : collection of definitions of concepts and theirrelations, it may contain inclusion relations betweenconcepts

ABox : specification of properties of individuals, wherethe properties are those defined in the TBox

Intelligence ArtificielleIntroduction to Description Logics – p. 7/90

Page 8: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Principles of DL in a nutshell

There are primitive concepts (eg. "Female, Place,Product, Vehicle, Publication..." which are not defined,all other concept are defined ultimately in terms of theprimitive concepts

Further Information is extracted from a KB by inferencemechanisms:

subsumptionclassificationconsistencynon-emptiness of conceptsinference of individual properties

Intelligence ArtificielleIntroduction to Description Logics – p. 8/90

Page 9: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Basic elements of a TBox

Atomic concepts : denote subsets of the domain,

Roles : denotes binary relations on the domain (relationsbetween individuals), examples "HasChild, HasCost,HasPart, IsAuthorOf, Eats, Owns..."

Concepts constructors : operation for combining andbuilding complex concepts, example: boolean operators

Role constructors : operation for building complex roles,example: transitive closure

The description logics are a family of systems forming ahierarchy determined by the set of concept constructorsand role constructors admitted in the language

Intelligence ArtificielleIntroduction to Description Logics – p. 9/90

Page 10: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

The basic System ALC

Notation:A,Ai . . .: atomic conceptsC,D,Ci . . . : arbitrary conceptsR,S,Ri . . .: primitive rolesno complex roles

Defined concepts:

C := ⊤ | ⊥ | A | ¬C | C ⊓D | C ⊔D | ∀R.C | ∃R.C

Intelligence ArtificielleIntroduction to Description Logics – p. 10/90

Page 11: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Examples

Atomic concepts: Person, Female,Rich, Roles:HasChild

Person ⊓ Female

Person ⊓ ¬Female

Person ⊓ ∃HasChild.⊤

Person ⊓ ∀HasChild.⊥

Person ⊓ ∃HasChild.⊤ ⊓ ∀HasChild.Female

Person ⊓ (Rich ⊔ ∃HasChild.Rich)

Person ⊓ ∃HasChild.∃HasChild.⊤

Intelligence ArtificielleIntroduction to Description Logics – p. 11/90

Page 12: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Semantic

An interpretation I is a pair I = 〈∆, I〉, where∆ is a non-empty setI : AtomicConcepts → Pow(∆)

I : Roles → Pow(∆2)

⊤I = ∆

⊥I = ∅

(¬C)I = ∆− CI

(C ⊓D)I = CI ∩DI

(C ⊔D)I = CI ∪DI

Intelligence ArtificielleIntroduction to Description Logics – p. 12/90

Page 13: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Semantic (continued)

(∃R.C)I = {a ∈ ∆ | ∃b ∈ ∆(a, b) ∈ RI ∧ b ∈ CI}

(∀R.C)I = {a ∈ ∆ | ∀b ∈ ∆(a, b) ∈ RI → b ∈ CI}

Semantic Equivalences:¬(C ⊓D) = ¬C ⊔ ¬D¬(C ⊔D) = ¬C ⊓ ¬D¬(∃R.C) = ∀R.¬C¬(∀R.C) = ∃R.¬C¬¬C = C

Negation Normal Form : by the equivalences every conceptdefinition can be transformed into a concept definitionwhere negation only occurs in front of atomic concepts.

Intelligence ArtificielleIntroduction to Description Logics – p. 13/90

Page 14: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Number Restrictions: ALCN

ALCN is the extension of ALC obtained by adding thefollowing concept constructors called number restrictions :

≤ n R, where R is a role and n ≥ 0.Reading "Entity that has at most n entities related via R"

≥ nR where R, where is a role and n ≥ 0.Reading "Entity that has at least n entities related via R"

Interpretation:(≤ n R)I = {a ∈ ∆s.t. | {b ∈ ∆(a, b) ∈ RI} |≤ n}

(≥ n R)I = {a ∈ ∆s.t. | {b ∈ ∆(a, b) ∈ RI} |≥ n}

one can also introduce = nR ≡ ≥ nR ⊓ ≤ nR

Intelligence ArtificielleIntroduction to Description Logics – p. 14/90

Page 15: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Examples and Exercises

Person ⊓ ≥ 3HasChild

Person ⊓ ≥ 1HasChild ⊓ ≤ 1HasChild

Exercise1:write "Course with at most 20 partecipants, all of whichare master or Ph.D students", (primitive concepts:Course, MasterStudent, PhDStudent, roles:HasPartecipant)

Exercise2:write "Grandmother with a daughter who has exactlytwo sons (males)"

Exercise3: Extend the Negation Normal Form toNumber Restrictions

Intelligence ArtificielleIntroduction to Description Logics – p. 15/90

Page 16: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Qualified Number Restrictions

Qualified Number Restrictions ≤ nR.C and ≥ nR.C

(≤ n R.C)I = {a ∈ ∆s.t. | {b ∈ ∆(a, b) ∈ RI ∧ b ∈ CI} |≤ n}

(≥ n R.C)I = {a ∈ ∆s.t. | {b ∈ ∆(a, b) ∈ RI ∧ b ∈ CI} |≥ n}

Qualified number restrictions with arbitrary cardinalitycannot be expressed by using simple number restrictions

Intelligence ArtificielleIntroduction to Description Logics – p. 16/90

Page 17: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

First-Order Translation

To each concept C we can associate a first-order formulaφC(x), with one free-variable x:

for an atomic concept A, φA(x) = A(x)

for roles R, we have binary relation symbols R(x, y)

φ⊤(x) = P (x) ∨ ¬P (x) and φ⊥(x) = P (x) ∧ ¬P (x) whereP is a fixed predicate

φC⊓D(x) = φC(x) ∧ φD(x)

φC⊔D(x) = φC(x) ∨ φD(x)

φ¬C(x) = ¬φC(x)

φ∃R.C(x) = ∃y(R(x, y) ∧ φC(y))

φ∀R.C(x) = ∀y(R(x, y) → φC(y))

Intelligence ArtificielleIntroduction to Description Logics – p. 17/90

Page 18: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

First-Order Translation (continued)

φ≥n R(x) = ∃y1 . . . yn(R(x, y1)∧. . .∧R(x, yn)∧∧

i<j yi 6= yj)

φ≤n R(x) = ∀y1...yn+1(R(x, y1) ∧ ... ∧ R(x, yn+1) →∨i<j yi = yj)

Exercise4: translate the following in first order logic:Person ⊓ ≤ 3HasChildPerson ⊓ ∃HasChild.∃HasChild.Female

Propositionfor all interpretations I = 〈∆, I〉:

CI = {a ∈ ∆ | I |= φC(a)}

Exercise5: prove the proposition aboveIntelligence ArtificielleIntroduction to Description Logics – p. 18/90

Page 19: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Modal Interpretation of ALC

ALC is nothing but a notational variant of multi-modallogic Km (K with m modalities)

we have modal operators �R,♦R for each role R

we define the modal translation Cm of a concept C asfollows:

Am = A (a propositional variable)

(C ⊓D)m = Cm ∧Dm

(C ⊔D)m = Cm ∨Dm

(¬C)m = ¬Cm

(∃R.C)m = ♦RCm

(∀R.C)m = �RCm

Intelligence ArtificielleIntroduction to Description Logics – p. 19/90

Page 20: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Modal Interpretation of ALC

Let the language contain A1, . . . , An atomic conceptsand R1, . . . , Rm roles.

Given an Interpretation I = 〈∆, I〉, let MI be the Kripkemodel:

MI = (∆, RI1, . . . , R

Im, V )

where the evaluation functionV : ∆ → Pow({A1, . . . , An}) is defined by

V (a) = {Aj | a ∈ Aj}

Intelligence ArtificielleIntroduction to Description Logics – p. 20/90

Page 21: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Modal Interpretation of ALC

Propositionfor all interpretations I = 〈∆, I〉 we have:

a ∈ CI iff MI , a |= Cm

We can also establish the opposite mapping, given aKripke model M = (W,R1, . . . , Rm, V ) we can define aninterpretation IM = (W, IM ) whereAIM = {w ∈ W | A ∈ V (w)}

Propositionfor all Kripke models M we have:

w ∈ CIM iff M,w |= Cm

Intelligence ArtificielleIntroduction to Description Logics – p. 21/90

Page 22: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Terminological axioms-TBox

C ⊑ D concept inclusionan interpretation I satisfies C ⊑ D (I |= C ⊑ D) ifCI ⊆ DI

C ≡ D concept equivalence(stands for C ⊑ D and D ⊑ C),an interpretation I satisfies C ≡ D (I |= C ≡ D) ifCI = DI

DefinitionsA definition is an equivalence A ≡ C where A is anatomic concept, we say that the name A is defined by C

Intelligence ArtificielleIntroduction to Description Logics – p. 22/90

Page 23: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Terminological axioms-TBox

A terminology T (TBox) is a finite set of definitions wherefor each defined name A there is exactly one definition

an interpretation I satisfies T (or is a model of T ),denoted by

I |= T

if it satisfies every axiom in T

Two TBox T , T ′ are equivalent iff for all interpretation II |= T iff I |= T ′

Intelligence ArtificielleIntroduction to Description Logics – p. 23/90

Page 24: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Example

Woman ≡ Person ⊓ Female

Man ≡ Person ⊓ ¬Female

Mother ≡ Woman ⊓ ∃HasChild.Person

Father ≡ Man ⊓ ∃HasChild.Person

Parent ≡ Mother ⊔ Father

Grandmother ≡ Mother ⊓ ∃HasChild.Parent

MotherWithManyChildren ≡ Mother ⊓ ≥ 3HasChild

MotherWithoutDaughter ≡Mother ⊓ ∀HasChild.¬Woman

Wife ≡ Woman ⊓ ∃HasHusband.Man

Intelligence ArtificielleIntroduction to Description Logics – p. 24/90

Page 25: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Exercises

Suppose the following atomic concept are given:DegreeType, Course,Professor,Student and roles:HasPartecipant,HasDegree, IsTaughtBy

Define GraduatedStudent as Student who has exactlyone degree of type DegreeType

Define FundamentalCourse as a Course taught by aprofessor

Define AuxiliaryCourse as a Course taught by aprofessor or by a graduate student

Define AdvancedCourse as a Course whosepartecipants are all graduated student and has no morethan 20 partecipants

Intelligence ArtificielleIntroduction to Description Logics – p. 25/90

Page 26: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Definitorial TBox

Given a TBox T we can distinguish between:

Base symbols : atomic concepts which occur only in theright part of definitions of T

Base interpretation : Interpretation of base symbols of T

Definitorial TBox : A TBox is definitorial if for every baseinterpretation I there is exactly one extension J of I of Tthat is a model of T

(J is an extension of I if they have the same domainand the same interpretation of the base symbols androles)

Intelligence ArtificielleIntroduction to Description Logics – p. 26/90

Page 27: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Definitorial TBox

Not every TBox is definitorial:

Suppose we want to define "Man with only maledescendants" (MoMD): we can define it as

MoMD ≡ Man ⊓ ∀HasChild.MoMD

The TBox T containing this definition is not definitorial.Let I with:

∆ = {Joe1, Joe2, . . .} ∪ {Bob1, . . . , Bobn}

ManI = ∆

HasChildI = {(Joei, Joei+1) | i ≥ 1} ∪∪ {(Bobi, Bobi+1) | 1 ≤ i < n}

Intelligence ArtificielleIntroduction to Description Logics – p. 27/90

Page 28: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Definitorial TBox

The extension J of I with MoMDJ = {Bob1, . . . , Bobn} isa model of T

The extension J ′ of I with MoMDJ ′

= ∆ is also a modelof T .

Exercise:show that C ≡ A ⊓ ∀R.C is not definitorial, byconsidering any interpretation I with A = ∆ andRI = ∆2.

Another example of non-definitorial is:

BinTree ≡ Tree⊓ ≤ 2HasBranch⊓∀HasBranch.BinTree

Intelligence ArtificielleIntroduction to Description Logics – p. 28/90

Page 29: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Definitorial TBox

Theorem A TBox is definitorial iff it is equivalent to anacyclic TBox.(proof of the non-trivial part: by the interpolation and theconsequent Beth-definability property of modal logic)

acyclic: in the graph induced by concept occurrences indefinitions (arc (A,B) if A occurs in the right-hand of thedefinition of B).

Let T be definitorial then for each interpretation I ofbase symbols there exists an extension I ′ of I such thatI ′ |= T

Fixpoint Semantics for non-definitorial TBox

We restrict our concern to definitorial (or acyclic) TBox

Intelligence ArtificielleIntroduction to Description Logics – p. 29/90

Page 30: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Expansion of an acyclic TBox

If T is acyclic, it is possible to expand T in order toobtain a terminology where in the right part there areonly primitive concepts, example:

Mother ≡ (Person ⊓ Female) ⊓ ∃HasChild.Person

Father ≡ (Person ⊓ ¬Female) ⊓ ∃HasChild.Person

Parent ≡ ((Person ⊓ Female) ⊓ ∃HasChild.Person) ⊔⊔ ((Person ⊓ ¬Female) ⊓ ∃HasChild.Person)

The expansion T E of T is equivalent to T

The expansion T E of T can be exponentially larger thanT .

Intelligence ArtificielleIntroduction to Description Logics – p. 30/90

Page 31: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Expansion of an acyclic TBox

For a concept C = F [A1, . . . Ak] we let

CE = F [A1/DE1 , . . . , Ak/D

Ek ]

where Ai ≡ Di ∈ T

We define the expansion T E ofT = {A1 ≡ C1, . . . , An ≡ Cn} as

T E = {A1 ≡ CE1 , . . . , An ≡ CE

n }

Exercise: (i) define a measure of length of a concept;(ii) find a concept whose expansion is exponentiallylonger than the original concept.

Intelligence ArtificielleIntroduction to Description Logics – p. 31/90

Page 32: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Elimination of Inclusions

Generalized TBox can contain also inclusions of theform

A ⊑ C

where A is an atomic concept, there is at most oneinclusion axioms for each concept A.

example:

Shark ⊑ Fish ⊓ CanBite ⊓ IsDangerous

for efficient reasoning, it is necessary to eliminateinclusion axioms

Intelligence ArtificielleIntroduction to Description Logics – p. 32/90

Page 33: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Elimination of Inclusions

Each inclusion A ⊑ C is replaced by an equality:

A ≡ A ⊓ C

where A is a new atomic concept. (it represents theadditional unknown features of A)

Let us denote by T the terminology obtained from T byreplacing in the described way all inclusion axioms

Theorem For each interpretation I

If I |= T then I |= T ;If I |= T then there exists an interpretation I ′ whichcoincides with I on base symbols and roles suchthat I ′ |= T

Intelligence ArtificielleIntroduction to Description Logics – p. 33/90

Page 34: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

General Terminology

A General terminology may contain not only definitions, but also

arbitrary inclusion axioms like the following:

Elephant ⊑ Mammal

Student ⊓ ∃IsEnrolled.MIAGE ⊑ ∃MakesStage.Company

RealityShowTV Program ⊑ ¬SportTV Program

Worker ⊑ TaxPayer

Worker ⊓ ≥ 3HasChild ⊑ ¬TaxPayer

Student ⊑ ∀HasFriend.Student

Intelligence ArtificielleIntroduction to Description Logics – p. 34/90

Page 35: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

ABox

One ABox A contains one finite set of instances ofconcept and roles defined in a TBox thus has the form

A = {Ci(aj), Rs(ak, bh)}

An interpretation I is a model of an ABox A ifI satisfies the Unique Name assumption: if a 6= b

(two different constants) then aI 6= bI .

I |= C(a) if aI ∈ CI

I |= R(a, b) if (aI , bI) ∈ RI

Intelligence ArtificielleIntroduction to Description Logics – p. 35/90

Page 36: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Example of ABox

Mother(mary)

Father(john)

HasChild(mary, charles)

HasChild(mary, daniel)

MotherWithoutDaughter(ann)

Mother(jane)

HasChild(ann, jane)

Intelligence ArtificielleIntroduction to Description Logics – p. 36/90

Page 37: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Reasoning Tasks

(satisfiability) A concept C is satisfiable if there exists aninterpretation I such that CI 6= ∅

(subsumption) A concept C is subsumed by D (C ⊑ D) iffor all interpretation I, CI ⊆ DI

(equivalence) Two concept C and D are equivalent if forall interpretations I, CI = DI

(disjointness) Two concept C and D are disjoint if for allinterpretations I, CI ∩DI = ∅

Proposition(subsumption), (equivalence), and (disjointness) arereducible to testing (un)satisfiability

Intelligence ArtificielleIntroduction to Description Logics – p. 37/90

Page 38: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Reasoning Tasks wrt. the TBOX

(satisfiability) A concept C is satisfiable wrt. a TBox T ifthere exists an interpretation I |= T such that CI 6= ∅

(subsumption) A concept C is subsumed by D (C ⊑T D)if for all interpretations I, if I |= T then CI ⊆ DI

(equivalence) Two concept C and D are equivalent wrt. Tif for all interpretations I, if I |= T then CI = DI

(disjointness) Two concept C and D are disjoint wrt. T iffor all interpretation I, if I |= T then CI ∩DI = ∅

Proposition(subsumption), (equivalence), and (disjointness) wrt. Tare reducible to testing (un)satisfiability wrt. T .

Intelligence ArtificielleIntroduction to Description Logics – p. 38/90

Page 39: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Eliminating the TBox

If the TBox is large, it is not feasible to performdeduction with respect to it

One can eliminate the TBox from the reasoning tasksprovided it is definitorial

This is achieved by considering in place of a concept Cits expansion CE with respect to T

Intelligence ArtificielleIntroduction to Description Logics – p. 39/90

Page 40: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Eliminating the TBox

PropositionC is satisfiable wrt. T iff CE is satisfiable

ExampleParent ⊓ ∀HasChild.⊥is satisfiable wrt. the Family TBox if and only if(((Person ⊓ Female) ⊓ ∃HasChild.Person) ⊔ ((Person ⊓¬Female) ⊓ ∃HasChild.Person)) ⊓ ∀HasChild.⊥ issatisfiable (which is not)

Intelligence ArtificielleIntroduction to Description Logics – p. 40/90

Page 41: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Reasoning wrt. the ABox

(satisfiablility) A is satisfiable wrt. T if there exists aninterpretation I |= T ∪ A

if T is definitorial it can be eliminated and we obtain thatA is consistent wrt. T iff the expansion AE is satisfiable.

(property inference) A |= C(a) wrt. T iff A ∪ {¬C(a)} is notsatisfiable wrt T , where

A |= C(a) wrt T means: for all interpretation I such thatI |= T ∪ A we have I |= C(a)Example: {Grandmother(ann)} |= Parent(ann)

(query) find all x such that A |= C(x)

Intelligence ArtificielleIntroduction to Description Logics – p. 41/90

Page 42: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

ABox vs Database

Analogy with Database querythe TBox corresponds to the database schema

the ABox corresponds to the database

However, there is a basic difference with databasesemantic:

A DB is interpreted as complete information thus oneadopt the Closed World Assumption : e.g. if the onlyavailable information is Doctor(ann), F rench(marc),by CWA it follows: ¬Doctor(marc),¬French(ann)

Description Logics, in contrast adopt, an Open WorldAssumption , thus from Doctor(ann), F rench(marc)nothing can be concluded about the profession ofmarc and the nationality of ann

Intelligence ArtificielleIntroduction to Description Logics – p. 42/90

Page 43: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

ABox vs Database

Moreover in DB the existing individuals are restricted tothe ones denoted by a constant, that is the DomainClosure Assumption (DCA) is assumed: e.g. if the onlyavailable information is

A = {Doctor(joe), Doctor(marc),

F riend(ann, joe), F riend(ann,marc)}

by CWA and DCA one can infer:

(∀Friend.Doctor)(ann)

In contrast this conclusion is not valid in descriptionlogics, thus

A 6|= (∀Friend.Doctor)(ann)

Intelligence ArtificielleIntroduction to Description Logics – p. 43/90

Page 44: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

ABox vs Database

Let KB′ = KB + CWA+DCA+ UNA we have:If KB′ ⊢ A ∨ B then KB′ ⊢ A or KB′ ⊢ B

If KB′ ⊢ ∃xA[x] then for some term t KB′ ⊢ A[t]

This means that the under CWA+DCA+UNA (thusunder the logic underlying databases) one cannotrepresent information that is genuinely disjunctive, norexistential

Intelligence ArtificielleIntroduction to Description Logics – p. 44/90

Page 45: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Decidability and Tableaux Procedures

In contrast with full first-order logic, ALCN is decidable

Its complexity is:PSPACE-complete for concept satisfiability withrespect to acyclic terminologiesEXPTIME-complete for concept satisfiability withrespect to arbitray terminologies

We present a tableau decision procedure for conceptsatisfiability, as we have seen all reasoning tasks arereducible to satisfiability)

Intelligence ArtificielleIntroduction to Description Logics – p. 45/90

Page 46: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Decidability and Tableaux Procedures

To test if C is satisfiable the tableau is initialized withA = {C(x)} where x is an individual constant

A tableau configuration S is a finite set of ABox’esA1, . . . ,Ak

A Tableau T for A = {C(x)} is a sequence ofconfigurations

We use the notation S,A for S ∪ {A}

Intelligence ArtificielleIntroduction to Description Logics – p. 46/90

Page 47: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Tableaux Rules

We assume that the concept C tested for satisfiability:

is in expanded form CE

is in Negation Normal Form

We write A[X] to denote that the formulas X occur in A

The rules have the following format:

S,A[PREM ]

S,A[CONS1] . . . A[CONSn]

the rule prescribe to add CONSi to A if PREM ⊆ Aand it is applied provided

CONS1 6⊆ A . . . CONSn 6⊆ A

Intelligence ArtificielleIntroduction to Description Logics – p. 47/90

Page 48: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Tableaux Rules

Rule for ⊓S,A[(C ⊓D)(x)]

S,A[C(x), D(x)]

Rule for ⊔S,A[(C ⊔D)(x)]

S,A[C(x)],A[D(x)]

Intelligence ArtificielleIntroduction to Description Logics – p. 48/90

Page 49: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Tableaux Rules

Rule for ∃S,A[(∃R.C)(x)]

S,A[R(x, y), C(y)](y 6∈ A)

The rule is applied if there is not y such that R(x, y) ∈ Aand C(y) ∈ A

Rule for ∀S,A[(∀R.C)(x), R(x, y)]

S,A[C(y)]

Intelligence ArtificielleIntroduction to Description Logics – p. 49/90

Page 50: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Tableaux Rules (follows)

Rule for ≥ n

S,A[(≥ nR)(x)]

S,A[R(x, y1), . . . , R(x, yn), yi 6= yj | 1 ≤ i < j ≤ n]

where y1, . . . , yn are new constants

Rule for ≤ n

S,A[(≤ nR)(x), R(x, y1), . . . R(x, yn+1)]

S, {Ayi/yj | yi 6= yj 6∈ A ∧ i < j}}

if for some yi, yj , we have yi 6= yj 6∈ A

Intelligence ArtificielleIntroduction to Description Logics – p. 50/90

Page 51: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Clashes

A contains a clash if one of the following conditionsapplies:

⊥(x) ∈ A

C(x),¬C(x) ∈ A

{(≤ nR)(x)} ∪ {R(x, yi) | 1 ≤ i ≤ n+ 1}∪∪{yi 6= yj | 1 ≤ i < j ≤ n+ 1} ⊆ A

Example of the last condition:(≤ 2R)(x), R(x, y1), R(x, y2), R(x, y3),y1 6= y2, y1 6= y3, y2 6= y3

is a clash

Intelligence ArtificielleIntroduction to Description Logics – p. 51/90

Page 52: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Example 1

∃R.A ⊓ ∃R.B ⊓ ≤ 1R ⊑ ∃R.(A ⊓ B)

show that the following is unsatisfiable (NNFtransformation)

∃R.A ⊓ ∃R.B ⊓ ≤ 1R ⊓ ∀R.(¬A ⊔ ¬B)

(∃R.A ⊓ ∃R.B⊓ ≤ 1R ⊓ ∀R.(¬A ⊔ ¬B))(x)

(∃R.A)(x), (∃R.B)(x), (≤ 1R)(x), (∀R.(¬A ⊔ ¬B))(x)

R(x, y), A(y), (∃R.B)(x), (≤ 1R)(x), (∀R.(¬A ⊔ ¬B))(x)

R(x, y), A(y), R(x, z), B(z), (≤ 1R)(x), (∀R.(¬A ⊔ ¬B))(x)

R(x, y), A(y), R(x, z), B(z), (≤ 1R)(x),(¬A ⊔ ¬B)(y), (¬A ⊔ ¬B)(z), (∀R.(¬A ⊔ ¬B))(x)

Intelligence ArtificielleIntroduction to Description Logics – p. 52/90

Page 53: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Example 1(continued)

Let

A = {R(x, y), A(y), R(x, z), B(z), (≤ 1R)(x), (¬A ⊔ ¬B)(z)},

(∀R.(¬A ⊔ ¬B))(x)}

A ∪ {(¬A)(y)},A ∪ {(¬B)(y)}

The first one contains a clash, thus it is eliminated

Expanding (¬A ⊔ ¬B)(z) we get:

A ∪ {(¬B)(y), (¬A)(z)},A∪ {(¬B)(y), (¬B)(z)}

The second one contains a clash, thus it is eliminated

R(x, y), A(y), R(x, z), B(z), (¬B)(y), (¬A)(z),(≤ 1R)(x), (∀R.(¬A ⊔ ¬B))(x)

Intelligence ArtificielleIntroduction to Description Logics – p. 53/90

Page 54: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Example 1(continued)

let

A′ = {R(x, y), A(y), R(x, z), B(z), (¬B)(y), (¬A)(z),

(≤ 1R)(x), (∀R.(¬A ⊔ ¬B))(x)}

we apply the rule for ≤ 1R and we compute Ay/z

R(x, z), A(z), R(x, z), B(z), (¬B)(z), (¬A)(z),≤ 1R,∀R.(¬A ⊔ ¬B))(x)

Clash!

Intelligence ArtificielleIntroduction to Description Logics – p. 54/90

Page 55: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Example 2

∃R.A ⊓ ∃R.B ⊑ ∃R.(A ⊓ B)

show that the following is unsatisfiable (NNFtransformation)

∃R.A ⊓ ∃R.B ⊓ ∀R.(¬A ⊔ ¬B)

(∃R.A ⊓ ∃R.B ⊓ ∀R.(¬A ⊔ ¬B))(x)

(∃R.A)(x), (∃R.B)(x), (∀R.(¬A ⊔ ¬B))(x)

R(x, y), A(y), (∃R.B)(x), (∀R.(¬A ⊔ ¬B))(x)

R(x, y), A(y), R(x, z), B(z), (∀R.(¬A ⊔ ¬B))(x)

R(x, y), A(y), R(x, z), B(z),(¬A ⊔ ¬B)(y), (¬A ⊔ ¬B)(z), (∀R.(¬A ⊔ ¬B))(x)

Intelligence ArtificielleIntroduction to Description Logics – p. 55/90

Page 56: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Example 2(continued)

Let

A = {R(x, y), A(y), R(x, z), B(z), (¬A ⊔ ¬B)(z)},

(∀R.(¬A ⊔ ¬B))(x)}

A ∪ {(¬A)(y)},A ∪ {(¬B)(y)}

The first one contains a clash, thus it is eliminated

Expanding (¬A ⊔ ¬B)(z) we get:

A ∪ {(¬B)(y), (¬A)(z)},A∪ {(¬B)(y), (¬B)(z)}

The second one contains a clash, thus it is eliminated

R(x, y), A(y), R(x, z), B(z), (¬B)(y), (¬A)(z),(∀R.(¬A ⊔ ¬B))(x)

Intelligence ArtificielleIntroduction to Description Logics – p. 56/90

Page 57: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Example 2(end)

let I = (∆, I) be an interpretation, with

∆ = {x, y, z},

RI = {(x, y), (x, z)},

AI = {y},

BI = {z}

We can easily check that

I |= ∃R.A ⊓ ∃R.B ⊓ ∀R.(¬A ⊔ ¬B)

Thus∃R.A ⊓ ∃R.B 6⊑ ∃R.(A ⊓ B)

Intelligence ArtificielleIntroduction to Description Logics – p. 57/90

Page 58: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Soundness, Completeness, Termination

Satisfiable ConfigurationA tableau configuration S = {A1, . . . ,Ak} it is satisfiableif exists Ai ∈ S and exist an intepretation I |= Ai

Open configurationLet S = {A1, . . . ,Ak} be a tableau configuration. S isopen if some Ai ∈ S is clash-free.

Complete configurationLet S = {A1, . . . ,Ak} be a tableau configuration. Ai iscomplete if no rule can be applied to it. S is complete ifevery Ai ∈ S is complete.

Intelligence ArtificielleIntroduction to Description Logics – p. 58/90

Page 59: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Termination

Theorem1 (Termination)Any tableau T for {C(x0)} terminates with a finite andcomplete configuration S.Proof (hint)

(finite length ) There are only finite role-chainsR(x, y1), R(y1, y2), . . . , R(yn, yn+1) ∈ A, where thelength n is bounded by the level of nesting of roleconstructs(finite width ) There are only finitely many successorsof each element, i.e. the number of yi such thatR(x, yi) ∈ A is finite and bounded by the cardinalityof ≥ nR and the number of ∃R

Intelligence ArtificielleIntroduction to Description Logics – p. 59/90

Page 60: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Soundness

Lemma1Let S be a satisfiable configuration and let S′ beobtained by applying any rule to S, then S′ is alsosatisfiable

Theorem2 (Soundness)Let C be satisfiable concept and let T be any tableaufor {C(x0)}. All configurations of T are open.

CorollaryLet C be satisfiable concept and let T be any tableaufor {C(x0)}, T terminates with an open and completeconfiguration.

Intelligence ArtificielleIntroduction to Description Logics – p. 60/90

Page 61: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Completeness

Lemma2Let S be any complete and open configuration, then S issatisfiable

Theorem3 (Completeness)Let T be a tableau for {C(x0)}, if T terminates with anopen and complete configuration S, then C issatisfiable.

Intelligence ArtificielleIntroduction to Description Logics – p. 61/90

Page 62: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Proof of Lemma 2

Proof of Lemma2Let A ∈ S be complete and open, define aninterpretation as follows: I = (∆, I) where

∆ = {z | z occurs in A},

RI = {(x, y) | R(x, y) ∈ A},

AI = {y | A(y) ∈ A}

Show that I |= C(u) for every C(u) ∈ A

Extension of Tableaux for ABoxes: add the UniqueName Assumption

Intelligence ArtificielleIntroduction to Description Logics – p. 62/90

Page 63: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Tableaux for general terminologies

given a terminology T , add the rule

S,A

S,A[¬C(x)],A[D(x)](x ∈ A)

if C ⊑ D ∈ T

to get termination we need a suitable loop-checkingmechanism

consider for instanceT = {Student ⊑ ∃HasFriend.Student}, a tableaustarting with Student(joe) can be expanded infinitely

the complexity becomes exponential (EXPTIMEcomplete)

Intelligence ArtificielleIntroduction to Description Logics – p. 63/90

Page 64: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Tableaux as Trees

The rules have the following format:

A[PREM ]

A[CONS1] | . . . | A[CONSn]

the rule prescribe to replace PREM by CONSi ifPREM ⊆ A and it is applied provided

CONS1 6⊆ A . . . CONSn 6⊆ A

each A[CONS1] represent a branching in the tableau

Intelligence ArtificielleIntroduction to Description Logics – p. 64/90

Page 65: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Tableaux Rules

Rule for ⊓A[(C ⊓D)(x)]

A[C(x), D(x)]

Rule for ⊔A[(C ⊔D)(x)]

A[C(x)] | A[D(x)]

Intelligence ArtificielleIntroduction to Description Logics – p. 65/90

Page 66: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Tableaux Rules

Rule for ∃A[(∃R.C)(x)]

A[R(x, y), C(y)](y 6∈ A)

The rule is applied if there is not y such that R(x, y) ∈ Aand C(y) ∈ A

Rule for ∀A[(∀R.C)(x), R(x, y)]

A[(∀R.C)(x), R(x, y)], C(y)]

Intelligence ArtificielleIntroduction to Description Logics – p. 66/90

Page 67: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Tableaux Rules (follows)

Rule for ≥ n

A[(≥ nR)(x)]

A[R(x, y1), . . . , R(x, yn), yi 6= yj | 1 ≤ i < j ≤ n]

where y1, . . . , yn are new constants

Rule for ≤ n

A[(≤ nR)(x), R(x, y1), . . . R(x, yn+1)]

Ayi/yj | . . . | Ayi/yj

for all yi, yj such that yi 6= yj 6∈ A and i < j

Intelligence ArtificielleIntroduction to Description Logics – p. 67/90

Page 68: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Extensions of ALCN

Role Constructors

R,S := R ⊓ S | R ⊔ S | ¬R | R ◦ S | R+ | R−

where R ◦ S denotes the composition of R and S, R+

denotes the transitive closure of R, and R− denotes theinverse role of R

Semantics (we omit the boolean cases)

(R ◦ S)I = {(a, c) ∈ ∆2 | ∃b(a, b) ∈ RI ∧ (b, c) ∈ SI}

(R+)I = RI ∪ (R ◦R)I ∪ (R ◦R ◦ R)I ∪ . . .

(R−)I = {(b, a) | (a, b) ∈ R}

Intelligence ArtificielleIntroduction to Description Logics – p. 68/90

Page 69: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Extensions

Role InclusionsR ⊑ S

Definition of Transitive Roles

R ≡ R+

Definition of Symmetric Roles

R ≡ R−

Intelligence ArtificielleIntroduction to Description Logics – p. 69/90

Page 70: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Qualified Number Restrictions

Qualified Number Restrictions ≤ nR.C and ≥ nR.C

(≤ n R.C)I = {a ∈ ∆s.t. | {b ∈ ∆(a, b) ∈ RI ∧ b ∈ CI} |≤ n}

(≥ n R.C)I = {a ∈ ∆s.t. | {b ∈ ∆(a, b) ∈ RI ∧ b ∈ CI} |≥ n}

Number restrictions can be combined with roleconstructors:

≥ 2(HasChild ◦HasChild)

but with care! e.g. if combined with role intersection andcomposition give an undecidable language (as well as ifcombined with transitive roles).

Intelligence ArtificielleIntroduction to Description Logics – p. 70/90

Page 71: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

One-of-constructor

One-of constructor: {a1, . . . , an}, where

({a1, . . . , an})I = {aI1, . . . , a

In}

Using the ∃R construct and one-of when n = 1, we candefine exact values of roles as

WhiteWine = Wine ⊓ ∃HasColor.{White}

we can rewrite it as

WhiteWine = Wine ⊓HasColor = White

Intelligence ArtificielleIntroduction to Description Logics – p. 71/90

Page 72: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Concrete Domains

Concrete Domains:Natural Numbers, Strings

Adult ≡ Person ⊓ ∃hasAge ≥ 18

the predicate ≥ 18 is interpreted on the natural numbers

Intelligence ArtificielleIntroduction to Description Logics – p. 72/90

Page 73: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Exercise

Give tableau rules for the followign extensions of ALCN

transitive roles

symmetric roles

functional roles

one-of construct

Intelligence ArtificielleIntroduction to Description Logics – p. 73/90

Page 74: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Applications to semantic web

Purpose of the semantic web project : web informationshould be described and organized according to itsmeaning independently from its presentation

The meaning is defined by an ontology which fixes theprimitive concepts and defines all the others and theirrelations

An ontology should be specified in a formalism which isprocessable by a machine: a formal language adequatefor for web exchange

The system should provide reasoning services forontologies, such as subsumption, satisfiablility,classification.

Intelligence ArtificielleIntroduction to Description Logics – p. 74/90

Page 75: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Steps to semantic web

OIL: (Ontology Interchange Layer) abstract languagewith a well-defined semantics defined by DescriptionLogics (2001-2002)

DAML+OIL: Language for Ontologies with a concretesyntax based on RDF schemas and XML

OWL: current evolution of DAML+OIL, it is a standard(2005 Recommendation by WC3 group on semanticweb)

We will see OWL DL: there is also a small and versionof OWL, called OWL Lite, and a very strong version,called OWL Fullwhich is undecidable

Intelligence ArtificielleIntroduction to Description Logics – p. 75/90

Page 76: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

OWL DL

It has an RDF/XML based syntax<owl:Class rdf:ID="Student">

<owl:intersectionOf rdf:parsetype="Collection"><owl:Class rdfs:about="Person" /><owl:Restriction>

<owl:onProperty rdf:resource="enrolledIn" /><owl:minCardinality

rdfs:datatype="&xsd;Integer">1

</owl:minCardinality></owl:Restriction>

<owl:intersectionOf></owl:Class>

Intelligence ArtificielleIntroduction to Description Logics – p. 76/90

Page 77: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

OWL (DL): Abstract syntax

A (URI reference) A

owl: Thing ⊤

owl: Nothing ⊥

intersectionOf(C1 C2 ...) C1 ⊓ C2 . . .

unionOf(C1 C2 ...) C1 ⊔ C2 . . .

complementOf(C) ¬C

oneOf(o1 ...on) {o1, . . . , on}

Intelligence ArtificielleIntroduction to Description Logics – p. 77/90

Page 78: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

OWL (DL): : Abstract syntax

restriction(R someValuesFrom(C)) ∃R.C

restriction(R allValuesFrom(C)) ∀R.C

restriction(R hasValue(o)) ∃R.{o}

restriction(R minCardinality(n)) ≥ nR

restriction(R maxCardinality(n)) ≤ nR

Intelligence ArtificielleIntroduction to Description Logics – p. 78/90

Page 79: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

OWL (DL): : Abstract syntax

restriction(U someValuesFrom(D)) ∃U.D

restriction(U allValuesFrom(D)) ∀U.D

restriction(U hasValue(v)) ∃U.{v}

restriction(U minCardinality(n)) ≥ nU

restriction(U maxCardinality(n)) ≤ nU

Intelligence ArtificielleIntroduction to Description Logics – p. 79/90

Page 80: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

OWL (DL): : Abstract syntax

Class(A partial C1 ... Cn) A ⊑ C1 ⊓ . . . ⊓ Cn

Class(A complete C1 ... Cn) A ≡ C1 ⊓ . . . ⊓ Cn

EnumeratedClass(A o1.... on) A ≡ {o1, . . . , on}

SubClassOf(C1 C2) C1 ⊑ C2

EquivalentClasses(C1 ...Cn) C1 ≡ . . . ≡ Cn

DisjointClasses(C1 ...Cn) Ci ⊑ ¬Cj

Intelligence ArtificielleIntroduction to Description Logics – p. 80/90

Page 81: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

OWL(DL) : Abstract syntax

ObjectProperty(R super(Ri) R ⊑ Ri

domain(C1) ≥ 1R ⊑ C1

range(C2) ⊤ ⊑ ∀R.C2

[inverseOf(R0)] R ≡ R−0

[Symmetric] R ≡ R−

[Functional] ⊤ ⊑ ≤ 1R[InverseFunctional] ⊤ ⊑ ≤ 1R−

[Transitive]) R ≡ R+

SubPropertyOf(R1 R2) R1 ⊑ R2

EquivalentProperties(R1...Rn) R1 ≡ . . . ≡ Rn

Intelligence ArtificielleIntroduction to Description Logics – p. 81/90

Page 82: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

OWL (DL): : Abstract syntax

ObjectProperty(R super(Ri) R ⊑ Ri

domain(C1) ≥ 1R ⊑ C1

range(C2) ⊤ ⊑ ∀R.C2

[inverseOf(R0)] R ≡ R−0

[Symmetric] R ≡ R−

[Functional] ⊤ ⊑ ≤ 1R[InverseFunctional] ⊤ ⊑ ≤ 1R−

[Transitive]) R ≡ R+

SubPropertyOf(R1 R2) R1 ⊑ R2

EquivalentProperties(R1...Rn) R1 ≡ . . . ≡ Rn

Intelligence ArtificielleIntroduction to Description Logics – p. 82/90

Page 83: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

OWL (DL): : Abstract syntax

DataProperty(U super(Ui) U ⊑ Ui

domain(C1) ≥ 1U ⊑ C1

range(D) ⊤ ⊑ ∀U.D[Functional] ⊤ ⊑ ≤ 1U

SubPropertyOf(U1 U2) U1 ⊑ U2

EquivalentProperties(U1...Un) U1 ≡ . . . ≡ Un

Intelligence ArtificielleIntroduction to Description Logics – p. 83/90

Page 84: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

OWL (DL): : Abstract syntax

Individual(o type(C1) ...type(Cn) Ci(o)value(R1 o1)...value(Rn on) Ri(o, oi)value(U1 v1)...value(Un vn)) Ui(o, vi)

SameIndividual(o1...on) o1 = . . . = on

DifferentIndividuals(o1...on) oi 6= oj

Intelligence ArtificielleIntroduction to Description Logics – p. 84/90

Page 85: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Example: African Animals Ontology

ObjectProperty (eatsInverseOf (is-eaten-by))

ObjectProperty (has-partInverseOf(is-part-of)transitive)

Class (Animal)

DisjointClasses (Animal,UnionOf(Plant,

(restriction (is-part-of SomeValuesFrom Plant))))

Class (Tree partial Plant)

Class (Branch partialrestriction (is-part-of SomeValuesFrom Tree))

Intelligence ArtificielleIntroduction to Description Logics – p. 85/90

Page 86: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Example: African Animals Ontology

Class (Leaf partialrestriction (is-part-of SomeValuesFrom Branch))

Class (Carnivore completeAnimalrestriction (eats AllValuesFrom Animal))

Class (Herbivore completeAnimalrestriction (eats

AllValuesFrom unionOf(Plantrestriction (is-part-ofSomeValuesFrom Plant)))))

Intelligence ArtificielleIntroduction to Description Logics – p. 86/90

Page 87: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Example: African Animals Ontology

Class (Giraffe partialAnimalrestriction(eats SomeValuesFrom Leaf))

Class (Lion partialAnimalrestriction(eats AllValuesFrom Herbivore))

Class (Tasty Plant completePlantrestriction(eaten-by SomeValuesFrom Herbivore)restriction(eaten-by SomeValuesFrom Carnivore))

Intelligence ArtificielleIntroduction to Description Logics – p. 87/90

Page 88: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

Some Inferences

Lion subclass of Carnivore

Giraffe subclass of Herbivore

Leaf is-part-of Tree

Lion subclass of Carnivore

Herbivore and Carnivore are disjoint

Tasty-Plant is inconsistent

Intelligence ArtificielleIntroduction to Description Logics – p. 88/90

Page 89: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

DL Translation of African Animals

eats ≡ eaten-by−

is-part-of ≡ has-part−

is-part-of ≡ is-part-of+

Plant ⊑ ¬(Animal ⊔ ∃is-part-of.P lant)

Tree ⊑ Plant

Branch ⊑ ∃is-part-of.T ree

Leaf ⊑ ∃is-part-of.Branch

Intelligence ArtificielleIntroduction to Description Logics – p. 89/90

Page 90: Intelligence Artificielle Introduction to Description Logics · Database theory: one can translate E/R-models into DL Intelligence ArtificielleIntroduction to Description Logics

DL Translation of African Animals

Carnivore ≡ Animal ⊓ ∀eats.Animal

Herbivore ≡ Animal ⊓ ∀eats.(Plant ⊔ ∃is-part-of.P lant)

Giraffe ⊑ Animal ⊓ ∀eats.Leaf

Lion ⊑ Animal ⊓ ∀eats.Herbivore

TastyP lant ≡Plant ⊓ ∃eaten-by.Herbivore ⊓ ∃eaten-by.Carnivore

Intelligence ArtificielleIntroduction to Description Logics – p. 90/90