and its Applications


SPin is a prototype implementation of our Architecture Stratification concept. It is available as a plugin for the CASE-Tool Fujaba and can be installed from within Fujaba:

  1. Install Fujaba (a preconfigured beta of 4.3.2 bundled with a few plugins can be downloaded here).
  2. Start Fujaba (either use the batch, shellscript or Fujaba.jar)
  3. Open 'Options' -> 'Preferences...'.
  4. Select the tab labeled 'Plug-Ins', Click on 'Retrieve List'.
  5. If not already present, add the following URL under 'Plug-in Download URLs':
  6. Close the Preferences dialog and open 'Help' -> 'Manage Plug-ins'
  7. Unfold 'Stratification and Reverse Engineering', unfold 'SP', click on the most recent release and press the 'Download/Install update' button in the lower right corner.
  8. Close the dialog and restart Fujaba. You're now able to use the plugin.

Transformation Rules

Fujaba supports Story Driven Modelling (SDM), which can be used for model transformation. SPin's Transformation Rules are defined using SDM diagrams. A few transformation rules are bundled with the SPin plugin, one of them is "Singleton":

The Fujaba project 'Singleton.fpr.gz' containing the rule can be found in the 'rules' directory (within 'Fujaba 4.3/plugins/spin'). Open it using 'Open Project' and open the apply SDM diagram found under 'Activity Diagrams' -> 'RRSingleton'.

The bundled rules have already been added to the transformation rule library. New or updated rules are automatically exported to this location, if the 'export rule(s)' context menu is used. The project also contains an example diagram where the transformation rule can be applied. Open 'Class diagrams' -> 'Example' from the left side browser.

SPin extends the built in UML metamodel of Fujaba with annotation elements, which are similar to UML collaborations. Here the class 'MySingletonClass' has been annotated with 'Singleton'. Additional annotation parameters can be specified using the Annotation Editor which can be openend from the context menu.

To execute the transformation, choose 'Refine annotation' from the annotation context menu. The resulting class diagram should look like this.

As can be seen, a private constructor and a 'get'-method has been added automatically in order to implement the singleton design pattern.

Additional information on transformation rules can be found in our publications. If you have further questions, simply contact us.