Lustre Examples
Here is a superset of the example lustre programs seen in class. Clicking on the link will open the example within the on-line version of Kind 2.
- Abs
- Const123
- DownCounter, DownCounters
- EvensFrom
- Factorial
- FallingEdge, FallingEdge2
- Fibonacci
- First
- RisingEdge
- Simple Switch
- Since
- SinceIncl
- Sofar
- Sum
- Switch
- Switches
- TrafficLight, TrafficLight2, TrafficLight3
- UpCounter
If you want to simulate on the programs above:
- Click on the Interpreter tab and write/copy your Lustre nodes in the text window.
- After that, click on the Make Table button and fill in the input you want
- Finally, click Run to simulate the program.
- Click on Remove Column and Add Column to change the number of steps in the simulation.
Observer nodes
- ReqEdge
- ReqIgnoresSecond
- ReqSwitch
- ReqSwitches
- ReqSwitchInt
- ReqTrafficLight, ReqTrafficLight2, ReqTrafficLight3
If you want to verify properties of a Lustre program expressed in an observer node above:
- Click on the Property Checker tab.
- Click on the Check button to start the checker.
- If a property is falsified by the checker, you can click on it to see a falsifying execution in the Interpreter tab.