MoDisco Use Case - Generating Java Platform Ontologies

MoDisco Logo

Keywords

Java, UML, Platform, Ontology


Overview

This complete use case covers both the Model Discovery and Model Understanding phases. It is about reverse engineering the Java API from the class library JAR files using the Jar2UML discovery tool (part of the MoDisco tool box), generating OWL ontologies from the created UML models using ATL model transformations, and finally bundling these ontologies with the PlatformKit Eclipse plugin.

This use case is provided by the Vrije Universiteit Brussel (VUB) System and Software Engineering Lab and its development has been realized by Dennis Wagelaar.

The PlatformKit tool uses platform ontologies to reason about platform dependencies introduced by model-driven software artefacts, such as models and model transformations. These ontologies provide a base vocabulary that explains what a platform is. Ontologies that are specific to a particular platform, such as Java, can be defined on top of this general platform vocabulary.

The Java ontologies consist of one main Java ontology that describes the general domain of Java platforms and several Java API ontologies that describe what each particular Java standard provides to the software developer. While the general Java ontology is handwritten, just like the base platform ontologies, the Java API ontologies are generated from the class libraries that come with the various Java development kits.

First, the Java API is reverse engineered from the class library JAR files using the Jar2UML discovery tool. This results in a UML model that describes the class structure of the API.

Next, the generated UML models are transformed to OWL ontologies using the UML2ToPackageAPIOntology.atl model transformation and the IODT ontology framework. This transformation is superimposed on top of the UML2ToAPIOntology.atl model transformation, which contains all the OCL logic for calculating package dependencies. It also contains OCL logic to calculate compatibility relationships between the various Java APIs. Compatibility is only calculated up to a certain extent: compatibility and equivalence is calculated at package level, not at class/interface level. This results in sometimes unexpected incompatibilities between Java packages that one would expect to be backward compatible. The causes of these incompatibilities can be found in the ATL transformation build log of the model transformations that built the Java API ontologies.

Finally, the generated ontologies are bundled with the PlatformKit Eclipse plugin. Developers can express Java platform dependencies based on the concepts that are introduced by the Java platform ontologies.

Related Use Cases

Choose a use case

Instant Messenger
Case Study

This is a medium-sized case study involving the automatic generation of an instant messaging client, based on context information. This case study is based on the instant messaging scenario, developed within the CoDAMoS project. The instant messaging client supports several network protocols (e.g. Jabber, SMS) and several user interfaces (e.g. AWT, Swing).


Documentation

Choose a document

"Generating Java Platform Ontologies" Use Case - Description: General description of the use case, its objectives & principles, the obtained results, etc.

Download

Choose a download

The Generating Java Platform Ontologies use case is performed thanks to the PlatformKit plugin which is freely available and downloadable using the provided link.

General Information