Getting Started with DESUMA2

From DESUMA Wiki
Getting Started with DESUMA2
Jump to: navigation, search
(Files)
(Files)
Line 174: Line 174:
  
 
To save your workspace under a different file format, go to the '''File''' menu, choose ''Export'', and finally select the desired file format from the submenu.
 
To save your workspace under a different file format, go to the '''File''' menu, choose ''Export'', and finally select the desired file format from the submenu.
 +
 +
== Workspace ==
 +
 +
=== Refreshing the Workspace ===

Revision as of 20:19, July 23, 2013

This is the tutorial page for DESUMA and UMDES.

Contents

Setting up UMDES

DESUMA is a Java based program to allow users of the UMDES library to graphically view results. To use UMDES, it must be downloaded. It can be downloaded here. After downloading UMDES, DESUMA must be pointed to the UMDES library to use its functions. To do this, select Edit>Preferences.... (Or on OSX, Desuma>Preferences....).

Under the profile tab, select the 'Browse...' button under the Plugins Directory. Locate where your copy of DESUMA is stored, and select the file umdes.xml in the umdes folder. Click OK and the plugin will be automatically loaded every time DESUMA is launched.

NOTE: On Linux/Unix/Mac systems, you may need to change the file permissions of the files if the library consists of executables. You can fix this by going to the directory of the executables and type in the command line "chmod+x *" or through the File Preferences for your operating system.

States

Creating States

States can be created via the command line or the batch window. It is possible to create states that initially have no markings, or it is possible to use flags to indicate that a state has special properties (e.g., initial, marked).

A state can also be added by right-clicking the graph and selecting "Add State" from the pop-up menu. Note that this method does not allow flagging.

Using the Command Line

There are two ways to create a state without flags:

-Type state state_name into the command line and press <Enter>.
-Type s state_name into the command line and press <Enter>.

Both commands achieve the same result. If the state is created, a circle-- or ellipse if state resizing is enabled-- with state_namedisplayed in the center will appear in the workspace. Also, the status bar will be updated with a message indicating success. The first state created becomes the initial state.

State names containing black spaces are not accepted by DESUMA.

Multiple States

Multiple states can be created via the command line or the batch window. For either case, the syntax is:

- Type multistate number_of_states into the command line and press <Enter>.
- Type ms number_of_states into the command line and press <Enter>.

The names of the states are automatically assigned based on the following rules:

- The least number of letters available from the word 'state', used sequentially, for which any state does not have that name.
- The lowest digit available [1,9].

Example: ms 3 will provide the states {s1, s2, s3} if these states do not already exist.

Flags

It is also possible to create a state and initially assign it some properties using the flags options. The syntax is as follows:

state state_name [flags]

s state_name [flags]

-i -I

tags the state as the initial state (graphically indicated by displaying the state in green)

-m -M

gives the state the marked property (graphically indicated by a double circle in the workspace)

Note:

-At any time, there may only be one initial state. New states created (or modified) as initial states will take the initial status from the previous initial state (if one exists).
-Flags must be preceded with a dash character.
-Flags are not available for the multistate command.

Examples:

- state 1 -IM: creates a marked initial state named 1.
- s 34 -I: creates an initial state named 34.
- multistate 3: creates three states with default names.
- ms 20: creates twenty states with default names.


Editing States

State names can be changed using the graphical interface of DESUMA. Right-click the desired state and select "Rename" to bring up a box for new name re-entry. Alternately, double clicking on the state name on the status pane will allow renaming.

To edit the properties of existing states, locate and select the States Tab in the Status Panel. Locate the state you wish to modify and select appropriate actions.

Deleting States

There are two ways to delete states:

1. In the automaton workspace, left click the state you wish to delete. Information about the selected item will appear in the Summary Tab. Once selected, right-click the state to bring up the options menu. Select delete.
2. Type delete state_name into the command line and hit <Enter>.


Note: all transitions entering or exiting the deleted state will automatically be removed.

Transitions

Creating Transitions

Transitions require an origin state and a destination state. (Note that the origin and destination state can be the same state for self-loops). Transitions are created with the command line or batch window. It is possible to create transitions that initially have no markings, or it is possible to use flags to denote special properties (controllable, observable).

