Lazy Automata Techniques for WS1S (TACAS17) s Fiedor 1 , 2 k 2 u 2 - - PowerPoint PPT Presentation

lazy automata techniques for ws1s
SMART_READER_LITE
LIVE PREVIEW

Lazy Automata Techniques for WS1S (TACAS17) s Fiedor 1 , 2 k 2 u 2 - - PowerPoint PPT Presentation

Lazy Automata Techniques for WS1S (TACAS17) s Fiedor 1 , 2 k 2 u 2 Tom a Luk a s Hol Petr Jank 1 Red Hat, Czech Republic al 2 , 3 s Vojnar 2 Ond rej Leng Tom a 2 Brno University of Technology, Czech Republic 3


slide-1
SLIDE 1

Lazy Automata Techniques for WS1S

(TACAS’17)

Tom´ aˇ s Fiedor1,2 Luk´ aˇ s Hol´ ık2 Petr Jank˚ u2

1Red Hat, Czech Republic

Ondˇ rej Leng´ al2,3 Tom´ aˇ s Vojnar2

2Brno University of Technology, Czech Republic 3Academia Sinica, Taiwan

MOSCA’19

slide-2
SLIDE 2

WS1S

weak monadic second-order logic of one successor

◮ second-order ⇒ quantification over relations; ◮ monadic ⇒ relations are unary (i.e. sets); ◮ weak ⇒ sets are finite; ◮ of one successor ⇒ reasoning about linear structures.

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 2 / 18

slide-3
SLIDE 3

WS1S

weak monadic second-order logic of one successor

◮ second-order ⇒ quantification over relations; ◮ monadic ⇒ relations are unary (i.e. sets); ◮ weak ⇒ sets are finite; ◮ of one successor ⇒ reasoning about linear structures.

corresponds to finite automata [B¨ uchi’60]

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 2 / 18

slide-4
SLIDE 4

WS1S

weak monadic second-order logic of one successor

◮ second-order ⇒ quantification over relations; ◮ monadic ⇒ relations are unary (i.e. sets); ◮ weak ⇒ sets are finite; ◮ of one successor ⇒ reasoning about linear structures.

corresponds to finite automata [B¨ uchi’60] decidable — but NONELEMENTARY

◮ constructive proof via translation to finite automata

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 2 / 18

slide-5
SLIDE 5

Application of WS1S

allows one to define rich invariants

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 3 / 18

slide-6
SLIDE 6

Application of WS1S

allows one to define rich invariants used in tools for checking structural invariants

◮ Pointer Assertion Logic Engine (PALE) ◮ STRucture ANd Data (STRAND) ◮ Unbounded Arrays Bounded Elements (UABE)

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 3 / 18

slide-7
SLIDE 7

Application of WS1S

allows one to define rich invariants used in tools for checking structural invariants

◮ Pointer Assertion Logic Engine (PALE) ◮ STRucture ANd Data (STRAND) ◮ Unbounded Arrays Bounded Elements (UABE)

many other applications

◮ program and protocol verifications, linguistics, theorem provers . . .

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 3 / 18

slide-8
SLIDE 8

Application of WS1S

allows one to define rich invariants used in tools for checking structural invariants

◮ Pointer Assertion Logic Engine (PALE) ◮ STRucture ANd Data (STRAND) ◮ Unbounded Arrays Bounded Elements (UABE)

many other applications

◮ program and protocol verifications, linguistics, theorem provers . . .

decision procedure: the well-known MONA tool

◮ sometimes efficient in practice ◮ other times the complexity strikes back (unavoidable in general) ◮ we try to push the usability border further

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 3 / 18

slide-9
SLIDE 9

WS1S

Syntax:

◮ term ψ ::= X ⊆ Y | Sing(X) | X = {0} | X = σ(Y)

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 4 / 18

slide-10
SLIDE 10

WS1S

Syntax:

◮ term ψ ::= X ⊆ Y | Sing(X) | X = {0} | X = σ(Y) ◮ formula ϕ ::= ψ | ϕ ∧ ϕ | ϕ ∨ ϕ | ¬ϕ | ∃X.ϕ

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 4 / 18

slide-11
SLIDE 11

WS1S

Syntax:

◮ term ψ ::= X ⊆ Y | Sing(X) | X = {0} | X = σ(Y) ◮ formula ϕ ::= ψ | ϕ ∧ ϕ | ϕ ∨ ϕ | ¬ϕ | ∃X.ϕ

Interpretation: over finite subsets of N

◮ models of formulae = assignments of finite sets to variables

sets can be encoded as finite binary strings:

◮ {1, 4, 5} →

Index: Membership: Encoding: 012345 xxx 010011

,

012345 6 xxx x 010011 0

  • r

012345 67 xxx xx 010011 00

. . .

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 4 / 18

slide-12
SLIDE 12

WS1S

Syntax:

◮ term ψ ::= X ⊆ Y | Sing(X) | X = {0} | X = σ(Y) ◮ formula ϕ ::= ψ | ϕ ∧ ϕ | ϕ ∨ ϕ | ¬ϕ | ∃X.ϕ

Interpretation: over finite subsets of N

◮ models of formulae = assignments of finite sets to variables

sets can be encoded as finite binary strings:

◮ {1, 4, 5} →

Index: Membership: Encoding: 012345 xxx 010011

