Balloon types: Controlling sharing of state in data types
Current data abstraction mechanisms are not adequate to control sharing of state in the general case involving objects in linked structures. The pervading possibility of sharing is a source of errors and an obstacle to language implementation techniques.
We present a general extension to programming languages which makes the ability to share state a first class property of a data type, resolving a long-standing flaw in existing data abstraction mechanisms.
Balloon types enforce a strong form of encapsulation: no state reachable (directly or transitively) by a balloon object is referenced by any external object. Syntactic simplicity is achieved by relying on a non-trivial static analysis as the checking mechanism.
Balloon types are applicable in a wide range of areas such as program transformation, memory management and distributed systems. They are the key to obtaining self-contained composite objects, truly opaque data abstractions and value types—important concepts for the development of large scale, provably correct programs.
KeywordsExternal Object Abstract Interpretation Concrete State Object Graph Primitive Type
Unable to display preview. Download preview PDF.
- 1.Gul Agha and Carl Hewitt. Actors: A conceptual foundation for concurrent object-oriented programming. In P. Wegner and B. Shriver, editors, Research Directions in Object-Oriented Programming, pages 49–74. MIT Press, 1987.Google Scholar
- 2.P. S. Almeida. Control of Object Sharing (provisional title). PhD thesis, University of London, Imperial College, Department of Computing, 1997. To appear.Google Scholar
- 3.G. E. Andrews. The theory of partitions. In Encyclopedia of Mathematics and its Applications, volume 2. Addison-Wesley, 1976.Google Scholar
- 4.K. Arnold and J. Gosling. The Java Programming Language. Addison-Wesley, 1996.Google Scholar
- 6.C. Clack and S. Peyton Jones. Strictness analysis—a practical approach. In Proceedings FPCA'85, volume 201 of LNCS, pages 35–49. Springer-Verlag, September 1985.Google Scholar
- 7.P. Cousot and R. Cousot. Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. In Proceedings 4th ACM Symposium on Principles of Programming Languages, pages 238–252, January 1977.Google Scholar
- 8.O.-J. Dahl, B. Myhrhaug, and K. Nygaard. The SIMULA 67 common base language. Publication S-22, Norwegian Computing Center, Oslo, 1970.Google Scholar
- 9.R. Ghiya and L. J. Hendren. Is it a tree, a DAG, or a cyclic graph? A shape analysis for heap-directed pointers in C. In Proceedings 23rd ACM Symposium on Principles of Programming Languages, pages 1–15, January 1996.Google Scholar
- 10.A. Goldberg and D. Robson. Smalltalk-80: The Language and its Implementation. Addison-Wesley, 1983.Google Scholar
- 11.L. J. Hendren and G. R. Gao. Designing programming languages for analyzability: A fresh look at pointer data structures. In Proceedings 4th IEEE International Conference on Computer Languages, pages 242–251, April 1992.Google Scholar
- 13.C. A. R. Hoare. Hints on programming language design. Technical Report STAN//CS-TR-73-403, Stanford University, Department of Computer Science, December 1973. Based on a keynote address presented at the ACM Symposium on Principles of Programming Languages.Google Scholar
- 14.J. Hogg, D. Lea, A. Wills, D. deChampeaux, and R. Holt. The Geneva convention on the treatment of object aliasing. Followup report on ECOOP'91 workshop W3: Object-oriented formal methods. OOPS Messenger, 3(2):11–16, April 1992.Google Scholar
- 16.Sebastian Hunt. Frontiers and open sets in abstract interpretation. In Proceedings FPCA'89, pages 1–11. ACM Press, September 1989.Google Scholar
- 17.N. D. Jones and F. Nielson. Abstract interpretation: a semantics-based tool for program analysis. In Handbook of Logic in Computer Science, volume 4: Semantic Modelling, pages 527–636. Oxford University Press, 1995.Google Scholar
- 18.S. Kent and J. Howse. Value types in Eiffel. In Proceedings TOOLS Europe 96 (TOOLS 19). Prentice Hall, 1996.Google Scholar
- 21.Bent Bruun Kristensen, Ole Lehrmann Madsen, Birger Moller-Pedersen, and Kristen Nygaard. The BETA programming language. In P. Wegner and B. Shriver, editors, Research Directions in Object-Oriented Programming, pages 7–48. MIT Press, 1987.Google Scholar
- 22.B. W. Lampson, J. J. Horning, R. L. London, J. G. Mitchell, and G. J. Popek. Report on the programming language EUCLID. SIGPLAN Notices, 12(2), 1977.Google Scholar
- 23.B. H. Liskov and J. Guttag. Abstraction and Specification in Program Development. The MIT Press, 1986.Google Scholar
- 24.J. M. Lucassen and D. K. Gifford. Polymorphic effect systems. In Proceedings 15th ACM Symposium on Principles of Programming Languages, pages 47–57, January 1988.Google Scholar
- 26.Ole Lehrmann Madsen, Birger Moller-Pedersen, and Kristen Nygaard. Object-Oriented Programming in the BETA Programming Language. Addison-Wesley, 1993.Google Scholar
- 27.Bertrand Meyer. Eiffel: The Language. Prentice Hall, 1992.Google Scholar
- 28.Naftaly Minsky. Towards alias-free pointers. In Proceedings ECOOP'96, LNCS 1098, pages 189–209. Springer-Verlag, 1996.Google Scholar
- 29.J. C. Reynolds. Syntactic control of interference. In Proceedings 5th ACM Symposium on Principles of Programming Languages, pages 39–46, January 1978.Google Scholar
- 30.M. Sagiv, T. Reps, and R. Wilhelm. Solving shape-analysis problems in languages with destructive updating. In Proceedings 23rd ACM Symposium on Principles of Programming Languages, pages 16–31, January 1996.Google Scholar
- 31.B. Stroustrup. The C++ programming language. Addison-Wesley, 1986.Google Scholar