14.09.2014 Views

Sémantique Axiomatique ou Logique de Hoare - Ensiie

Sémantique Axiomatique ou Logique de Hoare - Ensiie

Sémantique Axiomatique ou Logique de Hoare - Ensiie

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Exemple <strong>de</strong> spécification et <strong>de</strong> programme (Fact)<br />

{x = n ∧ n > 0}<br />

y := 1 ;<br />

while not(x = 1) do (y := y * x ; x := x - 1) od<br />

{y = n! ∧ n > 0}<br />

Ici n est variable logique (elle permet <strong>de</strong> se référer à la valeur initiale<br />

<strong>de</strong> x)<br />

(ENSIIE) <strong>Hoare</strong> 7 / 52

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

Saved successfully!

Ooh no, something went wrong!