26.09.2013 Views

Transformation of Applicative Specifications into Imperative ...

Transformation of Applicative Specifications into Imperative ...

Transformation of Applicative Specifications into Imperative ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

C.1. FORMAL SPECIFICATION OF THE TRANSFORMER<br />

else<br />

let<br />

ar =<br />

getAccessGen(<br />

idset, hd vel, hd etl, func, trans),<br />

ar ′ =<br />

getAccessGenListList(<br />

idSet(ar), tl vel, tl etl, func, trans)<br />

in<br />

mk_AccessResult(<br />

removeDuplets(<br />

accessList(ar) accessList(ar ′ )),<br />

idSet(ar ′ ))<br />

end<br />

end,<br />

/∗Returns an access list <strong>of</strong> the values <strong>of</strong> types<br />

<strong>of</strong> interest read from during evaluation <strong>of</strong> a<br />

function.∗/<br />

/∗<br />

Arguments:<br />

=======<br />

idset: the functions already evaluated<br />

ldl: the let definition list<br />

Result:<br />

=======<br />

AccessResult: the corresponding access result<br />

∗/<br />

getAccessGenLetDefList :<br />

Id-set × LetDef ∗ × FUNC × TRANS →<br />

AccessResult<br />

getAccessGenLetDefList(idset, ldl, func, trans) ≡<br />

if ldl = 〈〉 then mk_AccessResult(〈〉, idset)<br />

else<br />

let<br />

ar =<br />

getAccessGen(<br />

idset, value_expr(hd ldl), Unknown, func,<br />

trans),<br />

ar ′ =<br />

getAccessGenLetDefList(<br />

idSet(ar), tl ldl, func, trans)<br />

in<br />

mk_AccessResult(<br />

271

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

Saved successfully!

Ooh no, something went wrong!