skip to main content
10.1145/1111037.1111069acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article

Protecting representation with effect encapsulation

Authors Info & Claims
Published:11 January 2006Publication History

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.

References

  1. J. Aldrich and C. Chambers. Ownership domains: Separating aliasing policy from mechanism. In In European Conference for Object-Oriented Programming (ECOOP), July 2004.]]Google ScholarGoogle ScholarCross RefCross Ref
  2. P. S. Almeida. Balloon types: Controlling sharing of state in data types. Lecture Notes in Computer Science, 1241:32--59, 1997.]]Google ScholarGoogle ScholarCross RefCross Ref
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle Scholar
  10. J. Boyland, J. Noble, and W. Retert. Capabilities for sharing: A generalisation of uniqueness and read-only. In ECOOP, pages 2--27, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. D. Clarke. Object Ownership and Containment. PhD thesis, School of Computer Science and Engineering, The University of New South Wales, Sydney, Australia, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. D. Clarke and T. Wrigstad. External uniqueness is unique enough. In In European Conference for Object-Oriented Programming (ECOOP), July 2003.]]Google ScholarGoogle ScholarCross RefCross Ref
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 ScholarGoogle ScholarCross RefCross Ref
  24. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. P. Müller and A. Poetzsch-Heffter. Universes: A type system for controlling representation exposure. Programming Languages and Fundamentals of Programming, 1999.]]Google ScholarGoogle Scholar
  27. P. Müller and A. Poetzsch-Heffter. Universes: A type system for alias and dependency control. Technical Report 279, Fernuniversität Hagen, 2001.]]Google ScholarGoogle Scholar
  28. J. Noble, J. Vitek, and J. Potter. Flexible alias protection. In European Conference for Object-Oriented Programming (ECOOP), 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. J. Potter, J. Noble, and D. Clarke. The ins and outs of objects. In Australian Software Engineering Conference. IEEE Press, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. F. Smith, D. Walker, and G. Morrisett. Alias types. Lecture Notes in Computer Science, 1782:366--381, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  32. 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 ScholarGoogle Scholar
  33. D. Walker and G. Morrisett. Alias types for recursive data structures. Lecture Notes in Computer Science, 2071:177--206, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Protecting representation with effect encapsulation

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!