
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

(Exercise 1) Two Hoare rule-based proofs
(Exercise 2) Alternative rules for while
{A} c {b ⇒ A ∧ ¬b ⇒ B} {b ⇒ A ∧ ¬b ⇒ B} while b do c {B}Show that the system of axioms remains complete if we replace the old rule for while with this one. You must show that any derivation that uses the old rule for while can be written with this rule instead.
{A ∧ b} c {A} {A}while b do c {A}This rule is not complete. Give a counterexample and a short justification.
` {A}while b do c {A ∧ ¬b}
This rule is also incomplete. Give a counterexample and a short justification.
(Exercise 3) In the abstract interpretation example with the factorial, you can see that the analysis was rather imprecise. How can you improve the result of this analysis by: