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

→ Unknown<br />

end,<br />

→ Unknown<br />

end,<br />

/∗Returns the expected type <strong>of</strong> the components<br />

<strong>of</strong> a list expression.∗/<br />

/∗<br />

Arguments:<br />

=======<br />

et: the expected type <strong>of</strong> the list expression<br />

Results:<br />

=====<br />

ExpType: the expected type <strong>of</strong> the componenets<br />

<strong>of</strong> the list expression<br />

∗/<br />

getListType : ExpType → ExpType<br />

getListType(et) ≡<br />

case et <strong>of</strong><br />

Known(te) →<br />

case te <strong>of</strong><br />

TypeExprList(tes) →<br />

case tes <strong>of</strong><br />

FiniteListTypeExpr(fse) → Known(fse),<br />

InfiniteListTypeExpr(ise) → Known(ise)<br />

end,<br />

→ Unknown<br />

end,<br />

→ Unknown<br />

end,<br />

/∗Returns the expected types <strong>of</strong> the components<br />

<strong>of</strong> a map expression.∗/<br />

/∗<br />

Arguments:<br />

=======<br />

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

Results:<br />

=====<br />

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

<strong>of</strong> the map expression<br />

∗/<br />

getMapType : ExpType → MapType<br />

getMapType(et) ≡<br />

233

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

Saved successfully!

Ooh no, something went wrong!