About Description Logics: Q For Test

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Lecture 3

Q for Test: Specify which are the specificities of the semantics in case of FOPL and of DL.
RrL, FOPL – model logic, DL explication of scheme: L2 – time: 1:22

DLs are the support for the oldest OWL programming language, which is a language developed to
build ontologies and ontologies in this moment are considerate very important aspect in computer
science.

1. About Description Logics

Description Logics (DLs) – knowledge representation formalisms that:


• represent the knowledge of an application domain (the world)
• (How?) by defining the relevant concepts of the domain (concepts are called its
terminology)
• and then using these concepts to specify properties of individuals occurring in the domain
(this is referred as the world description).
It is important that DLs Achieves classification of
• concepts – subconcept / superconcept relationships (subsumption), these relationships
between larger concepts or smaller concepts from the point of view of semantic is called
subsumption, it’s the same idea of the example when you have inheritance of OOP
language and you have larger classes and than you make the class more specific and you
inherited with something above. Subsumption is somehow the basic of DLs, is in fact the
specific inference rule in DL
• and of its individuals - whether a given individual is an instance of a concept(member of
a concept). Once we have a concept (at least one concept) we have individuals which
represents instances of these concepts. The classification referring to the individuals is
referring in fact to the fact if the individual is a member of a class or not (referring to OOP
example).
DLs are based on a formal, logic-based semantics. DLs is a formal logic, it has formal syntax
and formal semantics.
The main Application areas:
• Representation of Ontologies for the Semantic Web
• Reasoning about Entity Relationship diagrams in general and in database in particular.
A DL system – the components

We have two main parts:


TBox – the terminology, i.e., the vocabulary of an application domain = concepts (set of
individuals) + roles . Vocabulary = set of concepts and each concept represents a set of individuals
sharing the same features, the same attribute + different roles, the roles specifies the relationship
among the concepts.
ABox – assertions about named individuals in terms of this vocabulary, the aBox represents the
set of assertions.
TBox + ABox forms Knowledge Base and we have the DL (are several classes of Description
Language which are more and more powerful at we add more operators in the language) and we
are using DL to accurately represent elements to the TBox and the Abox, and we have the
Reasoning with which we are solving problems based on the knowledge base, and we could have
the application programs that are using the results and we can also add some rules if condition,
than conclusion rules to the description logic system.

2. DL Language

Contains concepts, roles and individuals


Elementary descriptions:
• atomic concepts (A,B)
• atomic roles (R)
Complex descriptions of concepts – concept constructors(are bult using constructors), or of
roles – role constructors(are also bult using constructors, but are constructors of concepts or
constructors of roles). Simple roles = atomic.
The basic language – Attribute Language AL. It’s also the simplest pawn and which has in the
same time the lowest power to express the world its attribute language, which is denoted in
short by AL.
Description languages are distinguished by the constructors they provide (syntactic rules of
concept formation). These constructors allow us to build concepts that are more complex as
we add new constructors to the language. Therefor adding some extra constructors we get
different extension of the basic language which is the attribute language.
Different extensions of AL

Syntax

Lecture 2 – time: 1:30


AL[U][E][N][C] = If we add all the concepts constructors (from image), we get the full extended
description logic language which is written AL[U][E][N][C].
Q: Why do you think that we don’t we don’t use full language from the beginning? To have no
restriction and all.
R: The more concepts you have, the more time complex would the proves get.

Examples
Atomic concepts: Pers, Fem
Atomic role: hasChild

Semantics

Interpretation I is a tuple I = (ΔI , ·I) where:


ΔI - the domain of the interpretation (a set)
·I - an interpretation function that assigns:
▪ names of individuals to elements of ΔI

▪ names of atomic concept (A) to subsets of ΔI ( AI ⊆ ΔI). We have the domain of


interpretation and we have several individuals that are members of this domain and therefor
we group these individuals in subset and we say that the set of these individuals represents our
concept.

▪ Names of atomic roles (R) to a binary relation RI ⊆ ΔI x ΔI.. These are relationships that
connect to individuals and to concepts of the domain of the problem.

DL Semantics

