Description Logics Logics and Ontologies Enrico Franconi - - PowerPoint PPT Presentation

description logics logics and ontologies
SMART_READER_LITE
LIVE PREVIEW

Description Logics Logics and Ontologies Enrico Franconi - - PowerPoint PPT Presentation

Description Logics Logics and Ontologies Enrico Franconi franconi@cs.man.ac.uk http://www.cs.man.ac.uk/franconi Department of Computer Science, University of Manchester (1/38) Summary What is an ontology Ontology languages


slide-1
SLIDE 1

Description Logics Logics and Ontologies

Enrico Franconi

franconi@cs.man.ac.uk http://www.cs.man.ac.uk/˜franconi

Department of Computer Science, University of Manchester

(1/38)

slide-2
SLIDE 2

Summary

  • What is an ontology
  • Ontology languages
  • Formalising ontologies with set theory
  • Reasoning in ontologies
  • Formalising ontologies with first order logic
  • Integrity constraints
  • The i•com ontology design tool

(2/38)

slide-3
SLIDE 3

What is an Ontology

  • An ontology is a formal conceptualisation of the world.

(3/38)

slide-4
SLIDE 4

What is an Ontology

  • An ontology is a formal conceptualisation of the world.
  • An ontology specifies a set of constraints, which declare what should

necessarily hold in any possible world.

(3/38)

slide-5
SLIDE 5

What is an Ontology

  • An ontology is a formal conceptualisation of the world.
  • An ontology specifies a set of constraints, which declare what should

necessarily hold in any possible world.

  • Any possible world should conform to the constraints expressed by the
  • ntology.

(3/38)

slide-6
SLIDE 6

What is an Ontology

  • An ontology is a formal conceptualisation of the world.
  • An ontology specifies a set of constraints, which declare what should

necessarily hold in any possible world.

  • Any possible world should conform to the constraints expressed by the
  • ntology.
  • Given an ontology, a legal world description is a possible world satisfying the

constraints.

(3/38)

slide-7
SLIDE 7

Ontology languages

  • An ontology language usually introduces concepts (aka classes, entities),

properties of concepts (aka slots, attributes, roles), relationships between concepts (aka associations), and additional constraints.

(4/38)

slide-8
SLIDE 8

Ontology languages

  • An ontology language usually introduces concepts (aka classes, entities),

properties of concepts (aka slots, attributes, roles), relationships between concepts (aka associations), and additional constraints.

  • Ontology languages may be simple (e.g., having only concepts), frame-based

(having only concepts and properties), or logic-based (e.g. Ontolingua and DAML+OIL).

(4/38)

slide-9
SLIDE 9

Ontology languages

  • An ontology language usually introduces concepts (aka classes, entities),

properties of concepts (aka slots, attributes, roles), relationships between concepts (aka associations), and additional constraints.

  • Ontology languages may be simple (e.g., having only concepts), frame-based

(having only concepts and properties), or logic-based (e.g. Ontolingua and DAML+OIL).

  • Ontology languages are typically expressed by means of diagrams.

(4/38)

slide-10
SLIDE 10

Ontology languages

  • An ontology language usually introduces concepts (aka classes, entities),

properties of concepts (aka slots, attributes, roles), relationships between concepts (aka associations), and additional constraints.

  • Ontology languages may be simple (e.g., having only concepts), frame-based

(having only concepts and properties), or logic-based (e.g. Ontolingua and DAML+OIL).

  • Ontology languages are typically expressed by means of diagrams.
  • The Entity-Relationship conceptual data model and UML Class Diagrams can

be considered as ontology languages.

(4/38)

slide-11
SLIDE 11

Entity-Relationship Schema

Employee

PaySlipNumber(Integer) Salary(Integer)

Project

ProjectCode(String)

Manager TopManager AreaManager

×

Works-for Manages (1,n) (1,1) (1,1)

(5/38)

slide-12
SLIDE 12

UML Class Diagram

AreaManager TopManager Manager Project

ProjectCode:String

Employee

PaySlipNumber:Integer Salary:Integer

{disjoint,complete}

1..⋆

Works-for

1..1 1..1

Manages

(6/38)

slide-13
SLIDE 13

Meaning of basic constructs

  • An entity/class is a set of instances;
  • an association (n-ary relationship) is a set of pairs (n-tuples) of instances;
  • an attribute is a set of pairs of an instance and a domain element.

E1 E2 E3 E4 E5 P1 P2 P3

