Author Topic: UML and Ada  (Read 2077 times)

minghia

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
UML and Ada
« on: October 22, 2019, 02:25:22 pm »
I have an Ada generic which I am trying to represent in UML using EA. I can work out how to set up the Template Parameters when the parameters may be subprograms. I'm guessing there isn't a standard UML way to do such a thing as this.

My other problem appears to do with how to represent an Ada variant record. This is similar to a C/C++ union except it can have common fields to all variants and the record has a discriminant which may identify which variant is the current one. I know I can represent this by a C/C++ union but it doesn't encompass the whole idea.

Are there any suggestions on how to resolve either issue?

Yours

Tony

Richard Freggi

  • EA User
  • **
  • Posts: 174
  • Karma: +7/-4
    • View Profile
Re: UML and Ada
« Reply #1 on: October 22, 2019, 04:05:52 pm »
UML is a language, so just translate.  But you need to translate the semantics, not the unique dialect of your programming language.

I recommend you explain what you want to capture in the model about the variant record etc. to a 12 year old. Explain it clearly including all the critical things the 12 year old needs to understand.  Write it down in English.  Then look up what you just wrote down in a UML book.  That should give you the answer you are looking for.

Works for me.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6822
  • Karma: +63/-7
    • View Profile
Re: UML and Ada
« Reply #2 on: October 28, 2019, 09:43:24 am »
Conceptually I'd describe a variant as an abstract datatype that is specialized depending on the type of data you want to store within.
Eve

support@sparxsystems.com