Protecting representation with effect encapsulation

Representation exposure is a well-known problem in the object-oriented realm. Object encapsulation mechanisms have established a tradition for solving this problem based on a principle of reference containment. This paper proposes a novel type system which is based on a different principle, we call effect encapsulation, which confines side effects, rather than object references, according to an ownership structure. Compared to object encapsulation, effect encapsulation liberates us from the restriction on object referenceability and offers more flexibility. In this paper, we show that effect encapsulation can be statically type checked.

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

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

[3]  James Noble,et al.  The ins and outs of objects , 1998, Proceedings 1998 Australian Software Engineering Conference (Cat. No.98EX233).

[4]  John Tang Boyland,et al.  Why we should not add readonly to Java (yet) , 2006, J. Object Technol..

[5]  James Noble,et al.  Simple Ownership Types for Object Containment , 2001, ECOOP.

[6]  John Tang Boyland,et al.  Capabilities for Sharing: A Generalisation of Uniqueness and Read-Only , 2001, ECOOP.

[7]  John Tang Boyland,et al.  Connecting effects and uniqueness with adoption , 2005, POPL '05.

[8]  Philip Wadler,et al.  Linear Types can Change the World! , 1990, Programming Concepts and Methods.

[9]  Martin C. Rinard,et al.  A parameterized type system for race-free Java programs , 2001, OOPSLA '01.

[10]  Peter M Uller,et al.  Universes: a type system for controlling representation exposure , 1999 .

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

[12]  K. Rustan M. Leino,et al.  Object Invariants in Dynamic Contexts , 2004, ECOOP.

[13]  Jonathan Aldrich,et al.  Permission-based ownership: encapsulating state in higher-order typed languages , 2005, PLDI '05.

[14]  David Walker,et al.  Alias Types , 2000, ESOP.

[15]  Martin C. Rinard,et al.  ACM Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), November 2002 Ownership Types for Safe Programming: Preventing Data Races and Deadlocks , 2022 .

[16]  Craig Chambers,et al.  Ownership Domains: Separating Aliasing Policy from Mechanism , 2004, ECOOP.

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

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

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

[20]  Yi Lu,et al.  A Type System for Reachability and Acyclicity , 2005, ECOOP.

[21]  Robert DeLine,et al.  Adoption and focus: practical linear types for imperative programming , 2002, PLDI '02.

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

[23]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 1999, OOPSLA '99.

[24]  Sophia Drossopoulou,et al.  Ownership, encapsulation and the disjointness of type and effect , 2002, OOPSLA '02.

[25]  J. Ferrante,et al.  Proceedings of the 15th ACM SIGPLAN-SIGACT symposium on Principles of programming languages , 1988 .

[26]  Michael D. Ernst,et al.  A practical type system and language for reference immutability , 2004, OOPSLA '04.

[27]  Martin C. Rinard,et al.  Ownership types for safe region-based memory management in real-time Java , 2003, PLDI '03.

[28]  K. Rustan M. Leino,et al.  Using data groups to specify and check side effects , 2002, PLDI '02.

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

[30]  Mirko Viroli,et al.  On Variance-Based Subtyping for Parametric Types , 2002, ECOOP.

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

[32]  David Walker,et al.  Alias Types for Recursive Data Structures , 2000, Types in Compilation.

[33]  David Gerard Clarke,et al.  Object ownership and containment , 2003 .