[SOLVED] CS550 Exercises 7

35.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Exercises7-db8cyz.zip (285.4 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
5/5 - (2 votes)

Exercises 7
Exercise 1 (Iterating sp and wp). This question is inspired by relationships in a transition system. Let S be a non-empty set of states and r βŠ† S Γ— S.
As usual, define
β€’ for every P βŠ† S, sp(P,r) = {xβ€² | βˆƒx ∈ P.(x,xβ€²) ∈ r}
β€’ for every Q βŠ† S, wp(r,Q) = {x | βˆ€xβ€².(x,xβ€²) ∈ r β†’ xβ€² ∈ Q}
Let C = 2S = {X | X βŠ† S} be the set of all sets of states. Let also: Init βŠ† S and Good βŠ† S. Define:
β€’ F : C β†’ C as F(X) = Init βˆͺ sp(X,r)
β€’ B : C β†’ C as B(Y ) = Good ∩ wp(r,Y )
β€’ l = Siβ‰₯0 Fi(βˆ…)
β€’ h = Tiβ‰₯0 Bi(S)
The ordering relation we consider is βŠ† relation on C. For each of the following determine if the property holds or not. If it holds, prove it. If it doesn’t, give a counterexample.
1. F is monotonic
2. B is monotonic
3. l is the least fixed point of F.
4. h is the greatest fixed point of B.
5. l βŠ† h.
6. l βŠ† Good implies Init βŠ† h
7. Init βŠ† h implies l βŠ† Good
1
Exercise 2 (Fix points in lattices). Consider a complete lattice with the set of elements L and the partial order βŠ‘. (Remember that in a complete lattice, every set X βŠ† L has the least upper bound and the greatest lower bound.)
Let G : L β†’ L be a monotonic function with respect to βŠ‘. Let
Fix = {x ∈ L | G(x) = x}
be the set of all fixed points. Let x,y ∈ Fix be two fixed points. Prove or disprove:
1. x βŠ” y βŠ‘ G(x βŠ” y)
2. G(x βŠ” y) βŠ‘ x βŠ” y
3. x βŠ” y ∈ Fix
4. Let B = {b ∈ Fix | x βŠ‘ b∧y βŠ‘ b}. Then B has the least element, that is, an element z ∈ B such that βˆ€b ∈ B. z βŠ‘ b (Possibly difficult.)
Exercise 3 (Abstract interpretation). Consider a program on two integer variables, that is the set of states is C = 2ZΓ—Z. We want to represent these states in an abstract domain such that this set of state is represented exactly for the first variable, and as intervals for the second variables.
1. Express the lattice A corresonding to this domain.
2. Give expressions for Ξ± : C β†’ A and Ξ³ : A β†’ C and show that this form a Galois Connection.
Exercise 4 (Program analysis). Consider the program that manipulates two integer variables x and y. Consider any assignement of the form x = e, where e is a linear combination of integer variables, for example
x = 2 βˆ— x βˆ’ 5 βˆ— y
Consider an abstract analysis with intervals for both variables. Describe an algorithm that given the syntax tree of e, and intervals for x (noted [ax,bx]) and y (noted [ay,by]) computes the new interval [a,b] for x after the assignement statement.
2

  • Exercises7-db8cyz.zip