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 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.

[1]  Luca Cardelli,et al.  Subtyping recursive types , 1991, POPL '91.

[2]  Joseph Gil,et al.  Space and time-efficient memory layout for multiple inheritance , 1999, OOPSLA '99.

[3]  Giuseppe Castagna,et al.  Parametric polymorphism for XML , 2005, POPL '05.

[4]  Peter Buneman,et al.  Types and persistence in database programming languages , 1987, CSUR.

[5]  Claude Kirchner,et al.  An overview of ELAN , 1998, WRLA.

[6]  Gerald Baumgartner,et al.  Safe Structural Conformance for Java , 2000, Comput. J..

[7]  Wolfgang Weck,et al.  Compound types for Java , 1998, OOPSLA '98.

[8]  Bo Nørregaard Jørgensen Integration of Independently Developed Components through Aliased Multi-Object Type Widening , 2004, J. Object Technol..

[9]  Davide Ancona,et al.  Jam - A Smooth Extension of Java with Mixins , 2000, ECOOP.

[10]  Martin Odersky The Scala experiment: can we provide better language support for component systems? , 2006, POPL '06.

[11]  Gilad Bracha,et al.  The programming language jigsaw: mixins, modularity and multiple inheritance , 1992 .

[12]  Gerald Baumgartner,et al.  Implementing signatures for C++ , 1994, TOPL.

[13]  Oscar Nierstrasz,et al.  Traits: Composable Units of Behaviour , 2002, ECOOP.

[14]  Joseph Gil,et al.  Efficient subtyping tests with PQ-encoding , 2001, OOPSLA '01.

[15]  Kim B. Bruce,et al.  LOOJ: Weaving LOOM into Java , 2004, ECOOP.

[16]  Craig Harris,et al.  Combining language and database advances in an object-oriented development environment , 1987, OOPSLA '87.

[17]  Son T. Vuong,et al.  An Overview of ASN.1 , 1992, Comput. Networks ISDN Syst..

[18]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[19]  Andrew P. Black,et al.  Removing duplication from java.io: a case study using traits , 2005, OOPSLA '05.

[20]  Joachim W. Schmidt,et al.  Some high-level language constructs for data of type relation , 1977, SIGMOD '77.

[21]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[22]  Douglas C. Schmidt,et al.  Ultra-large-scale systems , 2006, OOPSLA '06.

[23]  Jonathan Aldrich,et al.  Integrating Nominal and Structural Subtyping , 2008, ECOOP.

[24]  Martin Odersky,et al.  Making the future safe for the past: adding genericity to the Java programming language , 1998, OOPSLA '98.

[25]  Guy L. Steele,et al.  Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley)) , 2005 .

[26]  Frank Yellin,et al.  The Java Virtual Machine Specification , 1996 .