,

012345 6 xxx x 010011 0

  • r

012345 67 xxx xx 010011 00

. . .

Language interpretation L(ϕ):

◮ Alphabet: for each variable, we have one track in the alphabet

  • e.g. X:

Y:

  • is a symbol

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 4 / 18

slide-13
SLIDE 13

WS1S

Syntax:

◮ term ψ ::= X ⊆ Y | Sing(X) | X = {0} | X = σ(Y) ◮ formula ϕ ::= ψ | ϕ ∧ ϕ | ϕ ∨ ϕ | ¬ϕ | ∃X.ϕ

Interpretation: over finite subsets of N

◮ models of formulae = assignments of finite sets to variables

sets can be encoded as finite binary strings:

◮ {1, 4, 5} →

Index: Membership: Encoding: 012345 xxx 010011

,

012345 6 xxx x 010011 0

  • r

012345 67 xxx xx 010011 00

. . .

Language interpretation L(ϕ):

◮ Alphabet: for each variable, we have one track in the alphabet

  • e.g. X:

Y:

  • is a symbol

◮ Models are represented as a stack of (0-padded) binary strings ◮ Example:

{X → ∅, Y → {2, 4}} | = ϕ iff

X: Y: 1 1

  • ∈ L(ϕ)

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 4 / 18

slide-14
SLIDE 14

Deciding WS1S using automata

example of base automaton for X = σ(Y) (successor)

1 2 X: Y:

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • Example:

¬(X ⊆ Y) ∧

  • Sing(Z) ∨ ∃W.W = σ(Z)
  • Fiedor, Hol´

ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 5 / 18

slide-15
SLIDE 15

Deciding WS1S using automata

example of base automaton for X = σ(Y) (successor)

1 2 X: Y:

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • Example:

¬(X ⊆ Y) ∧

  • Sing(Z) ∨ ∃W.W = σ(Z)
  • A1

A2 A3

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 5 / 18

slide-16
SLIDE 16

Deciding WS1S using automata

example of base automaton for X = σ(Y) (successor)

1 2 X: Y:

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • Example:

¬(X ⊆ Y) ∧

  • Sing(Z) ∨ ∃W.W = σ(Z)
  • A1

project W A2 A3 A4

project W: W:

Z: 1

  • → Z: [1]

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 5 / 18

slide-17
SLIDE 17

Deciding WS1S using automata

example of base automaton for X = σ(Y) (successor)

1 2 X: Y:

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • Example:

¬(X ⊆ Y) ∧

  • Sing(Z) ∨ ∃W.W = σ(Z)
  • A1

project W A2 ∪ A4 A2 A3 A7 A4

project W: W:

Z: 1

  • → Z: [1]

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 5 / 18

slide-18
SLIDE 18

Deciding WS1S using automata

example of base automaton for X = σ(Y) (successor)

1 2 X: Y:

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • Example:

¬(X ⊆ Y) ∧

  • Sing(Z) ∨ ∃W.W = σ(Z)
  • A1

project W A2 ∪ A4 A2 A3 complement A6 A7 A4

project W: W:

Z: 1

  • → Z: [1]

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 5 / 18

slide-19
SLIDE 19

Deciding WS1S using automata

example of base automaton for X = σ(Y) (successor)

1 2 X: Y:

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • Example:

¬(X ⊆ Y) ∧

  • Sing(Z) ∨ ∃W.W = σ(Z)
  • A1

project W A2 ∪ A4 A2 A6 ∩ A7 A3 complement A6 A7 A4

project W: W:

Z: 1

  • → Z: [1]

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 5 / 18

slide-20
SLIDE 20

Deciding WS1S using automata

example of base automaton for X = σ(Y) (successor)

1 2 X: Y:

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • Example:

¬(X ⊆ Y) ∧

  • Sing(Z) ∨ ∃W.W = σ(Z)
  • A1

project W A2 ∪ A4 A2 L(A6 ∩ A7)

?

= ∅ A3 complement A6 A7 A4

project W: W:

Z: 1

  • → Z: [1]

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 5 / 18

slide-21
SLIDE 21

How to handle quantification

issue with projection (existential quantification)

◮ after removing of the tracks not all models would be accepted (problem with 0-padding)

  • needed for soundness!
  • for every assignment, it is necesssary to accept all or none encodings

◮ so after projection we need to adjust the final states by saturation

  • pump the final states with all states backward reachable with 0

consider ∃X.X = σ(Y)

1 2 3 X: Y: 1

  • X:

Y:

  • X:

Y: 1

  • X:

Y:

  • AX=σ(Y)

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 6 / 18

slide-22
SLIDE 22

How to handle quantification

issue with projection (existential quantification)

◮ after removing of the tracks not all models would be accepted (problem with 0-padding)

  • needed for soundness!
  • for every assignment, it is necesssary to accept all or none encodings

◮ so after projection we need to adjust the final states by saturation

  • pump the final states with all states backward reachable with 0

consider ∃X.X = σ(Y)

1 2 3 X: Y: 1

  • X:

Y:

  • X:

Y: 1

  • X:

Y:

  • AX=σ(Y)

1 2 3 X: Y: 1

  • X:

Y:

  • X:

Y: 1

  • X:

Y:

  • → Projection on X

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 6 / 18

