Abstract
We present a construction which, under suitable assumptions, takes a model of Moggi’s computational λ-calculus with sum types, effect operations and primitives, and yields a model that is adequate and fully abstract. The construction, which uses the theory of fibrations, categorical glueing, ⊤⊤-lifting, and ⊤⊤-closure, takes inspiration from O’Hearn & Riecke’s fully abstract model for PCF. Our construction can be applied in the category of sets and functions, as well as the category of diffeological spaces and smooth maps and the category of quasi-Borel spaces, which have been studied as semantics for differentiable and probabilistic programming.
Supplemental Material
- S. Abramsky, K. Honda, and G. McCusker. 1998. A fully abstract game semantics for general references. In Proceedings of the Thirteenth Annual IEEE Symposium on Logic in Computer Science (Cat. No.98CB36226). IEEE Comput. Soc. https://doi.org/10.1109/lics.1998.705669 Google Scholar
Cross Ref
- S. Abramsky and R. Jagadeesan. 1994. Games and full completeness for multiplicative linear logic. Journal of Symbolic Logic, 59, 2 (1994), June, 543–574. https://doi.org/10.2307/2275407 Google Scholar
Digital Library
- S. Abramsky, R. Jagadeesan, and P. Malacaria. 2000. Full Abstraction for PCF. Information and Computation, 163, 2 (2000), Dec., 409–470. https://doi.org/10.1006/inco.2000.2930 Google Scholar
Digital Library
- J. Adamek, H. Herrlich, and G.E. Strecker. 2009. Abstract and Concrete Categories: The Joy of Cats. Dover Publications. isbn:9780486469348 lccn:2009010561 https://books.google.co.jp/books?id=rqT4PgAACAAJGoogle Scholar
- M. Alimohamed. 1995. A Characterization of Lambda Definability in Categorical Models of Implicit Polymorphism. Theor. Comput. Sci., 146, 1-2 (1995), July, 5–23. issn:0304-3975 https://doi.org/10.1016/0304-3975(94)00283-O Google Scholar
Digital Library
- F. Borceux. 1994. Handbook of Categorical Algebra, volume 1. Cambridge University Press. https://doi.org/10.1017/cbo9780511525858 Google Scholar
Cross Ref
- R. Cartwright, P.L. Curien, and M. Felleisen. 1994. Fully Abstract Semantics for Observably Sequential Languages. 111, 2 (1994), jun, 297–401. https://doi.org/10.1006/inco.1994.1047 Google Scholar
Digital Library
- P. Clairambault and M. de Visme. 2020. Full abstraction for the quantum lambda-calculus. Proceedings of the ACM on Programming Languages, 4, POPL (2020), jan, 1–28. https://doi.org/10.1145/3371131 Google Scholar
Digital Library
- P.-L. Curien. 2007. Definability and Full Abstraction. Electronic Notes in Theoretical Computer Science, 172 (2007), April, 301–310. https://doi.org/10.1016/j.entcs.2007.02.011 Google Scholar
Digital Library
- U. de’ Liguoro. 1996. PCF Definability via Kripke Logical Relations (after O’Hearn and Riecke). Laboratoire d’Informatique de l’Ecole Normale Supérieure.Google Scholar
- T. Ehrhard, C. Tasson, and M. Pagani. 2014. Probabilistic coherence spaces are fully abstract for probabilistic PCF. In Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM. https://doi.org/10.1145/2535838.2535865 Google Scholar
Digital Library
- M. Fiore, A. Jung, E. Moggi, P. O’Hearn, Riecke J., G. Rosolini, and I. Stark. 1996. Domains and denotational semantics: History, accomplishments and open problems. Bulletin of EATCS, 59 (1996), 227–256. Edited by A. Jung.Google Scholar
- M. Fiore, G. Plotkin, and D. Turi. 1999. Abstract Syntax and Variable Binding. In Proceedings of the 14th Annual IEEE Symposium on Logic in Computer Science (LICS ’99). IEEE Computer Society, Washington, DC, USA. 193–. isbn:0-7695-0158-3 http://dl.acm.org/citation.cfm?id=788021.788948Google Scholar
- M. Fiore and A. Simpson. 1999. Lambda Definability with Sums via Grothendieck Logical Relations. In Typed Lambda Calculi and Applications, J.-Y. Girard (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 147–161. isbn:978-3-540-48959-7Google Scholar
- P. Freyd. 1972. Aspects of topoi. Bulletin of the Australian Mathematical Society, 7, 1 (1972), aug, 1–76. https://doi.org/10.1017/s0004972700044828 Google Scholar
Cross Ref
- J. Y. Girard. 1989. Proofs and types. Cambridge University Press, Cambridge. isbn:9780521371810Google Scholar
- M. Giry. 1982. A categorical approach to probability theory. In Lecture Notes in Mathematics. Springer Berlin Heidelberg, 68–85. https://doi.org/10.1007/bfb0092872 Google Scholar
Cross Ref
- J. Goubault-Larrecq, S. Lasota, and D. Nowak. 2008. Logical relations for monadic types. Mathematical Structures in Computer Science, 18, 06 (2008), Oct., 1169. https://doi.org/10.1017/s0960129508007172 Google Scholar
Digital Library
- J. Goubault-Larrecq, S. Lasota, D. Nowak, and Y. Zhang. 2004. Complete Lax Logical Relations for Cryptographic Lambda-Calculi. In Computer Science Logic. Springer Berlin Heidelberg, 400–414. https://doi.org/10.1007/978-3-540-30124-0_31 Google Scholar
Cross Ref
- C. A. Hermida. 1993. Fibrations, Logical Predicates and Indeterminates. Ph.D. Dissertation. University of Edinburgh.Google Scholar
- C. Heunen, O. Kammar, S. Staton, and H. Yang. 2017. A Convenient Category for Higher-Order Probability Theory. In Proceedings of the 32nd Annual ACM/IEEE Symposium on Logic in Computer Science (LICS ’17). IEEE Press, Article 77, 12 pages. isbn:9781509030187Google Scholar
- M. Huot, S. Staton, and M. Vákár. 2020. Correctness of Automatic Differentiation via Diffeologies and Categorical Gluing. In Lecture Notes in Computer Science. Springer International Publishing, 319–338. https://doi.org/10.1007/978-3-030-45231-5_17 Google Scholar
Digital Library
- J.M.E. Hyland and C.-H.L. Ong. 2000. On Full Abstraction for PCF: I, II, and III. Information and Computation, 163, 2 (2000), Dec., 285–408. https://doi.org/10.1006/inco.2000.2917 Google Scholar
Digital Library
- P. Iglesias-Zemmour. 2013. Diffeology. American Mathematical Society, Providence, Rhode Island. isbn:9780821891315Google Scholar
- B. Jacobs. 1993. Comprehension categories and the semantics of type dependency. Theoretical Computer Science, 107, 2 (1993), Jan., 169–207. https://doi.org/10.1016/0304-3975(93)90169-t Google Scholar
Digital Library
- B. Jacobs. 1999. Categorical Logic and Type Theory (Studies in Logic and the Foundations of Mathematics). North Holland, Amsterdam.Google Scholar
- P. T. Johnstone. 2002. Sketches of an elephant : a topos theory compendium. Oxford University Press, Oxford New York. isbn:9780198534259Google Scholar
- A. Jung and J. Tiuryn. 1993. A new characterization of lambda definability. In Typed Lambda Calculi and Applications, Marc Bezem and Jan Friso Groote (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 245–257. isbn:978-3-540-47586-6Google Scholar
- O. Kammar. 2014. An Algebraic Theory of Type-and-Effect Systems. Ph.D. Dissertation. University of Edinburgh.Google Scholar
- O. Kammar and D. McDermott. 2018. Factorisation Systems for Logical Relations and Monadic Lifting in Type-and-effect System Semantics. Electronic Notes in Theoretical Computer Science, 341 (2018), 239 – 260. issn:1571-0661 https://doi.org/10.1016/j.entcs.2018.11.012 Proceedings of the Thirty-Fourth Conference on the Mathematical Foundations of Programming Semantics (MFPS XXXIV). Google Scholar
Cross Ref
- O. Kammar and G. D. Plotkin. 2012. Algebraic foundations for effect-dependent optimisations. In Proceedings of the 39th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages - POPL ' 12. ACM Press. https://doi.org/10.1145/2103656.2103698 Google Scholar
Digital Library
- S. Katsumata. 2005. A Semantic Formulation of ⊤ ⊤ -Lifting and Logical Predicates for Computational Metalanguage. In Computer Science Logic. Springer Berlin Heidelberg, 87–102. https://doi.org/10.1007/11538363_8 Google Scholar
Digital Library
- S. Katsumata. 2008. A Characterisation of Lambda Definability with Sums Via ⊤ ⊤ -Closure Operators. In Computer Science Logic, Michael Kaminski and Simone Martini (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 278–292. isbn:978-3-540-87531-4Google Scholar
- S. Katsumata. 2013. Relating computational effects by ⊤ ⊤ -lifting. Information and Computation, 222 (2013), 228 – 246. issn:0890-5401 https://doi.org/10.1016/j.ic.2012.10.014 38th International Colloquium on Automata, Languages and Programming (ICALP 2011). Google Scholar
Digital Library
- A. Kock. 1972. Strong functors and monoidal monads. Archiv der Mathematik, 23, 1 (1972), dec, 113–120. https://doi.org/10.1007/bf01304852 Google Scholar
Cross Ref
- S. Lasota, D. Nowak, and Y. Zhang. 2007. On Completeness of Logical Relations for Monadic Types. In Advances in Computer Science - ASIAN 2006. Secure Software and Related Issues. Springer Berlin Heidelberg, 223–230. https://doi.org/10.1007/978-3-540-77505-8_17 Google Scholar
Cross Ref
- F. W. Lawvere. 2006. Diagonal Arguments and Cartesian Closed Categories. Reprints in Theory and Applications of Categories, 1–13. http://www.tac.mta.ca/tac/reprints/articles/15/tr15.pdfGoogle Scholar
- F. Loregian and E. Riehl. 2020. Categorical notions of fibration. Expositiones Mathematicae, 38, 4 (2020), Dec., 496–514. https://doi.org/10.1016/j.exmath.2019.02.004 Google Scholar
Cross Ref
- Q. M. Ma and John C. Reynolds. 1992. Types, abstraction, and parametric polymorphism, part 2. In Lecture Notes in Computer Science. Springer Berlin Heidelberg, 1–40. https://doi.org/10.1007/3-540-55511-0_1 Google Scholar
Cross Ref
- M. Marz. 2000. A fully abstract model for sequential computation. Electronic Notes in Theoretical Computer Science, 35 (2000), 133–152. https://doi.org/10.1016/s1571-0661(05)80735-2 Google Scholar
Cross Ref
- C. Matache, S. Moss, and S. Staton. 2021. Recursion and Sequentiality in Categories of Sheaves. To appear in Proceedings of 6th International Conference on Formal Structures for Computation and Deduction (FSCD 2021), https://doi.org/10.4230/LIPIcs.FSCD.2021.25 Google Scholar
Cross Ref
- R. Milner. 1977. Fully abstract models of typed λ -calculi. Theoretical Computer Science, 4, 1 (1977), Feb., 1–22. https://doi.org/10.1016/0304-3975(77)90053-6 Google Scholar
Cross Ref
- J. C. Mitchell and A. Scedrov. 1993. Notes on sconing and relators. In Computer Science Logic. Springer Berlin Heidelberg, 352–378. https://doi.org/10.1007/3-540-56992-8_21 Google Scholar
Cross Ref
- E. Moggi. 1989. Computational Lambda-Calculus and Monads. In Proceedings of the Fourth Annual Symposium on Logic in Computer Science. IEEE Press, 14–23. isbn:0818619546Google Scholar
Cross Ref
- E. Moggi. 1991. Notions of computation and monads. Inf. Comput., 93, 1 (1991), 55–92.Google Scholar
Digital Library
- A. S. Murawski and N. Tzevelekos. 2012. Algorithmic Games for Full Ground References. In Automata, Languages, and Programming. Springer Berlin Heidelberg, 312–324. https://doi.org/10.1007/978-3-642-31585-5_30 Google Scholar
Digital Library
- P. W. O’Hearn and J. G. Riecke. 1995. Kripke Logical Relations and PCF. Information and Computation, 120, 1 (1995), 107 – 116. issn:0890-5401 https://doi.org/10.1006/inco.1995.1103 Google Scholar
Digital Library
- B. Pareigis. 1977. Non-additive ring and module theory II: C-categories, C-functors and C-morphisms. Publicationes mathematicae, 24, 3 (1977), January.Google Scholar
- G. D. Plotkin. 1973. Lambda-definability and logical relations. University of Edinburgh.Google Scholar
- G. D. Plotkin. 1977. LCF considered as a programming language. Theoretical Computer Science, 5, 3 (1977), Dec., 223–255. https://doi.org/10.1016/0304-3975(77)90044-5 Google Scholar
Cross Ref
- G. D. Plotkin. 1980. Lambda-Definability in the Full Type Hierarchy. In To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism, Jonathan P. Seldin and J. Roger Hindley (Eds.). Academic Press.Google Scholar
- G. D. Plotkin and J. Power. 2003. Algebraic Operations and Generic Effects. Applied Categorical Structures, 11, 1 (2003), 69–94. https://doi.org/10.1023/a:1023064908962 Google Scholar
Cross Ref
- J. Power and E. Robinson. 2000. Logical Relations and Data Abstraction. In Computer Science Logic. Springer Berlin Heidelberg, 497–511. https://doi.org/10.1007/3-540-44622-2_34 Google Scholar
Cross Ref
- J. G. Riecke and A. Sandholm. 2002. A Relational Account of Call-by-Value Sequentiality. Information and Computation, 179, 2 (2002), Dec., 296–331. https://doi.org/10.1006/inco.2002.2957 Google Scholar
Digital Library
- G. Scherer. 2017. Deciding Equivalence with Sums and the Empty Type. In Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages (POPL 2017). Association for Computing Machinery, New York, NY, USA. 374–386. isbn:9781450346603 https://doi.org/10.1145/3009837.3009901 Google Scholar
Digital Library
- A. Ścibior, O. Kammar, V. Vákár, S. Staton, H. Yang, Y. Cai, K. Ostermann, S. K. Moss, C. Heunen, and Z. Ghahramani. 2018. Denotational validation of higher-order Bayesian inference. Proceedings of the ACM on Programming Languages, 2, POPL (2018), Jan., 1–29. https://doi.org/10.1145/3158148 Google Scholar
Digital Library
- J. M. Souriau. 1980. Groupes differentiels. In Differential Geometrical Methods in Mathematical Physics, P. L. García, A. Pérez-Rendón, and J. M. Souriau (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 91–128. isbn:978-3-540-38405-2Google Scholar
- S. Staton. 2017. Commutative Semantics for Probabilistic Programming. In Programming Languages and Systems. Springer Berlin Heidelberg, 855–879. https://doi.org/10.1007/978-3-662-54434-1_32 Google Scholar
Digital Library
- S. Staton, H. Yang, F. Wood, C. Heunen, and O. Kammar. 2016. Semantics for probabilistic programming. In Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science. ACM. https://doi.org/10.1145/2933575.2935313 Google Scholar
Digital Library
- R. Street. 1972. The formal theory of monads. Journal of Pure and Applied Algebra, 2, 2 (1972), 149 –168. issn:0022-4049 https://doi.org/10.1016/0022-4049(72)90019-9 Google Scholar
Cross Ref
Index Terms
Fully abstract models for effectful λ-calculi via category-theoretic logical relations
Recommendations
Lambda Abstraction Algebras: Coordinatizing Models of Lambda Calculus
Lambda abstraction algebras are designed to algebraize the untyped lambda calculus in the same way cylindric and polyadic algebras algebraize the first-order logic; they are intended as an alternative to combinatory algebras in this regard. Like ...
Lambda Abstraction Algebras: Coordinatizing Models of Lambda Calculus
Lambda abstraction algebras are designed to algebraize the untyped lambda calculus in the same way cylindric and polyadic algebras algebraize the first-order logic; they are intended as an alternative to combinatory algebras in this regard. Like ...
Category Theoretic Understandings of Universal Algebra and its Dual: Monads and Lawvere Theories, Comonads and What?
Universal algebra is often known within computer science in the guise of algebraic specification or equational logic. In 1963, it was given a category theoretic characterisation in terms of what are now called Lawvere theories. Unlike operations and ...






Comments