Capabilities for Sharing: A Generalisation of Uniqueness and Read-Only

Many languages and language extensions include annotations on pointer variables suchas “read-only,” “unique,” and “borrowed”; many more annotations have been proposed but not implemented. Unfortunately, all these annotations are described individually and formalised independently — assuming they are formalised at all. In this paper, we show how these annotations can be subsumed into a general capability system for pointers. This system separates mechanism (defining the semantics of sharing and exclusion) from policy (defining the invariants that are intended to be preserved). The capability system has a welldefined semantics which can be used as a reference for the correctness of various extended type systems using annotations. Furthermore, it supports researchin new less-restrictive type systems that permit a wider range of idioms to be statically checked.

[1]  John Tang Boyland,et al.  Promises: limited specifications for analysis and manipulation , 1998, Proceedings of the 20th International Conference on Software Engineering.

[2]  Jan Vitek,et al.  Confined types , 1999, OOPSLA '99.

[3]  Henry G. Baker,et al.  “Use-once” variables and linear objects: storage management, reflection and multi-threading , 1995, SIGP.

[4]  Bruce J. MacLennan Values and objects in programming languages , 1982, SIGP.

[5]  Bruno Blanchet,et al.  Escape analysis for object-oriented languages: application to Java , 1999, OOPSLA '99.

[6]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[7]  Gregory R. Andrews,et al.  Language features for process interaction , 1977 .

[8]  Jan Vitek,et al.  Flexible Alias Protection , 1998, ECOOP.

[9]  William A. Wulf,et al.  HYDRA/C.Mmp, An Experimental Computer System , 1981 .

[10]  John Hogg Islands: aliasing protection in object-oriented languages , 1991, OOPSLA 1991.

[11]  Jean-Yves Girard,et al.  Linear Logic , 1987, Theor. Comput. Sci..

[12]  Klaus-Peter Löhr Concurrency annotations , 1992, OOPSLA 1992.

[13]  Aaron Greenhouse,et al.  An Object-Oriented Effects System , 1999, ECOOP.

[14]  Richard C. Holt,et al.  The Geneva convention on the treatment of object aliasing , 1992, OOPS.

[15]  Jong-Deok Choi,et al.  Escape analysis for Java , 1999, OOPSLA '99.

[16]  Barbara Liskov,et al.  Abstraction and Specification in Program Development , 1986 .

[17]  James Noble,et al.  Iterators and encapsulation , 2000, Proceedings 33rd International Conference on Technology of Object-Oriented Languages and Systems TOOLS 33.

[18]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[19]  Urs Hölzle,et al.  Removing unnecessary synchronization in Java , 1999, OOPSLA '99.

[20]  Jan Vitek,et al.  Aliasing in Object Oriented Systems , 1999, ECOOP Workshops.

[21]  Marinus J. Plasmeijer,et al.  High Level Specification of I/O in Functional Languages , 1992, Functional Programming.

[22]  Paulo Sérgio Almeida Balloon Types: Controlling Sharing of State in Data Types , 1997, ECOOP.

[23]  Martin C. Rinard,et al.  Compositional pointer and escape analysis for Java programs , 1999, OOPSLA '99.

[24]  John Tang Boyland,et al.  Alias burying: Unique variables without destructive reads , 2001, Softw. Pract. Exp..

[25]  M. Nivat Fiftieth volume of theoretical computer science , 1988 .

[26]  K. Rustan M. Leino,et al.  Virginity: A Contribution to the Specification of Object-Oriented Software , 1999, Inf. Process. Lett..

[27]  Bruce W. Weide,et al.  Copying and Swapping: Influences on the Design of Reusable Software Components , 1991, IEEE Trans. Software Eng..

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

[29]  Greg Nelson,et al.  Systems programming in modula-3 , 1991 .

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

[31]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[32]  Jack B. Dennis,et al.  Programming semantics for multiprogrammed computations , 1966, CACM.

[33]  David F. Bacon,et al.  Guava: a dialect of Java without data races , 2000, OOPSLA '00.

[34]  John C. Reynolds,et al.  Syntactic control of interference , 1978, POPL.

[35]  Maurice V. Wilkes,et al.  The Cambridge CAP computer and its operating system (Operating and programming systems series) , 1979 .

[36]  Naftaly H. Minsky Towards Alias-Free Pointers , 1996, ECOOP.

[37]  Benjamin Goldberg,et al.  Reference escape analysis: optimizing reference counting based on the lifetime of references , 1991 .

[38]  Dirk Theisen,et al.  JAC—Access right based encapsulation for Java , 2001, Softw. Pract. Exp..