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

case v <strong>of</strong><br />

Make_Constructor(c) → 〈〉,<br />

RecordVariant(c, ckl) →<br />

getTYPINGSComponentKindList(ckl)<br />

end,<br />

/∗Gets an id list to the TYPINGS map from a component<br />

kind list.∗/<br />

/∗<br />

Arguments:<br />

=======<br />

ckl: the component kind list<br />

Results:<br />

=====<br />

Id_list: the resulting list <strong>of</strong> ids<br />

∗/<br />

getTYPINGSComponentKindList :<br />

ComponentKind ∗ → Id ∗<br />

getTYPINGSComponentKindList(ckl) ≡<br />

if ckl = 〈〉 then 〈〉<br />

else<br />

removeDupletsId(<br />

getTYPINGSTypeExpr(type_expr(hd ckl)) <br />

getTYPINGSComponentKindList(tl ckl))<br />

end,<br />

/∗Gets an id list to the TYPINGS map from a name<br />

or wildcard list.∗/<br />

/∗<br />

Arguments:<br />

=======<br />

nwl: the name or wildcard list<br />

Results:<br />

=====<br />

Id_list: the resulting list <strong>of</strong> ids<br />

∗/<br />

getTYPINGSNameWildcardList :<br />

NameOrWildcard ∗ → Id ∗<br />

getTYPINGSNameWildcardList(nwl) ≡<br />

if nwl = 〈〉 then 〈〉<br />

else<br />

removeDupletsId(<br />

getTYPINGSNameWildcard(hd nwl) <br />

getTYPINGSNameWildcardList(tl nwl))<br />

283

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

Saved successfully!

Ooh no, something went wrong!