Using the Command Line

Transitions can be created without flags in two ways:

1. Type trans from_state_name to_state_name transition_name into the command line and hit <Enter>.
2. Type t from_state_name to_state_name transition_name into the command line and hit <Enter>.

Both versions achieve the same result. There should now be a directed solid line, labelled with transition_name in the workspace, originating at from_state_name and ending at to_state_name.

This procedure creates a transition with any properties. To change the properties, refer to section on editing transitions.

Flags

It is also possible to create a transition and initially assign it some properties using the flags options. The flags associated with the trans command are:

trans from_state_name to_state_name transition_name [flags] t from_state_name to_state_name transition_name [flags]

-uo -UO

Gives a transition the unobservable property.

-uc -UC

Gives a transition the uncontrollable property.

Note:

-By default, if the flags are not present, the transition will be assigned to be observable and controllable.
-These properties are not assigned any graphical representation; rather, the properties are indicated in the Status Panel labelled Automaton.
-If the transition is observable (controllable, respectively), the observable (controllable) box associated with the given transition will contain a checkmark.
-The graph layout will change with the addition of new states or transitions if the user has 'AutoLayout' turned on. The user can prevent auto-layout by turning the option off in their user profile.

Examples:

- trans 1 2 trans_1 -UOUC: creates a transition from state 1 to state 2 called trans_1 that is unobservable and uncontrollable.
- t 1 2 trans_1 -UO: creates an unobservable-- but controllable-- transition from state 1 to state 2 called trans_1.

Editing Transitions

Editing a transition can be done in two ways. It can be done graphically by right-clicking the transition and selecting "Edit/rename transition..."

Properties of an automaton can only be edited if the workspace is unlocked.

Deleting Transitions

There are two ways to delete a transition from an automaton.

1. Select the transition you wish to have deleted by right-clicking directly on it. This will bring up a menu of options. In this menu, you will find the Delete Transition item, which will delete the transition.
2. To delete a transition called transition_name that begins at from_state and ends at to_state, type delete transition_name from_state to_state into the command line and press <Enter>.

Defining Event Properties

Event properties of observability and controllability are specified on the Events tab of the Status Panel. If an event is observable (respectively, controllable), a check mark will be present in the box next to the event name.

To denote that a particular event is observable (respectively, controllable) simply click the appropriate box in the table. Similarly, to indicate that an event is unobservable or uncontrollable, remove the check from the box by clicking on the appropriate box.

Note: the workspace must be unlocked for changes to take place.

Files

Opening Files

DESUMA supports the UMDES file format (.fsm) as well as .xml format with additional information such as position and event properties across multiple agents. You simply open an existing ile in .fsm format, and it will automatically be displayed in a DESUMA workspace.

To open an existing .fsm or .xml file:

1. Go to File menu and select Open.
2. A pop-up window will appear allowing the selection of a .fsm or .xml from the current working directory.
3. Select a file.
4. Click on the "Open" button in the dialogue box.

Note: the UMDES file format is sometimes abbreviated as .fsa so DESUMA will open them as an alternative. If the file has no extension, DESUMA will try to open it up nonetheless.

Saving Files

To save the work in your current DESUMA workspace, it is possible to store the automaton in several formats. DESUMA supports .xml file format by default, but data can also be saved as a PNG, JPG, GIF, or the UMDES text file (.fsm).

Saving the Workspace as .xml

There are two ways to save a workspace: either using the main menu or using the appropriate icon on the toolbar.

1. Go to File menu and select Save or Save as
-If you select Save as, a dialogue box will appear prompting you for a new filename.
-If you are saving a new workspace (that has not previously been saved) and select Save, a dialogue box will appear prompting you for a filename.
2. Click on the save icon on the menu bar.

Saving the Workspace as a PNG, JPG, BMP, GIF, or FSM (UMDES) File

To save your workspace under a different file format, go to the File menu, choose Export, and finally select the desired file format from the submenu.

Workspace

Refreshing the Workspace

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
EECS @ UM
Tools