The Complexity of Boundedness for Gu a rded L ogi c s Micha el B - - PowerPoint PPT Presentation

the complexity of boundedness for gu a rded l ogi c s
SMART_READER_LITE
LIVE PREVIEW

The Complexity of Boundedness for Gu a rded L ogi c s Micha el B - - PowerPoint PPT Presentation

The Complexity of Boundedness for Gu a rded L ogi c s Micha el B enedikt 1 , Ba lder ten Ca te 2 , T hom a s C ol c om b et 3 , M i c h a el Va nden B oom 1 1 U ni v ersit y of Ox ford 2 L ogi cB lo x a nd UC Sa nt a C r uz 3 U ni v ersit e Pa


slide-1
SLIDE 1

The Complexity of Boundedness for Guarded Logics

Michael Benedikt1, Balder ten Cate2, Thomas Colcombet3, Michael Vanden Boom1

1University of Oxford 2LogicBlox and UC Santa Cruz 3Universit´

e Paris Diderot

LICS 2015 Kyoto, Japan

1 / 12

slide-2
SLIDE 2

Least fixpoint

Consider ψ(y, Y) positive in Y (of arity m = ∣y∣). For all structures A, the formula ψ induces a monotone operation P(Am) ⟶ P(Am) V ⟼ ψA(V) ∶= {a ∈ Am ∶ A, a, V ⊧ ψ} ⇒ there is a unique least fixpoint [lfpY,y.ψ(y, Y)]A ∶= ⋃α ψα

A

ψ0

A ∶= ∅

ψα+1

A

∶= ψA(ψα

A)

ψλ

A ∶= ⋃ α<λ

ψα

A

2 / 12

slide-3
SLIDE 3

Boundedness problem

Boundedness problem for L Input: ψ(y, Y) ∈ L positive in Y Question: is there n ∈ N s.t. for all structures A, ψn

A = ψn+1 A ?

(i.e. the least fixpoint is always reached within n iterations)

3 / 12

slide-4
SLIDE 4

Boundedness problem

Boundedness problem for L Input: ψ(y, Y) ∈ L positive in Y Question: is there n ∈ N s.t. for all structures A, ψn

A = ψn+1 A ?

(i.e. the least fixpoint is always reached within n iterations) ψ1(xy, Y) ∶= Rxy ∨ ∃z (Rxz ∧ Yzy)

3 / 12

slide-5
SLIDE 5

Boundedness problem

Boundedness problem for L Input: ψ(y, Y) ∈ L positive in Y Question: is there n ∈ N s.t. for all structures A, ψn

A = ψn+1 A ?

(i.e. the least fixpoint is always reached within n iterations) ψ1(xy, Y) ∶= Rxy ∨ ∃z (Rxz ∧ Yzy) unbounded

3 / 12

slide-6
SLIDE 6

Boundedness problem

Boundedness problem for L Input: ψ(y, Y) ∈ L positive in Y Question: is there n ∈ N s.t. for all structures A, ψn

A = ψn+1 A ?

(i.e. the least fixpoint is always reached within n iterations) ψ1(xy, Y) ∶= Rxy ∨ ∃z (Rxz ∧ Yzy) unbounded [lfpY,xy.ψ1] ≡ transitive closure of R

3 / 12

slide-7
SLIDE 7

Boundedness problem

Boundedness problem for L Input: ψ(y, Y) ∈ L positive in Y Question: is there n ∈ N s.t. for all structures A, ψn

A = ψn+1 A ?

(i.e. the least fixpoint is always reached within n iterations) ψ1(xy, Y) ∶= Rxy ∨ ∃z (Rxz ∧ Yzy) unbounded [lfpY,xy.ψ1] ≡ transitive closure of R ψ2(xy, Y) ∶= Rxy ∨ ∃z (Yzy)

3 / 12

slide-8
SLIDE 8

Boundedness problem

Boundedness problem for L Input: ψ(y, Y) ∈ L positive in Y Question: is there n ∈ N s.t. for all structures A, ψn

A = ψn+1 A ?

(i.e. the least fixpoint is always reached within n iterations) ψ1(xy, Y) ∶= Rxy ∨ ∃z (Rxz ∧ Yzy) unbounded [lfpY,xy.ψ1] ≡ transitive closure of R ψ2(xy, Y) ∶= Rxy ∨ ∃z (Yzy) [lfpY,xy.ψ2](xy) ≡ Rxy ∨ ∃z (Rzy)

3 / 12

slide-9
SLIDE 9

Boundedness problem

Boundedness problem for L Input: ψ(y, Y) ∈ L positive in Y Question: is there n ∈ N s.t. for all structures A, ψn

