25.06.2013 Views

Vérification avec Lustre/Lesar

Vérification avec Lustre/Lesar

Vérification avec Lustre/Lesar

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

node compteur(sec,bal: bool)<br />

returns (alheure,retard,avance: bool);<br />

var diff : int;<br />

let<br />

tel<br />

diff = (0 -> pre diff) +<br />

(if bal then 1 else 0) +<br />

(if sec then -1 else 0);<br />

avance = (true -> pre alheure) and (diff > 3)<br />

or (false -> pre avance) and (diff > 1);<br />

retard = (true -> pre alheure) and (diff < -3)<br />

or (false -> pre retard) and (diff < -1);<br />

alheure = not (avance or retard);<br />

Le langage <strong>Lustre</strong> Exemple du compteur de balises<br />

10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!