▪ An interpretation I is a model for a concept C if CI  . For any interpretation the same rule as
in FOPL applies, that means an interpretation is a model of a concept C if the interpretation of this
concept is not empty, that means that is at least one individual which is a instance of the concept.
In the image below:
This is an example so we have interpretation function and we have the domain of interpretation,
suppose we have the individuals that are member of the domain and in this case we have John and
Mary represented by the two dots, and we have concepts that are subsets of the domain these are
Teacher is represented by the circle with dotted line margin, Student is represented by the smaller
circle that interacts with the big one (Teacher) and Car that is represented by the circle in the corner
-> These three are concepts and in the concept we have instances (black dots) , we can have
intersection between two concepts for example: are maybe some individuals that are in the same
time Teacher and Student, than we have rules that are the relationship between elements in the
domain and are the examples hasChild and owns and they are represented links between
individuals in the domain.

Semantics of complex concepts

The interpretation function is extended to concept definitions by the following definitions:

L3: 0:11

Link with FOPL

Concept names C - unary predicates PC


Role names R – binary predicates PR
Concept C ⇒ Pc (x) is true if for every interpretation I the set of elements that satisfies PC
(x) is CI
Role R ⇒ PR(x, y) is true if for every interpretation I the set of elements that satisfies PR(x,
y) is RI

3. Terminologies (TBox)

Terminological axioms - make statements about how concepts or roles are related to each other

Using interpretation means the concept C is included or equal with the interpretation D if the
interpretation of C is included in the interpretation of D, that means that all instances of C
represents a subset of the instances of D.
Two concepts are identical id their interpretations are the same.
An interpretation I satisfies a TBox T iff I is a model of every concept of T = I is a model of
T
A definition in a TBox is an equality (≡) whose left-hand side is an atomic concept
•Introduces symbolic names for complex descriptions
Name symbols NT (defined concepts) - occur on the left-hand side of some axiom
Base symbols BT (primitive concepts that are not defined) - occur only on the right-hand side
of axioms which means that starts from the base symbols, that means symbols that we consider
as such we don’t give them a definition.

Example of TBox
L3: 0:26
A base interpretation J for a Tbox T is an interpretation that interprets only the base symbols.
An interpretation I that interprets also the name symbols is an extension of J if it has the same
domain as J , i.e., ΔI = ΔJ, and if it agrees with J for the base symbols. In J we are keeping the
significant of semantics of the interpretation given for the name symbols.
T is definitorial if every base interpretation has exactly one extension that is a model of T.
• If we know what the base symbols stand for, and T is definitorial, then the meaning of the
name symbols is completely determined. It means that having name concepts or defined
concepts we must avoid defining one concept based on the same concept, that means to avoid
loops in the definition. Terminologies are definitorial if there are no circles or looping
definition.
The question whether a terminology is definitorial or not is related to the question whether or
not its definitions are cyclic.
Let A, B be atomic concepts occurring in T
A directly uses B in T - B appea rs on the right-hand side of the definition of A
A uses B in T - the transitive closure of the relation directly uses.
T contains a cycle iff there exists an atomic concept in T that uses itself.
Otherwise, T is acyclic
If a terminology T is acyclic, then it is definitorial
T' is the expansion of T if all axioms are of the form A ≡ C', where C' contains only base
symbols
4. World descriptions (ABox)

ABox introduce individuals, by giving them names, and asserts properties of these individuals
Individuals: a, b, c
C(a) - concept assertions - a belongs to (the interpretation of) C,
R(b, c) - role assertions - c is a filler of the role R for b.
MotherWithoutDaughter(mary)
Father(peter)
hasChild(mary, peter)
hasChild(peter, harry)
hasChild(mary, paul)

Example of ABox
ABox Semantics

Semantics of ABoxe – extends interpretations to individual names


An interpretation I = (ΔI, ·I) not only maps atomic concepts and roles to sets and relations, but
in addition maps each individual name a to an element aI ∈ ΔI. Important fact: In descritional
logic we have the unique name assumption
The mapping has to respect the unique name assumption (UNA) - that distinct individual
names denote distinct objects, i.e., if a ≠ b then aI ≠ bI
An interpretation I satisfies C(a) if aI ∈ CI
An interpretation I satisfies R(a, b) if (aI, bI) ∈ RI
An interpretation I satisfies an ABox if it satisfies each assertion in the ABox – I is a model
of A
An interpretation I satisfies an ABox A with respect to a TBox T if I it is a model of T and I
is a model of A