“P12a” “P02b” “P2a/1” “P9”

Employee Project String Works-for ProjectCode

(7/38)

slide-14
SLIDE 14

A world is described by sets of instances

E1 E2 E3 E4 E5 P1 P2 P3

E1,P1 E2,P1 E2,P2 E2,P3 E3,P1 E4,P2 E4,P3 E5,P3

Employee Project Works-for

(8/38)

slide-15
SLIDE 15

The relational representation

Employee employeeId E1 E2 E3 E4 E5 Project projectId P1 P2 P3 String anystring “P12a” “P02b” “P2a/1” “P9”

· · ·

Works-for employeeId projectId E1 P1 E2 P1 E2 P2 E2 P3 E3 P1 E4 P2 E4 P3 E5 P3 ProjectCode projectId pcode P1 “P12a” P2 “P02b” P3 “P2a/1”

(9/38)

slide-16
SLIDE 16

Meaning of Attributes

Project

ProjectCode(String)

(10/38)

slide-17
SLIDE 17

Meaning of Attributes

Project

ProjectCode(String)

Project ⊆ {p | ♯(ProjectCode ∩ ({p} × String)) ≥ 1}

(10/38)

slide-18
SLIDE 18

Meaning of ISA

Employee Manager

(11/38)

slide-19
SLIDE 19

Meaning of ISA

Employee Manager Manager ⊆ Employee

(11/38)

slide-20
SLIDE 20

Meaning of disjoint and total constraints

Manager TopManager AreaManager

×

(12/38)

slide-21
SLIDE 21

Meaning of disjoint and total constraints

Manager TopManager AreaManager

×

  • ISA: AreaManager ⊆ Manager
  • ISA: TopManager ⊆ Manager
  • disjoint: AreaManager ∩ TopManager = ∅
  • total Manager ⊆ AreaManager ∪ TopManager

(12/38)

slide-22
SLIDE 22

Meaning of Associations and Relationships

Employee Project Works-for

(13/38)

slide-23
SLIDE 23

Meaning of Associations and Relationships

Employee Project Works-for Works-for ⊆ Employee × Project

(13/38)

slide-24
SLIDE 24

Meaning of Associations and Relationships

Employee Project

A1

Works-for

A2

Works-for ⊆ Employee × Project

(13/38)

slide-25
SLIDE 25

Meaning of Cardinality Constraints

TopManager Project Manages

(min,max)

(14/38)

slide-26
SLIDE 26

Meaning of Cardinality Constraints

TopManager Project Manages

(min,max)

TopManager ⊆ {m | max ≥ ♯(Manages ∩ ({m} × Ω)) ≥ min} (where Ω is the set of all instances)

(14/38)

slide-27
SLIDE 27

Meaning of Cardinality Constraints

TopManager Project

A1

Manages

A2 (min,max)

TopManager ⊆ {m | max ≥ ♯(Manages ∩ ({m} × Ω)) ≥ min} (where Ω is the set of all instances)

(14/38)

slide-28
SLIDE 28

Meaning of the initial diagram

Works-for ⊆ Employee × Project Manages ⊆ TopManager × Project Employee ⊆ {e | ♯(PaySlipNumber ∩ ({e} × Integer)) ≥ 1} Employee ⊆ {e | ♯(Salary ∩ ({e} × Integer)) ≥ 1} Project ⊆ {p | ♯(ProjectCode ∩ ({p} × String)) ≥ 1} TopManager ⊆ {m | 1 ≥ ♯(Manages ∩ ({m} × Ω)) ≥ 1} Project ⊆ {p | 1 ≥ ♯(Manages ∩ (Ω × {p})) ≥ 1} Project ⊆ {p | ♯(Works-for ∩ (Ω × {p})) ≥ 1} Manager ⊆ Employee AreaManager ⊆ Manager TopManager ⊆ Manager AreaManager ∩ TopManager = ∅ Manager ⊆ AreaManager ∪ TopManager

(15/38)

slide-29
SLIDE 29

Reasoning

Given an ontology – seen as a collection of constraints – it is possible that additional constraints can be inferred.

  • An entity is inconsistent if it denotes always the empty set.
  • An entity is a sub-entity of another entity if the former denotes a subset of the

set denoted by the latter.

  • Two entities are equivalent if they denote the same set.
  • . . .

(16/38)

slide-30
SLIDE 30

Reasoning

Person Italian English Lazy LatinLover Gentleman Hooligan

× ×

(17/38)

