Koala STC
XT -- A Bundle of Program Transformation Tools
The tool koala-stc translates a Koala composition to a composite source tree. This process is called
Source Tree Composition.
The basic idea is that for
koala-stc
Koala modules do not correspond to C source files but to source distributions (e.g., gzipped tar files).
A composition consists of a source tree containing all unpacked source distributions, together with an integrated configuration and build process.
This composite source tree can be handled as a unit, such that building and configuring can be done for the source tree as a whole, rather than for each subcomponent individually.
More on this topic can be found here:
The
koala-stc
tool takes as input a Koala composition and produces as output a source tree in which all modules are unpacked, and an GNU build environment
that includes a set of Automake Makefiles and an Autoconf configuration script. The generated files will be stored in the directory specified with the '-d' command line switch (defaults to current working directory).
koala-stc -I <directory with Koala components> \
-i <top-level component> \
-d <output-dir>
The resulting source tree can now be compiled in the following steps:
cd <output-dir>
autoreconf -if
configure --prefix <installation prefix> -C
make install
The tool
koala-stc
makes an assumption about variability interfaces. An interface definition is assumed to be a variability interfaces iff the interface definition does
not contain function prototypes. Thus, an interface definition is a variability interface if it consists solely of parameters, constants, or defined functions.
Parameters of variability interfaces that are not bound (and become constants) during the normalization process, become paramters of the composite bundle. This means that they propagate to top-level Autoconf configuration switches. These parameters can then be bound at configuration time. E.g., a parameter
debug
can be bound s follows:
configure --with-debug=<some value>
The directory
demos/stc
in the source distribution of
KoalaCompiler (see
HowToObtainKoalaCompiler) contains examples of
koala-stc
--
MerijnDeJonge - 22 Dec 2004