Programming-language research has introduced a considerable number of advanced dispatching mechanisms such as multiple and predicate dispatching or pointcut-advice. In all these mechanisms function calls are late-bound to meaning; which meaning is ultimately executed upon a call is determined at runtime. Since alternative meanings can be added to a function without modifying the call sites themselves, the modularity of code increases.
All advanced dispatching mechanisms share numerous concepts, therefore, the Advanced-dispatching Language-Implementation Architecture (ALIA) aims to provide means for letting them also share their implementation. This architecture consists of a language-independent meta-model of advanced dispatching concepts, together with execution environments which process conforming models and allow to alter them at runtime. In contrast to the prevalent implementation technique which reduces the dispatch logic to imperative code in an existing programming language, ALIA's meta-model allows the dispatching concepts to be represented declaratively. At the same time, their semantics and even optimization strategies can be implemented modularly. In particular, being available at compile-time as well as at runtime, a declarative representation of dispatch logic drives highly efficient optimizations as past research has already shown for object-oriented languages. In our architecture, even dynamic optimizations can be implemented in a modular way.
We have realized this architecture for advanced-dispatching languages which extend Java in the Advanced-dispatching Language-Implementation Architecture for Java (ALIA4J) project; a coarse overview of its architecture is presented in the figure below. Part of ALIA4J are several execution environments with different characteristics. We factored out their common components and work flows, with respect to processing advanced dispatch declarations, into the Framework for Implementing Advanced-dispatching Languages (FIAL). The implementation of the meta-model is called Language-Independent Advanced-dispatching Meta-model (LIAM), each of them is a sub-project of ALIA4J. FIAL and LIAM together form our execution model of advanced dispatching mechanisms. LIAM acts as (intermediate) representation of dispatch definitions, while FIAL determines the execution semantics of such representations.
Other ALIA4J sub-projects are concerned with implementing languages on top of our execution model, or implementing execution environments as instantiations of FIAL. So far, we provide an automatic mapping for AspectJ and ConSpec. The sub-projects NOIRIn, SiRIn, and SteamloomALIA implement execution environments. NOIRIn and SiRIn are implemented as a plug-in to standard Java Virtual Machines, while SteamloomALIA is implemented by extending the Jikes Research Virtual Machine; it is therefore platform dependent, but allows to research sophisticated, dynamic optimizations which go beyond the generation of optimal Java bytecode.