We have not done an extensive identification of parts of the code generator and runtime that could be abstracted. Nevertheless, speaking of the code generator, I can think of a few things that could already be placed under a "common generator":
- the intermediate meta-model (xtUMLrt)
- translation from UML2+UML-RT profile to the intermediate representation (xtUMLrt)
- xtUMLrt optional validation
- state machine flattening (done purely in xtUMLrt)
- construction of the "instance model" (a generation time representation of the runtime structure)
It may be possible to abstract things further, for example if we assume that the target language is an OO language, parts of the code generator could be refactored accordingly. xtUMLrt already has the core OO concepts in addition to UML-RT concepts (e.g. Capsules), so we could, for example, translate a full xtUMLrt model into the subset of xtUMLrt that includes Classes but not Capsules and Protocols. Then the translation to C++ or Java would only have to consider that simple OO subset.
Anyway, I'm just thinking out loud.
As for the runtime, I have more difficulty seeing it right now. Perhaps a C++ core with a Java API layer? I don't know.