DeepAI AI Chat
Log In Sign Up

Scoped Capabilities for Polymorphic Effects

07/07/2022
by   Martin Odersky, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

05/25/2021

Tracking Captured Variables in Types

Type systems usually characterize the shape of values but not their free...
05/08/2020

π with leftovers: a mechanisation in Agda

The π-calculus is a computational model for communication and concurrenc...
04/15/2019

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

The Dependent Object Types (DOT) calculus aims to formalize the Scala pr...
09/03/2019

Towards Gradual Checking of Reference Capabilities

Concurrent and parallel programming is difficult due to the presence of ...
01/29/2021

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

Filinski constructed a symmetric lambda-calculus consisting of expressio...
11/23/2022

A Calculus for Amortized Expected Runtimes

We develop a weakest-precondition-style calculus à la Dijkstra for reaso...
11/18/2018

Handling polymorphic algebraic effects

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