ABSTRACT
Cyclone is a type-safe programming language derived from C. The primary design goal of Cyclone is to let programmers control data representation 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 a combination of default annotations, local type inference, and a novel treatment of region effects reduces 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.
- A. Aiken, M. Fähndrich, and R. Levien. Better static memory management: Improving region-based analysis of higher-order languages. In ACM Conference on Programming Language Design and Implementation, pages 174--185, La Jolla, CA, 1995 Google ScholarDigital Library
- T. M. Austin, S. E. Breach, and G. S. Sohi. Efficient detection of all pointer and array access errors. In ACM Conference on Programming Language Design and Implementation, pages 290--301, Orlando, FL, June 1994 Google ScholarDigital Library
- T. Ball and S. K. Rajamani. Automatically validating temporal safety properties of interfaces. In SPIN 2001, Workshop on Model Checking of Software, volume 2057 of Lecture Notes in Computer Science, pages 103--122, Toronto, Canada, May 2001. Springer-Verlag Google ScholarDigital Library
- H.-J. Boehm and M. Weiser. Garbage collection in an uncooperative environment. Software Practice and Experience, 18(9):807--820, 1988 Google ScholarDigital Library
- K. B. Bruce, L. Cardelli, and B. C. Pierce. Comparing object encodings. Information and Computation, 155:108--133, 1999 Google ScholarDigital Library
- Cyclone user's manual. Technical Report 2001-1855, Department of Computer Science, Cornell University, Nov. 2001. Current version at http://www.cs.cornell.edu/projects/cyclone/Google Scholar
- R. DeLine and M. Fähndrich. Enforcing high-level protocols in low-level software. In ACM Conference on Programming Language Design and Implementation, pages 59--69, Snowbird, UT, June 2001 Google ScholarDigital Library
- T. Dowd, F. Henderson, and P. Ross. Compiling Mercury to the .NET common language runtime. In N. Benton and A. Kennedy, editors, BABEL'01: First International Workshop on Multi-Language Infrastructure and Interoperability, volume 59.1 of Electronic Notes in Theoretical Computer Science, Florence, Italy, Sept. 2001Google Scholar
- D. Evans. LCLint user's guide. http://lclint.cs.virginia.edu/guide/Google Scholar
- D. Evans. Static detection of dynamic memory errors. In ACM Conference on Programming Language Design and Implementation, pages 44--53, Philadelphia, PA, May 1996 Google ScholarDigital Library
- D. Gay and A. Aiken. Memory management with explicit regions. In ACM Conference on Programming Language Design and Implementation, pages 313--323, Montreal, Canada, June 1998 Google ScholarDigital Library
- D. Gay and A. Aiken. Language support for regions. In ACM Conference on Programming Language Design and Implementation, pages 70--80, Snowbird, UT, June 2001 Google ScholarDigital Library
- A. D. Gordon and D. Syme. Typing a multi-language intermediate code. In Twenty-Eighth ACM Symposium on Principles of Programming Languages, pages 248--260, London, United Kingdom, Jan. 2001 Google ScholarDigital Library
- D. Grossman. Existential types for imperative languages. In Eleventh European Symposium on Programming, pages 21--35, Grenoble, France, Apr. 2002 Google ScholarDigital Library
- D. Grossman, G. Morrisett, Y. Wang, T. Jim, M. Hicks, and J. Cheney. Formal type soundness for Cyclone's region system. Technical Report 2001-1856, Department of Computer Science, Cornell University, Nov. 2001 Google ScholarDigital Library
- N. Hallenberg, M. Elsman, and M. Tofte. Combining region inference and garbage collection. In ACM Conference on Programming Language Design and Implementation, Berlin, Germany, June 2002. This volume Google ScholarDigital Library
- F. Henglein, H. Makholm, and H. Niss. A direct approach to control-flow sensitive region-based memory management. In Third International Conference on Principles and Practice of Declarative Programming, Florence, Italy, Sept. 2001 Google ScholarDigital Library
- R. Jain. The Art of Computer Systems Performance Analysis. Wiley, 1991Google Scholar
- T. Jim, G. Morrisett, D. Grossman, M. Hicks, J. Cheney, and Y. Wang. Cyclone: A safe dialect of C. In USENIX Annual Technical Conference, Monterey, CA, June 2002 Google ScholarDigital Library
- G. McGary. Bounds checking projects. http://www.gnu.org/software/gcc/projects/bp/main.htmlGoogle Scholar
- Y. Minamide, G. Morrisett, and R. Harper. Typed closure conversion. In Twenty-Third ACM Symposium on Principles of Programming Languages, pages 271--283, St. Petersburg, FL, Jan. 1996 Google ScholarDigital Library
- J. Mitchell and G. Plotkin. Abstract types have existential type. ACM Transactions on Progamming Languages and Systems, 10(3):470--502, 1988. Preliminary version in Twelfth ACM Symposium on Principles of Programming Languages, 1985 Google ScholarDigital Library
- S. Monnier, B. Saha, and Z. Shao. Principled scavenging. In ACM Conference on Programming Language Design and Implementation, pages 81--91, Snowbird, UT, June 2001 Google ScholarDigital Library
- G. Morrisett, K. Crary, N. Glew, and D. Walker. Stack-based typed assembly language. In Workshop on Types in Compilation, volume 1473 of Lecture Notes in Computer Science, pages 28--52, Kyoto, Japan, Mar. 1998. Springer-Verlag Google ScholarDigital Library
- G. C. Necula, S. McPeak, and W. Weimer. CCured: Type-safe retrofitting of legacy code. In Twenty-Ninth ACM Symposium on Principles of Programming Languages, pages 128--139, Portland, OR, Jan. 2002 Google ScholarDigital Library
- M. Tofte and L. Birkedal. A region inference algorithm. ACM Transactions on Progamming Languages and Systems, 20(4):734--767, July 1998 Google ScholarDigital Library
- M. Tofte, L. Birkedal, M. Elsman, N. Hallenberg, T. H. Olesen, and P. Sestoft. Programming with regions in the ML Kit (for version 4). Technical report, IT University of Copenhagen, Sept. 2001Google Scholar
- M. Tofte and J.-P. Talpin. Region-based memory management. Information and Computation, 132(2):109--176, 1997 Google ScholarDigital Library
- D. Walker, K. Crary, and G. Morrisett. Typed memory management in a calculus of capabilities. ACM Transactions on Progamming Languages and Systems, 24(4):701--771, July 2000 Google ScholarDigital Library
- D. Walker and K. Watkins. On regions and linear types. In Sixth ACM International Conference on Functional Programming, pages 181--192, Florence, Italy, Sept. 2001 Google ScholarDigital Library
- D. C. Wang and A. W. Appel. Type-preserving garbage collectors. In Twenty-Eighth ACM Symposium on Principles of Programming Languages, pages 166--178, London, United Kingdom, Jan. 2001 Google ScholarDigital Library
- H. Xi. Imperative programming with dependent types. In Fifteenth IEEE Symposium on Logic in Computer Science, pages 375--387, Santa Barbara, CA, June 2000 Google ScholarDigital Library
- H. Xi and F. Pfenning. Dependent types in practical programming. In Twenty-Sixth ACM Symposium on Principles of Programming Languages, pages 214--227, San Antonio, TX, Jan. 1999 Google ScholarDigital Library
Index Terms
- Region-based memory management in cyclone
Recommendations
Region-based memory management in cyclone
Cyclone is a type-safe programming language derived from C. The primary design goal of Cyclone is to let programmers control data representation and memory management without sacrificing type-safety. In this paper, we focus on the region-based memory ...
Region-Based Memory Management
This paper describes a memory management discipline for programs that perform dynamic memory allocation and de-allocation. At runtime, all values are put intoregions. The store consists of a stack of regions. All points of region allocation and de-...
Comments