L3: A Linear Language with Locations

  • Greg Morrisett
  • Amal Ahmed
  • Matthew Fluet
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3461)


We explore foundational typing support for strong updates — updating a memory cell to hold values of unrelated types at different points in time. We present a simple, but expressive type system based upon standard linear logic, one that also enjoys a simple semantic interpretation for types that is closely related to models for spatial logics. The typing interpretation is strong enough that, in spite of the fact that our core calculus supports shared, mutable references and cyclic graphs, every well-typed program terminates.

We then consider extensions needed to make our calculus expressive enough to serve as a model for languages with ML-style references, where the capability to access a reference cell is unrestricted, but strong updates are disallowed. Our extensions include a thaw primitive for temporarily re-gaining the capability to perform strong updates on unrestricted references.


Operational Semantic Freeze Store Semantic Interpretation Static Semantic Extended Language 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    DeLine, R., Fähndrich, M.: Enforcing high-level protocols in low-level software. In: PLDI (2001)Google Scholar
  2. 2.
    Fähndrich, M., DeLine, R.: Adoption and focus: Practical linear types for imperative programming. In: PLDI (2002)Google Scholar
  3. 3.
    Morrisett, G., Walker, D., Crary, K., Glew, N.: From System F to typed assembly language. TOPLAS 21, 528–569 (1999)CrossRefGoogle Scholar
  4. 4.
    Morrisett, G., Crary, K., Glew, N., Walker, D.: Stack-based typed assembly language. JFP 12, 43–88 (2002)zbMATHMathSciNetGoogle Scholar
  5. 5.
    Aiken, A., Foster, J.S., Kodumal, J., Terauchi, T.: Checking and inferring local non-aliasing. In: PLDI (2003)Google Scholar
  6. 6.
    Smith, F., Walker, D.W., Morrisett, G.: Alias types. In: Smolka, G. (ed.) ESOP 2000. LNCS, vol. 1782, p. 366. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  7. 7.
    Ishtiaq, S., O’Hearn, P.: BI as an assertion language for mutable data structures. In: POPL (2001)Google Scholar
  8. 8.
    Ahmed, A., Fluet, M., Morrisett, G.: L3: A linear language with locations. Technical Report TR-24-04, Harvard University (2004)Google Scholar
  9. 9.
    Girard, J.Y.: Linear logic. Theoretical Computer Science 50, 1–102 (1987)zbMATHCrossRefMathSciNetGoogle Scholar
  10. 10.
    Wadler, P.: Linear types can change the world! In: Programming Concepts and Methods (1990)Google Scholar
  11. 11.
    O’Hearn, P.W., Reynolds, J.C.: From Algol to polymorphic linear lambda-calculus. Journal of the ACM 47, 167–223 (2000)zbMATHCrossRefMathSciNetGoogle Scholar
  12. 12.
    Plasmeijer, R., van Eekelen, M.: Keep it clean: a unique approach to functional programming. ACM SIGPLAN Notices 34, 23–31 (1999)CrossRefGoogle Scholar
  13. 13.
    Baker, H.: Lively linear LISP—look ma, no garbage. ACM SIGPLAN Notices 27, 89–98 (1992)CrossRefGoogle Scholar
  14. 14.
    Benton, P.N.: Strong normalisation for the linear term calculus. JFP 5, 65–80 (1995)zbMATHCrossRefMathSciNetGoogle Scholar
  15. 15.
    Ahmed, A., Appel, A.W., Virga, R.: An indexed model of impredicative polymorphism and mutable references (2003), Available at
  16. 16.
    Hofmann, M.: A type system for bouned space and functional in-place update. In: Smolka, G. (ed.) ESOP 2000. LNCS, vol. 1782, p. 165. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  17. 17.
    Cheney, J., Morrisett, G.: A linearly typed assembly language. Technical Report 2003-1900, Cornell University (2003)Google Scholar
  18. 18.
    Aspinall, D., Compagnoni, A.: Heap bounded assembly language. Journal of Automated Reasoning 31, 261–302 (2003)zbMATHCrossRefGoogle Scholar
  19. 19.
    Boyland, J., Noble, J., Retert, W.: Capabilities for aliasing: A generalization of uniqueness and read-only. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, p. 2. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  20. 20.
    Walker, D., Crary, K., Morrisett, G.: Typed memory management in a calculus of capabilities. TOPLAS 24, 701–771 (2000)CrossRefGoogle Scholar
  21. 21.
    Boyapati, C., Sălcianu, A., Beebee, W., Rinard, M.: Ownership types for safe region-based memory management in real-time Java. In: PLDI (2003)Google Scholar
  22. 22.
    Clarke, D., Wrigstad, T.: External uniqueness is unique enough. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, Springer, Heidelberg (2003)Google Scholar
  23. 23.
    Hicks, M., Morrisett, G., Grossman, D., Jim, T.: Experience with safe manual memory-management in Cyclone. In: ISMM (2004)Google Scholar
  24. 24.
    Grothoff, C., Palsberg, J., Vitek, J.: Encapsulating objects with confined types. In: OOPSLA (2001)Google Scholar
  25. 25.
    Vitek, J., Bokowski, B.: Confined types in Java. Software – Practice and Experience 31, 507–532 (2001)zbMATHCrossRefGoogle Scholar
  26. 26.
    Kuncak, V., Lam, P., Rinard, M.: Role analysis. In: POPL (2002)Google Scholar
  27. 27.
    Igarashi, A., Kobayashi, N.: A generic type system for the Pi-calculus. In: POPL (2001)Google Scholar
  28. 28.
    Takeuchi, K., Honda, K., Kubo, M.: An interaction-based language and its typing system. In: Halatsis, C., Philokyprou, G., Maritsas, D., Theodoridis, S. (eds.) PARLE 1994. LNCS, vol. 817, Springer, Heidelberg (1994)Google Scholar
  29. 29.
    Kobayashi, N., Pierce, B.C., Turner, D.N.: Linearity and the Pi-Calculus. TOPLAS 21, 914–947 (1999)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Greg Morrisett
    • 1
  • Amal Ahmed
    • 1
  • Matthew Fluet
    • 2
  1. 1.Harvard University 
  2. 2.Cornell University 

Personalised recommendations