MANAGEMENT AND TECHNOLOGY SCHOOL OF THE POLYTECHNIC INSTITUTE OF BEJA (PORTUGAL), 31 OCTOBER OF 2007
(usefull for debugging of proper application
The sequence diagram can be visualized
by the application, through Java
Permits to export the diagram to the PIC
 language image format by using the
UMLGraph  macros for specially de-
sign sequence diagrams. Then we can use a
graphics processing tool like pic2plot  to
convert the PIC format to other Image for-
mat such as, PNG, GIF, SVG or PostScript
Can export the sequence diagram to the
format of the Sequence tool .
There is a simple configuration file to eas-
ily change some variable values defined in
the application so, the program will oper-
ate differently from the pre-established or
what comes by default.
Option to generate Sequence Diagram of a
small part of the code executed by appli-
cation (This is very useful in diagrams of
large application projects).
Option to generate Sequence Diagrams
from a simple trace file description without
the need to write a line of Java
With this feature, the application can be
used to create Sequence Diagrams from
trace files generated from any source pro-
Fig. 1. Application Screenshot
Besides the use of the Java
to get the Sequence Diagram information, we
needed to incorporate or establish a connection
with other tools and formats or technologies for
further development, sush as:
A XML (Extensible Markup Language)
based format  was used to store all
sequence diagram information that can be
easily loaded at any time in the future.
A large part of the export flexibility of
the developed application, was achieved
through the language PIC . This lan-
guage can specify diagrams in terms of
objects such as boxes with arrows between
them and can be translated into concrete
drawing commands by a compiler. This
project uses the pic2plot  tool to con-
vert these drawing commands to a binary
image format. Uses a modified version of
the UMLGraph  sequence diagram PIC
macros file for the specific purpose of the
Presentation of sequence diagram in the
Sequence tool  format.
Presentation of sequence diagram by the
application, through Java
Built-in support for Sequence Diagram
Because of the limited space on article, we
will present only a small example (Fig. 2) for
clarification on what may look like a sequence
diagram generated by the application. The re-
spective code is on Listing 1. Note that, in
the example diagram you can see the actual
parameter values passed through the methods.
Listing 1. Java
Code of the Diagram
p t . i p b e j a . e s t i g . t e s t ;
C l a s s f o r T e s t i n g t h e A p p l i c a t i o n .
u s e s some a r i t h m e t i c t y p e o b j e c t s t o p e r f o r m t h e o p e r a t i o n s .
A p l i c a c a o de T e s t e p a r a c r i a r um d i a g r a m a de s e q u e n c i a
qu e f a z cham adas a v a r i o s t i p o s de o b j e c t o
s e r v e de e x e m p l o p a r a f a c i l v e r i f i c a c a o do f u n c i o n a m e n t o
d a s v a r i a s c o m p o n e n t e s da a p l i c a c a o em q u e s t a o .
@au t hor Nuno F o r t e s
@ v e r s i o n 1 . 0