slide-31
SLIDE 31

Reasoning

Person Italian English Lazy LatinLover Gentleman Hooligan

× ×

implies LatinLover = ∅ Italian ⊆ Lazy Italian ≡ Lazy

(17/38)

slide-32
SLIDE 32

Reasoning by cases

Italian Lazy Mafioso LatinLover ItalianProf

×

{disjoint}

(18/38)

slide-33
SLIDE 33

Reasoning by cases

Italian Lazy Mafioso LatinLover ItalianProf

×

{disjoint} implies ItalianProf ⊆ LatinLover

(18/38)

slide-34
SLIDE 34

ISA and Inheritance

Employee Manager

Salary(Integer)

(19/38)

slide-35
SLIDE 35

ISA and Inheritance

Employee Manager

Salary(Integer) Salary(Integer)

implies Manager ⊆ {m | ♯(Salary ∩ ({m} × Integer)) ≥ 1}

(19/38)

slide-36
SLIDE 36

Infinite worlds

Root Node link

(2,2) (0,1)

(20/38)

slide-37
SLIDE 37

Infinite worlds

Root Node link

(2,2) (0,1)

implies “the classes Root and Node contain an infinite number of instances”.

(20/38)

slide-38
SLIDE 38

Ontologies in First Order Logic

  • We have introduced ontology languages that specify a set of constraints that

should be satisfied by the world of interest.

  • The interpretation of an ontology is therefore defined as the collection of all

the legal world descriptions – i.e., all the (finite) relational structures which conform to the constraints imposed by the ontology.

  • In order to formally define the interpretation, an ontology is mapped into a set
  • f First Order Logic (FOL) formulas.
  • The legal world descriptions (i.e., the interpretation) of an ontology are all the

models of the translated FOL theory.

(21/38)

slide-39
SLIDE 39

FOL alphabet

The Alphabet of the FOL language will have the following set of Predicate symbols:

  • 1-ary predicate symbols: E1, E2, . . . , En for each Entity-set;

D1, D2, . . . , Dm for each Basic Domain.

  • binary predicate symbols: A1, A2, . . . , Ak for each Attribute.
  • n-ary predicate symbols: R1, R2, . . . , Rp for each Relationship-set.

(22/38)

slide-40
SLIDE 40

FOL Notation

  • Vector variables indicated as x stand for an n-tuple of variables:

x = x1, . . . , xn

  • Counting existential quantifier indicated as ∃≤n or ∃≥n.

∃≤nx. R(x, y) ≡ ∀x1, . . . , xn, xn+1. R(x1, y)∧. . .∧R(xn, y)∧R(xn+1, y) → (x1 = x2) ∨ . . . ∨ (x1 = xn) ∨ (x1 = xn+1) ∨ (x2 = x3) ∨ . . . ∨ (x2 = xn) ∨ (x2 = xn+1) ∨ . . . . . . ∨ (xn = xn+1) ∃≥nx. R(x, y) ≡ ∃x1, . . . , xn. R(x1, y) ∧ . . . ∧ R(xn, y) ∧ R(xn+1, y) ∧ ¬(x1 = x2) ∧ . . . ∧ ¬(x1 = xn) ∧ ¬(x2 = x3) ∧ . . . ∧ ¬(x2 = xn) ∧ . . . . . . ∧ (xn−1 = xn)

(23/38)

slide-41
SLIDE 41

The Interpretation function

Interpretation: I = D, ·I, where D is an arbitrary non-empty set such that:

  • D = Ω ∪ B, where:
  • B = ∪m

i=1BDi. BDi is the set of values associated with each basic

domain (i.e., integer, string, etc.); and BDi ∩ BDj = ∅, ∀i, j. i = j

  • Ω is the abstract entity domain such that B ∩ Ω = ∅.

(24/38)

slide-42
SLIDE 42

The Formal Semantics for the Atoms

I is the interpretation function that maps:

  • Basic Domain Predicates to elements of the relative basic domain:

Di

I = BDi

(e.g., StringI = BString).

  • Entity-set Predicates to elements of the entity domain:

Ei

I ⊆ Ω.

  • Attribute Predicates to binary relations such that:

Ai

I ⊆ Ω × B.

  • Relationship-set Predicates to n-ary relations over the entity domain:

Ri

I ⊆ Ω × Ω . . . × Ω = Ωn.

(25/38)

slide-43
SLIDE 43

The Attribute Construct

E

A D

  • The meaning of this constraint is:

