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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

〈Known(TypeLiteral(BOOL))〉 〈et〉 <br />

elsifToTypeList(tl eil, et)<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 />

vel: the value expression list<br />

et: the expected type <strong>of</strong> the arguments <strong>of</strong> the<br />

function<br />

Result:<br />

=======<br />

AccessResult: the corresponding access result<br />

∗/<br />

getAccessObsList :<br />

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

AccessResult<br />

getAccessObsList(idset, vel, et, func, trans) ≡<br />

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

else<br />

let<br />

ar =<br />

getAccessObs(<br />

idset, hd vel, getHead(et), func, trans),<br />

ar ′ =<br />

getAccessObsList(<br />

idSet(ar), tl vel, getTail(et), 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 />

259

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

Saved successfully!

Ooh no, something went wrong!