ABSTRACT
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.
- J. Aldrich and C. Chambers. Ownership domains: Separating aliasing policy from mechanism. In In European Conference for Object-Oriented Programming (ECOOP), July 2004.]]Google Scholar
Cross Ref
- P. S. Almeida. Balloon types: Controlling sharing of state in data types. Lecture Notes in Computer Science, 1241:32--59, 1997.]]Google Scholar
Cross Ref
- A. Banerjee and D. A. Naumann. Representation independence, confinement and access control {extended abstract}. In POPL '02: Proceedings of the 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 166--177. ACM Press, 2002.]] Google Scholar
Digital Library
- A. Birka and M. D. Ernst. A practical type system and language for reference immutability. In OOPSLA '04: Proceedings of the 19th annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 35--49. ACM Press, 2004.]] Google Scholar
Digital Library
- C. Boyapati, R. Lee, and M. Rinard. Ownership types for safe programming: Preventing data races and deadlocks. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), November 2002.]] Google Scholar
Digital Library
- C. Boyapati, B. Liskov, and L. Shrira. Ownership types for object encapsulation. In Proceedings of the 30th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 213--223. ACM Press, 2003.]] Google Scholar
Digital Library
- C. Boyapati and M. Rinard. A parameterized type system for race-free Java programs. In 16th Annual Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), Tampa Bay, FL, October 2001.]] Google Scholar
Digital Library
- C. Boyapati, A. Salcianu, J. William Beebee, and M. Rinard. Ownership types for safe region-based memory management in real-time java. In PLDI '03: Proceedings of the ACM SIGPLAN 2003 Conference on Programming Language Design and Implementation, pages 324--337. ACM Press, 2003.]] Google Scholar
Digital Library
- J. Boyland. Why we should not add readonly to Java (yet). In F. Logozzo and J. Vitek, editors, ECOOP 2005 Workshop on Formal Techniques for Java-like Programs, July 2005.]]Google Scholar
- J. Boyland, J. Noble, and W. Retert. Capabilities for sharing: A generalisation of uniqueness and read-only. In ECOOP, pages 2--27, 2001.]] Google Scholar
Digital Library
- J. T. Boyland and W. Retert. Connecting effects and uniqueness with adoption. In POPL '05: Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 283--295, New York, NY, USA, 2005. ACM Press.]] Google Scholar
Digital Library
- D. Clarke. Object Ownership and Containment. PhD thesis, School of Computer Science and Engineering, The University of New South Wales, Sydney, Australia, 2001.]] Google Scholar
Digital Library
- D. Clarke and T. Wrigstad. External uniqueness is unique enough. In In European Conference for Object-Oriented Programming (ECOOP), July 2003.]]Google Scholar
Cross Ref
- D. G. Clarke and S. Drossopoulou. Ownership, encapsulation and disjointness of type and effect. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), November 2002.]] Google Scholar
Digital Library
- D. G. Clarke, J. Noble, and J. M. Potter. Simple ownership types for object containment. In European Conference for Object-Oriented Programming (ECOOP), 2001.]] Google Scholar
Digital Library
- D. G. Clarke, J. M. Potter, and J. Noble. Ownership types for flexible alias protection. In Proceedings of the 13th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 48--64. ACM Press, 1998.]] Google Scholar
Digital Library
- M. Fahndrich and R. DeLine. Adoption and focus: practical linear types for imperative programming. In PLDI '02: Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation, pages 13--24, New York, NY, USA, 2002. ACM Press.]] Google Scholar
Digital Library
- A. Greenhouse and J. Boyland. An object-oriented effects system. In ECOOP '99: Proceedings of the 13th European Conference on Object-Oriented Programming, pages 205--229. Springer-Verlag, 1999.]] Google Scholar
Digital Library
- J. Hogg. Islands: aliasing protection in object-oriented languages. In OOPSLA '91: Proceedings of Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 271--285, New York, NY, USA, 1991. ACM Press.]] Google Scholar
Digital Library
- A. Igarashi, B. Pierce, and P. Wadler. Featherweight Java: A minimal core calculus for Java and GJ. In L. Meissner, editor, Proceedings of the 1999 ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA'99), volume 34(10), pages 132--146, N. Y., 1999.]] Google Scholar
Digital Library
- A. Igarashi and M. Viroli. On variance-based subtyping for parametric types. In Proceedings of the 16th European Conference on Object-Oriented Programming, pages 441--469. Springer-Verlag, 2002.]] Google Scholar
Digital Library
- N. Krishnaswami and J. Aldrich. Permission-based ownership: encapsulating state in higher-order typed languages. In PLDI '05: Proceedings of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 96--106, New York, NY, USA, 2005. ACM Press.]] Google Scholar
Digital Library
- K. R. M. Leino and P. Müller. Object invariants in dynamic contexts. In Proceedings of the 18th European Conference on Object-Oriented Programming, pages 491--516. Springer-Verlag, 2004.]]Google Scholar
Cross Ref
- K. R. M. Leino, A. Poetzsch-Heffter, and Y. Zhou. Using data groups to specify and check side effects. In PLDI '02: Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation, pages 246--257. ACM Press, 2002.]] Google Scholar
Digital Library
- Y. Lu and J. Potter. A type system of reachability and acyclicity. In Proceedings of the 19th European Conference on Object-Oriented Programming, pages 479--503. Springer-Verlag, 2005.]] Google Scholar
Digital Library
- P. Müller and A. Poetzsch-Heffter. Universes: A type system for controlling representation exposure. Programming Languages and Fundamentals of Programming, 1999.]]Google Scholar
- P. Müller and A. Poetzsch-Heffter. Universes: A type system for alias and dependency control. Technical Report 279, Fernuniversität Hagen, 2001.]]Google Scholar
- J. Noble, J. Vitek, and J. Potter. Flexible alias protection. In European Conference for Object-Oriented Programming (ECOOP), 1998.]] Google Scholar
Digital Library
- J. Potter, J. Noble, and D. Clarke. The ins and outs of objects. In Australian Software Engineering Conference. IEEE Press, 1998.]] Google Scholar
Digital Library
- F. Smith, D. Walker, and G. Morrisett. Alias types. Lecture Notes in Computer Science, 1782:366--381, 2000.]] Google Scholar
Digital Library
- J. Vitek and B. Bokowski. Confined types. In Proceedings of the 14th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 82--96. ACM Press, 1999.]] Google Scholar
Digital Library
- P. Wadler. Linear types can change the world! In M. Broy and C. Jones, editors, IFIP TC 2 Working Conference on Programming Concepts and Methods, Sea of Galilee, Israel, pages 347--359. North Holland, 1990.]]Google Scholar
- D. Walker and G. Morrisett. Alias types for recursive data structures. Lecture Notes in Computer Science, 2071:177--206, 2001.]] Google Scholar
Digital Library
Index Terms
Protecting representation with effect encapsulation
Recommendations
Protecting representation with effect encapsulation
Proceedings of the 2006 POPL ConferenceRepresentation 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 ...
Ownership, encapsulation and the disjointness of type and effect
OOPSLA '02: Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applicationsOwnership types provide a statically enforceable notion of object-level encapsulation. We extend ownership types with computational effects to support reasoning about object-oriented programs. The ensuing system provides both access control and effects ...
Ownership types for object encapsulation
POPL '03: Proceedings of the 30th ACM SIGPLAN-SIGACT symposium on Principles of programming languagesOwnership types provide a statically enforceable way of specifying object encapsulation and enable local reasoning about program correctness in object-oriented languages. However, a type system that enforces strict object encapsulation is too ...







Comments