EI ⊆ {e ∈ Ω | ♯(AI ∩ ({e} × BD)) ≥ 1}

(26/38)

slide-44
SLIDE 44

The Attribute Construct

E

A D

  • The meaning of this constraint is:

EI ⊆ {e ∈ Ω | ♯(AI ∩ ({e} × BD)) ≥ 1}

  • The FOL translation is the formula:

∀x. E(x) → ∃y.A(x, y) ∧ D(y)

(26/38)

slide-45
SLIDE 45

The Relationship Construct

E1 . . . En R

  • The meaning of this constraint is:

RI ⊆ E1

I × . . . × En I

(27/38)

slide-46
SLIDE 46

The Relationship Construct

E1 . . . En R

  • The meaning of this constraint is:

RI ⊆ E1

I × . . . × En I

  • The FOL translation is the formula:

∀x1, . . . , xn. R(x1, . . . , xn) → E1(x1) ∧ . . . ∧ En(xn)

(27/38)

slide-47
SLIDE 47

The Cardinality Construct

E1 Ei En R

(p,q)

  • The meaning of this constraint is:

Ei

I ⊆ {ei ∈ Ω | p ≤ ♯(RI ∩ (Ω × {ei} × Ω)) ≤ q}

(28/38)

slide-48
SLIDE 48

The Cardinality Construct

E1 Ei En R

(p,q)

  • The meaning of this constraint is:

Ei

I ⊆ {ei ∈ Ω | p ≤ ♯(RI ∩ (Ω × {ei} × Ω)) ≤ q}

  • The FOL translation is the formula:

∀xi. E(xi) → ∃≥px1, . . . , xi−1, xi+1, . . . xn. R(x1, . . . , xn) ∧ ∃≤qx1, . . . , xi−1, xi+1, . . . xn. R(x1, . . . , xn)

(28/38)

slide-49
SLIDE 49

The Cardinality Construct: An Example

Professor Student Supervises (2,3) (1,1)

A valid world description is: Professor professorId Alex Bob Student studentId John Mary Nick Paul Laura Supervises professorId studentId Alex John Bob Laura Alex Mary Bob Nick Alex Paul

(29/38)

slide-50
SLIDE 50

The Cardinality Construct: An Example

Professor Student Supervises (2,3) (1,1)

An invalid world description is: Professor professorId Alex Bob Student studentId John Mary Nick Paul Laura Supervises professorId studentId Alex John Bob Laura Alex Mary Bob Nick Alex Paul Alex Laura

(30/38)

slide-51
SLIDE 51

The Cardinality Construct: An Example

Professor Student Supervises (2,3) (1,1)

  • The FOL translation is:

∀x, y. Supervises(x, y) → Professor(x) ∧ Student(y) ∀x. Professor(x) → ∃≥2y. Supervises(x, y) ∧ ∃≤3y. Supervises(x, y) ∀y. Student(y) → ∃=1x. Supervises(x, y)

(31/38)

slide-52
SLIDE 52

ISA Relations

The ISA relation is a constraint that specifies sub-entity sets. Sub-entity-set = contains entities with more properties – both more attributes and different participation in relationships – not pertinent to the Super-entity-set. A Sub-entity-set inherits all the properties of its Sub-entity-sets. We distinguish between the following different ISA relations:

  • Overlapping Partial;
  • Overlapping Total;
  • Disjoint Partial;
  • Disjoint Total.

(32/38)

slide-53
SLIDE 53

The Overlapping Partial Construct

E E1 . . . En

  • The meaning of this constraint is:

Ei

I ⊆ EI, for all i = 1, . . . , n.

(33/38)

slide-54
SLIDE 54

The Overlapping Partial Construct

E E1 . . . En

  • The meaning of this constraint is:

Ei

I ⊆ EI, for all i = 1, . . . , n.

  • The FOL translation is the formula:

∀x. Ei(x) → E(x), for all i = 1, . . . , n.

(33/38)

slide-55
SLIDE 55

The Overlapping Total Construct

E E1 . . . En

  • The meaning of this constraint is: Ei

I

⊆ EI, for all i = 1, . . . , n EI ⊆ E1

I ∪ . . . ∪ En I

(34/38)

slide-56
SLIDE 56

The Overlapping Total Construct

E E1 . . . En

  • The meaning of this constraint is: Ei

I

⊆ EI, for all i = 1, . . . , n EI ⊆ E1

I ∪ . . . ∪ En I

  • The FOL translation is the set of formulas:

