1 of 28

Reachability analysis of first-order definable pushdown systems

Lorenzo Clemente and Sławomir Lasota

University of Warsaw

Prague, September 2015

2 of 28

At a glance

Model: First-order definable pushdown automata (infinite data domain).

Problem: Reachability analysis.

Solution: Saturation technique in a logical form.

Complexity varies from EXPTIME to undecidable,�depending on the data domain.

3 of 28

At a glance

Model: First-order definable pushdown automata (infinite data domain).

Problem: Reachability analysis.

Solution: Saturation technique in a logical form.

Complexity varies from EXPTIME to undecidable,�depending on the data domain.

Part of an ongoing effort aiming at generalizing automata theory with atoms.

Builds on previous work by Bojańczyk, Klin, Lasota, Ochremiak, Toruńczyk.

4 of 28

Atoms

Fix a logical structure (𝔸, 𝑅1, …, 𝑅j) called atoms.

  • 𝔸 is a countably infinite data domain.
  • 𝑅1, …, 𝑅j are relations over 𝔸.
  • Examples:
    • Equality atoms (𝔸,=).
    • Total order atoms (ℚ,≤).

5 of 28

Atoms

Fix a logical structure (𝔸, 𝑅1, …, 𝑅j) called atoms.

  • 𝔸 is a countably infinite data domain.
  • 𝑅1, …, 𝑅j are relations over 𝔸.
  • Examples:
    • Equality atoms (𝔸,=).
    • Total order atoms (ℚ,≤).

Sets with atoms: Built from ∅, {, }, and elements of 𝔸.

  • Examples: {2, 4, 6, 8, …}, (1,2) = {{1}, {1,2}}, …

6 of 28

Pushdown automata

Classical pushdown automaton〈Σ,𝛤,𝑃,𝜌〉

  • Σ is a finite set of input symbols.
  • 𝛤 is a finite set of stack symbols.
  • 𝑃 is a finite set of control locations.
  • 𝜌 = push ∪ pop, where

push ⊆ 𝑃⨉𝛤⨉Σ⨉𝑃⨉𝛤⨉𝛤

push(𝑝,𝛼,𝑎,𝑞,𝛽,𝛾) = “at location 𝑝 pop 𝛼, read 𝑎, go to loc. 𝑞, and push 𝛽𝛾”

pop ⊆ 𝑃⨉𝛤⨉Σ⨉𝑃

pop(𝑝,𝛼,𝑎,𝑞) = “at location 𝑝 pop 𝛼, read 𝑎, and go to location 𝑞”

7 of 28

Pushdown automata

Fix atoms 𝔸. First-order definable pushdown automaton〈Σ,𝛤,𝑃,𝜌〉over 𝔸:

  • Σ is a first-order definable set of input symbols.
  • 𝛤 is a first-order definable set of stack symbols.
  • 𝑃 is a first-order definable set of control locations.
  • 𝜌 = push ∪ pop, where

push is a first-order definable subset of 𝑃⨉𝛤⨉Σ⨉𝑃⨉𝛤⨉𝛤

push(𝑝,𝛼,𝑎,𝑞,𝛽,𝛾) = “at location 𝑝 pop 𝛼, read 𝑎, go to loc. 𝑞, and push 𝛽𝛾”

pop is a first-order definable subset of 𝑃⨉𝛤⨉Σ⨉𝑃

pop(𝑝,𝛼,𝑎,𝑞) = “at location 𝑝 pop 𝛼, read 𝑎, and go to location 𝑞”

8 of 28

Pushdown automata

Fix atoms 𝔸. First-order definable pushdown automaton〈Σ,𝛤,𝑃,𝜌〉over 𝔸:

  • Σ is a first-order definable set of input symbols.
  • 𝛤 is a first-order definable set of stack symbols.
  • 𝑃 is a first-order definable set of control locations.
  • 𝜌 = push ∪ pop, where

push is a first-order definable subset of 𝑃⨉𝛤⨉Σ⨉𝑃⨉𝛤⨉𝛤