slide-23
SLIDE 23

How to handle quantification

issue with projection (existential quantification)

◮ after removing of the tracks not all models would be accepted (problem with 0-padding)

  • needed for soundness!
  • for every assignment, it is necesssary to accept all or none encodings

◮ so after projection we need to adjust the final states by saturation

  • pump the final states with all states backward reachable with 0

consider ∃X.X = σ(Y)

1 2 3 X: Y: 1

  • X:

Y:

  • X:

Y: 1

  • X:

Y:

  • AX=σ(Y)

1 2 3 X: Y: 1

  • X:

Y:

  • X:

Y: 1

  • X:

Y:

  • → Projection on X

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 6 / 18

slide-24
SLIDE 24

How to handle quantification

issue with projection (existential quantification)

◮ after removing of the tracks not all models would be accepted (problem with 0-padding)

  • needed for soundness!
  • for every assignment, it is necesssary to accept all or none encodings

◮ so after projection we need to adjust the final states by saturation

  • pump the final states with all states backward reachable with 0

consider ∃X.X = σ(Y)

1 2 3 X: Y: 1

  • X:

Y:

  • X:

Y: 1

  • X:

Y:

  • AX=σ(Y)

1 2 3 X: Y: 1

  • X:

Y:

  • X:

Y: 1

  • X:

Y:

  • → Projection on X

1 2 3 Y: [1] Y: [0] Y: [0] Y: [0]

→ Accepting 0*100*

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 6 / 18

slide-25
SLIDE 25

How to handle quantification

issue with projection (existential quantification)

◮ after removing of the tracks not all models would be accepted (problem with 0-padding)

  • needed for soundness!
  • for every assignment, it is necesssary to accept all or none encodings

◮ so after projection we need to adjust the final states by saturation

  • pump the final states with all states backward reachable with 0

consider ∃X.X = σ(Y)

1 2 3 X: Y: 1

  • X:

Y:

  • X:

Y: 1

  • X:

Y:

  • AX=σ(Y)

1 2 3 X: Y: 1

  • X:

Y:

  • X:

Y: 1

  • X:

Y:

  • → Projection on X

1 2 3 Y: [1] Y: [0] Y: [0] Y: [0]

→ Accepting 0*100* → make to accept 0*10*

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 6 / 18

slide-26
SLIDE 26

Ground Formulae

We focus on validity of ground formulae (all variables are quantified) satisfiability/validity of other formulae: prefixing with ∃/∀

Key observation for ground formulae

| = ϕ iff ε ∈ L(ϕ)

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 7 / 18

slide-27
SLIDE 27

Ground Formulae

We focus on validity of ground formulae (all variables are quantified) satisfiability/validity of other formulae: prefixing with ∃/∀

Key observation for ground formulae

| = ϕ iff ε ∈ L(ϕ) Why? Formula ϕ is valid if it accepts everything (L(ϕ) = Σ∗) Formula ϕ is unsatisfiable if it accepts nothing (L(ϕ) = ∅)

◮ so it is sufficient to just test membership of ε

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 7 / 18

slide-28
SLIDE 28

Issues with constructing automata

¬(X ⊆ Y) ∧

  • Sing(Z) ∨ ∃W.W = σ(Z)
  • A1

project W A2 ∪ A4 A2 L(A6 ∩ A7)

?

= ∅ A3 complement A6 A7 A4

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 8 / 18

slide-29
SLIDE 29

Issues with constructing automata

¬(X ⊆ Y) ∧

  • Sing(Z) ∨ ∃W.W = σ(Z)
  • A1

project W A2 ∪ A4 A2 L(A6 ∩ A7)

?

= ∅ A3 complement A6 A7 A4

1 Constructing the whole automaton, checking ε ∈ L(A) later!

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 8 / 18

slide-30
SLIDE 30

Issues with constructing automata

¬(X ⊆ Y) ∧

  • Sing(Z) ∨ ∃W.W = σ(Z)
  • A1

project W A2 ∪ A4 A2 L(A6 ∩ A7)

?

= ∅ A3 complement A6 A7 A4

1 Constructing the whole automaton, checking ε ∈ L(A) later! 2 Quantifier alternations (∀∃ ¬∃¬∃)

exponential blow-up after subset construction.

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 8 / 18

slide-31
SLIDE 31

Issues with constructing automata

¬(X ⊆ Y) ∧

  • Sing(Z) ∨ ∃W.W = σ(Z)
  • A1

project W A2 ∪ A4 A2 L(A6 ∩ A7)

?

= ∅ A3 complement A6 A7 A4

1 Constructing the whole automaton, checking ε ∈ L(A) later! 2 Quantifier alternations (∀∃ ¬∃¬∃)

exponential blow-up after subset construction.

3 For A6 ∩ A7, what if L(A6) = ∅?

◮ No need to construct A7 and A6 ∩ A7!

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 8 / 18

slide-32
SLIDE 32

Towards Language Terms

¬(X ⊆ Y) ∧

  • Sing(Z) ∨ ∃W.W = σ(Z)
  • A1

project W A2 ∪ A4 A2 L(A6 ∩ A7)

?

= ∅ A3 complement A6 A7 A4

Instead, we:

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 9 / 18

slide-33
SLIDE 33

Towards Language Terms

