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

Protecting representation with effect encapsulation

Published: 11 January 2006 Publication 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.]]
[2]
P. S. Almeida. Balloon types: Controlling sharing of state in data types. Lecture Notes in Computer Science, 1241:32--59, 1997.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[10]
J. Boyland, J. Noble, and W. Retert. Capabilities for sharing: A generalisation of uniqueness and read-only. In ECOOP, pages 2--27, 2001.]]
[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.]]
[12]
D. Clarke. Object Ownership and Containment. PhD thesis, School of Computer Science and Engineering, The University of New South Wales, Sydney, Australia, 2001.]]
[13]
D. Clarke and T. Wrigstad. External uniqueness is unique enough. In In European Conference for Object-Oriented Programming (ECOOP), July 2003.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[26]
P. Müller and A. Poetzsch-Heffter. Universes: A type system for controlling representation exposure. Programming Languages and Fundamentals of Programming, 1999.]]
[27]
P. Müller and A. Poetzsch-Heffter. Universes: A type system for alias and dependency control. Technical Report 279, Fernuniversität Hagen, 2001.]]
[28]
J. Noble, J. Vitek, and J. Potter. Flexible alias protection. In European Conference for Object-Oriented Programming (ECOOP), 1998.]]
[29]
J. Potter, J. Noble, and D. Clarke. The ins and outs of objects. In Australian Software Engineering Conference. IEEE Press, 1998.]]
[30]
F. Smith, D. Walker, and G. Morrisett. Alias types. Lecture Notes in Computer Science, 1782:366--381, 2000.]]
[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.]]
[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.]]
[33]
D. Walker and G. Morrisett. Alias types for recursive data structures. Lecture Notes in Computer Science, 2071:177--206, 2001.]]

Cited By

View all
  • (2019)Improvement of EZ-GCD algorithm based on extended hensel constructionACM Communications in Computer Algebra10.1145/3338637.333864952:4(148-150)Online publication date: 30-May-2019
  • (2017)On Computing Maximal Independent Sets of Hypergraphs in ParallelACM Transactions on Parallel Computing10.1145/29384363:1(1-13)Online publication date: 16-Jan-2017
  • (2017)Trade-Offs Between Synchronization, Communication, and Computation in Parallel Linear Algebra ComputationsACM Transactions on Parallel Computing10.1145/28971883:1(1-47)Online publication date: 17-Jan-2017
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '06: Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
January 2006
432 pages
ISBN:1595930272
DOI:10.1145/1111037
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 41, Issue 1
    Proceedings of the 2006 POPL Conference
    January 2006
    421 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1111320
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 January 2006

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. effect systems
  2. object encapsulation
  3. ownership types
  4. representation exposure
  5. types

Qualifiers

  • Article

Conference

POPL06

Acceptance Rates

Overall Acceptance Rate 860 of 4,328 submissions, 20%

Upcoming Conference

POPL '26

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)4
  • Downloads (Last 6 weeks)0
Reflects downloads up to 25 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2019)Improvement of EZ-GCD algorithm based on extended hensel constructionACM Communications in Computer Algebra10.1145/3338637.333864952:4(148-150)Online publication date: 30-May-2019
  • (2017)On Computing Maximal Independent Sets of Hypergraphs in ParallelACM Transactions on Parallel Computing10.1145/29384363:1(1-13)Online publication date: 16-Jan-2017
  • (2017)Trade-Offs Between Synchronization, Communication, and Computation in Parallel Linear Algebra ComputationsACM Transactions on Parallel Computing10.1145/28971883:1(1-47)Online publication date: 17-Jan-2017
  • (2016)Competitively Scheduling Tasks with Intermediate ParallelizabilityACM Transactions on Parallel Computing10.1145/29383783:1(1-19)Online publication date: 18-Jul-2016
  • (2015)Performance Characterization of Hyperscale Applicationson on NVMe SSDsACM SIGMETRICS Performance Evaluation Review10.1145/2796314.274590143:1(473-474)Online publication date: 15-Jun-2015
  • (2013)ImmutabilityAliasing in Object-Oriented Programming10.5555/2554511.2554525(233-269)Online publication date: 1-Jan-2013
  • (2013)Alias control for deterministic parallelismAliasing in Object-Oriented Programming10.5555/2554511.2554521(156-195)Online publication date: 1-Jan-2013
  • (2013)Understanding ownership types with dependent typesAliasing in Object-Oriented Programming10.5555/2554511.2554518(84-108)Online publication date: 1-Jan-2013
  • (2013)Ownership typesAliasing in Object-Oriented Programming10.5555/2554511.2554516(15-58)Online publication date: 1-Jan-2013
  • (2013)The need for capability policiesProceedings of the 15th Workshop on Formal Techniques for Java-like Programs10.1145/2489804.2489811(1-7)Online publication date: 1-Jul-2013
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media