skip to main content
research-article

Programming with permissions in Mezzo

Published:25 September 2013Publication History
Skip Abstract Section

Abstract

We present Mezzo, a typed programming language of ML lineage. Mezzo is equipped with a novel static discipline of duplicable and affine permissions, which controls aliasing and ownership. This rules out certain mistakes, including representation exposure and data races, and enables new idioms, such as gradual initialization, memory re-use, and (type)state changes. Although the core static discipline disallows sharing a mutable data structure, Mezzo offers several ways of working around this restriction, including a novel dynamic ownership control mechanism which we dub "adoption and abandon".

References

  1. Amal Ahmed, Matthew Fluet, and Greg Morrisett.hrefhttp://ttic.uchicago.edu/~amal/papers/linloc-fi07.pdf$L^3$: A linear language with locations. Fundamenta Informaticæ, 77(4):397--449, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Jonathan Aldrich, Joshua Sunshine, Darpan Saini, and Zachary Sparks.hrefhttp://www.cs.cmu.edu/~aldrich/papers/onward2009-state.pdfTypestate-%oriented programming. In Companion to Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 1015--1022, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Mike Barnett, K. Rustan~M. Leino, and Wolfram Schulte.hrefhttp://research.microsoft.com/~leino/papers/krml136.pdfThe Spec\# programming system: An overview. In Construction and Analysis of Safe, Secure and Interoperable Smart devices (CASSIS), volume 3362 of Lecture Notes in Computer Science, pages 49--69. Springer, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Josh Berdine, Cristiano Calcagno, and Peter~W. O'Hearn.hrefhttp://research.microsoft.com/~jjb/papers/smallfoot.pdfSmallfoot: Modular automatic assertion checking with separation logic. In Formal Methods for Components and Objects, volume 4111 of Lecture Notes in Computer Science, pages 115--137. Springer, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Kevin Bierhoff and Jonathan Aldrich.hrefhttp://www.cs.cmu.edu/~kbierhof/papers/typestate-verification.pdfMod%ular typestate checking of aliased objects. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 301--320, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Kevin Bierhoff, Nels~E. Beckman, and Jonathan Aldrich.hrefhttp://www.cs.cmu.edu/~kbierhof/papers/permission-practice.pdfPracti%cal API protocol checking with access permissions. In European Conference on Object-Oriented Programming (ECOOP), volume 5653 of Lecture Notes in Computer Science, pages 195--219. Springer, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. John~Tang Boyland.hrefhttp://www.cs.uwm.edu/~boyland/papers/frac-nesting.htmlSemantics of fractional permissions with nesting. ACM Transactions on Programming Languages and Systems, 32(6), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Alexandre Buisse, Lars Birkedal, and Kristian Støvring.hrefhttp://www.itu.dk/~birkedal/papers/locks.pdfA step-indexed Kripke model of separation logic for storable locks. Electronic Notes in Theoretical Computer Science, 276:121--143, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Arthur Charguéraud.hrefhttp://www.chargueraud.org/arthur/research/2010/thesis/ Characteristic Formulae for Mechanized Program Verification. PhD thesis, Université Paris 7, 2010.Google ScholarGoogle Scholar
  10. David~G. Clarke, John~M. Potter, and James Noble.hrefhttp://doi.acm.org/10.1145/286936.286947Ownership types for flexible alias protection. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 48--64, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Karl Crary, David Walker, and Greg Morrisett.hrefhttp://www.cs.cornell.edu/talc/papers/capabilities.pdfTyped memory management in a calculus of capabilities. In Principles of Programming Languages (POPL), pages 262--275, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Robert DeLine and Manuel Fähndrich.hrefhttp://research.microsoft.com/apps/pubs/default.aspx?id=67457Enforci%ng high-level protocols in low-level software. In Programming Language Design and Implementation (PLDI), pages 59--69, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Robert DeLine and Manuel Fähndrich.hrefhttp://research.microsoft.com/apps/pubs/default.aspx?id=67463Typesta%tes for objects. In European Conference on Object-Oriented Programming (ECOOP), volume 3086 of Lecture Notes in Computer Science, pages 465--490. Springer, 2004.Google ScholarGoogle Scholar
  14. Werner Dietl and Müller Peter.hrefhttp://www.jot.fm/issues/issue_2005_10/article1.pdfUniverses: Lightweight ownership for JML. Journal of Object Technology, 4(8):5--32, 2005.Google ScholarGoogle ScholarCross RefCross Ref
  15. Manuel Fähndrich, Mark Aiken, Chris Hawblitzel, Orion Hodson, Galen Hunt, James~R. Larus, and Steven Levi.hrefhttp://www.cs.kuleuven.ac.be/conference/EuroSys2006/papers/p177-fahndr%ich.pdfLanguage support for fast and reliable message-based communication in Singularity OS. In EuroSys, pages 177--190, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Manuel Fähndrich and Robert DeLine.hrefhttp://research.microsoft.com/pubs/67459/pldi02.pdfAdoption and focus: practical linear types for imperative programming. In Programming Language Design and Implementation (PLDI), pages 13--24, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Colin~S. Gordon, Matthew~J. Parkinson, Jared Parsons, Aleks Bromfield, and Joe Duffy.hrefhttp://homes.cs.washington.edu/~csgordon/papers/oopsla12.pdfUniquene%ss and reference immutability for safe parallelism. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 21--40, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Alexey Gotsman, Josh Berdine, Byron Cook, Noam Rinetzky, and Mooly Sagiv.hrefftp://ftp.research.microsoft.com/pub/tr/TR-2007--39.pdfLocal reasoning for storable locks and threads. Technical Report MSR-TR-2007--39, Microsoft Research, 2007.Google ScholarGoogle Scholar
  19. Aquinas Hobor, Andrew~W. Appel, and Francesco Zappa Nardelli.hrefhttp://www.cs.princeton.edu/~appel/papers/concurrent.pdfOracle semantics for concurrent separation logic. In European Symposium on Programming (ESOP), volume 4960 of Lecture Notes in Computer Science, pages 353--367. Springer, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Bart Jacobs and Frank Piessens.hrefhttp://people.cs.kuleuven.be/~bart.jacobs/verifast/verifast.pdfThe VeriFast program verifier. Technical Report CW-520, Department of Computer Science, Katholieke Universiteit Leuven, 2008.Google ScholarGoogle Scholar
  21. Toshiyuki Maeda, Haruki Sato, and Akinori Yonezawa.hrefhttp://dx.doi.org/10.1145/1929553.1929559Extended alias type system using separating implication. In Types in Language Design and Implementation (TLDI), 2011. Google ScholarGoogle ScholarCross RefCross Ref
  22. Yasuhiko Minamide.hrefhttp://www.score.is.tsukuba.ac.jp/~minamide/papers/hole.popl98.pdfA functional representation of data structures with a hole. In Principles of Programming Languages (POPL), pages 75--84, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Peter Müller and Arsenii Rudich.hrefhttp://dx.doi.org/10.1145/1297027.1297061Ownership transfer in universe types. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 461--478, 2007. Google ScholarGoogle ScholarCross RefCross Ref
  24. Karl Naden, Robert Bocchino, Jonathan Aldrich, and Kevin Bierhoff.hrefhttp://cs.cmu.edu/afs/cs.cmu.edu/Web/People/kbn/pubs/poplBorrowing.pdf%A type system for borrowing permissions. In Principles of Programming Languages (POPL), pages 557--570, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Peter~W. O'Hearn.hrefhttp://www.dcs.qmul.ac.uk/~ohearn/papers/concurrency.pdfResources, concurrency and local reasoning. Theoretical Computer Science, 375(1--3):271--307, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. François Pottier.hrefhttp://gallium.inria.fr/~fpottier/publis/fpottier-core-mezzo.pdfType soundness for Core Mezzo. Unpublished, January 2013.Google ScholarGoogle Scholar
  27. François Pottier and Jonathan Protzenko.mezzo. http://gallium.inria.fr/~protzenk/mezzo-lang/, July 2013.Google ScholarGoogle Scholar
  28. François Pottier and Jonathan Protzenko.hrefhttp://gallium.inria.fr/~fpottier/publis/mezzo-icfp2013-long.pdfProg%ramming with permissions inmezzo (long version). Unpublished, July 2013.Google ScholarGoogle Scholar
  29. John~C. Reynolds.hrefftp://ftp.cs.cmu.edu/user/jcr/seplogic.ps.gzSeparation logic: A logic for shared mutable data structures. In Logic in Computer Science (LICS), pages 55--74, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Frederick Smith, David Walker, and Greg Morrisett.hrefhttp://www.cs.cornell.edu/talc/papers/alias.pdfAlias types. In European Symposium on Programming (ESOP), volume 1782 of Lecture Notes in Computer Science, pages 366--381. Springer, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Nikhil Swamy, Juan Chen, Cédric Fournet, Pierre-Yves Strub, Karthik Bhargavan, and Jean Yang.hrefhttp://research.microsoft.com/pubs/150012/icfp-camera-ready.pdfSecure distributed programming with value-dependent types. In International Conference on Functional Programming (ICFP), pages 266--278, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Nikhil Swamy, Michael Hicks, Greg Morrisett, Dan Grossman, and Trevor Jim.hrefhttp://www.cs.umd.edu/~mwh/papers/cyc-mm-scp.pdfSafe manual memory management in Cyclone. Science of Computer Programming, 62(2):122--144, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Jesse~A. Tov and Riccardo Pucella.hrefhttp://www.eecs.harvard.edu/~tov/pubs/alms/Practical affine types. In Principles of Programming Languages (POPL), pages 447--458, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Thomas Tuerk.hrefhttp://www.cl.cam.ac.uk/~tt291/talks/vstte10.pdfLocal reasoning about while-loops. Unpublished, 2010.Google ScholarGoogle Scholar
  35. David Walker and Greg Morrisett.hrefhttp://www.cs.cornell.edu/talc/papers/alias-recursion.pdfAlias types for recursive data structures. In Types in Compilation (TIC), volume 2071 of Lecture Notes in Computer Science, pages 177--206. Springer, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Programming with permissions in Mezzo

    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 48, Issue 9
      ICFP '13
      September 2013
      457 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/2544174
      Issue’s Table of Contents
      • cover image ACM Conferences
        ICFP '13: Proceedings of the 18th ACM SIGPLAN international conference on Functional programming
        September 2013
        484 pages
        ISBN:9781450323260
        DOI:10.1145/2500365

      Copyright © 2013 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 25 September 2013

      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!