Ontology-Mediated Query Answering over Temporal Ontologies - - PowerPoint PPT Presentation

ontology mediated query answering over temporal ontologies
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

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 Reasoning for Intelligent Systems – Freiburg, 12-13 November, 2018

slide-2
SLIDE 2

Information needs at Siemens’ remote diagnostics centres

Siemens remote-diagnostic centres analyse data by querying (aggregated) sensor measurements

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 . . .

Typical information needs: find the turbines and the times

– when an active power trip occurred: the active power was above 1.5MW for a period of at least 10 seconds, maximum 3 seconds after which there was a period of at least 1 minute where the active power was below 0.15MW

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 1

slide-3
SLIDE 3

Information needs at Siemens’ remote diagnostics centres

Siemens remote-diagnostic centres analyse data by querying (aggregated) sensor measurements

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 . . .

Typical information needs: find the turbines and the times

– when an active power trip occurred: the active power was above 1.5MW for a period of at least 10 seconds, maximum 3 seconds after which there was a period of at least 1 minute where the active power was below 0.15MW – when a normal restart happened: normal stop followed by a normal start within 1 hour

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 1

slide-4
SLIDE 4

Information needs at Siemens’ remote diagnostics centres

Siemens remote-diagnostic centres analyse data by querying (aggregated) sensor measurements

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 . . .

Typical information needs: find the turbines and the times

– when an active power trip occurred: the active power was above 1.5MW for a period of at least 10 seconds, maximum 3 seconds after which there was a period of at least 1 minute where the active power was below 0.15MW – when a normal restart happened: normal stop followed by a normal start within 1 hour – normal stop: active power off followed by main flame off within 2 min, followed by coast down from 6600 to 1500rpm within 2 min, followed by coast down from 1500 to 200rpm within 9 min – normal start: ...

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 1

slide-5
SLIDE 5

Data access in industry

(from Norwegian Petroleum Directorate’s FactPages)

show me the wellbores completed before 2008 where Statoil as a drilling operator sampled less than 10 meters of cores

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 2

slide-6
SLIDE 6

Data access in industry

(from Norwegian Petroleum Directorate’s FactPages)

show me the wellbores completed before 2008 where Statoil as a drilling operator sampled less than 10 meters of cores 5 days later:

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

slide-7
SLIDE 7

Data access in industry

(from Norwegian Petroleum Directorate’s FactPages)

show me the wellbores completed before 2008 where Statoil as a drilling operator sampled less than 10 meters of cores 5 days later:

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

...

In STATOIL: 1,000 TB of relational data 2,000 tables different schemas

30–70% of time on data gathering

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 2

slide-8
SLIDE 8

Ontology-based data access (OBDA)

(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 . }

SPARQL query

[] 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" ]; ...

mappings

  • ntology

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

data sources

Ontology – gives a high-level conceptual view of the data – provides a convenient & natural vocabulary for user queries – facilitates data integration via a global schema

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 3

slide-9
SLIDE 9

Ontology-based data access (OBDA)

(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 . }

SPARQL query

[] 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" ]; ...

mappings

  • ntology

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

data sources

Ontology – gives a high-level conceptual view of the data – provides a convenient & natural vocabulary for user queries – facilitates data integration via a global schema OWL 2 QL ontology-mediated queries (O, q( x)) are FO-rewritable

reduction to DB query evaluation

∃q′ ∀A, a O, A | = q( a) ⇐ ⇒ A | = q′( a)

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 3

slide-10
SLIDE 10

Temporal OBDA: Siemens case

Siemens remote-diagnostic centres analyse data by querying sensor measurements

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 . . .

Typical query when an active power trip occurred: the active power was above 1.5MW for a period of at least 10 seconds, 3 seconds after which there was a period of at least one minute where active power was below 0.15MW We need a temporal ontology O with definitions such that we can formulate temporal queries as ActivePowerTrip(x) ← Turbine(x) ∧ ⊟[0,1m] ActivePowerBelow0.15(x) ∧

[60s,63s] ⊟[0,10s] ActivePowerAbove1.5(x)

Ontology-mediated query: (O, ActivePowerTrip(x, t))

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

slide-11
SLIDE 11

Research problems

1 Which temporal logics and query languages are suitable for temporal OBDA

as far as their expressive power is concerned?

2 Investigate logical and computational properties of the resulting fragments

(Satisfiability, Logical Implication, etc.)

3 Classify their fragments by the type of rewritability (FO, datalog, etc.) and

data Vs. combined complexity of OMQ answering

4 Algorithms, implementations, experiments, use cases 5 ...

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 5

slide-12
SLIDE 12

Research problems

1 Which temporal logics and query languages are suitable for temporal OBDA

as far as their expressive power is concerned?

2 Investigate logical and computational properties of the resulting fragments

(Satisfiability, Logical Implication, etc.)

3 Classify their fragments by the type of rewritability (FO, datalog, etc.) and

data Vs. combined complexity of OMQ answering

4 Algorithms, implementations, experiments, use cases 5 ...

standard temporal logics: LTL , HS , MTL (CTL, CTL∗, ...)

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 5

slide-13
SLIDE 13

LTL in clausal form

timeline (Z, <)

Positive temporal literals

λ ::= ⊥ | Ai |

|

| ✷

| ✷

where Ai are Atomic propositions

Clauses ϕ = ✷

F✷ P (λ1 ⊓ · · · ⊓ λk ⊑ λn+1 ⊔ · · · ⊔ λn+m)

horn m ≤ 1 core k + m ≤ 2 and m ≤ 1 bool any k and m krom k + m ≤ 2

Fragments LTLo

c c ∈ {bool, horn, krom, core} and o ∈ {✷, , ✷}

