You are on page 1of 33

A set-based reasoner for the description logic

DL4,×
D

Domenico Cantone, Marianna Nicolosi-Asmundo,


Daniele Francesco Santamaria

Deparment of Mathematics and Computer Science, University of Catania

SETS 2018 - Southampton, June 5, 2018


Introduction Preliminaries The Reasoner Conclusions References

Introduction

Computable set theory as (web) knowledge representation and


reasoning framework.
The set-theoretic fragment 4LQSR
DL . 4,×
D

DL4,× R
D : a description logic representable in 4LQSDL . 4,×
D

A C++ reasoner for DL4,×


D .
Conclusions.
Introduction Preliminaries The Reasoner Conclusions References

Some results

MLSS×
2,m , (Cantone, Longo, Nicolosi-Asmundo 2010).
DLhMLSS×
2,m i , (Cantone, Longo, Pisasale 2010).
DLh∀π0,2 i , (Cantone, Longo, Nicolosi-Asmundo 2011).
DLh∀π0,2 i + metamodelling, (Cantone, Longo 2014).
DL4D , (Cantone, Longo, Nicolosi-Asmundo, Santamaria
2015).
DL4,×
D and the Conjunctive Query Answering problem
(Cantone, Nicolosi-Asmundo, Santamaria 2016).
DL4,×
D and the Higher-Order CQA problem (Cantone,
Nicolosi-Asmundo, Santamaria 2017).
Prototype of a DL4,×
D reasoner (Cantone, Nicolosi-Asmundo,
Santamaria 2017).
Introduction Preliminaries The Reasoner Conclusions References

This work

Improved variant of the KE-tableau for


the consistency problem for DL4,×
D -KBs and for
the HOCQA problem for DL4,× D .
C++ Implementation of a DL4,×D reasoner based on an
improved variant of the KE-tableau.
First benchmarking with:
Previous implementation.
First Order KE-tableau.
Introduction Preliminaries The Reasoner Conclusions References

Set-theoretic fragment

Syntax of 4LQSRDL 4,×


D

The fragment 4LQSR


DL . 4,×
D

(i) variables of sort 0: x, y , z, . . .


(ii) variables of sort 1: X 1 , Y 1 , Z 1 , . . .
(iii) variables of sort 3: X 3 , Y 3 , Z 3 . . .

Predicate symbols “ = ” and “ ∈ ”


Pairing operator “h·, ·i”
4LQSR
DL -literals (atomic formulae or their negations)
4,×
D

level 0: x = y , x ∈ X 1 , hx, y i ∈ X 3 ,
¬(x = y ), ¬(x ∈ X 1 ), ¬(hx, y i ∈ X 3 ).
Introduction Preliminaries The Reasoner Conclusions References

Set-theoretic fragment

Syntax of 4LQSRDL 4,×


D

4LQSR
DL - purely universally quantified formulae
4,×
D

level 1: (∀z1 ) . . . (∀zn )ϕ0 , ϕ0 propositional combination of


(level 0) literals;

4LQSRDL -formulae: propositional combinations of (level 0) literals


4,×
D

and of purely universally quantified formulae of level 1.


Introduction Preliminaries The Reasoner Conclusions References

Set-theoretic fragment

Semantics
A 4LQSR DL -interpretation M = (D, M):
4,×
D

