Towards a Model of Encapsulation

Encapsulation is a founding principle of object-oriented programming: to this end, there have been a number of recent of proposals to increase programming languages’ support for encapsulation. While many of these proposals are similar in concept, it is often difficult to describe their effects in practice, or to evaluate clearly how related proposals differ from each other. We are developing a general topological model of encapsulation for object-oriented languages, based on a program’s object graph. Using this model, we can characterise a range of confinement, ownership, and alias protection schemes in terms of their underlying encapsulation function. This analysis should help programmers understand the encapsulation provided by programming languages, assist students to better compare and contrast the features of different languages, and help language designers to craft the encapsulation schemes of forthcoming programming languages.

[1]  Jens Palsberg,et al.  Encapsulating objects with confined types , 2001, OOPSLA 2001.

[2]  John Hogg,et al.  Islands: aliasing protection in object-oriented languages , 1991, OOPSLA '91.

[3]  Tobias Wrigstad,et al.  External Uniqueness , 2003 .

[4]  D. Naumann,et al.  Ownership : transfer , sharing , and encapsulation , .

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

[6]  Anindya Banerjee,et al.  Representation independence, confinement and access control [extended abstract] , 2002, POPL '02.

[7]  Alan Cameron Wills Formal Methods applied to Object-Oriented Programming , 1992 .

[8]  Liuba Shrira,et al.  Ownership types for object encapsulation , 2003, POPL '03.

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

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

[11]  Dave Clarke,et al.  External Uniqueness Is Unique Enough , 2003, ECOOP.

[12]  Andreas Zeller,et al.  Visualizing Memory Graphs , 2001, Software Visualization.

[13]  C. A. R. Hoare,et al.  A Trace Model for Pointers and Objects , 1999, ECOOP.

[14]  Peter Grogono,et al.  A graph model for object oriented programming , 1994, SIGP.

[15]  Craig Chambers,et al.  Alias annotations for program understanding , 2002, OOPSLA '02.

[16]  Jens Palsberg,et al.  Lightweight confinement for featherweight java , 2003, OOPSLA 2003.

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