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.
Supplemental Material
- Andreas Abel. 2012. Normalization by Evaluation, Dependent Types and Impredicativity. Ph.D. Dissertation. Institut für Informatik Ludwig-Maximilians-Universität München.Google Scholar
- Danel Ahman. 2018. Handling Fibred Algebraic Effects. Proc. ACM Program. Lang. 2, POPL, Article 7 (Jan. 2018), 29 pages. Google Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Thierry Coquand. 2019. Canonicity and normalization for dependent type theory. Theor. Comput. Sci. 777 (2019), 184–191. Google Scholar
Digital Library
- Carsten Führmann. 1999. Direct Models of the Computational Lambda-calculus. Electronic Notes in Theoretical Computer Science 20 (1999), 245 – 292. Google Scholar
Cross Ref
- 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 Scholar
Digital Library
- Jean-Yves Girard. 1987. Linear Logic. Theor. Comput. Sci. 50 (1987), 1–102. Google Scholar
Digital Library
- V. Glivenko. 1929. Sur Quelques Points de la Logique de M. Brouwer. Bulletins de la classe des sciences 15 (1929), 183–188.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- Jean-Louis Krivine. 1994. Classical Logic, Storage Operators and Second-Order lambda-Calculus. Ann. Pure Appl. Logic 68, 1 (1994), 53–78. Google Scholar
Cross Ref
- 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 Scholar
Digital Library
- Paul Blain Levy. 2001. Call-by-push-value. Ph.D. Dissertation. Queen Mary, University of London.Google Scholar
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Eugenio Moggi. 1991. Notions of Computation and Monads. Information and Computation 93, 1 (July 1991), 55–92.Google Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- The Univalent Foundations Program. 2013. Homotopy Type Theory: Univalent Foundations of Mathematics. Institute for Advanced Study.Google Scholar
- Matthijs Vákár. 2015. A Framework for Dependent Types and Effects. arXiv: arXiv:1512.08009 https://arxiv.org/abs/1512.08009 draft.Google Scholar
- Matthijs Vákár. 2017. In Search of Effectful Dependent Types. Ph.D. Dissertation. University of Oxford.Google Scholar
- Andrew Wright. 1995. Simple Imperative Polymorphism. In LISP and Symbolic Computation. 343–356.Google Scholar
Index Terms
The fire triangle: how to mix substitution, dependent elimination, and effects
Recommendations
Completeness and Cut-elimination in the Intuitionistic Theory of Types
In this paper we define a model theory and give a semantic proof of cut-elimination for ICTT, an intuitionistic formulation of Church's theory of types defined by Miller et al. and the basis for the λProlog programming language. Our approach, extending ...
Call-by-push-value in Coq: operational, equational, and denotational theory
CPP 2019: Proceedings of the 8th ACM SIGPLAN International Conference on Certified Programs and ProofsCall-by-push-value (CBPV) is an idealised calculus for functional and imperative programming, introduced as a subsuming paradigm for both call-by-value (CBV) and call-by-name (CBN). We formalise weak and strong operational semantics for (effect-free) ...
Propositions as [Types]
Image factorizations in regular categories are stable under pullbacks, so they model a natural modal operator in dependent type theory. This unary type constructor [A] has turned up previously in a syntactic form as a way of erasing computational ...






Comments