Programming with permissions in Mezzo

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".

[1]  Peter Müller,et al.  Ownership transfer in universe types , 2007, OOPSLA.

[2]  James R. Larus,et al.  Language support for fast and reliable message-based communication in singularity OS , 2006, EuroSys.

[3]  Yasuhiko Minamide,et al.  A functional representation of data structures with a hole , 1998, POPL '98.

[4]  John Tang Boyland,et al.  Connecting effects and uniqueness with adoption , 2005, POPL '05.

[5]  Peter W. O'Hearn,et al.  Resources, Concurrency and Local Reasoning , 2004, CONCUR.

[6]  Robert DeLine,et al.  Typestates for Objects , 2004, ECOOP.

[7]  John Tang Boyland Semantics of fractional permissions with nesting , 2010, TOPL.

[8]  Andrew W. Appel,et al.  Oracle Semantics for Concurrent Separation Logic , 2008, ESOP.

[9]  David Walker,et al.  Typed memory management in a calculus of capabilities , 1999, POPL '99.

[10]  David Walker,et al.  Alias Types , 2000, ESOP.

[11]  Riccardo Pucella,et al.  Practical affine types , 2011, POPL '11.

[12]  Frank S. de Boer,et al.  Formal Methods for Components and Objects , 2012, Lecture Notes in Computer Science.

[13]  Peter Müller,et al.  Universes: Lightweight Ownership for JML , 2005, J. Object Technol..

[14]  Peter W. O'Hearn,et al.  Resources, concurrency, and local reasoning , 2007 .

[15]  James Noble,et al.  Ownership types for flexible alias protection , 1998, OOPSLA '98.

[16]  Juan Chen,et al.  Secure distributed programming with value-dependent types , 2011, Journal of Functional Programming.

[17]  Robert DeLine,et al.  Enforcing high-level protocols in low-level software , 2001, PLDI '01.

[18]  Dan Grossman,et al.  Safe manual memory management in Cyclone , 2006, Sci. Comput. Program..

[19]  Matthew Fluet,et al.  A Linear Language with Locations , 2007 .

[20]  Peter W. O'Hearn,et al.  Smallfoot: Modular Automatic Assertion Checking with Separation Logic , 2005, FMCO.

[21]  Robert DeLine,et al.  Adoption and focus: practical linear types for imperative programming , 2002, PLDI '02.

[22]  Arthur Charguéraud,et al.  Functional translation of a calculus of capabilities , 2008 .

[23]  Frank Piessens,et al.  The VeriFast program verifier , 2008 .

[24]  François Pottier Type soundness for Core Mezzo , 2013 .

[25]  Matthew J. Parkinson,et al.  Uniqueness and reference immutability for safe parallelism , 2012, OOPSLA '12.

[26]  Thomas Tuerk Local Reasoning about While-Loops , 2010 .

[27]  Akinori Yonezawa,et al.  Extended alias type system using separating implication , 2011, TLDI '11.

[28]  Jonathan Aldrich,et al.  Practical API Protocol Checking with Access Permissions , 2009, ECOOP.

[29]  John C. Reynolds,et al.  Separation logic: a logic for shared mutable data structures , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[30]  Jonathan Aldrich,et al.  A type system for borrowing permissions , 2012, POPL '12.

[31]  Jonathan Aldrich,et al.  Modular typestate checking of aliased objects , 2007, OOPSLA.

[32]  J. Gregory Morrisett,et al.  L3: A Linear Language with Locations , 2007, Fundam. Informaticae.

[33]  Jonathan Aldrich,et al.  Typestate-oriented programming , 2009, OOPSLA Companion.

[34]  John Tang Boyland,et al.  Checking Interference with Fractional Permissions , 2003, SAS.

[35]  K. Rustan M. Leino,et al.  The Spec# Programming System: An Overview , 2004, CASSIS.

[36]  Lars Birkedal,et al.  Step-Indexed Kripke Model of Separation Logic for Storable Locks , 2011, MFPS.

[37]  David Walker,et al.  Alias Types for Recursive Data Structures , 2000, Types in Compilation.

[38]  Alexey Gotsman,et al.  Local Reasoning for Storable Locks and Threads , 2007, APLAS.