Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Papyrus/UserGuide/ModelExecution

< Papyrus
Revision as of 13:04, 24 June 2014 by Arnaud.cuccuru.cea.fr (Talk | contribs) (Starting an execution with a launch configuration)

Moka Overview

Moka is a Papyrus module for execution of UML models, which natively includes an execution engine complying with OMG standards foundational UML (fUML [1]) and Precise Semantics of UML Composite Structures (PSCS [link to OMG webpage available soon]). These standards deal with execution semantics of UML. Moka is integrated with the Eclipse debug framework to provide control, observation and animation facilities over executions. Moka can be easily extended to support alternative execution semantics, and thereby be adapted to multiple usage scenarios and domains. The key features of Moka are:

Based on standards

Moka provides basic execution and debugging facilities for fUML and its extension PSCS, which capture an executable subset of UML with precise and standard semantics. This subset is expressive enough to model structure and behavior of systems involving concurrent communicating entities, independently of technological platform details.

Interactive executions

Moka provides debug and animation facilities through a contribution and an extension to the Eclipse debug API. It is thereby possible to control execution of models(e.g., suspending/resuming executions after breakpoints have been encountered) as well as to observing states of executed models at runtime (e.g., emphasizing graphical views of model elements on which execution has suspended, retrieving and displaying any state information about the runtime manifestation of these model elements).

Extensible framework

Moka can be easily extended to address new execution semantics. This can be done through extension points enabling registration of executable model libraries (e.g., new MoCs, trace libraries, etc.) or simply tool-level extensions of the execution engine.

Getting started with Moka

Under construction

Installation

Under construction

Your first executable model

Under construction

Selecting the execution engine

Since Moka is an extensible execution framework, multiple execution engines can be registered in your environment. Before starting an execution, you should make sure that the appropriate execution engine is selected. To do so, go to Eclipse preferences, as shown in the figure below.

1 - Window Preferences.png

Once the preference page is open, go to Papyrus/Moka, as shown in the figure below. Moka is released with 3 execution engines. There are two versions of the PSCS execution engine (one is multi-threaded, with on thread per active object, and the other one is single-threaded). There is also an implementation of the fUML execution engine.

2 - Papyrus Moka ExecutionEngines.png

To make sure that the executable model described in this tutorial properly executes, you should select one of the two PSCS engines, press Apply and then OK.

Starting an execution with a launch configuration

Moka is integrated with the Eclipse Debug Framework. It implies that, in order to start an execution, a launch configuration shall be defined. A launch configuration can be created by clicking on the "Debug As" tool from the Eclipse tool bar, and then by pressing Debug Configurations.

1 - Debug Configuration.png

Then create a new Moka launch configuration, as shown in the figure below.

2 - New Configuration.png

A Moka launch configuration requires two pieces of information: the UML model from which the execution will be started, and the actual model element to be executed. This is illustrated in the figure below.

3 - EmptyLaunchConfiguration.png

Press the Browse button to select a UML model from your workspace (a .uml file shall be selected). Then, select the actual model element to be executed in the list "Element to be executed". This list is sorted alphabetically, by qualified names. Note that, in the case of the fUML and PSCS execution engines provided by Moka, the "Element to be executed" shall be an Activity. Your launch configuration should now look like:

6 - Setup launch configuration.png

To start the execution, simply press the Debug button. In our example, according to the semantics of PSCS, the effect of executing activity Increment_Factory will be to instantiate an Increment object, to construct this object (please refer to the default construction strategy described in the PSCS specification), and then start its classifier behavior. Our increment object will start to increment, and will go on until you stop the execution.

Managing breakpoints

Under construction

Controlling Executions

Under construction

Configuring animation

Under construction

Back to the top