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.
- R. M. Amadio and L. Cardelli. Subtyping recursive types. ACM Trans. on Prog. Lang. Syst., 15(4):575--631, 1993. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- M. P. Atkinson and O. P. Buneman. Types and persistence in database programming languages. ACM Comput. Surv., 19(2):105--170, 1987. Google Scholar
Digital Library
- M. P. Atkinson and R. Welland. Fully Integrated Data Env.: Persistent Prog. Lang., Object Stores, and Prog. Env. Springer, Secaucus, NJ, USA, 2000. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- G. Baumgartner and V. F. Russo. Implementing signatures for C++. ACM Trans. on Prog. Lang. Syst., 19(1):153--187, Jan. 1997. Google Scholar
Digital Library
- G. Bracha. The Programming Language Jigsaw: Mixins, Modularity and Multiple Inheritance. PhD thesis, Dept. of Comp. Sci., University of Utah, 1992. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- B. Eckel. Thinking in C++. Prentice-Hall, Upper Saddle River, NJ, USA, 1995. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- J. Gosling, B. Joy, G. L. J. Steele, and G. Bracha. The Java Language Specification. Addison-Wesley, Reading, Massachusetts, 3rd edition, June 2005. Google Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- K. Läufer, G. Baumgartner, and V. F. Russo. Safe structural conformance for Java. The Computer Journal, 43(6):469--481, 2001.Google Scholar
Cross Ref
- T. Lindholm and F. Yellin. The Java Virtual Machine Specification. Addison-Wesley, Reading, Massachusetts, 2nd edition, 1999. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- G. W. Neufeld and S. T. Vuong. An overview of ASN.1. Comp. Networks and ISDN Sys., 23(5):393--415, Feb. 1992. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
Whiteoak: introducing structural typing into java
Recommendations
Whiteoak: introducing structural typing into java
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 ...
Implementing a Language with Flow-Sensitive and Structural Typing on the JVM
Dynamically typed languages are flexible and impose few burdens on the programmer. In contrast, static typing leads to software that is more efficient and has fewer errors. However, static type systems traditionally require every variable to have one ...
Combining structural subtyping and external dispatch
OOPSLA '07: Companion to the 22nd ACM SIGPLAN conference on Object-oriented programming systems and applications companionBy-name subtyping (or user-defined subtyping) and structural subtyping each have their own strengths and weaknesses. By-name subtyping allows programmers to explicitly express design intent, and, when types are associated with run time tags, enables run-...







Comments