Valid XHTML 1.0 Strict CSS Valide !

Introduction of genericity in component models:
a SCA based prototype

Presentation

The idea of introducing genericity in component models has been developped in an INRIA research report: Increasing Reuse in Component Models through Genericity. In this context, genericity means that components accept compile time parameters, either types or data values, similarly to C++ templates for example.

The prototype presented here extends SCA with genericity. It is based on a model driven engineering approach used to transform generic SCA components into semantically equivalent plain SCA components.

An example of application writen using generic SCA is also presented. It is based on a generic component implementing the task farm skeleton and computes pictures of the mandelbrot set.

A step by step guide to compile and run this application in the eclipse IDE is described at the end of the page.

A generic SCA to plain SCA compiler

Meta-models

The transformation from generic SCA to plain SCA is based on a Model-Driven approach.

The SCA meta-model from the eclipse SCA tools project has been reused. This meta-model is written in the ecore language and is available for download from the project public subversion server.

The generic SCA meta-model has been created by extending the previous model.

Transformation

The transformation from generic SCA to plain SCA is described in the research report. It has been implemented in java and operates on the java classes generated using the plain SCA and generic SCA ecore meta-models. The compiler is thus available as a jar package. It relies on the eclipse platform with the ecore plugin.

Computing pictures of the mandelbrot set with generic SCA

The generic SCA based implementation of a mandlebrot set pictures computer has been developed in two parts. First a generic component implements a reusable task farm skeleton. Then components using this task farm are used to compute pictures of the mandlebrot set in parallel. The tuscany implementation of SCA has been used to support these components.

The sources of this application can be browsed online or dowloaded as a tarball. The result of its compilation using the previously described transformation tools can also be browsed online or downloaded as a tarball. This application requires the tuscany libraries to be installed in order to be executed.

Step by step guide to compile and run this application in the eclipse IDE

  1. Install the eclipse IDE from http://www.eclipse.org/downloads/
  2. Install the EMF ecore plugin.
    1. Go to the "help" > "Software Updates" menu then to the "Available Software" tab.
    2. Add the site "http://download.eclipse.org/modeling/emf/updates/releases/".
    3. In the list on the left, check "EMF Update Site" > "EMF SDK 2.4.2 (EMF + SDO + XSD)" > "Eclipse Modeling Framework (EMF) All-In-One SDK" and Install it.
  3. Install the SVN plugin.
    1. Go to the "help" > "Software Updates" menu then to the "Available Software" tab.
    2. Add the site "http://subclipse.tigris.org/update_1.6.x".
    3. In the list on the left, check "http://subclipse.tigris.org/update_1.6.x" > "Subclipse" and Install it.
  4. Import the eclipse SCA tools project.
    1. Go to the "File" > "Import ..." menu and choose "SVN" > "Checkout Projects from SVN".
    2. Create a new repository location: svn://dev.eclipse.org/svnroot/stp/org.eclipse.stp.sca-tools .
    3. Select the directory "org.eclipse.stp.sca" > "trunk" > "org.eclipse.stp.sca" and check it out as a project.
  5. Import the genericSca project.
    1. Download the archive of the project.
    2. Go to the "File" > "Import ..." menu and choose "General" > "Existing Project into workspace".
    3. Choose the archive file you just downloaded and import it.
  6. Compile the genericSca application into plain SCA.
    • In the genericSca project, right click on "genericSCA Compile.launch" and choose "Run As" > "genericSCA Compile".
  7. Run the mandelbrot picture computer.
    • In the genericSca project, right click on "Launcher.launch" and choose "Run As" > "Launcher".