Fisher 1991

every LTL formula is equisatisfiable to some ⊓ λi⊓ ⊓ ϕj for ϕj ∈ LTL✷

bool Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 6

slide-14
SLIDE 14

Expressing ✸

F and U

A ⊑ ✸

FB

can be expressed in LTL✷

krom as

A ⊓ ✷

FU ⊑ ⊥, ¬U ⊑ B

for a fresh U

but cannot be expressed in LTL✷

horn Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 7

slide-15
SLIDE 15

Expressing ✸

F and U

A ⊑ ✸

FB

can be expressed in LTL✷

krom as

A ⊓ ✷

FU ⊑ ⊥, ¬U ⊑ B

for a fresh U

but cannot be expressed in LTL✷

horn

FA ⊑ B

can be expressed in LTL✷

core as

A → ✷

PB

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 7

slide-16
SLIDE 16

Expressing ✸

F and U

A ⊑ ✸

FB

can be expressed in LTL✷

krom as

A ⊓ ✷

FU ⊑ ⊥, ¬U ⊑ B

for a fresh U

but cannot be expressed in LTL✷

horn

FA ⊑ B

can be expressed in LTL✷

core as

A → ✷

PB

A ⊑ B U C

can be expressed in LTL✷

bool as

A ⊑ U ⊓ ✸

FC,

U ⊑

FC ⊔ F(B ⊓ U)

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 7

slide-17
SLIDE 17

Expressing ✸

F and U

A ⊑ ✸

FB

can be expressed in LTL✷

krom as

A ⊓ ✷

FU ⊑ ⊥, ¬U ⊑ B

for a fresh U

but cannot be expressed in LTL✷

horn

FA ⊑ B

can be expressed in LTL✷

core as

A → ✷

PB

A ⊑ B U C

can be expressed in LTL✷

bool as

A ⊑ U ⊓ ✸

FC,

U ⊑

FC ⊔ F(B ⊓ U)

B U C ⊑ A

can be expressed in LTL✷

bool as

  • FC ⊑ U,

F(U ⊓ B) ⊑ U, U ⊑ A

Similarly for ✸

P and S.

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 7

slide-18
SLIDE 18

LTL Knowledge Bases

LTLo

c ontology O a set of LTLo

c clauses c ∈ {bool, horn, krom, core}, o ∈ {✷, , ✷}

Data instance A is a finite set of atoms of the form A(ℓ), ℓ ∈ Z

tem(A) = {n ∈ Z | min A ≤ n ≤ max A}

  • Note. w.l.o.g. max A > min A = 0

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 8

slide-19
SLIDE 19

LTL Knowledge Bases – Example

1 2 3 4

Submitted

5 6

Accepted

7 8 9 10

Published

Example

(✷F ✷P omitted – global axioms)

Ontology Published ⊓ Accepted ⊑ ⊥, Published ⊓ Submitted ⊑ ⊥, Submitted ⊓ Accepted ⊑ ⊥, Published ⊑ ✷

FPublished,

Published ⊑ ✸

P(Accepted ⊓ FPublished),

Accepted ⊑ ✸

P(Submitted ⊓ FAccepted),

PAccepted ⊓ ✸ FAccepted ⊑ Accepted.

PSubmitted ⊓ ✸ FSubmitted ⊑ Submitted.

Data instance Accepted(Oct2014), Accepted(Oct2017), Published(Dec2017)

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 9

slide-20
SLIDE 20

LTL in Temporal Conceptual Models

Consider the following CM

AreaManager TopManager Manager

d

DEX−

d

It can be captured by the following set of LTL✷

krom Ontology:

AreaManager ⊑ Manager, TopManager ⊑ Manager, AreaManager ⊑ ¬TopManager, AreaManager ⊑ ✸

PTopManager.

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 10

slide-21
SLIDE 21

Complexity Results for Satisfiability Problem of LTL

  • temp. ops.

∗, ✷

F, ✷ P, F, P

∗, ✷

F, ✷ P

∗,

F, P

α LTL✷

α

LTL✷

α

LTL

  • α

LTL

✷ α

bool PSPACE [SistlaClarke82] NP [OnoNakamura80] PSPACE NP horn PSPACE [ChenLin93] PTIME PSPACE PTIME krom NP NP NP NLOGSPACE core NP PTIME NP NLOGSPACE

Artale, Kontchakov, Ryzhikov, Zakharyaschev: The Complexity of Clausal Fragments of

  • LTL. LPAR 2013.

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 11

slide-22
SLIDE 22

Ontology-mediated queries in LTL LTLo

c ontology-mediated query (OMQ) is a pair q = (O, κ)

where O is an LTLo

c ontology and

κ ::= Ai | κ1 ⊓ κ2 | κ1 ⊔ κ2 |

  • p1 κ

| κ1 op2 κ2

  • p1 ∈ {

F, ✸ F, ✷ F, P, ✸ P, ✷ P} and op2 ∈ {U, S}

Ai are Atomic propositions appearing in the ontology O Queries are negation-free LTL-formulas

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 12

slide-23
SLIDE 23

Ontology-mediated queries in LTL LTLo

c ontology-mediated query (OMQ) is a pair q = (O, κ)

where O is an LTLo

c ontology and

κ ::= Ai | κ1 ⊓ κ2 | κ1 ⊔ κ2 |

  • p1 κ

| κ1 op2 κ2

  • p1 ∈ {

F, ✸ F, ✷ F, P, ✸ P, ✷ P} and op2 ∈ {U, S}

Ai are Atomic propositions appearing in the ontology O Queries are negation-free LTL-formulas A certain answer to q = (O, κ) over a data instance A, ans(q, A) , is any ℓ ∈ tem(A) such that ∀I. I | = (O, A) I, ℓ | = κ

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 12

