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

end,<br />

TypeExprSet(tes1) →<br />

case te2 <strong>of</strong><br />

TypeExprSet(tes2) →<br />

equalsTypesSet(tes1, tes2),<br />

→ false<br />

end,<br />

TypeExprList(tel1) →<br />

case te2 <strong>of</strong><br />

TypeExprList(tel2) →<br />

equalsTypesList(tel1, tel2),<br />

→ false<br />

end,<br />

TypeExprMap(tem1) →<br />

case te2 <strong>of</strong><br />

TypeExprMap(tem2) →<br />

equalsTypesMap(tem1, tem2),<br />

→ false<br />

end,<br />

FunctionTypeExpr(fte1, fa1, rd1) →<br />

case te2 <strong>of</strong><br />

FunctionTypeExpr(fte2, fa2, rd2) →<br />

equalsTypes(fte1, fte2) ∧ fa1 = fa2 ∧<br />

equalsTypes(type_expr(rd1), type_expr(rd2)),<br />

→ false<br />

end,<br />

BracketedTypeExpr(bte1) →<br />

case te2 <strong>of</strong><br />

BracketedTypeExpr(bte2) →<br />

equalsTypes(bte1, bte2),<br />

→ false<br />

end<br />

end,<br />

/∗Compares two type expression lists.∗/<br />

/∗<br />

Arguments:<br />

=======<br />

tel1: the type expression list<br />

tel2: the type expression list<br />

Results:<br />

=====<br />

Bool: true if they are identical, false otherwise<br />

∗/<br />

226

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

Saved successfully!

Ooh no, something went wrong!