Advertisement

Capabilities for Sharing

A Generalisation of Uniqueness and Read-Only
  • John Boyland
  • James Noble
  • William Retert
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2072)

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.

Keywords

Type System Unique Variable Pointer Variable Capability System Defense Advance Research Project Agency 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [1]
    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.Google Scholar
  2. [2]
    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.Google Scholar
  3. [3]
    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.Google Scholar
  4. [4]
    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.Google Scholar
  5. [5]
    Henry G. Baker. ‘Use-once’ variables and linear objects—storage management, reflection and multi-threading. ACM SIGPLAN Notices, 30(1):45–52, January 1995.CrossRefGoogle Scholar
  6. [6]
    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.Google Scholar
  7. [7]
    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.Google Scholar
  8. [8]
    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.Google Scholar
  9. [9]
    John Boyland. Alias burying: Unique variables without destructive reads. Software Practice and Experience, 31(6):533–553, May 2001.zbMATHCrossRefGoogle Scholar
  10. [10]
    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.CrossRefGoogle Scholar
  11. [11]
    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.Google Scholar
  12. [12]
    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.Google Scholar
  13. [13]
    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.Google Scholar
  14. [14]
    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.Google Scholar
  15. [15]
    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.Google Scholar
  16. [16]
    Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading, Massachussetts, USA, 1995.Google Scholar
  17. [17]
    Jean-Yves Girard. Linear logic. Theoretical Computer Science, 50(1):1–102, 1987.zbMATHCrossRefMathSciNetGoogle Scholar
  18. [18]
    James Gosling, Bill Joy, and Guy Steele. The Java™ Language Specificaion. The Java™ Series. Addison-Wesley, Reading, Massachussetts, USA, 1996.Google Scholar
  19. [19]
    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.Google Scholar
  20. [20]
    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.Google Scholar
  21. [21]
    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.CrossRefGoogle Scholar
  22. [22]
    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.CrossRefGoogle Scholar
  23. [23]
    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.Google Scholar
  24. [24]
    Günter Kniesel and Dirk Theisen. JAC-access right based encapsulation for Java. Software Practice and Experience, 31(6), May 2001.Google Scholar
  25. [25]
    Günther Kniesel. Encapsulation = visibility + accessibility. Technical Report IAI-TR-96-12, Universität Bonn, November 1996. Revised March1998.Google Scholar
  26. [26]
    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.zbMATHCrossRefGoogle Scholar
  27. [27]
    B. Liskov and J. Guttag. Abstraction and Specification in Program Development. The MIT Press, Cambridge, Massachussetts, USA and London, England, 1986.Google Scholar
  28. [28]
    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.CrossRefGoogle Scholar
  29. [29]
    B. Maclennan. Values and objects in programming languages. ACM SIGPLAN Notices, 17(2):70–80, 1982.CrossRefGoogle Scholar
  30. [30]
    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.Google Scholar
  31. [31]
    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.Google Scholar
  32. [32]
    Greg Nelson, editor. Systems Programming with Modula-3. Prentice Hall Series in Innovative Technology. Prentice-Hall, Englewood Cliffs, New Jersey, USA, 1991.Google Scholar
  33. [33]
    James Noble. Iterators and encapsulation. In TOOLS Europe 2000, pages 431–442. IEEE Computer Society, Los Alamitos, California, 2000.Google Scholar
  34. [34]
    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.Google Scholar
  35. [35]
    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.Google Scholar
  36. [36]
    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.Google Scholar
  37. [37]
    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.Google Scholar
  38. [38]
    John C. Reynolds. Intuitionistic reasoning about shared mutable data structure. In Millenial Perspectives in Computer Science. Palgrave, to appear. Draft dated July 28, 2000.Google Scholar
  39. [39]
    Bjarne Stroustrup. The C++ programming Language. Addison-Wesley, Reading, Massachussetts, USA, third edition, 1997.Google Scholar
  40. [40]
    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.Google Scholar
  41. [41]
    M.V. Wilkes and R.M. Needham. The Cambridge CAP Computer and its operating system. Elsevier, London, 1978.Google Scholar
  42. [42]
    William A. Wulf, Roy Levin, and Samuel P. Harbison. HYDRA/C.mmp: An Experimental Computer System. McGraw-Hill, New York, 1981.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2001

Authors and Affiliations

  • John Boyland
    • 1
  • James Noble
    • 2
  • William Retert
    • 1
  1. 1.University of Wisconsin-MilwaukeeUSA
  2. 2.Victoria University of WellingtonNew Zealand

Personalised recommendations