Transformation of Applicative Specifications into Imperative ...
Transformation of Applicative Specifications into Imperative ... Transformation of Applicative Specifications into Imperative ...
APPENDIX C. FORMAL SPECIFICATIONS OF TRANSFORMATIONS makeVariables(dlres, trans))), DL_not_transformable → Class_not_transformable end end, → Class_not_transformable end, /∗Transforms a declaration list if possible.∗/ /∗ Arguments: ======= dl: the declaration list dlres: the resulting declaration list Results: ===== DLResult: the result of the transformation ∗/ TRDeclList : Decl ∗ × TYPINGS × FUNC × TRANS × Decl ∗ → DLResult TRDeclList(dl, typings, func, trans, dlres) ≡ if dl = 〈〉 then DL_transformable(dlres) else case TRDecl(hd dl, typings, func, trans) of Decl_transformable(decl) → TRDeclList( tl dl, typings, func, trans, dlres 〈decl〉), Decl_not_transformable → DL_not_transformable end end, /∗Transforms a declaration if possible.∗/ /∗ Arguments: ======= d: the declaration Results: ===== DeclResult: the result of the transformation ∗/ TRDecl : Decl × TYPINGS × FUNC × TRANS → DeclResult 144
C.1. FORMAL SPECIFICATION OF THE TRANSFORMER TRDecl(d, typings, func, trans) ≡ case d of TypeDecl(tdl) → case TRTypeDecl(tdl, typings, func, trans) of Transformable(decl) → Decl_transformable(decl), Not_transformable → Decl_not_transformable end, ValueDecl(vd) → case TRValueDecl(vd, typings, func, trans) of Transformable(decl) → Decl_transformable(decl), Not_transformable → Decl_not_transformable end, → Decl_not_transformable end, /∗Makes a variable declaration according to the trans map.∗/ /∗ Arguments: ======= decl: the original declaration list Results: ===== Decl_list: the resulting declaration list ∗/ makeVariables : Decl ∗ × TRANS → Decl ∗ makeVariables(decl, trans) ≡ if decl = 〈〉 then 〈VariableDecl(makeVariableDeclList(trans))〉 else case hd decl of TypeDecl(tdl) → 〈hd decl〉 makeVariables(tl decl, trans), ValueDecl(vdl) → 〈VariableDecl(makeVariableDeclList(trans))〉 decl end end, /∗Makes a variable definition list according to the trans map.∗/ /∗ 145
- Page 110 and 111: CHAPTER 8. SPECIFICATIONS Specifica
- Page 112 and 113: CHAPTER 8. SPECIFICATIONS the lack
- 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 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 206 and 207: APPENDIX C. FORMAL SPECIFICATIONS O
- Page 208 and 209: APPENDIX C. FORMAL SPECIFICATIONS O
APPENDIX C. FORMAL SPECIFICATIONS OF TRANSFORMATIONS<br />
makeVariables(dlres, trans))),<br />
DL_not_transformable →<br />
Class_not_transformable<br />
end<br />
end,<br />
→ Class_not_transformable<br />
end,<br />
/∗Transforms a declaration list if possible.∗/<br />
/∗<br />
Arguments:<br />
=======<br />
dl: the declaration list<br />
dlres: the resulting declaration list<br />
Results:<br />
=====<br />
DLResult: the result <strong>of</strong> the transformation<br />
∗/<br />
TRDeclList :<br />
Decl ∗ × TYPINGS × FUNC × TRANS × Decl ∗ →<br />
DLResult<br />
TRDeclList(dl, typings, func, trans, dlres) ≡<br />
if dl = 〈〉 then DL_transformable(dlres)<br />
else<br />
case TRDecl(hd dl, typings, func, trans) <strong>of</strong><br />
Decl_transformable(decl) →<br />
TRDeclList(<br />
tl dl, typings, func, trans,<br />
dlres 〈decl〉),<br />
Decl_not_transformable → DL_not_transformable<br />
end<br />
end,<br />
/∗Transforms a declaration if possible.∗/<br />
/∗<br />
Arguments:<br />
=======<br />
d: the declaration<br />
Results:<br />
=====<br />
DeclResult: the result <strong>of</strong> the transformation<br />
∗/<br />
TRDecl :<br />
Decl × TYPINGS × FUNC × TRANS → DeclResult<br />
144