• Keine Ergebnisse gefunden

REWRITING ALCHIQ TO DISJUNCTIVE EXISTENTIAL RULES

N/A
N/A
Protected

Academic year: 2022

Aktie "REWRITING ALCHIQ TO DISJUNCTIVE EXISTENTIAL RULES"

Copied!
22
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

REWRITING ALCH IQ TO DISJUNCTIVE EXISTENTIAL RULES

David Carral Markus Krötzsch Knowledge-Based Systems

TU Dresden

Full paper and video at https://tud.link/h5l5

IJCAI 2020

(2)

Rewriting DLs to Rules

Given a theory T

1

in a logic L

1

and a theory T

2

in a logic L

2

, T

2

is a rewriting of T

1

if,

T

1

, F | = ϕ iff T

2

, F | = ϕ

for every set F of ground facts and every

ground fact ϕ over the signature of T

1

.

(3)

Rules and DLs

Rule languages we encounter:

• Datalog: the “simplest rules conceivable”, e.g., A(x)∧R(x,y)→B(y)

• Datalog: Datalog +∨in heads

• Datalog: Datalog +∃in heads, a.k.a. existential rules

• Datalog∨∃:Datalog +∨and∃in heads

The DLALCH IQcan be normalised to rules of nine forms:

A(x)∧B(x)→C(x) AuBvC A(x)→B(x)∨C(x) AvBtC A(x)∧R(x,y)→B(y) Av ∀R.B A(x)→ ∃y.R(x,y)∧B(y) Av ∃R.B R(x,y)∧R(x,z)→y≈z > v61R.> R(x,y)→S(x,y)∨V(x,y) RvStV R(x,y)∧S(x,y)→V(x,y) RuSvV R(y,x)→S(x,y) RvS

A(x)∧R(x,y)∧B(y)→S(x,y) A◦R◦BvS

) this is polynomial under unary encoding of numbers

(4)

Rules and DLs

Rule languages we encounter:

• Datalog: the “simplest rules conceivable”, e.g., A(x)∧R(x,y)→B(y)

• Datalog: Datalog +∨in heads

• Datalog: Datalog +∃in heads, a.k.a. existential rules

• Datalog∨∃:Datalog +∨and∃in heads

The DLALCH IQcan be normalised to rules of nine forms:

A(x)∧B(x)→C(x) AuBvC A(x)→B(x)∨C(x) AvBtC A(x)∧R(x,y)→B(y) Av ∀R.B A(x)→ ∃y.R(x,y)∧B(y) Av ∃R.B R(x,y)∧R(x,z)→y≈z > v61R.> R(x,y)→S(x,y)∨V(x,y) RvStV R(x,y)∧S(x,y)→V(x,y) RuSvV R(y,x)→S(x,y) RvS

A(x)∧R(x,y)∧B(y)→S(x,y) A◦R◦BvS

) this is polynomial under unary encoding of numbers

(5)

Work Source Target Size Rules Hustadt et al. [2007] ALCH IQ Datalog exp. bounded

Eiter et al. [2012] Horn-SH IQ Datalog exp. bounded Rudolph et al. [2012] SH IQbs Datalog exp. bounded Bienvenu et al. [2014] SH I Datalog exp. bounded Carral et al. [2018] Horn-ALCH OIQ Datalog exp. bounded Carral et al. [2019b] Horn-SH IQ Datalog exp. bounded Horn-SRIQ Datalog 2exp. bounded Ortiz et al. [2010] Horn-ALCH OIQ Datalog poly. unbounded Ahmetaj et al. [2016] ALCH IO Datalog poly. unbounded Krötzsch [2011] EL++ Datalog poly. bounded Carral et al. [2019a] Horn-ALC Datalog poly. bounded

(6)

Work Source Target Size Rules Hustadt et al. [2007] ALCH IQ Datalog exp. bounded

