Evaluation of Code Generation Tools

Evaluation of Code Generation Tools

Evaluation of Code Generation Tools Farzad Sedghi Farooji Degree Project in Software Engineering of Distributed Systems KTH Information and Communication Systems Stockholm 2014 1 Abstract Code generation is an important part of today’s software development. Using code generation can increase code quality, ease maintenance and shorten development time. It can be used for development of different parts of software systems like database access layers, communication protocols and their proxies/stubs, user interface and many others. Code generators may be ready to use products or developed in-house for project’s specific requirements. There are different tools and environments for the development of code generators. As there are so many different possibilities for code generation solutions, it becomes hard for a developer or team to choose the best solution for their purpose, especially when there are few academic or industrial resources for comparing such solutions or providing the criteria for their comparison. Most of the academic works related to code generation are about specific software areas like parsers, signal processing and embedded systems, rather than general software development. This report defines a framework for comparison of code generation solutions, which provides a categorized list of relevant criteria for such comparison. The list of criteria is gathered by reviewing a set of available code generation solutions and categorized based on software quality attributes, since the code generation solution is software itself. Finally some of the tools are chosen based on the requirements and applications of the company and they are compared side- by-side using the comparison framework. 2 3 Abbreviations 4GL Fourth generation languages ABSE Atom-Based Software Engineering DSL Domain Specific Languages DSM Domain Specific Models EBNF Extended Backus-Naur Form EMF Eclipse Modeling Environment FIX Financial Information eXchange protocol FTL FreeMarker Template Language M2M model-to-model M2T model-to-text MDA Model Driven Architecture MDE Model Driven Engineering MDSD Model Driven Software Development MERL MetaEdit Reporting Language MOF Meta Object Facility MTL Model to Text Language OCL Object Constraint Language OMG Object Management Group PIM Platform Independent Model QVT Query/View/Transformation RMI Remote Method Invocation TTM Time to Market UML Unified Modeling Language W3C World Wide Web Consortium WSDL Web Service Definition Language VTL Velocity Template Language XMI XML Metadata Interchange 4 Table of Contents Abstract ........................................................................................... 2 Abbreviations .................................................................................... 4 Table of Contents ............................................................................... 5 List of Figures .................................................................................... 8 List of Tables ..................................................................................... 9 1. Introduction .................................................................................. 11 1.1. Code generation ................................................................................. 11 1.1.1. What is code generation? ................................................................................ 12 1.1.2. Basic concepts ............................................................................................. 12 1.1.3. General process ........................................................................................... 14 1.1.4. Why code generation is useful .......................................................................... 14 1.1.4.1. Separation of high level abstractions and system code ...................................... 14 1.1.4.2. Code generation makes the process of implementation faster ............................. 16 1.1.4.3. Code generation increases software quality .................................................... 16 1.1.5. Drawbacks and risks of using code generation ....................................................... 17 1.2. Programming languages evolution ............................................................ 18 1.2.1. Increasing the level of abstraction..................................................................... 20 1.2.2. Code generators and Compilers ........................................................................ 22 1.2.2.1. Semantic changes ................................................................................... 22 1.2.2.2. Intermediate presentation and optimization ................................................... 23 2. Goals and Approach ........................................................................ 26 2.1. Goal of this thesis ................................................................................ 26 2.2. Method ............................................................................................. 27 2.2.1. Software comparison approaches ...................................................................... 27 2.2.2. Approach in this work .................................................................................... 29 2.2.3. Methodology ............................................................................................... 32 3. Comparison Framework .................................................................... 32 3.1. Categorization of comparison criteria ....................................................... 32 3.1.1. Software requirements ................................................................................... 34 3.1.2. Function and Performance Requirements ............................................................ 35 3.2. Comparison criteria framework ............................................................... 37 3.2.1. Which software? Who is the user? ...................................................................... 37 3.2.2. Function requirements for a code generator ........................................................ 39 3.2.3. Software quality attributes for a code generator ................................................... 40 3.2.3.1. .......................................................................................................... 40 5 3.2.4. Finalizing the categorization of tools’ criteria ...................................................... 53 3.2.5. Code generation comparison criteria .................................................................. 55 3.2.5.1. Code generator usage ............................................................................... 55 3.2.5.2. Code generator development ..................................................................... 57 4. Reviewing code generation tools ........................................................ 59 4.1. Related concepts ................................................................................. 59 4.1.1. Meta Object Facility (MOF) .............................................................................. 59 4.1.1.1. Related standards ................................................................................... 61 4.1.1.2. Model Driven Architecture (MDA) ................................................................. 62 4.1.2. Eclipse modeling framework (EMF) .................................................................... 63 4.1.2.1. Core framework ...................................................................................... 63 4.1.2.2. EMF.edit ............................................................................................... 64 4.2. Code generation tools review ................................................................. 66 4.2.1. Atom Weaver .............................................................................................. 66 4.2.1.1. Concept ............................................................................................... 66 4.2.1.2. Code Generator usage features ................................................................... 68 4.2.1.3. Code Generator development features .......................................................... 69 4.2.2. Java Emitter Template (JET) ........................................................................... 71 4.2.2.1. Concept ............................................................................................... 71 4.2.2.2. Rational Software Architect ....................................................................... 73 4.2.2.3. Code generator usage features ................................................................... 74 4.2.2.4. Code generator development features .......................................................... 77 4.2.3. Xpand........................................................................................................ 81 4.2.3.1. Concept ............................................................................................... 81 4.2.3.2. Code generator usage features ................................................................... 85 4.2.3.3. Code generator development features: ......................................................... 89 4.2.4. Acceleo ..................................................................................................... 91 4.2.4.1. Concept ............................................................................................... 91 4.2.4.2. Code generator usage features: .................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    168 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us