Round-trip engineering
This article needs additional citations for verification. (December 2009) |
Round-trip engineering (RTE) in the context of
Overview
Round-trip engineering is closely related to traditional
Types
Various books describe two types of RTE:[2]: 459
- partial or uni-directional RTE: changes made to a higher level representation of a code and model are reflected in lower level, but not otherwise; the latter might be allowed, but with limitations that may not affect higher-level abstractions
- full or bi-directional RTE: regardless of changes, both higher and lower-level code and model representations are synchronized if any of them altered
Auto synchronization
Another characteristic of round-trip engineering is automatic update of the artifacts in response to automatically detected inconsistencies. In that sense, it is different from forward- and reverse engineering which can be both manual (traditionally) and automatic (via automatic generation or analysis of the artifacts). The automatic update can be either instantaneous or on-demand. In instantaneous RTE, all related artifacts are immediately updated after each change made to one of them. In on-demand RTE, authors of the artifacts may concurrently update the artifacts (even in a distributed setting) and at some point choose to execute matching to identify inconsistencies and choose to propagate some of them and reconcile potential conflicts.
Iterative approach
Round trip engineering may involve an iterative development process. After you have synchronized your model with revised code, you are still free to choose the best way to work – make further modifications to the code or make changes to your model. You can synchronize in either direction at any time and you can repeat the cycle as many times as necessary.
Software
Many commercial tools and research prototypes support this form of RTE; a 2007 book lists
Limitations
A 2005 book on Visual Studio notes for instance that a common problem in RTE tools is that the model reversed is not the same as the original one, unless the tools are aided by leaving laborious annotations in the source code.[4] The behavioral parts of UML impose even more challenges for RTE.
Usually, UML class diagrams are supported to some degree; however, certain UML concepts, such as associations and containment do not have straightforward representations in many programming languages which limits the usability of the created code and accuracy of code analysis/reverse engineering (e.g., containment is hard to recognize in the code).
A more tractable form of round-trip engineering is implemented in the context of framework
Round-trip engineering is critical for maintaining consistency among multiple models and between the models and the code in Object Management Group's (OMG) Model-driven architecture. OMG proposed the QVT (query/view/transformation) standard to handle model transformations required for MDA. To date[when?], a few implementations of the standard have been created. (Need to present practical experiences with MDA in relation to RTE).
Controversies
Code generation controversy
Disadvantages
There is a serious risk that the generated code will rapidly differ from the model or that the reverse-engineered model will lose its reflection on the code or a mix of these two problems as result of cycled reengineering efforts.[7]
Regarding behavioral/dynamic part of
if,switch,enum
) being either missing or misinterpreted. If edited and imported back may result in different or incomplete model.[8][9] The same goes for code snippets used for code generation stage for the pattern-implementation and user-specific logic: intermixed they may not be easily reverse-engineered back.[8][9]There is also general lack of advanced tooling for modelling that are comparable to that of modern IDEs (for testing, debugging, navigation, etc.) for general-purpose programming languages and domain-specific languages.[9]
Examples in software engineering
Perhaps the most common form of round-trip engineering is synchronization between UML (
Round-trip engineering based on Unified Modeling Language (UML) needs three basic tools for software development:[citation needed]
- Source Code Editor;
- UML Editor for the Attributes and Methods;
- Visualisation of UML structure
References
- ISBN 978-1937434106.
- ISBN 978-1-4020-8741-7.
- ISBN 978-3-540-46505-8.
- ISBN 978-0-7645-5875-7.
- ^ http://www.developerdotstar.com/mag/articles/reeves_design_main.html by Jack W. Reeves
- ^ Reeves, Jack W. (1992). "What is software engineering". www.bleading-edge.com. C++ Journal. Retrieved 2023-07-25.
- ^ "Help -". www.modeliosoft.com. Retrieved 2023-07-25.
- ^ a b Siegl, Daniel. "Why Round-Trip Engineering does not work | LieberLieber Modelling Expert". Retrieved 2023-07-25.
- ^ a b c "8 Reasons Why Model-Driven Approaches (will) Fail". InfoQ. Retrieved 2023-07-29.