Open Access
- 20 November 2023
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 45 (4) , 1-52
Abstract
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 CC < :◻ , 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 CC < :◻ 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.Keywords
Funding Information
- Natural Sciences and Engineering Research Council of Canada
This publication has 35 references indexed in Scilit:
- Koka: Programming with Row Polymorphic Effect TypesElectronic Proceedings in Theoretical Computer Science, 2014
- Lightweight Polymorphic EffectsLecture Notes in Computer Science, 2012
- Modules as Objects in Newspeak2010
- Contextual modal type theoryACM Transactions on Computational Logic, 2008
- Region-based memory management in cyclone2002
- Capabilities for Sharing2001
- A type-based escape analysis for functional languagesJournal of Functional Programming, 1998
- Flexible alias protection1998
- Region-Based Memory ManagementInformation and Computation, 1997
- Automatic synthesis of typed Λ-programs on term algebrasTheoretical Computer Science, 1985