Engineering

 View Only
  • 1.  Generating Interaction Diagrams of existing ADA source code

    Posted Tue June 15, 2021 12:10 PM

    Hello,

    I am able to successfully use Rhapsody Reverse Engineering to 'load' existing ADA source code, & generate Classifier Diagrams like USE Case/Class/Object Model Diagrams by checking the 'Populate Diagram' option in the pop-up window.

    Tobe able to generate Interaction Diagrams, one would need to run the code. Rhapsody integrates with Eclipse & one can compile source files (Rhapsody generated sourse or existing source files), for C/C++ & Java projects.

    With ADA, the IDE needs to be able to compile the source. Eclipse has the GNATBench plugin.

    So my questions are

    1. Has anyone been able to successfully compile ADA on Eclipse? I have an old version GNATBench 2.4.0 that doesn't install on Eclipse 2021.03 (v4.19).
    2. Has anyone been able to generate Interaction Diagrams on Rhapsody for ADA source files ?


    #Engineering
    #Support
    #SupportMigration


  • 2.  RE: Generating Interaction Diagrams of existing ADA source code

    Posted Fri June 25, 2021 08:21 AM

    Hello,

    To use Gnat Bench 2.4.0, I suggest using Eclipse 3.5.2.

    I have some questions to understand your need:

    • What is the motivation to use an IDE? Is it mandatory? I ask because Rhapsody is already able to compile the reversed code with GNAT compiler...

    • Do you mean "Sequence Diagram" when you speak about "Interaction Diagram"?



    #Engineering
    #Support
    #SupportMigration


  • 3.  RE: Generating Interaction Diagrams of existing ADA source code

    Posted Fri June 25, 2021 08:30 AM

    Hello,

    Regarding your questions

    • IDE? To use in conjunction withRhapsody to generate Interaction Diagrams, SEquence diagram in particular.. Also Communication Diagram if possible. I did not know we can get Rhapsody to compile with GNAT compiler! I thought it works only in conjunction with Eclipse.. I'll try to get some examples compiling on Rhapsody. Any tutorials/documentation on this anywhere online?

    • Yes, I need the Sequence Diagrams.. also communication diagram, if possible.

    Thanks a lot!



    #Engineering
    #Support
    #SupportMigration


  • 4.  RE: Generating Interaction Diagrams of existing ADA source code

    Posted Fri June 25, 2021 09:04 AM


  • 5.  RE: Generating Interaction Diagrams of existing ADA source code

    Posted Thu July 01, 2021 02:10 PM

    Hello,

    Thank you so much for this guidance.. The ppt explains how to implement a very basic 'hello world' model in Rhapsody, generate ada source for it & compile it.. I tried.. but it still doesn't work. Will I have to do step 2explained below?


    Here's my take away

    1. Rhapsody is not an IDE per se. So only Rhapsody-generated source code can be compiled. I can't just load my existing source code & have it compile on Rhapsody. Am I right?
    2. So if I have existing, working source for which I want sequence diagrams, I'll have to load it into Rhapsody using "Reverse Engineering Ada Source Files". Then 'populate' an object model diagram & 'Build Framework'. This should, in principle, generate ada source that replicates my existing source code. Am I right?
    3. Problem is, during the reverse engineering Rhapsody isn't building the object structures correctly. All Ada Procedures declared as "separate" & implemented in their own source file aren't loaded correctly. I can't find the contents of these "separate" procedures in the loaded class structure in Rhapsody.
    4. This issue I'm having will also exist if I got Eclipse to work in conjunction with Rhapsody, as in this case eclipse will only be able to compile Rhapsody generated Ada source.


    For point #3, I can probably try to set up a test case example & see if Rhapsody code generation manages to replicate my existing example.

    Sorry again for a rather specific, arcane requirement.. Thanks a lot!



    #Engineering
    #Support
    #SupportMigration


  • 6.  RE: Generating Interaction Diagrams of existing ADA source code

    Posted Thu July 08, 2021 02:06 PM

       Hello,


    Here are some answers to your questions:


    1) it is possible to compile the generated code with some additional source files. There is an option in configuration settings to do that


       2) correct


       3) it is strange that separate operations are not correctly imported into the rhapsody model. What is sure that the files are not generated in the place that you expect. We need to investigate a little bit to help you





    #Engineering
    #Support
    #SupportMigration


  • 7.  RE: Generating Interaction Diagrams of existing ADA source code

    Posted Mon July 12, 2021 02:57 PM

    Hello Louis,

    Sorry for the late reply!

    Yes, so that's the gist of my problem right now. Code generation isn't working because reverse engineering isn't able to detect certain language elements, like the 'Separate' keyword. Ada task is also not fully reverse engineered.


    I can setup a test case to replicate the problem if that would help.


    If I find more such language features that aren't correctly parsed through to build the model, I'll keep you informed. But it would be of great help if I could find atleast a work-around for this problem.


    Thanks a lot!



    #Engineering
    #Support
    #SupportMigration