Transformation of Applicative Specifications into Imperative ...
Transformation of Applicative Specifications into Imperative ... Transformation of Applicative Specifications into Imperative ...
CHAPTER 12. POSSIBLE EXTENSIONS OF THE TRANSFORMER 12.1.10 Recursive functions Recursive functions can be part of an imperative specification, but are sometimes not wanted. Using the transformer the recursive functions from the applicative specification stay recursive after the transformation. This is done to simplify the transformer. Recursions can usually be turned into either for loops or while loops. Another option is to transform recursive functions into non-recursive functions using continuations, as described in [Wan80]. The idea behind continuations is that the future course of the computation is represented while executing the computation. The use of continuations may have the unwanted effect of reducing the readability of the specification compared to using loops. 12.1.11 Collections of a Fixed or Bounded Size Collections of a fixed or bounded size can be implemented by introducing the proper amount of objects or variables. This requires that the maximum sizes of the collections are known in advance. 12.2 Further Work As this project was limited in time not all the desired functionality could be implemented. During the process several ideas for further development of the transformer have come to mind. In the following some of these ideas will be discussed. 12.2.1 A Greater Subset of RSL One obvious extension is to extend the transformer such that it covers a greater subset of RSL. Ideas for some of the transformation rules are given above. This would make the transformer even more useful. Furthermore, it could be useful if the transformer could deal with specifications that were partly applicative and partly imperative. This would be an even better way to support the RAISE Development Method. 12.2.2 Integrating the Transformer with Other RAISE Tools Another idea is to integrate the transformer with Emacs such that it only requires one Emacs command to start the transformation. Furthermore, it would be pleasant if the transformer process were coupled with the RSL type checker and pretty printer such that type checking and pretty printing were a part of the transformation process. 126
12.2.3 Optimization of the Transformer 12.2. FURTHER WORK As described in Chapter 9 the transformation process can in some cases be very slow. It would be nice if the transformer could be optimized such that the transformation process for some specifications was a bit faster. 12.2.4 Interactive Transformer Another extension could be to make the transformer interactive such that the user can choose which of the occurrences of values and type names of the types of interest that have to be transformed as such. This would ease the requirements on the specification style, but it would complicate the use of the transformer. 12.2.5 Full Verification of the Transformation Rules In Chapter 7 a proof of the correctness of the transformation rules is outlined. If this proof was completed, the step from applicative into imperative specification would be verified automatically if it was done applying the transformation rules, e.g. by using the transformer. This would mean that no further work would have to be done in order to verify the development step, which would ease the development step even further. 12.2.6 Other Extensions When a specification cannot be transformed it is not specified what and where the problem is unless the problem is caught by the lexer and parser. An extension to the transformer could be to improve the error handling. This would ease the use of the transformer. 127
- Page 92 and 93: CHAPTER 8. SPECIFICATIONS The FUNC
- Page 94 and 95: CHAPTER 8. SPECIFICATIONS out, that
- Page 96 and 97: CHAPTER 8. SPECIFICATIONS construct
- Page 98 and 99: CHAPTER 8. SPECIFICATIONS 8.4.1 Mor
- Page 100 and 101: CHAPTER 8. SPECIFICATIONS PRECOND_T
- Page 102 and 103: CHAPTER 8. SPECIFICATIONS if length
- Page 104 and 105: CHAPTER 8. SPECIFICATIONS subtypes.
- Page 106 and 107: CHAPTER 8. SPECIFICATIONS 8.5.2 Cha
- Page 108 and 109: CHAPTER 8. SPECIFICATIONS axiom [ m
- 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 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 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
12.2.3 Optimization <strong>of</strong> the Transformer<br />
12.2. FURTHER WORK<br />
As described in Chapter 9 the transformation process can in some cases be<br />
very slow. It would be nice if the transformer could be optimized such that<br />
the transformation process for some specifications was a bit faster.<br />
12.2.4 Interactive Transformer<br />
Another extension could be to make the transformer interactive such that<br />
the user can choose which <strong>of</strong> the occurrences <strong>of</strong> values and type names <strong>of</strong><br />
the types <strong>of</strong> interest that have to be transformed as such. This would ease<br />
the requirements on the specification style, but it would complicate the use<br />
<strong>of</strong> the transformer.<br />
12.2.5 Full Verification <strong>of</strong> the <strong>Transformation</strong> Rules<br />
In Chapter 7 a pro<strong>of</strong> <strong>of</strong> the correctness <strong>of</strong> the transformation rules is outlined.<br />
If this pro<strong>of</strong> was completed, the step from applicative <strong>into</strong> imperative<br />
specification would be verified automatically if it was done applying the<br />
transformation rules, e.g. by using the transformer. This would mean that<br />
no further work would have to be done in order to verify the development<br />
step, which would ease the development step even further.<br />
12.2.6 Other Extensions<br />
When a specification cannot be transformed it is not specified what and<br />
where the problem is unless the problem is caught by the lexer and parser.<br />
An extension to the transformer could be to improve the error handling.<br />
This would ease the use <strong>of</strong> the transformer.<br />
127