formal languages
play

Formal Languages aa bb baab ba ab Formally Coinductively - PowerPoint PPT Presentation

Formal Languages aa bb baab ba ab Formally Coinductively and a b a b a b a b a b a b a b . . . . . . . . . . . . Dmitriy Traytel Contribution Isabelle H O L = library of formal languages in


  1. Formal Languages aa bb baab ··· ε ba ab Formally Coinductively and a b a b a b a b a b a b a b . . . . . . . . . . . . Dmitriy Traytel

  2. Contribution Isabelle H O L ∀ = library of formal languages in α λ β →

  3. Contribution define regular operations ∅ , ε , Atom, + , · , ∗ prove axioms of Kleene Algebra Isabelle H O L ∀ = library of formal languages in α λ β →

  4. Contribution define regular operations ∅ , ε , Atom, + , · , ∗ prove axioms of Kleene Algebra Isabelle H O L ∀ = Coinductive library of formal languages in α λ β →

  5. Contribution define regular operations ∅ , ε , Atom, + , · , ∗ prove axioms of Kleene Algebra Isabelle H O L ∀ = Coinductive library of formal languages in α λ β → Tutorial for corecursion and coinduction

  6. Contribution define regular operations ∅ , ε , Atom, + , · , ∗ prove axioms of Kleene Algebra Isabelle H O L ∀ = Coinductive library of formal languages in α λ β → Formal Structure Tutorial for corecursion and coinduction Computation Deduction

  7. Contribution define regular operations ∅ , ε , Atom, + , · , ∗ prove axioms of Kleene Algebra Isabelle H O L ∀ = Coinductive library of formal languages in α This talk: Tutorial in 20 min λ β → Formal Structure Tutorial for corecursion and coinduction Computation Deduction

  8. Related Work: A Selection of CoTutorials t n n n e a o p o t i s y i s t i t c s r a u u s t a c d A e n d f r i o o o o C C o C r P Jacobs, Rutten EATCS’97 stream Rutten CONCUR’98 language Giménez, Castéran ’98 stream, lazy list Rutten MSCS ’05 stream Hinze JFP ’11 stream Chlipala ’13 stream, while Rot, Rutten, Bonsangue language LATA’13 Kozen, Silva MSCS ’14 stream Setzer Festschrift Jäger’16 stream e l H O e l L b Traytel FSCD’16 language a ∀ s I = α λ β →

  9. Codatatype Corecursion Coinduction

  10. Codatatype Corecursion Coinduction

  11. a b a b a b a b a b a b a b . . . . . . . . . . . .

  12. lang = L bool codatatype lang lang a b a b a b a b a b a b a b . . . . . . . . . . . .

  13. codatatype α lang = L bool ( α ⇒ α lang ) a b a b a b a b a b a b a b . . . . . . . . . . . .

  14. codatatype α lang = L bool ( α ⇒ α lang ) a b a b a b a b a b a b a b . . . . . . . . . . . .

  15. codatatype α lang = L bool ( α ⇒ α lang ) a b a b a b a b a b a b a b . . . . . . . . . . . .

  16. codatatype α lang = L bool ( α ⇒ α lang ) o :: α lang ⇒ bool δ :: α lang ⇒ α ⇒ α lang a b a b a b a b a b a b a b . . . . . . . . . . . .

  17. primrec ∈ ∈ :: α list ⇒ α lang ⇒ bool [] ∈ ∈ L = o L aw ∈ ∈ L = w ∈ ∈ δ L a a b a b a b a b a b a b a b . . . . . . . . . . . .

  18. primrec ∈ ∈ :: α list ⇒ α lang ⇒ bool [] ∈ ∈ L = o L aw ∈ ∈ L = w ∈ ∈ δ L a aa ∈ ∈ a b a b a b a b a b a b a b . . . . . . . . . . . .

  19. primrec ∈ ∈ :: α list ⇒ α lang ⇒ bool [] ∈ ∈ L = o L aw ∈ ∈ L = w ∈ ∈ δ L a a b a ∈ ∈ a b a b a b a b a b a b . . . . . . . . . . . .

  20. primrec ∈ ∈ :: α list ⇒ α lang ⇒ bool [] ∈ ∈ L = o L aw ∈ ∈ L = w ∈ ∈ δ L a a b a b a b [] ∈ ∈ a b a b a b a b . . . . . . . . . . . .

  21. primrec ∈ ∈ :: α list ⇒ α lang ⇒ bool [] ∈ ∈ L = o L aw ∈ ∈ L = w ∈ ∈ δ L a a b a b a b a b a b a b a b . . . . . . . . . . . .

  22. Codatatype Corecursion Coinduction

  23. primcorec ∅ :: α lang o ∅ = δ ∅ = λ _ . ∅

  24. primcorec ∅ :: α lang o ∅ = δ ∅ = λ _ . ∅ a b a b a b . . . . . .

  25. primcorec ∅ :: α lang primcorec ε :: α lang o ∅ = o ε = δ ∅ = λ _ . ∅ δ ε = λ _ . ∅ a b a b a b a b a b a b . . . . . . . . . . . .

  26. primcorec ∅ :: α lang primcorec ε :: α lang o ∅ = o ε = δ ∅ = λ _ . ∅ δ ε = λ _ . ∅ a b a b a b a b a b a b . . . . . . . . . . . . primcorec Atom :: α ⇒ α lang o ( Atom a ) = δ ( Atom a ) = λ b . if a = b then ε else ∅

  27. primcorec ∅ :: α lang primcorec ε :: α lang o ∅ = o ε = δ ∅ = λ _ . ∅ δ ε = λ _ . ∅ a b a b a b a b a b a b . . . . . . . . . . . . primcorec Atom :: α ⇒ α lang o ( Atom a ) = δ ( Atom a ) = λ b . if a = b then ε else ∅ a b a b a b a b a b a b . . . . . . . . . . . .

  28. primrec primcorec Syntactic criterion for termination productivity α list ⇒ ··· ··· ⇒ α lang of functions of type

  29. primrec primcorec Syntactic criterion for termination productivity α list ⇒ ··· ··· ⇒ α lang of functions of type Philosophy consume 1 pattern match argument

  30. primrec primcorec Syntactic criterion for termination productivity α list ⇒ ··· ··· ⇒ α lang of functions of type Philosophy consume 1 produce 1 pattern match argument copattern match output

  31. primrec primcorec Syntactic criterion for termination productivity α list ⇒ ··· ··· ⇒ α lang of functions of type Philosophy consume 1 produce 1 pattern match argument copattern match output (Co)recursive call arguments very restricted context arbitrary

  32. primrec primcorec Syntactic criterion for termination productivity α list ⇒ ··· ··· ⇒ α lang of functions of type Philosophy consume 1 produce 1 pattern match argument copattern match output (Co)recursive call arguments very restricted arbitrary context arbitrary very restricted

  33. primrec primcorec Syntactic criterion for termination productivity α list ⇒ ··· ··· ⇒ α lang of functions of type Philosophy consume 1 produce 1 pattern match argument copattern match output (Co)recursive call arguments very restricted arbitrary context arbitrary very restricted a b a b a b a b a b a b . . . . . . . . . . . . Atom a Atom b

  34. primrec primcorec Syntactic criterion for termination productivity α list ⇒ ··· ··· ⇒ α lang of functions of type Philosophy consume 1 produce 1 pattern match argument copattern match output (Co)recursive call arguments very restricted arbitrary context arbitrary very restricted a b a b a b = + a b a b a b a b a b a b . . . . . . . . . . . . . . . . . . Atom a Atom b

  35. primrec primcorec Syntactic criterion for termination productivity α list ⇒ ··· ··· ⇒ α lang of functions of type Philosophy consume 1 produce 1 pattern match argument copattern match output (Co)recursive call arguments very restricted arbitrary context arbitrary very restricted primcorec + :: α lang ⇒ α lang ⇒ α lang o ( L + K ) = o L ∨ o K δ ( L + K ) = λ a . δ L a + δ K a a b a b a b = + a b a b a b a b a b a b . . . . . . . . . . . . . . . . . . Atom a Atom b

  36. o ∅ = o ε = δ ∅ = λ _ . ∅ δ ε = λ _ . ∅ o ( Atom a ) = δ ( Atom a ) = λ b . if a = b then ε else ∅ o ( L + K ) = o L ∨ o K δ ( L + K ) = λ a . δ L a + δ K a

  37.  L , K :: α lang = o ∅    = o ε L + ∅ = L     o ( Atom a ) =  nullability o ( L + K ) = o L ∨ o K         = λ _ . ∅  δ ∅   = λ _ . ∅ δ ε     δ ( Atom a ) = λ b . if a = b then ε else ∅ Brzozowski  δ ( L + K ) = λ a . δ L a + δ K a derivative       

  38. L , K :: α regex = o ∅ = o ε L + ∅ � = L o ( Atom a ) = o ( L + K ) = o L ∨ o K = λ _ . ∅ d ∅ = λ _ . ∅ d ε d ( Atom a ) = λ b . if a = b then ε else ∅ d ( L + K ) = λ a . d L a + d K a

  39. L , K :: α regex = o ∅ = o ε L + ∅ � = L o ( Atom a ) = o ( L + K ) = o L ∨ o K o ( L · K ) = o L ∧ o K o ( L ∗ ) = = λ _ . ∅ d ∅ = λ _ . ∅ d ε d ( Atom a ) = λ b . if a = b then ε else ∅ d ( L + K ) = λ a . d L a + d K a d ( L · K ) = ... d ( L ∗ ) = ...

  40.  L , K :: α regex = o ∅    = o ε L + ∅ � = L     o ( Atom a ) =  nullability o ( L + K ) = o L ∨ o K   o ( L · K ) = o L ∧ o K     o ( L ∗ )  =  = λ _ . ∅  d ∅   = λ _ . ∅ d ε     d ( Atom a ) = λ b . if a = b then ε else ∅ Brzozowski  d ( L + K ) = λ a . d L a + d K a derivative   d ( L · K ) = ...     d ( L ∗ ) = ... 

  41. L , K :: α regex L + ∅ � = L o ( L · K ) = o L ∧ o K d ( L · K ) = ...

  42. primcorec · :: α lang ⇒ α lang ⇒ α lang o ( L · K ) = o L ∧ o K δ ( L · K ) = λ a . if o L then δ L a · K + δ K a else δ L a · K

  43. Nonprimitively corecursive specification ✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿ · :: α lang ⇒ α lang ⇒ α lang primcorec o ( L · K ) = o L ∧ o K δ ( L · K ) = λ a . if o L then δ L a · K + δ K a else δ L a · K

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