Round-trip engineering

Last updated

Round-trip engineering (RTE) in the context of model-driven architecture is a functionality of software development tools that synchronizes two or more related software artifacts, such as, source code, models, configuration files, documentation, etc. between each other. [1] The need for round-trip engineering arises when the same information is present in multiple artifacts and when an inconsistency may arise in case some artifacts are updated. For example, some piece of information was added to/changed in only one artifact (source code) and, as a result, it became missing in/inconsistent with the other artifacts (in models).

Contents

Overview

Round-trip engineering is closely related to traditional software engineering disciplines: forward engineering (creating software from specifications), reverse engineering (creating specifications from existing software), and reengineering (understanding existing software and modifying it). Round-trip engineering is often wrongly defined as simply supporting both forward and reverse engineering. In fact, the key characteristic of round-trip engineering that distinguishes it from forward and reverse engineering is the ability to synchronize existing artifacts that evolved concurrently by incrementally updating each artifact to reflect changes made to the other artifacts. Furthermore, forward engineering can be seen as a special instance of RTE in which only the specification is present and reverse engineering can be seen as a special instance of RTE in which only the software is present. Many reengineering activities can also be understood as RTE when the software is updated to reflect changes made to the previously reverse engineered specification.

Types

Various books describe two types of RTE: [2] :459

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 Rational Rose, Micro Focus Together, ESS-Model, BlueJ, and Fujaba among those capable, with Fujaba said to be capable to also identify design patterns. [3]

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 application programming interfaces (APIs), whereby a model describing the usage of a framework API by an application is synchronized with that application's code. In this setting, the API prescribes all correct ways the framework can be used in applications, which allows precise and complete detection of API usages in the code as well as creation of useful code implementing correct API usages. Two prominent RTE implementations in this category are framework-specific modeling languages and Spring Roo (Java).

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

Code generation (forward-engineering) from models means that the user abstractly models solutions, which are connoted by some model data, and then an automated tool derives from the models parts or all of the source code for the software system. In some tools, the user can provide a skeleton of the program source code, in the form of a source code template where predefined tokens are then replaced with program source code parts during the code generation process.

