Cyclone is a polymorphic, type-safe programming language derived from C. The primary design goals of Cyclone are to let programmers control data representations and memory management without sacrificing type-safety. In this paper, we focus on the region-based memory management of Cyclone and its static typing discipline. The design incorporates several advancements, including support for region subtyping and a coherent integration with stack allocation and a garbage collector. To support separate compilation, Cyclone requires programmers to write some explicit region annotations, but uses a combination of default annotations, local type inference, and a novel treatment of region effects to reduce this burden. As a result, we integrate C idioms in a region-based framework. In our experience, porting legacy C to Cyclone has required altering about 8% of the code; of the changes, only 6% (of the 8%) were region annotations.
@INPROCEEDINGS{GrossmanMJHWC02,
AUTHOR = {Dan Grossman and Greg Morrisett and Trevor Jim and Michael Hicks and Yanling Wang and James Cheney},
TITLE = {Region-based Memory Management in {C}yclone},
BOOKTITLE = {Proceedings of the {ACM} Conference on Programming Language Design and Implementation (PLDI)},
MONTH = {June},
WHERE = {Berlin, Germany},
PAGES = {282--293},
PUBLISHER = {{ACM}},
YEAR = 2002,
HTTP = {http://cyclone.thelanguage.org}
}