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.

APPENDIX C. FORMAL SPECIFICATIONS OF TRANSFORMATIONS<br />

TROptValueExprList :<br />

OptionalValueExprList × ExpType × FUNC × TRANS ×<br />

TYPES →<br />

OptionalValueExprList × TYPES<br />

TROptValueExprList(ovel, et, func, trans, types) ≡<br />

case ovel <strong>of</strong><br />

ValueExprList(vel) →<br />

let<br />

(vel ′ , types ′ ) =<br />

TRValueExprListOpt(<br />

vel, et, func, trans, types)<br />

in<br />

(ValueExprList(vel ′ ), types ′ )<br />

end,<br />

NoValueExprList → (ovel, types)<br />

end,<br />

/∗Transforms an optional value expression pair<br />

list.∗/<br />

/∗<br />

Arguments:<br />

=======<br />

ovel: the optional value expression pair list<br />

et: the expected type the components <strong>of</strong> the map<br />

expression<br />

Result:<br />

=======<br />

OptionalValueExprPairList: the imperative version<br />

<strong>of</strong> the optional value expression pair list<br />

∗/<br />

TROptValueExprPairList :<br />

OptionalValueExprPairList × MapType × FUNC ×<br />

TRANS × TYPES →<br />

OptionalValueExprPairList × TYPES<br />

TROptValueExprPairList(ovel, et, func, trans, types) ≡<br />

case ovel <strong>of</strong><br />

ValueExprPairList(vel) →<br />

let<br />

(vel ′ , types ′ ) =<br />

TRValueExprPairListOpt(<br />

vel, et, func, trans, types)<br />

in<br />

(ValueExprPairList(vel ′ ), types ′ )<br />

end,<br />

204

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

Saved successfully!

Ooh no, something went wrong!