¬(X ⊆ Y) ∧

  • Sing(Z) ∨ ∃W.W = σ(Z)
  • A1

project W A2 ∪ A4 A2 L(A6 ∩ A7)

?

= ∅ A3 complement A6 A7 A4

Instead, we:

◮ Represent (sub)formulae as so-called language terms

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 9 / 18

slide-34
SLIDE 34

Towards Language Terms

¬(X ⊆ Y) ∧

  • Sing(Z) ∨ ∃W.W = σ(Z)
  • A1

project W A2 ∪ A4 A2 L(A6 ∩ A7)

?

= ∅ A3 complement A6 A7 A4

Instead, we:

◮ Represent (sub)formulae as so-called language terms ◮ Evaluate the ε ∈ L(A) query lazily → on-the-fly

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 9 / 18

slide-35
SLIDE 35

Towards Language Terms

¬(X ⊆ Y) ∧

  • Sing(Z) ∨ ∃W.W = σ(Z)
  • A1

project W A2 ∪ A4 A2 L(A6 ∩ A7)

?

= ∅ A3 complement A6 A7 A4

Instead, we:

◮ Represent (sub)formulae as so-called language terms ◮ Evaluate the ε ∈ L(A) query lazily → on-the-fly ◮ Compute the saturation fixpoints lazily

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 9 / 18

slide-36
SLIDE 36

Towards Language Terms

¬(X ⊆ Y) ∧

  • Sing(Z) ∨ ∃W.W = σ(Z)
  • A1

project W A2 ∪ A4 A2 L(A6 ∩ A7)

?

= ∅ A3 complement A6 A7 A4

Instead, we:

◮ Represent (sub)formulae as so-called language terms ◮ Evaluate the ε ∈ L(A) query lazily → on-the-fly ◮ Compute the saturation fixpoints lazily ◮ Use subsumption to prune state space

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 9 / 18

slide-37
SLIDE 37

Overview of our method

1 Reasoning over language terms

◮ Structure of the terms tϕ ∼ structure of ϕ

  • but terms can be partially evaluated, unfolded, DAGified, etc.

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 10 / 18

slide-38
SLIDE 38

Overview of our method

1 Reasoning over language terms

◮ Structure of the terms tϕ ∼ structure of ϕ

  • but terms can be partially evaluated, unfolded, DAGified, etc.

◮ Leaves of the terms correspond to states of Finite Automata

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 10 / 18

slide-39
SLIDE 39

Overview of our method

1 Reasoning over language terms

◮ Structure of the terms tϕ ∼ structure of ϕ

  • but terms can be partially evaluated, unfolded, DAGified, etc.

◮ Leaves of the terms correspond to states of Finite Automata ◮ Inner nodes:

  • ϕ ∧ ψ tϕ ∩ tψ
  • ϕ ∨ ψ tϕ ∪ tψ

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 10 / 18

slide-40
SLIDE 40

Overview of our method

1 Reasoning over language terms

◮ Structure of the terms tϕ ∼ structure of ϕ

  • but terms can be partially evaluated, unfolded, DAGified, etc.

◮ Leaves of the terms correspond to states of Finite Automata ◮ Inner nodes:

  • ϕ ∧ ψ tϕ ∩ tψ
  • ϕ ∨ ψ tϕ ∪ tψ
  • ¬ϕ tϕ

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 10 / 18

slide-41
SLIDE 41

Overview of our method

1 Reasoning over language terms

◮ Structure of the terms tϕ ∼ structure of ϕ

  • but terms can be partially evaluated, unfolded, DAGified, etc.

◮ Leaves of the terms correspond to states of Finite Automata ◮ Inner nodes:

  • ϕ ∧ ψ tϕ ∩ tψ
  • ϕ ∨ ψ tϕ ∪ tψ
  • ¬ϕ tϕ
  • ∃X.ϕ πx(tϕ) − 0

∗ πX corresponds to the projection of the variable X in L(ϕ) −0∗ corresonds to the left quotient of L(ϕ) Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 10 / 18

slide-42
SLIDE 42

Overview of our method

1 Reasoning over language terms

◮ Structure of the terms tϕ ∼ structure of ϕ

  • but terms can be partially evaluated, unfolded, DAGified, etc.

◮ Leaves of the terms correspond to states of Finite Automata ◮ Inner nodes:

  • ϕ ∧ ψ tϕ ∩ tψ
  • ϕ ∨ ψ tϕ ∪ tψ
  • ¬ϕ tϕ
  • ∃X.ϕ πx(tϕ) − 0

∗ πX corresponds to the projection of the variable X in L(ϕ) −0∗ corresonds to the left quotient of L(ϕ)

2 Validity checking of ground formula ϕ is reduced to the

ε-membership test on tϕ

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 10 / 18

slide-43
SLIDE 43

Overview of our method

1 Reasoning over language terms

◮ Structure of the terms tϕ ∼ structure of ϕ

  • but terms can be partially evaluated, unfolded, DAGified, etc.

◮ Leaves of the terms correspond to states of Finite Automata ◮ Inner nodes:

  • ϕ ∧ ψ tϕ ∩ tψ
  • ϕ ∨ ψ tϕ ∪ tψ
  • ¬ϕ tϕ
  • ∃X.ϕ πx(tϕ) − 0