push(𝑝,𝛼,𝑎,𝑞,𝛽,𝛾) = “at location 𝑝 pop 𝛼, read 𝑎, go to loc. 𝑞, and push 𝛽𝛾”

pop is a first-order definable subset of 𝑃⨉𝛤⨉Σ⨉𝑃

pop(𝑝,𝛼,𝑎,𝑞) = “at location 𝑝 pop 𝛼, read 𝑎, and go to location 𝑞”

infinite in two dimensions:�stack + data

9 of 28

Pushdown automata

Fix atoms 𝔸. First-order definable pushdown automaton〈Σ,𝛤,𝑃,𝜌〉over 𝔸:

  • Σ is a first-order definable set of input symbols.
  • 𝛤 is a first-order definable set of stack symbols.
  • 𝑃 is a first-order definable set of control locations.
  • 𝜌 = push ∪ pop, where

push is a first-order definable subset of 𝑃⨉𝛤⨉Σ⨉𝑃⨉𝛤⨉𝛤

push(𝑝,𝛼,𝑎,𝑞,𝛽,𝛾) = “at location 𝑝 pop 𝛼, read 𝑎, go to loc. 𝑞, and push 𝛽𝛾”

pop is a first-order definable subset of 𝑃⨉𝛤⨉Σ⨉𝑃

pop(𝑝,𝛼,𝑎,𝑞) = “at location 𝑝 pop 𝛼, read 𝑎, and go to location 𝑞”

infinite in two dimensions:�stack + data

Related to register and timed automata,�where the components are quantifier-free definable.

10 of 28

Example

Take equality atoms (𝔸,=). Palindromes:

𝐿 = { 𝑎_0...𝑎_2𝑛 ϵ 𝔸* | ∀(0 ≤ 𝑖 ≤ 𝑛) · 𝑎_𝑖 = 𝑎_(2𝑛 − 𝑖) }

Recognized by〈Σ = 𝔸, 𝛤 = 𝔸, 𝑃 = {𝑝, 𝑞}, 𝜌 = push ∪ pop〉with

push(𝑝, 𝑏, 𝑎, 𝑝, 𝑐, 𝑑) if 𝑐 = 𝑎 and 𝑑 = 𝑏

push(𝑝, 𝑏, 𝑎, 𝑞, 𝜀, 𝑐) if 𝑐 = 𝑎

pop(𝑞, 𝑏, 𝑎, 𝑞) if 𝑏 = 𝑎

11 of 28

Example

Take total order atoms (ℚ,≤). Monotone palindromes:

𝐿 = { 𝑎_0...𝑎_2𝑛 ϵ ℚ* | ∀(0 ≤ 𝑖 ≤ 𝑛) · 𝑎_𝑖 ≤ 𝑎_(2𝑛 − 𝑖) }

Recognized by〈Σ = ℚ, 𝛤 = ℚ, 𝑃 = {𝑝, 𝑞}, 𝜌 = push ∪ pop〉with

push(𝑝, 𝑏, 𝑎, 𝑝, 𝑐, 𝑑) if 𝑐 = 𝑎 and 𝑑 = 𝑏

push(𝑝, 𝑏, 𝑎, 𝑞, 𝜀, 𝑐) if 𝑐 = 𝑎

pop(𝑞, 𝑏, 𝑎, 𝑞) if 𝑏 ≤ 𝑎

Orbit-finite sets and automata are represented via first-order formulae.

12 of 28

Reachability analysis

A pushdown automaton〈Σ,𝛤,𝑃,𝜌〉induces an infinite transition system:

  • Configurations are of the form (𝑝,𝑢) ϵ 𝑃⨉𝛤*.
  • There is a transition (𝑝,𝛼𝑢)→(𝑞,𝛽𝛾𝑢) if ∃𝑎 ϵ Σ . push(𝑝,𝛼,𝑎,𝑞,𝛽,𝛾) ϵ 𝜌.
  • There is a transition (𝑝,𝛼𝑢)→(𝑞,𝑢) if ∃𝑎 ϵ Σ . pop(𝑝,𝛼,𝑎,𝑞) ϵ 𝜌.