UML (if used for MDA) diagrams specification was criticized for lack the detail which is needed to contain the same information as is covered with the program source. Some developers even claim that "the Code is the design". [5] [6]

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 UML for featues like statechart diagram there is no equivalents in programming languages. Their translation during code-generation will result in common programming statement (.e.g 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 (Unified Modeling Language) models and the corresponding source code and entity–relationship diagrams in data modelling and database modelling.

Round-trip engineering based on Unified Modeling Language (UML) needs three basic tools for software development:[ citation needed ]

Related Research Articles

<span class="mw-page-title-main">Unified Modeling Language</span> Software system design modeling tool

The unified modeling language (UML) is a general-purpose visual modeling language that is intended to provide a standard way to visualize the design of a system.

Model Driven Architecture (MDA) is a software design approach for the development of software systems. It provides a set of guidelines for the structuring of specifications, which are expressed as models. Model Driven Architecture is a kind of domain engineering, and supports model-driven engineering of software systems. It was launched by the Object Management Group (OMG) in 2001.

<span class="mw-page-title-main">Objecteering</span>

Objecteering is a UML and MDA CASE tool edited by Objecteering Software, a subsidiary of Softeam.

<span class="mw-page-title-main">Business process modeling</span> Activity of representing processes of an enterprise

Business process modeling (BPM) in business process management and systems engineering is the activity of representing processes of an enterprise, so that the current business processes may be analyzed, improved, and automated. BPM is typically performed by business analysts, who provide expertise in the modeling discipline; by subject matter experts, who have specialized knowledge of the processes being modeled; or more commonly by a team comprising both. Alternatively, the process model can be derived directly from events' logs using process mining tools.

GXL is designed to be a standard exchange format for graphs. GXL is an extensible markup language (XML) sublanguage and the syntax is given by an XML document type definition (DTD). This exchange format offers an adaptable and flexible means to support interoperability between graph-based tools.

A UML tool is a software application that supports some or all of the notation and semantics associated with the Unified Modeling Language (UML), which is the industry standard general-purpose modeling language for software engineering.

<span class="mw-page-title-main">StarUML</span>

StarUML is a software engineering tool for system modeling using the Unified Modeling Language, as well as Systems Modeling Language, and classical modeling notations. It is published by MKLabs and is available on Windows, Linux and MacOS.

Model-driven engineering (MDE) is a software development methodology that focuses on creating and exploiting domain models, which are conceptual models of all the topics related to a specific problem. Hence, it highlights and aims at abstract representations of the knowledge and activities that govern a particular application domain, rather than the computing concepts.

Executable UML is both a software development method and a highly abstract software language. It was described for the first time in 2002 in the book "Executable UML: A Foundation for Model-Driven Architecture". The language "combines a subset of the UML graphical notation with executable semantics and timing rules." The Executable UML method is the successor to the Shlaer–Mellor method.

<span class="mw-page-title-main">Systems modeling language</span> General-purpose modeling language

The systems modeling language (SysML) is a general-purpose modeling language for systems engineering applications. It supports the specification, analysis, design, verification and validation of a broad range of systems and systems-of-systems.

NClass is a free and open source software tool to create Unified Modeling Language (UML) class diagrams for C# and Java applications. It is written in C# only and needs the .NET Framework 4.0 or the latest version of Mono.

The RISE Editor is a free information modeling tool for information system development based on model driven development. Functionality includes automatic interface composition, database generation and updates, data insertion, programming interface publishing and web service generation. The modeling takes place in Entity Relationship Diagrams (ERD). The layout for these diagrams can be changed to Relational Database or Unified Modeling Language (UML), the functionality stays the same though.

Reverse engineering is a process or method through which one attempts to understand through deductive reasoning how a previously made device, process, system, or piece of software accomplishes a task with very little insight into exactly how it does so. Depending on the system under consideration and the technologies employed, the knowledge gained during reverse engineering can help with repurposing obsolete objects, doing security analysis, or learning how something works.

<span class="mw-page-title-main">UModel</span>

UModel is a UML software modeling tool from Altova, the creator of XMLSpy. UModel supports all 14 UML 2 diagram types and adds a unique diagram for modeling XML Schemas in UML. UModel also supports SysML for embedded system developers, and business process modeling for enterprise analysts. UModel includes code engineering functionality including code generation in Java, C#, and Visual Basic, reverse engineering of existing applications, and round-trip engineering.

<span class="mw-page-title-main">BOUML</span>

BOUML is a Unified Modeling Language (UML) diagram designer. Programmed in C++ and Qt, it is multilingual, and supports code generation and code reverse engineering. The releases prior to version 4.23 are free software licensed under the GNU General Public License (GPL). BOUML 5 up to 6.12 is proprietary software. BOUML 7 and later is free software.

<span class="mw-page-title-main">Applications of UML</span>

UML is a modeling language used by software developers. UML can be used to develop diagrams and provide users (programmers) with ready-to-use, expressive modeling examples. Some UML tools generate program language code from UML. UML can be used for modeling a system independent of a platform language. UML is a graphical language for visualizing, specifying, constructing, and documenting information about software-intensive systems. UML gives a standard way to write a system model, covering conceptual ideas. With an understanding of modeling, the use and application of UML can make the software development process more efficient.

<span class="mw-page-title-main">Interaction Flow Modeling Language</span>

The Interaction Flow Modeling Language (IFML) is a standardized modeling language in the field of software engineering. IFML includes a set of graphic notations to create visual models of user interactions and front-end behavior in software systems.

<span class="mw-page-title-main">Umple</span> Object-oriented programming and modelling language

Umple is a language for both object-oriented programming and modelling with class diagrams and state diagrams. The name Umple is a portmanteau of "UML", "ample" and "Simple", indicating that it is designed to provide ample features to extend programming languages with UML capabilities.

The Knowledge Based Software Assistant (KBSA) was a research program funded by the United States Air Force. The goal of the program was to apply concepts from artificial intelligence to the problem of designing and implementing computer software. Software would be described by models in very high level languages (essentially equivalent to first order logic) and then transformation rules would transform the specification into efficient code. The air force hoped to be able to generate the software to control weapons systems and other command and control systems using this method. As software was becoming ever more critical to USAF weapons systems it was realized that improving the quality and productivity of the software development process could have significant benefits for the military, as well as for information technology in other major US industries.

<span class="mw-page-title-main">Enterprise Architect (software)</span> Visual modeling and design tool

Sparx Systems Enterprise Architect is a visual modeling and design tool based on the OMG UML. The platform supports: the design and construction of software systems; modeling business processes; and modeling industry based domains. It is used by businesses and organizations to not only model the architecture of their systems, but to process the implementation of these models across the full application development life-cycle.

References

  1. Gentle, Anne (2012). Conversation and Community: The Social Web for Documentation (2nd ed.). XML Press. ISBN   978-1937434106.
  2. Sobh, Tarek M. (2008). Advances in computer and information sciences and engineering. International Conference on Systems, Computing Sciences and Software Engineering. New York?: Springer. ISBN   978-1-4020-8741-7.
  3. Stephan Diehl (2007). Software Visualization: Visualizing the Structure, Behaviour, and Evolution of Software. Springer Science & Business Media. p. 63. ISBN   978-3-540-46505-8.
  4. Andrew Filev; Tony Loton; Kevin McNeish; Ben Schoellmann; John Slater; Chaur G. Wu (2005). Professional UML Using Visual Studio .Net. John Wiley & Sons. p. 181. ISBN   978-0-7645-5875-7.
  5. http://www.developerdotstar.com/mag/articles/reeves_design_main.html by Jack W. Reeves
  6. Reeves, Jack W. (1992). "What is software engineering". www.bleading-edge.com. C++ Journal. Retrieved 2023-07-25.
  7. "Help -". www.modeliosoft.com. Retrieved 2023-07-25.
  8. 1 2 Siegl, Daniel. "Why Round-Trip Engineering does not work | LieberLieber Modelling Expert" . Retrieved 2023-07-25.
  9. 1 2 3 "8 Reasons Why Model-Driven Approaches (will) Fail". InfoQ. Retrieved 2023-07-29.