Description

The Koala compiler toolkit forms a generic framework for component composition. The framework works as follows:

  1. Components and compositions are expressed in the Koala component definition language
  2. The tool 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.
  3. Composition type-specific tools then perform a specific composition of components. The combination of tools for a particular composition type is called the second-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-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

  1. Determining the build order of the components in the composition. This is performed by the tools 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.
  2. Obtaining and integrating source trees. This is achieved with the tool 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.
  3. Synthesizing a build and configuration process. This is achieved with the tool 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
   ./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

Revision: r1.4 - 22 Sep 2004 - 13:34 - MerijnDeJonge
Tools > KoalaTools > KoalaToolsCompiler
Copyright © 1999-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback