22.1. Forward, Reverse, and Round-Trip Engineering
In the CASE (Computer Aided Software Engineering) tool world, forward engineering means the generation of code from diagrams; reverse engineering means generation of diagrams from code and round-trip engineering closes the loopthe tool supports generation in either direction and can synchronize between UML diagrams and code, ideally automatically and immediately as either is changed.All UML tools claim to support these features, but many are half crippled. Why? Because many of the tools can only do the static models: They can generate class diagrams from code, but can't generate interaction diagrams. Or for forward engineering, they can generate the basic (e.g., Java) class definition from a class diagram, but not the method bodies from interaction diagrams.Yet, code isn't just declarations of variables, it's dynamic behavior! For example, suppose you want to understand the basic call-flow structure of an existing application or framework. If your tool can generate a sequence diagram from the code, you can then much more easily follow the call-flow logic of the system to learn its basic collaborations.