DEGAS: Dancers in violet tutues

Created with NetBeans!

Valid HTML 4.01!

School of Informatics

University of edinburgh

Extractable UML models

The PEPA Net Extractor requires a UML model which has been produced by the Poseidon Tool as input. This section gives an overview on what you have to do in order to create a UML model which is extractable by the PEPA Net Extractor. For more detail on how to create the different parts of the model refer to the Poseidon User Guide.

Three basic steps steps are necessary:
  1. Create class ModelActivities and a class for the mobile component whose behaviour you want to model.
  2. Create an activity diagram with mobility information. This activity diagram must specify the states of the mobile component and may contain move actions. Furthermore it should respect the restrictions on activity diagrams.
  3. Define the rate values for the extraction in the ModelActivities class.
More detail about steps 2 and 3 is given in the subsections below.

States of the mobile component

The PEPA Net Extractor only permits one mobile component in an activity diagram. The states of this component are represented by object flow states. Each object flow state must have the name and type of the mobile component whose flow is modelled by the activity diagram. The name and type of an object flow state can be set in Poseidon's Properties Tab which is part of the Details Pane

A valid object flow state must also have a tag with name atLoc. The value of this tag defines the location of the mobile component at this point. This value should only be changed by move actions. In Poseidon tagged values are defined in the Tagged Values Tab of the Details Pane. Figure 1 shows an object flow state whose location is visible in the Tagged Values Tab. The object flow state shown there is defined for a mobile component l of type Letter.

Figure of details pane

Figure 1: Definition of a mobile component's location in an object flow state

Move actions

Move actions are defined by adding the stereotype move to an action. To do this select the action which should become a move action, open the Properties Tab in the Details Pane of Poseidon, and click on button ... next to the Stereotypes label. If the move stereotype does not exist it has to be created first, which is a bit tricky in Poseidon. Once something is typed in the text field next to the Add button in the file dialogue, the button becomes enabled and a new stereotype can be created. Figure 2 shows the dialogue immediately before the move stereotype is added. After the stereotype has been defined, it can be added and applied to the selected action by the other buttons in the dialogue.

New stereotype

Figure 2: Creation of the move stereotype

Definition of rate values

The rate values for the actions are specified by attributes in class ModelActivities. For each action in the activity diagram that is extracted an attribute of type double with the same name has to be added to this class. Each attribute must have an initial value which is used as rate value for the corresponding action. The type and initial value of an attribute are set in the Properties Tab of the Details Pane of Poseidon. If there is no rate defined for an action the Extractor prints out a warning and uses an arbitrary rate value.

If an activity diagram does not contain move actions which change the mobile component's location back to the initial location at the end of the activity, the Extractor automatically adds them. These actions are needed for the analysis for the resulting PEPA Net and can be regarded as a mechanism for restoring the initial state before the activity is performed another time. The rate for these actions is called restore and has to be set in the ModelActivities class like all other rates. It is recommend to use a value for restore that is significantly higher than the other rates, because that minimises its impact on the analysis. Figure 3 shows an example ModelActivities class with a restore rate.

ModelActivities class

Figure 3: Class diagram with ModelActivities class for rate specification

Restrictions on activity diagrams

The activity diagrams which are accepted by the Extractor must have the following properties:
  1. The activity diagram models the flow of one mobile component. All object flow states represent states of the this mobile component, and have the same name and type.
  2. The mobile component is fully traceable throughout the diagram. That means whenever it serves as input for an activity, it must also appear as output. Actions which create or delete the object which represents the mobile component are not allowed.
  3. The locations of the mobile component can only be changed by move actions.
  4. There exists an initial action state.
  5. The diagram does not contain any branch nodes, fork states and join states (this is the terminology used by Poseidon).
  6. An action without incoming and outgoing object flows should never occur immediately before or after a move action. This restriction is caused by the PEPA Net semantics. In PEPA Nets actions which are performed by a static component cannot be synchronised with moves of a mobile component. A solution to this problem is to insert synchronisation actions to the UML activity diagram where necessary. The current version of the Extractor does not do this automatically, but synchronisation actions can be added manually as described in the following section.

Synchronisation actions

Figure 4 illustrates how an activity diagram which violates last of the restrictions can be transformed into an extractable diagram. The left diagram is invalid because action assign postmen is performed independently of the mobile component and occurs immediately before and after move actions. The extractable diagram on the right has been produced by adding two synchronisation actions synch which are shown in red to the diagram. The location in all object flow states between move action post and deliver must be the same.

The only purpose of synchronisation actions is to ensure that the move actions and assign postmen are performed in the correct order in the PEPA Net which is going to be produced. Their rate value should be significantly higher than for the other rates to reduce their impact on the analysis. The rate value is defined as usual in the ModelActivities class.

Invalid activity diagram Activity diagram with synchronisation action

Figure 4: Invalid activity diagram (left) and extractable activity diagram with synchronisation actions (right)

Display of location probabilities

The Choreographer User Guide explains in detail how a PEPA Net is extracted from an activity diagram, how the PEPA Net can be analysed and how the results can be reflected back into the UML model. The reflected UML model shows the throughput for each action and the probabilities for each location.

If the reflected model is opened in Poseidon the throughput values are immediately visible in the action nodes. The location probabilities, however, are not so obvious. They have been attached as tagged values to the object flow states in the diagram during the reflection process. The location probability for a selected object flow state is displayed as value of tag locProb in the Tagged Values Tab of Poseidon's Details Pane. Figure 5 shows an example of a reflected activity diagram where a location probability is visible in the Details Pane.

Reflected Activity diagram

Figure 5: Reflected activity diagram with visible location probability

Acknowledgements

This work is supported by DEGAS (Design Environments for Global Applications) project, IST-2001-32072 funded by the FET Proactive Initiative on Global Computing. The diagrams in this user guide have been produced with the Community Edition of Poseidon 3.0.

Jennifer Tenzer
Last modified: Thu Apr 21 16:59:08 BST 2005