slide-24
SLIDE 24

FO-rewriting

An FO(<, +)-rewriting of q is a constant-free FO(<, +)-formula q′(t) s.t.

ℓ ∈ ans(q, A) ⇐ ⇒ SA | = q′(ℓ)

for all A, ℓ ∈ tem(A) SA = (A, <, tem(A))

if q′(t) is an FO(<)-formula, then it is an FO(<)-rewriting of q

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 13

slide-25
SLIDE 25

FO-rewriting

An FO(<, +)-rewriting of q is a constant-free FO(<, +)-formula q′(t) s.t.

ℓ ∈ ans(q, A) ⇐ ⇒ SA | = q′(ℓ)

for all A, ℓ ∈ tem(A) SA = (A, <, tem(A))

if q′(t) is an FO(<)-formula, then it is an FO(<)-rewriting of q

Evaluation of FO(<, +)-formulas is in LOGTIME-uniform AC0 for data complexity

(alternative query language: conjunctive queries with temporal operators)

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 13

slide-26
SLIDE 26

Examples – FO(<)-rewriting

O :

1 2 3 4

Submitted

5 6

Accepted

7 8 9 10

Published Example 1. A = {Accepted(Oct2014), Accepted(Oct2017), Published(Dec2017)}, κ = ✸

PSubmitted

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 14

slide-27
SLIDE 27

Examples – FO(<)-rewriting

O :

1 2 3 4

Submitted

5 6

Accepted

7 8 9 10

Published Example 1. A = {Accepted(Oct2014), Accepted(Oct2017), Published(Dec2017)}, κ = ✸

PSubmitted

ans(q, A) = [Oct2014, Dec2017] since min A = Oct2014 and max A = Dec2017 ansZ(q, A) = [Oct2014, ∞)

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 14

slide-28
SLIDE 28

Examples – FO(<)-rewriting

O :

1 2 3 4

Submitted

5 6

Accepted

7 8 9 10

Published Example 1. A = {Accepted(Oct2014), Accepted(Oct2017), Published(Dec2017)}, κ = ✸

PSubmitted

ans(q, A) = [Oct2014, Dec2017] since min A = Oct2014 and max A = Dec2017 ansZ(q, A) = [Oct2014, ∞) FO(<)-rewriting q′(t) = ∃s

  • (s < t) ∧ Submitted(s)

∃s

  • (s ≤ t) ∧ Accepted(s)

∃s

  • (s ≤ t + 1) ∧ Published(s)
  • ∃s(s ≤ t + 1) ≡ ∃s[(s ≤ t) ∨ ((t < s) ∧ ¬∃s′ ((t < s′) ∧ (s′ < s)))]

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 14

slide-29
SLIDE 29

Examples – FO(<)-rewriting

O :

1 2 3 4

Submitted

5 6

Accepted

7 8 9 10

Published Example 2. A = {Accepted(Oct2014), Accepted(Oct2017), Published(Dec2017)}, κ = Accepted

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 15

slide-30
SLIDE 30

Examples – FO(<)-rewriting

O :

1 2 3 4

Submitted

5 6

Accepted

7 8 9 10

Published Example 2. A = {Accepted(Oct2014), Accepted(Oct2017), Published(Dec2017)}, κ = Accepted ans(q, A) = [Oct2014, Oct2017] since Accepted is convex ansZ(q, A) = [Oct2014, Dec2017]

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 15

slide-31
SLIDE 31

Examples – FO(<)-rewriting

O :

1 2 3 4

Submitted

5 6

Accepted

7 8 9 10

Published Example 2. A = {Accepted(Oct2014), Accepted(Oct2017), Published(Dec2017)}, κ = Accepted ans(q, A) = [Oct2014, Oct2017] since Accepted is convex ansZ(q, A) = [Oct2014, Dec2017] FO(<)-rewriting q′(t) = Accepted(t)∨ ∃s1∃s2

  • (s1 < t) ∧ (t < s2) ∧ Accepted(s1) ∧ Accepted(s2)
  • Submitted(t − 1) ∧ Published(t + 1)
  • Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18

15

slide-32
SLIDE 32

Examples – FO(<, +)-rewriting

Example 3. A = {Even(0), C(1)}, O = { Even ⊑

FOdd, Odd ⊑ FEven },

κ = Odd

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 16

slide-33
SLIDE 33

Examples – FO(<, +)-rewriting

Example 3. A = {Even(0), C(1)}, O = { Even ⊑

FOdd, Odd ⊑ FEven },

κ = Odd Even 1 C Odd 2 Even 3 Odd . . . ans(q, A) = {1} since min A = 0 and max A = 1 ansZ(q, A) = {2n + 1 | n ≥ 0}

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 16

slide-34
SLIDE 34

Examples – FO(<, +)-rewriting

Example 3. A = {Even(0), C(1)}, O = { Even ⊑

FOdd, Odd ⊑ FEven },

κ = Odd Even 1 C Odd 2 Even 3 Odd . . . ans(q, A) = {1} since min A = 0 and max A = 1 ansZ(q, A) = {2n + 1 | n ≥ 0} FO(<, +)-rewriting q′(t) = ∃s ∃n [(Odd(s) ∧ (t − s = 2n)) ∨ (Even(s) ∧ (t − s = 2n + 1))]

t − s = 2n stands for ∃k

  • (k = n + n) ∧ (t = s + k)
  • Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18

16

slide-35
SLIDE 35

Examples – FO(<, +)-rewriting

Example 3. A = {Even(0), C(1)}, O = { Even ⊑

FOdd, Odd ⊑ FEven },

