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.

C.1. FORMAL SPECIFICATION OF THE TRANSFORMER<br />

CheckComponentKindList(<br />

id, cl, typings, func, trans),<br />

→ true<br />

end,<br />

/∗Checks for transformability <strong>of</strong> a component kind<br />

list.∗/<br />

/∗<br />

Arguments:<br />

=======<br />

id: the id <strong>of</strong> the type definition<br />

cl: the list <strong>of</strong> component kinds<br />

Results:<br />

=====<br />

Bool: true if the list is transformable, false<br />

otherwise<br />

∗/<br />

CheckComponentKindList :<br />

Id × ComponentKind ∗ × TYPINGS × FUNC × TRANS →<br />

Bool<br />

CheckComponentKindList(id, cl, typings, func, trans) ≡<br />

if cl = 〈〉 then true<br />

else<br />

CheckComponentKind(id, hd cl, typings, func, trans) ∧<br />

CheckComponentKindList(<br />

id, tl cl, typings, func, trans)<br />

end,<br />

/∗Checks for transformability <strong>of</strong> a component kind.<br />

∗/<br />

/∗<br />

Arguments:<br />

=======<br />

id: the id <strong>of</strong> the type definition<br />

c: the component kind<br />

Results:<br />

=====<br />

Bool: true if the component kind is transformable,<br />

false otherwise<br />

∗/<br />

CheckComponentKind :<br />

Id × ComponentKind × TYPINGS × FUNC × TRANS →<br />

Bool<br />

CheckComponentKind(id, c, typings, func, trans) ≡<br />

149

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

Saved successfully!

Ooh no, something went wrong!