skip to main content
research-article

Practical affine types

Published:26 January 2011Publication History
Skip Abstract Section

Abstract

Alms is a general-purpose programming language that supports practical affine types. To offer the expressiveness of Girard's linear logic while keeping the type system light and convenient, Alms uses expressive kinds that minimize notation while maximizing polymorphism between affine and unlimited types.

A key feature of Alms is the ability to introduce abstract affine types via ML-style signature ascription. In Alms, an interface can impose stiffer resource usage restrictions than the principal usage restrictions of its implementation. This form of sealing allows the type system to naturally and directly express a variety of resource management protocols from special-purpose type systems.

We present two pieces of evidence to demonstrate the validity of our design goals. First, we introduce a prototype implementation of Alms and discuss our experience programming in the language. Second, we establish the soundness of the core language. We also use the core model to prove a principal kinding theorem.

Skip Supplemental Material Section

Supplemental Material

40-mpeg-4.mp4

References

  1. A. Ahmed, M. Fluet, and G. Morrisett. A step-indexed model of substructural state. In phICFP’05, pages 78--91. ACM, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A. Barber. Dual intuitionistic linear logic. Technical Report ECS-LFCS-960347, U. of Edinburgh, 1996.Google ScholarGoogle Scholar
  3. P. S. Barth, R. S. Nikhil, and Arvind. M-structures: Extending a parallel, non-strict, functional language with state. In phProc. FPCA’91, volume 523 of phLNCS. Springer, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. G. M. Bierman. phOn Intuitionistic Linear Logic. PhD thesis, U. of Cambridge, 1993.Google ScholarGoogle Scholar
  5. J. Boyland. Checking interference with fractional permissions. In phSAS’03, volume 2694 of phLNCS. Springer, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. K. Crary, S. Weirich, and G. Morrisett. Intensional polymorphism in type-erasure semantics. phJFP, 12 (06): 567--600, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. L. Damas and R. Milner. Principal type-schemes for functional programs. In phPOPL’82, pages 207--212. ACM, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. drich(2001)}r:deline01R. DeLine and M. F\"ahndrich. Enforcing high-level protocols in low-level software. In phPLDI’01. ACM, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. drich and DeLine(2002)}r:fahndrich02M. F\"ahndrich and R. DeLine. Adoption and focus: Practical linear types for imperative programming. In phPLDI’02. ACM, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. drich et al.(2006)F\"ahndrich, Aiken, Hawblitzel, Hodson, Hunt, Larus, and Levi}Fahndrich06M. F\"ahndrich, M. Aiken, C. Hawblitzel, O. Hodson, G. Hunt, J. R. Larus, and S. Levi. Language support for fast and reliable message-based communication in Singularity OS. In phEuroSys’06, pages 177--190. ACM, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. S. J. Gay, V. T. Vasconcelos, and A. Ravara. Session types for inter-process communication. Technical Report TR-2003--133, U. of Glasgow, 2003.Google ScholarGoogle Scholar
  12. J.-Y. Girard. Linear logic. phTheoretical Computer Science, 50: 1--102, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. D. Leijen. Flexible types: Robust type inference for first-class polymorphism. In phPOPL’09, pages 66--77. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. , and Vouillon}r:ocaml08X. Leroy, D. Doligez, J. Garrigue, D. Rémy, and J. Vouillon. phThe Objective Caml system. INRIA, 3.11 edition, 2008.Google ScholarGoogle Scholar
  15. K. Mazurak, J. Zhao, and S. Zdancewic. Lightweight linear types in System F$^\circ$. In phTLDI’10, pages 77--88. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. R. Milner, M. Tofte, R. Harper, and D. MacQueen. phThe Definition of Standard ML. MIT, revised edition, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. B. C. Pierce. phTypes and Programming Languages. MIT, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. R. Plasmeijer and M. van Eekelen. phClean Language Report, Version 2.1. Dept. of Software Technology, U. of Nijmegen, 2002.Google ScholarGoogle Scholar
  19. A. Rossberg, C. V. Russo, and D. Dreyer. F-ing modules. In phTLDI’10, pages 89--102. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. M. Steffen. phPolarized Higher Order Subtyping. PhD thesis, Universit\"at Erlangen-Nürnberg, 1997.Google ScholarGoogle Scholar
  21. I. E. Sutherland and G. W. Hodgman. Reentrant polygon clipping. phCACM, 17 (1): 32--42, 1974. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J. A. Tov and R. Pucella. Stateful contracts for affine types. In phESOP’10, volume 6012 of phLNCS, pages 550--569. Springer, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. E. de Vries, R. Plasmeijer, and D. M. Abrahamson. Uniqueness typing simplified. In phIFL’07, pages 201--218. Springer, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. P. Wadler. Is there a use for linear logic? In phPEPM’91, pages 255--273. ACM, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. P. Wadler and S. Blott. How to make ad-hoc polymorphism less ad hoc. In phPOPL’89, pages 60--76. ACM, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Practical affine types

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 46, Issue 1
      POPL '11
      January 2011
      624 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/1925844
      Issue’s Table of Contents
      • cover image ACM Conferences
        POPL '11: Proceedings of the 38th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
        January 2011
        652 pages
        ISBN:9781450304900
        DOI:10.1145/1926385

      Copyright © 2011 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 26 January 2011

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!