∀x. Ei(x) → E(x), for all i = 1, . . . , n ∀x. E(x) → E1(x) ∨ . . . ∨ En

(34/38)

slide-57
SLIDE 57

The Disjoint Partial Construct

E E1 . . . En ×

  • The meaning of this constraint is: Ei

I ⊆ EI

for all i = 1, . . . , n

Ei

I ∩ Ej I = ∅

for all i = j

(35/38)

slide-58
SLIDE 58

The Disjoint Partial Construct

E E1 . . . En ×

  • The meaning of this constraint is: Ei

I ⊆ EI

for all i = 1, . . . , n

Ei

I ∩ Ej I = ∅

for all i = j

  • The FOL translation is the set of formulas:

∀x. E1(x) → E(x) ∧ ¬E2(x) ∧ . . . ∧ ¬En(x) ∀x. E2(x) → E(x) ∧ ¬E3(x) ∧ . . . ∧ ¬En(x) ∀x. En−1(x) → E(x) ∧ ¬En(x) ∀x. En(x) → E(x)

(35/38)

slide-59
SLIDE 59

The Disjoint Total Construct

E E1 . . . En ×

  • The meaning of this constraint is:

Ei

I ⊆ EI

for all i = 1, . . . , n

Ei

I ∩ Ej I = ∅

for all i = j

EI ⊆ E1

I ∪ . . . ∪ En I

(36/38)

slide-60
SLIDE 60

The Disjoint Total Construct

E E1 . . . En ×

  • The meaning of this constraint is:

Ei

I ⊆ EI

for all i = 1, . . . , n

Ei

I ∩ Ej I = ∅

for all i = j

EI ⊆ E1

I ∪ . . . ∪ En I

  • The FOL translation is the set of formulas:

∀x. E(x) → E1(x) ∨ . . . ∨ En ∀x. E1(x) → E(x) ∧ ¬E2(x) ∧ . . . ∧ ¬En(x) ∀x. E2(x) → E(x) ∧ ¬E3(x) ∧ . . . ∧ ¬En(x) ∀x. En−1(x) → E(x) ∧ ¬En(x) ∀x. En(x) → E(x)

(36/38)

slide-61
SLIDE 61

FOL Translation: An Example

Employee Project Manager TopManager AreaManager

×

Works-for Manages (1,n) (1,1) (1,1)

∀x, y. Works-for(x, y) → Employee(x) ∧ Project(y) ∀x, y. Manages(x, y) → Top-Manager(x) ∧ Project(y) ∀y. Project(y) → ∃x. Works-for(x, y) ∀y. Project(y) → ∃=1x. Manages(x, y) ∀x. Top-Manager(x) → ∃=1y. Manages(x, y) ∀x. Manager(x) → Employee(x) ∀x. Manager(x) → Area-Manager(x) ∨ Top-Manager(x) ∀x. Area-Manager(x) → Manager(x) ∧ ¬Top-Manager(x) ∀x. Top-Manager(x) → Manager(x)

(37/38)

slide-62
SLIDE 62

Additional (integrity) constraints

Employee Project Manager TopManager AreaManager Department InterestGroup OrganisationalUnit

× ×

Works-for Manages Resp-for (1,n) (1,1) (1,1)

  • Managers do not work for a project (she/he just manages it).

∀x. Manager(x) → ∀y. ¬WORKS-FOR(x, y)

(38/38)

slide-63
SLIDE 63

Additional (integrity) constraints

Employee Project Manager TopManager AreaManager Department InterestGroup OrganisationalUnit

× ×

Works-for Manages Resp-for (1,n) (1,1) (1,1) (1,n)

  • Managers do not work for a project (she/he just manages it).

∀x. Manager(x) → ∀y. ¬WORKS-FOR(x, y)

  • If the minimum cardinality for the participation of employees to the works-for

relationship is increased, then . . .

(38/38)

slide-64
SLIDE 64

Additional (integrity) constraints

Employee Project Manager TopManager AreaManager Department InterestGroup OrganisationalUnit

× ×

Works-for Manages Resp-for (1,n) (1,1) (1,1) (1,n)

  • Managers do not work for a project (she/he just manages it).

∀x. Manager(x) → ∀y. ¬WORKS-FOR(x, y)

  • If the minimum cardinality for the participation of employees to the works-for

relationship is increased, then . . .

  • If an ISA link is added stating that Interest Groups are Departments, then . . .

(38/38)