Semantic Web technologies are a set of languages standardized by the World Wide Web Consortium (W3C) and designed to create a web of data that can be processed by machines. One of the core languages of the Semantic Web is Web Ontology Language (OWL), a family of knowledge representation languages for authoring ontologies or knowledge bases. The newest OWL is based on Description Logics (DL), a family of logics that are decidable fragments of first-order logic. leanCoR is a new description logic reasoner designed for experimenting with the new connection method algorithms and optimization techniques for DL. leanCoR is an extension of leanCoP, a compact automated theorem prover for classical first-order logic.
4. –Tim Berners-Lee
“The semantic web is not a separate Web but an
extension of the current one, in which information is
given well-defined meaning, better enabling computers
and people to work in cooperation.”
4
5. Description Logics (DL)
• Logical formalism underpinning Web Ontology Language
(OWL), an ontology language for the Semantic Web;
• Family of logic-based knowledge representation languages,
• describe domain in terms of concepts, roles and
individuals;
• Characterized by formal semantics and provision of
inference services.
5
6. Reasoning over Description
Logics
• Draws conclusions that are not explicitly stated;
• Provides tools and services to help users:
• design and maintain high quality ontologies,
• answer queries over ontology classes and instances.
6 http://www.cs.man.ac.uk/~horrocks/Slides/lpar05.ppt
7. Problem
• Despite many optimization techniques implemented by DL
reasoners, it is easy to find ontologies where just few
reasoners can perform well.
• Major inefficiency sources can be due to:
• the high degree of non-determinism introduced by some
axioms,
• the interaction between language constructors,
• the construction of large models in memory.
7Baader et al, the description logic handbook
8. Connection Method (CM)
• Provides a general framework for automated deduction.
• CM has some interesting features for dealing with DL
knowledge bases:
• conservative use of memory,
• efficient search strategy,
• can utilize optimizations from tableau.
8W. Bibel, automated theorem proving
9. Goals
• Develop a practical implementation of a DL reasoner from
a first-order logic theorem prover based on the connection
method.
• Provide a mapping from DL axioms to the normal form used
by CM
• Translation rules: transformation from DL axioms to a
matricial representation
• Normalization: method to guarantee that a formula is in
the normal form
9
12. disjunctive normal form
• Atomic formulae or atoms are built from predicate symbols
and terms, e.g. P(a), P(s), Q(b).
• A literal, denoted by L, is either an atomic formula or a
negated atomic formula, e.g. P(a), ¬Q(b).
• A clause, denoted by C, takes the form L1 ⋀ … ⋀ Ln where
Li is a literal, e.g. P(a) ⋀ Q(b) ⋀ ¬Q(s).
• A formula in disjunctive normal form (DNF) or clausal form
has the form C1 ⋁ … ⋁ Cn where Ci is a clause.
• A formula in DNF can also be written as {C1,...,Cn} and is
called matrix.
12
13. Connection method (1/3)
• Given a formula in DNF,
!
!
!
• A path through a matrix M = {C1,...,Cn} is a set of occurrences of
literals, exactly one from each clause Ci ∈ M.
{P(x), Q(x), ¬P(c), R(c)}
{¬R(x), Q(x), ¬P(c), R(c)}
{P(x), ¬R(x), ¬P(c), R(c)}
{¬R(x), ¬R(x), ¬P(c), R(c)}
13
P(x)
¬R(x)
Q(x)
¬R(x)
¬P(c) R(c)
14. Connection method (2/3)
• A connection in a matrix is an unordered pair of occurrences of
complementary literals, i.e. {P(s1,...,sn),¬P(s1,...,sn)}. A path is said
to be complementary iff it contains a connection.
{P(x), Q(x), ¬P(c), R(c)}
{¬R(x), Q(x), ¬P(c), R(c)}
{P(x), ¬R(x), ¬P(c), R(c)}
{¬R(x), ¬R(x), ¬P(c), R(c)}
• A unification σ is a mapping from the set of variables to the set of
terms. In σ (L), all occurrences of a variable contained in the literal L
are substituted according to their mapping in σ.
σ (x) = c
14
15. Connection method (3/3)
• A formula is valid iff every path through its matrix
representation is complementary.
{P(x), Q(x), ¬P(c), R(c)}
{¬R(x), Q(x), ¬P(c), R(c)}
{P(x), ¬R(x), ¬P(c), R(c)}
{¬R(x), ¬R(x), ¬P(c), R(c)}
where σ (x) = c
15
16. Connection calculus (1/2)
16
Start rule (St) is the first rule to be applied in a proof search, then Reduction rule (Red)
and Extension Rule (Ext) are repeatedly applied until every branch reaches Axiom (Ax).
A formula M in disjunctive
normal form is valid in classical
logic iff there is a derivation for
“ε,M,ε” in the connection
calculus so all leaves are
axioms.
17. Connection calculus (2/2)
• Consider the formula M = {{P(x), ¬R(x)}, {Q(x), ¬R(x)},
{¬P(c)}, {R(c)}}. A proof for M in the connection calculus
with σ (x) = c is given below.
17
24. Description Logics (1/2)
• DL alphabet used in this presentation
• Letters A, B or camel case: Atomic concepts
• Letters C, D: Concept descriptions
• Letters a, b or lower case: Individuals
• Letters R,S or camel back case: Roles
• Concept descriptions are constructed as (limited to DL ALC):
C,D ::= A | ⊤ | ⊥ | C⨆D | C⨅D |¬C | ∃R.C | ∀R.C
• A TBox is a set of statements of the form C⊑D or C≡D, they are called general
concept inclusions (GCI).
• An ABox consists of statements of the form C(a) or R(a,b)
24
25. Description Logics (2/2)
ChildlessPerson ≡ Person ⨅ ¬Parent
(ChildlessPersons are exactly those who are persons and who are not parents)
Parent ≡ ∃hasChild.Person
(Parents are exactly those who have at least one child which is a Person)
25
26. DL Semantics (1/2)
• Semantics defined by interpretations
• An interpretation I = (ΔI, ∙I), where
• ΔI is the domain (a non-empty set)
• ∙I is an interpretation function that maps
• Atomic concept A to a set AI ⊆ ΔI
• Atomic role R to a binary relation RI ⊆ ΔI⨉ΔI
• Individual a to an element aI ⊆ ΔI
26
27. DL Semantics (2/2)
• Interpretation of complex concepts and roles follows from
the interpretation of the basic entities.
27
figure: examples of concept semantics
table 2.1
28. Reasoning tasks
• Subsumption checking: A concept C is subsumed by a
concept D (C⊑D) with respect toT if CI⊆DI for every model
I of T. In this case we write T ⊨ C⊑D.
• Classification: Use of subsumption checking to arrange
TBox concepts in a hierarchical way.
28more reasoning tasks can be found at dissertation
30. Translation
• We call translation the process of transform a description
logic axiom or concept descriptions into a matricial form.
• Given a query KB ⊨ α, all formulas in KB are negated and α
is transformed in its positive form. We can express this
query as a first-order logic formula ¬KB ⋁ α.
30
31. 31
ChildlessPerson(x)
[¬Person(x) Parent(x)]
For instance, the axiom
ChildlessPerson ⊑ Person ⨅ ¬Parent
can be expressed in FOL as
∀x ChildlessPerson(x) ⟶ Person(x) ∧ ¬Parent(x)
if it is in KB, we are interested in its negation:
¬(∀x ChildlessPerson(x) ⟶ Person(x) ∧ ¬Parent(x))
∃x ChildlessPerson(x) ∧ (¬Person(x) ⋁ Parent(x))
and then, in a matricial form:
32. Translation Rules (axioms)
28 3.3. TRANSLATION RULES
Name DL formula FOL mapping
DNF Negated Matrix
mapping
Concept inclusion C v D 8x : C(x) ! D(x)
C(x)
¬D(x)
Concept equality C ⌘ D 8x : C(x) $ D(x)
C(x) ¬C(y)
¬D(x) D(y)
Concept disjointness C v ¬D 8x : C(x) ! ¬D(x)
C(x)
D(x)
Concept assertion C(a) C(a)
⇥
¬C(a)
⇤
Negative concept
assertion
¬C(a) ¬C(a)
⇥
C(a)
⇤
Role inclusion R(a,b) v S(x,y)
8x,y : r(x,y) !
s(x,y)
r(x,y)
¬s(x,y)
Role equality R ⌘ S
8x,y : r(x,y) $
s(x,y)
r(x,y) ¬r(z,w)
¬s(x,y) s(z,w)
33. Translation Rules (axioms)
Concept assertion C(a) C(a)
⇥
¬C(a)
⇤
Negative concept
assertion
¬C(a) ¬C(a)
⇥
C(a)
⇤
Role inclusion R(a,b) v S(x,y)
8x,y : r(x,y) !
s(x,y)
r(x,y)
¬s(x,y)
Role equality R ⌘ S
8x,y : r(x,y) $
s(x,y)
r(x,y) ¬r(z,w)
¬s(x,y) s(z,w)
Role assertion R(a,b) r(a,b)
⇥
¬r(a,b)
⇤
Negative role
assertion
¬R(a,b) ¬r(a,b)
⇥
r(a,b)
⇤
Role domain 9R.> v C 8x,y : r(x,y) ! C(x)
r(x,y)
¬C(x)
Role range > v 8R.C 8x,y : r(x,y) ! C(y)
r(x,y)
¬C(y)
Reflexive role > v 9R.Sel f 8x : r(x,x)
⇥
¬r(x,x)
⇤
Irreflexive role > v ¬9R.Sel f 8x : ¬r(x,x)
⇥
r(x,x)
⇤
Transitive role Trans(R)
8x,y,z : r(x,y)^
r(y,z) ! r(x,z)
2
4
r(x,y)
r(y,z)
¬r(x,z)
3
5
Table 3.1: Tranlation rules for axioms
34. Translation Rules (concept
descriptors)
Name DL formula FOL mapping DNF Negated Matrix
mapping
RHS Intersection A v B1 uB2
8x : A(x) !
B1(x)^B2(x)
A(x) A(x)
¬B1(x) ¬B2(x)
LHS Intersection A1 uA2 v B
8x : A1(x)^A2(x) !
B(x)
2
4
A1(x)
A2(x)
¬B(x)
3
5
RHS local
reflexivity
A v 9R.Sel f 8x : A(x) ! r(x,x)
A(x)
¬r(x,x)
LHS local
reflexivity
9R.Sel f v A 8x : r(x,x) ! A(x)
r(x,x)
¬A(x)
RHS existential
restriction
A v 9R.B
8x : A(x) ! (9y :
r(x,y)^B(y))
A(x) A(x)
¬r(x, f(x)) ¬B(f(x))
LHS existential
restriction
9R.A v B
8x : (9y :
r(x,y)^A(y)) ! B(x)
2
4
A(x)
r(x,y)
3
5
35. Translation Rules (concept
descriptors)
mapping
RHS Intersection A v B1 uB2
8x : A(x) !
B1(x)^B2(x)
A(x) A(x)
¬B1(x) ¬B2(x)
LHS Intersection A1 uA2 v B
8x : A1(x)^A2(x) !
B(x)
2
4
A1(x)
A2(x)
¬B(x)
3
5
RHS local
reflexivity
A v 9R.Sel f 8x : A(x) ! r(x,x)
A(x)
¬r(x,x)
LHS local
reflexivity
9R.Sel f v A 8x : r(x,x) ! A(x)
r(x,x)
¬A(x)
RHS existential
restriction
A v 9R.B
8x : A(x) ! (9y :
r(x,y)^B(y))
A(x) A(x)
¬r(x, f(x)) ¬B(f(x))
LHS existential
restriction
9R.A v B
8x : (9y :
r(x,y)^A(y)) ! B(x)
2
4
A(x)
r(x,y)
¬B(y)
3
5
RHS universal
restriction
A v 8R.B
8x : A(x) ! (8y :
r(x,y) ! B(y))
2
4
A(x)
r(x,y)
¬B(y)
3
5
LHS universal
restriction
8R.A v B
8x : (8y : r(x,y) !
A(y)) ! B(x)
¬r(x, f(x)) A(f(x))
¬B(x) ¬B(x)
Table 3.2: Tranlation rules for concept descriptors
36. Normalization (1/2)
• Some axioms can’t be direct mapped into clausal form using
the translation rules
• Normalization is the process of transforming a non-clausal
matrix into a clausal matrix
34
37. for instance, the axiom A⊑B⨆¬C⨆(¬D⨅E)⨆(F⨅¬G⨅H) can
generate the non-clausal matrix
A
¬B
C
[D ¬E]
[¬F G ¬H]
A
¬B
C
N1
N2
There are several approaches to normalize this matrix,
¬N1
D
¬N1
¬E
¬N2
¬F
¬N2
G
¬N2
¬H
A
¬B
C
D
¬F
A
¬B
C
¬E
G
A
¬B
C
D
¬H
A
¬B
C
¬E
¬F
A
¬B
C
D
G
A
¬B
C
¬E
¬H
35
41. Parser
• Takes an ontology and builds a data structure representing
the knowledge base
• Can be reused in other systems written in Prolog
• Can be extended to include new axioms
• Supports ontologies written in OWL 2 Functional-Style
syntax
39
43. Query resolver
• Assemble queries in the format KB ⊨ α to the theorem
prover, where α is a new axiom.
41
For instance, suppose the following KB:
Person⊑Man⨆Woman
Man⊑¬Woman
We want classify this KB. The new concept inclusions can be
obtained by trying to proof KB ⊨ α, with α ∈ {Man⊑Person,
Woman⊑Person, Man⊑Woman, Woman⊑Man, Person⊑Man,
Person⊑Woman}
44. Modified leanCoP
• We optimized the use of knowledge base database to reuse
all axioms in different queries;
• Start clause C is chosen from α, in KB ⊨ α, and the method
does not backtrack for the start clause.
42
45. Normalization
• Module responsible for guarantees that a formula is in
clausal form;
• We are using the second approach shown in slide 25.
43
46. Skolemization
• This module is responsible for adding skolem functions to
formulas.
• A function is generated for each skolem function and takes
the form fn(x), where n is an integer.
• For instance, the axiom A ⊑ ∃R.B ⨅ ∃S.C is mapped to:
44
A(x)
¬r(x, f1(x))
A(x)
¬B(f1(x))
A(x)
¬C(f2(x))
A(x)
¬s(x, f2(x))
47. Performance
• In order to compare our system to a state-of-the-art reasoner and evaluate
our results, we selected three ontologies to classify and compete against
ELK, a consequence-based reasoner winner of the ORE 2013 competition.
!
!
!
!
!
!
• The result of the benchmark shows that a naïve implementation without
optimizations can’t compete with a modern reasoner;
• New axioms derived from the classification are correct when them only need
axioms included in DL ALC.
45
49. Contributions
• Implementation of a DL reasoner based on connection
method that can be easily extended and modified for
experimenting reasoning over description logics.
• Normalization procedures independent of concept inclusion
side.
• Translation rules for all axioms of OWL 2 (DL SROIQ).
47
50. Open Work
• Finish the development of leanCoR:
• Execution of all reasoning tasks supported by modern
reasoners;
• Support more expressive DL languages, such as
SROIQ.
48
51. Future Work
• Incorporate all optimizations of the state-of-the-art
reasoners to truly compare the connection calculus
performance to other proof procedures.
• Develop implementations in languages with more features
for concurrency such as erlang and go.
49