Top Qs
Timeline
Chat
Perspective
Lustre (programming language)
Programming language From Wikipedia, the free encyclopedia
Remove ads
Lustre is a formally defined, declarative, and synchronous dataflow programming language for programming reactive systems. It began as a research project in the early 1980s. A formal presentation of the language can be found in the 1991 Proceedings of the IEEE.[1] In 1993 it progressed to practical, industrial use in a commercial product as the core language of the industrial environment SCADE, developed by Esterel Technologies. It is now used for critical control software in aircraft,[2] helicopters, and nuclear power plants.
Remove ads
Structure of Lustre programs
A Lustre program is a series of node definitions, written as:
node foo(a : bool) returns (b : bool);
let
b = not a;
tel
Where foo is the name of the node, a is the name of the single input of this node and b is the name of the single output.
In this example the node foo returns the negation of its input a, which is the expected result.
Inner variables
Additional internal variables can be declared as follows:
node Nand(X,Y: bool) returns (Z: bool);
var U: bool;
let
U = X and Y;
Z = not U;
tel
Note: The equations order doesn't matter, the order of lines U = X and Y; and Z = not U; doesn't change the result.
Special operators
pre p | Returns the value of p in the previous cycle |
p -> q | Set p as the initial value of the expression q |
Remove ads
Examples
Rising Edge detection
node RisingEdge (X : bool) returns (E : bool);
let
E = X and not pre X;
tel
Falling Edge detection
node FallingEdge (X : bool) returns (E : bool);
let
E = not X and pre X;
tel
See also
References
External links
Wikiwand - on
Seamless Wikipedia browsing. On steroids.
Remove ads