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 />

temp := x;<br />

x:= y;<br />

y := temp<br />

Let P this program.<br />

Prove using the <strong>Hoare</strong>’s rules that<br />

is valid.<br />

{x = a ∧ y = b}P{x = b ∧ y = a}<br />

The standard approach consists in working backwards thr<strong>ou</strong>gh the<br />

co<strong>de</strong>.<br />

How ? Answer : a <strong>de</strong>rivation tree or a more linear presentation<br />

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

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

Saved successfully!

Ooh no, something went wrong!