Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Sharing classes between families

Published: 15 June 2009 Publication History
  • Get Citation Alerts
  • Abstract

    Class sharing is a new language mechanism for building extensible software systems. Recent work has separately explored two different kinds of extensibility: first, family inheritance, in which an entire family of related classes can be inherited, and second, adaptation, in which existing objects are extended in place with new behavior and state. Class sharing integrates these two kinds of extensibility mechanisms. With little programmer effort, objects of one family can be used as members of another, while preserving relationships among objects. Therefore, a family of classes can be adapted in place with new functionality spanning multiple classes. Object graphs can evolve from one family to another, adding or removing functionality even at run time.
    Several new mechanisms support this flexibility while ensuring type safety. Class sharing has been implemented as an extension to Java, and its utility for evolving and extending software is demonstrated with realistic systems.

    References

    [1]
    Ivica Aracic, Vaidas Gasiunas, Mira Mezini, and Klaus Ostermann. An overview of CaesarJ. In Awais Rashid and Mehmet Aksit, editors, Lecture Notes in Computer Science: Transactions on Aspect-Oriented Software Development I, pages 135--173. Springer-Verlag, 2006.
    [2]
    Miles Barr and Susan Eisenbach. Safe upgrading without restarting. In Proceedings of 19th International Conference on Software Maintenance (ICSM), pages 129--137, 2003.
    [3]
    Alexandre Bergel, Stéphane Ducasse, and Oscar Nierstrasz. Classbox J: Controlling the scope of change in Java. In Proc. 20th ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA), pages 177--189, San Diego, CA, USA, October 2005.
    [4]
    Gilad Bracha andWilliam Cook. Mixin-based inheritance. In Norman Meyrowitz, editor, Proc. 5th ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA) pages 303--311, Ottawa, Canada, 1990. ACM Press.
    [5]
    Frederick P. Brooks. The Mythical Man-Month: Essays on Software Engineering. Addison-Wesley, 1978.
    [6]
    Kim B. Bruce. Safe static type checking with systems of mutually recursive classes and inheritance. Technical report, Williams College, 1997. http://cs.williams.edu/~kim/ftp/RecJava.ps.gz.
    [7]
    Kim B. Bruce, Martin Odersky, and Philip Wadler. A statically safe alternative to virtual types. In European Conference on Object-Oriented Programming (ECOOP), pages 523--549, Brussels, Belgium, July 1998.
    [8]
    Eric Bruneton, Romain Lenglet, and Thierry Coupaye. ASM: A code manipulation tool to implement adaptable systems, 2002. http://asm.objectweb.org/current/asm-eng.pdf.
    [9]
    B. Cahoon and K. S. McKinley. Data flow analysis for software prefetching linked data structures in Java. In International Conference on Parallel Architectures and Compilation Techniques (PACT), September 2001.
    [10]
    Dave Clarke, Sophia Drossopoulou, James Noble, and Tobias Wrigstad. Tribe: A simple virtual class calculus. In AOSD '07: Proceedings of the 6th International Conference on Aspect-Oriented Software Development, pages 121--134, 2007.
    [11]
    Curtis Clifton, Gary T. Leavens, Craig Chambers, and Todd Millstein. MultiJava: Modular open classes and symmetric multiple dispatch for Java. In Proc. 15th ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA), pages 130--145, 2000.
    [12]
    Adriana B. Compagnoni and Benjamin C. Pierce. Higher order intersection types and multiple inheritance. Mathematical Structures in Computer Science, 6(5):469--501, 1996.
    [13]
    Bruno C. d. S. Oliveira. Modular visitor components: A practical solution to the expression families problem. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP), July 2009. to appear.
    [14]
    Ferruccio Damiani, Sophia Drossopoulou, and Paola Giannini. Refined effects for unanticipated object re-classification: FickleIII. In ICTCS, pages 97--110, 2003.
    [15]
    Dominic Duggan. Type-based hot swapping of running modules. Acta Inf., 41(4):181--220, 2005.
    [16]
    Erik Ernst. gbeta -- A Language with Virtual Attributes, Block Structure, and Propagating, Dynamic Inheritance. PhD thesis, Department of Computer Science, University of Aarhus, Aarhus, Denmark, 1999.
    [17]
    Erik Ernst. Family polymorphism. In Proceedings of the 15th European Conference on Object--Oriented Programming (ECOOP), LNCS 2072, pages 303--326, 2001.
    [18]
    Erik Ernst, Klaus Ostermann, and William R. Cook. A virtual class calculus. In Proc. ACM Symp. on Principles of Programming Languages (POPL) '06, pages 270--282, January 2006.
    [19]
    Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison Wesley, Reading, MA, 1994.
    [20]
    Stephan Herrmann. Object teams: Improving modularity for crosscutting collaborations. In Proc. Net Object Days, 2002.
    [21]
    Atsushi Igarashi and Benjamin Pierce. Foundations for virtual types. In Proceedings of the 13th European Conference on Object-Oriented Programming (ECOOP), pages 161--185, June 1999.
    [22]
    Atsushi Igarashi and Mirko Viroli. Variant path types for scalable extensibility. In Proc. 22nd ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA), pages 113--132, New York, NY, USA, 2007. ACM.
    [23]
    David MacQueen. Modules for Standard ML. In Proc. 1984 ACM Symposium on Lisp and Functional Programming, pages 198--204, August 1984.
    [24]
    O. Lehrmann Madsen and B. Møller-Pedersen. Virtual classes: A powerful mechanism for object-oriented programming. In Proc. 4th ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA), pages 397--406, October 1989.
    [25]
    O. Lehrmann Madsen, B. Møller-Pedersen, and K. Nygaard. Object Oriented Programming in the BETA Programming Language. Addison-Wesley, June 1993.
    [26]
    M. Mezini and K. Ostermann. Conquering aspects with Caesar. In Proceedings of the 2nd International Conference on Aspect-Oriented Software Development (AOSD), pages 90--100, Boston, Massachusetts, March 2003.
    [27]
    Mira Mezini, Linda Seiter, and Karl Lieberherr. Component integration with pluggable composite adapters. Software Architectures and Component Technology, 2000.
    [28]
    Nathaniel Nystrom, Stephen Chong, and Andrew C. Myers. Scalable extensibility via nested inheritance. In Proceedings of the 19th ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA), pages 99--115, October 2004.
    [29]
    Nathaniel Nystrom, Michael R. Clarkson, and Andrew C. Myers. Polyglot: An extensible compiler framework for Java. In Görel Hedin, editor, Compiler Construction, 12th International Conference, CC 2003, pages 138--152, Warsaw, Poland, April 2003.
    [30]
    Nathaniel Nystrom, Xin Qi, and Andrew C. Myers. J.: Nested intersection for scalable software composition. In Proc. 21st ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA), pages 21--36, October 2006.
    [31]
    Nathaniel Nystrom, Xin Qi, and Andrew C. Myers. Nested intersection for scalable software composition. Technical report, Computer Science Dept., Cornell University, September 2006. http://www.cs.cornell.edu/nystrom/papers/jet-tr.pdf.
    [32]
    Martin Odersky, Philippe Altherr, Vincent Cremet, Burak Emir, Sebastian Maneth, St2ephane Micheloud, Nikolay Mihaylov, Michel Schinz, Erik Stenman, and Matthias Zenger. An overview of the Scala programming language, June 2004. http://scala.epfl.ch/docu/files/ScalaOverview.pdf.
    [33]
    Martin Odersky and Matthias Zenger. Scalable component abstractions In Proc. 20th ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA), pages 41--57, San Diego, CA, USA, October 2005.
    [34]
    Klaus Ostermann. Dynamically composable collaborations with delegation layers. In Proceedings of the 16th European Conference on Object-Oriented Programming (ECOOP), volume 2374 of Lecture Notes in Computer Science, pages 89--110, M2alaga, Spain, 2002. Springer-Verlag.
    [35]
    Xin Qi and Andrew C. Myers. Masked types for sound object initialization. In Proc. ACM Symp. on Principles of Programming Languages (POPL) '09, pages 53--65, January 2009.
    [36]
    Xin Qi and Andrew C. Myers. Sharing classes between families. Technical report, Computer and Information Science, Cornell University, March 2009. http://hdl.handle.net/1813/12141.
    [37]
    Venugopalan Ramasubramanian, Ryan Peterson, and Emin Gün Sirer. Corona: A high performance publish-subscribe system for the World Wide Web. In Proceedings of Networked System Design and Implementation (NSDI), May 2006.
    [38]
    Venugopalan Ramasubramanian and Emin Gün Sirer. Beehive: O(1) lookup performance for power-law query distributions in peer-to-peer overlays. In USENIX Symposium on Networked Systems Design and Implementation (NSDI), March 2004.
    [39]
    John C. Reynolds. Design of the programming language Forsythe. Technical Report CMU-CS-96-146, Carnegie Mellon University, June 1996.
    [40]
    Antony Rowstron and Peter Druschel. Pastry: Scalable, distributed object location and routing for large-scale peer-to-peer systems. In IFIP/ACM International Conference on Distributed Systems Platforms (Middleware), pages 329--350, November 2001.
    [41]
    Yannis Smaragdakis and Don Batory. Mixin layers: An objectoriented implementation technique for refinements and collaboration based designs. ACM Transactions on Software Engineering and Methodology, 11(2):215--255, April 2002.
    [42]
    Charles Smith and Sophia Drossopoulou. Chai: Traits for Java-like languages. In Proceedings of the 19th European Conference on Object-Oriented Programming (ECOOP), pages 453--478, 2005.
    [43]
    Gareth Stoyle, Michael Hicks, Gavin Bierman, Peter Sewell, and Iulian Neamtiu. Mutatis mutandis: safe and predictable dynamic software updating. In Proc. ACM Symp. on Principles of Programming Languages (POPL) '05, pages 183--194, 2005.
    [44]
    Bjarne Stroustrup. The C++ Programming Language. Addison-Wesley, 1987.
    [45]
    Sun Microsystems. Java Language Specification, version 1.0 beta edition, October 1995. Available at ftp://ftp.javasoft.com/docs/javaspec.ps.zip.
    [46]
    Tim Sweeney. The next mainstream programming language: a game developer's perspective. In Proc. ACM Symp. on Principles of Programming Languages (POPL) '06, page 269, January 2006.
    [47]
    Kresten Krab Thorup. Genericity in Java with virtual types. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP), number 1241 in Lecture Notes in Computer Science, pages 444--471. Springer-Verlag, 1997.
    [48]
    Mads Torgersen. Virtual types are statically safe. In 5th Workshop on Foundations of Object-Oriented Languages (FOOL), January 1998.
    [49]
    Philip Wadler. Views: A way for pattern matching to cohabit with data abstraction. In Proc. ACM Symp. on Principles of Programming Languages (POPL) '87, pages 307--312, January 1987.
    [50]
    Alessandro Warth, Milan Stanojevi2c, and Todd Millstein. Statically scoped object adaptation with expanders. In Proc. 21st ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA), Portland, OR, October 2006.
    [51]
    Andrew K. Wright and Matthias Felleisen. A syntactic approach to type soundness. Information and Computation, 115(1):38--94, 1994.

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 44, Issue 6
    PLDI '09
    June 2009
    478 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1543135
    Issue’s Table of Contents
    • cover image ACM Conferences
      PLDI '09: Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation
      June 2009
      492 pages
      ISBN:9781605583921
      DOI:10.1145/1542476
    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]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 15 June 2009
    Published in SIGPLAN Volume 44, Issue 6

    Check for updates

    Author Tags

    1. family inheritance
    2. masked types
    3. views

    Qualifiers

    • Research-article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)4
    • Downloads (Last 6 weeks)1
    Reflects downloads up to 09 Aug 2024

    Other Metrics

    Citations

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media