UmlSequence/Syntax

Parser usage

{ { {#!umlsequence [OPTIONS]

  STATEMENTS...

} } }

(as usual, without spaces between the successive curly braces on the first and last lines above)

Options:

UML Notation

All elements of an UML sequence diagram :

White spaces and source comments

Defining Objects

Creating and Destroying Objects

Messages / Calls

Results

Asynchronous messages, Arrows Direction

Activations

Self-Activation

Vertical Spacing (Step)

Constraints

Boxes

Comment Notes

Text layout in the source

Thanks to the fact that:

it is possible to arrange the source text in a layout that can be visually appealing. This variant :

S : s:Caller
W : :Switch
C : #c:Convers
R : r:Caller

           W+
S+ ?-----> W                         liftReceiver
S  <------ W                         setDialTone()
S  ?-----> W                         *dialDigit(d)
           W                         {{dialing.executionTime < 30s}}
           W                         >routeCalls(s,n)
           W  ::::::> C+             c:Convers
                      C  ------> R+  ring()
                      C  <-----? R   liftReceiver
           W  <------ C              connect(r,s)
S  <------ W                         connect(r)
           W  -----------------> R   <(> connect(s)

is equivalent to this one :

S : s:Caller
W : :Switch
C : #c:Convers
R : r:Caller

W+
S+ ?-> W  liftReceiver
S  <-  W  setDialTone()
S  ?-> W  *dialDigit(d)
W         {{dialing.executionTime < 30s}}
W         >routeCalls(s,n)
W  :>  C+ c:Convers
C  ->  R+ ring()
C  <-? R  liftReceiver
W  <-  C  connect(r,s)
S  <-  W  connect(r)
W  ->  R  <(> connect(s)

autogenerated--umlsequence-parser--3cbe8940d9c42ac53f5c15026a2f8e6bdb597779.png

Although the first variant is looking nicer at the source level, the second one is easier to both write and maintain, because the alignments are fixed.

Diomidis Spinellis and the Author encourage the usage of the second variant.

The Author is using the second variant like this (three-characters arrow for better alignment) :

S : s:Caller
W : :Switch
C : #c:Convers
R : r:Caller

W+
S+ ?->  W  liftReceiver
S  <--  W  setDialTone()
S  ?->  W  *dialDigit(d)
W          {{dialing.executionTime < 30s}}
W          >routeCalls(s,n)
W  ::>  C+ c:Convers
C  -->  R+ ring()
C  <-?  R  liftReceiver
W  <--  C  connect(r,s)
S  <--  W  connect(r)
W  -->  R  <(> connect(s)

MoinMoin: ParserMarket/UmlSequence/ReleaseNotes/Syntax (last edited 2008-01-29 10:35:40 by FedericoLorenzi)