Eiter et al. [2012] Horn-SH IQ Datalog exp. bounded Rudolph et al. [2012] SH IQbs Datalog exp. bounded Bienvenu et al. [2014] SH I Datalog exp. bounded Carral et al. [2018] Horn-ALCH OIQ Datalog exp. bounded Carral et al. [2019b] Horn-SH IQ Datalog exp. bounded Horn-SRIQ Datalog 2exp. bounded Ortiz et al. [2010] Horn-ALCH OIQ Datalog poly. unbounded Ahmetaj et al. [2016] ALCH IO Datalog poly. unbounded Krötzsch [2011] EL++ Datalog poly. bounded Carral et al. [2019a] Horn-ALC Datalog poly. bounded ALCH IQ Datalog poly. unbounded ALCH IQ Datalog∨∃ poly. bounded Horn-ALCH IQ Datalog poly. bounded

NEW!

(7)

From ALCH IQ to Datalog

using types

We decomposeALCH IQmodels into structures of bounded size, i.e. “types”:

c C~

d

~D

s1 ~E1

... s` ~E`

~R

~S1

~S`

A type is given by a fixed number of:

• sets of conceptsC,~ D,~ E~1,. . . ,E~`

• sets of (inverse) relations~R,S~1,. . . ,S~`

• where`is the number ofALCH IQ axioms of formA(x)→ ∃y.R(x,y)∧B(y)

⇒We can represent sets as bit vectors and store types as facts Type(1,0,1,0,1,0,. . .

| {z }

suitably long bit vector

)

AnALCH IQontology is satisfiable iff it admits a consistent set of types.

⇒Datalogencoding: axiomatise required types and consistency conditions

Markus Krötzsch RewritingALCH IQto Disjunctive Existential Rules slide 6 of 9

(8)

From ALCH IQ to Datalog

using types

We decomposeALCH IQmodels into structures of bounded size, i.e. “types”:

c C~

d

~D

s1 ~E1

...

s` ~E`

~R

~S1

~S`

A type is given by a fixed number of:

• sets of conceptsC,~ D,~ E~1,. . . ,E~`

• sets of (inverse) relations~R,S~1,. . . ,S~`

• where`is the number ofALCH IQ axioms of formA(x)→ ∃y.R(x,y)∧B(y)

⇒We can represent sets as bit vectors and store types as facts Type(1,0,1,0,1,0,. . .

| {z }

suitably long bit vector

)

AnALCH IQontology is satisfiable iff it admits a consistent set of types.

⇒Datalogencoding: axiomatise required types and consistency conditions

Markus Krötzsch RewritingALCH IQto Disjunctive Existential Rules slide 6 of 9

(9)

From ALCH IQ to Datalog

using types

We decomposeALCH IQmodels into structures of bounded size, i.e. “types”:

c C~

d

~D

s1 ~E1

...

s` ~E`

~R

~S1

~S`

A type is given by a fixed number of:

• sets of conceptsC,~ D,~ E~1,. . . ,E~`

• sets of (inverse) relations~R,S~1,. . . ,S~`

• where`is the number ofALCH IQ axioms of formA(x)→ ∃y.R(x,y)∧B(y)

⇒We can represent sets as bit vectors and store types as facts Type(1,0,1,0,1,0,. . .

| {z }

suitably long bit vector

)

AnALCH IQontology is satisfiable iff it admits a consistent set of types.

⇒Datalogencoding: axiomatise required types and consistency conditions

Markus Krötzsch RewritingALCH IQto Disjunctive Existential Rules slide 6 of 9

(10)

From ALCH IQ to Datalog

using types

We decomposeALCH IQmodels into structures of bounded size, i.e. “types”:

c C~

d

~D

s1 ~E1

...

s` ~E`

~R

~S1

~S`

A type is given by a fixed number of:

• sets of conceptsC,~ D,~ E~1,. . . ,E~`

• sets of (inverse) relations~R,S~1,. . . ,S~`

• where`is the number ofALCH IQ axioms of formA(x)→ ∃y.R(x,y)∧B(y)

⇒We can represent sets as bit vectors and store types as facts Type(1,0,1,0,1,0,. . .

| {z }

suitably long bit vector

)

AnALCH IQontology is satisfiable iff it admits a consistent set of types.

