Transformation of Applicative Specifications into Imperative ...
Transformation of Applicative Specifications into Imperative ... Transformation of Applicative Specifications into Imperative ...
APPENDIX C. FORMAL SPECIFICATIONS OF TRANSFORMATIONS types † [ makeBinding(binding_list(ffpl)) ↦→ Known(te) ], prlet), TypeName(id) → if id ∈ dom trans then /∗Formal function parameter of a type of interest. ∗/ (true, mk_FormalFunctionParameter(〈〉), env † [ id ↦→ makeBinding(binding_list(ffpl)) ], types † makeTYPESMap(binding_list(ffpl), te), makeProductLet( te, makeBinding(binding_list(ffpl)), prlet, trans)) else /∗Formal function parameter not of a type of interest. ∗/ (true, ffpl, env, types † [ makeBinding(binding_list(ffpl)) ↦→ Known(te) ], prlet) end, TypeExprProduct(tep) → TRFFPProduct( ffpl, tep, trans, env, types, prlet), TypeExprSet(tes) → (true, ffpl, env, types † [ makeBinding(binding_list(ffpl)) ↦→ Known(te) ], prlet), TypeExprList(tel) → (true, ffpl, env, types † [ makeBinding(binding_list(ffpl)) ↦→ Known(te) ], prlet), TypeExprMap(tem) → (true, ffpl, env, types † [ makeBinding(binding_list(ffpl)) ↦→ Known(te) ], prlet), /∗Higher order functions.∗/ FunctionTypeExpr(tef, fa, rd) → 190
C.1. FORMAL SPECIFICATION OF THE TRANSFORMER TRFormalFuncParam( ffpl, tef, trans, env, types † [ makeBinding(binding_list(ffpl)) ↦→ Known(te) ], prlet), BracketedTypeExpr(bte) → TRFormalFuncParam( ffpl, bte, trans, env, types, prlet) end end, /∗Transforms a formal function parameter list. ∗/ /∗ Arguments: ======= ffpl: the formal function parameter list tel: the corresponding type expression list prlet: let expression used to access types of interests that are abbreviation types Result: ======= FormalFunctionParameter_list: the imperative version of the formal function parameter list LetDef_list: the resulting let expression ∗/ TRFFPProduct : FormalFunctionParameter × TypeExpr ∗ × TRANS × ENV × TYPES × LetDef ∗ → Bool × FormalFunctionParameter × ENV × TYPES × LetDef ∗ TRFFPProduct(ffpl, tel, trans, env, types, prlet) ≡ if binding_list(ffpl) = 〈〉 then if tel = 〈〉 then (false, mk_FormalFunctionParameter(〈〉), env, types, prlet) else (true, mk_FormalFunctionParameter(〈〉), env, types, prlet) end else case hd binding_list(ffpl) of 191
- Page 156 and 157: APPENDIX B. CONTENTS OF CD-ROM 140
- Page 158 and 159: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 160 and 161: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 162 and 163: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 164 and 165: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 166 and 167: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 168 and 169: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 170 and 171: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 172 and 173: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 174 and 175: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 176 and 177: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 178 and 179: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 180 and 181: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 182 and 183: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 184 and 185: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 186 and 187: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 188 and 189: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 190 and 191: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 192 and 193: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 194 and 195: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 196 and 197: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 198 and 199: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 200 and 201: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 202 and 203: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 204 and 205: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 208 and 209: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 210 and 211: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 212 and 213: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 214 and 215: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 216 and 217: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 218 and 219: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 220 and 221: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 222 and 223: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 224 and 225: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 226 and 227: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 228 and 229: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 230 and 231: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 232 and 233: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 234 and 235: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 236 and 237: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 238 and 239: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 240 and 241: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 242 and 243: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 244 and 245: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 246 and 247: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 248 and 249: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 250 and 251: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 252 and 253: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 254 and 255: APPENDIX C. FORMAL SPECIFICATIONS O
APPENDIX C. FORMAL SPECIFICATIONS OF TRANSFORMATIONS<br />
types †<br />
[ makeBinding(binding_list(ffpl)) ↦→ Known(te) ],<br />
prlet),<br />
TypeName(id) →<br />
if id ∈ dom trans<br />
then<br />
/∗Formal function parameter <strong>of</strong> a type <strong>of</strong> interest.<br />
∗/<br />
(true, mk_FormalFunctionParameter(〈〉),<br />
env †<br />
[ id ↦→ makeBinding(binding_list(ffpl)) ],<br />
types †<br />
makeTYPESMap(binding_list(ffpl), te),<br />
makeProductLet(<br />
te, makeBinding(binding_list(ffpl)),<br />
prlet, trans))<br />
else<br />
/∗Formal function parameter not <strong>of</strong> a type <strong>of</strong> interest.<br />
∗/<br />
(true, ffpl, env,<br />
types †<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 />
(true, ffpl, env,<br />
types †<br />
[ makeBinding(binding_list(ffpl)) ↦→ Known(te) ],<br />
prlet),<br />
TypeExprList(tel) →<br />
(true, ffpl, env,<br />
types †<br />
[ makeBinding(binding_list(ffpl)) ↦→ Known(te) ],<br />
prlet),<br />
TypeExprMap(tem) →<br />
(true, ffpl, env,<br />
types †<br />
[ makeBinding(binding_list(ffpl)) ↦→ Known(te) ],<br />
prlet),<br />
/∗Higher order functions.∗/<br />
FunctionTypeExpr(tef, fa, rd) →<br />
190