ASIG |
---|
(version v2.0, July 4th, 2002)
The purpose of asig is to ease the process of testing, debugging, and executing synchronous programs. Asig automatically creates a graphical user interface (GUI) for your program, allowing you to run it easily. The asig tool works with any synchronous program compiled into a finite state automaton (OC common format) or into a synchronous circuit (SC common format).
Asig takes advantage of the existing common format OC for synchronous languages. Indeed, OC and SC code can be obtained from Lustre, Esterel and Argos compilers. Without going into details, an OC program is a finite state automaton with a finite memory for the computations; and an SC program is a Boolean synchronous circuit with a finite memory for the computations. Asig takes as input:
foo.oc
or foo.sc
.Both commands
asig foo.oc asig foo.sc
each produce three output files:
foo.tcl
is the Tcl/Tk GUI (8.3 version),foo.main.c
is the main program that starts the GUI
and runs the OC automaton or the SC circuit, andMakefile.foo
is the Makefile that compiles the
GUI. Eventually, you will need to change the library paths in this
file. You also need a compiler from OC or SC to
C. For instance, the Esterel compiler does the job.If your source file foo.oc
or foo.sc
makes external references (e.g., functions, constants, and so on),
then you need to provide a corresponding file
foo.h
. Beware, external types are not handled! Next, the
command
make -f Makefile.foo
first compiles foo.oc
or foo.sc
into
foo.c
, and then compiles foo.main.c
into the
executable program foo
. This executable includes both the
automaton and the GUI. Before executing, make sure that the
environment variables TCL_LIB
, TK_LIB
, and
X11_LIB
are correctly set.
When run, the executable foo
opens a window that looks
like:
Here the foo
program has one input a
and
one output b
, both integers. At each tick, it increments
b
by the value of a
. The GUI window has four
parts:
foo
).a
). Pure inputs
have a check-box, while valued inputs have an entry zone where you can
enter the desired value (here 2
).b
). All
outputs have a text field displaying their current value (here
12
).run/stop
button runs periodically one tick of the
program each x
time units, x
being the
value of the clock period (here 500
).tick
button runs exactly one tick of the
program.reset
button resets the inputs, outputs and
internal state of the program.exit
button terminates the execution and exits
the GUI.The following options are available:
-h | Print the help message. |
-version | Display the version number of asig. |
-info | Display all informations about asig. |
-bg <col> | Change the background color of the GUI to <col>. The default color is grey. |
-font <size> | Change the font size of the GUI to <size>. The default size is 12 points. |
-dist <dir> | Indicates that the source OC or SC program is a distributed program (obtained with ocrep or with screp) and that the file distinet.c that creates the distributed execution environment (i.e., the sockets) is located in the directory <dir>. |
The asig tool is available for Unix architectures: