Space-Efficient Fragments of Higher-Order Fixpoint Logic Florian - - PowerPoint PPT Presentation

space efficient fragments of higher order fixpoint logic
SMART_READER_LITE
LIVE PREVIEW

Space-Efficient Fragments of Higher-Order Fixpoint Logic Florian - - PowerPoint PPT Presentation

Space-Efficient Fragments of Higher-Order Fixpoint Logic Florian Bruse 1 2 Martin Lange 1 Etienne Lozes 2 1 Universit at Kassel, Germany 2 LSV, ENS Paris-Saclay, France September 8, 2017 Bruse, Lange, Lozes: Space-Efficient Fragments of


slide-1
SLIDE 1

Space-Efficient Fragments of Higher-Order Fixpoint Logic

Florian Bruse 1 2 Martin Lange 1 Etienne Lozes 2

1Universit¨

at Kassel, Germany

2LSV, ENS Paris-Saclay, France

September 8, 2017

slide-2
SLIDE 2

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Motivation

Higher-order Modal Fixpoint Logic:

  • extension of the modal µ-calculus by simply typed λ-calculus
  • very expressive logic, e.g., context-sensitive path languages,

assume-guarantee properties

  • captures time hierarchy: type order k + 1 model checking is

k + 1-EXPTIME complete (via alternating reachability game)

2 / 15

slide-3
SLIDE 3

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Motivation

Higher-order Modal Fixpoint Logic:

  • extension of the modal µ-calculus by simply typed λ-calculus
  • very expressive logic, e.g., context-sensitive path languages,

assume-guarantee properties

  • captures time hierarchy: type order k + 1 model checking is

k + 1-EXPTIME complete (via alternating reachability game) Question: Can we capture space hierarchy?

2 / 15

slide-4
SLIDE 4

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Motivation

Higher-order Modal Fixpoint Logic:

  • extension of the modal µ-calculus by simply typed λ-calculus
  • very expressive logic, e.g., context-sensitive path languages,

assume-guarantee properties

  • captures time hierarchy: type order k + 1 model checking is

k + 1-EXPTIME complete (via alternating reachability game) Question: Can we capture space hierarchy? → Tail-recursive fragment:

  • restrict interplay of fixpoints, mixing with certain operators
  • model-checking for order k + 1 in k-EXPSPACE (via nondet.

reachability game)

2 / 15

slide-5
SLIDE 5

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Motivation

Higher-order Modal Fixpoint Logic:

  • extension of the modal µ-calculus by simply typed λ-calculus
  • very expressive logic, e.g., context-sensitive path languages,

assume-guarantee properties

  • captures time hierarchy: type order k + 1 model checking is

k + 1-EXPTIME complete (via alternating reachability game) Question: Can we capture space hierarchy? → Tail-recursive fragment:

  • restrict interplay of fixpoints, mixing with certain operators
  • model-checking for order k + 1 in k-EXPSPACE (via nondet.

reachability game)

  • matching lower bound via reduction to order-k corridor tiling

problem

2 / 15

slide-6
SLIDE 6

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Motivation

Higher-order Modal Fixpoint Logic:

  • extension of the modal µ-calculus by simply typed λ-calculus
  • very expressive logic, e.g., context-sensitive path languages,

assume-guarantee properties

  • captures time hierarchy: type order k + 1 model checking is

k + 1-EXPTIME complete (via alternating reachability game) Question: Can we capture space hierarchy? → Tail-recursive fragment:

  • restrict interplay of fixpoints, mixing with certain operators
  • model-checking for order k + 1 in k-EXPSPACE (via nondet.

reachability game)

  • matching lower bound via reduction to order-k corridor tiling

problem

  • still very expressive: anbncn path language

2 / 15

slide-7
SLIDE 7

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Syntax of HFL

HFL = modal µ-calculus ϕ ::= P | X | ϕ∨ϕ | ¬ϕ | aϕ | µ X .ϕ plus duals ϕ ∧ ψ, [a]ϕ, ν X natively

3 / 15

slide-8
SLIDE 8

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Syntax of HFL

