• Keine Ergebnisse gefunden

From Horn-SRIQ to Datalog: A Data-Independent Transformation that Preserves Assertion Entailment

N/A
N/A
Protected

Academic year: 2022

Aktie "From Horn-SRIQ to Datalog: A Data-Independent Transformation that Preserves Assertion Entailment"

Copied!
20
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

From Horn- SRIQ to Datalog:

A Data-Independent Transformation that Preserves Assertion Entailment

David Carral, Larry González, and Patrick Koopmann

(2)

Introduction

(3)

Syntax

C 1 ⊓ … ⊓ C nD C ⊑ ∃ R . D

R . CD C ⊑ ≤ 1R . D R 1 ∘ … ∘ R nS R S

C(a) R(a, b)

Ontologies TBox Axioms

ABox Axioms (or Facts)

P( c ⃗ )

Rules

Facts

P 1 ( x 1 ⃗ ) ∧ … ∧ P n ( x n ⃗ ) → Q( y ⃗ )

Programs

Formulas

Theories

Horn- SRIQ Datalog

O = ( T , F ) P = ( R , F )

(4)

From Horn- SRIQ to Datalog

Definition. A rule set R is an AR-rewriting for a TBox T iff, for all fact sets F ,

* the ontology ( T , F ) and the program ( R , F ) are equi-satisfiable and,

* for all facts 𝞪 over the signature of T , ( T , F ) entails 𝞪 iff ( R , F ) entails 𝞪 . Can we compute AR-rewritings?

* Reasoning in Description Logics by a Reduction to Disjunctive Datalog.

Hustadt, Motik, and Sattler. In Journal of Autom. Reasoning 2007.

* The Combined Approach to Query Answering in Horn- . Carral, Dragoste, and Krötzsch. In KR 2018.

What about Horn- SRIQ ? Yes!

ALCHOIQ

Wait… but why is this interesting?

(5)

Evaluation

(6)

Reasoning with Rewritings

Konclude RDFox

TBox size: 485

Rewriting size: 549 Time: 221s

TBox size: 304

Rewriting size: 367

Time: 182s

(7)

Size of Rewritings

- MOWLCorpus: TBoxes with less 1000 axioms and containing role chain axioms

- 187 TBoxes: 121 computed rewritings w/o OOM errors

(8)

From Horn- ALCHIQ to Datalog

R 1 ∘ … ∘ R nSRS

(9)

Forest Model Property

C ⊑ ∃ R . D C 1 ⊓ … ⊓ C nD

R . CD

C ⊑ ≤ 1R . D

RS

(10)

“Unnamed-to-Named” Consequences

, F C ⊑ ∃ R . D

D ⊑ ∃ S . E

S . EF

R . FG

a : C R

n : D n′ : E

, G S

Successor-to-predecessor Folding

a : C, F b : D C ⊑ ∃ S . E

SR ED

F ⊑ ≤ 1R . D

R S, R

, D n : E

, S

, E C(x)G (x) C(x)F(x)R(x, y)D(y)S(x, y)

C(x)F(x)R(x, y)D(y)E(y)

(11)

Computing AR-Rewritings for Horn- ALCHIQ

5. For all  C ⊑ ≤ 1R . D ∈ 𝒯,

C(x)R(x, y)D (y) ∧ R(x, z)D (z) → yz ∈ ℛ

𝒯

,

C(x)C

1

(x) ∧ … ∧ C

n

(x) ∧ R(x, y)D(y)E( y) ∈ ℛ

𝒯

if  C

1

⊓ … ⊓ C

n

⊑ ∃R . (D ⊓ E ) ∈ Ω(𝒯),  and C(x)C

1

(x) ∧ … ∧ C

n

(x) ∧ R(x, y)D(y)S(x, y) ∈ ℛ

𝒯

if  C

1

⊓ … ⊓ C

n

⊑ ∃(R ⊓ S ) . D ∈ Ω(𝒯) 1. For all  C ⊑ ∀ R . D ∈ 𝒯,

C(x)R(x, y)D( y) ∈ ℛ

𝒯

2. For all  RS ∈ 𝒯, R(x, y)S(x, y) ∈ ℛ

𝒯

4. For all  C

1

⊓ … ⊓ C

n

D ∈ Ω(𝒯), C

1

(x) ∧ … ∧ C

n

(x) → D(x) ∈ ℛ

𝒯

Definition. Consider some Horn-       TBox  𝒯 .

The rule set  ℛ

𝒯

, which is an AR-preserving rewriting for  𝒯 , is defined as follows :

Definition.  Ω(𝒯)  is the set of all axioms of  either of the following forms entailed by  𝒯 .

C

1

⊓ … ⊓ C

n

D

C

1

⊓ … ⊓ C

n

⊑ ∃ (R

1

⊓ … ⊓ R

m

) . (D

1

⊓ … ⊓ D

k

)

Remarks

* is exponential in

* Compute using consequence-based ℛ 𝒯 Ω(𝒯) 𝒯

Successor-to-predecessor Folding

Query Rewriting for Horn- plus Rules.

Eiter, Ortiz, Simkus, Tran, and Xiao. In AAAI 2012.

SHIQ ALCHIQ

3. For all  R

S ∈ 𝒯,

R( y, x)S(x, y) ∈ ℛ

𝒯

(12)

From Horn- SRIQ to Datalog

(13)

Complex Roles and NFA

VXYR, RSTR, WX, RRR

i R R f R

T S ϵ

V X Y

W

q 3

q 1 q 2

𝒩 𝒯 (R) :

𝒯 = { }

(14)

Box Pushing

A ⊑ ∀ R . B ∈ 𝒯 B i R ⊑ ∀ R . B f R ,

AB i R , B f RB,

B f RS . B q 3 , B q 3 ⊑ ∀ T . B f R ,

B i R ⊑ ∀ V . B q 1 , B q 1 ⊑ ∀ X . B q 2 , B q 2 ⊑ ∀ Y . B f R , B q 1 ⊑ ∀ W . B q 2 , B f RB i R

BP(𝒯) ⊇ 𝒯 ∪ {

}

i R R f R

ϵ

V X Y

W

q 3

q 1 q 2

T S

(15)

Definition. Consider some Horn-       TBox  𝒯 . 1. For all roles  R  in  𝒯, compute the NFA  𝒩 𝒯 (R) .

2. Compute the TBox  𝒯′  which results from adding all the axioms obtained via

"box pushing", and then removing all axioms with role chains .

3. Compute the AR-rewriting  ℛ 𝒯′  for the TBox  𝒯′  (as defined in previous slides).

4. The rule set  ℛ 𝒯′  can be used to solve class retrieval "in place" of  𝒯 .

Computing “AR-Rewritings” for Horn- SRIQ

Remarks

* is kind of an “AR-rewriting” for , but only for class assertions!

* is a Horn- 𝒯′ TBox 𝒯

𝒯′ ALCHIQ

SRIQ

(16)

“Unnamed-to-Named” Role Consequences

Unnamed Paths

C ⊑ ∃ R . ⊤ R S

YRSWV

a Y b : C W c S R

V

V q

1

(x, y)R(y, z)V q

2

(x, z) V q

1

(x, y)V q

1

,q

3

( y)V q

3

(x, z) V q

2

(x, y)S( y, z)V q

3

(x, z) V q

3

(x, y)W( y, z)V f

V

(x, z)

Y(x, y)V q

1

(x, y)

C(x)V q

1

,q

3

(x) V f

V

(x, y)V(x, y)

i V V f V

Y q 1 R q 2 S q 3 W

R

(17)

“Unnamed-to-Named” Role Consequences

C ⊑ ∃ R . ⊤ R S

YRSWV

a Y b : C W c

i X V f X

Y q 1 R q 2 S q 3 W

R

V q

1

(x, y)R(y, z)V q

2

(x, z) V q

1

(x, y)V q

1

,q

3

( y)V q

3

(x, z) V q

2

(x, y)S( y, z)V q

3

(x, z) V q

3

(x, y)W( y, z)V f

