Verified Decision Procedures for Monadic Second-Order Logic on Strings Functional Pearl Dmitriy Traytel Tobias Nipkow Isabelle ∀ = α λ β →
Overview MSO
Overview MSO L MSO ( ϕ ) = L MSO ( ψ )?
Overview Finite Automata MSO L MSO ( ϕ ) = L MSO ( ψ )?
Overview Finite Automata MONA ( > 40 kLOC of C/C++) MSO L MSO ( ϕ ) = L MSO ( ψ )?
Overview Finite Automata MONA ( > 40 kLOC of C/C++) MSO L MSO ( ϕ ) = L MSO ( ψ )? Regular Expressions
Overview Finite Automata MONA ( > 40 kLOC of C/C++) MSO L MSO ( ϕ ) = L MSO ( ψ )? Regular Expressions L ( α ) = L ( β )?
Overview Finite Automata MONA ( > 40 kLOC of C/C++) MSO L MSO ( ϕ ) = L MSO ( ψ )? L MSO ( ϕ ) = L ( mkRE ϕ ) Regular Expressions L ( α ) = L ( β )?
Overview Finite Automata MONA L M2L ( ϕ ) = L M2L ( ψ )? L WS1S ( ϕ ) = L WS1S ( ψ )? M2L WS1S L M2L ( ϕ ) = L ( mkRE M2L ϕ ) L WS1S ( ϕ ) = L ( mkRE WS1S ϕ ) Regular Expressions L ( α ) = L ( β )?
Overview Finite Automata MONA L M2L ( ϕ ) = L M2L ( ψ )? L WS1S ( ϕ ) = L WS1S ( ψ )? M2L WS1S e l e l b a ∀ I s = α λ β → L M2L ( ϕ ) = L ( mkRE M2L ϕ ) L WS1S ( ϕ ) = L ( mkRE WS1S ϕ ) Regular Expressions L ( α ) = L ( β )?
Overview Finite Automata MONA L M2L ( ϕ ) = L M2L ( ψ )? L WS1S ( ϕ ) = L WS1S ( ψ )? M2L WS1S e l e l b a ∀ I s = α λ β → L M2L ( ϕ ) = L ( mkRE M2L ϕ ) L WS1S ( ϕ ) = L ( mkRE WS1S ϕ ) Regular Expressions L ( α ) = L ( β )?
Outline Regular Expressions Equivalence MSO
Outline Regular Expressions Equivalence MSO
Regular Expressions L ( ∅ ) = {} L ( ε ) = { [] } L ( a ) = { [ a ] } a ∈ Σ L ( α + β ) = L ( α ) ∪ L ( β ) L ( α · β ) = L ( α ) · L ( β ) L ( α ∗ ) = L ( α ) ∗
Extended Regular Expressions L ( ∅ ) = {} L ( ε ) = { [] } L ( a ) = { [ a ] } a ∈ Σ L ( α + β ) = L ( α ) ∪ L ( β ) L ( α · β ) = L ( α ) · L ( β ) L ( α ∗ ) = L ( α ) ∗ L ( α ∩ β ) = L ( α ) ∩ L ( β ) L ( ¬ α ) = Σ ∗ \ L ( α )
Π -Extended Regular Expressions L ( ∅ ) = {} L ( ε ) = { [] } L ( a ) = { [ a ] } a ∈ Σ L ( α + β ) = L ( α ) ∪ L ( β ) L ( α · β ) = L ( α ) · L ( β ) L ( α ∗ ) = L ( α ) ∗ L ( α ∩ β ) = L ( α ) ∩ L ( β ) L ( ¬ α ) = Σ ∗ \ L ( α ) L (Π α ) = { w | w ∈ L ( α ) }
Π -Extended Regular Expressions L n ( ∅ ) = {} L n ( ε ) = { [] } L n ( a ) = { [ a ] } a ∈ Σ n L n ( α + β ) = L n ( α ) ∪ L n ( β ) L n ( α · β ) = L n ( α ) · L n ( β ) L n ( α ∗ ) = L n ( α ) ∗ L n ( α ∩ β ) = L n ( α ) ∩ L n ( β ) L n ( ¬ α ) = Σ ∗ n \ L n ( α ) L n (Π α ) = { w | w ∈ L n + 1 ( α ) }
Π -Extended Regular Expressions L n ( ∅ ) = {} L n ( ε ) = { [] } L n ( a ) = { [ a ] } a ∈ Σ n L n ( α + β ) = L n ( α ) ∪ L n ( β ) L n ( α · β ) = L n ( α ) · L n ( β ) L n ( α ∗ ) = L n ( α ) ∗ L n ( α ∩ β ) = L n ( α ) ∩ L n ( β ) L n ( ¬ α ) = Σ ∗ n \ L n ( α ) L n (Π α ) = { w | w ∈ L n + 1 ( α ) } ⊤ ⊥ ⊥ ∈ Σ ∗ Example Σ n = {⊤ , ⊥} n ⊥ ⊤ ⊤ 3 ⊥ ⊥ ⊤
Π -Extended Regular Expressions L n ( ∅ ) = {} L n ( ε ) = { [] } L n ( a ) = { [ a ] } a ∈ Σ n L n ( α + β ) = L n ( α ) ∪ L n ( β ) L n ( α · β ) = L n ( α ) · L n ( β ) L n ( α ∗ ) = L n ( α ) ∗ L n ( α ∩ β ) = L n ( α ) ∩ L n ( β ) L n ( ¬ α ) = Σ ∗ n \ L n ( α ) L n (Π α ) = { w | w ∈ L n + 1 ( α ) } ⊤ ⊥ ⊥ ∈ Σ ∗ Example Σ n = {⊤ , ⊥} n ⊥ ⊤ ⊤ 2 ⊥ ⊥ ⊤
Π -Extended Regular Expressions L n ( ∅ ) = {} L n ( ε ) = { [] } L n ( a ) = { [ a ] } a ∈ Σ n L n ( α + β ) = L n ( α ) ∪ L n ( β ) L n ( α · β ) = L n ( α ) · L n ( β ) L n ( α ∗ ) = L n ( α ) ∗ L n ( α ∩ β ) = L n ( α ) ∩ L n ( β ) L n ( ¬ α ) = Σ ∗ n \ L n ( α ) L n (Π α ) = { map π w | w ∈ L n + 1 ( α ) } π : Σ n + 1 → Σ n ⊤ ⊥ ⊥ π = tail ∈ Σ ∗ Example Σ n = {⊤ , ⊥} n ⊥ ⊤ ⊤ π − 1 a = {⊤ a , ⊥ a } 2 ⊥ ⊥ ⊤
Derivatives of Regular Expressions Characteristic property L n ( D a ( α )) = { w | aw ∈ L n ( α ) }
Derivatives of Regular Expressions Characteristic property L n ( D a ( α )) = { w | aw ∈ L n ( α ) } D a ( ∅ ) = ∅ D a ( ε ) = ∅ D a ( b ) = if a = b then ε else ∅ D a ( α + β ) = D a ( α )+ D a ( β ) D a ( α · β ) = if ε ∈ L ( α ) then D a ( α ) · β + D a ( β ) else D a ( α ) · β D a ( α ∗ ) = D a ( α ) · α ∗ D a ( α ∩ β ) = D a ( α ) ∩ D a ( β ) D a ( ¬ α ) = ¬ D a ( α )
Derivatives of Regular Expressions Characteristic property L n ( D a ( α )) = { w | aw ∈ L n ( α ) } D a ( ∅ ) = ∅ D a ( ε ) = ∅ D a ( b ) = if a = b then ε else ∅ D a ( α + β ) = D a ( α )+ D a ( β ) D a ( α · β ) = if ε ∈ L ( α ) then D a ( α ) · β + D a ( β ) else D a ( α ) · β D a ( α ∗ ) = D a ( α ) · α ∗ D a ( α ∩ β ) = D a ( α ) ∩ D a ( β ) D a ( ¬ α ) = ¬ D a ( α ) � � � D a (Π α ) = Π D b ( α ) b ∈ π − 1 a
DP by Example: a ∗ ? ≡ ε + a · a ∗ for Σ = { a , b } a ∗ ε + a · a ∗
DP by Example: a ∗ ? ≡ ε + a · a ∗ for Σ = { a , b } a ∗ D a ε + a · a ∗ ε · a ∗ ∅ + ε · a ∗
DP by Example: a ∗ ? ≡ ε + a · a ∗ for Σ = { a , b } a ∗ D a D b ε + a · a ∗ ε · a ∗ ∅ · a ∗ ∅ + ε · a ∗ ∅ + ∅ · a ∗
DP by Example: a ∗ ? ≡ ε + a · a ∗ for Σ = { a , b } a ∗ D a D b ε + a · a ∗ ε · a ∗ ∅ · a ∗ ∅ + ε · a ∗ ∅ + ∅ · a ∗ D a ∅ · a ∗ + ε · a ∗ ∅ + ∅ · a ∗ + ε · a ∗
DP by Example: 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 ∗
DP by Example: 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 ∗
DP by Example: a ∗ ? ≡ ε + a · a ∗ for Σ = { a , b } a ∗ D a D b ε + a · a ∗ ε · a ∗ ∅ · a ∗ ∅ + ε · a ∗ ∅ + ∅ · a ∗ D b D a ∅ · a ∗ + ε · a ∗ ∅ · a ∗ + ∅ · a ∗ ∅ + ∅ · a ∗ + ε · a ∗ ∅ + ∅ · a ∗ + ∅ · a ∗ D a ACI ∅ · a ∗ + ∅ · a ∗ + ε · a ∗ ∅ + ∅ · a ∗ + ∅ · a ∗ + ε · a ∗
DP by Example: a ∗ ? ≡ ε + a · a ∗ for Σ = { a , b } a ∗ D a D b ε + a · a ∗ ε · a ∗ ∅ · a ∗ ∅ + ε · a ∗ ∅ + ∅ · a ∗ D b D a ACI ∅ · a ∗ + ε · a ∗ ∅ · a ∗ + ∅ · a ∗ ∅ + ∅ · a ∗ + ε · a ∗ ∅ + ∅ · a ∗ + ∅ · a ∗ D a ACI ∅ · a ∗ + ∅ · a ∗ + ε · a ∗ ∅ + ∅ · a ∗ + ∅ · a ∗ + ε · a ∗
DP by Example: a ∗ ? ≡ ε + a · a ∗ for Σ = { a , b } a ∗ D a D b ε + a · a ∗ ε · a ∗ ∅ · a ∗ D a ∅ + ε · a ∗ D b ∅ + ∅ · a ∗ D b D a ACI ∅ · a ∗ + ε · a ∗ ∅ · a ∗ + ∅ · a ∗ ∅ + ∅ · a ∗ + ε · a ∗ ∅ + ∅ · a ∗ + ∅ · a ∗ D a ACI ∅ · a ∗ + ∅ · a ∗ + ε · a ∗ ∅ + ∅ · a ∗ + ∅ · a ∗ + ε · a ∗
DP by Example: a ∗ ? ≡ ε + a · a ∗ for Σ = { a , b } a ∗ D a D b ε + a · a ∗ ε · a ∗ ∅ · a ∗ D a ∅ + ε · a ∗ D b ∅ + ∅ · a ∗ D b D a 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 ∗
DP by Example: a ∗ ? ≡ ε + a · a ∗ for Σ = { a , b } a ∗ D a D b ε + a · a ∗ ε · a ∗ ∅ · a ∗ D a ∅ + ε · a ∗ D b ∅ + ∅ · a ∗ 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 ∗
DP by Example: a ∗ ? ≡ ε + a · a ∗ for Σ = { a , b } a ∗ D a D b ε + a · a ∗ ε · a ∗ ∅ · a ∗ D a ∅ + ε · a ∗ D b ∅ + ∅ · a ∗ 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 ∗
DP by Example: a ∗ ? ≡ ε + a · a ∗ for Σ = { a , b } a ∗ D a D b ε + a · a ∗ ε · a ∗ ∅ · a ∗ a ∗ EQ D a EQ ∅ a ∗ ∅ + ε · a ∗ D b ∅ + ∅ · a ∗ ∅ D b D a EQ EQ ∅ · a ∗ + ε · a ∗ ∅ · a ∗ + ∅ · a ∗ ∅ + ∅ · a ∗ + ε · a ∗ ∅ + ∅ · a ∗ + ∅ · a ∗
Related Work • Theoretical groundwork JACM 1964 Brzozowski CONCUR 1998 Rutten
Recommend
More recommend