5. Inference / reasoning tasks

A knowledge base with a TBox and Abox is called consistent if it has a model.
From a logical point of view, a concept makes sense for us if there is some interpretation that
satisfies the axioms of T (that is, a model of T ) such that the concept denotes a nonempty set
in that interpretation.
A concept with this property is said to be satisfiable with respect to T and unsatisfiable
otherwise.
Reasoning tasks for TBox: Concept satisfiability – does there exist a model of C?
A concept C is satisfiable with respect to T if there exists a model I of T such that CI ≠  (I is
a model of C)

The concept Man is NOT satisfiable with respect to the Tbox defined above

Inference / reasoning tasks for TBox

Concept subsumption
Whether one description subsumes another one in a TBox - organize the concepts of a
terminology into a hierarchy according to their generality
Subsumption: A concept C subsumes a concept D with respect to T if DI  CI for every model
I of T
C subsumes D if every individual of concept D is also an individual of concept C - also
said D is subsumed by C

Concept subsumption – example

Other reasoning tasks for TBox

Checking equivalence of 2 concepts


Equivalence: Two concepts C and D are equivalent with respect to T if CI = DI for every model
I of T

Checking disjointness of 2 concepts


Disjointness: Two concepts C and D are disjoint with respect to T if C I ∩ DI = ∅ for every
model I of T

Subsumption / Satisfiability

Reduction to Subsumption
C is unsatisfiable  C is subsumed by ⊥
C and D are equivalent  C is subsumed by D and D is subsumed by C
C and D are disjoint  C D is subsumed by ⊥
Reduction to Unsatisfiability
C is subsumed by D (C D)  C ¬D is unsatisfiable
C and D are equivalent  both (C ¬D) and (¬C D) are unsatisfiable
C and D are disjoint  C D is unsatisfiable

Inference / reasoning tasks for ABox

Reasoning tasks for ABox:


(3) Abox consistent
Find out whether the set of assertions in a ABox is consistent (has a model)
An ABox A is consistent with respect to a TBox T, if I that is a model of both A and T
A is consistent if it is consistent with respect to the empty TBox.
Woman(mary)
Man(tom)
Father(mary)
(4) Instance (of a concept) checking
Whether the assertions in the ABox entail that an individual is an instance of a given concept
description
MotherWithManyChildren ≡ Mother  3 hasChild
Mother(mary)
hasChild(mary, bob)
hasChild(mary, hellen)
hasChild(mary, tom)
MotherWithManyChildren(mary)?
A concept description can also be conceived as a query - retrieve the individuals that satisfy
the query.

Other reasoning tasks for ABox

Retrieval problem
Given an ABox A and a concept C, find all individuals a in A that are an instance of C (i.e.,C(a))
Realization problem
Given an individual a in an ABox and a set of concepts, find the most specific concept C from the
set for which a is an instance, i.e A |- C(a)
• The most specific concepts are those that are minimal with respect to the subsumption ordering
Closed-world vs. open-world semantics

The closed world assumption (CWA) is the assumption that any statement that is not known
to be true, is considered false.
The open world assumption (OWA) is the assumption that the truth-value of a statement is
independent of whether or not it is known by an agent to be true.
The CWA allows an agent to infer, from its lack of knowledge about a statement being true,
anything that follows from that statement being false.
The OWA limits inference an agent can make to those that follow from statements that are
known to the agent to be true.
The open world assumption is used to codify the informal notion that no single agent has
complete knowledge, and therefore cannot make the closed world assumption.

6. Reasoning algorithms

Tableaux based algorithms = satisfiability of concepts


Structural subsumption algorithms = algorithms that compare the syntactic structure of
concept descriptions
• Very efficient
• Complete for only rather simple languages
• For ALNU subsumption algorithms are not complete
What kind of algorithm are tableaux based algorithm and what kind of algorithm are structural
subsumption algorithms? Tableaux algorithms are model based, structural subsumption
algorithms are proof based.

Tableaux algorithms

Tableaux algorithms check satisfiability


General model
Try to prove concept satisfiability by constructing a model
A tableau is a graph representing such a model
Use a set of tableau expansion rules
Either a model has been constructed or there is an obvious contradiction
Algorithm
Build a tree-like model I of the input concept C
Work on concepts in negation normal form (~R.C ≡ R.~C)
Break C syntactically inferring constraints on elements of I
Use tableau rules corresponding to constructors ( , , ) – some rules are
nondeterministic
Stop when conflicting constraints are derived, or no rules are applicable (syntax fully
decomposed)
To determine satisfiability of a concept C
Initialize the tree T with a single node x with L(x) = {C}
Expand by repeatedly applying the expansion rules
See if the tree T is fully expanded or
If T contains a clash
Each node x in the tree represent an individual labeled with a set L(x) of concepts it has to
satisfy
C  L(x) implies x  CI
Each edge(x, y) represents a pair occurring in the interpretation of a role labeled with the role
name
R=L((x, y)) implies (x, y) RI
Each L(x) may be seen as an ABox

Expansion rules

-rule
If (C1  C2)  L(x) and {C1, C2}  L(x) then add C1 and C2 to L(x)
-rule
If (C1  C2)  L(x) and {C1, C2}  L(x) =  then add C1 to L(x). If this leads to a clash, go
back and add C2 to L(x)
-rule
If R.C  L(x) and there is no y s.t. L((x, y)) = R and C  L(y) then create a new node y and edge
(x, y) with L(y) = C and L((x, y)) = R
-rule
If R.C  L(x) and there is some y s.t. L((x, y)) = R and C L(y) then add C to L(y)
-rule
If (nR)  L(x) and there are no individual names y1…,yn s.t. L((x, yi)) = R(1  i  n) and yi  yj
1  I < j  n then Create new nodes y1…yn and edges (x, yi) with L(yi) = yi and L((x, yi)) = R, with
yi  yj 1  i < j  n distinct individual names not occurring before
-rule
If ( nR)  L(x) and then there are y1…yn+1 s.t. L((x, yj)) = R and yi  yj is not in L(x) for some
i<>j then for each pair (yj, yi) such that i > j and yi  yj is not in L(x) replace each occurrence of
yi by yj

Tableau algorithms

The tree T is complete iff none of the transformation rules apply to it


Consistency of a tree T can be decided by looking for clashes (contradictions).
An L(X) contains a contradiction if:
• {⊥}  L(x) for some individual x
• {C, ¬C}  L(x) for some individual x and some concept C
• {(n R)(x)}  {R(x, yi ) | 1  i  n+1}  {yi  yj | 1  i < j  n+1}  L(X) for individuals
x, y1…yn+1, a nonnegative integer n, and a role R
if one ABox (a node label in the tree) is clash-free, then {C} is consistent and C is satisfiable
if all {ABoxes} (all node labels) contain a clash, then {C} is inconsistent and C is unsatisfiable

Theorems

T1 (termination)
Let C be an ALCN concept description in negation normal form. There cannot be an infinite
sequence of rule applications {C}  S1  S2  …
T2 (decidability)
It is decidable whether or not an ALCN-concept is satisfiable

Example

DL Knowledge Base
vegan  person  eats.plant
vegetarian  person  eats.(plant  dairy)
Querry vegan  vegetarian
Converts to
vegan  ~ vegetarian is unsatisfiable
Unfold and normalize
person  eats.plant  (~person  eats.(~plant  ~dairy))
Initialize T to the above
Apply -rule and add to L(x)
{person, eats.plant, (~person  eats.(~plant  ~dairy)}

Conclusion
Both applications of -rule have lead to clashes so vegan  ~ vegetarian is unsatisfiable
So vegan  vegetarian
Note
Some expansion rules are nondeterministic (e.g. ) Cycle check (blocking) often needed to
ensure termination
Person   hasParent.Person,
John:Person

Exercise 1
DL Knowledge base
Parent ≡ Person  hasChild.Person
Woman ≡ Person  Female
Mother ≡ Person  hasChild.Person  Female
Querry
Prove if the following subsumption relations hold
Mother  Woman
Mother  Parent

Exercise 2
Prove if the following subsumption holds
hasChild.Smart  hasChild.Tall  hasChild.(Smart  Tall)
and in general if
R.A  R.B  R.(A  B)
You can prove for any of the above relations

You might also like