Chapter 6. Code Generation, Reverse Engineering, and Round Trip Engineering

Table of Contents

6.1. Introduction
6.2. Code Generation
6.2.1. Generating Code from the Static Structure
6.2.2. Generating code from interactions and state machines
6.3. Code Generation in ArgoUML
6.3.1. Static Structure
6.3.2. Interactions and statechart diagrams
6.4. Reverse Engineering
6.5. Round-Trip Engineering

6.1. Introduction

We now have our design fully specified. With the right simulator we could actually execute the design and see if it works. (ArgoUML does not provide such functionality, but this functionality has been provided in alternative tools.)

ArgoUML does allow you to generate code from the design in several different programming languages. We, most likely, already in the design had a programming language in mind because some of the design considerations are to care for a specific language.

The output of this process is the set of files that constitute the program that solves the problem.

Once again the recursive, and iterative nature of our process means we will come back to the Build phase many times in the future.

There is also another side to this and that is the reverse engineering side. If we happen to have an old program that we would like to examine then we could take the files and reverse engineer them to create a design. This can be used when trying to understand some not so well documented program or as a quick start for the design work.

The process of going back and forth between doing changes in the design followed by a code generation and then doing changes in the code followed by a reverse engineering using for every change, the best possible perspective, is called Round-trip Engineering.