The aim of todays software development is to build applications
by reuse of binary components ([Szy97]). In this paper we
present an approach to support dynamic composition of binary
Consider a framework for a mail user agent with a text-reader, a
sound-player and a video-player as pre-compiled (binary)
components to be added dynamically, i.e., at run-time. Note,
that the framework component, i.e. the mail user agent, should
not need to know in advance which kinds of mails it has to
handle, so it leaves some aspects open. But nevertheless, we
want it in compiled form, because the user should not need to
recompile the mail user agent only because he receives an
unknown kind of mail. The current solution of MIME-types is not
satisfying, because the functionality of the required components
(plug-ins) for handling the different MIME-types is not properly
integrated into the mail user agent.
The example contains two kinds of dynamic composition:
A component is inserted into a new environment that does not
support all services the component requires. Thus the
component should adapt its offered functionality according to
... mehrwhat it can deliver in this environment. - A
Videomail-component has to adapt to environments with different
The functionality of plug-ins is inserted into the functionality
of a component. This is necessary, if after adaption by
plug-in-components a component has to notify another component
(e.g., a user interface) about the enhanced functionality. -
The GUI of the mail user agent enhances its functionality, for
example by video controls.
We focus on the following problems arising in the example:
(a) Currently important portions of frameworks have to be
delivered as source code, since they leave many aspects open for
the sake of flexibility and thus cannot yet be compiled into a
binary form. Framework developers however, would prefer to hide
their sources and deliver the framework as a binary component,
instead. The user of a framework then ``only'' has to plug in
his own binary components. To do this comfortably, i.e. so that
he can watch how system behavior changes by the plugged-in
components, system composition should be possible dynamically.
(b) Components often have to be adapted or enhanced before being
ready for reuse. We focus on the problem that when binary
components are coupled dynamically these adaptions and
enhancements have to be done automatically. Support for this
automatic dynamic coupling is still very weak. Especially errors
due to coupling non-fitting components are not detected as early
as possible, that is during coupling-time. This is because
component interfaces do not specify how to use the component.
We present an approach to the binary precompilation problem (a)
and the automatic coupling problem (b). As a basis we describe
a meta-level protocol of an underlying component model.
(a) To solve the precompilation problem of frameworks, we
present a technical approach that applies meta-programming,
component and database technology. Genericity is resolved by
collecting type, i.e., applicability information in the database
and generating meta-programs for the instantiation.
(b) Our solution to the automatic coupling problem enhances the
component interface by applicability information. According to
Nierstrasz this is the type of a component [Nie93]. We define
the type of a component by two interfaces: the call-interface
describes the services of a component and their availability,
the uses-interfaces describes which services of other components
are required by the component. Beside other issues each
interface includes a specification of the admissible call
sequences (call-protocol) respectively use sequences
(use-protocol) by finite automata. The use protocol partially
depends on the call protocol.
When the use-protocol of component A matches the call-protocol
of component B, component A can use component B. In cases
of an inexact match, we calculate a new call-protocol of A in a
way that the new depending use-protocol of A matches exactly the
call-protocol of B. This handles dynamic component adaption.
The dynamic component enhancement translates in our approach to
insertion of automata, which precisely describes the enhanced
To conclude, in this paper we present a type-system for
components, which supports dynamic component composition and
enables pre-compiling of components.