Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Papyrus/Neon Work Description/Improvements/C++ Roundtrip

< Papyrus‎ | Neon Work Description
Revision as of 10:59, 26 January 2016 by Shuai.li.cea.fr (Talk | contribs) (Overview)

Overview

The ability to automatically maintain the consistency of multiple, changing software artifacts, in software development environments/tools, is commonly referred to as round-trip engineering.

Round-trip engineering is related to traditional software engineering disciplines:

  • Forward engineering: creating software from specifications
  • Reverse engineering: creating specifications from existing software

Round-trip generalizes both forward and reverse engineering. It adds synchronization of existing artifacts that evolved concurrently by incrementally updating each artifact to reflect changes made to the other artifact.

The following sections on this page only sums up document File:Papyrus cpp roundtrip.pptx.

Papyrus Forward/Reverse Engineering Features

Since forward and reverse engineering are part of round-trip engineering, they are developed for Papyrus Neon through three efforts:

  • Improvement of existing C++ code generation feature
  • Development of new C++ reverse feature

Like its name indicates, the C++ code generation feature already lets us produce some C++ code from a UML model. The C++ reverse feature has several usages:

  • It allows us to reverse some legacy C++ code to a new or existing UML model (by overwriting it in the latter case).
  • It merges some code changes to an existing UML model, without overwriting the UML model

Through these two plugins, forward and reverse engineering are assured in Papyrus for C++. Indeed, the user can:

  • Only modify his/her model and generate the code each time something changes.
  • Only modify his/her code and reverse to a model each time something changes.

Papyrus Round-trip Engineering Feature

Round-trip engineering is more complex than simple forward/reverse engineering. Indeed, it needs to handle synchronization between resources that change concurrently in time. We therefore also propose a methodology in Papyrus Neon to fully support C++ round-trip engineering.

Proposed Methodology

This methodology handles the case where several users modify their model AND code at the same time. There should then be some synchronization strategy between the two. We propose two strategies, based on the profile of the user:

  • If the user prefers to handle code: we create an image of the model as code.
  • If the user prefers to handle models: we create an image of the code as a model.

The image in both cases is used to compare changes with the resource of same format. E.g. with the image of the model, which is code, we compare it with the modified code. For a full explanation of the synchronization strategies, the reader is strongly invited to refer to slides 10 and 11 of the File:Papyrus cpp roundtrip.pptx presentation.

Implementation

The proposed methodology is implemented as an IDE in order to make its usage easier. The IDE we propose in Papyrus Neon for C++ round-trip engineering is based on several technologies:

  • Papyrus-Designer for C++ code generation and reverse
  • Eclipse CDT for C++ code modification and changes listening
  • Eclipse code compare for C++ source comparison
  • EMF Compare for UML model comparison
  • EMF IncQuery for model changes listening

From the user-side, he/she only interacts with Papyrus-Designer, Eclipse CDT, and EMF Compare. All of these technologies propose UIs.

Video

Demo

Back to the top