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.

Exercice<br />

Let L the following piece of co<strong>de</strong> :<br />

while (i != n) do<br />

i:=i+1;<br />

s:=s+(2*i-1)<br />

Check s = i ∗ i is an invariant for L !<br />

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

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

Saved successfully!

Ooh no, something went wrong!