Model2text transformation from an Aemilia model (generated by means of a text2Model transformation from an .aem file, using the Gra2MoL language) to the initial .aem textual specification.
- Eclipse Neon J2EE (it already has several plugins required to run)
- OCL Plugin (from updateSite)
- Acceleo Plugin (from marketplace)
- Aemilia2Text_MetaInf
- /model: it contains the metamodel on which the transformation works (mmAemilia.ecore)
- org.eclipse.acceleo.module.aemiliaMod2text
- /case-studies: it contains files of the examples on which work has been done
- /m2t: it contains Aemilia models generated from TwoEagles tool
- /t2m: this folder should contain output files generated by the Model2text transformation (they are currently located in /output)
-
Initialization by Expression:
EX (from Aemilia syntax for declaration of architectural interactions, it's suitable for each part with the same syntax):
<architectural_interaction_decl> ::= <identifier> ["[" <expr> "]"] "." <identifier> | "FOR_ALL" <identifier> "IN" <expr> ".." <expr> <identifier> "[" <expr> "]" "." <identifier>
Selection using ["[" <expr> "]"]
is not included in the transformation, so any future model that will use it won't be correctly translated;
- Missed use of the Aemilia's syntax FORALL construct. It will be replaced by single statements;
- Missed management of the Aemilia's Behavioral Variations section. This because we don't have enough informations in the metamodel.
-.rew file generation. Note that at this moment this type of transformation works but it generates every possible combination in the calculation of indices (throughput and utilization). This is due to some information today still missing in the metamodel (mmAemilia.ecore).
Please refer to Issues section in the repository
-
For some .aem input files the name of the ARCHI-TYPE is the same. This leads to the overwrite of the output generated by another file (just because they are called in the same way) so, in order to avoid this situation, it would be good practice to manually change the name of the generated output files, assigning them a unique name.
-
Some .aem example files contain some problems. For some of them, the model is not generated by using text2Mod transformation, for others there are errors on the Aemilia syntax. The following table shows informations about the generation of the model and / or any syntax errors for each .aem file. Therefore, in order to perform the transformation, it would be preferred to choose the .aem files that have "YES" in both columns.
.aem Filename Model Parsing ABP_VP_Type.aem NO NO aemiliaBSx.aem NO YES CheckIn Model.aem NO YES FTA_system.aem NO YES ABP_Type.aem YES NO BoA.aem YES YES eds_RAMP_refactoring.aem YES YES eds.aem YES YES EmergencyHandling.aem YES YES FTA.aem YES YES FTA3.aem YES YES SituationMonitoring.aem YES YES
First option (manually) In order to run the transformation, please follow these steps:
- Load the Aemilia2Text_MetaInf project into the workspace of the specific version of Eclipse;
- Register the mmAEmilia.ecore metamodel in the model folder and regenerate the metamodel code;
- Run the Aemilia2Text_MetaInf project as a new Eclipse instance and load the Acceleo project org.eclipse.acceleo.module.aemiliaMod2text;
- Run the main class generate.mtl (for .aem transformation) as Acceleo Application in the src / main folder, setting the required parameters.
- Run the main class generaterew.mtl (for .rew transformation) as Acceleo Application in the src / main folder, setting the required parameters.
Second option (by using java code)
- Going inside the Eclipse runtime instance (folder org.eclipse.acceleo.module.aemiliaMod2text);
- Going into src/org/eclipse/acceleo/module/aemiliaMod2text/main path;
- Running the Generate_Transformation.java (for .aem transformation) file. In order to do this step you must pass an argument by command line. This argument (aem or rew) corresponds to the transformation you want;