Changes for page Kieler Compiler
Last modified by Richard Kreissig on 2023/09/14 10:52
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -113,4 +113,61 @@ 113 113 114 114 == Compilation == 115 115 116 -text 116 +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: 117 + 118 +|=((( 119 +Method 120 +)))|=((( 121 +Description 122 +))) 123 +|((( 124 +\\ 125 + 126 +{{{EObject KielerCompiler.compile(List<String> transformationIDs, EObject eObject)}}} 127 +)))|((( 128 +* 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. 129 +* eObject: The EObject that is the input to the compilation process. 130 +* Returns: The EObject returned from the last model transformation called by KiCo. 131 +))) 132 +|((( 133 +\\ 134 + 135 +{{{EObject KielerCompiler.compile(String transformationIDs, EObject eObject)}}} 136 +)))|((( 137 +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. 138 +))) 139 +|((( 140 + 141 +\\ 142 + 143 +{{{EObject KielerCompiler.compile(List<String> transformationIDs, EObject eObject, boolean autoexpand)}}} 144 +)))|((( 145 +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. 146 +))) 147 + 148 +=== Examples === 149 + 150 +{{code title="Java Code"}} 151 +import de.cau.cs.kieler.kico.KielerCompiler; 152 +... 153 +private MyEObjectClass myMethod(EObject eObject) { 154 + ... 155 + transformed = (MyEObjectClass) KielerCompiler.compile("ABORT, SIGNAL", eObject); 156 + ... 157 + return transformed 158 +} 159 +{{/code}} 160 + 161 +{{code title="Xtend Code"}} 162 +import de.cau.cs.kieler.kico.KielerCompiler 163 +... 164 +def dispatch MyEObjectClass myMethod(EObject eObject) { 165 + transformed = KielerCompiler.compile("ABORT, SIGNAL", eObject) as MyEObjectClass 166 + ... 167 + transformed 168 +} 169 + 170 + 171 + 172 + 173 +{{/code}}
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -947006 31 +9470066 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/947006 3/Kieler Compiler (KiCo)1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9470066/Kieler Compiler (KiCo)