⇒Datalogencoding: axiomatise required types and consistency conditions

Markus Krötzsch RewritingALCH IQto Disjunctive Existential Rules slide 6 of 9

(11)

From ALCH IQ to Datalog

∨∃

by simulating tableau

We construct a tableau-like structure:

c A

,A

d B

,B

S

,S

n1

A¬,

B

S¬,

R,Succ

n2 A¬,B Succ,R¬,S

n3

A,B Succ,R,S

n4

A,B Succ,R,S

n5 A¬,B Succ,R¬,S

n6

A,B¬

Succ,R,S¬ SameTyp

Succ,R,S¬

Markus Krötzsch RewritingALCH IQto Disjunctive Existential Rules slide 7 of 9

(12)

From ALCH IQ to Datalog

∨∃

by simulating tableau

We construct a tableau-like structure:

c A,A

d B,B S,S

A(x)→A(x) B(x)→B(x) S(x,y)→S(x,y)

n1

A¬,

B

S¬,

R,Succ

n2 A¬,B Succ,R¬,S

n3

A,B Succ,R,S

n4

A,B Succ,R,S

n5 A¬,B Succ,R¬,S

n6

A,B¬

Succ,R,S¬ SameTyp

Succ,R,S¬

Markus Krötzsch RewritingALCH IQto Disjunctive Existential Rules slide 7 of 9

(13)

From ALCH IQ to Datalog

∨∃

by simulating tableau

We construct a tableau-like structure:

c A,A

d B,B S,S

n1

A¬,

B

S¬,

R,Succ

A(x)→ ∃y.R(x,y)∧B(y)∧Succ(x,y) Av ∃R.B

n2 A¬,B Succ,R¬,S

n3

A,B Succ,R,S

n4

A,B Succ,R,S

n5 A¬,B Succ,R¬,S

n6

A,B¬

Succ,R,S¬ SameTyp

Succ,R,S¬

Markus Krötzsch RewritingALCH IQto Disjunctive Existential Rules slide 7 of 9

(14)

From ALCH IQ to Datalog

∨∃

by simulating tableau

We construct a tableau-like structure:

c A,A

d B,B S,S

n1

A¬,B S¬,R,Succ

Succ(x,y)→S(x,y)∨S¬(x,y) Unnamed(x)→A(x)∨A¬(x)

n2 A¬,B Succ,R¬,S

n3

A,B Succ,R,S

n4

A,B Succ,R,S

n5 A¬,B Succ,R¬,S

n6

A,B¬

Succ,R,S¬ SameTyp

Succ,R,S¬

Markus Krötzsch RewritingALCH IQto Disjunctive Existential Rules slide 7 of 9

(15)

From ALCH IQ to Datalog

∨∃

by simulating tableau

We construct a tableau-like structure:

c A,A

d B,B S,S

n1

A¬,B S¬,R,Succ

n2 A¬,B Succ,R¬,S

n3

A,B Succ,R,S

n4

A,B Succ,R,S

n5 A¬,B Succ,R¬,S

n6

A,B¬

Succ,R,S¬ SameTyp

Succ,R,S¬

Markus Krötzsch RewritingALCH IQto Disjunctive Existential Rules slide 7 of 9

(16)

From ALCH IQ to Datalog

∨∃

by simulating tableau

We construct a tableau-like structure:

c A,A

d B,B S,S

n1

A¬,B S¬,R,Succ

n2 A¬,B Succ,R¬,S

n3

A,B Succ,R,S

n4

A,B Succ,R,S

n5 A¬,B Succ,R¬,S

n6

A,B¬

Succ,R,S¬ SameTyp

Succ,R,S¬

Markus Krötzsch RewritingALCH IQto Disjunctive Existential Rules slide 7 of 9

(17)

From ALCH IQ to Datalog

∨∃

by simulating tableau

We construct a tableau-like structure:

c A,A

d B,B S,S

n1

A¬,B S¬,R,Succ

n2 A¬,B Succ,R¬,S

n3

A,B Succ,R,S

n4

A,B Succ,R,S

n5 A¬,B Succ,R¬,S

