Tracking Captured Variables in Types

05/25/2021
by   Aleksander Boruch-Gruszecki, et al.
0

Type systems usually characterize the shape of values but not their free variables. However, there are many desirable safety properties one could guarantee if one could track how references can escape. For example, one may implement algebraic effect handlers using capabilities – a value which permits one to perform the effect – safely if one can guarantee that the capability itself does not escape the scope bound by the effect handler. To this end, we study the CF_<: calculus, a conservative and lightweight extension of System F_<:, to track how values and their references can be captured and escape. We show that existing terms in System F_<: embed naturally in our calculus, and that many natural problems can be expressed in a system that tracks variable references like we do in CF_<:. We also give mechanized proofs of the soundness properties of CF_<: in Coq. The type system presented in CF_<: is powerful enough to reason about safety in the context of many natural extensions of CF_<: such as region-based memory-management, non-local returns, and effect handlers.

READ FULL TEXT
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

02/09/2021

An Interactive Proof of Termination for a Concurrent λ-calculus with References and Explicit Substitutions

In this paper we introduce a typed, concurrent λ-calculus with reference...
09/14/2019

Psi-Calculi Revisited: Connectivity and Compositionality

Psi-calculi is a parametric framework for process calculi similar to pop...
11/18/2018

Handling polymorphic algebraic effects

Algebraic effects and handlers are a powerful abstraction mechanism to r...
06/30/2018

Flexible recovery of uniqueness and immutability (Extended Version)

We present an imperative object calculus where types are annotated with ...
03/15/2018

Tracing sharing in an imperative pure calculus

We introduce a type and effect system, for an imperative object calculus...
03/15/2018

Tracing sharing in an imperative pure calculus (Extended Version)

We introduce a type and effect system, for an imperative object calculus...
06/04/2018

On the Soundness of Coroutines with Snapshots

Coroutines are a general control flow construct that can eliminate contr...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.