The Lustre Programming Language and Related Tools

Lustre is a programming language designed in the Synchrone team of Verimag. It is the core of the SCADE industrial tool to design critical real-time reactive systems.

In the recent years, we have been working on several other synchronous languages:
— Argos: a pure synchronous automaton-based language, inspired from the Statecharts constructs;
— Mode-automata: a way of combining Argos automata with Lustre equations, in order to describe running-modes of embedded reactive systems;
— Larissa: a extension of Argos with aspect-oriented features;
— Lutin : a language for the description and execution of non-deterministic reactive systems.

Lustre, the Core Language

Lustre is a synchronous declarative language for programming reactive systems. the declarative style of the language means the following: a Lustre program is an unordered set of equations linking the variables of the program; these equations always hold during the execution of the program.

This approach was inspired from formalisms familiar to control engineers, like systems of differential equations or synchronous operator networks (block diagrams). A program variable in Lustre is considered to be a function of multi-form time: it has an associated clock which defines the sequence of instants when the variable takes its values. In that sense, Lustre belongs to the family of synchronous languages (like Esterel and Signal).

Lustre is the kernel language of the SCADE (formerly SAO+/SAGA) industrial environment developed by Esterel-Technologies.

Lustre Arrays

Arrays were introduced in the language for the description of hardware systems [1].
Lustre-V4 includes operators like slice extraction, concatenation and a static recursion mechanism, all well adapted to the description of hardware systems.

This set of operations is however not well-suited for the description of software systems: their compilation leads to imperative code with independent variables corresponding to array elements. In the V6 version of Lustre, we introduced array iterators, inspired from classical functional operators like map and fold, that can always be compiled into imperative code with arrays and loops [2].

Lutin : a language for the simulation of non-deterministic reactive behaviors

The main challenge to automate a testing or a simulation process is to be able to automate the generation of realistic input sequences to feed the program. In other words, we need an executable model of the program environment in which inputs are the program outputs, and outputs are the program inputs.

In the first Lurette prototype [3] — an automated testing tool from reactive programs designed at Verimag —, the System Under Test (SUT) environment behavior was described by Lustre observers specifying what realistic SUT inputs should be. In other words, the environment was modeled by a set of (linear) constraints over Boolean and numeric variables. The work of Lurette was to solve those constraints, and to draw a value among the solutions to produce one SUT input vector. But, from the point of view of language expressivity, Lustre observers happen to be too restrictive, in particular to express sequences of d testing scenarios, or to have some control over the probabilistic distribution of the drawn solution. It was precisely to overcome those limitations that the new language Lutin, was designed.

Reglo: from regular expressions to Lustre observers

Argos: a automaton-based synchronous language

Argos has been studied from 1987 to 1994. The complete definition can be found in this article. See also the PhD by Muriel Jourdan.
Argos is a synchronous language inspired from the graphical notation of Statecharts. It has been extended by Charles André (Nice university) to give the language SyncCharts. The Safe State Machines (SSM) included in SCADE are very similar to Argos.

Here’s a typical Argos program:

This example describes a modulo-8 counter. The global input is the signal named a, the global output is named hi. The counter is made of three parallel processes (one process per bit) that communicate by internal signals. The main structure is an automaton that starts and stops the three-bit counter. This program may be compiled into a single "flat" automaton, having 8 states, which is exactly the one we would have written by hand (no more states, no more transitions). This demonstrates that the synchronous product of Mealy machines (the semantics of the Argos parallel composition) is a perfect support for a notion of design parallelism, i.e., a notion of parallelism that can be used with no constraints at the design level, while being compiled in a minimal flat automaton. Notice that no other description of such a counter (with a synchronous product of Moore machines, or with asynchronous products) has this interesting property.

Mode-Automata: a new construct for running modes in a dataflow language

Mode-Automata are a new programming construct that helps building systems that exhibit clear "running modes". Technically, they are defined as automata, whose states are labeled by Lustre-style dataflow equations, and which can be composed with Statecharts-like operators (parallel composition, hierarchic composition). The presentation Automata in the Family of Synchronous Languages explains how mode-automata follow from Argos, and Argos+Lustre. See also the Phd of Yann Rémond. (The MATOU logo is due to Yann Rémond).

Larissa: Aspect-oriented Features for a Synchronous Language

Larissa is an extension of Argos with aspect-oriented features.
Information can be found on the former page of David Stauch, but please note that the contact email is no longer valid. Use Karine.Altisenimag.fr instead.