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 />

ovel: the optional value expression list<br />

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

value expression list<br />

Results:<br />

=====<br />

Bool: true if the optional value expression list<br />

is transformable, false otherwise<br />

∗/<br />

CheckOptValueExprList :<br />

OptionalValueExprList × ExpType × TYPINGS ×<br />

FUNC × TRANS × ENV × TYPES →<br />

Bool × ENV × TYPES<br />

CheckOptValueExprList(<br />

ovel, et, typings, func, trans, env, types) ≡<br />

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

ValueExprList(vel) →<br />

CheckValueExprList(<br />

vel, toExpTypeList(et, len vel), typings,<br />

func, trans, env, types),<br />

NoValueExprList → (true, env, types)<br />

end,<br />

/∗Checks for transformability <strong>of</strong> an optional value<br />

expression pair list.∗/<br />

/∗<br />

Arguments:<br />

=======<br />

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

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

value expression pair list<br />

Results:<br />

=====<br />

Bool: true if the optional value expression pair<br />

list is transformable, false otherwise<br />

∗/<br />

CheckOptValueExprPairList :<br />

OptionalValueExprPairList × MapType × TYPINGS ×<br />

FUNC × TRANS × ENV × TYPES →<br />

Bool × ENV × TYPES<br />

CheckOptValueExprPairList(<br />

ovel, et, typings, func, trans, env, types) ≡<br />

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

ValueExprPairList(vel) →<br />

CheckValueExprPairList(<br />

169

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

Saved successfully!

Ooh no, something went wrong!