HFL = modal µ-calculus + simply typed λ-calculus

[Viswanathan2 ’04]

ϕ ::= P | X | x | ϕ∨ϕ | ¬ϕ | aϕ | µ X .ϕ | λ x .ϕ | ϕ ϕ plus duals ϕ ∧ ψ, [a]ϕ, ν X natively

3 / 15

slide-9
SLIDE 9

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Syntax of HFL

HFL = modal µ-calculus + simply typed λ-calculus

[Viswanathan2 ’04]

ϕ ::= P | X | x | ϕ∨ϕ | ¬ϕ | aϕ | µ X .ϕ | λ x .ϕ | ϕ ϕ plus duals ϕ ∧ ψ, [a]ϕ, ν X natively But expressions like aP bP not well defined

3 / 15

slide-10
SLIDE 10

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Syntax of HFL

HFL = modal µ-calculus + simply typed λ-calculus

[Viswanathan2 ’04]

ϕ ::= P | X | x | ϕ∨ϕ | ¬ϕ | aϕ | µ(X : τ).ϕ | λ(x : τ).ϕ | ϕ ϕ plus duals ϕ ∧ ψ, [a]ϕ, ν(X : τ) natively But expressions like aP bP not well defined well-formedness condition given by type system

3 / 15

slide-11
SLIDE 11

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Types

simple types given via τ ::= Pr complete lattice over transition system T = (S, − →, L) [ [Pr] ] := (2S, ⊆)

4 / 15

slide-12
SLIDE 12

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Types

simple types given via τ ::= Pr | τ → τ because of right-associativity: τ = τ1 → . . . → τm → Pr each type induces a complete lattice over transition system T = (S, − →, L) using pointwise orderings ⊑ [ [Pr] ] := (2S, ⊆) [ [σ → τ] ] := ([ [σ] ] → [ [τ] ], ⊑)

4 / 15

slide-13
SLIDE 13

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Semantics by Example

