niques not only on generated code, but also on generator templates by reusing existing ..... the best strategy, to either use meaningful names (as we did in the example) or .... Apache Velocity Website. http://jakarta.apache.org/velocity/. 2.
for transferring skills like testing, refactoring and software design is ..... [14]
Growing Object-Oriented Software Guided By Tests Steve Freeman,. Nat Pryce ...
Robert Fuhrer. Julian Dolby. IBM T.J. Watson Research Center ..... namic dispatch is approximated by assuming that a virtual call to method m can ..... Start- ing from a root methods, data flow and call-graph construction inter- twine: processing ...
refactorings via automatic detection of code smells from static code analysis. Concerns on viewing compiler refactorings as a fully automated refactorings are ...
many Location Based Services, with significantly stronger privacy guar- ... 0534761, IIS-0742811 and CNS-0831505 (CyberTrust), and in part from the ME-.
Oct 22, 2011 - EURASIP Journal on Wireless Communications and Networking 2011, 2011:136 ..... of the column space of the channel hcl; from Relay2 to.
Pierson, P. Rowell, A. Skalare, A. Peralta, R. Lin, D. Pukala, and M. Rodwell, "InP HBT IC technology for terahertz frequencies: fundamental oscillators up to 0.57 ...
Lecture 5 – Design, Refactoring, Smells, ..... Refactoring, “Improving the design of
existing code”. .... http://industriallogic.com/papers/smellstorefactorings.pdf. 73 ...
block of the framework is the logic representation generator. Figure 1. Logic Based Approach which translates the input program into logic representation.
May 28, 2010 - of reasonable tunes â again, this step can be trivially batch-parallelised ... the tune, and particularly the generator parameterisation, are reliable ...
Website: www.tshilidzimarwala.com ... relationship of data obtained from a Steam Generator at .... local minimum is to train many networks taking the best.
Using Refactoring Techniques to Exploit Variability in Conceptual Modeling. Jan Verelst. Dept. of ... types of variability; b) illustrating a refactoring strategy be- tween the ..... In IEEE standards collection: software engineering. IEEE. [Jacobson
a method for refactoring Java programs that use current container classes into ...... wrote three tests similar to Mango's unit tests that exercise major portions of its .... [13] Palsberg, J., and Schwartzbach, M. Object-Oriented. Type Systems.
[5] F. Ramos et al., âIST-LASAGNE: towards all-optical label swap- ping employing optical logic gates and optical flip-flopsâ, J. Lightw. Technol., vol. 23, pp.
802.11ac added more evolutionary changes on. MIMO methods. This new amendment, initiat- ed by very high throughput (VHT) study group,. ABSTRACT. IEEE ...
600 (phone: +82-31-279-4993, fax: +82-31-279-5130, email: ... mainly corresponds to broadcast services (e.g., Digital. Audio Broadcasting and Digital Video ...
exceed the requirements of IMT-Advanced such as the support for the data rate of 1 Gbps and bandwidths up to 100 MHz. LTE-Advanced system is backward ...
voltage regulator panel connections even with the regulator fuse removed.
Caution ..... Refer to the connection diagram supplied with the generator and / or
the ...
JCB offer a comprehensive range of 114 model numbers from 8 to 2700kVA, split
into 5 ... engine. An incredible example of JCB innovation, the world-beating,.
refactoring tool development, we chose the agent plans as the target .... refactoring tool. 1http://etmen.ege.edu.tr/wiki/index.php/refactoring_agent_system bad.
software restructuring and refactoring, from a formal as well as a practical point of view. Next ... 3 Email: {serge.demeyer, bart.dubois, hans.stenten, pieter.vangorp}@ua.ac.be .... Today, a wide range of tools is available that automate various asp
For example, Gonthier gave a formal proof of the famous Four Colour The- orem (
FCT) ... The project intends to formally verify all of the mathematics used in ...
Serge Demeyer, Bart Du Bois, Hans Stenten, Pieter Van Gorp 3. Lab on Re- ..... [4] Atkinson, C. and T. Kühne, The role of meta-modeling in MDA, in: Proc. UML.
Refactor source code into requirements. 6. Summary. References. Martin Fowler.
Refactoring – improve the design of existing code. http://www.refactoring.com.
www.se-rwth.de/publications ... 2 Related Work. Various ways of code generation are already published. For a survey of the ... Manning Publications Co. (2003).
Techniques Enabling Generator Refactoring Holger Krahn and Bernhard Rumpe Institute for Software Systems Engineering Technische Universit¨ at Braunschweig, Braunschweig, Germany http://www.sse.cs.tu-bs.de Abstract. This paper presents our approach to use refactoring techniques together with code generation. Refactoring is particularly useful if not only the generated classes but also the generator itself can be adapted in an automatic fashion. We have developed a simple demonstration prototype to illustrate this. The demonstration is based on a special technique where the template for the code generation is defined as compilable source code. The directives to fill out this template prototype to the actual classes are embedded in the source as comments.
1
Overview
Code generation avoids repetitive programming tasks and helps to improve code quality. When code generators are used in agile projects, one problem occurs: The hand-coded source code is frequently changed using existing refactoring [2] tools. But either the code generation is not repeatable (one shot only) or the equivalent changes in the code generator have to be applied manually. The key idea of this abstract is to use a template-based code generation where the template describing the target is at the same time a compilable class. This should enable existing tools to refactor the generator and not the generated code only. In this way a round-trip approach and its potential problems can be avoided. Figure 1 shows an overview of the applied tool chain.
Fig. 1. Overview of the tool chain
Five steps have to be applied to use the code generator, which are illustrated by a simple example: 1. A prototype for the generated code is programmed manually, an example can be found in figure 2. 2. The variation points (template holes) of the class are identified and special comments are added directly before the tokens to be replaced. For simplicity of our demonstration, the source is tokenized using spaces as separators. For an example see figure 3.
[KR05] H. Krahn, B. Rumpe. Techniques Enabling Generator Refactoring. In : Technical Report, TR-CCTC/DI-36 Centro de Ciencias e Tecnologias de Computacao, Departamento de Informatica Universidade do Minho, Braga, Portugal, Juli 2005 www.se-rwth.de/publications
3. A parser for the input data can be written e.g. using a parser generator. The generator is the same for every template class. 4. The data for the variation points has to be specified. An example input for the parser from step 3 can be seen in figure 4. 5. The Parser+Generator component combines the data and the template to the generated classes. An example output can be found in figure 5.
Fig. 2. Example prototype class
Fig. 4. Example for repeated use
Fig. 3. Example template class
Fig. 5. Example generated class
In the given example, refactorings like ”rename method” which might rename Printer.write(...) to Printer.print(...) can be applied easily.
2
Related Work
Various ways of code generation are already published. For a survey of the most common approaches see for example [3]. Most similar to our approach are template-based code generators like Velocity [1]. All these approaches have in common that they use a separate template language which results in files that cannot be directly compiled by a conventional compiler and therefore not directly be refactored.
3
Conclusion
We implemented a tool chain for demonstration purposes which supports - in addition to the explained mechanisms above - iterative adaptation within a template class, without affecting the generator as such. Based on this tool, we are now exploring its advantages and limitations. In particular it is unclear by now, where such an approach breaks down at all, because it is also possible to add control structures in form of /*C forall ...*/ or /*C if ... */ etc. As further work, we try to overcome some of the limitations, such as an improvement of the tokenizing form, and use this approach in larger case studies.
References 1. Apache Velocity Website. http://jakarta.apache.org/velocity/ (1999) 2. Fowler, M.: Refactoring - Improving the Design of Existing Code. Addison-Wesley Professional (1999) 3. Herrington, J.: Code Generation in Action. Manning Publications Co. (2003)