A = ψn+1 A ?

(i.e. the least fixpoint is always reached within n iterations) ψ1(xy, Y) ∶= Rxy ∨ ∃z (Rxz ∧ Yzy) unbounded [lfpY,xy.ψ1] ≡ transitive closure of R ψ2(xy, Y) ∶= Rxy ∨ ∃z (Yzy) bounded [lfpY,xy.ψ2](xy) ≡ Rxy ∨ ∃z (Rzy)

3 / 12

slide-10
SLIDE 10

Some prior results

Boundedness is undecidable for

binary predicate in positive existential FO (i.e. Datalog)

[Hillebrand, Kanellakis, Mairson, Vardi ’95]

monadic predicate in existential FO with inequalities

[Gaifman, Mairson, Sagiv, Vardi ’87]

monadic predicate in FO2

[Kolaitis, Otto ’98]

4 / 12

slide-11
SLIDE 11

Some prior results

Boundedness is undecidable for

binary predicate in positive existential FO (i.e. Datalog)

[Hillebrand, Kanellakis, Mairson, Vardi ’95]

monadic predicate in existential FO with inequalities

[Gaifman, Mairson, Sagiv, Vardi ’87]

monadic predicate in FO2

[Kolaitis, Otto ’98]

Boundedness is decidable for

monadic predicate in positive existential FO (i.e. monadic Datalog)

[Cosmadakis, Gaifman, Kanellakis, Vardi ’88]

2EXPTIME monadic predicate in modal logic

[Otto ’99]

EXPTIME predicates in “guarded logics”

[Blumensath, Otto, Weyer ’14] [B´ ar´ any, ten Cate, Otto ’12]

non-elementary upper bound

4 / 12

slide-12
SLIDE 12

Some prior results

Boundedness is undecidable for

binary predicate in positive existential FO (i.e. Datalog)

[Hillebrand, Kanellakis, Mairson, Vardi ’95]

monadic predicate in existential FO with inequalities

[Gaifman, Mairson, Sagiv, Vardi ’87]

monadic predicate in FO2

[Kolaitis, Otto ’98]

Boundedness is decidable for

monadic predicate in positive existential FO (i.e. monadic Datalog)

[Cosmadakis, Gaifman, Kanellakis, Vardi ’88]

2EXPTIME monadic predicate in modal logic

[Otto ’99]

EXPTIME predicates in “guarded logics”

[Blumensath, Otto, Weyer ’14] [B´ ar´ any, ten Cate, Otto ’12]

non-elementary upper bound

  • ur contribution:

elementary upper bound (or better)

4 / 12

slide-13
SLIDE 13

Guarded logics

FO

ML GF constrain quantification

∃x(G(xy) ∧ ψ(xy)) ∀x(G(xy) → ψ(xy))

[Andr´ eka, van Benthem, N´ emeti ’95-’98]

5 / 12

slide-14
SLIDE 14

Guarded logics

FO

ML GF UNF constrain quantification

∃x(G(xy) ∧ ψ(xy)) ∀x(G(xy) → ψ(xy))

[Andr´ eka, van Benthem, N´ emeti ’95-’98]

constrain negation

∃x(ψ(xy)) ¬ψ(x)

[ten Cate, Segoufin ’11]

5 / 12

slide-15
SLIDE 15

Guarded logics

FO

ML GF GNF UNF constrain quantification

∃x(G(xy) ∧ ψ(xy)) ∀x(G(xy) → ψ(xy))

[Andr´ eka, van Benthem, N´ emeti ’95-’98]

constrain negation

∃x(ψ(xy)) G(xy) ∧ ¬ψ(xy)

[ten Cate, Segoufin ’11] [B´ ar´ any, ten Cate, Segoufin ’11]

5 / 12

slide-16
SLIDE 16

Guarded logics

FO + LFP

Lµ GFP GNFP UNFP constrain quantification

∃x(G(xy) ∧ ψ(xy)) ∀x(G(xy) → ψ(xy))

[Andr´ eka, van Benthem, N´ emeti ’95-’98]

constrain negation

∃x(ψ(xy)) G(xy) ∧ ¬ψ(xy)

[ten Cate, Segoufin ’11] [B´ ar´ any, ten Cate, Segoufin ’11]

6 / 12

slide-17
SLIDE 17

Guarded logics

Guarded logics are expressive. For instance, GNFP captures:

mu-calculus, even with backwards modalities; positive existential FO (i.e. unions of conjunctive queries); description logics including ALC, ALCHIO, ELI; monadic Datalog.

7 / 12

slide-18
SLIDE 18

Guarded logics

Guarded logics are expressive. For instance, GNFP captures:

mu-calculus, even with backwards modalities; positive existential FO (i.e. unions of conjunctive queries); description logics including ALC, ALCHIO, ELI; monadic Datalog.

Guarded logics have many nice model theoretic properties.

GF, UNF, and GNF have finite models. GFP, UNFP, and GNFP have tree-like models (models of bounded tree-width).

7 / 12

slide-19
SLIDE 19

Guarded logics

Guarded logics are expressive. For instance, GNFP captures:

mu-calculus, even with backwards modalities; positive existential FO (i.e. unions of conjunctive queries); description logics including ALC, ALCHIO, ELI; monadic Datalog.

Guarded logics have many nice model theoretic properties.

GF, UNF, and GNF have finite models. GFP, UNFP, and GNFP have tree-like models (models of bounded tree-width).

Guarded logics have nice computational properties.

Satisfiability is decidable, and is 2EXPTIME-complete (even EXPTIME-complete for fixed-width GFP).

7 / 12

slide-20
SLIDE 20

Boundedness for guarded logics

(We say ψ(x) is answer-guarded if it is of the form G(x) ∧ ψ′(x).) Corollary to tree-like model property For ψ in GFP or answer-guarded GNFP: ψ is bounded over all structures iff ψ is bounded over tree-like structures.

8 / 12

slide-21
SLIDE 21

Boundedness for guarded logics

(We say ψ(x) is answer-guarded if it is of the form G(x) ∧ ψ′(x).) Corollary to tree-like model property For ψ in GFP or answer-guarded GNFP: ψ is bounded over all structures iff ψ is bounded over tree-like structures. ⇒ amenable to techniques using tree automata

8 / 12

slide-22
SLIDE 22

Boundedness for guarded logics

(We say ψ(x) is answer-guarded if it is of the form G(x) ∧ ψ′(x).) Corollary to tree-like model property For ψ in GFP or answer-guarded GNFP: ψ is bounded over all structures iff ψ is bounded over tree-like structures. ⇒ amenable to techniques using tree automata Logic-automata connection utilized in Blumensath et al. ’14 but only yields non-elementary complexity since their proof goes via MSO.

8 / 12

slide-23
SLIDE 23

Boundedness for guarded logics

(We say ψ(x) is answer-guarded if it is of the form G(x) ∧ ψ′(x).) Corollary to tree-like model property For ψ in GFP or answer-guarded GNFP: ψ is bounded over all structures iff ψ is bounded over tree-like structures. ⇒ amenable to techniques using tree automata Logic-automata connection utilized in Blumensath et al. ’14 but only yields non-elementary complexity since their proof goes via MSO. Our strategy: construct automata for boundedness problem directly.

8 / 12

slide-24
SLIDE 24

Boundedness for guarded logics

(We say ψ(x) is answer-guarded if it is of the form G(x) ∧ ψ′(x).) Corollary to tree-like model property For ψ in GFP or answer-guarded GNFP: ψ is bounded over all structures iff ψ is bounded over tree-like structures. ⇒ amenable to techniques using tree automata Logic-automata connection utilized in Blumensath et al. ’14 but only yields non-elementary complexity since their proof goes via MSO. Our strategy: construct cost automata for boundedness problem directly.

8 / 12

slide-25
SLIDE 25

Cost automata

Cost automaton A classical automaton + finite set of counters with operations i, r, and ε

9 / 12

slide-26
SLIDE 26

Cost automata

Cost automaton A classical automaton + finite set of counters with operations i, r, and ε Semantics [ [A] ] ∶ trees → N ∪ {∞} [ [A] ](t) ∶= min {n ∶ ∃ run ρ of A on t such that ρ satisfies the acceptance condition and keeps counters below n}

9 / 12

slide-27
SLIDE 27

Cost automata

Cost automaton A classical automaton + finite set of counters with operations i, r, and ε Semantics [ [A] ] ∶ trees → N ∪ {∞} [ [A] ](t) ∶= min {n ∶ ∃ run ρ of A on t such that ρ satisfies the acceptance condition and keeps counters below n} Theorem For all ψ ∈ GNFP[σ], we can construct a 2-way cost automaton Aψ such that ψ is bounded iff ∃ n ∈ N such that ∀ trees t, [ [Aψ] ](t) ≤ n.

9 / 12

slide-28
SLIDE 28

Boundedness for cost automata

Boundedness problem for cost automata Input: cost automaton B Question: is there n ∈ N such that for all trees t, [ [B] ](t) ≤ n?

10 / 12

slide-29
SLIDE 29

Boundedness for cost automata