Consider (µX.λx. x ∨ (X [a]x)

  • P.

5 / 15

slide-14
SLIDE 14

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Semantics by Example

Consider (µX.λx. x ∨ (X [a]x)

  • P.

Unfolding via σX.ψ = ψ[σX.ψ/X] yields

  • λx. x ∨
  • µX.λx′. x′ ∨ (X [a]x′)
  • [a]x
  • P.

5 / 15

slide-15
SLIDE 15

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Semantics by Example

Consider (µX.λx. x ∨ (X [a]x)

  • P.

Unfolding via σX.ψ = ψ[σX.ψ/X] yields

  • λx. x ∨
  • µX.λx′. x′ ∨ (X [a]x′)
  • [a]x
  • P.

Using β-reduction we get P ∨

  • µX.λx′. x′ ∨ (X [a]x′)
  • [a]P.

5 / 15

slide-16
SLIDE 16

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Semantics by Example

Consider (µX.λx. x ∨ (X [a]x)

  • P.

Unfolding via σX.ψ = ψ[σX.ψ/X] yields

  • λx. x ∨
  • µX.λx′. x′ ∨ (X [a]x′)
  • [a]x
  • P.

Using β-reduction we get P ∨

  • µX.λx′. x′ ∨ (X [a]x′)
  • [a]P.

More unfolding: P ∨ (λx′. x′ ∨

  • µX.λx′′. x′′ ∨ (X [a]x′′)
  • [a]x′) [a]P.

5 / 15

slide-17
SLIDE 17

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Semantics by Example

Consider (µX.λx. x ∨ (X [a]x)

  • P.

Unfolding via σX.ψ = ψ[σX.ψ/X] yields

  • λx. x ∨
  • µX.λx′. x′ ∨ (X [a]x′)
  • [a]x
  • P.

Using β-reduction we get P ∨

  • µX.λx′. x′ ∨ (X [a]x′)
  • [a]P.

More unfolding: P ∨ (λx′. x′ ∨

  • µX.λx′′. x′′ ∨ (X [a]x′′)
  • [a]x′) [a]P.

More β-reduction: P ∨ [a]P ∨

  • µX.λx′′. x′′ ∨ (X [a]x′′)
  • [a][a]P) .

5 / 15

slide-18
SLIDE 18

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Semantics by Example

Consider (µX.λx. x ∨ (X [a]x)

  • P.

Unfolding via σX.ψ = ψ[σX.ψ/X] yields

  • λx. x ∨
  • µX.λx′. x′ ∨ (X [a]x′)
  • [a]x
  • P.

Using β-reduction we get P ∨

  • µX.λx′. x′ ∨ (X [a]x′)
  • [a]P.

More unfolding: P ∨ (λx′. x′ ∨

  • µX.λx′′. x′′ ∨ (X [a]x′′)
  • [a]x′) [a]P.

More β-reduction: P ∨ [a]P ∨

  • µX.λx′′. x′′ ∨ (X [a]x′′)
  • [a][a]P) .

We get: P ∨ [a]P ∨ [a][a]P ∨ . . . = n

i=0[a]iP

uniform inevitability!

5 / 15

slide-19
SLIDE 19

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Tail-Recursion

Limit use of fp vars: No free fixpoint variables in all subformulas of certain form

  • Form ϕ ∧ ψ: no free fixpoint variables in ϕ
  • Form [a]ϕ: no free fixpoint variables in ϕ
  • Form ¬ϕ: no free fixpoint variables in ϕ
  • Form ψ ϕ: no free fixpoint variables in ϕ

6 / 15

slide-20
SLIDE 20

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Tail-Recursion

Limit use of fp vars: No free fixpoint variables in all subformulas of certain form

  • Form ϕ ∧ ψ: no free fixpoint variables in ϕ
  • Form [a]ϕ: no free fixpoint variables in ϕ
  • Form ¬ϕ: no free fixpoint variables in ϕ
  • Form ψ ϕ: no free fixpoint variables in ϕ

Result: free fixpoint variables not under any of these operators, each fixpoint definition “morally” contains only one variable (modulo nondeterminism), in operator position

6 / 15

slide-21
SLIDE 21

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Tail-Recursion

Limit use of fp vars: No free fixpoint variables in all subformulas of certain form

  • Form ϕ ∧ ψ: no free fixpoint variables in ϕ
  • Form [a]ϕ: no free fixpoint variables in ϕ
  • Form ¬ϕ: no free fixpoint variables in ϕ
  • Form ψ ϕ: no free fixpoint variables in ϕ

Result: free fixpoint variables not under any of these operators, each fixpoint definition “morally” contains only one variable (modulo nondeterminism), in operator position µX.p ∨ (a(X ∧ q)) not tail-recursive

6 / 15

slide-22
SLIDE 22

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Tail-Recursion

Limit use of fp vars: No free fixpoint variables in all subformulas of certain form

  • Form ϕ ∧ ψ: no free fixpoint variables in ϕ
  • Form [a]ϕ: no free fixpoint variables in ϕ
  • Form ¬ϕ: no free fixpoint variables in ϕ
  • Form ψ ϕ: no free fixpoint variables in ϕ

Result: free fixpoint variables not under any of these operators, each fixpoint definition “morally” contains only one variable (modulo nondeterminism), in operator position µX.p ∨ (a(X ∧ q)) not tail-recursive µF.λx.[·]⊥ ∨ (F [·]x))⊥ tail recursive

6 / 15

slide-23
SLIDE 23

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Tail-Recursion

Limit use of fp vars: No free fixpoint variables in all subformulas of certain form

  • Form ϕ ∧ ψ: no free fixpoint variables in ϕ
  • Form [a]ϕ: no free fixpoint variables in ϕ
  • Form ¬ϕ: no free fixpoint variables in ϕ
  • Form ψ ϕ: no free fixpoint variables in ϕ

Result: free fixpoint variables not under any of these operators, each fixpoint definition “morally” contains only one variable (modulo nondeterminism), in operator position µX.p ∨ (a(X ∧ q)) not tail-recursive µF.λx.[·]⊥ ∨ (F [·]x))⊥ tail recursive Thm.: The order (k + 1) model-checking problem for tail-recursive HFL is k-EXPSPACE-complete.

6 / 15

slide-24
SLIDE 24

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Upper Bound - Preparations

Want algorithm in k-fold exponential space → get nondeterminism for free (Savitch’s Theorem)

7 / 15

slide-25
SLIDE 25

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Upper Bound - Preparations

Want algorithm in k-fold exponential space → get nondeterminism for free (Savitch’s Theorem) Consider µ(X : τ). ϕ: Define X 0 = ⊥τ; X i+1 = ϕ[X i/X]

7 / 15

slide-26
SLIDE 26

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Upper Bound - Preparations

Want algorithm in k-fold exponential space → get nondeterminism for free (Savitch’s Theorem) Consider µ(X : τ). ϕ: Define X 0 = ⊥τ; X i+1 = ϕ[X i/X] Over given LTS, µ(: τ)X. ϕ ≡ X m for some m = ht(τ) that is k + 1-fold exponential in size of LTS

7 / 15

slide-27
SLIDE 27

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Upper Bound - Preparations

Want algorithm in k-fold exponential space → get nondeterminism for free (Savitch’s Theorem) Consider µ(X : τ). ϕ: Define X 0 = ⊥τ; X i+1 = ϕ[X i/X] Over given LTS, µ(: τ)X. ϕ ≡ X m for some m = ht(τ) that is k + 1-fold exponential in size of LTS → can be stored with k-fold exponentially many bits same for greatest fixpoints

7 / 15

slide-28
SLIDE 28

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Upper Bound - Preparations

Want algorithm in k-fold exponential space → get nondeterminism for free (Savitch’s Theorem) Consider µ(X : τ). ϕ: Define X 0 = ⊥τ; X i+1 = ϕ[X i/X] Over given LTS, µ(: τ)X. ϕ ≡ X m for some m = ht(τ) that is k + 1-fold exponential in size of LTS → can be stored with k-fold exponentially many bits same for greatest fixpoints Approach: use top-down local model-checking

  • cover fixpoints by unfolding

7 / 15

slide-29
SLIDE 29

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Upper Bound - Preparations

Want algorithm in k-fold exponential space → get nondeterminism for free (Savitch’s Theorem) Consider µ(X : τ). ϕ: Define X 0 = ⊥τ; X i+1 = ϕ[X i/X] Over given LTS, µ(: τ)X. ϕ ≡ X m for some m = ht(τ) that is k + 1-fold exponential in size of LTS → can be stored with k-fold exponentially many bits same for greatest fixpoints Approach: use top-down local model-checking

  • cover fixpoints by unfolding
  • cover ∨, a by free nondeterminism

7 / 15

slide-30
SLIDE 30

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Upper Bound - Preparations

Want algorithm in k-fold exponential space → get nondeterminism for free (Savitch’s Theorem) Consider µ(X : τ). ϕ: Define X 0 = ⊥τ; X i+1 = ϕ[X i/X] Over given LTS, µ(: τ)X. ϕ ≡ X m for some m = ht(τ) that is k + 1-fold exponential in size of LTS → can be stored with k-fold exponentially many bits same for greatest fixpoints Approach: use top-down local model-checking

  • cover fixpoints by unfolding
  • cover ∨, a by free nondeterminism
  • cover ∧, [a], ¬, application via tail-recursion

7 / 15

slide-31
SLIDE 31

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Upper Bound

Model-checking whether state t in some LTS is model of ψ procedure check(s, ϕ, (f1, . . . , fn), η, cnt) consumes

  • a state s

8 / 15

slide-32
SLIDE 32

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Upper Bound

Model-checking whether state t in some LTS is model of ψ procedure check(s, ϕ, (f1, . . . , fn), η, cnt) consumes

  • a state s
  • a subformula ϕ of ψ

8 / 15

slide-33
SLIDE 33

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Upper Bound

Model-checking whether state t in some LTS is model of ψ procedure check(s, ϕ, (f1, . . . , fn), η, cnt) consumes

  • a state s
  • a subformula ϕ of ψ
  • a list (f1, . . . , fn) of arguments to ϕ

8 / 15

slide-34
SLIDE 34

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Upper Bound

Model-checking whether state t in some LTS is model of ψ procedure check(s, ϕ, (f1, . . . , fn), η, cnt) consumes

  • a state s
  • a subformula ϕ of ψ
  • a list (f1, . . . , fn) of arguments to ϕ
  • an environment η for free variables in ϕ

8 / 15

slide-35
SLIDE 35

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Upper Bound

Model-checking whether state t in some LTS is model of ψ procedure check(s, ϕ, (f1, . . . , fn), η, cnt) consumes

  • a state s
  • a subformula ϕ of ψ
  • a list (f1, . . . , fn) of arguments to ϕ
  • an environment η for free variables in ϕ
  • a counter cnt specifying degree of unfolding

8 / 15

slide-36
SLIDE 36

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Upper Bound

Model-checking whether state t in some LTS is model of ψ procedure check(s, ϕ, (f1, . . . , fn), η, cnt) consumes

  • a state s
  • a subformula ϕ of ψ
  • a list (f1, . . . , fn) of arguments to ϕ
  • an environment η for free variables in ϕ
  • a counter cnt specifying degree of unfolding

Behavior of check(s, ϕ, (f1, . . . , fn), η, cnt) depends on form of ϕ:

  • If ϕ is atomic, return true if s |

= ϕ, false else

8 / 15

slide-37
SLIDE 37

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Upper Bound

Model-checking whether state t in some LTS is model of ψ procedure check(s, ϕ, (f1, . . . , fn), η, cnt) consumes

  • a state s
  • a subformula ϕ of ψ
  • a list (f1, . . . , fn) of arguments to ϕ
  • an environment η for free variables in ϕ
  • a counter cnt specifying degree of unfolding

Behavior of check(s, ϕ, (f1, . . . , fn), η, cnt) depends on form of ϕ:

  • If ϕ is atomic, return true if s |

= ϕ, false else

  • If ϕ = aϕ′, guess t with s

a

− → t, return check(t, ϕ′, (f1, . . . , fn), η, cnt).

8 / 15

slide-38
SLIDE 38

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Upper Bound

Model-checking whether state t in some LTS is model of ψ procedure check(s, ϕ, (f1, . . . , fn), η, cnt) consumes

  • a state s
  • a subformula ϕ of ψ
  • a list (f1, . . . , fn) of arguments to ϕ
  • an environment η for free variables in ϕ
  • a counter cnt specifying degree of unfolding

Behavior of check(s, ϕ, (f1, . . . , fn), η, cnt) depends on form of ϕ:

  • If ϕ is atomic, return true if s |

= ϕ, false else

  • If ϕ = aϕ′, guess t with s

a

− → t, return check(t, ϕ′, (f1, . . . , fn), η, cnt).

  • . . .
  • If ϕ = ϕ1 ∧ ϕ2, → ϕ1 has no free fp vars. Return false if

check(s, ϕ1, (f1, . . . , fn), η, cnt) returns false, return check(s, ϕ2, (f1, . . . , fn), η, cnt) else

8 / 15

slide-39
SLIDE 39

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Upper Bound (cont.)

Behavior of check(s, ϕ, (f1, . . . , fn), η, cnt) depends on form of ϕ:

  • If ϕ = ¬ϕ′, → ϕ′ has no free fp vars. Return opposite of

check(s, ϕ′, (f1, . . . , fn), η, cnt)

9 / 15

slide-40
SLIDE 40

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Upper Bound (cont.)

Behavior of check(s, ϕ, (f1, . . . , fn), η, cnt) depends on form of ϕ:

  • If ϕ = ¬ϕ′, → ϕ′ has no free fp vars. Return opposite of

check(s, ϕ′, (f1, . . . , fn), η, cnt)

  • If ϕ = ϕ′ ϕ′′, → ϕ′′ has no free fp vars. Compute fn+1 =

buildFT(ϕ′′, η), return check(s, ϕ′, (f1, . . . , fn, fn+1), η, cnt)

9 / 15

slide-41
SLIDE 41

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Upper Bound (cont.)

Behavior of check(s, ϕ, (f1, . . . , fn), η, cnt) depends on form of ϕ:

  • If ϕ = ¬ϕ′, → ϕ′ has no free fp vars. Return opposite of

check(s, ϕ′, (f1, . . . , fn), η, cnt)

  • If ϕ = ϕ′ ϕ′′, → ϕ′′ has no free fp vars. Compute fn+1 =

buildFT(ϕ′′, η), return check(s, ϕ′, (f1, . . . , fn, fn+1), η, cnt)

  • . . .
  • If ϕ = µ(X : τ). ϕ′, return

check(s, ϕ′, (f1, . . . , fn), η, cnt[X → ht(τ)]).

  • If ϕ = X, X least fp var, return false if cnt(X) = 0, else

return check(s, fp(X), (f1, . . . , fn), η, cnt[X- - ]. buildFT(ϕ, η) calls check(. . . ) again, iterating over all suitable arguments

9 / 15

slide-42
SLIDE 42

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Order-k Corridor Tiling Problem

Instance K is set T = { , , . . . , } of tiles

10 / 15

slide-43
SLIDE 43

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Order-k Corridor Tiling Problem

Instance K is set T = { , , . . . , } of tiles, horizontal and vertical matching relations H and V (indicated by colors)

10 / 15

slide-44
SLIDE 44

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Order-k Corridor Tiling Problem

Instance K is set T = { , , . . . , } of tiles, horizontal and vertical matching relations H and V (indicated by colors), and initial tiles tI = and T = , and final tile tF =

10 / 15

slide-45
SLIDE 45

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Order-k Corridor Tiling Problem

Instance K is set T = { , , . . . , } of tiles, horizontal and vertical matching relations H and V (indicated by colors), and initial tiles tI = and T = , and final tile tF = Start with initial 2n

k wide row,

10 / 15

slide-46
SLIDE 46

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Order-k Corridor Tiling Problem

Instance K is set T = { , , . . . , } of tiles, horizontal and vertical matching relations H and V (indicated by colors), and initial tiles tI = and T = , and final tile tF = Start with initial 2n

k wide row, find matching rows,

10 / 15

slide-47
SLIDE 47

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Order-k Corridor Tiling Problem

Instance K is set T = { , , . . . , } of tiles, horizontal and vertical matching relations H and V (indicated by colors), and initial tiles tI = and T = , and final tile tF = Start with initial 2n

k wide row, find matching rows,

10 / 15

slide-48
SLIDE 48

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Order-k Corridor Tiling Problem

Instance K is set T = { , , . . . , } of tiles, horizontal and vertical matching relations H and V (indicated by colors), and initial tiles tI = and T = , and final tile tF = Start with initial 2n

k wide row, find matching rows, until a row ends

with final tile . . . . . . For k ≥ 0, the order-k corridor tiling problem is k-EXPSPACE hard (van Emde Boas ’97)

10 / 15

slide-49
SLIDE 49

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Jones’ Encoding of Large Numbers

Observation: Numbers up to 2n

k+1 have at most 2n k bits in binary

Fix an LTS with states S = {0, . . . , n − 1}

11 / 15

slide-50
SLIDE 50

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Jones’ Encoding of Large Numbers

Observation: Numbers up to 2n

k+1 have at most 2n k bits in binary

Fix an LTS with states S = {0, . . . , n − 1} Idea (Jones 01): Use states as bits and encode numbers as higher-order functions: 1 2 = 20 + 22 = 5; 1 2 = 21 + 22 = 6

11 / 15

slide-51
SLIDE 51

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Jones’ Encoding of Large Numbers

Observation: Numbers up to 2n

k+1 have at most 2n k bits in binary

Fix an LTS with states S = {0, . . . , n − 1} Idea (Jones 01): Use states as bits and encode numbers as higher-order functions: 1 2 = 20 + 22 = 5; 1 2 = 21 + 22 = 6 f with f ( 0 1 2 ) = f ( 0 1 2 ) = 0 1 2 , f ( 0 1 2 ) = f ( 0 1 2 ) = 0 1 2 , f ( 0 1 2 ) = f ( 0 1 2 ) = 0 1 2 , f ( 0 1 2 ) = f ( 0 1 2 ) = 0 1 2 = 25 + 26 = 32 + 64 = 96

11 / 15

slide-52
SLIDE 52

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Working with Jones Encodings

Add transitions u 1 2 u u u

12 / 15

slide-53
SLIDE 53

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Working with Jones Encodings

Add transitions u, d and e = S × S. 1 2 u u u d d d

12 / 15

slide-54
SLIDE 54

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Working with Jones Encodings

Add transitions u, d and e = S × S. 1 2 u u u d d d → Compare numbers: m1 bigger than m2 if ex. a bit set in m1 not set in m2, and all higher bits are set in m1 if they are set in m2: gt0 = λ(m1, m2 : τ0). e

  • m2 ∧ ¬m1 ∧ [u](m1 ⇒ m2)
  • 12 / 15
slide-55
SLIDE 55

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Working with Jones Encodings

Add transitions u, d and e = S × S. 1 2 u u u d d d → Compare numbers: m1 bigger than m2 if ex. a bit set in m1 not set in m2, and all higher bits are set in m1 if they are set in m2: gt0 = λ(m1, m2 : τ0). e

  • m2 ∧ ¬m1 ∧ [u](m1 ⇒ m2)
  • → Increment a number: Set a bit iff it was set and a lower bit was

not set, or if it was not set and all lower bits were set: inc0 = λ(m: Pr). if m then (d¬m) else ([d]m)

12 / 15

slide-56
SLIDE 56

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Working with Jones Encodings

Add transitions u, d and e = S × S. 1 2 u u u d d d → Compare numbers: m1 bigger than m2 if ex. a bit set in m1 not set in m2, and all higher bits are set in m1 if they are set in m2: gt0 = λ(m1, m2 : τ0). e

  • m2 ∧ ¬m1 ∧ [u](m1 ⇒ m2)
  • → Increment a number: Set a bit iff it was set and a lower bit was

not set, or if it was not set and all lower bits were set: inc0 = λ(m: Pr). if m then (d¬m) else ([d]m) → Find a number matching a predicate: findk = λ(p : τk+1).

  • µ(F : τk → Pr) . λ(m: τk) . ([e](p m)) ∨ F (inck m)
  • zerok
  • 12 / 15
slide-57
SLIDE 57

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Encoding the Corridor Tiling Problem

Fix corridor tiling problem K = (T, H, V , tI, t, tF) and extend LTS from previous slides with propositions pI = {0}, p = {|T| − 2}, pF = {|T| − 1} and transitions h = {(i, j): (ti, tj) ∈ H}, v = {(i, j): (ti, tj) ∈ V }. States double as digits and tiles!

13 / 15

slide-58
SLIDE 58

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Encoding the Corridor Tiling Problem

Fix corridor tiling problem K = (T, H, V , tI, t, tF) and extend LTS from previous slides with propositions pI = {0}, p = {|T| − 2}, pF = {|T| − 1} and transitions h = {(i, j): (ti, tj) ∈ H}, v = {(i, j): (ti, tj) ∈ V }. States double as digits and tiles!

13 / 15

slide-59
SLIDE 59

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Encoding the Corridor Tiling Problem

Fix corridor tiling problem K = (T, H, V , tI, t, tF) and extend LTS from previous slides with propositions pI = {0}, p = {|T| − 2}, pF = {|T| − 1} and transitions h = {(i, j): (ti, tj) ∈ H}, v = {(i, j): (ti, tj) ∈ V }. States double as digits and tiles! Can encode a row of tiles of width 2n

k as function of order 2n k+1

that sends a column number to the singleton set of its tile

13 / 15

slide-60
SLIDE 60

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Encoding the Corridor Tiling Problem

Fix corridor tiling problem K = (T, H, V , tI, t, tF) and extend LTS from previous slides with propositions pI = {0}, p = {|T| − 2}, pF = {|T| − 1} and transitions h = {(i, j): (ti, tj) ∈ H}, v = {(i, j): (ti, tj) ∈ V }. States double as digits and tiles! Can encode a row of tiles of width 2n

k as function of order 2n k+1

that sends a column number to the singleton set of its tile Check for final row: isFinal = λ(r : τk). [e]

  • (r zerok−1) ⇒ pF
  • 13 / 15
slide-61
SLIDE 61

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Lower Bound

Formula that encodes problem:

  • µ(P : τk+1). λ(r1 : τk).(isFinal r1) ∨ (exists succ r1 P)
  • init

where exists succ = λ(r1 : τk, p : τk+1). find

  • λ(r2 : τk). (horiz r2) ∧ (vert r1 r2) ∧ (p r2).

and horizk verifies horizontal matching in row, and verizk verifies that two rows match

14 / 15

slide-62
SLIDE 62

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Lower Bound

Formula that encodes problem:

  • µ(P : τk+1). λ(r1 : τk).(isFinal r1) ∨ (exists succ r1 P)
  • init

where exists succ = λ(r1 : τk, p : τk+1). find

  • λ(r2 : τk). (horiz r2) ∧ (vert r1 r2) ∧ (p r2).

and horizk verifies horizontal matching in row, and verizk verifies that two rows match Not tail-recursive

14 / 15

slide-63
SLIDE 63

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

The Lower Bound

Formula that encodes problem:

  • µ(P : τk+1). λ(r1 : τk).(isFinal r1) ∨ (exists succ r1 P)
  • init

where exists succ = λ(r1 : τk, p : τk+1). find

  • λ(r2 : τk). (horiz r2) ∧ (vert r1 r2) ∧ (p r2).

and horizk verifies horizontal matching in row, and verizk verifies that two rows match Not tail-recursive, but can β-reduce:

  • µ(P : τk+1). λ(r1 : τk).

(. . . ) ∨

  • µ(F : τk+1).λ(r2 : τk)

((. . . ) ∧ (P r2)) ∨ (F (inc r2))

  • r1
  • init

14 / 15

slide-64
SLIDE 64

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Summary

Order-k + 1 tail-recursive HFL captures k-EXPSPACE (as opposed to k + 1-EXPTIME for full k + 1-HFL)

15 / 15

slide-65
SLIDE 65

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Summary

Order-k + 1 tail-recursive HFL captures k-EXPSPACE (as opposed to k + 1-EXPTIME for full k + 1-HFL) Remark: Instead of unlimited ∨, , can also use unlimited ∧, [], but restricted ∨,

15 / 15

slide-66
SLIDE 66

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Summary

Order-k + 1 tail-recursive HFL captures k-EXPSPACE (as opposed to k + 1-EXPTIME for full k + 1-HFL) Remark: Instead of unlimited ∨, , can also use unlimited ∧, [], but restricted ∨, ; can even mix both if “interface” right, i.e., free fp vars separated

15 / 15

slide-67
SLIDE 67

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Summary

Order-k + 1 tail-recursive HFL captures k-EXPSPACE (as opposed to k + 1-EXPTIME for full k + 1-HFL) Remark: Instead of unlimited ∨, , can also use unlimited ∧, [], but restricted ∨, ; can even mix both if “interface” right, i.e., free fp vars separated Further research: Look whether/how much tail-recursion requirement can be removed from low-type fixpoints (probably not entirely)

15 / 15

slide-68
SLIDE 68

Bruse, Lange, Lozes: Space-Efficient Fragments of Higher-Order Fixpoint Logic

Summary

Order-k + 1 tail-recursive HFL captures k-EXPSPACE (as opposed to k + 1-EXPTIME for full k + 1-HFL) Remark: Instead of unlimited ∨, , can also use unlimited ∧, [], but restricted ∨, ; can even mix both if “interface” right, i.e., free fp vars separated Further research: Look whether/how much tail-recursion requirement can be removed from low-type fixpoints (probably not entirely) Thanks!

15 / 15