κ = Odd Even 1 C Odd 2 Even 3 Odd . . . ans(q, A) = {1} since min A = 0 and max A = 1 ansZ(q, A) = {2n + 1 | n ≥ 0} FO(<, +)-rewriting q′(t) = ∃s ∃n [(Odd(s) ∧ (t − s = 2n)) ∨ (Even(s) ∧ (t − s = 2n + 1))]

t − s = 2n stands for ∃k

  • (k = n + n) ∧ (t = s + k)
  • Note. The query is not FO(<)-rewritable since properties such as t is even are

not definable by FO(<)-formulas [Libkin,04]

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 16

slide-36
SLIDE 36

Examples – Active Domain

Example 5. O = { A → 2

F A, B → 3 F B }, κ = ✸ F(A ⊓ B)

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 17

slide-37
SLIDE 37

Examples – Active Domain

Example 5. O = { A → 2

F A, B → 3 F B }, κ = ✸ F(A ⊓ B)

FOZ(<, +)-rewriting

∃s, u, v, n, m [(t < s) ∧ A(u) ∧ B(v) ∧ (s − u = 2n ≥ 0) ∧ (s − v = 3m ≥ 0)]

is a rewriting over Z, but not over tem(A), indeed, let A = {A(0), B(1)} A 1 B 2 A 3 4 A, B s then s = 4 is outside the active domain tem(A) = {0, 1} of A.

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 17

slide-38
SLIDE 38

Examples – Active Domain

Example 5. O = { A → 2

F A, B → 3 F B }, κ = ✸ F(A ⊓ B)

FOZ(<, +)-rewriting

∃s, u, v, n, m [(t < s) ∧ A(u) ∧ B(v) ∧ (s − u = 2n ≥ 0) ∧ (s − v = 3m ≥ 0)]

