Kieler Compiler (KiCo)
In order to integrate and be able to evaluate our compiler chain from SCCharts to C or VHDL code we use the KiCo project as a generic framework that allows to register setp-by-step transformations on EObjects. These can then be handled by the generic KIEM KiCo DataComponent.
General
The KIELER Compiler (KiCo) project allows to register step-by-step model transformations on EObjects that could be written in Xtend or Java. These transformations are registered using an extension point provided (see below). After registering transformations these can be used by simply call the KielerCompiler compilation method as also explained further below.
Extension Point
In order to add a transformation to KiCo you must follow these steps:
Add dependency to
de.cau.cs.kieler.kico
- Add the extension
de.cau.cs.kieler.kico.transformation
Add one of the following
Extension Element | Description |
---|---|
transformationClass | The defined class must extend "de.cau.cs.kieler.kico.Transformation" and must implement the methods defined in "de.cau.cs.kieler.kico.ITransformation". These are
|
transformationMethod | The defined class can be freely chosen and does not need to extend or implement any other class or interface. Although you have to give more information in the extension element now:
|
transformationGroup | Sometimes you may want to group other transformations and give this group a specific transformation ID as a kind of shortcut. You can do this by using the transformationGroup element giving the following information:
|
Example
<extension point="de.cau.cs.kieler.kico.transformation"> <transformationGroup id="NORMALIZE" dependencies="TRIGGEREFFECT, SURFACEDEPTH" name="Transform All Normalize"> </transformationGroup> </extension> <extension point="de.cau.cs.kieler.kico.transformation"> <transformationMethod class="de.cau.cs.kieler.sccharts.extensions.SCChartsCoreTransformation" id="TRIGGEREFFECT" method="transformTriggerEffect" name="Transform Trigger and Effect"> </transformationMethod> </extension> <extension point="de.cau.cs.kieler.kico.transformation"> <transformationMethod class="de.cau.cs.kieler.sccharts.extensions.SCChartsCoreTransformation" id="SURFACEDEPTH" method="transformSurfaceDepth" name="Transform Surface Depth"> </transformationMethod> </extension> <extension point="de.cau.cs.kieler.kico.transformation"> <transformationGroup id="ALL" dependencies="CORE NORMALIZE" name="Transform All"> </transformationGroup> </extension>
Compilation
text