Transformation of Applicative Specifications into Imperative ...

Transformation of Applicative Specifications into Imperative ... Transformation of Applicative Specifications into Imperative ...

26.09.2013 Views

APPENDIX D. SPECIFICATION OF TRANSFORMER IN RSL1 types, prlet) else case te of TypeLiteral(literal) → mk_BOOL_FFP_ENV_TYPES_LDL( true, ffpl, env, overrideTYPES( types, mk_TYPES( 〈mk_TYPESMapEntrance( makeBinding(binding_list(ffpl)), Known(te))〉)), prlet), TypeName(id) → if isinId(id, domainTRANS(trans)) then mk_BOOL_FFP_ENV_TYPES_LDL( true, mk_FormalFunctionParameter(〈〉), overrideENV( env, mk_ENV( 〈mk_ENVMapEntrance( id, makeBinding(binding_list(ffpl)) )〉)), overrideTYPES( types, makeTYPESMap(binding_list(ffpl), te)), makeProductLet( te, makeBinding(binding_list(ffpl)), prlet, trans)) else mk_BOOL_FFP_ENV_TYPES_LDL( true, ffpl, env, overrideTYPES( types, mk_TYPES( 〈mk_TYPESMapEntrance( makeBinding(binding_list(ffpl)), Known(te))〉)), prlet) end, TypeExprProduct(tep) → TRFFPProduct( ffpl, tep, trans, env, types, prlet), TypeExprSet(tes) → 362

D.2. FORMAL SPECIFICATION OF THE TRANSFORMER IN RSL1 mk_BOOL_FFP_ENV_TYPES_LDL( true, ffpl, env, overrideTYPES( types, mk_TYPES( 〈mk_TYPESMapEntrance( makeBinding(binding_list(ffpl)), Known(te))〉)), prlet), TypeExprList(tel) → mk_BOOL_FFP_ENV_TYPES_LDL( true, ffpl, env, overrideTYPES( types, mk_TYPES( 〈mk_TYPESMapEntrance( makeBinding(binding_list(ffpl)), Known(te))〉)), prlet), TypeExprMap(tem) → mk_BOOL_FFP_ENV_TYPES_LDL( true, ffpl, env, overrideTYPES( types, mk_TYPES( 〈mk_TYPESMapEntrance( makeBinding(binding_list(ffpl)), Known(te))〉)), prlet), FunctionTypeExpr(tef, fa, rd) → TRFormalFuncParam( ffpl, tef, trans, env, overrideTYPES( types, mk_TYPES( 〈mk_TYPESMapEntrance( makeBinding(binding_list(ffpl)), Known(te))〉)), prlet), BracketedTypeExpr(bte) → TRFormalFuncParam( ffpl, bte, trans, env, types, prlet) end end, TRFFPProduct : FormalFunctionParameter × TypeExpr ∗ × TRANS × ENV × TYPES × LetDef ∗ → 363

APPENDIX D. SPECIFICATION OF TRANSFORMER IN RSL1<br />

types, prlet)<br />

else<br />

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

TypeLiteral(literal) →<br />

mk_BOOL_FFP_ENV_TYPES_LDL(<br />

true, ffpl, env,<br />

overrideTYPES(<br />

types,<br />

mk_TYPES(<br />

〈mk_TYPESMapEntrance(<br />

makeBinding(binding_list(ffpl)),<br />

Known(te))〉)), prlet),<br />

TypeName(id) →<br />

if isinId(id, domainTRANS(trans))<br />

then<br />

mk_BOOL_FFP_ENV_TYPES_LDL(<br />

true, mk_FormalFunctionParameter(〈〉),<br />

overrideENV(<br />

env,<br />

mk_ENV(<br />

〈mk_ENVMapEntrance(<br />

id,<br />

makeBinding(binding_list(ffpl))<br />

)〉)),<br />

overrideTYPES(<br />

types,<br />

makeTYPESMap(binding_list(ffpl), te)),<br />

makeProductLet(<br />

te, makeBinding(binding_list(ffpl)),<br />

prlet, trans))<br />

else<br />

mk_BOOL_FFP_ENV_TYPES_LDL(<br />

true, ffpl, env,<br />

overrideTYPES(<br />

types,<br />

mk_TYPES(<br />

〈mk_TYPESMapEntrance(<br />

makeBinding(binding_list(ffpl)),<br />

Known(te))〉)), prlet)<br />

end,<br />

TypeExprProduct(tep) →<br />

TRFFPProduct(<br />

ffpl, tep, trans, env, types, prlet),<br />

TypeExprSet(tes) →<br />

362

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

Saved successfully!

Ooh no, something went wrong!