Simulation of UML descriptions

Simulation of UML descriptions with UMLAUT Simulator

Introduction

This simulator is able to transform an initial UML model (class, state-charts and deployment diagram) into an executable one (in the form of a labelled transition system (IOLTS)) linkable to validation, simulation tools and test generation tools. The following sections describe the steps to use UMLAUT/Simulator from the modeling to the validation of a system.

The first steps are realizable with the UMLAUT GUI available in the Simulator package.

For the last ones you have to use the batch commands included too in the Simulator package.

At the end, we present a case study.


Modeling of the system to test

Launch the GUI to create a new model or load (from the native UP format or from XMI) an existing model.
Eventually, rename the "root" package given a new name <model-name>. Save your model in a file called <model-name>.uml (give the same name as the name of the root package). We recommend to often make copies of your model before saving.

The modeling consists in :


Generate simple test purposes

We present here a preliminary support to automatically generate test purposes (in BCG format) from UML.

To describe simple test purposes with UMLAUT, we suggest the use of the UML sequence diagram notations : a scenario is used to express a property for which we want to generate a test (see an example [fig 5]). Note: have a look to the GUI manual page about the Sequence Diagrams editor in UMLAUT.

We propose the following steps :


Transformation of the UML model into an IOLTS

First, you must conform to the installation requirements described in the text file INSTALL provided in the simulator package.

Then, in a command line window, you can execute the scripts uml2c and uml.open.

The script uml2c :

uml2c <model-name>.uml

Application of CADP tools on the executable model

The script uml.open allows to apply V & V tools, such as the interactive simulator xsimulator, the exhaustive simulation engine generator and the test generation tool TGV (all included in the CADP tools-box) from the UML model.

For example for xsimulator:

uml.open <model-name>.uml xsimulator

For example for TGV:

uml.open <model-name>.uml tgv [tgv_options] <tp-name>.bcg

Example of an ATC

In our ATC model, the environment is modeled by three actors: the human Controller (of our ATC), the PTGFacade (the radar) and the CCGFacade (a controller of an other ATC). The system consists of four classes: Flight and FlightPlan, used to store flight data, ControllerWorkingPosition and FlightPlanManager which control the system and interact with the environment.


[fig 1] The following use case expresses that a plane entering the zone can be handled by the system.


[fig 2] This is the static view of the ATC.


[fig 3] The next figure presents the transition editor for the capture of StateCharts.


[fig 4] The following view is the initial configuration of our system. The deployed system knows of two flights (each with an associated flight plan), initially located out of the area managed by the ATC.


[fig 5 a-b] With the test purpose given in this figure, we want to generate a test checking that the flight 0 will be correctly assumed by the ATC (i.e. that the controller ctrl will be notified that the flight status is updated with the value 4) when the flight enters the ATC zone (i.e. when the radar ptg indicates the flight new position true meaning `in zone'').


[fig 6] View (with bcg_edit) of the test purpose automaton produced from the UML messages sequence.