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.
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.
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.
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.