Transformation of Applicative Specifications into Imperative ...
Transformation of Applicative Specifications into Imperative ... Transformation of Applicative Specifications into Imperative ...
APPENDIX C. FORMAL SPECIFICATIONS OF TRANSFORMATIONS id ∈ elems typings(id), AbbreviationDef(id, te) → CheckTypeExpr(te, typings, func, trans) ∧ id ∈ elems typings(id) end, /∗Checks for transformability of a variant list. ∗/ /∗ Arguments: ======= id: the id of the variant definition vl: the list of variants Results: ===== Bool: true if the list is transformable, false otherwise ∗/ CheckVariantList : Id × Variant ∗ × TYPINGS × FUNC × TRANS → Bool CheckVariantList(id, vl, typings, func, trans) ≡ if vl = 〈〉 then true else CheckVariant(id, hd vl, typings, func, trans) ∧ CheckVariantList(id, tl vl, typings, func, trans) end, /∗Checks for transformability of a variant.∗/ /∗ Arguments: ======= id: the id of the variant definition v: the variant Results: ===== Bool: true if the variant is transformable, false otherwise ∗/ CheckVariant : Id × Variant × TYPINGS × FUNC × TRANS → Bool CheckVariant(id, v, typings, func, trans) ≡ case v of RecordVariant(c, cl) → 148
C.1. FORMAL SPECIFICATION OF THE TRANSFORMER CheckComponentKindList( id, cl, typings, func, trans), → true end, /∗Checks for transformability of a component kind list.∗/ /∗ Arguments: ======= id: the id of the type definition cl: the list of component kinds Results: ===== Bool: true if the list is transformable, false otherwise ∗/ CheckComponentKindList : Id × ComponentKind ∗ × TYPINGS × FUNC × TRANS → Bool CheckComponentKindList(id, cl, typings, func, trans) ≡ if cl = 〈〉 then true else CheckComponentKind(id, hd cl, typings, func, trans) ∧ CheckComponentKindList( id, tl cl, typings, func, trans) end, /∗Checks for transformability of a component kind. ∗/ /∗ Arguments: ======= id: the id of the type definition c: the component kind Results: ===== Bool: true if the component kind is transformable, false otherwise ∗/ CheckComponentKind : Id × ComponentKind × TYPINGS × FUNC × TRANS → Bool CheckComponentKind(id, c, typings, func, trans) ≡ 149
- Page 114 and 115: CHAPTER 9. IMPLEMENTATION OF THE TR
- Page 116 and 117: CHAPTER 9. IMPLEMENTATION OF THE TR
- Page 118 and 119: CHAPTER 9. IMPLEMENTATION OF THE TR
- Page 120 and 121: CHAPTER 9. IMPLEMENTATION OF THE TR
- Page 122 and 123: CHAPTER 9. IMPLEMENTATION OF THE TR
- Page 124 and 125: CHAPTER 9. IMPLEMENTATION OF THE TR
- Page 126 and 127: CHAPTER 10. EXAMPLES OF TRANSFORMAT
- Page 128 and 129: CHAPTER 10. EXAMPLES OF TRANSFORMAT
- Page 130 and 131: CHAPTER 10. EXAMPLES OF TRANSFORMAT
- Page 132 and 133: CHAPTER 10. EXAMPLES OF TRANSFORMAT
- Page 134 and 135: CHAPTER 10. EXAMPLES OF TRANSFORMAT
- Page 136 and 137: CHAPTER 11. TEST 11.1.1 Lexer and P
- Page 138 and 139: CHAPTER 11. TEST An overview of the
- Page 140 and 141: CHAPTER 12. POSSIBLE EXTENSIONS OF
- Page 142 and 143: CHAPTER 12. POSSIBLE EXTENSIONS OF
- Page 144 and 145: CHAPTER 12. POSSIBLE EXTENSIONS OF
- Page 146 and 147: CHAPTER 13. CONCLUSION RSL AST and
- Page 148 and 149: CHAPTER 13. CONCLUSION 132
- Page 150 and 151: BIBLIOGRAPHY [ST02] Donald Sannello
- Page 152 and 153: APPENDIX A. USING AND EXTENDING THE
- Page 154 and 155: APPENDIX A. USING AND EXTENDING THE
- 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 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 206 and 207: 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
APPENDIX C. FORMAL SPECIFICATIONS OF TRANSFORMATIONS<br />
id ∈ elems typings(id),<br />
AbbreviationDef(id, te) →<br />
CheckTypeExpr(te, typings, func, trans) ∧<br />
id ∈ elems typings(id)<br />
end,<br />
/∗Checks for transformability <strong>of</strong> a variant list.<br />
∗/<br />
/∗<br />
Arguments:<br />
=======<br />
id: the id <strong>of</strong> the variant definition<br />
vl: the list <strong>of</strong> variants<br />
Results:<br />
=====<br />
Bool: true if the list is transformable, false<br />
otherwise<br />
∗/<br />
CheckVariantList :<br />
Id × Variant ∗ × TYPINGS × FUNC × TRANS →<br />
Bool<br />
CheckVariantList(id, vl, typings, func, trans) ≡<br />
if vl = 〈〉 then true<br />
else<br />
CheckVariant(id, hd vl, typings, func, trans) ∧<br />
CheckVariantList(id, tl vl, typings, func, trans)<br />
end,<br />
/∗Checks for transformability <strong>of</strong> a variant.∗/<br />
/∗<br />
Arguments:<br />
=======<br />
id: the id <strong>of</strong> the variant definition<br />
v: the variant<br />
Results:<br />
=====<br />
Bool: true if the variant is transformable, false<br />
otherwise<br />
∗/<br />
CheckVariant :<br />
Id × Variant × TYPINGS × FUNC × TRANS → Bool<br />
CheckVariant(id, v, typings, func, trans) ≡<br />
case v <strong>of</strong><br />
RecordVariant(c, cl) →<br />
148