skip to main content
10.1145/1449764.1449771acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

Whiteoak: introducing structural typing into java

Authors Info & Claims
Published:19 October 2008Publication History

ABSTRACT

This paper presents WHITEOAK: a JAVA extension that introduces structural type equivalence and subtyping into the language. We argue that structural subtyping addresses common software design problems, and promotes the development of loosely coupled modules without compromising type safety.

We discuss language design issues, including subtyping in face of self-referencing structural types, compile-time operators for computing the new types from existing ones, and the semantics of constructors and non-abstract methods in structural types. We describe implementation techniques, including the compile-time and run-time challenges that we faced (in particular, preserving the identity of objects). Measurement indicate that the performance of our implementation of structural dispatching is comparable to that of the JVM's standard invocation mechanisms.

References

  1. R. M. Amadio and L. Cardelli. Subtyping recursive types. ACM Trans. on Prog. Lang. Syst., 15(4):575--631, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. D. Ancona, G. Lagorio, and E. Zucca. Jam -- a smooth extension of Java with mixins. In E. Bertino, editor, Proc. of the 14th Euro. Conf. on OO Prog. (ECOOP'00), volume 1850 of LNCS, pages 154--178, Sophia Antipolis and Cannes, France, June 12-16 2000. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. T. Andrews and C. Harris. Combining language and database advances in an object-oriented development environment. In N. K. Meyrowitz, editor, Proc. of the 2nd Ann. Conf. on OO Prog. Sys., Lang., & Appl. (OOPSLA'87), pages 430--440, Orlando, Florida, Oct. 4-8 1987. ACM SIGPLAN Notices 22(12). Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. P. Atkinson and O. P. Buneman. Types and persistence in database programming languages. ACM Comput. Surv., 19(2):105--170, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. P. Atkinson and R. Welland. Fully Integrated Data Env.: Persistent Prog. Lang., Object Stores, and Prog. Env. Springer, Secaucus, NJ, USA, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. G. Baumgartner and V. F. Russo. Implementing signatures for C++. In Proc. of the 6th USENIX C++ Conf., pages 37--56, Cambridge, MA, Apr. 1994. USENIX Association. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. G. Baumgartner and V. F. Russo. Implementing signatures for C++. ACM Trans. on Prog. Lang. Syst., 19(1):153--187, Jan. 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. G. Bracha. The Programming Language Jigsaw: Mixins, Modularity and Multiple Inheritance. PhD thesis, Dept. of Comp. Sci., University of Utah, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. G. Bracha, M. Odersky, D. Stoutamire, and P.Wadler. Making the future safe for the past: Adding genericity to the Java programming language. In Proc. of the 13th Ann. Conf. on OO Prog. Sys., Lang., & Appl. (OOPSLA'98), pages 183--200, Vancouver, British Columbia, Canada, Oct.18-22 1998. ACM SIGPLAN Notices 33(10). Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. K. B. Bruce and J. N. Foster. LOOJ: Weaving LOOM into Java. In Proceedings of the 18th European Conference on Object-Oriented Programming (ECOOP'04), pages 389--413, Oslo, Norway, June 14-18 2004.Google ScholarGoogle ScholarCross RefCross Ref
  11. M. Büchi and W. Weck. Compound types for java. In Proc. of the 13th Ann. Conf. on OO Prog. Sys., Lang., & Appl. (OOPSLA'98), pages 362--373, Vancouver, British Columbia, Canada, Oct.18-22 1998. ACM SIGPLAN Notices 33(10). Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. B. Eckel. Thinking in C++. Prentice-Hall, Upper Saddle River, NJ, USA, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. R. P. Gabriel, L. Northrop, D. C. Schmidt, and K. Sullivan. Ultra-large-scale systems. In OOPSLA '06: Companion to the 21st ACM SIGPLAN conference on Object-oriented programming languages, systems, and applications, pages 632--634. ACM Press, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. E. Gamma, R. Helm, R. E. Johnson, and J. M. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Professional Computing series. Addison-Wesley, Reading, Massachusetts, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. J. Gil and P. F. Sweeney. Space- and time-efficient memory layout for multiple inheritance. In Proc. of the 14th Ann. Conf. on OO Prog. Sys., Lang., & Appl. (OOPSLA'99), pages 256--275, Denver, Colorado, Nov.1-5 1999. ACM Press, ACM SIGPLAN Notices 34 (10). Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J. Gosling, B. Joy, G. L. J. Steele, and G. Bracha. The Java Language Specification. Addison-Wesley, Reading, Massachusetts, 3rd edition, June 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. W. Harrison, D. Lievens, and T. Walsh. Using recombinance to improve modularity. Technical Report 104 Software Structures Group, Trinity College Dublin, Dublin, Ireland, March 2007.Google ScholarGoogle Scholar
  18. H. Hosoya, A. Frisch, and G. Castagna. Parametric polymorphism for XML. In J. Palsberg and M. Abadi, editors, Proc. of the 32nd ACM SIGPLAN-SIGACT Symp. on Principles of Programming Lang. (POPL'05), pages 50--62. ACM Press, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. B. N. Jørgensen. Integration of independently developed components through aliased multi-object type widening. Journal of Object Technology, 3(11):55--76, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  20. K. Läufer, G. Baumgartner, and V. F. Russo. Safe structural conformance for Java. The Computer Journal, 43(6):469--481, 2001.Google ScholarGoogle ScholarCross RefCross Ref
  21. T. Lindholm and F. Yellin. The Java Virtual Machine Specification. Addison-Wesley, Reading, Massachusetts, 2nd edition, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. D. Malayeri and J. Aldrich. Integrating nominal and structural subtyping. In Proceedings of the 22nd European Conference on Object-Oriented Programming (ECOOP'08), pages 260--284, Paphos, Cyprus, July 7-11 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. E. R. Murphy-Hill, P. J. Quitslund, and A. P. Black. Removing duplication from java.io: a case study using traits. In OOPSLA '05: Companion to the 20th ACM SIGPLAN conference on Object-oriented programming languages, systems, and applications, pages 282--291, New York, NY, USA, 2005. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. G. W. Neufeld and S. T. Vuong. An overview of ASN.1. Comp. Networks and ISDN Sys., 23(5):393--415, Feb. 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. Odersky. The Scala experiment: can we provide better language support for component systems? In Proceedings of the 33rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL'06), pages 166--167, Charleston, South Carolina, USA, January 11-13 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. N. Schärli, S. Ducasse, O. Nierstrasz, and A. P. Black. Traits: Composable units of behavior. In L. Cardelli, editor, Proc. of the 17th Euro. Conf. on OO Prog. (ECOOP'03), volume 2743 of LNCS, pages 248--274, Darmstadt, Germany, July 21--25 2003. Springer.Google ScholarGoogle Scholar
  27. J. W. Schmidt. Some high level language constructs for data of type relation. ACM Trans. on Database Sys., 2(3):247--261, Sept. 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Y. Zibin and J. Gil. Efficient subtyping tests with PQ-encoding. In Proc. of the 16th Ann. Conf. on OO Prog. Sys., Lang., & Appl. (OOPSLA'01), pages 96--107, Tampa Bay, Florida, Oct. 14-18 2001. ACM Press, ACM SIGPLAN Notices 36(11). Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Whiteoak: introducing structural typing into java

    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
    • Published in

      cover image ACM Conferences
      OOPSLA '08: Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications
      October 2008
      654 pages
      ISBN:9781605582153
      DOI:10.1145/1449764
      • cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 43, Issue 10
        September 2008
        613 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/1449955
        Issue’s Table of Contents

      Copyright © 2008 ACM

      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: 19 October 2008

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate268of1,244submissions,22%

      Upcoming Conference

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader