lazy automata techniques for ws1s
play

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


  1. Lazy Automata Techniques for WS1S (TACAS’17) 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 Academia Sinica, Taiwan MOSCA’19

  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

  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

  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

  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

  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

  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

  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

  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

  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

  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: Index: 012345 012345 6 012345 67 ◮ { 1 , 4 , 5 } → , or . . . Membership: x � xx �� x � xx �� x x � xx �� xx Encoding: 010011 010011 0 010011 00 Fiedor, Hol´ ık, Jank˚ u, Leng´ al , Vojnar Lazy Automata Techniques for WS1S MOSCA’19 4 / 18

  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: Index: 012345 012345 6 012345 67 ◮ { 1 , 4 , 5 } → , or . . . Membership: x � xx �� x � xx �� x x � xx �� xx Encoding: 010011 010011 0 010011 00 Language interpretation L ( ϕ ) : ◮ Alphabet : for each variable, we have one track in the alphabet • e.g. X : � 0 � is a symbol Y : 0 Fiedor, Hol´ ık, Jank˚ u, Leng´ al , Vojnar Lazy Automata Techniques for WS1S MOSCA’19 4 / 18

  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: Index: 012345 012345 6 012345 67 ◮ { 1 , 4 , 5 } → , or . . . Membership: x � xx �� x � xx �� x x � xx �� xx Encoding: 010011 010011 0 010011 00 Language interpretation L ( ϕ ) : ◮ Alphabet : for each variable, we have one track in the alphabet • e.g. X : � 0 � is a symbol Y : 0 ◮ Models are represented as a stack of (0-padded) binary strings ◮ Example: � 0 �� 0 �� 0 �� 0 �� 0 � X : { X �→ ∅ , Y �→ { 2 , 4 }} | = ϕ iff ∈ L ( ϕ ) Y : 0 0 1 0 1 Fiedor, Hol´ ık, Jank˚ u, Leng´ al , Vojnar Lazy Automata Techniques for WS1S MOSCA’19 4 / 18

  14. Deciding WS1S using automata example of base automaton for X = σ ( Y ) (successor) � 0 � � 0 � X: X: Y: 0 Y: 0 � 0 � � 1 � X: X: Y: 1 Y: 0 0 1 2 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

  15. Deciding WS1S using automata example of base automaton for X = σ ( Y ) (successor) � 0 � � 0 � X: X: Y: 0 Y: 0 � 0 � � 1 � X: X: Y: 1 Y: 0 0 1 2 Example: � � ¬ ( X ⊆ Y ) ∧ Sing ( Z ) ∨ ∃ W . W = σ ( Z ) A 3 A 1 A 2 Fiedor, Hol´ ık, Jank˚ u, Leng´ al , Vojnar Lazy Automata Techniques for WS1S MOSCA’19 5 / 18

  16. Deciding WS1S using automata example of base automaton for X = σ ( Y ) (successor) � 0 � � 0 � X: X: Y: 0 Y: 0 � 0 � � 1 � X: X: Y: 1 Y: 0 0 1 2 Example: � � ¬ ( X ⊆ Y ) ∧ Sing ( Z ) ∨ ∃ W . W = σ ( Z ) A 3 A 1 A 2 project W A 4 � 0 � project W : W : �→ Z : [1] Z : 1 Fiedor, Hol´ ık, Jank˚ u, Leng´ al , Vojnar Lazy Automata Techniques for WS1S MOSCA’19 5 / 18

  17. Deciding WS1S using automata example of base automaton for X = σ ( Y ) (successor) � 0 � � 0 � X: X: Y: 0 Y: 0 � 0 � � 1 � X: X: Y: 1 Y: 0 0 1 2 Example: � � ¬ ( X ⊆ Y ) ∧ Sing ( Z ) ∨ ∃ W . W = σ ( Z ) A 3 A 1 A 2 project W A 4 A 2 ∪ A 4 A 7 � 0 � project W : W : �→ Z : [1] Z : 1 Fiedor, Hol´ ık, Jank˚ u, Leng´ al , Vojnar Lazy Automata Techniques for WS1S MOSCA’19 5 / 18

  18. Deciding WS1S using automata example of base automaton for X = σ ( Y ) (successor) � 0 � � 0 � X: X: Y: 0 Y: 0 � 0 � � 1 � X: X: Y: 1 Y: 0 0 1 2 Example: � � ¬ ( X ⊆ Y ) ∧ Sing ( Z ) ∨ ∃ W . W = σ ( Z ) A 3 A 1 A 2 project W A 4 A 6 complement A 2 ∪ A 4 A 7 � 0 � project W : W : �→ Z : [1] Z : 1 Fiedor, Hol´ ık, Jank˚ u, Leng´ al , Vojnar Lazy Automata Techniques for WS1S MOSCA’19 5 / 18

  19. Deciding WS1S using automata example of base automaton for X = σ ( Y ) (successor) � 0 � � 0 � X: X: Y: 0 Y: 0 � 0 � � 1 � X: X: Y: 1 Y: 0 0 1 2 Example: � � ¬ ( X ⊆ Y ) ∧ Sing ( Z ) ∨ ∃ W . W = σ ( Z ) A 3 A 1 A 2 project W A 4 A 6 complement A 2 ∪ A 4 A 7 A 6 ∩ A 7 � 0 � project W : W : �→ Z : [1] Z : 1 Fiedor, Hol´ ık, Jank˚ u, Leng´ al , Vojnar Lazy Automata Techniques for WS1S MOSCA’19 5 / 18

  20. Deciding WS1S using automata example of base automaton for X = σ ( Y ) (successor) � 0 � � 0 � X: X: Y: 0 Y: 0 � 0 � � 1 � X: X: Y: 1 Y: 0 0 1 2 Example: � � ¬ ( X ⊆ Y ) ∧ Sing ( Z ) ∨ ∃ W . W = σ ( Z ) A 3 A 1 A 2 project W A 4 A 6 complement A 2 ∪ A 4 A 7 ? L ( A 6 ∩ A 7 ) = ∅ � 0 � project W : W : �→ Z : [1] Z : 1 Fiedor, Hol´ ık, Jank˚ u, Leng´ al , Vojnar Lazy Automata Techniques for WS1S MOSCA’19 5 / 18

  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 ) � 0 � � 0 � X: X: Y: 0 Y: 0 � 0 � � 1 � X: X: Y: 1 Y: 0 1 2 3 A X = σ ( Y ) Fiedor, Hol´ ık, Jank˚ u, Leng´ al , Vojnar Lazy Automata Techniques for WS1S MOSCA’19 6 / 18

Recommend


More recommend