Boundedness problem for cost automata Input: cost automaton B Question: is there n ∈ N such that for all trees t, [ [B] ](t) ≤ n? Decidability of boundedness is not known in general for cost automata

  • ver infinite trees...

10 / 12

slide-30
SLIDE 30

Boundedness for cost automata

Boundedness problem for cost automata Input: cost automaton B Question: is there n ∈ N such that for all trees t, [ [B] ](t) ≤ n? Decidability of boundedness is not known in general for cost automata

  • ver infinite trees...

...but we are interested in special types of cost automata: 1 counter that is only incremented or left unchanged (never reset). Theorem For some special types of 2-way cost automata, the boundedness problem is decidable in elementary time.

10 / 12

slide-31
SLIDE 31

Summary of results

Theorem Boundedness is decidable in elementary time for answer-guarded GNF and GF.

11 / 12

slide-32
SLIDE 32

Summary of results

Theorem Boundedness is decidable in elementary time for answer-guarded GNF and GF. Using unpublished results of Colcombet, this can be improved to 2EXPTIME, and elementary bound can be extended to answer-guarded GNFP and GFP.

11 / 12

slide-33
SLIDE 33

Summary of results

Theorem Boundedness is decidable in elementary time for answer-guarded GNF and GF. Using unpublished results of Colcombet, this can be improved to 2EXPTIME, and elementary bound can be extended to answer-guarded GNFP and GFP. This yields elementary time algorithms for:

deciding boundedness for some Datalog-like languages

11 / 12

slide-34
SLIDE 34

Summary of results

Theorem Boundedness is decidable in elementary time for answer-guarded GNF and GF. Using unpublished results of Colcombet, this can be improved to 2EXPTIME, and elementary bound can be extended to answer-guarded GNFP and GFP. This yields elementary time algorithms for:

deciding boundedness for some Datalog-like languages deciding FO-rewritability of [lfpY,y.ψ](y) for ψ in answer-guarded GNF or GF (using [B´ ar´ any, ten Cate, Otto ’12])

11 / 12

slide-35
SLIDE 35

Summary of results

Theorem Boundedness is decidable in elementary time for answer-guarded GNF and GF. Using unpublished results of Colcombet, this can be improved to 2EXPTIME, and elementary bound can be extended to answer-guarded GNFP and GFP. This yields elementary time algorithms for:

deciding boundedness for some Datalog-like languages deciding FO-rewritability of [lfpY,y.ψ](y) for ψ in answer-guarded GNF or GF (using [B´ ar´ any, ten Cate, Otto ’12]) deciding FO-rewritability of CQs over guarded and frontier-guarded TGDs (using [B´ ar´ any, Benedikt, ten Cate ’13])

11 / 12

slide-36
SLIDE 36

Conclusion

Boundedness is decidable in elementary time for guarded logics.

Contributions General translation from GNFP to automata that can be used for satisfiability testing and boundedness questions. Finer analysis of complexity of some cost automata constructions.

12 / 12

slide-37
SLIDE 37

Bringing cost capabilities to guarded logics

Syntax of cGNFP[σ] φ ∶∶= ⋯ ∣ [lfpN

Y,y.G(y) ∧ φ(y, Y, Z)](x) for φ positive in Y

where lfpN operators only appear positively in the formula.

slide-38
SLIDE 38

Bringing cost capabilities to guarded logics

Syntax of cGNFP[σ] φ ∶∶= ⋯ ∣ [lfpN

Y,y.G(y) ∧ φ(y, Y, Z)](x) for φ positive in Y

where lfpN operators only appear positively in the formula. Semantics [ [φ] ] ∶ σ-structures → N ∪ {∞} [ [φ] ](A) ∶= min {n ∈ N ∶ A satisfies φ when [lfpN

Y,y.ψ] replaced by ψn}

where ψ0 ∶= ⊥ and ψn ∶= ψ[ψn−1/Y]

slide-39
SLIDE 39

Bringing cost capabilities to guarded logics

Syntax of cGNFP[σ] φ ∶∶= ⋯ ∣ [lfpN

Y,y.G(y) ∧ φ(y, Y, Z)](x) for φ positive in Y

where lfpN operators only appear positively in the formula. Semantics [ [φ] ] ∶ σ-structures → N ∪ {∞} [ [φ] ](A) ∶= min {n ∈ N ∶ A satisfies φ when [lfpN

Y,y.ψ] replaced by ψn}

where ψ0 ∶= ⊥ and ψn ∶= ψ[ψn−1/Y] Example φ(y) ∶= [lfpN

Y,y.Sy ∨ ∃z(Ryz ∧ Yz)](y)

[ [φ] ](A, a) ∶= minimum length of R-chain to reach S from a