Skip to main content
QUICK REVIEW

[Paper Review] A Framework for Dependent Types and Effects

Matthijs Vákár|arXiv (Cornell University)|Dec 25, 2015
Logic, programming, and type systemsComputer Science32 references8 citations
TL;DR

This paper introduces dCBPV-, a dependently typed extension of call-by-push-value that supports effects through a natural small-step operational semantics and elegant categorical semantics, enabling full and faithful translations from monadic and CBN-dependent type theories. It further proposes dCBPV+, which adds dependent Kleisli extension to encode CBV-dependent type theory and positive connectives, though at the cost of potential typing non-uniqueness, formalized via subtyping.

ABSTRACT

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.

Motivation & Objective

  • To develop a principled framework for integrating computational effects with dependent type theory, addressing limitations in existing systems.
  • To extend Levy’s call-by-push-value (CBPV) calculus to dependent types, preserving subject reduction and strong normalization.
  • To resolve the inability of dCBPV- to encode call-by-value (CBV) dependent type theory and strong elimination rules for positive connectives in CBN.
  • To introduce dCBPV+ with dependent Kleisli extension to achieve full encoding of CBV and CBN dependent type systems.
  • To provide a semantic foundation for certified effectful programming through categorical models and operational semantics.

Proposed method

  • Extend CBPV to dependent types via dCBPV-, introducing a small-step operational semantics with subject reduction and determinism under certain effects.
  • Define a categorical semantics for dCBPV- that is no more complex than in the simply typed case, using adjunctions to model the separation of computation and value types.
  • Introduce dCBPV+ by adding a principle of Kleisli extension for dependent functions, enabling encoding of CBV and CBN dependent type systems.
  • Formalize typing non-uniqueness in dCBPV+ using subtyping, where effect execution may refine the type of a computation.
  • Provide full and faithful translations from Moggi’s monadic metalanguage and CBN-dependent type theory into dCBPV-, preserving operational behavior.
  • Use game semantics and domain semantics as models to validate the framework, particularly for effects like recursion, control, and local state.

Experimental results

Research questions

  • RQ1How can dependent types be systematically combined with computational effects in a way that preserves type safety and operational clarity?
  • RQ2Why does dCBPV- fail to encode CBV-dependent type theory and strong elimination rules for positive connectives in CBN?
  • RQ3Can a dependent Kleisli extension principle restore expressivity in dCBPV+ while maintaining a coherent semantics?
  • RQ4To what extent does the introduction of effects in dCBPV+ compromise typing uniqueness, and how can this be formally captured?
  • RQ5Can the framework support advanced type formers like inductive families, universes, and inductive-recursive definitions?

Key findings

  • dCBPV- supports a natural small-step operational semantics that satisfies subject reduction and, depending on the effects, determinism and strong normalization.
  • The categorical semantics of dCBPV- is as simple as in the simply typed case, demonstrating that dependent types do not inherently complicate the semantics of effects.
  • dCBPV+ introduces a dependent Kleisli extension that enables full encoding of both CBV and CBN dependent type theories, which dCBPV- cannot express.
  • In dCBPV+, the type of a computation may become more specified during effectful execution, which is formalized using a notion of subtyping.
  • The framework supports models of dependent type theory with effects such as recursion, control operators, and local state, validated via game semantics and domain semantics.
  • The system provides full and faithful translations from monadic and CBN-dependent type theories into dCBPV+, preserving operational behavior and enabling verification of effectful programs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.