Algebraic Component Composition in the UML

This web page will provide information about the master's thesis, and overview of the software prototype together with an an installation guide.

About the project

A software component is a reusable, high-level software entity with provided and required interfaces. Software components can be composed together in order to build software systems. When modeling component-based software, the traditional way is to manually attach their provided and required interfaces. This way of modeling is supported by the Unified Modeling Language, which is an OMG standard for object-oriented modeling.

As an alternative to this traditional approach, algebraic component composition is an approach that emphasizes the definition of atomic components and their compositions in an algebraic manner. The compositions are done via algebraic expressions. The result of an algebraic expression is a new composite component which is automatically derived from the components used in the expression. Component-based modeling in the algebraic manner is not supported by the standard UML.

The result of this master's thesis is a prototype which creates UML models of components and algebraic component compositions. The prototype accepts a textual specification of the model which it type-checks and translates to the corresponding UML model. A UML profile is used to extend the UML metamodel to support algebraic component composition.

 

The software prototype

The prototype is built on the rCOS modeler project (http://rcos.iist.unu.edu/) and created as an Eclipse plugin.

 

Installation guide

Update 3/6/2014: Uploaded a new version of the no.ifi.uio.algebraic.jar plugin which has slightly better error reporting during type-checking. This version can be found here /ifi/english/research/groups/pma/completedmasters/2014/bielecki/plugins/no.uio.ifi.rcos.algebraic_1.0.0.201406031426.jar

1. Getting Eclipse

Download the Eclipse (Indigo version) IDE with Eclipse Modeling Tools from this page http://www.eclipse.org/downloads/packages/eclipse-modeling-tools/indigosr2.

2. Installing TOPCASED

Download the topcased.xml file /ifi/english/research/groups/pma/completedmasters/2014/bielecki/files/topcased.xml. Open Eclipse, and click Help-> Install new software. In the window which will appear, click "Available software sites", and click Import. In the file selector, navigate to the topcased.xml file you downloaded and click OK. You are now done in the "Available software sites" window and can click OK here as well.  Note: you might have to close the Install new software window and open it again for the changes to take effect.

Back in the Install new software window, choose TOPCASED 5.3 from the dropdown menu in the Work with selection. Expand TOPCASED Toolkit Features and check the Topcased UML2 Editors. Important: Remember to check the "Contact all update sites..." option. It should look like the screenshot below. Click Next and complete the installation. Click OK when Eclipse asks you to install unsigned content.

 

3. Getting the prototype plugin and its dependencies

Download the required plugins http://www.mn.uio.no/ifi/english/research/groups/pma/completedmasters/2014/bielecki/plugins/prototype_plugins.zip. Unzip the file and put every plugin in the dropins folder in the Eclipse directory.

4. Start/restart Eclipse

Eclipse needs to be restarted in order for the plugins to work. When this is done the prototype should be ready.

How to use the prototype

Creating a new project

1. To create a new (plain) project in Eclipse, click File -> new Project. In the project wizard which will then pop up, choose the Project under the General category. Enter a project name and click Finish. The new project will be shown in the Package Explorer view (normally to the left).

2. The next step is to create a file which can be edited. Right click the newly created project, choose New -> File. Give the file a name, and remember to add the file ending which is .rcosp

3. Edit this file with a component specification.

4. When you want to run the tool on the component specification, right-click the file. This will bring up a menu. At the bottom of this menu there should be a rcos menu entry. Choose this entry and click Open as rCOS UML model. This will run the tool on the file. If there are no errors, a .uml file should be created with the same name as the file. Errors will be reported to the Error Log view.

5. This .uml file can be opened and validated. Open the file and expand the first entry in the list which appears called platform:/resource/<ProjectName>/<FileName.uml>.  To validate a model object, right-click  it, choose the rCOS menu entry and click Validate rCOS UML model. Errors will be reported in the Problems view, if there are any.

Trying out the airport example

The airport example found in the master's thesis can be downloaded from here: http://www.mn.uio.no/ifi/english/research/groups/pma/completedmasters/2014/bielecki/examples/airportexample.zip. This is a .zip file which can be imported into Eclipse by clicking File -> import -> Existing Projects into Workspace. Choose Select archive file and click browse. Select the downloaded airportexample.zip. Click Finish. Follow steps 4-5 above to run the tool in this example.

Drawing UML diagrams using TOPCASED

We can use TOPCASED to draw UML diagrams of the generated .uml file. To do this, right-click the .uml file and choose new -> Other. Select UML Model with TOPCASED wizard. You can search for this wizard by typing "uml" in the search box. Click next. Select Create from an existing Model, navigate to the componentModel and select it. Choose the Component Diagram as root diagram. See picture below. Click Finish.

A .umldi file will be created and opened. If this file is marked as read-only by Eclipse, right click it inside the editor and click Enable write. You might have to close the .uml file first. From the outline view you should now be able to drag-and-drop the components into the UML diagram.

The picture below shows how it could look like when drawing a model.

 

Note: If you encounter any problems, please report this to martinhb at ifi dot uio dot no

By Martin Harbu Bielecki
Published Apr. 29, 2014 4:46 PM - Last modified Apr. 13, 2018 10:32 AM