[Uml-devel] [Bug 141644] New: Ada95 Code Generation Errors for Aggregation

Mark Gardinier ati at san.rr.com
Tue Feb 13 18:52:31 UTC 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=141644         
           Summary: Ada95 Code Generation Errors for Aggregation
           Product: umbrello
           Version: unspecified
          Platform: Fedora RPMs
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: umbrello-devel.kde.org
        ReportedBy: ati san rr com


Version:            (using KDE KDE 3.5.5)
Installed from:    Fedora RPMs
Compiler:          GPS (Gnat) N/A Not a  compiler problem
OS:                Linux

The code generator for Ada95 generates inhertance correctly.  However, when using aggregation between two classes it generates wrong code.  In the example attached, there are 3 classes.  Child inherits off parent.  A_Friend is an aggregate of Child.  In the file generated by Umbrello, a_friend.ads, there are two "Aggregation" fields in the tagged record object (M_ and M_) when there should be none.  In the child.ads file, there are the same two fields.  In this child object, there should be one aggregation field called Pal (the aggregation name) and it should be typed as a "sequence" of Friends.  The parent.ads file was generated correctly.  See the note on the class model for more.

I've attached several files.  The file newtest.xmi contains the xml.  The files parent.ads, child.ads, and a_friend.ads are what is generated by Umbrello.  The files Prag_A_Friend.ads, Prag_Child.ads, and Prag_Parent.ads were generated by a different UML tool that runs on Windows.  They are almost correct. This tool generated the multiplicity of the Child-Friend aggregation as a single instance instead of an array.  The vendor of the tool admitted this was wrong but it was what the customer wanted.

In addition, a file int.ads was generated when there is no type int on the diagram.  I've had the same type of problem occur when I have a class on a diagram model that is associated to another class and I remove the assocation.  In this case, the code generator still added the association even though it was removed from the diagram and the diagram was resaved.




More information about the umbrello-devel mailing list