Author Topic: Generating class and sequence diagrams from code  (Read 2335 times)

mr nobody 11

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Generating class and sequence diagrams from code
« on: March 01, 2023, 03:18:10 am »
Hello Dear EA users,

I have been investigating several methods to create sequence diagram and class diagram from source code. There are plenty of options for class diagrams including EA`s own method.

Unfortunately, for the sequence diagram, I could only find methods that work with Java, not c++. Do you know any tool that supports c++? and does EA supports sequence diagram generation from c++ code?

If you ever worked on this kind of generation. I would appreciate if you share your experiences before I try all the methods I found to see which one is the best way to go.

Best,

mr nobody 11
« Last Edit: March 01, 2023, 03:20:11 am by mr nobody 11 »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Generating class and sequence diagrams from code
« Reply #1 on: March 01, 2023, 09:23:28 am »
Well, it's simply nonsense. Every now and then someone wants to have SDs from code, but I have to be blunt in my answer. Even if you never heard of the halting problem it should be obvious that the sheer amount of possible paths through code can not be visualized (except maybe for HelloWorld). However, you can create SDs from logs during running code which visualizes the taken path. IIRC EA can do that, though I never used it. Creating an SD by thinking about the code reveals what SDs are intended for: getting an impression. If you get the dump you still don't know what happens.

q.

jfzouain

  • EA User
  • **
  • Posts: 151
  • Karma: +6/-1
    • View Profile
Re: Generating class and sequence diagrams from code
« Reply #2 on: March 02, 2023, 03:02:51 am »
Well, the best way to create SD is going thru the code and create the SD yourself, like qwerty says, you got the correct answer.
There is no silver bullet creating SD, if you want to learn how to create an SD out of your code, please check my eBook SDD (Software Design Document) at Leanpub.
It gives some hints on creating SD, Class Diagram and AD out of your code.

https://leanpub.com/umlerpworkshop-report-sdd
Best regards

Jose Zouain