V

(x, z)

Y(x, y)V q

1

(x, y)

C(x)V q

1

,q

3

(x)

, V q1,q3 V q1

V q3

V f V

Unnamed Paths

V f

V

(x, y)V(x, y)

, V

(18)

Definition. Consider some Horn-       TBox  𝒯 .

The rule set  ℛ

𝒯

, which is an AR-preserving rewriting for  𝒯 , is defined as follows :

Computing AR-Rewritings for Horn- SRIQ

SRIQ

E. For all roles  R  occurring in  𝒯,

for all transitions  i

R

→*

S

q ∈ 𝒩

𝒯

(R)  with  i

R

 the initial state, add  S(x, y)R

q

(x, y) ∈ ℛ

𝒯

, for all states  q  in  𝒩

𝒯

(R),  add  R

iR,q

(x) → R

q

(x, x) ∈ ℛ

𝒯

,

for all transitions  q →*

S

q′ ∈ 𝒩

𝒯

(R),  add  R

q

(x, y)S(y, z)R

q′

(x, z) ∈ ℛ

𝒯

, for all states  q  and  q′  in  𝒩

𝒯

(R),  add  R

q

(x, y)R

q,q′

(y) → R

q′

(x, y) ∈ ℛ

𝒯

,  and  add  R

fR

(x, y)R(x, y)  with  f

R

 the final state.

D. For all roles  R  in  𝒯,  all states  q  and  q′  in  𝒩

𝒯

(R),  and all sets of concepts  C

1

, …, C

n

,  if  C

1

⊓ … ⊓ C

n

Y

q

Y

q′

∈ Ω(𝒯

×

),  then add  C

1

(x) ∧ … ∧ C

n

(x) → R

q,q′

(x) ∈ ℛ

𝒯

.

C. Add all of the rules in the AR-rewriting of  𝒯

×

 to  ℛ

𝒯

 (computed as shown in previous slides).

B. Let  𝒯

×

 be the TBox that results from extending  𝒯

+

 with all axioms obtained via "box pushing" and then removing every axiom with role chains .

A. Let  𝒯

+

= 𝒯 ∪ {X ⊑ ∀ R . YR  a role in  𝒯}  where  X  and  Y  are fresh class names.

Unnamed

paths

(19)

Conclusion

(20)

Summary

Title: From Horn- to Datalog: A Data-Independent Transformation that Preserves Assertion Entailment

Authors: David Carral, Larry González, and Patrick Koopmann Affiliation: TU Dresden

Contributions:

* Theoretical: method to compute AR-rewritings for Horn-

* Practical: the use of rewritings results in performance gains; we can compute AR-rewritings for many real-world TBoxes

Future Work:

* Develop AR-rewritings for more expressive DLs; consider different target and input languages for these rewritings

* Optimise implementation to produce rewritings of smaller size

SRIQ

SRIQ

Referenzen

ÄHNLICHE DOKUMENTE

From each ontology in this corpus of DL ontologies, we re- moved axioms that, after normalisation, were not in Horn- SRIQ u , and selected from the resulting ontology set those

From Horn- SRIQ to Datalog David Carral, Larry González, and Patrick Koopmann.. From Horn- SRIQ

This was expected, and in theory unavoidable, due to the double exponential time complexity of assertion entailment in Horn-SRIQ u : for Datalog, this complexity is only poly-

Since all this can be done with a nondeterministic Turing machine using only polynomial space (in the size of φ), according to [Sav70], satisfiability in EL-LTL with global GCIs can

In this paper we develop an algorithm based on clausal resolution for computing uniform interpolants of TBoxes formulated in the description logic ALC which can preserve all

In this paper we develop an algorithm based on clausal resolution for computing uniform interpolants of TBoxes formulated in the description logic ALC which can pre- serve all

Given a labelled ontology, computing a boundary corre- sponds to reasoning with respect to all contexts simulta- neously, modulo an inexpensive label comparison: given a

Since there appears to be no general automated solution to the ramification problem introduced by general TBoxes, we take a rather pragmatic approach and leave it to the designer of