n6

A,B¬

Succ,R,S¬ SameTyp

Succ,R,S¬

Markus Krötzsch RewritingALCH IQto Disjunctive Existential Rules slide 7 of 9

(18)

From ALCH IQ to Datalog

∨∃

by simulating tableau

We construct a tableau-like structure:

c A,A

d B,B S,S

n1

A¬,B S¬,R,Succ

n2 A¬,B Succ,R¬,S

n3

A,B Succ,R,S

n4

A,B Succ,R,S

n5 A¬,B Succ,R¬,S

n6

A,B¬

Succ,R,S¬ SameTyp

Succ,R,S¬

Markus Krötzsch RewritingALCH IQto Disjunctive Existential Rules slide 7 of 9

(19)

From ALCH IQ to Datalog

∨∃

by simulating tableau

We construct a tableau-like structure:

c A,A

d B,B S,S

n1

A¬,B S¬,R,Succ

n2 A¬,B Succ,R¬,S

n3

A,B Succ,R,S

n4

A,B Succ,R,S

n5 A¬,B Succ,R¬,S

n6

A,B¬ Succ,R,S¬

SameTyp

Succ,R,S¬

Markus Krötzsch RewritingALCH IQto Disjunctive Existential Rules slide 7 of 9

(20)

From ALCH IQ to Datalog

∨∃

by simulating tableau

We construct a tableau-like structure:

c A,A

d B,B S,S

n1

A¬,B S¬,R,Succ

n2 A¬,B Succ,R¬,S

n3

A,B Succ,R,S

n4

A,B Succ,R,S

n5 A¬,B Succ,R¬,S

n6

A,B¬

Succ,R,S¬ SameTyp

Succ,R,S¬

Markus Krötzsch RewritingALCH IQto Disjunctive Existential Rules slide 7 of 9

(21)

From ALCH IQ to Datalog

∨∃

by simulating tableau

We construct a tableau-like structure:

c A,A

d B,B S,S

n1

A¬,B S¬,R,Succ

n2 A¬,B Succ,R¬,S

n3

A,B Succ,R,S

n4

A,B Succ,R,S

n5 A¬,B Succ,R¬,S

n6

A,B¬

Succ,R,S¬ SameTyp

Succ,R,S¬

Markus Krötzsch RewritingALCH IQto Disjunctive Existential Rules slide 7 of 9

(22)

Further Results and Outlook

Result Summary: There are polynomial time, fact-preserving rewritings from

• ALCHIQto Datalog

• ALCHIQto Datalog∨∃

• Horn-ALCH IQto Datalog (not shown here)

where all translations with∃use rules of bounded size on which the (disjunctive) restricted chase will terminate when prioritising rules without∃

Open Challenges

• Can a chase-based system be worst-case optimal for non-Horn logics?

• Rewritings for more DLs (ALCH OIQanyone?)

• Further exploitation in implementations

Markus Krötzsch RewritingALCH IQto Disjunctive Existential Rules slide 8 of 9

Referenzen

ÄHNLICHE DOKUMENTE

Zeitschrift der Deutschen Morgeniändischen Gesellschaft Band 134, Heft 2 (1984).. © Deutsche Morgenländische

means for developing a first current pulse when all of said stored energy has been transferred out through said secondary winding, said first current pulse being applied to

synchronization source to time the sampling intervals. Specifically, a data strobe generator 61 generates a data strobe pulse on the positive-going edge of each signal

A servo circuit for electronically controlling the opera- tion of an electric motor is disclosed. The rotational frequency of the motor is converted into a varying

In accordance one aspect of the invention, the mag- netic disk of the invention comprises plural circumfer- entially spaced data sectors that include at least two sets

Hence, the slowly sinking and presumably finer particles we measured showing characteristic -enhanced REE concentrations and strong positive Ce anomalies, closely

Nevertheless, it reaches the rigid body value at large temperatures (see fig. This is explained by the fact that the time spent in non-symmetric orbitals

ing means for receiving video signals in one format and converting them to signals in a different format, the input to the conventional converter being applied to horizontal