Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Papyrus-RT/Developer/Design/0.8/Codegen Architecture Details

< Papyrus-RT‎ | Developer‎ | Design
Revision as of 10:50, 18 August 2015 by Unnamed Poltroon (Talk) (Created page with "==Overview== The code generator input is a UML2 model (org.eclipse.uml2) with the UML-RT profile applied to it. The output is a CDT project (C++). More precisely, the input...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Overview

The code generator input is a UML2 model (org.eclipse.uml2) with the UML-RT profile applied to it. The output is a CDT project (C++).

More precisely, the input to the generator is a list of UML2 elements that have changed. When invoked from within Papyrus, the tool keeps track of which elements have changed since the last generation.

There are two intermediate meta-models:

  1. xtUMLrt: a meta-model that simplifies UML-RT and contains a common core shared with xtUML.
  2. Cpp: a meta-model of a sub-set of C++.

The overall generation process is depicted in the following diagram:

PapyrusRT-codegen-process.png

The rationale for the intermediate models is as follows:

  • The xtUMLrt meta-model is intended to simplify UML2, in order to simplify the generator itself, while allowing customization, isolating the generator from the toolset, and providing a common language that allows its eventual extension to support xtUML.
  • The Cpp meta-model isolates the generator from issues such as formatting, body/header file generation, file regeneration avoidance, CDT project and makefile generation, etc.

The core of the code generator consists of separate sub-generators for different kinds of elements. Namely:

  • Capsules
  • (Passive) classes
  • Protocols
  • State machines
  • Deployment composition/structure

With the exception of the state machine generator, these translate an xtUMLrt model directly into a C++ model. The state machine generator performs some further intermediate steps on the xtUMLrt model before generating the C++ model. These steps are detailed below.

Plugins

The following tables provide a description of the features and plugins that form the code generator.

Features/Releng Description
org.eclipse.papyrusrt.releng Feature packaging
org.eclipse.papyrusrt The top-level feature that groups all plugins
org.eclipse.papyrusrt.codegen-feature The code generator feature (separately installable)
org.eclipse.papyrusrt.protocoleditor-feature Papyrus protocol editor feature (separately installable)
org.eclipse.papyrusrt.rts-feature The RTS feature (separately installable)
Plugins Description
org.eclipse.papyrusrt.codegen The top-level plug-in that provides the Activator
org.eclipse.papyrusrt.codegen.cpp The core of the generator. Includes Capsule, Class and Protocol generators
org.eclipse.papyrusrt.codegen.cpp.rts Cpp model representation of the RTS elements
org.eclipse.papyrusrt.codegen.cpp.statemachines.flat State machine generator (from flat state machines)
org.eclipse.papyrusrt.codegen.cpp.structure Deployment structure generator
org.eclipse.papyrusrt.codegen.lang Base for language-specific plugins
org.eclipse.papyrusrt.codegen.lang.cpp The Cpp intermediate meta-model
org.eclipse.papyrusrt.codegen.statemachines.flat State machine flattener
org.eclipse.papyrusrt.codegen.statemachines.flat.model Extensions to the xtUMLrt meta-model for SM generation
org.eclipse.papyrusrt.codegen.papyrus Papyrus integration
org.eclipse.papyrusrt.codegen.standalone Standalone generator (does not require Eclipse instance running)
org.eclipse.papyrusrt.protocoleditor Papyrus protocol editor
org.eclipse.papyrusrt.rts The RTS (a clone of the umlrt.rts git repository) and UML-RT runtime model library
org.eclipse.papyrusrt.utils Utilities used by several plugins
org.eclipse.papyrusrt.codegen.cpp.profile New C++ profile
org.eclipse.papyrusrt.xtumlrt.common.model The common xtUMLrt meta-model (intermediate representation)
org.eclipse.papyrusrt.xtumlrt.umlrt.model The UML-RT-specific extensions to the common xtUMLrt meta-model
org.eclipse.papyrusrt.xtumlrt.xtuml.model The xtUML-specific extensions to the common xtUMLrt meta-model
org.eclipse.papyrusrt.xtumlrt.platform.model Base for platform/target specific meta-models
org.eclipse.papyrusrt.xtumlrt.platform.cpp.model Extensions for C++ generation

Back to the top