IBM Support

PM18478: RE C++ incorrectly treats relations with const modifier as attri butes rather than associations


You can track all active APARs for this component.

APAR status

  • Closed as Permanent restriction.

Error description

  • Issue: Found when trying to reverse engineer CommandInterpreter
    sample project sent by SELEX Comms. Essentially, the goal for SE
    LEX Comms is to be able to RE the code and merge it with diagram
    s imported from Rose. To achieve this aim the model elements RE'
    d from the code need symmetry with the metatypes used in the Ros
    e model. The most critical metatypes are the relations because t
    hese are used on class diagrams in the Rose model. Relations are
     used to capture 'by reference', 'by pointer' and 'by value' ass
    ociations to other classes. It was found that Rhapsody is succes
    sfully able to RE relations to other classes (ensuring CreateBla
    ckDiamondAssociations property is enabled).
        Images m_images; // as composition
        CommandUpdateImpl ?m_rCommandUpdateImpl; // as reference
        CommandUpdateImpl *m_rCommandUpdateImpl; // as pointer
    The problem found was that presence of a 'const' keyword in fron
    t of the relation means that the RE tool creates an attribute, r
    ather than relation.
        const Images m_images; // as composition
        const CommandUpdateImpl ?m_rCommandUpdateImpl; // as referen
        const CommandUpdateImpl *m_rCommandUpdateImpl; // as pointer
    In the screenshot below both m_rCommandUpdateImpl and m_rCommand
    InterpreterFacadeOut are references. However, m_rCommandInterpre
    terFacadeOut is captured as an Attribute, rather than Associatio
    n End.
    ??refer screenshot1??
    As well as inconsistency in usage, the problem this causes is th
    at relations such as the following cannot be shown on diagrams.
    This means that it's not possible to re-create the diagrams that
     SELEX have in their Rose model in Rhapsody using the RE'd code
    ??refer screenshot2??
    Note also that once RE'd the user would expect to be able to add
     or remove the const modifier in the code without the metatype i
    n the model changing from Attribute to Association End.

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * PROBLEM DESCRIPTION:                                         *
    * RECOMMENDATION:                                              *
    When reverse engineering C++ code, Rhapsody treats relations
    with const modifier as attributes rather than associations.

Problem conclusion

  • Rhapsody does not support modeling of const associations.
    This can be submitted as an enhancement request.

Temporary fix


APAR Information

  • APAR number


  • Reported component name


  • Reported component ID


  • Reported release


  • Status


  • PE




  • Special Attention


  • Submitted date


  • Closed date


  • Last modified date


  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

Applicable component levels

Document information

More support for: Rational Rhapsody

Software version: 7.5

Reference #: PM18478

Modified date: 16 September 2010