MX 0 ∈ D,
MX 1 ∈ pow(D),
MX 3 ∈ pow(pow(pow(D))),
where X i ∈ Vari , for i = 0, 1, 3, and pow(s) the powerset of s.
Pair terms are interpreted à la Kuratowski:
Mhx, y i =Def {{Mx}, {Mx, My }}.
M |= ϕ is recursively defined over the structure of ϕ:
Literals are evaluated in a standard way.
Compound formulae: standard rules of propositional logic.
u ] |= ϕ0 , for all u~ ∈ D n .
M |= (∀z1 ) . . . (∀zn )ϕ0 iff M[~z /~
If M |= ϕ, then M a 4LQSR DL -model for ϕ.
4,×
D

A 4LQSDL -formula is s.t.b satisfiable if it has a 4LQSR


R
4,×
D
DL -model.
4,×
D
R R
A 4LQSDL -formula is valid if satisfied by all 4LQSDL -
4,×
D
4,×
D

interpretations.
Introduction Preliminaries The Reasoner Conclusions References

4,×
DLD

The Description Logic DL4,×


D

Existential quantification and at-least number restriction


(resp., universal quantification and at-most number
restriction) only on the left- (resp., right-) hand side of
inclusion axioms.
More liberal than SROIQ(D) in:
construction of role inclusion axioms (roles involved not
subject to any ordering relationship),
simple roles are not needed to define role inclusion axioms and
axioms involving number restrictions,
Boolean operators on roles are admitted.
The consistency problem for DL4,×D -KBs and the problem of
4,×
Higher-Order Conjunctive Query Answering for DLD are
decidable in view of the decidability of the satisfiability
problem for 4LQSR DL -formulae.
4,×
D

HOCQA via a variant of the KE-tableau system.


Introduction Preliminaries The Reasoner Conclusions References

4,×
DLD

RA , RD , C, and Ind be denumerable pairwise disjoint sets of


abstract role names, concrete role names, concept names, and
individual names, respectively. A DL4,×
D -RBox, -TBox, and -ABox
are respectively:
R1 ≡ R2 , R1 v R2 , R1 . . . Rn v Rn+1 , Sym(R1 ), Asym(R1 ),
Ref(R1 ), Irref(R1 ), Dis(R1 , R2 ), Tra(R1 ), Fun(R1 ),
R1 ≡ C1 × C2 , P1 ≡ P2 , P1 v P2 , Dis(P1 , P2 ), Fun(P1 ).
C1 ≡ C2 , C1 v C2 , C1 v ∀R.C2 , ∃R.C1 v C2 , ≥nR.C1 v C2 ,
C1 v ≤nR.C2 ,t1 ≡ t2 , t1 v t2 , C1 v ∀P.t1 , ∃P.t1 v C1 ,
≥nP.t1 v C1 , C1 v ≤nP.t1 ,
a : C1 ,(a, b) : R1 ,a = b, a 6= b, ed : t1 , (a, ed ) : P1 .
with C1 a DL4,×
D -concept term, d a datatype, t1 a datatype term,
R1 a DLD -abstract role term, P1 a DL4,×
4,×
D -concrete role term, a, b
individual names, and ed a constant in NC (d).
Introduction Preliminaries The Reasoner Conclusions References

4,×
DLD

Semantics of terms of DL4,×


D

Name Syntax Semantics


concept A AI ⊆ ∆I
ab. (resp., cn.) rl. R (resp., P ) R I ⊆ ∆I × ∆I (resp., P I ⊆ ∆I × ∆D )
individual a a I ∈ ∆I
nominal {a} {a}I = {aI }
dtype (resp., ng.) d (resp., ¬d) d D ⊆ ∆D (resp., ∆D \ d D )
negative datatype term ¬t1 (¬t1 )D = ∆D \ t1D
datatype terms
intersection
t1 u t2 (t1 u t2 )D = t1D ∩ t2D
datatype terms union t1 t t2 (t1 t t2 )D = t1D ∪ t2D
constant in NC (d) ed edD ∈ d D
data range {ed1 , . . . , edn } {ed1 , . . . , edn }D = {edD } ∪ . . . ∪ {edD }
1 n
data range ψd ψdD
data range ¬dr ∆D \ dr D
top (resp., bot.) > (resp., ⊥ ) ∆I (resp., ∅)
negation ¬C (¬C )I = ∆I \ C
conj. (resp., disj.) C u D (resp., C t D) (C u D)I = C I ∩ D I (resp., (C t D)I = C I ∪ D I )
valued exist.
quantification
∃R.a (∃R.a)I = {x ∈ ∆I : hx, aI i ∈ R I }
datatyped exist. quantif. ∃P.ed (∃P.ed )I = {x ∈ ∆I : hx, edD i ∈ P I }
self concept ∃R.Self (∃R.Self )I = {x ∈ ∆I : hx, xi ∈ R I }
nominals {a1 , . . . , an } {a1 , . . . , an }I = {a1I } ∪ . . . ∪ {anI }
Introduction Preliminaries The Reasoner Conclusions References

4,×
DLD

Semantics of terms of DL4,×


D

Name Syntax Semantics


universal role U (U)I = ∆I × ∆I
inverse role R− (R − )I = {hy , xi | hx, y i ∈ R I }
concept cart. prod. C1 × C2 (C1 × C2 )I = C1I × C2I
abstract role complement ¬R (¬R)I = (∆I × ∆I ) \ R I
abstract role union R1 t R2 (R1 t R2 )I = R1I ∪ R2I
abstract role intersection R1 u R2 (R1 u R2 )I = R1I ∩ R2I
abstract role domain restr. RC | (RC | )I = {hx, y i ∈ R I : x ∈ C I }
concrete role complement ¬P (¬P)I = (∆I × ∆D ) \ P I
concrete role union P1 t P2 (P1 t P2 )I = P1I ∪ P2I
concrete role intersection P1 u P2 (P1 u P2 )I = P1I ∩ P2I
concrete role domain restr. PC | (PC | )I = {hx, y i ∈ P I : x ∈ C I }
concrete role range restr. P|t (P|t )I = {hx, y i ∈ P I : y ∈ t D }
concrete role restriction PC |t (PC |t )I = {hx, y i ∈ P I : x ∈ C1I ∧ y ∈ t D }
1 1
Introduction Preliminaries The Reasoner Conclusions References

4,×
DLD

Semantics of axioms and assertions of DL4,×


D -KB

Name Syntax Semantics


concept subsum. C1 v C2 I |=D C1 v C2 ⇐⇒ C1I ⊆ C2I
ab. role subsum. R1 v R2 I |=D R1 v R2 ⇐⇒ R1I ⊆ R2I
role incl. axiom R1 . . . Rn v R I |=D R1 . . . Rn v R ⇐⇒ R1I ◦ . . . ◦ RnI ⊆ R I
cn. role subsum. P1 v P2 I |=D P1 v P2 ⇐⇒ P1I ⊆ P2I
symmetric role Sym(R) I |=D Sym(R) ⇐⇒ (R − )I ⊆ R I
asymmetric role Asym(R) I |=D Asym(R) ⇐⇒ R I ∩ (R − )I = ∅
transitive role Tra(R) I |=D Tra(R) ⇐⇒ R I ◦ R I ⊆ R I
disj. ab. role Dis(R1 , R2 ) I |=D Dis(R1 , R2 ) ⇐⇒ R1I ∩ R2I = ∅
reflexive role Ref(R) I |=D Ref(R) ⇐⇒ {hx, xi | x ∈ ∆I } ⊆ R I
irreflexive role Irref(R) I |=D Irref(R) ⇐⇒ R I ∩ {hx, xi | x ∈ ∆I } = ∅
func. ab. role Fun(R) I |=D Fun(R) ⇐⇒ (R − )I ◦ R I ⊆ {hx, xi | x ∈ ∆I }
disj. cn. role Dis(P1 , P2 ) I |=D Dis(P1 , P2 ) ⇐⇒ P1I ∩ P2I = ∅
I |=D Fun(p) ⇐⇒ hx, y i ∈ P I and hx, zi ∈
func. cn. role Fun(P)
P I imply y = z
datatype terms
equivalence
t1 ≡ t2 I |=D t1 ≡ t2 ⇐⇒ t1D = t2D
datatype terms subsum. t1 v t2 I |=D (t1 v t2 ) ⇐⇒ t1D ⊆ t2D
concept assertion a : C1 I |=D a : C1 ⇐⇒ (aI ∈ C1I )
agreement a=b I |=D a = b ⇐⇒ aI = b I
ab. role asser. (a, b) : R I |=D (a, b) : R ⇐⇒ haI , b I i ∈ R I
cn. role asser. (a, ed ) : P I |=D (a, ed ) : P ⇐⇒ haI , edD i ∈ P I
Introduction Preliminaries The Reasoner Conclusions References

Overview

Overview
Introduction Preliminaries The Reasoner Conclusions References

Phase I

Example

Phase I: reading a compatible OWL ontology.


Introduction Preliminaries The Reasoner Conclusions References

Phase I

Details

A suitable mapping function θ is applied to KB thus yielding


the 4LQSR DL representation φKB of KB. θ maps injectively:
4,×
D

Individuals a, constants ed ∈ NC (d), ind. variables w ∈ Vi ,


and dat. variables u ∈ Ve into sort 0 variables xa , xed , xw , xu ,
the constant concepts > and ⊥, datatype terms t, concept
terms C , conc. variables c ∈ Vc , and da.t. variables t ∈ Vd
into sort 1 variables X>1 , X⊥1 , Xt1 , XC1 , Xc1 , Xt1 respectively,
the universal relation U, abstract role terms R, concrete role
terms P, ab. role variables r ∈ Var , and concrete role variable
p ∈ Vcr into sort 3 variables XU3 , XR3 , XP3 , Xr3 , Xp3 , respectively.
Vi , Ve , Vd , Vc , Var , and Vcr are pairwise disjoint
S denumerable
infinite sets of variables disjoint from Ind, {NC (d) : d ∈ ND }, C,
RA , and RD (introduced to map query variables).
Introduction Preliminaries The Reasoner Conclusions References

Phase I

φKB is a conjunction of literals and of formulae of type


(∀z1 ) . . . (∀zn )ϕ0 , with ϕ0 clause (universal quantifiers moved
as inward as possible, and quantified variables renamed as to
be pairwise distinct).

Example:

KB = {¬Mother (Eva, Ann), Relative(Ann, Ann),


Relative(Eva, Eva), Mother v Relative}

3
φKB =Def ¬(hxEva , xAnn i ∈ XMother )∧
3 3
hxAnn , xAnn i ∈ XRelative ∧ hxEva , xEva i ∈ XRelative ∧
3 3
(∀z1 )(∀z2 )(¬(hz1 , z2 i ∈ XMother ) ∨ hz1 , z2 i ∈ XRelative )
Introduction Preliminaries The Reasoner Conclusions References

Phase I

Phase I: Example
Phase I: computing the internal representation of φKB
Introduction Preliminaries The Reasoner Conclusions References

Phase II

KEγ -tableau

KEγ -tableau is a variant of KE-tableau system. The


KE-elimination and γ-rule are incorporated in a rule called
Eγ -rule and applied to universally quantified formulae.
A branch ϑ of a KEγ -tableau T is closed if either it contains
both A and ¬A, for some formula A, or a literal of type
¬(x = x). Otherwise, the branch is open.
A KEγ -tableau is closed if all its branches are closed.
Introduction Preliminaries The Reasoner Conclusions References

Phase II

A formula ψ = (∀x1 ) . . . (∀xm )(β1 ∨ . . . ∨ βn ) is fulfilled in a


branch ϑ, if ϑ contains βi τ for some i = 1, . . . , n and for all τ .
A branch ϑ is fulfilled if every formula
ψ = (∀x1 ) . . . (∀xm )(β1 ∨ . . . ∨ βn ) occurring in ϑ is fulfilled.
A KEγ -tableau is fulfilled if all its branches are fulfilled.
A branch ϑ is complete if either it is closed or it is open,
fulfilled, and it does not contain any literal of type x = y ,
with x and y distinct variables.
A KEγ -tableau is complete (resp., fulfilled) if all its branches
are complete (resp., fulfilled or closed).
TKB is expanded by systematically applying the Eγ -rule and
the PB-Rule to purely universally quantified formulae until
they are fulfilled.
Introduction Preliminaries The Reasoner Conclusions References

Phase II

Expansion rules

ψ S βi τ γ
E -rule PB-rule
βi τ A | A
where where A is a literal
ψ = (∀x1 ) . . . (∀xm )(β1 ∨ . . . ∨ βn ),
τ := {x1 /xo1 . . . xm /xom },
and S β i τ = Def {β 1 τ, ..., β n τ } \
{β i τ }, for i = 1, ..., n
τ is a substitution from QVar0 (ψ) = {x1 , . . . , xm } (the set of
quantified variables occurring in ψ) to Var0 (ϑ) (the set of variables
of sort 0 occurring free in ϑ).
Introduction Preliminaries The Reasoner Conclusions References

Phase II

Example

3
¬(hxEva , xAnn i ∈ XMother )

3
hxAnn , xAnn i ∈ XRelative

3
hxEva , xEva i ∈ XRelative

3 3
(∀z1 )(∀z2 )(¬(hz1 , z2 i ∈ XMother ) ∨ hz1 , z2 i ∈ XRelative )

PB-Rule
3 3
¬(hxAnn , xEva i ∈ XMother ) hxAnn , xEva i ∈ XMother
Complete (Open) Eγ -Rule
3
hxAnn , xEva i ∈ XRelative
Complete (Open)
Introduction Preliminaries The Reasoner Conclusions References

Phase II
Introduction Preliminaries The Reasoner Conclusions References

Phase II

If there are formulae of type x = y , the equivalence class of x


and y is computed for each open and complete branch.
Checking for inconsistency.

KB 2 = ({Person(Ann), Person(Paul), Person(John), Person(Carl),


Annet 6= Ann, Ann = Anna, Paul = Paolo, Carl = Carlo})
Introduction Preliminaries The Reasoner Conclusions References

Phase II

TKB2 . Equivalence classes for TKB2 .


Introduction Preliminaries The Reasoner Conclusions References

Phase III

Higher-Order Conjunctive Queries

The reasoner is now ready to evaluate queries.


In particular,Higher-Order Conjunctive Queries.
An HO DL4,× D -conjunctive query admits variables of three
sorts: individual and data type variables, concept variables,
and role variables.
An HO-DL4,× D -conjunctive query is a conjunction of
4,×
HO-DLD -literals.
R(w1 , w2 ), P(w1 , u), C (w1 ), t(u), r(w1 , w2 ), p(w1 , u), c(w1 ),
t(u), w1 = w2 .
and their negations.
S
where w1 , w2 ∈ Vi ∪ Ind, u ∈ Ve ∪ {NC (d) : d ∈ ND }, R is
a DL4,× 4,×
D -abstract role term, P is a DLD -concrete role term,
C is a DL4,× 4,×
D -concept term, t is a DLD -datatype term,
r ∈ Var , p ∈ Vcr , c ∈ Vc , t ∈ Vd .
Introduction Preliminaries The Reasoner Conclusions References

Phase III

Substitution
σ =Def {v1 /o1 , . . . , vn /on , e1 /ed1 , . . . , eg /edg , t1 /t1 , . . . , tl /tl ,
c1 /C1 , . . . , cm /Cm , r1 /R1 , . . . , rk /Rk , p1 /P1 , . . . , ph /Ph }
A substitution σ involving exactly the variables occurring in Q
4,×
is a solution for Q w.r.t. KB, if there exists a DLD -
interpretation I such that I |=D KB and I |=D Qσ.
The collection Σ of the solutions for Q w.r.t. KB is the
Higher-Order Answer Set of Q w.r.t. KB. Then the
higher-order conjunctive query answering problem for Q w.r.t.
KB consists in finding the HO answer set Σ of Q w.r.t. KB.
Let φ be a 4LQSR DL -formula and let ψ be a conjunction of
4,×
D
R
4LQSDL -literals. The HOCQA problem for ψ w.r.t. φ
4,×
D

consists in computing the HO answer set of ψ w.r.t. φ,


namely the collection Σ0 of all the substitutions σ 0 such that
M |= φ ∧ ψσ 0 , for some 4LQSR DL -interpretation M.
4,×
D
Introduction Preliminaries The Reasoner Conclusions References

Phase III

ϑ is extended to DL4,×
D -HO literals:

θ(R(w1 , w2 )) =Def hxw1 , xw2 i ∈ XR3 ,


θ(P(w1 , u)) =Def hxw1 , xu i ∈ XP3 ,
θ(C (w1 )) =Def xw1 ∈ XC1 ,
θ(t(u)) =Def xu ∈ Xt1
θ(w1 = w2 ) =Def xw1 = xw2 ,
θ(c(w1 )) =Def xw1 ∈ Xc1 ,
θ(r(w1 , w2 )) =Def hxw1 , xw2 i ∈ Xr3 ,
θ(p(w1 , u)) =Def hxw1 , xu i ∈ Xp3 .
θ(t(u)) =Def xu ∈ Xt1

to HO-conjunctive queries and to substitutions in a standard way.


Introduction Preliminaries The Reasoner Conclusions References

Phase III

Phase III: Example

3
¬(hxEva , xAnn i ∈ XMother )

3
hxAnn , xAnn i ∈ XRelative

3
hxEva , xEva i ∈ XRelative

3
(∀z1 )(∀z2 )(¬(hz1 , z2 i ∈ XMother 3
) ∨ hz1 , z2 i ∈ XRelative )

PB-Rule
3
¬(hxAnn , xEva i ∈ XMother ) 3
hxAnn , xEva i ∈ XMother
Complete (Open)
Eγ -Rule
3
h, hxz , xEva i ∈ XMother i
3
hxAnn , xEva i ∈ XRelative
h, λi
Complete (Open)
3
h, hxz , xEva i ∈ XMother i
h{xz /xAnn }, λi
Introduction Preliminaries The Reasoner Conclusions References

Phase III
Introduction Preliminaries The Reasoner Conclusions References

Phase III

n
ΦKB =Def xa ∈ XD1 , xb ∈ XD1 , xc ∈ XD1 , xd ∈ XD1 , (∀z)(∀z1 )
o
(z ∈ XA1 ∧ hz, z1 i ∈ XP3 ∧ z1 ∈ XB1 ∧ hz, z1 i ∈ XP31 ) → z1 ∈ XC1 .

ΦKB generates more than 106


Introduction Preliminaries The Reasoner Conclusions References

Future Works

More OWL serializations.


More expressiveness.
Ontology classification.
Datatype reasoning.
Plug-in for Protégé.
Ontologies expressible in 4LQS R .
Introduction Preliminaries The Reasoner Conclusions References

References

D. Cantone and M. Nicolosi Asmundo. On the satisfiability problem for a


4-level quantified syllogistic and some applications to modal logic.
Fundamenta Informaticae, 124(4):427–448, 2013.
D. Cantone, M. Nicolosi-Asmundo, and D. F. Santamaria. A set-theoretic
approach to ABox reasoning services. In Costantini S., Franconi E., Van
Woensel W., Kontchakov R., Sadri F., Roman D. Rules and Reasoning.
RuleML+RR 2017, Lecture Notes in Computer Science, vol 10364.
Springer, 2017.
D. Cantone and M. Nicolosi-Asmundo and D. F. Santamaria. A C++
×
reasoner for the description logic DL4,
D . Proceedings of CILC 2017,
26-29 September 2017, Naples, Italy. CEUR WS, ISSN 1613-0073, Vol.
1949, pp. 276-280.
D. Cantone, M. Nicolosi-Asmundo, and D. F. Santamaria. An optimized
×
KE-tableau-based system for reasoning in the description logic DL4,
D .
Submitted.
Introduction Preliminaries The Reasoner Conclusions References

Thank you

You might also like