A generic type-and-effect system
Authors:
Open Access
- 24 January 2009
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 39-50
Abstract
Type-and-effect systems are a natural approach for statically reasoning about a program's execution. They have been used to track a variety of computational effects, for example memory manipulation, exceptions, and locking. However, each type-and-effect system is typically implemented as its own monolithic type system that hard-codes a particular syntax of effects along with particular rules to track and control those effects. We present a generic type-and-effect system, which is parameterized by the syntax of effects to track and by two functions that together specify the effect discipline to be statically enforced. We describe how a standard form of type soundness is ensured by requiring these two functions to obey a few natural monotonicity requirements. We demonstrate that several effect systems from the literature can be viewed as instantiations of our generic type system. Finally, we describe the implementation of our type-and-effect system and mechanically checked type soundness proof in the Twelf proof assistant.Keywords
This publication has 25 references indexed in Scilit:
- Polymorphic type, region and effect inferenceJournal of Functional Programming, 2008
- Flow-insensitive type qualifiersACM Transactions on Programming Languages and Systems, 2006
- Types for safe lockingACM Transactions on Programming Languages and Systems, 2006
- Reading, Writing and RelationsLecture Notes in Computer Science, 2006
- Inference of User-Defined Type Qualifiers and Qualifier Rules2006
- The marriage of effects and monadsACM Transactions on Computational Logic, 2003
- Typed memory management via static capabilitiesACM Transactions on Programming Languages and Systems, 2000
- Trust in the λ-calculusJournal of Functional Programming, 1997
- A Syntactic Approach to Type SoundnessInformation and Computation, 1994
- A framework for defining logicsJournal of the ACM, 1993