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

elsif_list(ie), func, trans, types) ∧<br />

CheckPreCondGen(<br />

else_case(ie), func, trans, types),<br />

CaseExpr(cond, cbl) →<br />

CheckPreCondGen(cond, func, trans, types) ∧<br />

CheckPreCondGenCaseBranch(<br />

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

end,<br />

/∗Checks if a value expression list contains generators<br />

or hidden generators.∗/<br />

/∗<br />

Arguments:<br />

=======<br />

vel: the value expression list<br />

Results:<br />

=====<br />

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

not contain generators, false otherwise<br />

∗/<br />

CheckPreCondGenProduct :<br />

ValueExpr ∗ × FUNC × TRANS × TYPES → Bool<br />

CheckPreCondGenProduct(vel, func, trans, types) ≡<br />

if vel = 〈〉 then true<br />

else<br />

CheckPreCondGen(hd vel, func, trans, types) ∧<br />

CheckPreCondGenProduct(tl vel, func, trans, types)<br />

end,<br />

/∗Checks if a set expression contains generators<br />

or hidden generators.∗/<br />

/∗<br />

Arguments:<br />

=======<br />

se: the set expression<br />

Results:<br />

=====<br />

Bool: true if the set expression does not contain<br />

generators, false otherwise<br />

∗/<br />

CheckPreCondGenSet :<br />

SetExpr × FUNC × TRANS × TYPES → Bool<br />

CheckPreCondGenSet(se, func, trans, types) ≡<br />

case se <strong>of</strong><br />

156

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

Saved successfully!

Ooh no, something went wrong!