Luster (programming language)

from Wikipedia, the free encyclopedia

Luster is a synchronous declarative programming language .

History of Luster

Like Esterel , Luster was created in the early 1980s. Here, too, the lack of suitable programming languages and software systems for reactive systems was the decisive reason. With the merger of several French researchers, the "synchronous language school" was created. From the suggestions made by the researchers, the choice was made for Luster, as this was the simplest. Luster has been developed a lot since then and is now available in version V4 with many different tools ( compilers , simulators, test tools, code generators).

Areas of application of Luster

Like reactive systems in general, Luster is used in safety-critical systems such as aircraft and power plant controls. For example, the flight control in the Airbus A320 , the emergency shutdown of nuclear power plants and the control of driverless subways were implemented in Luster. Luster is mainly used for programming and controlling this type of system.

Program structure

The program structure in Luster can be represented graphically as a network of operators. Subroutines (nodes) are also represented as separate operators and are used accordingly several times.

In Luster there are only a few of the usual variable types, so there are only boolean, integer, real and tuple. Of the operators, the basic ones are available:

  • arithmetic operators: + - * / div mod
  • boolean operators: and or not
  • relational operators: == < <= > >=
  • conditional action: if then else if then else

In addition there are four river Operators (temporal operators) ( pre, ->, when, current). These are used specifically for data flow access. For example, the operator returns prethe state of the previous point in time of the variable.

The operator ->(followed by) is used to initialize variables. For example X = 0 -> pre(X) + 1, this means that Xthe first point in time is 0 and for all others the previous value is taken and increased by 1.

Below is a small Luster code example:

node A(b: bool; i: int; x: real) returns (y: real);
   var j: int; z: real;
   let j = if b then 0 else i;
       z = B(j, x);
       y = if b then pre(z) else C(z);<
   tel.

In this example a procedure (node) with the name "A" is described. The other procedures "B" and "C" used are defined elsewhere in the program. "A" is initialized with three input flows (b, i, x) and returns one (y).

Timing in Luster

The timing at Luster is arguably the main advantage of this language. It is based on a logical timing and is counted in discrete times. Logical timing, however, says nothing about the length or time between the individual points in time. Rather, it is here a reference to the values ​​of the variables and expressions during the current and / or another point in time. New values ​​are always added to the end of the value queue.

Relationship between variables and clock
Variable X X 0 X 1 X 2 X 3 ... X n
clock 0 1 2 3 ... n

This precisely defines which value is valid at which point in time.

Compile

The Luster Compiler not only checks the syntax of the program code, but also other important requirements:

  • Definition control: Here it is checked whether each variable has really only been defined once
  • Clock consistency: all combined expressions and variables must have the same clock basis
  • non-recursive calls: recursive calls are not allowed in Luster
  • non-null values: are only allowed for non-clock-dependent variables and outputs, all others must be initialized.

verification

The automaton generated by the compiler can then be verified with additional tools (Lurette, Lucky). Since Luster is mainly used for safety-critical systems and human lives often depend on it, verification is a very important aspect. For example, it is not relevant whether a train ever stops, but rather whether the train stops when the signal is red.

Individual evidence

  1. VERIMAG Research Center ( Memento of the original dated December 9, 2006 in the Internet Archive ) Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. - France (11/2005) @1@ 2Template: Webachiv / IABot / www-verimag.imag.fr
  2. a b c N. Halbwachs, P. Caspi, P. Raymond, D. Pilaud: The synchronous dataflow programming language LUSTRE. In: Journal: Proceedings of the IEEE volume 79.
  3. P. Caspi, D. Pilaud, N. Halbwachs, JA Plaice: LUSTER: A declarative language for programming synchronous systems. October 15, 1986.
  4. ^ A b P. Caspi, D. Pilaud, N. Halbwachs, JA Plaice: LUSTER: A declarative language for programming synchronous systems. October 15, 1986
  5. SYNCHRONE. VERIMAG Research Center (France), 11/2005