The Koala compiler toolkit forms a generic framework for component composition. The framework works as follows:
koala-compiler
is used to synthesize an abstract composition. The combination of koala-pack
, implode-asfix
, koala-wire
, and koala-compiler
is called the first-phase composition.
First phase composition
Given the component koala-bundle
as showed in PackKoala, the first phase composition can be performed with the folllowing tool chain:
pack-koala -I ./koala-pb -i koala-tools-bundle \ | implode-asfix \ | koala-wire \ | koala-compiler
This produces an AbstractCompositionDefinition, describing the ingredients of the composition, its structure, as well as relations between modules and components in the composition.
Second phase composition
The second phase composition depends on the particular composition-type. Below we explain how Source Tree Composition can be performed as second phase composition.
Source Tree Composition consists of
koala-tred
and koala-build-order
. The first tool replaces transitive references (m1->C1->C2->m2) by direct references (m1->m2). The second tool reorders modules such that if a module is referenced, it occurs before the referencing module.
koala-tree-composer
. This tool produces a shell script that, when executed creates a directory hierarchy in which it unpacks the source trees of all components.
koala-build-composer
. This tool creates in the constructed directory hierarchy a top-level Autoconf configure
scripts as well as Automake Makefiles
.
The second phase composition therefore consists of the following tool invocations:
koala-tred \ | koala-buildorder \ | koala-tree-composer -o <prefix> > composer.sh sh ./composer.sh koala-tred \ | koala-buildorder \ | koala-build-composer -o <prefix>
The location where the source tree is produced is denoted with <prefix>
.
You can now compile the generated composition:
cd <prefix> sh ./bootstrap.sh ./configure make install
We started developing some other second phase composition tools, including a petri-net composer and a graph composer.
-- MerijnDeJonge - 17 Feb 2004