Brew Logo The Brew Project

Object-oriented languages provide abstraction mechanisms that help with structuring large software. Many commercial programs, such as desktop applications or games, are produced in an OO style, either in an OO language or by hand-coding OO techniques in a language such as C. However, as our analysis of OO design patterns shows, the abstraction mechanisms provided by the most widely used OO languages C++ and Java are still not sufficient. An OO programming style is the appropriate language mechanism for structuring data and if the software is expected to evolve by refining data representations. However, OO languages do not provide adequate support for introducing new abstractions retroactively or if the software evolves by adding functionality to a stable data structure. Many OO design patterns can be considered work-arounds for applying an OO style to problems that are more adequately solved in a different, e.g., a functional, programming style.

We have designed an extension of C++ with interfaces (then called signatures) and structural subtyping, which allow adding abstractions retroactively, and an extension of Java with structural subtyping. Our C++ extension has been part of the GCC distribution until Version 2.95. We implemented structural subtyping for Java as an extension of the Sun JDK 1.1.5 compiler. Currently, we are working on designing the language Brew as an extension of Java with an object model based on our analysis of design patterns and on implementing a compiler for the language in Brew. Until Brew and the Brew compiler are sufficiently far developed, we are framing our research results in the context of Java. For evolving software by adding functionality to a stable data structure, it would be desirable to have support for multimethods in the language. We developed an extension of Java with retroactive abstraction and multimethods, called Half & Half, and are currently working on implementing it. We have shown that multimethods together with a closure mechanism allow programming in a functional style similar to that in ML.

When developing OO software, it is necessary to ensure that the methods on an object are called in the correct order. We have designed language support for specifying the object protocols in class and interface declarations in Java. This language support allows the compiler to verify that the class protocol satisfies the interface protocol and to generate debugging code for monitoring the order of method calls at run time. We are implementing support for protocols as an extension of the Sun JDK compiler. We are also working on language support for mobility. Mobile object libraries for Java, such as the Aglets library do not allow migrating the execution state of methods executing in an agent. We have developed a translation mechanism and mobile threads that allow a multithreaded agent to migrate with all of its execution state. We implemented the translator as a preprocessor in the Brew compiler. We are using these multithreaded agents for scheduling scientific applications on a desktop grid, see the Organic Grid web page.

We are currently working on implementing protocols and our extension of Java with multimethods in the OpenJDK compiler to serve as a platform for future language design research.

Collaborators

Former Students

Software

Publications

2002

2001

2000

1998

1997

1996

1995

1994

Funding