Next: 5.2 The Process Structure
Up: 5 Behavior View Editors
Previous: 5 Behavior View Editors
Subsections
TSTD follows the notational convention of Mealy machines.
In short, a Mealy machine
is a finite state machine in which each transition can have one
or more actions. See figure 5.1 for the
shapes and subjects.
Figure 5.1:
State transition diagram nodes and edges.
 |
There are tree kinds of nodes: initial states, (normal)
states and decision points.
All nodes should have mutually unique names.
Nameless states, also called transitory states, are not permitted.
Non-deterministic state transition diagrams are permitted.
An initial state can have one or more initialization actions.
You can add an action by selecting the initial state, and click
on it for editing near the arrow on top of the box. Then an edit cursor
appears at the right side of the arrow. You can type in the actions,
each line of text will become a separate action. If you stop
editing, the actions will become left aligned, the arrow will
be resized if necessary and on top of the actions a
horizontal separator line will be drawn. Only when the initial state
has actions then the separator line is drawn.
Note that these actions are in this notational convention
part of the initial state node, whereas the other actions (and events)
of a diagram are as a notational convention part of an edge.
Transitions are drawn as arrows. They do not have an editable name label.
Instead they have an event label and a number of action labels.
The action labels each occupy exactly one line of text; the event label can
contain multiple lines.
The event and the actions are separated by a horizontal separator
line . When a transition is created, a separator
line will also be created and it will be positioned near
where a name label would be positioned. When the transition line segment near
the separator is drawn vertically, the separator is connected to the right
side of the line segment. When the segment is drawn horizontally,
the separator is positioned a little above the line, see
figure 5.2 for the two default positions.
Figure 5.2:
Default STD separator positions.
 |
If you click for editing a bit above the separator line, an
edit cursor appears and you can enter an event string.
When you stop editing, the event string will be positioned above
the separator line and the separator line will be resized, if necessary.
If you click for editing a bit below the separator, an edit cursor
appears there and you can enter a list of actions. Each line of text will
become a separate action. If you stop editing, the actions will become
left aligned and, if necessary, the separator line will be resized.
When the transition line segment is horizontal and the separator is
positioned above the segment, all labels are moved up so that they are all
positioned above the line. See figure 5.3 for an example
diagram with actions and events.
Figure 5.3:
STD with events and actions.
 |
It is possible to drag the separator line together with the
event and action labels. There are two different sorts of
movements possible
:
- 1.
- Move it to another line segment. You do this by selecting
the transition and click for editing on the desired transition segment.
The separator line and the existing event and action labels are
moved to that line segment. When you stop editing, the separator will
remain in that line segment.
Summarizing: to move it to a different segment, empty the selection
and then double click the desired segment.
- 2.
- Move within a line segment. Drag with button-1
the separator or one of the labels to the desired position. The final
position is determined by the direction of the transition line segment.
- If the line segment is more or less horizontal, you can freely
move the separator and labels from left to right. But you can only move
the separator up and down to two predefined positions: either
all labels are positioned entirely above the line segment or
all labels are positioned entirely below the line segment.
- If the line segment is more or less vertical, you can freely
move the separator and labels up and down the segment, but you
can only move the separator left and right to two predefined positions:
either all labels are entirely positioned at the left side of
the line segment or all labels are entirely positioned at the
right of the line segment.
The automatic positioning of labels looks best when the segments
are horizontal or vertical. When the transition arrow segments are diagonal, then label
positioning still works but sometimes the result does not look
as great as figure 5.3.
TSTD checks the following constraints that are summarized in
figure 5.4.
Figure 5.4:
Immediately checked and soft constraints on STDs.
 |
Next: 5.2 The Process Structure
Up: 5 Behavior View Editors
Previous: 5 Behavior View Editors
Frank Dehne,Faculty of Mathematics and Computer Science, Vrije Universiteit Amsterdam
11/17/1997