Ontology-Mediated Query Answering over Temporal Ontologies
Alessandro Artale
Faculty of Computer Science, Free University of Bozen-Bolzano, Italy
Joint work with
- R. Kontchakov, A. Kovtunova, V. Ryzhikov, F. Wolter, M. Zakharyaschev
Ontology-Mediated Query Answering over Temporal Ontologies - - PowerPoint PPT Presentation
Ontology-Mediated Query Answering over Temporal Ontologies Alessandro Artale Faculty of Computer Science, Free University of Bozen-Bolzano, Italy Joint work with R. Kontchakov, A. Kovtunova, V. Ryzhikov, F. Wolter, M. Zakharyaschev Hybrid
turbine Id dateTime activePower rotorSpeed mainFlame . . . . . . t03 2015-04-04 12:20:48 2 1550 t03 2015-04-04 12:20:49 1.8 1400 null t01 2015-04-04 12:20:52 1.7 1350 1 . . .
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 1
turbine Id dateTime activePower rotorSpeed mainFlame . . . . . . t03 2015-04-04 12:20:48 2 1550 t03 2015-04-04 12:20:49 1.8 1400 null t01 2015-04-04 12:20:52 1.7 1350 1 . . .
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 1
turbine Id dateTime activePower rotorSpeed mainFlame . . . . . . t03 2015-04-04 12:20:48 2 1550 t03 2015-04-04 12:20:49 1.8 1400 null t01 2015-04-04 12:20:52 1.7 1350 1 . . .
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 1
(from Norwegian Petroleum Directorate’s FactPages)
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 2
(from Norwegian Petroleum Directorate’s FactPages)
SELECT DISTINCT cores.wlbName, cores.lenghtM, wellbore.wlbDrillingOperator, wellbore.wlbCompletionYear FROM ( (SELECT wlbName, wlbNpdidWellbore, (wlbTotalCoreLength * 0.3048) AS lenghtM FROM wellbore core WHERE wlbCoreIntervalUom = ’[ft ]’ ) UNION (SELECT wlbName, wlbNpdidWellbore, wlbTotalCoreLength AS lenghtM FROM wellbore core WHERE wlbCoreIntervalUom = ’[m ]’ ) ) as cores, ( (SELECT wlbNpdidWellbore, wlbDrillingOperator, wlbCompletionYear FROM wellbore development all UNION (SELECT wlbNpdidWellbore, wlbDrillingOperator, wlbCompletionYear FROM wellbore exploration all ) UNION (SELECT wlbNpdidWellbore, wlbDrillingOperator, wlbCompletionYear FROM wellbore shallow all ) ) as wellbore WHERE wellbore.wlbNpdidWellbore = cores.wlbNpdidWellbore
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 2
(from Norwegian Petroleum Directorate’s FactPages)
SELECT DISTINCT cores.wlbName, cores.lenghtM, wellbore.wlbDrillingOperator, wellbore.wlbCompletionYear FROM ( (SELECT wlbName, wlbNpdidWellbore, (wlbTotalCoreLength * 0.3048) AS lenghtM FROM wellbore core WHERE wlbCoreIntervalUom = ’[ft ]’ ) UNION (SELECT wlbName, wlbNpdidWellbore, wlbTotalCoreLength AS lenghtM FROM wellbore core WHERE wlbCoreIntervalUom = ’[m ]’ ) ) as cores, ( (SELECT wlbNpdidWellbore, wlbDrillingOperator, wlbCompletionYear FROM wellbore development all UNION (SELECT wlbNpdidWellbore, wlbDrillingOperator, wlbCompletionYear FROM wellbore exploration all ) UNION (SELECT wlbNpdidWellbore, wlbDrillingOperator, wlbCompletionYear FROM wellbore shallow all ) ) as wellbore WHERE wellbore.wlbNpdidWellbore = cores.wlbNpdidWellbore
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 2
(the Romans ≈ 2007)
SELECT DISTINCT ?unit ?well WHERE { [] npdv:stratumForWellbore ?wellboreURI ; npdv:inLithostratigraphicUnit [ npdv:name ?unit ] . ?wellboreURI npdv:name ?well . ?core a npdv:WellboreCore ; npdv:coreForWellbore ?wellboreURI . }
[] rdf:type rr:TriplesMap; rr:logicalTable "select * from wellbore core"; rr:subjectMap [ a rr:TermMap; rr:template "&npd-v2;wellbore/{wlbNpdidWellbore}/";]; rr:propertyObjectMap [ rr:property npdv:coreIntervalBottom; rr:column "wlbCoreIntervalBottom" ]; ...
ProductionWellbore Wellbore WellboreStratum stratumForWellbore WellboreCore coreForWellbore ∪ CREATE TABLE wellbore core ( wlbName varchar(60) NOT NULL, wlbCoreNumber int(11) NOT NULL, wlbCoreIntervalTop decimal(13,6), ... ) A B C D 1 2 3 4 5
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 3
(the Romans ≈ 2007)
SELECT DISTINCT ?unit ?well WHERE { [] npdv:stratumForWellbore ?wellboreURI ; npdv:inLithostratigraphicUnit [ npdv:name ?unit ] . ?wellboreURI npdv:name ?well . ?core a npdv:WellboreCore ; npdv:coreForWellbore ?wellboreURI . }
[] rdf:type rr:TriplesMap; rr:logicalTable "select * from wellbore core"; rr:subjectMap [ a rr:TermMap; rr:template "&npd-v2;wellbore/{wlbNpdidWellbore}/";]; rr:propertyObjectMap [ rr:property npdv:coreIntervalBottom; rr:column "wlbCoreIntervalBottom" ]; ...
ProductionWellbore Wellbore WellboreStratum stratumForWellbore WellboreCore coreForWellbore ∪ CREATE TABLE wellbore core ( wlbName varchar(60) NOT NULL, wlbCoreNumber int(11) NOT NULL, wlbCoreIntervalTop decimal(13,6), ... ) A B C D 1 2 3 4 5
reduction to DB query evaluation
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 3
turbine Id dateTime activePower rotorSpeed mainFlame . . . . . . t03 2015-04-04 12:20:48 2 1550 t03 2015-04-04 12:20:49 1.8 1400 null t01 2015-04-04 12:20:52 1.7 1350 1 . . .
[60s,63s] ⊟[0,10s] ActivePowerAbove1.5(x)
find turbines x and moments t when x had an active power trip
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 4
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 5
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 5
Fλ
Pλ
where Ai are Atomic propositions
F✷ P (λ1 ⊓ · · · ⊓ λk ⊑ λn+1 ⊔ · · · ⊔ λn+m)
bool Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 6
F and U
FB
krom as
FU ⊑ ⊥, ¬U ⊑ B
for a fresh U
horn Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 7
F and U
FB
krom as
FU ⊑ ⊥, ¬U ⊑ B
for a fresh U
horn
FA ⊑ B
core as
PB
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 7
F and U
FB
krom as
FU ⊑ ⊥, ¬U ⊑ B
for a fresh U
horn
FA ⊑ B
core as
PB
bool as
FC,
FC ⊔ F(B ⊓ U)
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 7
F and U
FB
krom as
FU ⊑ ⊥, ¬U ⊑ B
for a fresh U
horn
FA ⊑ B
core as
PB
bool as
FC,
FC ⊔ F(B ⊓ U)
bool as
F(U ⊓ B) ⊑ U, U ⊑ A
P and S.
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 7
c clauses c ∈ {bool, horn, krom, core}, o ∈ {✷, , ✷}
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 8
1 2 3 4
5 6
7 8 9 10
FPublished,
P(Accepted ⊓ FPublished),
P(Submitted ⊓ FAccepted),
PAccepted ⊓ ✸ FAccepted ⊑ Accepted.
PSubmitted ⊓ ✸ FSubmitted ⊑ Submitted.
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 9
d
DEX−
d
krom Ontology:
PTopManager.
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 10
∗, ✷
F, ✷ P, F, P
∗, ✷
F, ✷ P
∗,
F, P
∗
α
α
∗
✷ α
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 11
c ontology-mediated query (OMQ) is a pair q = (O, κ)
c ontology and
F, ✸ F, ✷ F, P, ✸ P, ✷ P} and op2 ∈ {U, S}
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 12
c ontology-mediated query (OMQ) is a pair q = (O, κ)
c ontology and
F, ✸ F, ✷ F, P, ✸ P, ✷ P} and op2 ∈ {U, S}
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 12
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 13
(alternative query language: conjunctive queries with temporal operators)
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 13
1 2 3 4
5 6
7 8 9 10
PSubmitted
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 14
1 2 3 4
5 6
7 8 9 10
PSubmitted
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 14
1 2 3 4
5 6
7 8 9 10
PSubmitted
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 14
1 2 3 4
5 6
7 8 9 10
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 15
1 2 3 4
5 6
7 8 9 10
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 15
1 2 3 4
5 6
7 8 9 10
15
FOdd, Odd ⊑ FEven },
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 16
FOdd, Odd ⊑ FEven },
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 16
FOdd, Odd ⊑ FEven },
t − s = 2n stands for ∃k
16
FOdd, Odd ⊑ FEven },
t − s = 2n stands for ∃k
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 16
F A, B → 3 F B }, κ = ✸ F(A ⊓ B)
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 17
F A, B → 3 F B }, κ = ✸ F(A ⊓ B)
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 17
F A, B → 3 F B }, κ = ✸ F(A ⊓ B)
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 17
FBk ⊑ Bk, A1 ⊓ FBk ⊑ B1−k | k = 0, 1}, κ = B0
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 18
FBk ⊑ Bk, A1 ⊓ FBk ⊑ B1−k | k = 0, 1}, κ = B0
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 18
FBk ⊑ Bk, A1 ⊓ FBk ⊑ B1−k | k = 0, 1}, κ = B0
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 18
α
α
α
α
bool OMQs are MSO(<)-rewritable
(B¨ uchi’60, Elgot’62, Trakhtenbrot’62)
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 19
α
α
α
α
bool OMQs are MSO(<)-rewritable
(B¨ uchi’60, Elgot’62, Trakhtenbrot’62)
krom, LTL
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 19
(using unary automata)
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 20
PB, ✷ PB ⊑ A }
(using partially-ordered automata)
A B C ✷
P B
A B ✷
P B
A ✷
P B
A C ✷
P B
A B B A ∅ A AC ABC AB AB AB
AB ABC ABC AB AB B A B AB A A AB B
FC ∈ S iff C, ✷ FC ∈ S′,
PC ∈ S′ iff C, ✷ PC ∈ S.
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 21
PB, ✷ PB ⊑ A }
(using partially-ordered automata)
A B C ✷
P B
A B ✷
P B
A ✷
P B
A C ✷
P B
A B B A ∅ A AC ABC AB AB AB
AB ABC ABC AB AB B A B AB A A AB B
FC ∈ S iff C, ✷ FC ∈ S′,
PC ∈ S′ iff C, ✷ PC ∈ S.
bool OMAQ is FO(<)-rewritable. Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 21
(unary predicates)
k
(binary predicates)
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 22
(unary predicates)
k
(binary predicates)
P
(next / previous moment)
F / ✷ P
(always in the future / past)
F / ✷ P / F / P
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 22
(unary predicates)
k
(binary predicates)
P
(next / previous moment)
F / ✷ P
(always in the future / past)
F / ✷ P / F / P
n = 2 for the core languages
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 22
FC ⊓ F FC ⊑ B
FU
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 23
FC ⊓ F FC ⊑ B
FU
1 2
a D U U C B b C C c C C d, e
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 23
c Knowledge Bases
c TBox (concept axioms) and RBox
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 24
c Knowledge Bases
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 25
c Knowledge Bases
PauthorOf
PauthorOf
1 2
3
4
5
6
7
8
9
10
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 25
bool Temporal Ontologies – Timestamping
Department S InterestGroup OrganizationalUnit
d
Member S (1,∞)
mbr Employee S
Name(String)
S
PaySlipNumber(Integer)
S
Salary(Integer)
T Manager T TopManager AreaManager dex
−
dev pex WorksOn T (3,∞) act emp Project
ProjectCode(String)
S Propose gp (0,1) Ex-Project tex Manages man (1,1) [0,5] prj (1,1)
F✸ P¬Manager
F✷ PEmployee
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 26
bool Temporal Ontologies – Evolution and Transition
Department S InterestGroup OrganizationalUnit
d
Member S (1,∞)
mbr Employee S
Name(String)
S
PaySlipNumber(Integer)
S
Salary(Integer)
T Manager T TopManager AreaManager dex
−
dev pex WorksOn T (3,∞) act emp Project
ProjectCode(String)
S Propose gp (0,1) Ex-Project tex Manages man (1,1) [0,5] prj (1,1)
P¬Employee
FManager
FTopManager
PEx-Project
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 27
bool Temporal Ontologies – Lifespan Cardinality Constraints
Department S InterestGroup OrganizationalUnit
d
Member S (1,∞)
mbr Employee S
Name(String)
S
PaySlipNumber(Integer)
S
Salary(Integer)
T Manager T TopManager AreaManager dex
−
dev pex WorksOn T (3,∞) act emp Project
ProjectCode(String)
S Propose gp (0,1) Ex-Project tex Manages man (1,1) [0,5] prj (1,1)
∗ WorksOn ⊑ ⊥
∗Manages
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 28
c
P, ✷ F/✷ P
F/✷ P
∗
c can express cardinalities over roles, ∃≥nR.
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 29
c ontology-mediated instance query (OMIQ) is a pair q = (O, κ)
c ontology and
(positive temporal concept)
(positive temporal role)
P
F
P
F
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 30
c ontology-mediated instance query (OMIQ) is a pair q = (O, κ)
c ontology and
(positive temporal concept)
(positive temporal role)
P
F
P
F
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 30
c ontology-mediated query (OMQ) is a pair q = (O, ψ) where
c ontology and
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 31
c ontology-mediated query (OMQ) is a pair q = (O, ψ) where
c ontology and
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 31
for any ABox A and any a and ℓ in A
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 32
for any ABox A and any a and ℓ in A
FUnavailable
P Broken ⊑ Unavailable
B B U U U U
32
for any ABox A and any a and ℓ in A
FUnavailable
P Broken ⊑ Unavailable
B B U U U U
PLUS(k, n1, n2) for k = n1 + n2 PLUS and concept and role names in (O, κ)
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 32
for any ABox A and any a and ℓ in A
FUnavailable
P Broken ⊑ Unavailable
B B U U U U
PLUS(k, n1, n2) for k = n1 + n2 PLUS and concept and role names in (O, κ)
FB, B ⊑ FR }
B B R B R B
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 32
1 2 3 4
5 6
7 8 9 10
PAccepted,
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 33
1 2 3 4
5 6
7 8 9 10
PAccepted,
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 33
1 2 3 4
5 6
7 8 9 10
PAccepted,
33
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 34
FQ}. Let’s construct
35
FQ}. Let’s construct
a −1 0 B 1 A 2 aP 1 P
Q
F∃Q
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 35
horn and OMAQs
FFk, Sk ⊑ ✷ PPk, ✷ FFk ⊓ Pk ⊑ Rk }
a −1 0 A0 A 1 A1 2 A1 3 A 4 aS3 aS2
1
aS1 aS0 S0 R0
F0 P0
S1 R1 S0 R0 S0 R0 Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 36
horn and OMAQs
FFk, Sk ⊑ ✷ PPk, ✷ FFk ⊓ Pk ⊑ Rk }
a −1 0 A0 A 1 A1 2 A1 3 A 4 aS3 aS2
1
aS1 aS0 S0 R0
F0 P0
S1 R1 S0 R0 S0 R0
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 36
α
α
CONP-hard [2+2 CNF]
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 37
α
α
CONP-hard [2+2 CNF]
α
α
α
α
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 37
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 38
core OMQs
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 39
Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 40