IBM Support

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

Subscribe

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
    ce
        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
    model.
    
    ??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

Comments

APAR Information

  • APAR number

    PM18478

  • Reported component name

    TLOGIC RHAPSODY

  • Reported component ID

    5724V74RP

  • Reported release

    750

  • Status

    CLOSED PRS

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-07-15

  • Closed date

    2010-09-16

  • Last modified date

    2010-09-16

  • 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