Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1086365.1086376acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

A step-indexed model of substructural state

Published: 12 September 2005 Publication History

Abstract

The concept of a "unique" object arises in many emerging programming languages such as Clean, CQual, Cyclone, TAL, and Vault. In each of these systems, unique objects make it possible to perform operations that would otherwise be prohibited (e.g., deallocating an object) or to ensure that some obligation will be met (e.g., an opened file will be closed). However, different languages provide different interpretations of "uniqueness" and have different rules regarding how unique objects interact with the rest of the language.Our goal is to establish a common model that supports each of these languages, by allowing us to encode and study the interactions of the different forms of uniqueness. The model we provide is based on a substructural variant of the polymorphic λ-calculus, augmented with four kinds of mutable references: unrestricted, relevant, affine, and linear. The language has a natural operational semantics that supports deallocation of references, strong (type-varying) updates, and storage of unique objects in shared references. We establish the strong soundness of the type system by constructing a novel, semantic interpretation of the types.

References

[1]
Amal Ahmed, Andrew W. Appel, and Roberto Virga. An indexed model of impredicative polymorphism and mutable references. Available at http://www.cs.princeton.edu/~appel/papers/impred.pdf, January 2003.]]
[2]
Amal Ahmed, Matthew Fluet, and Greg Morrisett. L3: A linear language with locations. Technical Report TR-24-04, Harvard University, October 2004.]]
[3]
Amal Ahmed, Matthew Fluet, and Greg Morrisett. A step-indexed model of substructural state. Technical Report TR-16-05, Harvard University, July 2005.]]
[4]
Amal Jamil Ahmed. Semantics of Types for Mutable State. PhD thesis, Princeton University, 2004.]]
[5]
Alex Aiken, Jeffrey S. Foster, John Kodumal, and Tachio Terauchi. Checking and inferring local non-aliasing. In Proc. Programming Language Design and Implementation (PLDI), pages 129--140, June 2003.]]
[6]
Andrew W. Appel. Foundational proof-carrying code. In Proc. Logic in Computer Science (LICS), pages 247--258, June 2001.]]
[7]
Andrew W. Appel and David McAllester. An indexed model of recursive types for foundational proof-carrying code. ACM Transactions on Programming Languages and Systems, 23(5):657--683, September 2001.]]
[8]
David Aspinall and Adriana Compagnoni. Heap bounded assembly language. Journal of Automated Reasoning, 31:261--302, 2003.]]
[9]
David Aspinall and Martin Hofmann. Another type system for in-place update. In Proc. European Symposium on Programming (ESOP), pages 36--52, March 2002.]]
[10]
Henry Baker. Lively linear LISP-look ma, no garbage. ACM SIGPLAN Notices, 27(8):89--98, 1992.]]
[11]
John Tang Boyland and William Retert. Connecting effects and uniqueness with adoption. In Proc. Principles of Programming Languages (POPL), pages 283--295, January 2005.]]
[12]
James Cheney and Greg Morrisett. A linearly typed assembly language. Technical Report 2003-1900, Department of Computer Science, Cornell University, 2003.]]
[13]
Robert DeLine and Manuel Fähndrich. Enforcing high-level protocols in low-level software. In Proc. Programming Language Design and Implementation (PLDI), pages 59--69, June 2001.]]
[14]
Manuel Fähndrich and Robert DeLine. Adoption and focus: Practical linear types for imperative programming. In Proc. Programming Language Design and Implementation (PLDI), pages 13--24, June 2002.]]
[15]
Jean-Yves Girard. Linear logic. Theoretical Computer Science, 50:1--102, 1987.]]
[16]
Jörgen Gustavsson and Josef Svenningsson. A usage analysis with bounded usage polymorphism and subtyping. In Proc. International Workshop on Implementation of Functional Languages (IFL), pages 140--157, September 2001.]]
[17]
Michael Hicks, Greg Morrisett, Dan Grossman, and Trevor Jim. Experience with safe manual memory-management in Cyclone. In Proc. International Symposium on Memory Management (ISMM), pages 73--84, October 2004.]]
[18]
Martin Hofmann. A type system for bounded space and functional in-place update. In Proc. European Symposium on Programming (ESOP), pages 165--179, March 2000.]]
[19]
Atsushi Igarashi and Naoki Kobayashi. Resource usage analysis. In Proc. ACM Principles of Programming Languages (POPL), pages 331--342, January 2002.]]
[20]
Samin Ishtiaq and Peter O'Hearn. BI as an assertion language for mutable data structures. In Proc. Principles of Programming Languages (POPL), pages 14--26, January 2001.]]
[21]
Naoki Kobayashi. Quasi-linear types. In Proc. Principles of Programming Languages (POPL), pages 29--42, January 1999.]]
[22]
Torben Æ. Mogensen. Types for 0, 1 or many uses. In Proc. International Workshop on Implementation of Functional Languages (IFL), pages 112--122, 1998.]]
[23]
Greg Morrisett, Amal Ahmed, and Matthew Fluet. L3: A linear language with locations. In Proc. International Conference on Typed Lambda Calculi and Applications (TLCA), pages 293--307, April 2005.]]
[24]
Peter W. O'Hearn and John C. Reynolds. From Algol to polymorphic linear lambda-calculus. Journal of the ACM, 47(1):167--223, 2000.]]
[25]
John C. Reynolds. Separation Logic: A Logic for Shared Mutable Data Structures. In Proc. Logic in Computer Science (LICS), pages 55--74, July 2002.]]
[26]
Sjaak Smetsers, Erik Barendsen, Marko C. J. D. van Eekelen, and Rinus J. Plasmeijer. Guaranteeing safe destructive updates through a type system with uniqueness information for graphs. In Dagstuhl Seminar on Graph Transformations in Computer Science, volume 776 of Lecture Notes in Computer Science, pages 358--379. Springer-Verlag, 1994.]]
[27]
Fred Smith, David Walker, and Greg Morrisett. Alias types. In Proc. European Symposium on Programming (ESOP), pages 366--381, March 2000.]]
[28]
David N. Turner, Philip Wadler, and Christian Mossin. Once upon a type. In Proc. Functional Programming Languages and Computer Architecture (FPCA), pages 1--11, June 1995.]]
[29]
Philip Wadler. Linear types can change the world! In Programming Concepts and Methods, April 1990. IFIP TC 2 Working Conference.]]
[30]
David Walker. Substructural type systems. In Benjamin Pierce, editor, Advanced Topics in Types and Programming Languages, chapter 1, pages 3--43. MIT Press, Cambridge, MA, 2005.]]
[31]
David Walker and Greg Morrisett. Alias types for recursive data structures. In Proc. Workshop on Types in Compilation (TIC), pages 177--206, September 2000.]]
[32]
David Walker and Kevin Watkins. On regions and linear types. In Proc. International Conference on Functional Programming (ICFP), pages 181--192, September 2001.]]
[33]
Keith Wansbrough and Simon Peyton-Jones. Once upon a polymorphic type. In Proc. Principles of Programming Languages (POPL), pages 15--28, January 1999.]]

Cited By

View all
  • (2024)RichWasm: Bringing Safe, Fine-Grained, Shared-Memory Interoperability Down to WebAssemblyProceedings of the ACM on Programming Languages10.1145/36564448:PLDI(1656-1679)Online publication date: 20-Jun-2024
  • (2024)Soundly Handling LinearityProceedings of the ACM on Programming Languages10.1145/36328968:POPL(1600-1628)Online publication date: 5-Jan-2024
  • (2021)Transfinite step-indexing for terminationProceedings of the ACM on Programming Languages10.1145/34342945:POPL(1-29)Online publication date: 4-Jan-2021
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICFP '05: Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
September 2005
342 pages
ISBN:1595930647
DOI:10.1145/1086365
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 40, Issue 9
    Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
    September 2005
    330 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1090189
    Issue’s Table of Contents
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 ACM 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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 12 September 2005

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. mutable references
  2. stepindexed model
  3. substructural type system

Qualifiers

  • Article

Conference

ICFP05
Sponsor:

Acceptance Rates

Overall Acceptance Rate 333 of 1,064 submissions, 31%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)10
  • Downloads (Last 6 weeks)2
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)RichWasm: Bringing Safe, Fine-Grained, Shared-Memory Interoperability Down to WebAssemblyProceedings of the ACM on Programming Languages10.1145/36564448:PLDI(1656-1679)Online publication date: 20-Jun-2024
  • (2024)Soundly Handling LinearityProceedings of the ACM on Programming Languages10.1145/36328968:POPL(1600-1628)Online publication date: 5-Jan-2024
  • (2021)Transfinite step-indexing for terminationProceedings of the ACM on Programming Languages10.1145/34342945:POPL(1-29)Online publication date: 4-Jan-2021
  • (2017)RustBelt: securing the foundations of the Rust programming languageProceedings of the ACM on Programming Languages10.1145/31581542:POPL(1-34)Online publication date: 27-Dec-2017
  • (2016)Refinement through restraint: bringing down the cost of verificationACM SIGPLAN Notices10.1145/3022670.295194051:9(89-102)Online publication date: 4-Sep-2016
  • (2016)The best of both worlds: linear functional programming without compromiseACM SIGPLAN Notices10.1145/3022670.295192551:9(448-461)Online publication date: 4-Sep-2016
  • (2016)Refinement through restraint: bringing down the cost of verificationProceedings of the 21st ACM SIGPLAN International Conference on Functional Programming10.1145/2951913.2951940(89-102)Online publication date: 4-Sep-2016
  • (2016)The best of both worlds: linear functional programming without compromiseProceedings of the 21st ACM SIGPLAN International Conference on Functional Programming10.1145/2951913.2951925(448-461)Online publication date: 4-Sep-2016
  • (2015)Type Classes for Lightweight Substructural TypesElectronic Proceedings in Theoretical Computer Science10.4204/EPTCS.176.4176(34-48)Online publication date: 16-Feb-2015
  • (2013)Mixin’ Up the ML Module SystemACM Transactions on Programming Languages and Systems10.1145/2450136.245013735:1(1-84)Online publication date: 1-Apr-2013
  • Show More Cited By

View Options

Get Access

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