DeepAI AI Chat
Log In Sign Up

Scoped Capabilities for Polymorphic Effects

by   Martin Odersky, et al.

Type systems usually characterize the shape of values but not their free variables. However, many desirable safety properties could be guaranteed if one knew the free variables captured by values. We describe CCsubBox, a calculus where such captured variables are succinctly represented in types, and show it can be used to safely implement effects and effect polymorphism via scoped capabilities. We discuss how the decision to track captured variables guides key aspects of the calculus, and show that CCsubBox admits simple and intuitive types for common data structures and their typical usage patterns. We demonstrate how these ideas can be used to guide the implementation of capture checking in a practical programming language.


page 1

page 2

page 3

page 4


Tracking Captured Variables in Types

Type systems usually characterize the shape of values but not their free...

π with leftovers: a mechanisation in Agda

The π-calculus is a computational model for communication and concurrenc...

A Path To DOT: Formalizing Fully-Path-Dependent Types

The Dependent Object Types (DOT) calculus aims to formalize the Scala pr...

Towards Gradual Checking of Reference Capabilities

Concurrent and parallel programming is difficult due to the presence of ...

A Symmetric Lambda-Calculus Corresponding to the Negation-Free Bilateral Natural Deduction

Filinski constructed a symmetric lambda-calculus consisting of expressio...

A Calculus for Amortized Expected Runtimes

We develop a weakest-precondition-style calculus à la Dijkstra for reaso...

Handling polymorphic algebraic effects

Algebraic effects and handlers are a powerful abstraction mechanism to r...