Transformation of Applicative Specifications into Imperative ...
Transformation of Applicative Specifications into Imperative ... Transformation of Applicative Specifications into Imperative ...
CHAPTER 8. SPECIFICATIONS the lack of this property would be revealed during the justification of the implementation relation. 96
Chapter 9 Implementation of the Transformer The implementation of the transformer is rather special as different tools have been used and exploited. This process and the resulting structure of the transformer are described in this chapter. Furthermore, a discussion of one of the tools used are given. Finally, an overview of the implemented functionality is offered. 9.1 The RSL2Java Tool The implementation of the transformer is based on the RSL2Java tool, which is build in another master thesis project, [Hja04]. The RSL2Java tool can translate the subset RSL1 of RSL into Java. It consists of a front end, a translation module, a back end and a control module. • The front end consists of a lexer, which performs lexical analysis of the given RSL specification, and a parser, which parses the specification into an RSL AST. • The translation module does the actual translation from the RSL AST of an RSL specification into a corresponding Java AST. This is done by decorating the RSL AST with types and then performing the translation on the type decorated RSL AST. • The back end translates the Java AST into actual Java code. • The control module binds the three other modules together. In order not to confuse the parts of the RSL2Java tool with the parts of the transformer all parts belonging to the RSL2Java tool are prefixed with the word RSL2Java tool, e.g. RSL2Java tool front end. 97
- Page 62 and 63: CHAPTER 6. TRANSFORMATIONS Value In
- Page 64 and 65: CHAPTER 6. TRANSFORMATIONS ✄ sche
- Page 66 and 67: CHAPTER 6. TRANSFORMATIONS A case e
- Page 68 and 69: CHAPTER 6. TRANSFORMATIONS is due t
- Page 70 and 71: CHAPTER 6. TRANSFORMATIONS 6.4.4 Tr
- Page 72 and 73: CHAPTER 6. TRANSFORMATIONS 56
- Page 74 and 75: CHAPTER 7. CORRECTNESS OF TRANSFORM
- Page 76 and 77: CHAPTER 7. CORRECTNESS OF TRANSFORM
- Page 78 and 79: CHAPTER 7. CORRECTNESS OF TRANSFORM
- Page 80 and 81: CHAPTER 7. CORRECTNESS OF TRANSFORM
- Page 82 and 83: CHAPTER 7. CORRECTNESS OF TRANSFORM
- Page 84 and 85: CHAPTER 7. CORRECTNESS OF TRANSFORM
- Page 86 and 87: CHAPTER 7. CORRECTNESS OF TRANSFORM
- Page 88 and 89: CHAPTER 8. SPECIFICATIONS The rewri
- Page 90 and 91: CHAPTER 8. SPECIFICATIONS RSL speci
- 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 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
Chapter 9<br />
Implementation <strong>of</strong> the<br />
Transformer<br />
The implementation <strong>of</strong> the transformer is rather special as different tools<br />
have been used and exploited. This process and the resulting structure <strong>of</strong><br />
the transformer are described in this chapter. Furthermore, a discussion <strong>of</strong><br />
one <strong>of</strong> the tools used are given. Finally, an overview <strong>of</strong> the implemented<br />
functionality is <strong>of</strong>fered.<br />
9.1 The RSL2Java Tool<br />
The implementation <strong>of</strong> the transformer is based on the RSL2Java tool, which<br />
is build in another master thesis project, [Hja04]. The RSL2Java tool can<br />
translate the subset RSL1 <strong>of</strong> RSL <strong>into</strong> Java. It consists <strong>of</strong> a front end, a<br />
translation module, a back end and a control module.<br />
• The front end consists <strong>of</strong> a lexer, which performs lexical analysis <strong>of</strong> the<br />
given RSL specification, and a parser, which parses the specification<br />
<strong>into</strong> an RSL AST.<br />
• The translation module does the actual translation from the RSL AST<br />
<strong>of</strong> an RSL specification <strong>into</strong> a corresponding Java AST. This is done<br />
by decorating the RSL AST with types and then performing the translation<br />
on the type decorated RSL AST.<br />
• The back end translates the Java AST <strong>into</strong> actual Java code.<br />
• The control module binds the three other modules together.<br />
In order not to confuse the parts <strong>of</strong> the RSL2Java tool with the parts <strong>of</strong><br />
the transformer all parts belonging to the RSL2Java tool are prefixed with<br />
the word RSL2Java tool, e.g. RSL2Java tool front end.<br />
97