Computer Science > Logic in Computer Science
[Submitted on 25 Dec 2015 (v1), last revised 14 Mar 2016 (this version, v2)]
Title:A Framework for Dependent Types and Effects
View PDFAbstract:We generalise Levy's call-by-push-value (CBPV) to dependent type theory, to gain a better understanding of how to combine dependent types with effects. We define a dependently typed extension of CBPV, dCBPV-, and show that it has a very natural small-step operational semantics, which satisfies subject reduction and (depending on the effects present) determinism and strong normalization, and an elegant categorical semantics, which - surprisingly - is no more complicated than the simply typed semantics.
We have full and faithful translations from a dependently typed version of Moggi's monadic metalanguage and of a call-by-name (CBN) dependent type theory into dCBPV- which give rise to the expected operational behaviour. However, it turns out that dCBPV- does not suffice to encode call-by-value (CBV) dependent type theory or the strong (dependent) elimination rules for positive connectives in CBN-dependent type theory.
To mend this problem, we discuss a second, more expressive system dCBPV+, which additionally has a principle of Kleisli extension for dependent functions. We obtain the desired CBV- and CBN-translations of dependent type theory into dCBPV+. It too has a natural categorical semantics and operational semantics. However, depending on the effects we consider, we may lose uniqueness of typing, as the type of a computation may become more specified as certain effects are executed. This idea can be neatly formalized using a notion of subtyping.
We hope that the theoretical framework of this paper on the one hand provides at least a partial answer to the fundamental type theoretic question of how one can understand the relationship between computational effects and dependent types. On the other hand, we hope it can contribute a small-step towards the ultimate goal of an elegant fully fledged language for certified effectful programming.
Submission history
From: Matthijs Vákár [view email][v1] Fri, 25 Dec 2015 15:29:30 UTC (53 KB)
[v2] Mon, 14 Mar 2016 14:55:52 UTC (57 KB)
References & Citations
Bibliographic and Citation Tools
Bibliographic Explorer (What is the Explorer?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)
Code, Data and Media Associated with this Article
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)
Demos
Recommenders and Search Tools
Influence Flower (What are Influence Flowers?)
Connected Papers (What is Connected Papers?)
CORE Recommender (What is CORE?)
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.