Changes for page Kieler Compiler

Last modified by Richard Kreissig on 2023/09/14 10:52

From version 9.1
edited by cmot
on 2014/03/16 22:39
Change comment: There is no comment for this version
To version 3.1
edited by cmot
on 2014/03/16 21:50
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -Kieler Compiler
1 +Kieler Compiler (KiCo)
Content
... ... @@ -26,14 +26,11 @@
26 26  1. Add the extension
27 27  
28 28  
29 -{{{de.cau.cs.kieler.kico.transformation}}}(((
30 -
31 -)))
32 -1. (((
33 -Add one of the following extension element
29 +{{{de.cau.cs.kieler.kico.transformation}}}
34 34  
31 +Add one of the following
32 +
35 35  [[image:attach:KiCo2.jpg]]
36 -)))
37 37  
38 38  |=(((
39 39  Extension Element
... ... @@ -71,106 +71,8 @@
71 71  * name: An optional String name for this transformation. If nothing is entered here the ID will be used as a name.
72 72  )))
73 73  
74 -=== Example ===
75 -
76 -{{code title="plugin.xml"}}
77 - <extension
78 - point="de.cau.cs.kieler.kico.transformation">
79 - <transformationGroup
80 - id="NORMALIZE"
81 - dependencies="TRIGGEREFFECT, SURFACEDEPTH"
82 - name="Transform All Normalize">
83 - </transformationGroup>
84 - </extension>
85 - <extension
86 - point="de.cau.cs.kieler.kico.transformation">
87 - <transformationMethod
88 - class="de.cau.cs.kieler.sccharts.extensions.SCChartsCoreTransformation"
89 - id="TRIGGEREFFECT"
90 - method="transformTriggerEffect"
91 - name="Transform Trigger and Effect">
92 - </transformationMethod>
93 - </extension>
94 -
95 - <extension
96 - point="de.cau.cs.kieler.kico.transformation">
97 - <transformationMethod
98 - class="de.cau.cs.kieler.sccharts.extensions.SCChartsCoreTransformation"
99 - id="SURFACEDEPTH"
100 - method="transformSurfaceDepth"
101 - name="Transform Surface Depth">
102 - </transformationMethod>
103 - </extension>
104 -
105 - <extension
106 - point="de.cau.cs.kieler.kico.transformation">
107 - <transformationGroup
108 - id="ALL"
109 - dependencies="CORE NORMALIZE"
110 - name="Transform All">
111 - </transformationGroup>
112 - </extension>
113 -{{/code}}
114 -
115 115  
116 116  
117 117  == Compilation ==
118 118  
119 -Once a bunch of model transformations are registered, these can simply be called using the KiCo central "KielerCompiler" class with its method compile(). This will be given a List<String> of transformation IDs or a comma separated String of transformation IDs as the first parameter. The second parameter is the EObject that is being transformed. It should meet the signature of the first model transformation called. Note that the actual model transformations that are done may vary because KiCo will automatically inspect the dependencies of each transformation requested (deep-recursively). If you do not like this to happen as an advanced user you can use a third parameter that will skip this autocompletion. Note that if you switch this off also NO transformation groups can be processed. Here is an overview and examples how to use the compile() method:
120 -
121 -|=(((
122 -Method
123 -)))|=(((
124 -Description
125 -)))
126 -|(((
127 -\\
128 -
129 -{{{EObject KielerCompiler.compile(List&#x3c;String&#x3e; transformationIDs, EObject eObject)}}}
130 -)))|(((
131 -* transformationIDs: List of Strings representing the transformation IDs and a pre-ordering. Note that KiCo may automatically modify the order to meet the dependencies of the referenced transformation IDs or transformation group IDs.
132 -* eObject: The EObject that is the input to the compilation process.
133 -* Returns: The EObject returned from the last model transformation called by KiCo.
134 -)))
135 -|(((
136 -\\
137 -
138 -{{{EObject KielerCompiler.compile(String transformationIDs, EObject eObject)}}}
139 -)))|(((
140 -This is a convenient method only which can be used to give transformation IDs or transformation group IDs as a comma separated String. For eObject and the return value see above.
141 -)))
142 -|(((
143 -
144 -\\
145 -
146 -{{{EObject KielerCompiler.compile(List&#x3c;String&#x3e; transformationIDs, EObject eObject, boolean autoexpand)}}}
147 -)))|(((
148 -This is an advanced compile method which can turn of auto-expansion with the last parameter. Use this with care! Note that if switching autoexpand off you cannot use transformation group IDs any more. Also no dependencies will be considered. The transformations will be applied straight forward in the order defined by the transformationIDs list.
149 -)))
150 -
151 -=== Examples ===
152 -
153 -{{code title="Java Code"}}
154 -import de.cau.cs.kieler.kico.KielerCompiler;
155 -...
156 -private MyEObjectClass myMethod(EObject eObject) {
157 - ...
158 - transformed = (MyEObjectClass) KielerCompiler.compile("ABORT, SIGNAL", eObject);
159 - ...
160 - return transformed
161 -}
162 -{{/code}}
163 -
164 -{{code title="Xtend Code"}}
165 -import de.cau.cs.kieler.kico.KielerCompiler
166 -...
167 -def dispatch MyEObjectClass myMethod(EObject eObject) {
168 - transformed = KielerCompiler.compile("ABORT, SIGNAL", eObject) as MyEObjectClass
169 - ...
170 - transformed
171 -}
172 -
173 -
174 -
175 -
176 -{{/code}}
75 +text
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -9470071
1 +9470061
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9470071/Kieler Compiler
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9470061/Kieler Compiler (KiCo)