skip to main content
research-article
Open Access

The fire triangle: how to mix substitution, dependent elimination, and effects

Published:20 December 2019Publication History
Skip Abstract Section

Abstract

There is a critical tension between substitution, dependent elimination and effects in type theory. In this paper, we crystallize this tension in the form of a no-go theorem that constitutes the fire triangle of type theory. To release this tension, we propose ∂CBPV, an extension of call-by-push-value (CBPV) —a general calculus of effects—to dependent types. Then, by extending to ∂CBPV the well-known decompositions of call-by-name and call-by-value into CBPV, we show why, in presence of effects, dependent elimination must be restricted in call-by-name, and substitution must be restricted in call-by-value. To justify ∂CBPV and show that it is general enough to interpret many kinds of effects, we define various effectful syntactic translations from ∂CBPV to Martin-Löf type theory: the reader, weaning and forcing translations.

Skip Supplemental Material Section

Supplemental Material

a58-pedrot.webm

References

  1. Andreas Abel. 2012. Normalization by Evaluation, Dependent Types and Impredicativity. Ph.D. Dissertation. Institut für Informatik Ludwig-Maximilians-Universität München.Google ScholarGoogle Scholar
  2. Danel Ahman. 2018. Handling Fibred Algebraic Effects. Proc. ACM Program. Lang. 2, POPL, Article 7 (Jan. 2018), 29 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Danel Ahman, Neil Ghani, and Gordon D. Plotkin. 2016. Dependent Types and Fibred Computational Effects. In 19th International Conference on Foundations of Software Science and Computation Structures. Springer Berlin Heidelberg, Eindhoven, The Netherlands, 36–54. Google ScholarGoogle ScholarCross RefCross Ref
  4. Gilles Barthe and Tarmo Uustalu. 2002. CPS Translating Inductive and Coinductive Types. In Proceedings of Partial Evaluation and Semantics-based Program Manipulation. ACM, 131–142.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Simon Boulier, Pierre-Marie Pédrot, and Nicolas Tabareau. 2017. The Next 700 Syntactical Models of Type Theory. In Proceedings of Certified Programs and Proofs. ACM, 182–194.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. William J. Bowman, Youyou Cong, Nick Rioux, and Amal Ahmed. 2018. Type-preserving CPS translation of Σ and Π types is not not possible. PACMPL 2, POPL (2018), 22:1–22:33. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Thierry Coquand. 2019. Canonicity and normalization for dependent type theory. Theor. Comput. Sci. 777 (2019), 184–191. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Carsten Führmann. 1999. Direct Models of the Computational Lambda-calculus. Electronic Notes in Theoretical Computer Science 20 (1999), 245 – 292. Google ScholarGoogle ScholarCross RefCross Ref
  9. Gaëtan Gilbert, Jesper Cockx, Matthieu Sozeau, and Nicolas Tabareau. 2019. Definitional proof-irrelevance without K. PACMPL 3, POPL (2019), 3:1–3:28. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Jean-Yves Girard. 1987. Linear Logic. Theor. Comput. Sci. 50 (1987), 1–102. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. V. Glivenko. 1929. Sur Quelques Points de la Logique de M. Brouwer. Bulletins de la classe des sciences 15 (1929), 183–188.Google ScholarGoogle Scholar
  12. Timothy Griffin. 1990. A Formulae-as-Types Notion of Control. In Conference Record of the Seventeenth Annual ACM Symposium on Principles of Programming Languages, San Francisco, California, USA, January 1990. 47–58. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Hugo Herbelin. 2005. On the Degeneracy of Sigma-Types in Presence of Computational Classical Logic. In Seventh International Conference, TLCA ’05, Nara, Japan. April 2005, Proceedings (Lecture Notes in Computer Science), Pawel Urzyczyn (Ed.), Vol. 3461. Springer, 209–220.Google ScholarGoogle Scholar
  14. Guilhem Jaber, Gabriel Lewertowski, Pierre-Marie Pédrot, Matthieu Sozeau, and Nicolas Tabareau. 2016. The Definitional Side of the Forcing. In Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science, LICS ’16, New York, NY, USA, July 5-8, 2016. 367–376.Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Guilhem Jaber, Nicolas Tabareau, and Matthieu Sozeau. 2012. Extending Type Theory with Forcing. In LICS 2012 : Logic In Computer Science. Dubrovnik, Croatia, 0–0.Google ScholarGoogle Scholar
  16. Jean-Louis Krivine. 1994. Classical Logic, Storage Operators and Second-Order lambda-Calculus. Ann. Pure Appl. Logic 68, 1 (1994), 53–78. Google ScholarGoogle ScholarCross RefCross Ref
  17. Rodolphe Lepigre. 2016. A Classical Realizability Model for a Semantical Value Restriction. In Programming Languages and Systems - 25th European Symposium on Programming, ESOP 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. 476–502. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Paul Blain Levy. 2001. Call-by-push-value. Ph.D. Dissertation. Queen Mary, University of London.Google ScholarGoogle Scholar
  19. Paul Blain Levy. 2002. Possible World Semantics for General Storage in Call-By-Value. In Computer Science Logic, 16th International Workshop, CSL 2002, 11th Annual Conference of the EACSL, Edinburgh, Scotland, UK, September 22-25, 2002, Proceedings. 232–246. Google ScholarGoogle ScholarCross RefCross Ref
  20. Paul Blain Levy. 2017. Contextual Isomorphisms. In Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages. ACM, New York, NY, USA, 400–414. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Per Martin-Löf. 2006. 100 years of Zermelo’s axiom of choice: what was the problem with it? Comput. J. 49, 3 (2006), 345–350. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Eugenio Moggi. 1991. Notions of Computation and Monads. Information and Computation 93, 1 (July 1991), 55–92.Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Guillaume Munch-Maccagnoni. 2014. Models of a Non-Associative Composition. In 17th International Conference on Foundations of Software Science and Computation Structures, Anca Muscholl (Ed.), Vol. 8412. Springer, Grenoble, France, 396–410.Google ScholarGoogle ScholarCross RefCross Ref
  24. Pierre-Marie Pédrot and Nicolas Tabareau. 2017. An effectful way to eliminate addiction to dependence. In 32nd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2017, Reykjavik, Iceland, June 20-23, 2017. IEEE Computer Society, 1–12. Google ScholarGoogle ScholarCross RefCross Ref
  25. Pierre-Marie Pédrot and Nicolas Tabareau. 2018. Failure is Not an Option - An Exceptional Type Theory. In Programming Languages and Systems - 27th European Symposium on Programming, ESOP 2018, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2018, Thessaloniki, Greece, April 14-20, 2018, Proceedings. 245–271. Google ScholarGoogle ScholarCross RefCross Ref
  26. The Univalent Foundations Program. 2013. Homotopy Type Theory: Univalent Foundations of Mathematics. Institute for Advanced Study.Google ScholarGoogle Scholar
  27. Matthijs Vákár. 2015. A Framework for Dependent Types and Effects. arXiv: arXiv:1512.08009 https://arxiv.org/abs/1512.08009 draft.Google ScholarGoogle Scholar
  28. Matthijs Vákár. 2017. In Search of Effectful Dependent Types. Ph.D. Dissertation. University of Oxford.Google ScholarGoogle Scholar
  29. Andrew Wright. 1995. Simple Imperative Polymorphism. In LISP and Symbolic Computation. 343–356.Google ScholarGoogle Scholar

Index Terms

  1. The fire triangle: how to mix substitution, dependent elimination, and effects

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image Proceedings of the ACM on Programming Languages
      Proceedings of the ACM on Programming Languages  Volume 4, Issue POPL
      January 2020
      1984 pages
      EISSN:2475-1421
      DOI:10.1145/3377388
      Issue’s Table of Contents

      Copyright © 2019 Owner/Author

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 20 December 2019
      Published in pacmpl Volume 4, Issue POPL

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!