nested antichains for ws1s
play

Nested Antichains for WS1S s Fiedor 1 , 2 k 2 Tom a Luk a s Hol - PowerPoint PPT Presentation

Nested Antichains for WS1S s Fiedor 1 , 2 k 2 Tom a Luk a s Hol 1 Red Hat, Czech Republic al 2 s Vojnar 2 Ond rej Leng Tom a 2 Brno University of Technology, Czech Republic AVM15 WS1S weak monadic second-order


  1. Nested Antichains for WS1S s Fiedor 1 , 2 ık 2 Tom´ aˇ Luk´ aˇ s Hol´ 1 Red Hat, Czech Republic al 2 s Vojnar 2 Ondˇ rej Leng´ Tom´ aˇ 2 Brno University of Technology, Czech Republic AVM’15

  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. corresponds to finite automata [B¨ uchi’60] decidable T. Fiedor Nested Antichains for WS1S AVM’15 2 / 17

  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] decidable — but NONELEMENTARY ◮ constructive proof via translation to finite automata T. Fiedor Nested Antichains for WS1S AVM’15 2 / 17

  4. Application of WS1S allows one to define rich invariants famous decision procedure: the MONA tool ◮ often efficient (in practice) used in tools for checking structural invariants ◮ Pointer Assertion Logic Engine ( PALE ) ◮ STRucture ANd Data ( STRAND ) many other applications ◮ program and protocol verifications, linguistics, theorem provers . . . T. Fiedor Nested Antichains for WS1S AVM’15 3 / 17

  5. Application of WS1S allows one to define rich invariants famous decision procedure: the MONA tool ◮ often efficient (in practice) used in tools for checking structural invariants ◮ Pointer Assertion Logic Engine ( PALE ) ◮ STRucture ANd Data ( STRAND ) many other applications ◮ program and protocol verifications, linguistics, theorem provers . . . but sometimes the complexity strikes back ◮ unavoidable in general ◮ however, we try to push the usability border further • using the recent advancements in non-deterministic automata T. Fiedor Nested Antichains for WS1S AVM’15 3 / 17

  6. WS1S Syntax: ◮ term ψ ::= X ⊆ Y | Sing ( X ) | X = { 0 } | X = σ ( Y ) ◮ formula ϕ ::= ψ | ϕ ∧ ϕ | ϕ ∨ ϕ | ¬ ϕ | ∃ X .ϕ Interpretation: over finite subsets of N ◮ models of formulae = assignments of sets to variables sets can be encoded as binary strings: Index: 012345 0123456 01234567 ◮ { 1 , 4 , 5 } → , or . . . Membership: x � xx �� x � xx �� x x � xx �� xx Encoding: 010011 0100110 01001100 for each variable we have one track in the alphabet � 0 � ◮ e.g. is symbol 0 = ϕ def � 0 �� 0 �� 0 �� 0 �� 0 � ⇔ X 1 : Example: { X 1 �→ ∅ , X 2 �→ { 4 , 2 }} | ∈ L ( A ϕ ) X 2 : 0 0 1 0 1 T. Fiedor Nested Antichains for WS1S AVM’15 4 / 17

  7. Deciding WS1S using deterministic automata example of base automaton for X = σ ( Y ) � 0 � � 0 � X: X: Y: 0 Y: 0 X: � 0 � X: � 1 � Y: 1 Y: 0 0 1 2 Example: ¬ ( X ⊆ Y ) ∧ ∃ Z . Sing ( Z ) ∨ ∃ W . W = σ ( Z ) T. Fiedor Nested Antichains for WS1S AVM’15 5 / 17

  8. Deciding WS1S using deterministic automata example of base automaton for X = σ ( Y ) � 0 � � 0 � X: X: Y: 0 Y: 0 X: � 0 � X: � 1 � Y: 1 Y: 0 0 1 2 Example: ¬ ( X ⊆ Y ) ∧ ∃ Z . Sing ( Z ) ∨ ∃ W . W = σ ( Z ) A 3 A 1 A 2 T. Fiedor Nested Antichains for WS1S AVM’15 5 / 17

  9. Deciding WS1S using deterministic automata example of base automaton for X = σ ( Y ) � 0 � � 0 � X: X: Y: 0 Y: 0 X: � 0 � X: � 1 � Y: 1 Y: 0 0 1 2 Example: ¬ ( X ⊆ Y ) ∧ ∃ Z . Sing ( Z ) ∨ ∃ W . W = σ ( Z ) A 3 A 1 A 2 A 4 project W T. Fiedor Nested Antichains for WS1S AVM’15 5 / 17

  10. Deciding WS1S using deterministic automata example of base automaton for X = σ ( Y ) � 0 � � 0 � X: X: Y: 0 Y: 0 X: � 0 � X: � 1 � Y: 1 Y: 0 0 1 2 Example: ¬ ( X ⊆ Y ) ∧ ∃ Z . Sing ( Z ) ∨ ∃ W . W = σ ( Z ) A 3 A 1 A 2 A 4 project W A 2 ∪ A 4 T. Fiedor Nested Antichains for WS1S AVM’15 5 / 17

  11. Deciding WS1S using deterministic automata example of base automaton for X = σ ( Y ) � 0 � � 0 � X: X: Y: 0 Y: 0 X: � 0 � X: � 1 � Y: 1 Y: 0 0 1 2 Example: ¬ ( X ⊆ Y ) ∧ ∃ Z . Sing ( Z ) ∨ ∃ W . W = σ ( Z ) A 3 A 1 A 2 A 4 project W A 2 ∪ A 4 project Z A 7 T. Fiedor Nested Antichains for WS1S AVM’15 5 / 17

  12. Deciding WS1S using deterministic automata example of base automaton for X = σ ( Y ) � 0 � � 0 � X: X: Y: 0 Y: 0 X: � 0 � X: � 1 � Y: 1 Y: 0 0 1 2 Example: ¬ ( X ⊆ Y ) ∧ ∃ Z . Sing ( Z ) ∨ ∃ W . W = σ ( Z ) A 3 A 1 A 2 A 4 project W A 6 complement A 2 ∪ A 4 project Z A 7 T. Fiedor Nested Antichains for WS1S AVM’15 5 / 17

  13. Deciding WS1S using deterministic automata example of base automaton for X = σ ( Y ) � 0 � � 0 � X: X: Y: 0 Y: 0 X: � 0 � X: � 1 � Y: 1 Y: 0 0 1 2 Example: ¬ ( X ⊆ Y ) ∧ ∃ Z . Sing ( Z ) ∨ ∃ W . W = σ ( Z ) A 3 A 1 A 2 A 4 project W A 6 complement A 2 ∪ A 4 project Z A 7 A 6 ∩ A 7 T. Fiedor Nested Antichains for WS1S AVM’15 5 / 17

  14. How to handle quantification issue with projection (existential quantification) ◮ after removing of the tracks not all models would be accepted ◮ so we need to adjust the final states � 0 � � 0 � X: X: Y: 0 Y: 0 � 0 � � 1 � X: X: Y: 1 Y: 0 1 2 3 A X = σ ( Y ) T. Fiedor Nested Antichains for WS1S AVM’15 6 / 17

  15. How to handle quantification issue with projection (existential quantification) ◮ after removing of the tracks not all models would be accepted ◮ so we need to adjust the final states � 0 � � 0 � � 0 � � 0 � X: X: X: X: Y: 0 Y: 0 Y: 0 Y: 0 � 0 � � 1 � � 0 � � 1 � X: X: X: X: Y: 1 Y: 0 Y: 1 Y: 0 1 2 3 1 2 3 A X = σ ( Y ) → Projection T. Fiedor Nested Antichains for WS1S AVM’15 6 / 17

  16. How to handle quantification issue with projection (existential quantification) ◮ after removing of the tracks not all models would be accepted ◮ so we need to adjust the final states � 0 � � 0 � � 0 � � 0 � X: X: X: X: Y: 0 Y: 0 Y: 0 Y: 0 � 0 � � 1 � � 0 � � 1 � X: X: X: X: Y: 1 Y: 0 Y: 1 Y: 0 1 2 3 1 2 3 A X = σ ( Y ) → Projection T. Fiedor Nested Antichains for WS1S AVM’15 6 / 17

  17. How to handle quantification issue with projection (existential quantification) ◮ after removing of the tracks not all models would be accepted ◮ so we need to adjust the final states � 0 � � 0 � � 0 � � 0 � X: X: X: X: Y: [0] Y: [0] Y: 0 Y: 0 Y: 0 Y: 0 � 0 � � 1 � � 0 � � 1 � X: X: X: X: Y: [1] Y: [0] Y: 1 Y: 0 Y: 1 Y: 0 1 2 3 1 2 3 1 2 3 → Adjust states A X = σ ( Y ) → Projection to accept models: 1, 01, 001, . . . T. Fiedor Nested Antichains for WS1S AVM’15 6 / 17

  18. How to handle quantification issue with projection (existential quantification) ◮ after removing of the tracks not all models would be accepted ◮ so we need to adjust the final states � 0 � � 0 � � 0 � � 0 � X: X: X: X: Y: [0] Y: 0 Y: 0 Y: [0] Y: 0 Y: 0 � 0 � � 1 � � 0 � � 1 � X: X: X: X: Y: [1] Y: [0] Y: 1 Y: 0 Y: 1 Y: 0 1 2 3 1 2 3 1 2 3 → Adjust states A X = σ ( Y ) → Projection to accept models: 1, 01, 001, . . . T. Fiedor Nested Antichains for WS1S AVM’15 6 / 17

  19. Deciding WS1S using non-deterministic automata we consider only formulae in Prenex Normal Form ( ∃ PNF) ◮ we focus on dealing with prefix and alternations of quantifications based on number of alternations m ϕ = ¬ ∃X m ¬ . . . ¬ ∃X 2 ¬ ∃X 1 : ϕ 0 ( X ) (1) � �� � ϕ 1 ... � �� � ϕ m T. Fiedor Nested Antichains for WS1S AVM’15 7 / 17

  20. Deciding WS1S using non-deterministic automata we consider only formulae in Prenex Normal Form ( ∃ PNF) ◮ we focus on dealing with prefix and alternations of quantifications based on number of alternations m ϕ = ¬ ∃X m ¬ . . . ¬ ∃X 2 ¬ ∃X 1 : ϕ 0 ( X ) (1) � �� � ϕ 1 ... � �� � ϕ m → hierarchical family of automata defined as follows: ◮ A ϕ 0 = by composition of atomic automata (previously described) ◮ A ϕ m = ( 2 2 ··· 2 Q 0 , ∆ m , I m , F m ) � �� � m T. Fiedor Nested Antichains for WS1S AVM’15 7 / 17

  21. The intuition behind the procedure Key observation for ground formulae ϕ | = iff I m ∩ F m � = ∅

  22. The intuition behind the procedure Key observation for ground formulae ϕ | = iff I m ∩ F m � = ∅ Why? ◮ eventually the symbols degenerate to empty ones . . . Y: [0] Y: [0] Y: [0] Y: [0] Y: [1] Y: [0] Y: [1] Y: [0] 3 1 2 1 2 3 A ∃ X . X = σ ( Y ) → Projection T. Fiedor Nested Antichains for WS1S AVM’15 8 / 17

  23. The intuition behind the procedure Key observation for ground formulae ϕ | = iff I m ∩ F m � = ∅ Why? ◮ eventually the symbols degenerate to empty ones . . . Y: [0] Y: [0] Y: [0] Y: [0] Y: [1] Y: [0] Y: [1] Y: [0] 3 1 2 1 2 3 A ∃ X . X = σ ( Y ) → Projection T. Fiedor Nested Antichains for WS1S AVM’15 8 / 17

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend