A Coalgebraic Decision Procedure for WS1S Dmitriy Traytel Isabelle ∀ = α λ β →
A Coalgebraic Decision Procedure for WS1S Dmitriy Traytel Isabelle ∀ = α λ β →
Logic-Automaton Connection WS1S T | F | x ∈ X | x < y | ϕ ∨ ψ | ¬ ϕ | ∃ x . ϕ | ∃ X . ϕ finite
Logic-Automaton Connection WS1S T | F | x ∈ X | x < y | ϕ ∨ ψ | ¬ ϕ | FO x | ∃ X . ϕ finite
Logic-Automaton Connection WS1S ∀ I . I � ϕ ⇐ ⇒ I � ψ ? T | F | x ∈ X | x < y | ϕ ∨ ψ | ¬ ϕ | FO x | ∃ X . ϕ finite
Logic-Automaton Connection Finite Automata Klarlund, Møller, et al. MONA WS1S ∀ I . I � ϕ ⇐ ⇒ I � ψ ? T | F | x ∈ X | x < y | ϕ ∨ ψ | ¬ ϕ | FO x | ∃ X . ϕ finite
Logic-Automaton Connection Finite Automata Finite Reachability Games Fiedor et al., TACAS 2015 dWiNA, Toss Ganzow & Kaiser, CSL 2010 Klarlund, Møller, et al. MONA WS1S ∀ I . I � ϕ ⇐ ⇒ I � ψ ? T | F | x ∈ X | x < y | ϕ ∨ ψ | ¬ ϕ | FO x | ∃ X . ϕ finite
Logic-Automaton Connection Finite Automata Finite Reachability Games Fiedor et al., TACAS 2015 dWiNA, Toss Ganzow & Kaiser, CSL 2010 Klarlund, Møller, et al. MONA WS1S ∀ I . I � ϕ ⇐ ⇒ I � ψ ? Isabelle ∀ I . I � ϕ ⇐ ⇒ enc I ∈ L ( mkRE ϕ ) ∀ = T. & Nipkow, ICFP 2013 α λ β → Regular Expressions L ( α ) = L ( β )?
Logic-Automaton Connection Finite Automata Finite Reachability Games Fiedor et al., TACAS 2015 dWiNA, Toss Ganzow & Kaiser, CSL 2010 Klarlund, Møller, et al. MONA WS1S ∀ I . I � ϕ ⇐ ⇒ I � ψ ? Isabelle ∀ I . I � ϕ ⇐ ⇒ enc I ∈ L ( mkRE ϕ ) ∀ = T. & Nipkow, ICFP 2013 α λ β → Π -Extended Regular Expressions L ( α ) = L ( β )?
Logic-Automaton Connection Finite Automata Finite Reachability Games Fiedor et al., TACAS 2015 dWiNA, Toss Ganzow & Kaiser, CSL 2010 Klarlund, Møller, et al. MONA WS1S ∀ I . I � ϕ ⇐ ⇒ I � ψ ? Isabelle ∀ I . I � ϕ ⇐ ⇒ enc I ∈ L ( mkRE ϕ ) ∀ = T. & Nipkow, ICFP 2013 α λ β → Π -Extended Regular Expressions L ( α ) = L ( β )?
a ∗ ? ≡ ε + a · a ∗ for Σ = { a , b } a ∗ ε + a · a ∗
a ∗ ? ≡ ε + a · a ∗ for Σ = { a , b } a ∗ d a ε + a · a ∗ ε · a ∗ ∅ + ε · a ∗ Brzozowski derivative d : letter → regex → regex L ( d a r ) = { w | aw ∈ L ( r ) }
a ∗ ? ≡ ε + a · a ∗ for Σ = { a , b } a ∗ d a d b ε + a · a ∗ ε · a ∗ ∅ · a ∗ ∅ + ε · a ∗ ∅ + ∅ · a ∗
a ∗ ? ≡ ε + a · a ∗ for Σ = { a , b } a ∗ d a d b ε + a · a ∗ ε · a ∗ ∅ · a ∗ ∅ + ε · a ∗ ∅ + ∅ · a ∗ d a ∅ · a ∗ + ε · a ∗ ∅ + ∅ · a ∗ + ε · a ∗
a ∗ ? ≡ ε + a · a ∗ for Σ = { a , b } a ∗ d a d b ε + a · a ∗ ε · a ∗ ∅ · a ∗ ∅ + ε · a ∗ ∅ + ∅ · a ∗ d a ∅ · a ∗ + ε · a ∗ ∅ + ∅ · a ∗ + ε · a ∗ d a ∅ · a ∗ + ∅ · a ∗ + ε · a ∗ ∅ + ∅ · a ∗ + ∅ · a ∗ + ε · a ∗
a ∗ ? ≡ ε + a · a ∗ for Σ = { a , b } a ∗ d a d b ε + a · a ∗ ε · a ∗ ∅ · a ∗ ∅ + ε · a ∗ ∅ + ∅ · a ∗ d a ∅ · a ∗ + ε · a ∗ ∅ + ∅ · a ∗ + ε · a ∗ d a ACI ∅ · a ∗ + ∅ · a ∗ + ε · a ∗ ∅ + ∅ · a ∗ + ∅ · a ∗ + ε · a ∗
a ∗ ? ≡ ε + a · a ∗ for Σ = { a , b } a ∗ d a d b ε + a · a ∗ ε · a ∗ ∅ · a ∗ d a ∅ + ε · a ∗ ∅ + ∅ · a ∗ d b d b d a ACI ACI ∅ · a ∗ + ε · a ∗ ∅ · a ∗ + ∅ · a ∗ ∅ + ∅ · a ∗ + ε · a ∗ ∅ + ∅ · a ∗ + ∅ · a ∗ d b d a ACI ∅ · a ∗ + ∅ · a ∗ + ε · a ∗ ∅ · a ∗ + ∅ · a ∗ + ∅ · a ∗ ∅ + ∅ · a ∗ + ∅ · a ∗ + ε · a ∗ ∅ + ∅ · a ∗ + ∅ · a ∗ + ∅ · a ∗
Key ingredients: derivative + ε -acceptance test � �� � coalgebra
Key ingredients: derivative + ε -acceptance test � �� � coalgebra
Key ingredients: derivative + ε -acceptance test � �� � coalgebra Let’s define them on WS1S formulas directly!
? ( ∃ X . x ∈ X ) ≡ ( ¬ x < x ) for Σ = { ( 0 ) , ( 1 ) } ∃ X . x ∈ X d ( 0 ) d ( 1 ) ¬ x < x ACI ∃ X . ( T ∨ F ) ∃ X . ( x ∈ X ∨ x ∈ X ) ¬ x < x ¬ F d ( 1 ) , d ( 0 ) ACI ∃ X . ( T ∨ F ) ∨ ( T ∨ F ) ¬ F
? ( ∃ X . x ∈ X ) ≡ ( ¬ x < x ) for Σ = { ( 0 ) , ( 1 ) } ∃ X . x ∈ X d ( 0 ) d ( 1 ) ¬ x < x ACI ∃ X . ( T ∨ F ) ∃ X . ( x ∈ X ∨ x ∈ X ) ¬ x < x ¬ F d ( 1 ) , d ( 0 ) ACI Benefits • Simplicity ∃ X . ( T ∨ F ) ∨ ( T ∨ F ) ¬ F
? ( ∃ X . x ∈ X ) ≡ ( ¬ x < x ) for Σ = { ( 0 ) , ( 1 ) } ∃ X . x ∈ X d ( 0 ) d ( 1 ) ¬ x < x ACI ∃ X . ( T ∨ F ) ∃ X . ( x ∈ X ∨ x ∈ X ) ¬ x < x ¬ F d ( 1 ) , d ( 0 ) ACI Benefits • Simplicity ∃ X . ( T ∨ F ) ∨ ( T ∨ F ) • Implementation! ¬ F
? ( ∃ X . x ∈ X ) ≡ ( ¬ x < x ) for Σ = { ( 0 ) , ( 1 ) } ∃ X . x ∈ X d ( 0 ) d ( 1 ) ¬ x < x ACI ∃ X . ( T ∨ F ) ∃ X . ( x ∈ X ∨ x ∈ X ) ¬ x < x ¬ F d ( 1 ) , d ( 0 ) ACI Benefits • Simplicity ∃ X . ( T ∨ F ) ∨ ( T ∨ F ) • Implementation! ¬ F • Formalization!
? ( ∃ X . x ∈ X ) ≡ ( ¬ x < x ) for Σ = { ( 0 ) , ( 1 ) } ∃ X . x ∈ X d ( 0 ) d ( 1 ) ¬ x < x ACI ∃ X . ( T ∨ F ) ∃ X . ( x ∈ X ∨ x ∈ X ) ¬ x < x ¬ F d ( 1 ) , d ( 0 ) ACI Benefits • Simplicity ∃ X . ( T ∨ F ) ∨ ( T ∨ F ) • Implementation! ¬ F • Formalization! • Presentation?
? ( ∃ X . x ∈ X ) ≡ ( ¬ x < x ) for Σ = { ( 0 ) , ( 1 ) } ∃ X . x ∈ X d ( 0 ) d ( 1 ) ¬ x < x ACI ∃ X . ( T ∨ F ) ∃ X . ( x ∈ X ∨ x ∈ X ) ¬ x < x ¬ F d ( 1 ) , d ( 0 ) ACI Benefits • Simplicity ∃ X . ( T ∨ F ) ∨ ( T ∨ F ) • Implementation! ¬ F • Formalization! • Presentation? • Efficiency?
? ( ∃ X . x ∈ X ) ≡ ( ¬ x < x ) for Σ = { ( 0 ) , ( 1 ) } ∃ X . x ∈ X d ( 0 ) d ( 1 ) ¬ x < x ACI ∃ X . ( T ∨ F ) ∃ X . ( x ∈ X ∨ x ∈ X ) ¬ x < x ¬ F d ( 1 ) , d ( 0 ) ACI Benefits • Simplicity ∃ X . ( T ∨ F ) ∨ ( T ∨ F ) • Implementation! ¬ F • Formalization! • Presentation? • Efficiency? • vs. MONA
? ( ∃ X . x ∈ X ) ≡ ( ¬ x < x ) for Σ = { ( 0 ) , ( 1 ) } ∃ X . x ∈ X d ( 0 ) d ( 1 ) ¬ x < x ACI ∃ X . ( T ∨ F ) ∃ X . ( x ∈ X ∨ x ∈ X ) ¬ x < x ¬ F d ( 1 ) , d ( 0 ) ACI Benefits • Simplicity ∃ X . ( T ∨ F ) ∨ ( T ∨ F ) • Implementation! ¬ F • Formalization! • Presentation? • Efficiency? • vs. MONA → MonaCo (Pous & T., ongoing work)
Interlude I: Encoding of Interpretations X �→ { 1 , 2 , 3 } I = Y �→ { 0 , 2 } Z �→ { 3 }
Interlude I: Encoding of Interpretations X �→ { 1 , 2 , 3 } I = Y �→ { 0 , 2 } Z �→ { 3 } enc X 0 1 1 1 Y 1 0 1 0 Z 0 0 0 1
Interlude I: Encoding of Interpretations X �→ { 1 , 2 , 3 } I = Y �→ { 0 , 2 } Z �→ { 3 } enc X 0 1 1 1 X 1 1 1 Y 1 0 1 0 Y 0 1 0 tail Z 0 0 0 1 Z 0 0 1
Interlude I: Encoding of Interpretations X �→ { 1 , 2 , 3 } X �→ { 0 , 1 , 2 } I = Y �→ { 0 , 2 } TAIL I = Y �→ { 1 } Z �→ { 3 } Z �→ { 2 } enc enc X 0 1 1 1 X 1 1 1 Y 1 0 1 0 Y 0 1 0 tail Z 0 0 0 1 Z 0 0 1
Interlude I: Encoding of Interpretations I � ϕ ⇐ ⇒ TAIL I � d ( HEAD I ) ϕ X �→ { 1 , 2 , 3 } X �→ { 0 , 1 , 2 } I = Y �→ { 0 , 2 } TAIL I = Y �→ { 1 } Z �→ { 3 } Z �→ { 2 } enc enc X 0 1 1 1 X 1 1 1 Y 1 0 1 0 Y 0 1 0 tail Z 0 0 0 1 Z 0 0 1
Interlude I: Encoding of Interpretations 0 I � ϕ ⇐ ⇒ TAIL I � d 1 ϕ 0 X �→ { 1 , 2 , 3 } X �→ { 0 , 1 , 2 } I = Y �→ { 0 , 2 } TAIL I = Y �→ { 1 } Z �→ { 3 } Z �→ { 2 } enc enc X 0 1 1 1 X 1 1 1 Y 1 0 1 0 Y 0 1 0 tail Z 0 0 0 1 Z 0 0 1
Interlude II: First-Order Variables Does x �→ { 1 , 2 , 3 } satisfy FO x ?
Interlude II: First-Order Variables Does x �→ { 1 , 2 , 3 } satisfy FO x ? No, only singleton sets do
Interlude II: First-Order Variables Does x �→ { 1 , 2 , 3 } satisfy FO x ? Yes, all non-empty sets do No, only singleton sets do Minimum is the assigned value
Interlude II: First-Order Variables Does x �→ { 1 , 2 , 3 } satisfy FO x ? Yes, all non-empty sets do No, only singleton sets do Minimum is the assigned value → my Ph.D. thesis draft → here (also used in MONA)
Derivative d : letter → formula → formula
Derivative d : letter → formula → formula = d v T T d v F = F
Derivative d : letter → formula → formula = d v T T d v F = F � if ¬ v [ x ] FO x d v ( FO x ) = T otherwise
Recommend
More recommend