Abstract
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.
Work supported in part by the National Science Foundation (CCR-9984681) and the Defense Advanced Research Projects Agency and Rome Laboratory, Air Force Materiel Command, USAF under contract F30602-99-2-0522. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the National Science Foundation, Defense Advanced Research Projects Agency, Rome Laboratory, or the U.S. Government.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Peter Achten, John van Groningen, and Rinus Plasmeijer. High level specification of I/O in functional languages. In John Launchbury and P. Samson, editors, Workshop on Functional Programming, Glasgow 1992, Ayr, UK, July 6-8, Workshops in Computer Science, pages 1–17. Springer, Berlin, Heidelberg, New York, 1993.
Paulo Sergio Almeida. Balloon types: Controlling sharing of state in data types. In Mehmet Akşit and Satoshi Matsuoka, editors, ECOOP’97 — Object-Oriented Programming, 11th European Conference, Jyväskylä, Finland, June 9-13, volume 1241 of Lecture Notes in Computer Science, pages 32–59. Springer, Berlin, Heidelberg, New York, 1997.
G. R. Andrews and J. R. McGraw. Language features for process interaction. In Davd B. Wortman, editor, Proceedings of an ACM Conference on Language Design for Reliable Software, ACM SIGPLAN Notices, 12(3):114–127, March1977.
David F. Bacon, Robert E. Strom, and Ashis Tarafdar. Guava: A dialect of Java without data races. In OOPSLA’00 Conference Proceedings—Object-Oriented Programming Systems, Languages and Applications, Minneapolis, Minnesota, USA, October 15-19, ACM SIGPLAN Notices, 35(10):382–400, October 2000.
Henry G. Baker. ‘Use-once’ variables and linear objects—storage management, reflection and multi-threading. ACM SIGPLAN Notices, 30(1):45–52, January 1995.
Bruno Blanchet. Escape analysis for object-oriented languages: application to Java. In OOPSLA’99 Conference Proceedings—Object-Oriented Programming Systems, Languages and Applications, Denver, Colorado, USA, November 1-5, ACM SIGPLAN Notices, 34(10):20–34, October 1999.
Jeff Bogda and Urs Hölzle. Removing unnecessary synchronization in Java. In OOPSLA’99 Conference Proceedings—Object-Oriented Programming Systems, Languages and Applications, Denver, Colorado, USA, November 1-5, ACM SIGPLAN Notices, 34(10):35–46, October 1999.
Boris Bokowski and Jan Vitek. Confined types. In OOPSLA’99 Conference Proceedings—Object-Oriented Programming Systems, Languages and Applications, Denver, Colorado, USA, November 1-5, ACM SIGPLAN Notices, 34(10):82–96, October 1999.
John Boyland. Alias burying: Unique variables without destructive reads. Software Practice and Experience, 31(6):533–553, May 2001.
Edwin C. Chan, John T. Boyland, and William L. Scherlis. Promises: Limited specifications for analysis and manipulation. In Proceedings of the IEEE International Conference on Software Engineering (ICSE’ 98), Kyoto, Japan, April 19-25, pages 167–176. IEEE Computer Society, Los Alamitos, California, 1998.
Jong-Deok Choi, Manish Gupta, Mauricio Serrano, Vugranam C. Sreedhar, and Sam Midkiff. Escape analysis for Java. In OOPSLA’99 Conference Proceedings— Object-Oriented Programming Systems, Languages and Applications, Denver,Colorado, USA, November 1-5, ACM SIGPLAN Notices, 34(10):1–19, October 1999.
David Clarke. An object calculus witho wnership and containment. In The Eighth International Workshop on Foundations of Object-Oriented Languages (FOOL 8), London, England, January 20. 2001.
David G. Clarke, John M. Potter, and James Noble. Ownership types for flexible alias protection. In OOPSLA’98 Conference Proceedings—Object-Oriented Programming Systems, Languages and Applications, Vancouver, Canada, October 18-22, ACM SIGPLAN Notices, 33(10):48–64, October 1998.
Karl Crary, David Walker, and Greg Morrisett. Typed memory management in a calculus of capabilities. In Conference Record of the Twenty-sixth Annual ACM SIGACT/SIGPLAN Symposium on Principles of Programming Languages, San Antonio, Texas, USA, January 20-22, pages 262–275. ACM Press, New York, 1999.
Jack B. Dennis and Earl C Van Horn. Programming semantics for multiprogrammed computations. In Communications of the ACM, pages 143–154. ACM Press, New York, March1966.
Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading, Massachussetts, USA, 1995.
Jean-Yves Girard. Linear logic. Theoretical Computer Science, 50(1):1–102, 1987.
James Gosling, Bill Joy, and Guy Steele. The Java™ Language Specificaion. The Java™ Series. Addison-Wesley, Reading, Massachussetts, USA, 1996.
Aaron Greenhouse and John Boyland. An object-oriented effects system. In Rachid Guerraoui, editor, ECOOP’99 — Object-Oriented Programming, 13 th European Conference, Lisbon, Portugal, June 14-18, volume 1628 of Lecture Notes in Computer Science, pages 205–229. Springer, Berlin, Heidelberg, New York, 1999.
Harri Hakonen, Ville Leppänen, Timo Raita, Tapio Salakoski, and Jukka Teuhola. Improving object integrity and preventing side effects via deeply immutable references. In Proceedings of the Sixth Fenno-Ugric Symposium on Software Technology, FUSST’99, pages 139–150. 1999.
Douglas E. Harms and Bruce W. Weide. Copying and swapping: Influences on the design of reusable software components. IEEE Transactions on Software Engineering, 17(5):424–435, May 1991.
John Hogg. Islands: Aliasing protection in object-oriented languages. In OOPSLA’ 91 Conference Proceedings—Object-Oriented Programming Systems, Languages and Applications, Phoenix, Arizona, USA, October 6-11, ACM SIGPLAN Notices, 26(11):271–285, November 1991.
John Hogg, Doug Lea, Alan Wills, Dennis deChampeaux, and Richard Holt. The Geneva convention on the treatment of object aliasing. OOPS Messenger, 3(2), April 1992.
Günter Kniesel and Dirk Theisen. JAC-access right based encapsulation for Java. Software Practice and Experience, 31(6), May 2001.
Günther Kniesel. Encapsulation = visibility + accessibility. Technical Report IAI-TR-96-12, Universität Bonn, November 1996. Revised March1998.
K. Rustan M. Leino and Raymie Stata. Virginity: A contribution to the specification of object-oriented software. Information Processing Letters, 70(2):99–105, April 1999.
B. Liskov and J. Guttag. Abstraction and Specification in Program Development. The MIT Press, Cambridge, Massachussetts, USA and London, England, 1986.
Klaus-Peter Löhr. Concurrency annotations. In OOPSLA’92 Conference Proceedings—Object-Oriented Programming Systems, Languages and Applications, Vancouver, British Columbia October 18-22, ACM SIGPLAN Notices, 27(10):327–340, October 1992.
B. Maclennan. Values and objects in programming languages. ACM SIGPLAN Notices, 17(2):70–80, 1982.
Naftaly Minsky. Towards alias-free pointers. In Pierre Cointe, editor, ECOOP’96 — Object-Oriented Programming, 10 th European Conference, Linz, Austria, July 8-12, volume 1098 of Lecture Notes in Computer Science, pages 189–209. Springer, Berlin, Heidelberg, New York, July 1996.
Peter Müller and Arnd Poetzsch-Heffter. A type system for controlling representation exposure in Java. In Sophia Drossopolou, Susan Eisenbach, Bart Jacobs, Gary T. Leavens, Peter Müller, and Arnd Poetzsch-Heffter, editors, 2nd ECOOP Workshop on Formal Techniques for Java Programs, Nice, France, June 12. 2000.
Greg Nelson, editor. Systems Programming with Modula-3. Prentice Hall Series in Innovative Technology. Prentice-Hall, Englewood Cliffs, New Jersey, USA, 1991.
James Noble. Iterators and encapsulation. In TOOLS Europe 2000, pages 431–442. IEEE Computer Society, Los Alamitos, California, 2000.
James Noble, Jan Vitek, and Doug Lea. Report of the Intercontinental Workshop on Aliasing in Object-Oriented Systems, volume 1743 of Lecture Notes in Computer Science. Springer, Berlin, Heidelberg, New York, 2000.
James Noble, Jan Vitek, and John Potter. Flexible alias protection. In Eric Jul, editor, ECOOP’98 — Object-Oriented Programming, 12 th European Conference, Brussels, Belgium, July 20-24, volume 1445 of Lecture Notes in Computer Science. Springer, Berlin, Heidelberg, New York, 1998.
Young Gil Park and Benjamin Goldberg. Reference escape analysis: Optimizing reference counting based on the lifetime of references. In ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM’91), New Haven, Colorado, USA, June 17-19, ACM SIGPLAN Notices, 26(9):178–189, September 1991.
John C. Reynolds. Syntactic control of interference. In Conference Record of the Fifth ACM Symposium on Principles of Programming Languages, Tucson, Arizona, USA, pages 39–46. ACM Press, New York, January 1978.
John C. Reynolds. Intuitionistic reasoning about shared mutable data structure. In Millenial Perspectives in Computer Science. Palgrave, to appear. Draft dated July 28, 2000.
Bjarne Stroustrup. The C++ programming Language. Addison-Wesley, Reading, Massachussetts, USA, third edition, 1997.
John Whaley and Martin Rinard. Compositional pointer and escape analysis for Java programs. In OOPSLA’99 Conference Proceedings—Object-Oriented Programming Systems, Languages and Applications, Denver, Colorado, USA, November 1-5, ACM SIGPLAN Notices, 34(10):187–206, October 1999.
M.V. Wilkes and R.M. Needham. The Cambridge CAP Computer and its operating system. Elsevier, London, 1978.
William A. Wulf, Roy Levin, and Samuel P. Harbison. HYDRA/C.mmp: An Experimental Computer System. McGraw-Hill, New York, 1981.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Boyland, J., Noble, J., Retert, W. (2001). Capabilities for Sharing. In: Knudsen, J.L. (eds) ECOOP 2001 — Object-Oriented Programming. ECOOP 2001. Lecture Notes in Computer Science, vol 2072. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45337-7_2
Download citation
DOI: https://doi.org/10.1007/3-540-45337-7_2
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-42206-8
Online ISBN: 978-3-540-45337-6
eBook Packages: Springer Book Archive