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.

APPENDIX C. FORMAL SPECIFICATIONS OF TRANSFORMATIONS<br />

then<br />

〈Make_ValueOrVariableName(<br />

mk_ValueOrVariableName(trans(id)))〉<br />

else 〈〉<br />

end,<br />

TypeExprProduct(tep) →<br />

getTOIReturnsListProduct(tep, trans),<br />

TypeExprSet(tes) → 〈〉,<br />

TypeExprList(tel) → 〈〉,<br />

TypeExprMap(tem) → 〈〉,<br />

FunctionTypeExpr(arg, fa, res) →<br />

getTOIReturnsList(type_expr(res), trans),<br />

BracketedTypeExpr(bte) →<br />

getTOIReturnsList(bte, trans)<br />

end,<br />

/∗Gets the variables corresponding to the type<br />

expression.∗/<br />

/∗<br />

Arguments:<br />

=======<br />

tel: the type expression list<br />

Result:<br />

=======<br />

ValueExpr_list: the result<br />

∗/<br />

getTOIReturnsListProduct :<br />

TypeExpr ∗ × TRANS → ValueExpr ∗<br />

getTOIReturnsListProduct(tel, trans) ≡<br />

if tel = 〈〉 then 〈〉<br />

else<br />

getTOIReturnsList(hd tel, trans) <br />

getTOIReturnsListProduct(tl tel, trans)<br />

end,<br />

/∗Gets the type names corresponding to the type<br />

expression.∗/<br />

/∗<br />

Arguments:<br />

=======<br />

te: the type expression<br />

Result:<br />

=======<br />

Access_list: the return values<br />

244

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

Saved successfully!

Ooh no, something went wrong!