Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/doc/org.eclipse.papyrus.moka.doc/resource/moka.html')
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.moka.doc/resource/moka.html1
1 files changed, 0 insertions, 1 deletions
diff --git a/plugins/doc/org.eclipse.papyrus.moka.doc/resource/moka.html b/plugins/doc/org.eclipse.papyrus.moka.doc/resource/moka.html
deleted file mode 100755
index c753da1052a..00000000000
--- a/plugins/doc/org.eclipse.papyrus.moka.doc/resource/moka.html
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body><h1 id="Moka_Overview">Moka Overview</h1><p>Moka is a Papyrus module for execution of UML models, which natively includes an execution engine complying with OMG standards foundational UML (fUML <a href="http://www.omg.org/spec/FUML/">http://www.omg.org/spec/FUML/</a>) and Precise Semantics of UML Composite Structures (PSCS <i>[link to OMG webpage available soon</i>]). 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:</p><h2 id="Based_on_standards">Based on standards</h2><p>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.</p><h2 id="Interactive_executions">Interactive executions</h2><p>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).</p><h2 id="Extensible_framework">Extensible framework</h2><p>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.</p><h1 id="Getting_started_with_Moka">Getting started with Moka</h1><h2 id="Your_first_executable_model">Your first executable model</h2><p>This tutorial is based on a simple executable model. It consists in an active class, with a classifier behavior that indefinitely increments a counter. The corresponding Papyrus model is available here <a href="https://wiki.eclipse.org/File:BasicActiveObjectExample.zip">https://wiki.eclipse.org/File:BasicActiveObjectExample.zip</a>. Download it, define a project in your workspace, and then import the model in this project. Once the model is imported and open in Papyrus, the Increment class should look like:</p><p><img title="The active class increment" alt="The active class increment" border="0" src="ActiveClassDiagram.png"/></p><p>The behaviors associated with this class (i.e., IncrementClassifierBehavior, which is the classifier behavior, and incrementMethod, which is the implementation of operation increment) are specified by activity diagrams. Corresponding activities are executable, according to the semantics given in OMG standards fUML and PSCS. Anyway, in fUML and PSCS, the execution of a model usually starts by executing a kind of "main" activity, which is responsible for instantiating objects, and stimulate them if needed (through signals or operation calls). Moka provides some facilities to generate this kind of activities. Just right click on class Increment, then go to Moka / Modeling Utils / Generate Factory.</p><p><img border="0" src="GenerateFactory.png"/></p><p>A factory activity for class Increment (Increment_Factory in the figure below) is then generated. This activity will be used in the next steps of this tutorial to actually start the execution of the model. Do not forget to save your model, otherwise the factory will not be visible in the launch configuration definition step described below in this tutorial.</p><p><img border="0" src="modelExplorer_Create.png"/></p><h2 id="Selecting_the_execution_engine">Selecting the execution engine</h2><p>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.</p><p><img border="0" src="Window_Preferences.png"/></p><p>Once the preference page is open, go to Papyrus/Moka. 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.</p><p><img border="0" src="Papyrus_Moka_ExecutionEngines.png"/></p><p>To make sure that the Increment example properly executes, you should select one of the two PSCS engines, press Apply and then OK.</p><h2 id="Starting_an_execution_with_a_launch_configuration">Starting an execution with a launch configuration</h2><p>Moka is integrated with the Eclipse Debug Framework. It implies that, in order to start an execution, a launch configuration has to 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.</p><p><img border="0" src="Debug_Configuration.png"/></p><p>Then create a new Moka launch configuration, as shown in the figure below.</p><p><img border="0" src="New_Configuration.png"/></p><p>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.</p><p><img border="0" src="EmptyLaunchConfiguration.png"/></p><p>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:</p><p><img border="0" src="Setup_launch_configuration.png"/></p><p>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. Note that a Launch configuration is a persistent artifact, so that, if you close Papyrus and then open it again, your launch configuration will still be available, and you will be able to relaunch it.</p><h2 id="Managing_breakpoints">Managing breakpoints</h2><p>In order to easily observe and control the state of you model at some specific points of the execution, Moka lets you associate breakpoints with model elements. This can be done through the contextual menu Moka/Debug, which is available from the model explorer and from diagrams.</p><p><img border="0" src="ToggleBreakpointModelExplorer.png"/></p><p><img border="0" src="ToggleBreakpoint.png"/></p><p>Once a breakpoint has been created, a small icon (blue circle) appears on top of the corresponding model element.</p><p><img border="0" src="BreakpointDiagramView.png"/></p><p>Using the Moka/Debug menu, an existing breakpoing can also be de-activated (without being removed), using the "Toggle breakpoint activation" button. In this case, it will be depicted by a small white circle on top of the corresponding model element.</p><p><img border="0" src="ToogleBreakpointActivation.png"/></p><p>The set of existing breakpoints (as well as their status - Enabled / Disabled) is given in the breakpoint control panel, which is usually located in the upper, righ-hand part of the Debug perspective.</p><p><img border="0" src="BreakpointsView.png"/></p><p>The breakpoint control panel more generally lets you enable, disable and remove breakpoints. Just right click in the panel, as depicted in the figure below.</p><p><img border="0" src="RemoveBreakpoints.png"/></p><p>From an execution standpoint, it is important to note that the selected execution engine (see section on "Selecting the execution engine") is responsible for interpreting breakpoints. In the case of the fUML and PSCS execution engines provided by Moka, only breakpoints associated with activity nodes or edges will be taken into account (even if Moka lets you associate breakpoints with any kind of model element). Other breakpoints are simply ignored.</p><h2 id="Controlling_Executions">Controlling Executions</h2><p>Executions can be controlled using the execution control panel, provided by the Eclipse Debug perspective.</p><p><img border="0" src="ThreadStatusView_empty.png"/></p><p>It is thereby possible to resume, suspend, stop, or even do step-by-step executions. Note also that, when execution is suspended, variables may be observable in the variable panel.</p><p><img border="0" src="VariableView.png"/></p><p>The selected execution engine is responsible to determine what the visible variables are in the context of an execution. In the case of the fUML and PSCS engines provided by Moka, visible variables are properties of the context object in which in the suspended activity is executing (in our example, the suspended activity is the classifier behavior of class Increment, which executes in the context of a particular Increment object, which holds a value for property counter).</p><h2 id="Configuring_animation">Configuring animation</h2><p>By default, Moka is configured to animate diagrams during executions, without automatically giving focus / making visible a diagram where a model element being executed has a graphical representation. This can be configured in the Animation control panel, which is available in the Debug perspective.</p><p><img border="0" src="AnimationConfiguration.png"/></p><p>The slide bar enables to control the artificial animation delay between two animation steps. Note that option "Open diagrams automatically" may decrease performances of the execution engine. By default, Moka is released with some default animation styles, which determine the emphasis style to be applied to graphical elements when the execution is suspended, or more generally for animation. This default style can be overloaded per diagram, by attaching a CSS style sheet, as depicted in the figures below.</p><p><img border="0" src="PropertiesView_EmptyStyleSheets.png"/></p><p><img border="0" src="NewStyleSheets.png"/></p><p><img border="0" src="MyStyleSheets.png"/></p></body></html> \ No newline at end of file

Back to the top