Lightweight and Generative Components 2: Binary-Level Components

Most software component technologies fail to account for lightweight components (those for which a function call is too inefficient or semantically inappropriate) or generative components (those in which the component embodies a method of constructing code rather than actual code). Macro-based systems such as the C++ Standard Template Library are exceptions. They, however, have the disadvantage that components must be delivered largely in source form. In this paper, we present a component technology in which lightweight and generative components can be delivered in binary form. The technology is conceptually simple and is easily implemented with existing programming languages. Our basic idea was explained in part I of this paper: By giving a compositional semantics for a source language in a domain of meanings Code, components can be written in the form of macros, but communicated in terms of meanings. In the companion paper, we showed how higher-order values over Code can be used to write lightweight, generative components. There, we took Code to be string, so our components amounted to higher-order macros. In this paper, we define Code more abstractly, allowing components to be delivered in a form that does not resemble syntax, yet allows for them to be loaded dynamically and execute efficiently.

[1]  Dawson R. Engler,et al.  Incorporating Application Semantics and Control into Compilation , 1997, DSL.

[2]  Samuel N. Kamin,et al.  Annotating Java class files with virtual registers for performance , 2000 .

[3]  Alan Bawden,et al.  Quasiquotation in Lisp , 1999, PEPM.

[4]  Flemming Nielson,et al.  Automatic binding time analysis for a typed λ-calculus , 1988, POPL '88.

[5]  Yannis Smaragdakis,et al.  JTS: tools for implementing domain-specific languages , 1998, Proceedings. Fifth International Conference on Software Reuse (Cat. No.98TB100203).

[6]  Flemming Nielson,et al.  Automatic Binding Time Analysis for a Typed lambda-Calculus , 1988, Sci. Comput. Program..

[7]  Alexandru Nicolau,et al.  Annotating the Java bytecodes in support of optimization , 1997 .

[8]  Walid Taha,et al.  Multi-stage programming with explicit annotations , 1997, PEPM.

[9]  Samuel N. Kamin,et al.  Annotating Java class files with virtual registers for performance , 2000, Concurr. Pract. Exp..

[10]  Todd L. Veldhuizen,et al.  Using C++ template metaprograms , 1996 .

[11]  Charles Simonyi,et al.  The Death of Computer Languages, The Birth of Intentional Programming , 1995 .

[12]  Krzysztof Czarnecki,et al.  Synthesizing objects , 1999, Concurr. Pract. Exp..

[13]  David R. Musser,et al.  STL tutorial and reference guide - C++ programming with the standard template library , 1996, Addison-Wesley professional computing series.

[14]  Don S. Batory,et al.  Software components in a data structure precompiler , 1992, Proceedings of 1993 15th International Conference on Software Engineering.

[15]  Gregor Kiczales,et al.  Aspect-oriented programming , 2001, ESEC/FSE-9.

[16]  Walid Taha,et al.  Multi-stage programming with explicit annotations , 1997 .

[17]  Jonathan Rees,et al.  Macros that work , 1991, POPL '91.

[18]  Samuel N. Kamin,et al.  Lightweight and Generative Components I: Source-Level Components , 1999, GCSE.

[19]  Dawson R. Engler,et al.  C: a language for high-level, efficient, and machine-independent dynamic code generation , 1995, POPL '96.