Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
153 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
45 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Tracking Captured Variables in Types (2105.11896v1)

Published 25 May 2021 in cs.PL

Abstract: 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 $\textrm{CF}{<:}$ calculus, a conservative and lightweight extension of $\textrm{System F}{<:}$, to track how values and their references can be captured and escape. We show that existing terms in $\textrm{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 $\textrm{CF}{<:}$. We also give mechanized proofs of the soundness properties of $\textrm{CF}{<:}$ in Coq. The type system presented in $\textrm{CF}{<:}$ is powerful enough to reason about safety in the context of many natural extensions of $\textrm{CF}_{<:}$ such as region-based memory-management, non-local returns, and effect handlers.

Citations (10)

Summary

We haven't generated a summary for this paper yet.