is a rewriting over Z, but not over tem(A), indeed, let A = {A(0), B(1)} A 1 B 2 A 3 4 A, B s then s = 4 is outside the active domain tem(A) = {0, 1} of A. FO(<, +)- and FOZ(<, +)-rewriting ∃u, v[(A(u) ∧ B(v)]

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 17

slide-39
SLIDE 39

Examples – No FO-rewriting

Example 4. O = {A0 ⊓

FBk ⊑ Bk, A1 ⊓ FBk ⊑ B1−k | k = 0, 1}, κ = B0

for e = (e0, . . . , en−1) ∈ {0, 1}n, Ae = { B0(n) } ∪ { Aei(i) | 0 ≤ i < n }

0 ∈ ans(q, Ae) ⇐ ⇒ the number of 1s in e is even

A1 B0 1 A0 B1 2 A0 B1 3 A1 B1 4 B0

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 18

slide-40
SLIDE 40

Examples – No FO-rewriting

Example 4. O = {A0 ⊓

FBk ⊑ Bk, A1 ⊓ FBk ⊑ B1−k | k = 0, 1}, κ = B0

for e = (e0, . . . , en−1) ∈ {0, 1}n, Ae = { B0(n) } ∪ { Aei(i) | 0 ≤ i < n }

0 ∈ ans(q, Ae) ⇐ ⇒ the number of 1s in e is even

A1 B0 1 A0 B1 2 A0 B1 3 A1 B1 4 B0 PARITY ∈ NC1 \ AC0 [Furst,Saxe,Sipser,84] q is not FO-rewritable with

any numeric predicate

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 18

slide-41
SLIDE 41

Examples – No FO-rewriting

Example 4. O = {A0 ⊓

FBk ⊑ Bk, A1 ⊓ FBk ⊑ B1−k | k = 0, 1}, κ = B0

for e = (e0, . . . , en−1) ∈ {0, 1}n, Ae = { B0(n) } ∪ { Aei(i) | 0 ≤ i < n }

0 ∈ ans(q, Ae) ⇐ ⇒ the number of 1s in e is even

A1 B0 1 A0 B1 2 A0 B1 3 A1 B1 4 B0 PARITY ∈ NC1 \ AC0 [Furst,Saxe,Sipser,84] q is not FO-rewritable with

any numeric predicate

  • Theorem. Atomic queries under LTL
  • horn Ontologies are not FO-rewritables.

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 18

slide-42
SLIDE 42

LTL OMQ rewritability

OMAQs (Atomic Queries) OMQs LTL✷

α

LTL

  • α

LTL✷

α

LTL✷

α

LTL

  • α

LTL✷

α

bool MSO(<) horn MSO(<) FO(<) MSO(<) krom FO(<) MSO(<) core FO(<,+) MSO(<) ? FO(<) FO(<,+) MSO(<) ?

MSO(<) can encode LTL semantics

LTL✷

bool OMQs are MSO(<)-rewritable

(B¨ uchi’60, Elgot’62, Trakhtenbrot’62)

OMQ answering is in NC1 for data complexity

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 19

slide-43
SLIDE 43

LTL OMQ rewritability

OMAQs (Atomic Queries) OMQs LTL✷

α

LTL

  • α

LTL✷

α

LTL✷

α

LTL

  • α

LTL✷

α

bool MSO(<) horn MSO(<) FO(<) MSO(<) krom FO(<) MSO(<) core FO(<,+) MSO(<) ? FO(<) FO(<,+) MSO(<) ?

MSO(<) can encode LTL semantics

LTL✷

bool OMQs are MSO(<)-rewritable

(B¨ uchi’60, Elgot’62, Trakhtenbrot’62)

OMQ answering is in NC1 for data complexity answering LTL

  • horn OMAQs is NC1-hard for data complexity

answering LTL✷

krom, LTL

  • krom OMQs is NC1-hard for data complexity
  • A. Artale, R. Kontchakov, A. Kovtunova, F

. Wolter, and M. Zakharyaschev. First-order rewritability of temporal ontology-mediated queries. IJCAI’15 & Ongoing Journal Draft

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 19

slide-44
SLIDE 44

Unary Automata for proving rewritability of OMAQs in LTL

  • krom

Example q = (O, A) with

(using unary automata)

O =

  • A → B, B → C, C → D, D → A, D → E, E → D
  • B

A C D E 3 + 2N B A C D E 2 + 2N AB,A accepts 0k iff k ∈ 3 + 2N, which can be described by the formula ∃s

  • B(s) ∧ ∃v
  • (t = s + v) ∧ (v ∈ 3 + 2N)
  • ,

where v ∈ a + bN can be expressed in FO(<, +). We need also to check whether O | = B ⊑ A.

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 20

slide-45
SLIDE 45

Partially-Ordered Automata for proving FO(<) rewritability

Example q = (O, A) with

O = { C ⊑ ✷

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

Automata States: Maximal consistent set of concepts w.r.t. O. Language Recognized: ABoxes A represented as words of the form A0, . . . , Am, for m = max A > 0, where Ai =

  • B | B(i) ∈ A and B occurs in q
  • ,

for 0 ≤ i ≤ m Transition S →X S′: X ⊆ S′, ✷

FC ∈ S iff C, ✷ FC ∈ S′,

PC ∈ S′ iff C, ✷ PC ∈ S.

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 21

slide-46
SLIDE 46

Partially-Ordered Automata for proving FO(<) rewritability

Example q = (O, A) with

O = { C ⊑ ✷

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

Automata States: Maximal consistent set of concepts w.r.t. O. Language Recognized: ABoxes A represented as words of the form A0, . . . , Am, for m = max A > 0, where Ai =

  • B | B(i) ∈ A and B occurs in q
  • ,

for 0 ≤ i ≤ m Transition S →X S′: X ⊆ S′, ✷

FC ∈ S iff C, ✷ FC ∈ S′,

PC ∈ S′ iff C, ✷ PC ∈ S.

  • Theorem. Any LTL✷

bool OMAQ is FO(<)-rewritable. Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 21

slide-47
SLIDE 47

Temporal DL-Lite Languages

based on DL-Lite basic concepts B ::= Ak | ∃R

(unary predicates)

roles R ::= Pk | P −

k

(binary predicates)

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 22

slide-48
SLIDE 48

Temporal DL-Lite Languages

based on DL-Lite basic concepts B ::= Ak | ∃R

(unary predicates)

roles R ::= Pk | P −

k

(binary predicates)

DL-Liteo

core inclusions

λ1 ⊑ λ2

and

λ1 ⊓ λ2 ⊑ ⊥

the λi are both either basic concepts or roles, possibly prefixed by

  • F /

P

(next / previous moment)

if o = ✷

F / ✷ P

(always in the future / past)

if o = ✷ ✷

F / ✷ P / F / P

if o = ✷

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 22

slide-49
SLIDE 49

Temporal DL-Lite Languages

based on DL-Lite basic concepts B ::= Ak | ∃R

(unary predicates)

roles R ::= Pk | P −

k

(binary predicates)

DL-Liteo

core inclusions

λ1 ⊑ λ2

and

λ1 ⊓ λ2 ⊑ ⊥

the λi are both either basic concepts or roles, possibly prefixed by

  • F /

P

(next / previous moment)

if o = ✷

F / ✷ P

(always in the future / past)

if o = ✷ ✷

F / ✷ P / F / P

if o = ✷

DL-Liteo

horn

λ1 ⊓ · · · ⊓ λn−1 ⊑ λn

and λ1 ⊓ · · · ⊓ λn ⊑ ⊥ NB:

n = 2 for the core languages

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 22

slide-50
SLIDE 50

Semantics

concept inclusions: C ⊓

FC ⊓ F FC ⊑ B

and

D ⊑ ✷

FU

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 23

slide-51
SLIDE 51

Semantics

concept inclusions: C ⊓

FC ⊓ F FC ⊑ B

and

D ⊑ ✷

FU

Z

  • 1

1 2

a D U U C B b C C c C C d, e

  • the timeline is (Z, <)
  • constant domains with rigid interpretation of individuals (but no UNA)
  • concept and role inclusions hold at all moments of time (globally)

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 23

slide-52
SLIDE 52

DL-Liteo

c Knowledge Bases

DL-Liteo

c ontology O a set of DL-Liteo

c TBox (concept axioms) and RBox

(Role axioms).

Data instance (ABox) A is a finite set of atoms of the form A(a, t) and

P (a, b, t), t ∈ Z.

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 24

slide-53
SLIDE 53

DL-Liteo

c Knowledge Bases

Example Database on submission, acceptance and publication of papers:

submittedTo(p1, JACM, Feb2016), Submitted(p1, Feb2016), acceptedIn(p1, JACM, July2016), Published(p1, Oct2016), publishedIn(p1, JACM, Oct2016), Paper(JACM, July2016).

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 25

slide-54
SLIDE 54

DL-Liteo

c Knowledge Bases

Example Database on submission, acceptance and publication of papers:

submittedTo(p1, JACM, Feb2016), Submitted(p1, Feb2016), acceptedIn(p1, JACM, July2016), Published(p1, Oct2016), publishedIn(p1, JACM, Oct2016), Paper(JACM, July2016). While the Ontology expresses the following constraints: ∃publishedIn ≡ Published ∃submittedTo ≡ Submitted ∃acceptedIn ≡ Accepted ∃submittedTo− ⊑ Conference ⊔ Journal authorOf ⊑ ✷

PauthorOf

authorOf ⊑ ✷

PauthorOf

1 2

S

3

S

4

S

5

A

6

A

7

P

8

P

9

P

10

P

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 25

slide-55
SLIDE 55

DL-Lite✷

bool Temporal Ontologies – Timestamping

Department S InterestGroup OrganizationalUnit

d

Member S (1,∞)

  • rg

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)

  • Manager ⊑ ✸

F✸ P¬Manager

  • Employee ⊑ ✷

F✷ PEmployee

  • Temporary Relations/Attributes: Reification
  • Global Relations/Attributes: Reification + Global Roles

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 26

slide-56
SLIDE 56

DL-Lite✷

bool Temporal Ontologies – Evolution and Transition

Department S InterestGroup OrganizationalUnit

d

Member S (1,∞)

  • rg

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)

  • Manager ⊑ ✸

P¬Employee

  • Manager ⊑ ✷

FManager

  • AreaManager ⊑ ✸

FTopManager

  • Project ⊑

PEx-Project

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 27

slide-57
SLIDE 57

DL-Lite✷

bool Temporal Ontologies – Lifespan Cardinality Constraints

Department S InterestGroup OrganizationalUnit

d

Member S (1,∞)

  • rg

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)

  • Member is a rigid role

(Snapshot Relationships)

  • ∃ ✷

∗ WorksOn ⊑ ⊥

(Temporary Relationships)

  • “A top-manager manages at most 5 different projects in her entire life”

TopManager ⊑ ≤ 5 ✸

∗Manages

(Lifespan Cardinalities)

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 28

slide-58
SLIDE 58

Complexity Results for Satisfiability Problem of DL-LiteN ,o

c

concept temporal constructs inclusions

  • F/

P, ✷ F/✷ P

F/✷ P

Bool PSPACE NP NP Krom NP NP NLOGSPACE core NP ≤ PTIME NLOGSPACE temporalised roles Bool undec. undec. NP unrestricted role inclusions Bool undec. undec. 2EXPTIME DL-LiteN

c can express cardinalities over roles, ∃≥nR.

Artale, Kontchakov, Ryzhikov, Zakharyaschev. A Cookbook for Temporal Con- ceptual Data Modelling with Description. TOCL, 2014.

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 29

slide-59
SLIDE 59

Ontology Mediated Instance Queries over Temporal DL-Lite DL-Liteo

c ontology-mediated instance query (OMIQ) is a pair q = (O, κ)

  • r a pair q = (O, ̺) where O is an DL-Liteo

c ontology and

κ ::= ⊤ | Ak | ∃R.κ | κ1 ⊓ κ2 | κ1 ⊔ κ2 |

  • p1 κ

| κ1 op2 κ2

(positive temporal concept)

̺ ::= R | ̺1 ⊓ ̺2 | ̺1 ⊔ ̺2 |

  • p1 ̺

| ̺1 op2 ̺2

(positive temporal role)

  • p1

::=

  • P

|

  • F

| ✷

P

| ✷

F

| ✸

P

| ✸

F

  • p2

::= S | U

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 30

slide-60
SLIDE 60

Ontology Mediated Instance Queries over Temporal DL-Lite DL-Liteo

c ontology-mediated instance query (OMIQ) is a pair q = (O, κ)

  • r a pair q = (O, ̺) where O is an DL-Liteo

c ontology and

κ ::= ⊤ | Ak | ∃R.κ | κ1 ⊓ κ2 | κ1 ⊔ κ2 |

  • p1 κ

| κ1 op2 κ2

(positive temporal concept)

̺ ::= R | ̺1 ⊓ ̺2 | ̺1 ⊔ ̺2 |

  • p1 ̺

| ̺1 op2 ̺2

(positive temporal role)

  • p1

::=

  • P

|

  • F

| ✷

P

| ✷

F

| ✸

P

| ✸

F

  • p2

::= S | U certain answers to (O, κ) over A: (a, ℓ) ∈ ind(A) × tem(A) (O, A) | = κ(a, ℓ) ⇐ ⇒ aI ∈ κI(ℓ) in all models I of (O, A) certain answers to (O, ρ) over A: (a, b, ℓ) ∈ ind(A) × ind(A) × tem(A) (O, A) | = ̺(a, b, ℓ) ⇐ ⇒ (aI, bI) ∈ ̺I(ℓ) in all models I of (O, A)

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 30

slide-61
SLIDE 61

Ontology Mediated Queries over Temporal DL-Lite DL-Liteo

c ontology-mediated query (OMQ) is a pair q = (O, ψ) where

O is an DL-Liteo

c ontology and

ψ ::= κ(x, t) | ρ(x, y, t) | ψ1 ∧ ψ2 | ψ1 ∨ ψ2 | ∇x.ψ | ∇t.ψ ∇ ::= ∃ | ∀ Note! Quantification ranges over the active domain, i.e., ind(A) and tem(A).

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 31

slide-62
SLIDE 62

Ontology Mediated Queries over Temporal DL-Lite DL-Liteo

c ontology-mediated query (OMQ) is a pair q = (O, ψ) where

O is an DL-Liteo

c ontology and

ψ ::= κ(x, t) | ρ(x, y, t) | ψ1 ∧ ψ2 | ψ1 ∨ ψ2 | ∇x.ψ | ∇t.ψ ∇ ::= ∃ | ∀ Note! Quantification ranges over the active domain, i.e., ind(A) and tem(A). certain answers to (O, ψ) over A: ( a, ℓ) ∈ ind(A)n × tem(A)m (O, A) | = ψ( a, ℓ) ⇐ ⇒ I | = ψ( a, ℓ) in all models I of (O, A)

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 31

slide-63
SLIDE 63

FO-rewriting OMIQ

An FO-formula Φ(x, t) in the signature of <, = and concept and role names in (O, κ) is an FO(< < <)-rewriting of (O, κ) if (O, A) | = κ(a, ℓ) ⇐ ⇒ SA | = Φ(a, ℓ),

for any ABox A and any a and ℓ in A

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 32

slide-64
SLIDE 64

FO-rewriting OMIQ

An FO-formula Φ(x, t) in the signature of <, = and concept and role names in (O, κ) is an FO(< < <)-rewriting of (O, κ) if (O, A) | = κ(a, ℓ) ⇐ ⇒ SA | = Φ(a, ℓ),

for any ABox A and any a and ℓ in A

Example: q = (O, Unavailable(x, t)), where O = { Broken ⊑ ✷

FUnavailable

P Broken ⊑ Unavailable

}

B B U U U U

Φ(x, t) = Unavailable(x, t) ∨ ∃s

  • (s < t) ∧ Broken(x, s)
  • Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18

32

slide-65
SLIDE 65

FO-rewriting OMIQ

An FO-formula Φ(x, t) in the signature of <, = and concept and role names in (O, κ) is an FO(< < <)-rewriting of (O, κ) if (O, A) | = κ(a, ℓ) ⇐ ⇒ SA | = Φ(a, ℓ),

for any ABox A and any a and ℓ in A

Example: q = (O, Unavailable(x, t)), where O = { Broken ⊑ ✷

FUnavailable

P Broken ⊑ Unavailable

}

B B U U U U

Φ(x, t) = Unavailable(x, t) ∨ ∃s

  • (s < t) ∧ Broken(x, s)
  • An FO-formula Φ(x, t) in the signature of <, =,

PLUS(k, n1, n2) for k = n1 + n2 PLUS and concept and role names in (O, κ)

is an FO(< < <,+ + +)-rewriting of (O, κ) if . . .

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 32

slide-66
SLIDE 66

FO-rewriting OMIQ

An FO-formula Φ(x, t) in the signature of <, = and concept and role names in (O, κ) is an FO(< < <)-rewriting of (O, κ) if (O, A) | = κ(a, ℓ) ⇐ ⇒ SA | = Φ(a, ℓ),

for any ABox A and any a and ℓ in A

Example: q = (O, Unavailable(x, t)), where O = { Broken ⊑ ✷

FUnavailable

P Broken ⊑ Unavailable

}

B B U U U U

Φ(x, t) = Unavailable(x, t) ∨ ∃s

  • (s < t) ∧ Broken(x, s)
  • An FO-formula Φ(x, t) in the signature of <, =,

PLUS(k, n1, n2) for k = n1 + n2 PLUS and concept and role names in (O, κ)

is an FO(< < <,+ + +)-rewriting of (O, κ) if . . . Example: q = (O, B(x, t)), where O = { R ⊑

FB, B ⊑ FR }

B B R B R B

Φ(x, t) = ∃s ∃n [(B(x, s) ∧ (t − s = 2n)) ∨ (R(x, s) ∧ (t − s = 2n + 1))]

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 32

slide-67
SLIDE 67

Examples – FO(<)-rewriting OMIQ

O :

1 2 3 4

Submitted

5 6

Accepted

7 8 9 10

Published Example 5. A = submittedTo(p1, JACM, Feb2016), Submitted(p2, Jan2016), acceptedIn(p3, JACM, July2016), Published(p3, Oct2016), authorOf(Bob, p3, May2014). κ = ∃authorOf.✸

PAccepted,

tem(A) = [May2014, Oct2016]

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 33

slide-68
SLIDE 68

Examples – FO(<)-rewriting OMIQ

O :

1 2 3 4

Submitted

5 6

Accepted

7 8 9 10

Published Example 5. A = submittedTo(p1, JACM, Feb2016), Submitted(p2, Jan2016), acceptedIn(p3, JACM, July2016), Published(p3, Oct2016), authorOf(Bob, p3, May2014). κ = ∃authorOf.✸

PAccepted,

tem(A) = [May2014, Oct2016] ans(q, A) = (Bob, [Aug2016, Oct2016]) ansZ(q, A) = (Bob, [Aug2016, ∞])

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 33

slide-69
SLIDE 69

Examples – FO(<)-rewriting OMIQ

O :

1 2 3 4

Submitted

5 6

Accepted

7 8 9 10

Published Example 5. A = submittedTo(p1, JACM, Feb2016), Submitted(p2, Jan2016), acceptedIn(p3, JACM, July2016), Published(p3, Oct2016), authorOf(Bob, p3, May2014). κ = ∃authorOf.✸

PAccepted,

