skip to main content
10.1145/2364527.2364536acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Superficially substructural types

Published: 09 September 2012 Publication History

Abstract

Many substructural type systems have been proposed for controlling access to shared state in higher-order languages. Central to these systems is the notion of a *resource*, which may be split into disjoint pieces that different parts of a program can manipulate independently without worrying about interfering with one another. Some systems support a *logical* notion of resource (such as permissions), under which two resources may be considered disjoint even if they govern the *same* piece of state. However, in nearly all existing systems, the notions of resource and disjointness are fixed at the outset, baked into the model of the language, and fairly coarse-grained in the kinds of sharing they enable.
In this paper, inspired by recent work on "fictional disjointness" in separation logic, we propose a simple and flexible way of enabling any module in a program to create its own custom type of splittable resource (represented as a commutative monoid), thus providing fine-grained control over how the module's private state is shared with its clients. This functionality can be incorporated into an otherwise standard substructural type system by means of a new typing rule we call *the sharing rule*, whose soundness we prove semantically via a novel resource-oriented Kripke logical relation.

References

[1]
A. Ahmed. Semantics of Types for Mutable State. PhD thesis, Princeton University, 2004.
[2]
A. Ahmed. Step-indexed syntactic logical relations for recursive and quantified types. In ESOP, 2006.
[3]
A. Ahmed, D. Dreyer, and A. Rossberg. State-dependent representation independence. In POPL, 2009.
[4]
A. Ahmed, M. Fluet, and G. Morrisett. A step-indexed model of substructural state. In ICFP, 2005.
[5]
A. Ahmed, M. Fluet, and G. Morrisett. Łthree: A linear language with locations. Fundamenta Informaticae, 77:397--449, 2007.
[6]
A. Appel, P.-A. Melliès, C. Richards, and J. Vouillon. A very modal model of a modern, major, general type system. In POPL, 2007.
[7]
J. Boyland. Checking interference with fractional permissions. In SAS, 2003.
[8]
T. Brus, M. C. J. D. van Eekelen, M. van Leer, M. J. Plasmeijer, and H. P. Barendregt. Clean: A language for functional graph rewriting. In FPCA, 1987.
[9]
C. Calcagno, P. Gardner, and U. Zarfaty. Context logic and tree update. In POPL, 2005.
[10]
C. Calcagno, P. W. O'Hearn, and H. Yang. Local action and abstract separation logic. In LICS, 2007.
[11]
R. DeLine and M. F\"ahndrich. Enforcing high-level protocols in low-level software. In PLDI, 2001.
[12]
T. Dinsdale-Young, L. Birkedal, P. Gardner, M. Parkinson, and H. Yang. Views: Compositional reasoning for concurrency, 2012. Submitted for publication.
[13]
T. Dinsdale-Young, M. Dodds, P. Gardner, M. Parkinson, and V. Vafeiadis. Concurrent abstract predicates. In ECOOP, 2010.
[14]
T. Dinsdale-Young, P. Gardner, and M. Wheelhouse. Abstraction and refinement for local reasoning. In VSTTE, 2010.
[15]
M. Dodds, X. Feng, M. J. Parkinson, and V. Vafeiadis. Deny-guarantee reasoning. In ESOP, 2009.
[16]
D. Dreyer, G. Neis, and L. Birkedal. The impact of higher-order state and control effects on local relational reasoning. In ICFP, 2010.
[17]
D. Dreyer, G. Neis, A. Rossberg, and L. Birkedal. A relational modal logic for higher-order stateful ADTs. In POPL, 2010.
[18]
J. Dunfield. A Unified System of Type Refinements. PhD thesis, Carnegie Mellon University, 2007.
[19]
M. Fähndrich and R. DeLine. Adoption and focus: Practical linear types for imperative programming. In PLDI, 2002.
[20]
J.-Y. Girard. Linear logic. TCS, 50(1):1---102, 1987.
[21]
J. Jensen and L. Birkedal. Fictional separation logic. In ESOP, 2012.
[22]
C. B. Jones. The role of auxiliary variables in the formal development of concurrent programs. In Reflections on the work of C.A.R. Hoare, pages 167--188. Springer, 2010.
[23]
N. R. Krishnaswami, L. Birkedal, and J. Aldrich. Verifying event-driven programs using ramified frame properties. In TLDI, 2010.
[24]
N. R. Krishnaswami, A. Turon, D. Dreyer, and D. Garg. Superficially substructural types (Technical appendix), 2012.\ URL:verb
[25]
http://www.mpi-sws.org/ dreyer/papers/supsub/
[27]
R. Ley-Wild and A. Nanevski. Subjective concurrent separation logic, 2012. Submitted for publication.
[28]
K. Mazurak, J. Zhao, and S. Zdancewic. Lightweight linear types in System F$^\circ$. In TLDI, 2010.
[29]
A. Nanevski, G. Morrisett, and L. Birkedal. Hoare Type Theory, polymorphism and separation. JFP, 18(5&6):865--911, Sept. 2008.
[30]
M. J. Parkinson and G. M. Bierman. Separation logic and abstraction. In POPL, 2005.
[31]
A. Pilkiewicz and F. Pottier. The essence of monotonic state. In TLDI, 2011.
[32]
A. Pitts. Typed operational reasoning. In B. C. Pierce, editor, Advanced Topics in Types and Programming Languages, chapter 7. MIT Press, 2005.
[33]
A. Pitts and I. Stark. Operational reasoning for functions with local state. In HOOTS, 1998.
[34]
F. Pottier. Hiding local state in direct style: a higher-order anti-frame rule. In LICS, 2008.
[35]
F. Pottier. Syntactic soundness proof of a type-and-capability system with hidden state, 2011. Submitted for publication.
[36]
J. C. Reynolds. Separation logic: A logic for shared mutable data structures. In LICS, 2002.
[37]
J. Schwinghammer, L. Birkedal, F. Pottier, B. Reus, K. Støvring, and H. Yang. A step-indexed Kripke model of hidden state. Mathematical Structures in Computer Science, 2012. To appear.
[38]
R. Shi, D. Zhu, and H. Xi. A modality for safe resource sharing and code reentrancy. In ICTAC, 2010.
[39]
F. Smith, D. Walker, and G. Morrisett. Alias types. In ESOP, 2000.
[40]
R. E. Strom and S. Yemini. Typestate: A programming language concept for enhancing software reliability. IEEE Transactions on Software Engineering, 12(1):157---171, 1986.
[41]
M. Tofte and J.-P. Talpin. Region-based memory management. Information and Computation, 132(2):109---176, 1997.
[42]
J. Tov. Practical Programming with Substructural Types. PhD thesis, Northeastern University, 2012.
[43]
V. Vafeiadis. Modular fine-grained concurrency verification. PhD thesis, University of Cambridge, 2008.
[44]
D. Walker, K. Crary, and G. Morrisett. Typed memory management via static capabilities. TOPLAS, 22:701---771, 2000.
[45]
J. Wickerson, M. Dodds, and M. Parkinson. Explicit stabilisation for modular rely-guarantee reasoning. In ESOP, 2010.
[46]
N. Wolverson. Game semantics for an object-oriented language. PhD thesis, University of Edinburgh, 2008.
[47]
H. Xi and F. Pfenning. Dependent types in practical programming. In POPL, 1999.

Cited By

View all
  • (2024)A Logical Approach to Type SoundnessJournal of the ACM10.1145/367695471:6(1-75)Online publication date: 11-Nov-2024
  • (2023)Leaf: Modularity for Temporary Sharing in Separation LogicProceedings of the ACM on Programming Languages10.1145/36227987:OOPSLA2(31-58)Online publication date: 16-Oct-2023
  • (2021)Propositions-as-types and shared stateProceedings of the ACM on Programming Languages10.1145/34735845:ICFP(1-30)Online publication date: 19-Aug-2021
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICFP '12: Proceedings of the 17th ACM SIGPLAN international conference on Functional programming
September 2012
392 pages
ISBN:9781450310543
DOI:10.1145/2364527
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 47, Issue 9
    ICFP '12
    September 2012
    368 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2398856
    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: 09 September 2012

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. adts
  2. capabilities
  3. commutative monoids
  4. dependent types
  5. fictional disjointness
  6. hidden state
  7. kripke logical relations
  8. separation logic
  9. sharing rule
  10. substructural type systems

Qualifiers

  • Research-article

Conference

ICFP'12
Sponsor:

Acceptance Rates

ICFP '12 Paper Acceptance Rate 32 of 88 submissions, 36%;
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)8
  • Downloads (Last 6 weeks)1
Reflects downloads up to 17 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2024)A Logical Approach to Type SoundnessJournal of the ACM10.1145/367695471:6(1-75)Online publication date: 11-Nov-2024
  • (2023)Leaf: Modularity for Temporary Sharing in Separation LogicProceedings of the ACM on Programming Languages10.1145/36227987:OOPSLA2(31-58)Online publication date: 16-Oct-2023
  • (2021)Propositions-as-types and shared stateProceedings of the ACM on Programming Languages10.1145/34735845:ICFP(1-30)Online publication date: 19-Aug-2021
  • (2021)On algebraic abstractions for concurrent separation logicsProceedings of the ACM on Programming Languages10.1145/34342865:POPL(1-32)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
  • (2015)IrisACM SIGPLAN Notices10.1145/2775051.267698050:1(637-650)Online publication date: 14-Jan-2015
  • (2015)IrisProceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages10.1145/2676726.2676980(637-650)Online publication date: 14-Jan-2015
  • (2014)Abstract effects and proof-relevant logical relationsACM SIGPLAN Notices10.1145/2578855.253586949:1(619-631)Online publication date: 8-Jan-2014
  • (2014)Substructural typestatesProceedings of the ACM SIGPLAN 2014 Workshop on Programming Languages meets Program Verification10.1145/2541568.2541574(15-26)Online publication date: 11-Jan-2014
  • (2014)Abstract effects and proof-relevant logical relationsProceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages10.1145/2535838.2535869(619-631)Online publication date: 11-Jan-2014
  • Show More Cited By

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