This website is not longer maintained. Use the wiki instead.
Software Account: Esterel
This account contains tools and compilers for the synchronous language Esterel and Lustre. They are used for programming of control dominated software or reactive systems.
Esterel
Lustre
Lustre is a dataflow oriented synchronous language.
Esterel v5_92
Examples
There are two example directories prepared for use as templates for your own projects:
- /home/esterel/v5_92/example/
Native compilation and execution on the host (Unix/Linux) architecture.
- /home/esterel/v5_92/example-legOS/
Crosscompilation for the
LEGO Mindstorms
system with the alternative operating system
legOS.
Each directory holds four files:
/home/esterel/v5_92/example:
- Makefile:
Input file for the make command.
- abro.h:
C header file with interface declarations.
- abro.strl:
Esterel file.
- abro_data.c:
C code with functions for data processing and OS interfaces.
/home/esterel/v5_92/example-legOS:
- Makefile:
Input file for the make command.
- abro-rcx.h:
C header file with interface declarations.
- abro-rcx.strl:
Esterel file with the modified ABRO System.
- abro-rcx_data.c:
C code with functions for data processing and legOS calls.
Both examples implement the ABRO system. They are named after the
signals used: A and B as input signals, R
as a reset signal and O as output.
Details of this standard example can be found in
The Esterel v5 Language Primer.
The implementation in /home/esterel/v5_92/example reads the
keyboad keys A, B, and R as input signals
A, B, and R . The output signal O
is bound to a printf() call.
The legOS implementation uses the RCX inputs 1 and 2
as inputs A and B. The panel button Prgm is
the source for the R signal. The output O is
implemented as a beep on the RCX for each emitted signal.
The directory /home/esterel/v5_92/example-legOS contains another Esterel
example:
drive.strl
and
respective C files
drive.h
and
drive_data.c.
It is a simple example of the exec statement of Esterel.
To be able to modify or compile these files, copy them into a
directory in your home account.
mkdir esterel
cp /home/esterel/v5_92/example-legOS/* esterel
cd esterel
If you want to use them as templates for another project, then simply
rename the files and modify them.
When renaming, do not forget the line
#include "abro-rcx.h"
in (formerly) "abro-rcx_data.c". The "abro-rcx" part
must be changed to match your file names.
Compilation Details
Basically the compilation of an Esterel program for an Unix host works as follows:
The file with Esterel code is compiled into C code with the Esterel
compiler:
esterel abro.strl
The resulting C code is compiled with a C compiler into object code:
gcc -c abro.c -o abro.o
and with the object code of the *_data.c interface file:
gcc -c abro_data.c -o abro_data.o
linked into one executable binary:
gcc abro.o abro_data.o -o abro
These steps are conveniently implemented into the Makefile
for each example directory:
Makefile for the Unix target
The Makefile in /home/esterel/v5_92/example compiles
esterel programs for the Unix-Target.
The following targets are
available (replace abro with the base name of your project):
- make abro
compiles and links the Esterel file abro.strl along with
abro_data.c into an executable file abro.
- make abro.c
If you are only interested in the C code generated from the Esterel
file you can use this target. It just calls the Esterel compiler to
produce the C code abro.c from abro.strl.
-
make abro.xes
is a special case. The resulting file is not linked with
abro_data.c
but with the XES graphical debugger library from Esterel.
It features a graphical interface to single
step through the Esterel code with full control over all signals. The
interface code in abro_data.c is not needed here. There are
two files produced: the big abro.exe and the small
abro.xes. abro.exe is the actual binary and
abro.xes a shell script to set up an environment variable
before starting the binary. Therefore please use abro.xes
to start the Esterel simulation.
Makefile for the legOS target
The Makefile in /home/esterel/v5_92/example-legOS compiles
esterel programs for the legOS-Target. It is similar to the one for
Unix with some additional targets for kernel and program upload into
the RCX.
The following targets are
available (replace abro-rcx with the base name of your project):
- make abro-rcx.lx
compiles and links the Esterel file abro-rcx.strl along with
abro-rcx_data.c into a binary image abro-rcx.lx.
This image can be uploaded into the RCX to be executed.
- make abro-rcx.c
If you are only interested in the C code generated from the Esterel
file you can use this target. It just calls the Esterel compiler to
produce the C code abro.c from abro.strl.
-
make abro-rcx.dll
uploads the binary image abro-rcx.lx into the RCX.
If abro-rcx.lx is not existant or not up to date, then it is rebuilt.
-
make kernel
just uploads the kernel into the RCX (e.g. after a crash)
-
make abro-rcx.xes
is a special case. The resulting file is NOT executable on the RCX,
instead it is linked with the XES graphical debugger library from Esterel. It is
executable on the host and features a graphical interface to single
step through the Esterel code with full control over all signals. The
interface code in abro-rcx_data.c is not used here. There are
two files produced: the big abro-rcx.exe and the small
abro-rcx.xes. abro-rcx.exe is the actual binary and
abro-rcx.xes a shell script to set up an environment variable
before starting the binary. Therefore please use abro-rcx.xes
to start the Esterel simulation.
Documentation
For copyright reasons we are not allowed to distribute the
documentation via HTTP. Therefore those files
are only locally available via FILE links into the directory
/home/esterel/v5_92/doc. You may browse the official
Esterel Web for
documents released to the public.
The manual pages for Esterel v5_92 are here located in
/home/esterel/v5_92/man
Use the Option -M /home/esterel/v5_92/man for the
man command to display Esterel manual pages. Or extend the
environment variable MANPATH by that directory (bash style):
export MANPATH=$MANPATH:/home/esterel/v5_92/man
HTML-Versions of these manual pages are available in
/home/esterel/v5_92/doc/html/.
Two other documents worth reading are:
- primer.pdf: The Esterel v5 Language Primer
This paper gives an in depth view of the synchronous programming
language Esterel.
- manual.pdf: The Esterel v5_91 System Manual
This document describes the use of the Esterel compiler, the interfacing
of generated code, and the simulation of Esterel programs.
Esterel Studio Version 5.2
Startup
Our license for Esterel Studio is only valid inside the domain
informatik.uni-kiel.de. Therefore a client runnning Esterel
Studio must have a permanent network connection inside that domain to
be able to talk to the license server. An independent home
installation is not possible.
To start Esterel Studio just call
/home/esterel/bin/estudio
and the graphical SyncCharts modelling tool apears.
Before creating a new project you have to decide which textual Esterel
language you want to use for code generation. The options are:
- Esterel (a.k.a.: Esterel v5, Esterel classic)
- Esterel v7
You can change this setting in
Tools->Preferences->Compiler
Examples from Esterel Technologies
The example project files delivered with Esterel Studio are located in
/home/esterel/EsterelStudio/examples
They are organized in three hierarchies with different grades of
complexity:
"Basic", "Intermediate", and "Advanced":
/home/esterel/EsterelStudio/examples/Basic/Abro
/home/esterel/EsterelStudio/examples/Basic/MooreMealy
/home/esterel/EsterelStudio/examples/Basic/SimpleRam
/home/esterel/EsterelStudio/examples/Intermediate/CRC
/home/esterel/EsterelStudio/examples/Intermediate/Dopar
/home/esterel/EsterelStudio/examples/Intermediate/Excel
/home/esterel/EsterelStudio/examples/Intermediate/Fifo11
/home/esterel/EsterelStudio/examples/Intermediate/ReflexGame
/home/esterel/EsterelStudio/examples/Intermediate/RegisterBank
/home/esterel/EsterelStudio/examples/Advanced/Elevator
/home/esterel/EsterelStudio/examples/Advanced/Fifo22
/home/esterel/EsterelStudio/examples/Advanced/Wristwatch
To try them out, copy a projects directory into a working directory of
yours and start Esterel Studio:
mkdir abro
cd abro
cp -r /home/esterel/EsterelStudio/examples/Basic/Abro/* .
/home/esterel/bin/estudio abro.etp &
Locally Prepared Examples
There are two example directories prepared for use as templates for your own projects:
- /home/esterel/estudio/examples/
Native compilation and execution on the host (Unix/Linux) architecture.
- Makefile:
Input file for the make command.
- ABRO.etp:
Project file for Esterel Studio.
- ABRO.scg:
SyncChart file containing the ABRO machine.
- ABRO.h:
C header file with interface declarations.
- ABRO_data.c:
C code with functions for signal interfacing
and keyboard control.
- /home/esterel/estudio/example-legOS/
Crosscompilation for the
LEGO Mindstorms
system with the alternative operating system
legOS.
- Makefile:
Input file for the make command.
- ABRO.etp:
Project file for Esterel Studio.
- ABRO.scg:
SyncChart file containing the ABRO machine.
- ABRO.h:
C header file with interface declarations.
- ABRO_data.c:
C code with functions for data processing and legOS calls.
Compilation
The compilation of a project into textual Esterel and C code is
started by
Project->Generate Code
The code for the former ABRO example is placed in the following
directories (relative to the working directory):
Default/Code/Temp/ABRO.strl
Default/Code/ABRO_strl.h
Default/Code/ABRO.c
It is possible to perform this task on the command line without
startup of the full graphical interface:
/home/esterel/bin/estudio --embedded ABRO.etp
To compile the resulting Esterel file into C code execute:
/home/esterel/bin/esterel7 -v7 -Lc -W Default/Code/Temp/ABRO.strl
Makefile for the Unix target
The Makefile in /home/esterel/estudio/example compiles
esterel programs for the Unix-Target.
The following targets are
available (replace ABRO with the base name of your project):
- make ABRO
compiles and links the Esterel file ABRO.strl along with
ABRO_data.c into an executable file ABRO.
- make ABRO.c
If you are only interested in the C code generated from the Esterel
file you can use this target. It just calls the Esterel compiler to
produce the C code ABRO.c from ABRO.strl.
Makefile for the legOS target
The Makefile in /home/esterel/estudio/example-legOS compiles
esterel programs for the legOS-Target. It is similar to the one for
Unix with some additional targets for kernel and program upload into
the RCX.
The following targets are
available (replace ABRO-rcx with the base name of your project):
- make ABRO.lx
compiles and links the Esterel file ABRO.strl along with
ABRO_data.c into a binary image ABRO.lx.
This image can be uploaded into the RCX to be executed.
- make ABRO.c
If you are only interested in the C code generated from the Esterel
file you can use this target. It just calls the Esterel compiler to
produce the C code ABRO.c from ABRO.strl.
-
make ABRO.dll
uploads the binary image ABRO.lx into the RCX.
If ABRO.lx is not existant or not up to date, then it is rebuilt.
-
make kernel
just uploads the kernel into the RCX (e.g. after a crash)
Documentation
Several documents are available: Manuals for EsterelStudio and textual
Esterel. For copyright
reasons we can not provide HTTP links to these files. Therefore they are only
locally available via FILE links to the directory /home/esterel/EsterelStudio/doc:
Further information is also available here .