Reachability problem

Given two configurations (𝑝,𝑢),(𝑞,𝑣) ϵ 𝑃⨉𝛤*, decide whether (𝑝,𝑢) →* (𝑞,𝑣)

13 of 28

Saturation

Reachability can be solved by the classic saturation procedure.

  • Symbolically on the level of formulas.

Two further ingredients for effectiveness:

  • Decidability of satisfiability.

  • Finitely-many equivalence classes of formulas.

14 of 28

Saturation

Reachability can be solved by the classic saturation procedure.

  • Symbolically on the level of formulas.

Two further ingredients for effectiveness:

  • Decidability of satisfiability.

  • Finitely-many equivalence classes of formulas.

This is precisely what oligomorphic atoms give you.

  • Standard notion from model theory.
  • Examples: equality (𝔸,=), total order (ℚ,≤), equivalence, …

15 of 28

Oligomorphic atoms

Theorem 1. Let atoms 𝔸 be oligomorphic with decidable satisfiability. Reachability is decidable for first-order definable pushdown automata.

16 of 28

Oligomorphic atoms

Theorem 1. Let atoms 𝔸 be oligomorphic with decidable satisfiability. Reachability is decidable for first-order definable pushdown automata.

No bound on the complexity!

Complexity of satisfiability

𝐾(𝑛) for formulas�with 𝑛 variables

17 of 28

Oligomorphic atoms

Theorem 1. Let atoms 𝔸 be oligomorphic with decidable satisfiability. Reachability is decidable for first-order definable pushdown automata.

No bound on the complexity!

how many equivalence classes of formulas

Complexity of satisfiability

𝐾(𝑛) for formulas�with 𝑛 variables

can be bounded for homogeneous atoms

18 of 28

Homogeneous atoms

Let 𝑚 be the size of the formulas describing the automaton.

Let 𝐾(𝑛) be the complexity of satisfiability of formulas with 𝑛 variables.

Theorem 2. Let atoms 𝔸 be homogeneous. Reachability has complexity

poly(𝑚) · 2^poly(𝑛) · 𝐾(𝑛)

Theorem 3. Let 𝑋 ⊆ ℕ. There exist an homogeneous structure 𝔸(𝑋) s.t. membership in 𝑋 reduces to reachability of pushdown automata over 𝔸(𝑋).

19 of 28

Homogeneous atoms

Let 𝑚 be the size of the formulas describing the automaton.

Let 𝐾(𝑛) be the complexity of satisfiability of formulas with 𝑛 variables.

Theorem 2. Let atoms 𝔸 be homogeneous. Reachability has complexity

poly(𝑚) · 2^poly(𝑛) · 𝐾(𝑛)

Corollary 3. Reachability is fixed-parameter tractable with the number of variables 𝑛 as the parameter.

Theorem 3. Let 𝑋 ⊆ ℕ. There exist an homogeneous structure 𝔸(𝑋) s.t. membership in 𝑋 reduces to reachability of pushdown automata over 𝔸(𝑋).

20 of 28

Homogeneous atoms

Let 𝑚 be the size of the formulas describing the automaton.

Let 𝐾(𝑛) be the complexity of satisfiability of formulas with 𝑛 variables.

Theorem 2. Let atoms 𝔸 be homogeneous. Reachability has complexity

poly(𝑚) · 2^poly(𝑛) · 𝐾(𝑛)

Corollary 3. Reachability is fixed-parameter tractable with the number of variables 𝑛 as the parameter.

Corollary 4. Let satisfiability be EXPTIME. Then, reachability is EXPTIME.

Theorem 3. Let 𝑋 ⊆ ℕ. There exist an homogeneous structure 𝔸(𝑋) s.t. membership in 𝑋 reduces to reachability of pushdown automata over 𝔸(𝑋).

