MOFScript M2T PSM to Java

The goal fo the MOFScript Model to Text transformation is the generation of Java source code compatible to the abstract architecture implementation from the information layer models (PIM).
To carry out this task, the PIM is marked using the Deployment model to create the PSM which is turned into Java source code after performing the MOFScript transformation.

Tu run the Model to Text transformation you have to:

  1. Install the MOFScript plugin (Update site: http://depot.universaal.org/eclipse-update/). Then go to AAL Studio Prerequisites and select MOFScript
  2. Create a Java project (File-> New -> Java Project)
  3. Create a directory, name it «models», and copy source models (space reference, information flow, entity context and deployment). Note that you can use the light intensity, healthy screen and sharedblack board scenario models as samples
  4. Create a directory, name it «transformations»
  5. Uncompress the «InformationLayerToCode.zip» file, and copy the «InformationLayerToCode.m2t» MOFScript transformation file to «transformations» directory
  6. Create a directory, name it «lib»
  7. Uncompress the cauce-architecture.zip file, and copy the «cauce-architecture.jar» file into the «lib» directory
  8. Add the «cauce-architecture.jar» file to the project classpath
  9. Verify the project structure (check Figure 80)
  10. Go to Window -> Preferences and then MOFScript Preferences and configure the model and transformation paths accordingly (i.e. Figure 81)
  11. Open the transformation file and go to the execute transformation icon on the toolbar (see Figure 82)
  12. Select input models in the following order: deployment, referential space, information flow models and entity context models
  13. Copy the results generated in the c:/temp/ directory to the project «src» directory

Resources

MOFScript file structure
Figure 80: MOFScript file structure
MOFScript preferences
Figuew 81: MOFScript preferences
MOFScript toolbar
Figure 82: MOFScript toolbar

Configuration and execution of the MOFScript M2T PSM to Java source code compatible to the Abstract Architecture for developing CAAs for UCEs.

.

You can reference this work as:
Ricardo Tesoriero, José A. Gallud, María D. Lozano and Víctor M. R. Penichet. CAUCE: Model-driven Development of Context-aware Applications for Ubiquitous Computing Environments
Journal of Universal Computer Science,  Vol. 16,  No. 15, pp. 2111-2138. 2010. Link: http://www.jucs.org/jucs_16_15/cauce_model_driven_development