skip to main content
10.1145/2620678.2620684acmotherconferencesArticle/Chapter ViewAbstractPublication PagesiflConference Proceedingsconference-collections
research-article

The implementation of the Mezzo type-checker

Published: 28 August 2013 Publication History

Abstract

We present the implementation of Mezzo, a programming language based on the notion of permission that provides strong guarantees about aliasing, ownership and mutable state. The unique features of Mezzo make its implementation challenging, both from a formal and a technical perspective. In this paper, we formalize the core operations used for type-checking, and give corresponding algorithms. Two central operations, subtraction and merging, are detailed. Both operations are closely related to shape analysis and frame inference.

References

[1]
Andrew W. Appel. VeriSmall: Verified Smallfoot shape analysis. In Certified Programs and Proofs, volume 7086 of Lecture Notes in Computer Science, pages 231--246. Springer, 2011.
[2]
Thibaut Balabonski and François Pottier. A Coq formalization of Mezzo, take 2, December 2013. http://gallium.inria.fr/~fpottier/mezzo/mezzo-coq.tar.gz.
[3]
Bernhard Beckert, Reiner Hähnle, and Peter H. Schmitt, editors. Verification of Object-Oriented Software: The KeY Approach. LNCS 4334. Springer-Verlag, 2007.
[4]
Josh Berdine, Cristiano Calcagno, and Peter W. O'Hearn. Smallfoot: 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.
[5]
Josh Berdine, Cristiano Calcagno, and Peter W. O'Hearn. Symbolic execution with separation logic. In Asian Symposium on Programming Languages and Systems (APLAS), volume 3780 of Lecture Notes in Computer Science, pages 52--68. Springer, 2005.
[6]
Kevin Bierhoff and Jonathan Aldrich. Modular typestate checking of aliased objects. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 301--320, 2007.
[7]
John Boyland. Checking interference with fractional permissions. In Static Analysis Symposium (SAS), volume 2694 of Lecture Notes in Computer Science, pages 55--72. Springer, 2003.
[8]
Cristiano Calcagno, Dino Distefano, Peter W. O'Hearn, and Hongseok Yang. Compositional shape analysis by means of bi-abduction. In Principles of Programming Languages (POPL), pages 289--300, 2009.
[9]
Bor-Yuh Evan Chang and Xavier Rival. Relational inductive shape analysis. In Principles of Programming Languages (POPL), pages 247--260, 2008.
[10]
Arthur Charguéraud. Program verification through characteristic formulae. In International Conference on Functional Programming (ICFP), 2010.
[11]
Dino Distefano and Matthew J. Parkinson. jStar: towards practical verification for Java. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 213--226, 2008.
[12]
Jean-Christophe Filliâtre and Claude Marché. Multi-prover verification of C programs. In International Conference on Formal Engineering Methods (ICFEM), volume 3308 of Lecture Notes in Computer Science, pages 15--29. Springer, 2004.
[13]
Dan Grossman, Greg Morrisett, Trevor Jim, Michael Hicks, Yanling Wang, and James Cheney. Region-based memory management in Cyclone. In Programming Language Design and Implementation (PLDI), pages 282--293, 2002.
[14]
Armaël Guéneau, François Pottier, and Jonathan Protzenko. The ins and outs of iteration in Mezzo. Workshop on Higher-Order Programming and Effects (HOPE), September 2013. http://goo.gl/NrgKc4.
[15]
Aleksandar Nanevski, Greg Morrisett, Avraham Shinnar, Paul Govereau, and Lars Birkedal. Ynot: dependent types for imperative programs. In International Conference on Functional Programming (ICFP), pages 229--240, 2008.
[16]
Juan Antonio Navarro Pérez and Andrey Rybalchenko. Separation logic + superposition calculus = heap theorem prover. In Programming Language Design and Implementation (PLDI), pages 556--566, 2011.
[17]
Huu Hai Nguyen, Cristina David, Shengchao Qin, and Wei-Ngan Chin. Automated verification of shape and size properties via separation logic. In Verification, Model Checking and Abstract Interpretation (VMCAI), volume 4349 of Lecture Notes in Computer Science, pages 251--266. Springer, 2007.
[18]
François Pottier and Jonathan Protzenko. Programming with permissions in Mezzo. In International Conference on Functional Programming (ICFP), pages 173--184, 2013.
[19]
François Pottier and Didier Rémy. The essence of ML type inference. In Benjamin C. Pierce, editor, Advanced Topics in Types and Programming Languages, chapter 10, pages 389--489. MIT Press, 2005.
[20]
John C. Reynolds. Separation logic: A logic for shared mutable data structures. In Logic in Computer Science (LICS), pages 55--74, 2002.
[21]
Xavier Rival. Abstract Domains for the Static Analysis of Programs Manipulating Complex Data Structures. Habilitation à diriger des recherches, École Normale Supérieure, 2011.
[22]
Sam Tobin-Hochstadt and Matthias Felleisen. Logical types for untyped languages. ACM Sigplan Notices, 45(9):117--128, 2010.
[23]
Hongseok Yang, Oukseh Lee, Josh Berdine, Cristiano Calcagno, Byron Cook, Dino Distefano, and Peter W. O'Hearn. Scalable shape analysis for systems code. In Computer Aided Verification, volume 5123 of Lecture Notes in Computer Science, pages 385--398. Springer, 2008.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
IFL '13: Proceedings of the 25th symposium on Implementation and Application of Functional Languages
August 2013
146 pages
ISBN:9781450329880
DOI:10.1145/2620678
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 28 August 2013

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Conference

IFL '13

Acceptance Rates

Overall Acceptance Rate 19 of 36 submissions, 53%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 54
    Total Downloads
  • Downloads (Last 12 months)3
  • Downloads (Last 6 weeks)0
Reflects downloads up to 20 Jan 2025

Other Metrics

Citations

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media