Code Generation Software

Abstract

Code generation is an approach used to achieve a productive software production environment, where such feature can be used to enable automatic generation of a source code, and code templates that are described through formal software specifications. Growing systems and smaller hardware are leading to a new generation of system complexity, and as such; software production approach required a code generation that can achieve such approach (Rausch, 2001).

Case Tools for Code Generation

Case tools for code generation is the Fourth Generation technology that allow developers to design the desired application, and have the computer through the Case Tools capabilities to generate the code required to execute the application. The code generation is defined as a process, where an automated tool is used to convert a higher level abstract input to a lower level abstract output (Jayasinghe, 2009). 

Code generation is not a new concept, and any given code generation tool consists of four parts: Code Generation Configuration, Transformation, Transformation Configuration, and Code Generation. Configuration can be a property file such as data-file, XML file, or any other document. Such file can be a human readable file. Transformation can be logic in scripts of class file or XSL file that can perform the transformation where as a result it creates the artefacts (Jayasinghe, 2009).

The most important part in the code generation is to identify the required input configuration, and identify the output format. The simple example of the code generation is the web services where WSDL is considered to be the configuration file, while the transformation would be WSDL to XML format (Jayasinghe, 2009).

Advantages and Disadvantages

  • Code generators speed up the deliverables of the software product, and can massively increase the timescale, defect count, design consistency, design quality, and eliminates the future refactoring process required for the code (Stephens, 2002).
  • Some of the potential risk of using the code generator is that some of the vendors lock-in the full generator source code, and also, in most cases the code generator usually required to be configured first before use (Stephens, 2002).
  • Code generation in most cases is a long process to be configured, and if all the needed rules were configured and included in the tool, the generation of the code will be one-click task (Butti, 2011).
  • In some of the code generation products, the generated applications are more difficult to be deployed, and also the code generated is hard to be debugged (Butti, 2011).
  • Code generator is a machine generated consistent code, it is flexible enough to modify and generate the produced code whenever changes are required, allow the programmers to concentrate on the areas that deserve their brainpower, it’s a good source of learning, and all the project code is more likely to be consistent and clear despite the fact, that such code is produced in a rapid rate (Stephens, 2002).
  • The code generator must be written first to achieve the code generation where it’s applicable to given a specific set of conditions (Stephens, 2002).
  • Code generator allows the reuse of patterns as well as code segments, and object inheritance, and code generation are very effective when used together (Dollard, 2004).

The future of Code Generator

Automatic code generation is a promising tool for the software development paradigm. The technology and the performance of such software are mature and beyond any disputes. The challenge for the future software tools is to change the software development processes to adapt the new technology of the code generation. One of the reasons for slow adoption of such technology; is that software engineers feel threatened by the code generation, and what it can bring to the software production. Such fears are unfounded since with the existing of such technology there is plenty of specialized information that needs to be crafted within the model. It’s also important for software engineers to understand that such technology is a new tool that can make them more productive in their tasks, and the market will be looking for more challenging and innovative projects to be implemented by the software engineers (PrecisionM BA.Com, 2005).

Conclusion

Automatic code generator is an application that can read math model files, and in return it generates a compile-able code that replicates the behavior of such model. The great benefit of having the auto- code generator; is to be able to simulate the model through an inputs interface, and then log the output response for all the blocks in the model (PrecisionMBA.Com, 2005).

Finally, the code generator should be well tested, and robust, since any project can’t afford to have a buggy generator. It’s also important that the code generator cut many production stages to increase productivity. Currently there are many approaches to the code generator, such as Code generated directly from the database, from UML or from Entity-Relation physical database design (Stephens, 2002).

References

Butti, S. (2011) Why Code Generation is better than ModelInterpretation [Online]. Available from: http://blog.webratio.com/2011/05/16/why-code-generation-is-better-than-model-interpretation-from-our­customers%E2%80%99-poi nt-of-view/ (Accessed: 21 May 2011).

Dollard, K. (2004) Introducing Code Generation [Online]. Available from: http://www.aspfree.com/c/a/.NET/Introducing-Code-Generation/ (Accessed: 21 May 2011).

Jayasi nghe, D. (2009) Power of Code Generation [Online]. Available from: http://blogs.deepal.org/2009/06/power­of-code-generation.html (Accessed: 21 May 2011).

PrecisionMBA.Com (2005) Automatic Code Generation [Online]. Available from: http://www.precisionmba.com/automaticcodegeneration.htm (Accessed: 21 May 2011).

Rausch, A. (2001) A proposalfor a Code Generator base on XML and Code Templates [Online]. Available from: http://users.encs.concordia.ca/~gregb/icse-workshop/icse2001-rausch.pdf (Accessed: 21 May 2011).

Stephens, M. (2002) Automated Code Generation [Online]. Available from: http://www.softwarereality.com/programming/codegeneration.jsp (Accessed: 21 May 2011).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: