Alias Types

  • Frederick Smith
  • David Walker
  • Greg Morrisett
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1782)

Abstract

Linear type systems allow destructive operations such as object deallocation and imperative updates of functional data structures. These operations and others, such as the ability to reuse memory at different types, are essential in low-level typed languages. However, traditional linear type systems are too restrictive for use in low-level code where it is necessary to exploit pointer aliasing. We present a new typed language that allows functions to specify the shape of the store that they expect and to track the flow of pointers through a computation. Our type system is expressive enough to represent pointer aliasing and yet safely permit destructive operations.

References

  1. [1]
    Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1986.Google Scholar
  2. [2]
    Andrew W. Appel and David B. MacQueen. Standard ML of New Jersey. In Martin Wirsing, editor, Third International Symposium on Programming Language Implementation and Logic Programming, pages 1–13, New York, August 1991. Springer-Verlag. Volume 528 of Lecture Notes in Computer Science.Google Scholar
  3. [3]
    Erik Barendsen and Sjaak Smetsers. Conventional and uniqueness typing in graph rewrite systems (extended abstract). In Thirteenth Conference on the Foundations of Software Technology and Theoretical Computer Science, pages 41–51, Bombay, 1993. In Shyamasundar, ed., Springer-Verlag, LNCS 761.Google Scholar
  4. [4]
    Karl Crary, David Walker, and Greg Morrisett. Typed memory management in a calculus of capabilities. In Twenty-Sixth ACM Symposium on Principles of Programming Languages, pages 262–275, San Antonio, January 1999.Google Scholar
  5. [5]
    Alain Deutsch. Interprocedural may-alias analysis for pointers: Beyond k-limiting. In ACM Conference on Programming Language Design and Implementation, pages 230–241, Orlando, June 1994.Google Scholar
  6. [6]
    Nurit Dor, Michael Rodeh, and Mooly Sagiv. Detecting memory errors via static pointer analysis (preliminary experience). In ACM Workshop on Program Analysis for Software Tools and Engineering (PASTE’98), Montreal, June 1998.Google Scholar
  7. [7]
    David Evans. Static detection of dynamic memory errors. In ACM Conference on Programming Language Design and Implementation, Philadelphia, May 1996.Google Scholar
  8. [8]
    Stephen N. Freund and John C. Mitchell. A formal framework for the Java bytecode language and verifier. In Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 147–166, Denver, November 1999.Google Scholar
  9. [9]
    Naoki Kobayashi. Quasi-linear types. In Twenty-Sixth ACM Symposium on Principles of Programming Languages, pages 29–42, San Antonio, January 1999.Google Scholar
  10. [10]
    Tim Lindholm and Frank Yellin. The Java Virtual Machine Specification. Addison-Wesley, 1996.Google Scholar
  11. [11]
    Greg Morrisett, Karl Crary, Neal Glew, and David Walker. Stack-based Typed Assembly Language. In Second International Workshop on Types in Compilation, pages 95–117, Kyoto, March 1998. Published in Xavier Leroy and Atsushi Ohori, editors, Lecture Notes in Computer Science, volume 1473, pages 28–52. Springer-Verlag, 1998.CrossRefGoogle Scholar
  12. [12]
    Greg Morrisett, David Walker, Karl Crary, and Neal Glew. From System F to Typed Assembly Language. ACM Transactions on Programming Languages and Systems, 3(21):528–569, May 1999.Google Scholar
  13. [13]
    George Necula. Proof-carrying code. In Twenty-Fourth ACM Symposium on Principles of Programming Languages, pages 106–119, Paris, 1997.Google Scholar
  14. [14]
    G. D. Plotkin. Call-by-name, call-by-value, and the lambda calculus. Theoretical Computer Science, 1:125–159, 1975.MATHCrossRefMathSciNetGoogle Scholar
  15. [15]
    John C. Reynolds. Definitional interpreters for higher-order programming languages. In Conference Record of the 25th National ACM Conference, pages 717–740, Boston, August 1972.Google Scholar
  16. [16]
    John C. Reynolds. Syntactic control of interference. In Fifth ACM Symposium on Principles of Programming Languages, pages 39–46, Tucson, 1978.Google Scholar
  17. [17]
    M. Sagiv, T. Reps, and R. Wilhelm. Solving shape-analysis problems in languages with destructive updating. ACM Transactions on Programming Languages and Systems, 20(1):1–50, January 1996.CrossRefGoogle Scholar
  18. [18]
    Z. Shao. An overview of the FLINT/ML compiler. In Workshop on Types in Compilation, Amsterdam, June 1997. ACM. Published as Boston College Computer Science Dept. Technical Report BCCS-97-03.Google Scholar
  19. [19]
    Frederick Smith, David Walker, and Greg Morrisett. Alias types. Technical Report TR99-1773, Cornell University, October 1999.Google Scholar
  20. [20]
    Raymie Stata and Martín Abadi. A type system for Java bytecode subroutines. In Twenty-Fifth ACM Symposium on Principles of Programming Languages, San Diego, January 1998.Google Scholar
  21. [21]
    B. Steensgaard. Points-to analysis in linear time. In Twenty-Third ACM Symposium on Principles of Programming Languages, January 1996.Google Scholar
  22. [22]
    D. Tarditi, G. Morrisett, P. Cheng, C. Stone, R. Harper, and P. Lee. TIL: A type-directed optimizing compiler for ML. In ACM Conference on Programming Language Design and Implementation, pages 181–192, Philadelphia, May 1996.Google Scholar
  23. [23]
    Mads Tofte. Type inference for polymorphic references. Information and Computation, 89:1–34, November 1990.MATHCrossRefMathSciNetGoogle Scholar
  24. [24]
    Mads Tofte and Jean-Pierre Talpin. Region-based memory management. Information and Computation, 132(2):109–176, 1997.MATHCrossRefMathSciNetGoogle Scholar
  25. [25]
    David N. Turner, Philip Wadler, and Christian Mossin. Once upon a type. In ACM International Conference on Functional Programming and Computer Architecture, San Diego, CA, June 1995.Google Scholar
  26. [26]
    Philip Wadler. Linear types can change the world! In M. Broy and C. Jones, editors, Programming Concepts and Methods, Sea of Galilee, Israel, April 1990. North Holland. IFIP TC 2 Working Conference.Google Scholar
  27. [27]
    A. K. Wright. Simple imperative polymorphism. LISP and Symbolic Computation, 8(4), December 1995.Google Scholar
  28. [28]
    Andrew K. Wright and Matthias Felleisen. A syntactic approach to type soundness. Information and Computation, 115(1):38–94, 1994.MATHCrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2000

Authors and Affiliations

  • Frederick Smith
    • 1
  • David Walker
    • 1
  • Greg Morrisett
    • 1
  1. 1.Cornell UniversityUSA

Personalised recommendations