recursively defined cpo algebras
play

Recursively defined cpo algebras Ohad Kammar and Paul Blain Levy - PowerPoint PPT Presentation

Recursively defined cpo algebras Ohad Kammar and Paul Blain Levy July 13, 2018 Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 1 / 16 Outline Bilimit compact categories 1 Modelling recursive types 2


  1. Recursively defined cpo algebras Ohad Kammar and Paul Blain Levy July 13, 2018 Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 1 / 16

  2. Outline Bilimit compact categories 1 Modelling recursive types 2 Recursively defined cppo algebras 3 Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 2 / 16

  3. Bilimit compact categories An axiomatization of a category of domains. A Cpo-enriched category is a category C whose homsets are cpos, such that composition is continuous. It is bilimit compact when each homset C ( A, B ) is pointed composition is bistrict C has a zero object (both initial and terminal) Every ω -chain ( A n , e n , p n ) n ∈ N in C ep has a bilimit, i.e. a cocone V, ( u n , r n ) n ∈ N such that � n ∈ N u n · r n = id V . Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 3 / 16

  4. Examples The category Cpo ⊥ of cppos and strict continuous maps. The opposite of a bilimit compact category. A product of bilimit compact categories. Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 4 / 16

  5. Bifree algebras (Freyd) Let C be a bilimit compact category. Any locally continuous functor H : C → C has a bifree algebra ( A, θ ) i.e. θ : HA ∼ = A is both an initial algebra and a final coalgebra. In particular, the zero object is a bifree algebra of the identity functor. The notion of bifree algebra extends to mixed variance functors. Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 5 / 16

  6. Call-by-push-value We want to apply this to the modelling of recursive types. We’ll use call-by-push-value, which subsumes call-by-value and call-by-name typed λ -calculus. A value type A denotes a cpo. Call-by-value type. A computation type B denotes a cppo. Call-by-name type. Type syntax, including recursive types: UB | 1 | A × A ′ | 0 | A + A ′ | � A, A ′ ::= i ∈ N A i | X | rec X .A FA | A → B | 1 Π | B Π B ′ | � B, B ′ ::= i ∈ N B i | X | rec X .B Semantics of types: [ [ UB ] ] = [ [ B ] ] [ [ FA ] ] = [ [ A ] ] ⊥ Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 6 / 16

  7. Recursive types Recursive value type def D = rec X .A ∼ D A [ D/ X ] = Should denotes an isomorphism in Cpo . def Recursive computation type D = rec X .B def D = rec X .B ∼ D B [ D/ X ] = Should denote an isomorphism in Cpo ⊥ . Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 7 / 16

  8. Recursive types Recursive value type def D = rec X .A ∼ D A [ D/ X ] = Should denotes an isomorphism in Cpo . def Recursive computation type D = rec X .B def D = rec X .B ∼ D B [ D/ X ] = Should denote an isomorphism in Cpo ⊥ . But Cpo is not bilimit compact—it has no zero object. Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 7 / 16

  9. Solution: expand the category Let B be a Cpo-enriched category. A bilimit compact expansion of B is a bilimit compact Cpo-enriched category C containing B as a subcategory such that B ( A, B ) is an admissible subset of C ( A, B ) given n ) in C ep chains ( A n , e n , p n ) n ∈ N and ( A ′ n , e ′ n , p ′ bilimits V, ( u n , r n ) n ∈ N and V ′ , ( u ′ n , r ′ n ) n ∈ N a map α n : A n → A ′ n commuting with e n and with p n the join of e ′ n · α n · p n is in B ( V, V ′ ) . Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 8 / 16

  10. Examples The category pCpo of cpos and partial continuous maps is a bilimit compact expansion of Cpo . Preserved by C �→ C op . Preserved by product. Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 9 / 16

  11. The recipe We seek an fixpoint of a mixed variance functor H on B . Take a bilimit compact expansion C of B . Extend H to C . Obtain a fixpoint of H on C . Every isomorphism in C is an isomorphism in B . Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 10 / 16

  12. Kripke models To model a language with dynamic generation (of names, references, etc.), a value type denotes an object of [ I , Cpo ] a computation type denotes an object of [ I , Cpo ⊥ ] , Theorem [ I , C ] is bilimit compact if C is. Let B have bilimit compact expansion C . Then [ I , B ] has bilimit compact expansion, as follows: a map A → B is a map in [ I , C ] . Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 11 / 16

  13. Semantics of a computation type B 1 If programs either terminate or diverge, [ [ B ] ] is a cppo. Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 12 / 16

  14. Semantics of a computation type B 1 If programs either terminate or diverge, [ [ B ] ] is a cppo. 2 Suppose programs can crash. Then [ [ B ] ] is a cppo A with a “crash” element. Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 12 / 16

  15. Semantics of a computation type B 1 If programs either terminate or diverge, [ [ B ] ] is a cppo. 2 Suppose programs can crash. Then [ [ B ] ] is a cppo A with a “crash” element. 3 Suppose programs can peform I/O, described by a functor H : Cpo ⊥ → Cpo . Then [ [ B ] ] is a cppo A with a map HA → A . Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 12 / 16

  16. Semantics of a computation type B 1 If programs either terminate or diverge, [ [ B ] ] is a cppo. 2 Suppose programs can crash. Then [ [ B ] ] is a cppo A with a “crash” element. 3 Suppose programs can peform I/O, described by a functor H : Cpo ⊥ → Cpo . Then [ [ B ] ] is a cppo A with a map HA → A . 4 Suppose programs can lookup and update memory, and S is the set of states. Then [ [ B ] ] is a cppo A with maps A S lookup : → A update : S × A → A satisfying some equations. Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 12 / 16

  17. Recursive computation types with effects We need to form a recursive crash-cppo a recursive cppo- H -algebra a recursive cppo lookup/update algebra. But the categories of crash-cppos, cppo- H -algebras, and cppo lookup/update algebras are not bilimit compact, as they have no zero object. Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 13 / 16

  18. Recursive computation types with effects We need to form a recursive crash-cppo a recursive cppo- H -algebra a recursive cppo lookup/update algebra. But the categories of crash-cppos, cppo- H -algebras, and cppo lookup/update algebras are not bilimit compact, as they have no zero object. Solution: expand the categories. Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 13 / 16

  19. Crash cppos The category of crash cppos and strict homomorphisms lacks a zero object. Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 14 / 16

  20. Crash cppos The category of crash cppos and strict homomorphisms lacks a zero object. The expanded category: a morphism f : ( A, c ) → ( B, d ) is a lax homomorphism, a strict map such that f ( c ) � d . Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 14 / 16

  21. H -algebras The category of cppo- H -algebras and strict homomorphisms lacks a zero object. Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 15 / 16

  22. � � H -algebras The category of cppo- H -algebras and strict homomorphisms lacks a zero object. The expanded category: a morphism f : ( A, c ) → ( B, d ) is a lax homomorphism, a strict map such that Hf � HA HB c � d � B A f Bilimit compactness (for the Eilenberg-Moore version) was proved by Fiore. Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 15 / 16

  23. Summary Computation types denote cppo-algebras. The category of cppo-algebras is not bilimit compact. We interpret recursive computation types using the bilimit compact expansion in which a morphism is a lax homomorphism. The appropriate functors (e.g. → ) can be extended to this category. Caveat We conjecture this model is computationally adequate, but proving it is work in progress. Ohad Kammar and Paul Blain Levy Recursively defined cpo algebras July 13, 2018 16 / 16

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