IBM Support

PM64935: Defect with Ada code generator for call to init_port()

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Description
    ------------
    Please find a sample model and the related files attached.
    
    As per the information under the section 6.3.11 of the
    RiA_CG_User_Guide states:-
    ?6.3.11. User Active class for ravenscar
    To have a ravenscar compliant model with user active classes,
    those classes must be created statically. To do this, the
    property Ada_CG:Class:BaseNumberOfInstances must be filled with
    the number of instance that the model needs.?
    However, on setting this property to ?1? for the Builder2 class,
    results in a compilation error.
    ?builder2.ads:108:03: premature usage of incomplete private type
    'Builder2_t' defined at line 31?.
    The code generated for component configuration
    HOST_Ravenscar_state: Ports_System provides an example of this.
    
    As per the discussion with sodius team - It?s a defect in code
    generator. In this case, the instance of the class should also
    be private, and we should create an accessor to the instance.
    However, not able to get the constructor code located in the
    correct position i.e. before the Init_Ports (this);
    
    The code looks like this:
    procedure Initialize (this : in out Builder_1_2_3_4_t; this_acc
    : in Builder_1_2_3_4_acc_t; active_acc : in
    Oxf.active.Active_wide_acc_t) is
            --+[ operation Initialize().Variables
    
            --+]
      begin
            this.itsBuilder1 := new Builder1.Builder1_t;
            Builder1.Initialize(this.itsBuilder1.all,
    this.itsBuilder1, active_acc);
            this.itsBuilder3 := new Builder3.Builder3_t;
            Builder3.Initialize(this.itsBuilder3.all,
    this.itsBuilder3, active_acc);
            this.itsBuilder4 := new Builder4.Builder4_t;
            Builder4.Initialize(this.itsBuilder4.all);
            Init_Ports (this);
        --+[ operation Initialize()
            this.itsBuilder2 := Builder2.get_Instance_1 ;
            Builder2.Initialize(this.itsBuilder2.all,
    this.itsBuilder2);
        --+]
      end Initialize;
    
    On manually editing this Ada package and change the code as
    below then every thing works.
    
    procedure Initialize (this : in out Builder_1_2_3_4_t; this_acc
    : in Builder_1_2_3_4_acc_t; active_acc : in
    Oxf.active.Active_wide_acc_t) is
            --+[ operation Initialize().Variables
    
            --+]
      begin
            this.itsBuilder1 := new Builder1.Builder1_t;
            Builder1.Initialize(this.itsBuilder1.all,
    this.itsBuilder1, active_acc);
            this.itsBuilder3 := new Builder3.Builder3_t;
            Builder3.Initialize(this.itsBuilder3.all,
    this.itsBuilder3, active_acc);
            this.itsBuilder4 := new Builder4.Builder4_t;
            Builder4.Initialize(this.itsBuilder4.all);
        --+[ operation Initialize()
              this.itsBuilder2 := Builder2.get_Instance_1 ;
            Builder2.Initialize(this.itsBuilder2.all,
    this.itsBuilder2);
    
            Init_Ports (this);
        --+]
      end Initialize;
    
    
    Sodius team agrees - the problem with code generation of call to
    init_port().
    Also, there is no way to control position of elements in the
    constructor.
    And the init_port is always generated when there is a link
    between ports.
    The only solution should be to remove the link between ports,
    and to create operation ini_port manually.
    
    For customer it?s a severe issue and the work around of manual
    editing the links is not a feasible solution and they wants this
    to be fixed at the earliest.
    Also, they are looking for a way to allow the user flexibility
    as to where constructor Code inserts are located within the
    Initialize procedure.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Defect with Ada code generator for call to init_port()
    

Problem conclusion

  • Fixed in 7.6.1.2
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM64935

  • Reported component name

    TLOGIC RHAPSODY

  • Reported component ID

    5724V74RP

  • Reported release

    753

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-05-18

  • Closed date

    2012-07-12

  • Last modified date

    2012-07-12

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

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

Fix information

  • Fixed component name

    TLOGIC RHAPSODY

  • Fixed component ID

    5724V74RP

Applicable component levels

  • R753 PSN

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SS7P9W","label":"Rational Rhapsody"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.5.3","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
12 July 2012