21 of 28

Homogeneous EXPTIME examples

equality

(𝔸,=)

equivalence

(𝔸,≈)

total order

(ℚ,≤)

betweenness order

(ℚ,𝐵)

cyclic order

(ℚ,𝐾)

partial order

(𝔸,≤)

tree order

(𝔸,≤,𝑅)

preorder

(𝔸,⊑)

graph

(𝔸,𝐸)

tournament

(𝔸,𝑇)

subsumes [Cheng and Kaminski, Acta Inf.’98],� [Murawski, Ramsay, and Tzevelekos, MFCS’14].

- Multidimensional stack alphabet vs. 1-dimensional.

- First-order definable transitions vs. quantifier-free.

22 of 28

Homogeneous EXPTIME examples

equality

(𝔸,=)

equivalence

(𝔸,≈)

total order

(ℚ,≤)

betweenness order

(ℚ,𝐵)

cyclic order

(ℚ,𝐾)

partial order

(𝔸,≤)

tree order

(𝔸,≤,𝑅)

preorder

(𝔸,⊑)

graph

(𝔸,𝐸)

tournament

(𝔸,𝑇)

23 of 28

Infinitely many examples

Let 𝔸 ⊗ 𝔹 denote the wreath product of two structures 𝔸, 𝔹.

  • Replace each element in 𝔸 by a disjoint copy of 𝔹.
  • Relations are induced lexicographically (𝔸 has precedence on 𝔹).

Observation. If 𝔸 and 𝔹 are homogeneous, so it is 𝔸 ⊗ 𝔹. Moreover, satisfiability in 𝔸 ⊗ 𝔹 reduces efficiently to satisfiability in 𝔸 and in 𝔹.

24 of 28

Infinitely many examples

Let 𝔸 ⊗ 𝔹 denote the wreath product of two structures 𝔸, 𝔹.

  • Replace each element in 𝔸 by a disjoint copy of 𝔹.
  • Relations are induced lexicographically (𝔸 has precedence on 𝔹).

Observation. If 𝔸 and 𝔹 are homogeneous, so it is 𝔸 ⊗ 𝔹. Moreover, satisfiability in 𝔸 ⊗ 𝔹 reduces efficiently to satisfiability in 𝔸 and in 𝔹.

Examples:

  • Equivalence atoms: (𝔸,=) ⊗ (𝔸,=)
  • Nested equality atoms: (𝔸,=) ⊗ (𝔸,=) ⊗ ⋯ ⊗ (𝔸,=)
  • XYZ atoms: (ℚ,𝐾) ⊗ (𝔸,≤,𝑅) ⊗ (𝔸,𝑇)

homogeneous with EXPTIME satisfiability!

25 of 28

Non-example

Timed atoms (ℚ,≤,+1) are not homogeneous (not even oligomorphic).

Theorem [Clemente, Lasota - LICS’15]. Reachability in a class of pushdown automata over timed atoms is in NEXPTIME.

  • Obtained with ad-hoc techniques.
  • Does not seem to follow from general model-theoretic properties.

26 of 28

Summary

Reachability in pushdown automata:

  • Decidable over oligomorphic atoms with decidable satisfiability.
  • In EXPTIME over homogeneous atoms with efficient satisfiability.
    • Equality atoms, equivalence atoms, total order atoms, …
    • Infinitely many examples using the wreath product.
  • EXPTIME-hardness is shown in [Murawski, Ramsay, and Tzevelekos, MFCS’14] already for equality atoms.

Arbitrary high complexity depending on the hardness of satisfiability.

27 of 28

Future directions

Proof of concept for further generalizations:

  • Data pushdown languages (pushdown automata and CF grammars).
  • Data Petri nets.
  • Lossy channels.
  • 1-register alternating automata.
  • Rewriting automata.
  • Timed extensions thereof.

28 of 28

Advertisement

Atoms blog: http://atoms.mimuw.edu.pl