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 D. SPECIFICATION OF TRANSFORMER IN RSL1<br />

end<br />

end<br />

else true<br />

end<br />

end<br />

else false<br />

end,<br />

CheckPreCondGenLetDef :<br />

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

CheckPreCondGenLetDef(ldl, func, trans, types) ≡<br />

if ldl = 〈〉 then true<br />

else<br />

and(<br />

CheckPreCondGen(<br />

value_expr(hd ldl), func, trans, types),<br />

CheckPreCondGenLetDef(<br />

tl ldl, func, trans, types))<br />

end,<br />

CheckPreCondGenElsif :<br />

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

CheckPreCondGenElsif(eil, func, trans, types) ≡<br />

if eil = 〈〉 then true<br />

else<br />

and(<br />

and(<br />

CheckPreCondGen(<br />

condition(hd eil), func, trans, types),<br />

CheckPreCondGen(<br />

elsif_case(hd eil), func, trans, types)),<br />

CheckPreCondGenElsif(tl eil, func, trans, types)<br />

)<br />

end,<br />

CheckPreCondGenCaseBranch :<br />

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

CheckPreCondGenCaseBranch(cbl, func, trans, types) ≡<br />

if cbl = 〈〉 then true<br />

else<br />

and(<br />

CheckPreCondGen(<br />

value_expr(hd cbl), func, trans, types),<br />

CheckPreCondGenCaseBranch(<br />

324

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

Saved successfully!

Ooh no, something went wrong!