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.
- A. Ahmed. Semantics of Types for Mutable State. PhD thesis, Princeton University, 2004. Google Scholar
Digital Library
- A. Ahmed. Step-indexed syntactic logical relations for recursive and quantified types. In ESOP, 2006. Google Scholar
Digital Library
- A. Ahmed, D. Dreyer, and A. Rossberg. State-dependent representation independence. In POPL, 2009. Google Scholar
Digital Library
- A. Ahmed, M. Fluet, and G. Morrisett. A step-indexed model of substructural state. In ICFP, 2005. Google Scholar
Digital Library
- A. Ahmed, M. Fluet, and G. Morrisett. Łthree: A linear language with locations. Fundamenta Informaticae, 77:397--449, 2007. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- J. Boyland. Checking interference with fractional permissions. In SAS, 2003. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- C. Calcagno, P. Gardner, and U. Zarfaty. Context logic and tree update. In POPL, 2005. Google Scholar
Digital Library
- C. Calcagno, P. W. O'Hearn, and H. Yang. Local action and abstract separation logic. In LICS, 2007. Google Scholar
Digital Library
- R. DeLine and M. F\"ahndrich. Enforcing high-level protocols in low-level software. In PLDI, 2001. Google Scholar
Digital Library
- T. Dinsdale-Young, L. Birkedal, P. Gardner, M. Parkinson, and H. Yang. Views: Compositional reasoning for concurrency, 2012. Submitted for publication.Google Scholar
- T. Dinsdale-Young, M. Dodds, P. Gardner, M. Parkinson, and V. Vafeiadis. Concurrent abstract predicates. In ECOOP, 2010. Google Scholar
Digital Library
- T. Dinsdale-Young, P. Gardner, and M. Wheelhouse. Abstraction and refinement for local reasoning. In VSTTE, 2010. Google Scholar
Digital Library
- M. Dodds, X. Feng, M. J. Parkinson, and V. Vafeiadis. Deny-guarantee reasoning. In ESOP, 2009. Google Scholar
Digital Library
- D. Dreyer, G. Neis, and L. Birkedal. The impact of higher-order state and control effects on local relational reasoning. In ICFP, 2010. Google Scholar
Digital Library
- D. Dreyer, G. Neis, A. Rossberg, and L. Birkedal. A relational modal logic for higher-order stateful ADTs. In POPL, 2010. Google Scholar
Digital Library
- J. Dunfield. A Unified System of Type Refinements. PhD thesis, Carnegie Mellon University, 2007.Google Scholar
- M. Fähndrich and R. DeLine. Adoption and focus: Practical linear types for imperative programming. In PLDI, 2002. Google Scholar
Digital Library
- J.-Y. Girard. Linear logic. TCS, 50(1):1---102, 1987. Google Scholar
Digital Library
- J. Jensen and L. Birkedal. Fictional separation logic. In ESOP, 2012. Google Scholar
Digital Library
- 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.Google Scholar
Cross Ref
- N. R. Krishnaswami, L. Birkedal, and J. Aldrich. Verifying event-driven programs using ramified frame properties. In TLDI, 2010. Google Scholar
Digital Library
- N. R. Krishnaswami, A. Turon, D. Dreyer, and D. Garg. Superficially substructural types (Technical appendix), 2012.\ URL:verbGoogle Scholar
- http://www.mpi-sws.org/ dreyer/papers/supsub/Google Scholar
- .Google Scholar
- R. Ley-Wild and A. Nanevski. Subjective concurrent separation logic, 2012. Submitted for publication.Google Scholar
- K. Mazurak, J. Zhao, and S. Zdancewic. Lightweight linear types in System F$^\circ$. In TLDI, 2010. Google Scholar
Digital Library
- A. Nanevski, G. Morrisett, and L. Birkedal. Hoare Type Theory, polymorphism and separation. JFP, 18(5&6):865--911, Sept. 2008. Google Scholar
Digital Library
- M. J. Parkinson and G. M. Bierman. Separation logic and abstraction. In POPL, 2005. Google Scholar
Digital Library
- A. Pilkiewicz and F. Pottier. The essence of monotonic state. In TLDI, 2011. Google Scholar
Digital Library
- A. Pitts. Typed operational reasoning. In B. C. Pierce, editor, Advanced Topics in Types and Programming Languages, chapter 7. MIT Press, 2005.Google Scholar
- A. Pitts and I. Stark. Operational reasoning for functions with local state. In HOOTS, 1998. Google Scholar
Digital Library
- F. Pottier. Hiding local state in direct style: a higher-order anti-frame rule. In LICS, 2008. Google Scholar
Digital Library
- F. Pottier. Syntactic soundness proof of a type-and-capability system with hidden state, 2011. Submitted for publication.Google Scholar
- J. C. Reynolds. Separation logic: A logic for shared mutable data structures. In LICS, 2002. Google Scholar
Digital Library
- 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.Google Scholar
- R. Shi, D. Zhu, , and H. Xi. A modality for safe resource sharing and code reentrancy. In ICTAC, 2010. Google Scholar
Digital Library
- F. Smith, D. Walker, and G. Morrisett. Alias types. In ESOP, 2000. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- M. Tofte and J.-P. Talpin. Region-based memory management. Information and Computation, 132(2):109---176, 1997. Google Scholar
Digital Library
- J. Tov. Practical Programming with Substructural Types. PhD thesis, Northeastern University, 2012.Google Scholar
- V. Vafeiadis. Modular fine-grained concurrency verification. PhD thesis, University of Cambridge, 2008.Google Scholar
- D. Walker, K. Crary, and G. Morrisett. Typed memory management via static capabilities. TOPLAS, 22:701---771, 2000. Google Scholar
Digital Library
- J. Wickerson, M. Dodds, and M. Parkinson. Explicit stabilisation for modular rely-guarantee reasoning. In ESOP, 2010. Google Scholar
Digital Library
- N. Wolverson. Game semantics for an object-oriented language. PhD thesis, University of Edinburgh, 2008.Google Scholar
- H. Xi and F. Pfenning. Dependent types in practical programming. In POPL, 1999. Google Scholar
Digital Library
Index Terms
Superficially substructural types
Recommendations
Superficially substructural types
ICFP '12: Proceedings of the 17th ACM SIGPLAN international conference on Functional programmingMany 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 ...
Integrating Linear and Dependent Types
POPL '15: Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming LanguagesIn this paper, we show how to integrate linear types with type dependency, by extending the linear/non-linear calculus of Benton to support type dependency. Next, we give an application of this calculus by giving a proof-theoretic account of imperative ...
Type Theory based on Dependent Inductive and Coinductive Types
LICS '16: Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer ScienceWe develop a dependent type theory that is based purely on inductive and coinductive types, and the corresponding recursion and corecursion principles. This results in a type theory with a small set of rules, while still being fairly expressive. For ...







Comments