Towards Univalent Reference Types: The Impact of Univalence on Denotational Semantics

Authors Jonathan Sterling , Daniel Gratzer , Lars Birkedal



PDF
Thumbnail PDF

File

LIPIcs.CSL.2024.47.pdf
  • Filesize: 0.93 MB
  • 21 pages

Document Identifiers

Author Details

Jonathan Sterling
  • University of Cambridge, UK
Daniel Gratzer
  • Aarhus University, Denmark
Lars Birkedal
  • Aarhus University, Denmark

Acknowledgements

We are thankful to Carlo Angiuli, Steve Awodey, and Robert Harper for teaching us the importance of realizability methods in homotopy type theory. We thank Zhixuan Yang for proof-reading. Finally, we are grateful to the anonymous referees for their comments and suggestions.

Cite AsGet BibTex

Jonathan Sterling, Daniel Gratzer, and Lars Birkedal. Towards Univalent Reference Types: The Impact of Univalence on Denotational Semantics. In 32nd EACSL Annual Conference on Computer Science Logic (CSL 2024). Leibniz International Proceedings in Informatics (LIPIcs), Volume 288, pp. 47:1-47:21, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024)
https://doi.org/10.4230/LIPIcs.CSL.2024.47

Abstract

We develop a denotational semantics for general reference types in an impredicative version of guarded homotopy type theory, an adaptation of synthetic guarded domain theory to Voevodsky’s univalent foundations. We observe for the first time the profound impact of univalence on the denotational semantics of mutable state. Univalence automatically ensures that all computations are invariant under symmetries of the heap - a bountiful source of program equivalences. In particular, even the most simplistic univalent model enjoys many new equations that do not hold when the same constructions are carried out in the universes of traditional set-level (extensional) type theory.

Subject Classification

ACM Subject Classification
  • Theory of computation → Denotational semantics
  • Theory of computation → Categorical semantics
  • Theory of computation → Type structures
  • Theory of computation → Type theory
Keywords
  • univalent foundations
  • homotopy type theory
  • impredicative encodings
  • synthetic guarded domain theory
  • guarded recursion
  • higher-order store
  • reference types

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. Frederik Lerbjerg Aagaard, Magnus Baunsgaard Kristensen, Daniel Gratzer, and Lars Birkedal. Unifying cubical and multimodal type theory. Unpublished manuscript, 2022. URL: https://doi.org/10.48550/arXiv.2203.13000.
  2. S. Abramsky, K. Honda, and G. McCusker. A fully abstract game semantics for general references. In Proceedings of the 13th Annual IEEE Symposium on Logic in Computer Science, pages 334-344, USA, 1998. IEEE Computer Society. URL: https://doi.org/10.1109/LICS.1998.705669.
  3. Amal Jamil Ahmed. Semantics of Types for Mutable State. PhD thesis, Princeton University, 2004. URL: http://www.ccs.neu.edu/home/amal/ahmedthesis.pdf.
  4. Benedikt Ahrens, Dan Frumin, Marco Maggesi, Niccolò Veltri, and Niels van der Weide. Bicategories in univalent foundations. Mathematical Structures in Computer Science, 31(10):1232-1269, 2021. URL: https://doi.org/10.1017/S0960129522000032.
  5. Benedikt Ahrens and Peter LeFanu Lumsdaine. Displayed categories. Logical Methods in Computer Science, 15, March 2019. URL: https://doi.org/10.23638/LMCS-15(1:20)2019.
  6. Pierre America and Jan J. M. M. Rutten. Solving reflexive domain equations in a category of complete metric spaces. In Proceedings of the 3rd Workshop on Mathematical Foundations of Programming Language Semantics, pages 254-288, Berlin, Heidelberg, 1987. Springer-Verlag. Google Scholar
  7. Carlo Angiuli, Evan Cavallo, Anders Mörtberg, and Max Zeuner. Internalizing representation independence with univalence. Proceedings of the ACM on Programming Languages, 5(POPL):1-30, January 2021. URL: https://doi.org/10.1145/3434293.
  8. Andrew W. Appel and David McAllester. An indexed model of recursive types for foundational proof-carrying code. ACM Transactions on Programming Languages and Systems, 23(5):657-683, September 2001. URL: https://doi.org/10.1145/504709.504712.
  9. Andrew W. Appel, Paul-André Melliès, Christopher D. Richards, and Jérôme Vouillon. A very modal model of a modern, major, general type system. In Proceedings of the 34th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 109-122, Nice, France, 2007. Association for Computing Machinery. Google Scholar
  10. A. Arnold and M. Nivat. Metric interpretations of infinite trees and semantics of non deterministic recursive programs. Theoretical Computer Science, 11(2):181-205, 1980. URL: https://doi.org/10.1016/0304-3975(80)90045-6.
  11. Steve Awodey. Impredicative encodings in HoTT (or: Towards a realizability ∞-topos). Slides from a talk given the Big Proof meeting, Isaac Newton Institute, Cambridge. URL: https://www.andrew.cmu.edu/user/awodey/talks/BigProofs.pdf.
  12. Steve Awodey. On Hofmann-Streicher universes. Unpublished manuscript, 2022. URL: https://doi.org/10.48550/arXiv.2205.10917.
  13. Steve Awodey, Jonas Frey, and Sam Speight. Impredicative encodings of (higher) inductive types. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, pages 76-85, Oxford, United Kingdom, 2018. Association for Computing Machinery. URL: https://doi.org/10.1145/3209108.3209130.
  14. Lars Birkedal, Aleš Bizjak, Ranald Clouston, Hans Bugge Grathwohl, Bas Spitters, and Andrea Vezzosi. Guarded Cubical Type Theory: Path Equality for Guarded Recursion. In Jean-Marc Talbot and Laurent Regnier, editors, 25th EACSL Annual Conference on Computer Science Logic (CSL 2016), volume 62 of Leibniz International Proceedings in Informatics (LIPIcs), pages 23:1-23:17, Dagstuhl, Germany, 2016. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik. URL: https://doi.org/10.4230/LIPIcs.CSL.2016.23.
  15. Lars Birkedal, Aleš Bizjak, Ranald Clouston, Hans Bugge Grathwohl, Bas Spitters, and Andrea Vezzosi. Guarded cubical type theory. Journal of Automated Reasoning, 63(2):211-253, 2019. URL: https://doi.org/10.1007/s10817-018-9471-7.
  16. Lars Birkedal and Rasmus Ejlers Møgelberg. Intensional type theory with guarded recursive types qua fixed points on universes. In Proceedings of the 2013 28th Annual ACM/IEEE Symposium on Logic in Computer Science, pages 213-222, Washington, DC, USA, 2013. IEEE Computer Society. URL: https://doi.org/10.1109/LICS.2013.27.
  17. Lars Birkedal, Rasmus Ejlers Møgelberg, Jan Schwinghammer, and Kristian Støvring. First steps in synthetic guarded domain theory: Step-indexing in the topos of trees. In Proceedings of the 2011 IEEE 26th Annual Symposium on Logic in Computer Science, pages 55-64, Washington, DC, USA, 2011. IEEE Computer Society. URL: https://doi.org/10.1109/LICS.2011.16.
  18. Lars Birkedal, Kristian Støvring, and Jacob Thamsborg. Realisability semantics of parametric polymorphism, general references and recursive types. Mathematical Structures in Computer Science, 20(4):655-703, 2010. URL: https://doi.org/10.1017/S0960129510000162.
  19. Aleš Bizjak, Hans Bugge Grathwohl, Ranald Clouston, Rasmus Ejlers Møgelberg, and Lars Birkedal. Guarded dependent type theory with coinductive types. In Bart Jacobs and Christof Löding, editors, Foundations of Software Science and Computation Structures: 19th International Conference, FOSSACS 2016, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2016, Eindhoven, The Netherlands, April 2-8, 2016, Proceedings, pages 20-35, Berlin, Heidelberg, 2016. Springer Berlin Heidelberg. URL: https://doi.org/10.1007/978-3-662-49630-5_2.
  20. Aleš Bizjak and Rasmus Ejlers Møgelberg. Denotational semantics for guarded dependent type theory. Mathematical Structures in Computer Science, 30(4):342-378, 2020. URL: https://doi.org/10.1017/S0960129520000080.
  21. Franck Breugel and Jeroen Warmerdam. Solving domain equations in a category of compact metric spaces. Technical report, CWI (Centre for Mathematics and Computer Science), NLD, 1994. Google Scholar
  22. Titouan Carette, Louis Lemonnier, and Vladimir Zamdzhiev. Central submonads and notions of computation: Soundness, completeness and internal languages. In 2023 38th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), pages 1-13, Los Alamitos, CA, USA, June 2023. IEEE Computer Society. URL: https://doi.org/10.1109/LICS56636.2023.10175687.
  23. Murdoch J. Gabbay and Andrew M. Pitts. A new approach to abstract syntax with variable binding. Formal Aspects of Computing, 13(3):341-363, July 2002. URL: https://doi.org/10.1007/s001650200016.
  24. Martin Hofmann and Thomas Streicher. Lifting Grothendieck universes. Unpublished note, 1997. URL: https://www2.mathematik.tu-darmstadt.de/~streicher/NOTES/lift.pdf.
  25. J. M. E. Hyland. The effective topos. In A. S. Troelstra and D. Van Dalen, editors, The L.E.J. Brouwer Centenary Symposium, pages 165-216. North Holland Publishing Company, 1982. Google Scholar
  26. J. M. E. Hyland, E. P. Robinson, and G. Rosolini. The Discrete Objects in the Effective Topos. Proceedings of the London Mathematical Society, s3-60(1):1-36, January 1990. URL: https://doi.org/10.1112/plms/s3-60.1.1.
  27. Ohad Kammar, Paul B. Levy, Sean K. Moss, and Sam Staton. A monad for full ground reference cells. In Proceedings of the 32nd Annual ACM/IEEE Symposium on Logic in Computer Science, Reykjavik, Iceland, June 2017. IEEE Press. URL: https://doi.org/10.1109/LICS.2017.8005109.
  28. Paul Blain Levy. Possible world semantics for general storage in call-by-value. In Julian Bradfield, editor, Computer Science Logic, pages 232-246, Berlin, Heidelberg, 2002. Springer Berlin Heidelberg. Google Scholar
  29. Paul Blain Levy. Adjunction models for call-by-push-value with stacks. Electronic Notes in Theoretical Computer Science, 69:248-271, 2003. CTCS'02, Category Theory and Computer Science. URL: https://doi.org/10.1016/S1571-0661(04)80568-1.
  30. Paul Blain Levy. Call-by-Push-Value: A Functional/Imperative Synthesis. Kluwer, Semantic Structures in Computation, 2, January 2003. Google Scholar
  31. Rasmus Ejlers Møgelberg and Marco Paviotti. Denotational semantics of recursive types in synthetic guarded domain theory. In Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science, pages 317-326, New York, NY, USA, 2016. Association for Computing Machinery. URL: https://doi.org/10.1145/2933575.2934516.
  32. Eugenio Moggi. Notions of computation and monads. Information and Computation, 93(1):55-92, 1991. Selections from 1989 IEEE Symposium on Logic in Computer Science. URL: https://doi.org/10.1016/0890-5401(91)90052-4.
  33. Andrzej Murawski and Nikos Tzevelekos. Nominal game semantics. Foundations and Trends in Programming Languages, 2(4):191-269, 2016. URL: https://doi.org/10.1561/2500000017.
  34. Ian Orton and Andrew M. Pitts. Axioms for modelling cubical type theory in a topos. In Jean-Marc Talbot and Laurent Regnier, editors, 25th EACSL Annual Conference on Computer Science Logic (CSL 2016), volume 62 of Leibniz International Proceedings in Informatics (LIPIcs), pages 24:1-24:19, Dagstuhl, Germany, 2016. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik. URL: https://doi.org/10.4230/LIPIcs.CSL.2016.24.
  35. Marco Paviotti. Denotational semantics in Synthetic Guarded Domain Theory. PhD thesis, IT-Universitetet i København, Denmark, 2016. Google Scholar
  36. Marco Paviotti, Rasmus Ejlers Møgelberg, and Lars Birkedal. A model of PCF in Guarded Type Theory. Electronic Notes in Theoretical Computer Science, 319(Supplement C):333-349, 2015. The 31st Conference on the Mathematical Foundations of Programming Semantics (MFPS XXXI). URL: https://doi.org/10.1016/j.entcs.2015.12.020.
  37. Andrew M. Pitts. Nominal Sets: Names and Symmetry in Computer Science. Cambridge University Press, New York, NY, USA, 2013. Google Scholar
  38. Gordon D. Plotkin and John Power. Notions of computation determine monads. In Proceedings of the 5th International Conference on Foundations of Software Science and Computation Structures, pages 342-356, Berlin, Heidelberg, 2002. Springer-Verlag. Google Scholar
  39. John C. Reynolds. The essence of algol. In Peter W. O'Hearn and Robert D. Tennent, editors, Algol-like Languages, pages 67-88. Birkhäuser Boston, Boston, MA, 1997. URL: https://doi.org/10.1007/978-1-4612-4118-8_4.
  40. Egbert Rijke. Introduction to homotopy type theory. To appear, Cambridge University Press, 2022. URL: https://doi.org/10.48550/arXiv.2212.11082.
  41. Egbert Rijke, Michael Shulman, and Bas Spitters. Modalities in homotopy type theory. Logical Methods in Computer Science, 16, January 2020. URL: https://doi.org/10.23638/LMCS-16(1:2)2020.
  42. Sam Staton. Completeness for algebraic theories of local state. In Luke Ong, editor, Foundations of Software Science and Computational Structures, pages 48-63, Berlin, Heidelberg, 2010. Springer Berlin Heidelberg. Google Scholar
  43. Jonathan Sterling, Daniel Gratzer, and Lars Birkedal. Denotational semantics of general store and polymorphism. Unpublished manuscript, July 2022. URL: https://doi.org/10.48550/arXiv.2210.02169.
  44. Nikos Tzevelekos. Full abstraction for nominal general references. Logical Methods in Computer Science, Volume 5, Issue 3, September 2009. URL: https://doi.org/10.2168/LMCS-5(3:8)2009.
  45. Taichi Uemura. Cubical Assemblies, a Univalent and Impredicative Universe and a Failure of Propositional Resizing. In Peter Dybjer, José Espírito Santo, and Luís Pinto, editors, 24th International Conference on Types for Proofs and Programs (TYPES 2018), volume 130 of Leibniz International Proceedings in Informatics (LIPIcs), pages 7:1-7:20, Dagstuhl, Germany, 2019. Schloss Dagstuhl - Leibniz-Zentrum für Informatik. URL: https://doi.org/10.4230/LIPIcs.TYPES.2018.7.
  46. The Univalent Foundations Program. Homotopy Type Theory: Univalent Foundations of Mathematics. https://homotopytypetheory.org/book, Institute for Advanced Study, 2013.
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail