Current version is 3.0 (updated on the 20th of November, 2002).
See the list of changes from Version 2.00 here .Please read this page for the usage of new features.
The state machines, which should be verified, need to be specified for classes in an UML-model. This model is exported into a XMI-file (version 1.3). All classes need to be in one and the same package. If a given set of state machines send messages to each other, their classes need to be connected by an association, whose role names are used to refer to the targeted state machine. Each class has to declare the call and send events, which it can receive: call event reception is declared by a public method with the same name as the event, e.g. public void e()
; send event reception is declared by a method receive
with the accepted signal as parameter, e.g. public void receive(Signal s)
. Event parameters must be added to the parameters of the method, e.g. public void e(int p1, int p2)
for call events or public void receive(Signal s, int p1, int p2)
for signal events (Note: all event parameters must be of the type integer).
Actions may emit send or call events (e.g. ^e'
, ^c1.s
). Actions and Guards may contain Promela code. If the Promela code should read or manipulate variables that are visible to an entire state machine, they need to be specified as attributes in the state machine's class. Multiple actions are separated by semicolons.
Do-activites must include the command yieldDoActivity
at those points, on which they allow the execution of other processes. This breakpoint gives Hugo a chance to abort the do-activity before its completion. This is particularily important if you include loops in your do-activities.
./hugo/bin/model/
some example models are provided, together with collaborations (in
./hugo/bin/model/
) and shell scripts (in
./hugo/bin/
). For the example shell scripts, no additional arguments are required. Hugo first generates a Promela model from the state machines (and collaboration). Then it has Spin generate a verifier. Finally Hugo starts the C-compiler and the verification run.
You may need to adapt the shell scripts to your system's configuration. They were tested on SuSE Linux 8.0.
Extract the distribution file hugo_3_00.tgz
. To compile Hugo, simply go to the ./hugo/src/
subdirectory and type 'make'.
You need a JDK 1.3.0 (or higher) to run and compile Hugo 3.00. If your Java compiler has another command then 'javac' you must modify the Makefile accordingly.
Use the run.sh
shell script (in ./hugo/bin/
) to start Hugo with a user defined model. If your Java interpreter has another command then 'java' you must change the file ./hugo/bin/run.sh
accordingly.
Hugo is always executed with the following arguments (in exactly this order):
Hugo checks, whether a particular collaboration is possible for the given set of state machines. A collaboration is provided by a text file, that specifies the collaboration. It consists of three parts:
//
'.
Example collaboration file:
// declaration of instances: // format: 'instanceName:classname' o1:C1�� o2_1:C2 o2_2:C2 // declaration of rolenames: // format: 'instanceName.rolename=associatedInstanceName' o1.left=o2_1 o1.right=o2_2 // interaction: // format: 'sendingInstanceName^roleName.eventName' o1^left.e1;o1^right.e2
The commands that Hugo uses to start Spin, the C-compiler and the verification run can be modified in the file hugo.properties
. Make sure that the classpath for the execution of Hugo includes also the folder, which contains the file hugo.properties
. If this file is not found, default values will be used.
The following additional options may be used after the arguments:
-r
allows to restrict verification to a determined ordering of orthogonal regions.
do/
. Hugo will treat such an entry-action as a do-activity. Note, that a state can't have an entry-action and a do-activity at the same time in this case. uml13.dtd
) in the directory in which you execute Hugo, Nsuml will warn you that it uses a default DTD. This warning can be ignored. Currently unsupported UML constructs:
This product includes software developed by the Apache Software Foundation (http://www.apache.org/).