What is UML2FOC?

UML2FOC is a transformation tool that helps developpers to generate formal FoCaLiZe specifications from UML models with OCL constraints.


The following componenets are required for the setup of UML2FOC:

The setup process follows the next steps:

Step1:Install Papyrus

Papyrus is an open source project to provide an integrated environment for editing UML and SysML models. It also offers support for OCL constraints. For the setup of the Eclipse environment and the Papyrus plugin, the reader should refers to the Manual Installation of Papyrus.

Step2:Install FoCaLiZe

Dowload the latest release of the FoCaLiZe environment (focalize-0.9.1.tgz.), then follow the installation guide provided with the package (INSTALL.text). Note that the FoCaLiZe compiler requires the following external tools: OCaml, Coq and Zenon.

Step3:Install the application

First, add the plugin org.eclipse.papyrus.umlTofocalize_1.0.0.201702052243.jar to the path "eclipse/plugins". Then, add the following xslt stylesheets: TrieUMLOrginal.xsl and UmlToFocalize.xsl to the path "eclipse/". Finally, restart the eclipse environment to get everything installed.

How to use the transformation tool

First, Launch the Eclipse environment and select the Papyrus button to create a UML/OCL model:

Photo de mon gite

Then, Press the FoCaLiZe button, then right click on "modelname.uml" and select the command "UmlToFoCaLiZe":

Photo de mon gite Photo de mon gite

After the derivation of FoCaLiZe code, press F5 or refresh, then right click on the file "modelname.fcl", then choose the command "ExecuteFoCaLiZe" to invoke the FoCaLiZe compiler. The result of the compilation is presented at the console:

Photo de mon gite

A tutorial video is available through the link TUTORIA