∗ πX corresponds to the projection of the variable X in L(ϕ) −0∗ corresonds to the left quotient of L(ϕ)

2 Validity checking of ground formula ϕ is reduced to the

ε-membership test on tϕ

◮ Intuition: Automaton either accepts Σ∗ or nothing, so ε test suffices ◮ | = ϕ ⇐ ⇒ ε ∈ tϕ

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 10 / 18

slide-44
SLIDE 44

Overview of our method

3 Lazy evaluation of ε-membership on term t

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 11 / 18

slide-45
SLIDE 45

Overview of our method

3 Lazy evaluation of ε-membership on term t

◮ ε ∈ A ⇔ IA ∩ FA = ∅

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 11 / 18

slide-46
SLIDE 46

Overview of our method

3 Lazy evaluation of ε-membership on term t

◮ ε ∈ A ⇔ IA ∩ FA = ∅ ◮ ε ∈ tϕ ∩ tψ ⇔ ε ∈ tϕ ∧ ε ∈ tψ

  • if ε /

∈ tϕ no need to check if ε ∈ tψ

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 11 / 18

slide-47
SLIDE 47

Overview of our method

3 Lazy evaluation of ε-membership on term t

◮ ε ∈ A ⇔ IA ∩ FA = ∅ ◮ ε ∈ tϕ ∩ tψ ⇔ ε ∈ tϕ ∧ ε ∈ tψ

  • if ε /

∈ tϕ no need to check if ε ∈ tψ

◮ ε ∈ tϕ ∪ tψ ⇔ ε ∈ tϕ ∨ ε ∈ tψ

  • if ε ∈ tϕ no need to check if ε ∈ tψ

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 11 / 18

slide-48
SLIDE 48

Overview of our method

3 Lazy evaluation of ε-membership on term t

◮ ε ∈ A ⇔ IA ∩ FA = ∅ ◮ ε ∈ tϕ ∩ tψ ⇔ ε ∈ tϕ ∧ ε ∈ tψ

  • if ε /

∈ tϕ no need to check if ε ∈ tψ

◮ ε ∈ tϕ ∪ tψ ⇔ ε ∈ tϕ ∨ ε ∈ tψ

  • if ε ∈ tϕ no need to check if ε ∈ tψ

◮ ε ∈ tϕ ⇔ ε / ∈ tϕ

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 11 / 18

slide-49
SLIDE 49

Overview of our method

3 Lazy evaluation of ε-membership on term t

◮ ε ∈ A ⇔ IA ∩ FA = ∅ ◮ ε ∈ tϕ ∩ tψ ⇔ ε ∈ tϕ ∧ ε ∈ tψ

  • if ε /

∈ tϕ no need to check if ε ∈ tψ

◮ ε ∈ tϕ ∪ tψ ⇔ ε ∈ tϕ ∨ ε ∈ tψ

  • if ε ∈ tϕ no need to check if ε ∈ tψ

◮ ε ∈ tϕ ⇔ ε / ∈ tϕ ◮ ε ∈ πX(tϕ) ⇔ ε ∈ tϕ

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 11 / 18

slide-50
SLIDE 50

Overview of our method

3 Lazy evaluation of ε-membership on term t

◮ ε ∈ t − 0

∗ ⇔ ε ∈ t ∨ ε ∈ t − 0 ∨ ε ∈ t − 0 0 ∨ . . .

  • evaluation of the quotients leads to fixpoint computations
  • lazy evaluation iteratively test ε ∈ t, ε ∈ t − 0,. . .
  • . . . until fixpoint reached or satisfying member found

1 2 3 X: Y: 1

  • X:

Y:

  • X:

Y: 1

  • X:

Y:

  • AX=σ(Y)

1 2 3 X: Y: 1

  • X:

Y:

  • X:

Y: 1

  • X:

Y:

  • → Projection on X

1 2 3

Y: [1] Y: [0] Y: [0] Y: [0]

→ Accepting 0*100* → make to accept 0*10* Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 12 / 18

slide-51
SLIDE 51

Overview of our method

3 Lazy evaluation of ε-membership on term t

◮ ε ∈ t − 0

∗ ⇔ ε ∈ t ∨ ε ∈ t − 0 ∨ ε ∈ t − 0 0 ∨ . . .

  • evaluation of the quotients leads to fixpoint computations
  • lazy evaluation iteratively test ε ∈ t, ε ∈ t − 0,. . .
  • . . . until fixpoint reached or satisfying member found

◮ ε ∈ t − 0

  • − 0 on inner nodes: push through to leaves
  • − 0 on leaves: compute 0-predecessors of final states

1 2 3 X: Y: 1

  • X:

Y:

  • X:

Y: 1

  • X:

Y:

  • AX=σ(Y)

1 2 3 X: Y: 1

  • X:

Y:

  • X:

Y: 1

  • X:

Y:

  • → Projection on X

1 2 3

Y: [1] Y: [0] Y: [0] Y: [0]

→ Accepting 0*100* → make to accept 0*10* Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 12 / 18

slide-52
SLIDE 52

Overview of our method

3 Lazy evaluation of ε-membership on term t

◮ ε ∈ t − 0

∗ ⇔ ε ∈ t ∨ ε ∈ t − 0 ∨ ε ∈ t − 0 0 ∨ . . .

  • evaluation of the quotients leads to fixpoint computations
  • lazy evaluation iteratively test ε ∈ t, ε ∈ t − 0,. . .
  • . . . until fixpoint reached or satisfying member found

◮ ε ∈ t − 0

  • − 0 on inner nodes: push through to leaves
  • − 0 on leaves: compute 0-predecessors of final states

1 2 3 X: Y: 1

  • X:

Y:

  • X:

Y: 1

  • X:

Y:

  • AX=σ(Y)

1 2 3 X: Y: 1

  • X:

Y:

  • X:

Y: 1

  • X:

Y:

  • → Projection on X

1 2 3

Y: [1] Y: [0] Y: [0] Y: [0]

→ Accepting 0*100* → make to accept 0*10*

4 Further optimizations

◮ e.g. subsumption, continuations, formula preprocessing, etc.

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 12 / 18

slide-53
SLIDE 53

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-54
SLIDE 54

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y

We represent the formula symbolically as a language term t∃Y.(∃X.ϕ)∧ψ and test the emptiness. ε ∈ t∃Y.(∃X.ϕ)∧ψ ⇐ ⇒ ε ∈ (t∃X.ϕ ∩ tψ) − ¯ 0∗ ⇐ ⇒ ε ∈ t∃X.ϕ ∩ tψ ∨ ε ∈ (t∃X.ϕ ∩ tψ) − ¯ ∨ ε ∈ (t∃X.ϕ ∩ tψ) − ¯ 02 . . . We will demonstrate our method just on testing if ε ∈ t∃X.ϕ ∩ tψ

◮ (some details will be omitted)

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-55
SLIDE 55

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ϕ

The term t∃X.ϕ corresponds to the left subformula ∃X.ϕ

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-56
SLIDE 56

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

The term t∃X.ϕ corresponds to the left subformula ∃X.ϕ

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-57
SLIDE 57

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

The term t∃X.ϕ corresponds to the left subformula ∃X.ϕ The term tψ corresponds to the right subformula ψ

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-58
SLIDE 58

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

We start the emptiness check from final states of leaf automata. (After projection new final states are backward reachable from current final states)

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-59
SLIDE 59

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

We start the emptiness check from final states of leaf automata. (After projection new final states are backward reachable from current final states)

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-60
SLIDE 60

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4} = Fψ = Fϕ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

We start the emptiness check from final states of leaf automata. (After projection new final states are backward reachable from current final states)

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-61
SLIDE 61

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4} = Fψ = Fϕ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

ε ∈ t∃X.ϕ ∩ tψ ⇐ ⇒

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-62
SLIDE 62

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4} = Fψ = Fϕ

ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

ε ∈ t∃X.ϕ ∩ tψ ⇐ ⇒

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-63
SLIDE 63

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4} = Fψ = Fϕ

ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

ε ∈ t∃X.ϕ ∩ tψ ⇐ ⇒ ⇐ ⇒ ε ∈ t∃X.ϕ ∧ ε ∈ tψ

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-64
SLIDE 64

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4} = Fψ = Fϕ

ε

?

∈ t∃X.ϕ ε

?

∈ tψ ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

ε ∈ t∃X.ϕ ∩ tψ ⇐ ⇒ ⇐ ⇒ ε ∈ t∃X.ϕ ∧ ε ∈ tψ

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-65
SLIDE 65

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4} = Fψ = Fϕ

ε

?

∈ t∃X.ϕ ε

?

∈ tψ ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

ε ∈ t∃X.ϕ ⇐ ⇒ ε ∈ tϕ − ¯ 0∗ ⇐ ⇒ ε ∈ tϕ ∨ ε ∈ tϕ − ¯ 0 ∨ ε ∈ tϕ − ¯ 02 . . . ε ∈ tϕ ⇐ ⇒ Iϕ ∩ Fϕ = ∅.

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-66
SLIDE 66

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4} = Fψ = Fϕ

ε

?

∈ t∃X.ϕ ε

?

∈ tψ ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

ε ∈ t∃X.ϕ ⇐ ⇒ ε ∈ tϕ − ¯ 0∗ ⇐ ⇒ ε ∈ tϕ ∨ ε ∈ tϕ − ¯ 0 ∨ ε ∈ tϕ − ¯ 02 . . . ε ∈ tϕ ⇐ ⇒ Iϕ ∩ Fϕ = ∅.

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-67
SLIDE 67

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4}

  • {q0, q2}

?

= ∅ Iϕ Fϕ = Fψ

ε

?

∈ t∃X.ϕ ε

?

∈ tψ ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

ε ∈ t∃X.ϕ ⇐ ⇒ ε ∈ tϕ − ¯ 0∗ ⇐ ⇒ ε ∈ tϕ ∨ ε ∈ tϕ − ¯ 0 ∨ ε ∈ tϕ − ¯ 02 . . . ε ∈ tϕ ⇐ ⇒ Iϕ ∩ Fϕ = ∅.

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-68
SLIDE 68

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4}

  • {q0, q2}

?

= ∅ Iϕ Fϕ = Fψ

ε

?

∈ t∃X.ϕ ε

?

∈ tψ ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

{q0, q2} ∩ {q3, q4} = ∅,. . . . . . but we cannot conclude that ε / ∈ t∃X.ϕ, . . .

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-69
SLIDE 69

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4}

  • {q0, q2}