tem(A) = [May2014, Oct2016] ans(q, A) = (Bob, [Aug2016, Oct2016]) ansZ(q, A) = (Bob, [Aug2016, ∞]) FO(<)-rewriting q′(x, t) = ∃y, z, t′, t′′ authorOf(x, y, t′)∧ [((t′′ < t) ∧ (Accepted(y, t′′) ∨ accepptedIn(y, z, t′′))∨ ((t′′ ≤ t) ∧ (Published(y, t′′) ∨ publishedIn(y, z, t′′))]

  • Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18

33

slide-70
SLIDE 70

FO-rewriting OMQ

To construct an FO-rewriting of an OMQ q = (O, ψ) one can replace all occur- rences of OMIQs in ψ with their FO-rewritings.

  • Theorem. If all constituent OMIQs of an OMQZ q are FO(<, +)- or FO(<)-

rewritable, then q is also FO(<, +)- or, respectively, FO(<)–rewritable. Thus, we only focus on FO-rewritability of OMIQs.

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 34

slide-71
SLIDE 71

FO-rewriting – TBox and RBox Interaction

Let O = T ∪ R, T = {B ⊑ ∃P, ∃Q ⊑ A} and R = {P ⊑

FQ}. Let’s construct

a rewriting for q = (O, A) . Step 1 – rewriting A w.r.t. T : A(x, t) ⊔ ∃y Q(x, y, t) Step 2 – rewriting Q w.r.t. R: Q(x, y, t) ⊔ P (x, y, t − 1) Step 3 – gluing Step 1 and 2: A(x, t) ⊔ ∃y

  • Q(x, y, t) ⊔ P (x, y, t − 1)
  • Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18

35

slide-72
SLIDE 72

FO-rewriting – TBox and RBox Interaction

Let O = T ∪ R, T = {B ⊑ ∃P, ∃Q ⊑ A} and R = {P ⊑

FQ}. Let’s construct

a rewriting for q = (O, A) . Step 1 – rewriting A w.r.t. T : A(x, t) ⊔ ∃y Q(x, y, t) Step 2 – rewriting Q w.r.t. R: Q(x, y, t) ⊔ P (x, y, t − 1) Step 3 – gluing Step 1 and 2: A(x, t) ⊔ ∃y

  • Q(x, y, t) ⊔ P (x, y, t − 1)
  • The above rewriting is not correct! It does not return the certain answer (a, 1)
  • ver A = {B(a, 0), C(a, 1)}

a −1 0 B 1 A 2 aP 1 P

Q

Step 4 – add the connecting axioms to T due to R: ∃P ⊑

F∃Q

Step 1’ – rewriting A w.r.t. T : A(x, t) ⊔ ∃y (Q(x, y, t) ⊔ P (x, y, t − 1)) ⊔ B(x, t − 1)

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 35

slide-73
SLIDE 73

Examples – No FO-rewriting in DL-Lite✷

horn and OMAQs

Example 6. q = (O, A) with O = T ∪ R and, for k = 0, 1: T = { ∃Rk ⊓ A0 ⊑ ∃Sk, ∃Rk ⊓ A1 ⊑ ∃S1−k, A ≡ ∃S0 }, R = { Sk ⊑ Fk, Sk ⊑ ✷

FFk, Sk ⊑ ✷ PPk, ✷ FFk ⊓ Pk ⊑ Rk }

for e = (e0, . . . , en−1) ∈ {0, 1}n, Ae = { A(a, n) } ∪ { Aei(a, i) | 0 ≤ i < n }

(a, 0) ∈ ans(q, Ae) ⇐ ⇒ the number of 1s in e is even

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

slide-74
SLIDE 74

Examples – No FO-rewriting in DL-Lite✷

horn and OMAQs

Example 6. q = (O, A) with O = T ∪ R and, for k = 0, 1: T = { ∃Rk ⊓ A0 ⊑ ∃Sk, ∃Rk ⊓ A1 ⊑ ∃S1−k, A ≡ ∃S0 }, R = { Sk ⊑ Fk, Sk ⊑ ✷

FFk, Sk ⊑ ✷ PPk, ✷ FFk ⊓ Pk ⊑ Rk }

for e = (e0, . . . , en−1) ∈ {0, 1}n, Ae = { A(a, n) } ∪ { Aei(a, i) | 0 ≤ i < n }

(a, 0) ∈ ans(q, Ae) ⇐ ⇒ the number of 1s in e is even

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

PARITY ∈ NC1 \ AC0 [Furst,Saxe,Sipser,84] q is not FO-rewritable with

any numeric predicate

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 36

slide-75
SLIDE 75

Temporal DL-Lite OMQ rewritability

DL-Lite✷

α

DL-Lite

  • α

DL-Lite✷

α

bool

CONP-hard [2+2 CNF]

krom horn NC1-hard∗∗ NC1-hard∗∗ horn-monotone∗ FO(<) core FO(<, +) ? *role inclusions use ✷ on the right-hand side only. **holds already for OMAQs

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 37

slide-76
SLIDE 76

Temporal DL-Lite OMQ rewritability

DL-Lite✷

α

DL-Lite

  • α

DL-Lite✷

α

bool

CONP-hard [2+2 CNF]

krom horn NC1-hard∗∗ NC1-hard∗∗ horn-monotone∗ FO(<) core FO(<, +) ? *role inclusions use ✷ on the right-hand side only. **holds already for OMAQs Compare to LTL rewitability: OMAQs (Atomic Queries) OMQs LTL✷

α

LTL

  • α

LTL✷

α

LTL✷

α

LTL

  • α

LTL✷

α

bool MSO(<) horn MSO(<) FO(<) MSO(<) krom FO(<) MSO(<) core FO(<,+) MSO(<) ? FO(<) FO(<,+) MSO(<) ?

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 37

slide-77
SLIDE 77

Conclusion

  • Extension the DL-Lite paradigm to the case were both the ontology and

the data are temporally characterized.

  • Data Complexity results on answering temporal OMQs under different log-

ics for representing temporal ontologies.

  • FO(<), FO(<, +) rewriting results for certain classes of temporal ontologies.

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 38

slide-78
SLIDE 78

Future Work

  • FO-rewritability of DL-Lite✷

core OMQs

  • Generalising our FO rewritings of OMQs to (2-sorted) CQs
  • Succinctness (size) of rewritings: combined complexity for classes of OMQs
  • Our rewriting algorithms need to be optimised and evaluated in real-world

application

  • Investigate Datalog rewritabiliy
  • Investigate other form of temporal languages (Intervals, Metric, etc.)

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 39

slide-79
SLIDE 79

Thank you!

Hybrid Reasoning for Intelligent Systems, Freiburg, Germany 12-13/11/18 40