
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) Prove the following statement. For any boolean command b and any initial state σ such that σ(x) is even, if [[ while b do x := x + 2 ]]σ = σ′^ and if σ′^6 = ⊥ then σ′(x) is even. Unlike in previous assignment, this time you should use denotational semantics for the proof.
(Exercise 2) Monotonicity and continuity
(Exercise 3) Recall that we obtained the least fixed point of a continuous function F : D → D by starting with ⊥ = F 0 (⊥) and repeatedly applying F to the result. Let’s explore what happens if we do not start with ⊥ but with some other element x ∈ D.
i F^
i(x) is a fixed-point and furthermore it is the least of all fixed-points that are w than x.
i F^
i(x) to be the overall least-fixed point.
(Exercise 4) We obtained a recursive equation for the semantics of the while statement in IMP. Then we argued that the equation admits too many solutions and we made the informal observation that all of the solutions disagree only on inputs for which the while does not terminate. Now we’ll explore this issue formally. Consider a flat domain D and F a continuous function (F ∈ (D −→ D) −→ (D −→ D)). We’ll refer to the least-fixed point of F as LFP(F ). Recall that we defined the semantics of while to be just such a least fixed point for some function F. Prove or disprove both implications in the following statement for some arbitrary continuous function f : (D −→ D):
f = F (f ) iff ∀x ∈ D.LFP(F )(x) = ⊥ or f (x) = LFP(F )(x)