= ∅ Iϕ Fϕ = Fψ

ε

?

∈ t∃X.ϕ ε

?

∈ tψ ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

{q0, q2} ∩ {q3, q4} = ∅,. . . . . . but we cannot conclude that ε / ∈ t∃X.ϕ, . . .

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-70
SLIDE 70

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4}

  • {q0, q2}

= ∅ Iϕ Fϕ = Fψ

ε

?

∈ t∃X.ϕ ε

?

∈ tψ ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

We have to saturate the final states (because of projection) One step of saturation yields the set of states Fϕ − 0.

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-71
SLIDE 71

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4}

  • {q0, q2}

= ∅ Iϕ Fϕ = Fψ

ε

?

∈ t∃X.ϕ ε

?

∈ tψ ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

We have to saturate the final states (because of projection) One step of saturation yields the set of states Fϕ − 0.

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-72
SLIDE 72

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4} q2 ¯ = Fψ

ε

?

∈ t∃X.ϕ ε

?

∈ tψ ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

We have to saturate the final states (because of projection) One step of saturation yields the set of states Fϕ − 0.

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-73
SLIDE 73

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4} q2 ¯ = Fψ

ε

?

∈ t∃X.ϕ ε

?

∈ tψ ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

We repeat the check: ε ∈ tϕ − 0 ⇐ ⇒ ⇐ ⇒ Iϕ ∩ Fϕ − 0 = ∅

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-74
SLIDE 74

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4} q2 ¯ = Fψ

ε

?

∈ t∃X.ϕ ε

?

∈ tψ ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

We repeat the check: ε ∈ tϕ − 0 ⇐ ⇒ ⇐ ⇒ Iϕ ∩ Fϕ − 0 = ∅

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-75
SLIDE 75

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4, q2}

  • {q0, q2}

?

= ∅ Iϕ Fϕ − ¯ = Fψ

ε

?

∈ t∃X.ϕ ε

?

∈ tψ ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

We repeat the check: ε ∈ tϕ − 0 ⇐ ⇒ ⇐ ⇒ Iϕ ∩ Fϕ − 0 = ∅

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-76
SLIDE 76

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4, q2}

  • {q0, q2}

?

= ∅ Iϕ Fϕ − ¯ = Fψ

ε

?

∈ t∃X.ϕ ε

?

∈ tψ ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

Since {q0, q2} ∩ {q3, q4, q2} = ∅, . . . . . . we conclude that ε ∈ tϕ − 0 and hence ε ∈ t∃X.ϕ.

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-77
SLIDE 77

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4, q2}

  • {q0, q2}

= ∅ Iϕ Fϕ − ¯ = Fψ

ε

?

∈ t∃X.ϕ ε

?

∈ tψ ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

Since {q0, q2} ∩ {q3, q4, q2} = ∅, . . . . . . we conclude that ε ∈ tϕ − 0 and hence ε ∈ t∃X.ϕ.

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-78
SLIDE 78

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4, q2} = Fψ

ε

?

∈ t∃X.ϕ ε

?

∈ tψ ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

However, we cannot short-circuit the test. So we have to compute ε ∈ tψ

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-79
SLIDE 79

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {r2} {q3, q4, q2} = Fψ

ε

?

∈ t∃X.ϕ ε

?

∈ tψ ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

However, we cannot short-circuit the test. So we have to compute ε ∈ tψ

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-80
SLIDE 80

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ {q3, q4, q2} {r2}

  • {r0}

∩ = ∅ Fψ Iψ

ε

?

∈ t∃X.ϕ ε

?

∈ tψ

ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

However, we cannot short-circuit the test. So we have to compute ε ∈ tψ

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-81
SLIDE 81

Validity checking of ∃Y.((∃X.ϕ) ∧ ψ)

∧ ∃Y ∃X ϕ ψ

ε

?

∈ t∃X.ϕ ε

?

∈ tψ

ε

?

∈ t∃X.ϕ ∩ tψ

q0 q1 q2 q3 q4 X: Y: 1 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y: 1

  • X:

Y:

  • X:

Y: 1 1

  • (a) Automaton for ∃X.ϕ

r0 r1 r2 X : Y : 1 X : Y :

  • X :

Y : 1 1 X : Y : 1

  • (b) Automaton for ψ

Until we find satisfying member or all of the fixpoints are computed. . .

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 13 / 18

slide-82
SLIDE 82

Essential Optimizations

lazy evaluation

◮ if one branch of a binary operator suffices: short-circuit!

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 14 / 18

slide-83
SLIDE 83

Essential Optimizations

lazy evaluation

◮ if one branch of a binary operator suffices: short-circuit! ◮ if we find a satisfying guy in a fixpoint computation: short-circuit!

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 14 / 18

slide-84
SLIDE 84

Essential Optimizations

lazy evaluation

◮ if one branch of a binary operator suffices: short-circuit! ◮ if we find a satisfying guy in a fixpoint computation: short-circuit! ◮ but with a caveat!

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 14 / 18

slide-85
SLIDE 85

Essential Optimizations

lazy evaluation

◮ if one branch of a binary operator suffices: short-circuit! ◮ if we find a satisfying guy in a fixpoint computation: short-circuit! ◮ but with a caveat! ◮ the algorithm has 2 interleaved phases:

1

testing ε-membership

2

computing left quotients

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 14 / 18

slide-86
SLIDE 86

Essential Optimizations

lazy evaluation

◮ if one branch of a binary operator suffices: short-circuit! ◮ if we find a satisfying guy in a fixpoint computation: short-circuit! ◮ but with a caveat! ◮ the algorithm has 2 interleaved phases:

1

testing ε-membership

2

computing left quotients

◮ when computing quotients, we may need the result of a previously short-circuited operation

  • one needs to continue unfolding the fixpoint → continuations

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 14 / 18

slide-87
SLIDE 87

Essential Optimizations

lazy evaluation

◮ if one branch of a binary operator suffices: short-circuit! ◮ if we find a satisfying guy in a fixpoint computation: short-circuit! ◮ but with a caveat! ◮ the algorithm has 2 interleaved phases:

1

testing ε-membership

2

computing left quotients

◮ when computing quotients, we may need the result of a previously short-circuited operation

  • one needs to continue unfolding the fixpoint → continuations

combination with the explicit automata procedure (MONA)

◮ we can prepare a minimal automaton for a subformula ◮ reduces the underlying state space ◮ various heuristics

  • we explicitly construct quantifier-free subformulae

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 14 / 18

slide-88
SLIDE 88

Essential Optimizations

Subsumption

◮ when computing fixpoints, some elements can subsume other ◮ keep fixpoint states minimal (cf. antichains) ◮ subsumption even on partially computed elements

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 15 / 18

slide-89
SLIDE 89

Essential Optimizations

Subsumption

◮ when computing fixpoints, some elements can subsume other ◮ keep fixpoint states minimal (cf. antichains) ◮ subsumption even on partially computed elements

Formula pre-processing

◮ pre-processing of the formula can greatly affect performance ◮ anti-prenexing — pushing quantifiers down can reduce the explored state space (even exponentially!)

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 15 / 18

slide-90
SLIDE 90

Experimental Evaluation of our tool GASTON

Results on formulae generated by the UABE tool

◮ Array Theory of Bounded Elements [ZhouHWGS’14] ◮ formulae encode various array invariants

∞ represents that the tool timeouted in 2 minutes

Benchmark MONA GASTON Time [s] Space Time [s] Space a-a 1.51 30 253 ∞ ∞ ex10 6.92 131 835 11.82 82 236 ex11 4.04 2 393 0.10 4 156 ex12 0.11 2 591 5.40 68 159 ex13 0.01 2 601 0.87 16 883 ex16 0.01 3 384 0.18 3 960 ex17 3.15 165 173 0.09 3 952 ex18 0.18 19 463 ∞ ∞ ex2 0.10 26 565 0.01 1 841 ex20 1.26 1 077 0.21 12 266 ex21 1.51 30 253 ∞ ∞ ex4 0.03 6 797 0.33 22 442 ex6 3.69 27 903 21.44 132 848 ex7 0.75 857 0.01 594 ex8 6.83 106 555 0.01 1 624 ex9 6.37 586 447 8.31 412 417 fib 0.04 8 128 22.15 126 688

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 16 / 18

slide-91
SLIDE 91

Experimental Evaluation of our tool GASTON

Results on set of parametrized benchmarks up to k = 20

  • om(k) represents that the tool run out of memory on formula k

∞(k) represents that the tool timeouted in 2 minutes on formula k

Benchmark MONA

DWINA

TOSS COALG SFA GASTON HornLeq

  • om(18)

0.03 0.08 ∞(08) 0.03 0.01 HornLeq (+3)

  • om(18)

∞(11) 0.16 ∞(07) ∞(11) 0.01 HornLeq (+4)

  • om(18)

∞(13) 0.04 ∞(06) ∞(11) 0.01 HornIn

  • om(15)

∞(11) 0.07 ∞(08) ∞(08) 0.01 HornTrans 86.43 ∞(14) N/A N/A 38.56 1.06 SetClosed

  • om(05)

∞(14) ∞(03) ∞(01) ∞(04) ∞(06) SetSingle

  • om(04)

∞(08) 0.10 N/A ∞(03) 0.01 Ex8

  • om(08)

N/A N/A N/A N/A 0.15 Ex11(10)

  • om(14)

N/A N/A N/A N/A 1.62

DWINA: Fiedor et al.: Nested antichains for WS1S

TOSS: Ganzow and Kaizer: New algorithm for weak monadic second-order login on inductive structures COALG: Traytel: A coalgebraic decision procedure for WS1S SFA: D’Antoni and Veanes: Minimization of symbolic automata Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 17 / 18

slide-92
SLIDE 92

Future Work

extension to WSkS

◮ weak monadic second-order logic of k successors ◮ opens whole new world of tree structures

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 18 / 18

slide-93
SLIDE 93

Future Work

extension to WSkS

◮ weak monadic second-order logic of k successors ◮ opens whole new world of tree structures

extension to infinite words/trees

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 18 / 18

slide-94
SLIDE 94

Future Work

extension to WSkS

◮ weak monadic second-order logic of k successors ◮ opens whole new world of tree structures

extension to infinite words/trees application of the ideas in other automata-handling algorithms

Fiedor, Hol´ ık, Jank˚ u, Leng´ al, Vojnar Lazy Automata Techniques for WS1S MOSCA’19 18 / 18