News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

FlowCharts from Source Code

Started by ThomasG, January 05, 2006, 09:06:03 PM

Previous topic - Next topic

ThomasG

Hi,

I got a huge project assigned for maintenance. In order to get an idea what is going on, I would like to chart out the project or at least parts of it.

Can you guys give some advices? Maybe some software packages that can do the job?

Thanks,
Thomas

Michael

Hello,

Did you try a fast Google search :)? For example this is what I get.

Michael
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

ThomasG

Hi,

yes I did a search on google. I even tried most of these programs. But so far I couldn't find one that is really satisfying. The programs are either limited in functionality or are very expensive. Now I'm curious if these kind of tools are even used by open source developer. Since I couldn't find any open source solution I'm tempted to say it's not a commonly used tool.

Maybe you guys can point out methods on how get a grip on unknown programs/source code.

Thanks in advance.

Thomas

Ceniza

If the program is well structured and designed it should just be a matter of reading comments and follow the code, if that isn't the case it'll just be a nightmare, even with a flowchart.

ThomasG

Yeah, you are right, unfurtunately it's "structured" in a way only the original programmer can understand what's going on because he programmed it over the last 20 years.

I guess there is only the hard way of trial and error to figure out the source code and the refactor it.

Thanks,
Thomas

Michael

You can also try to search in sourceforge, if you find something useful. May be also in wxCode (but I am not sure).

Michael
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

Game_Ender

The reason those tools are expensive is because the of the difficulties of the C++ language.  It is quite hard to parse and work with, which is why leads to much longer tool developement time, and it is why you won't find much in the way of open source tools that work with it.  I know Umbrello is able to generate class diagrams from C++ code.

Michael

Quote from: Game_Ender on January 06, 2006, 06:29:41 PM
I know Umbrello is able to generate class diagrams from C++ code.

Umbrello looks interesting :), but it works only under Linux, or?

Michael
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

rudin

Maybe StarUML (http://staruml.tigris.org) can help you refactor your code. It runs on Windows, freeware, and open source.

Ceniza

Well, Umbrello is for KDE, and two ways to bring KDE to Windows are: Cygwin and Virtualization.

Tricky to get working under Windows anyway.

Michael

Quote from: Ceniza on January 06, 2006, 07:05:47 PM
Well, Umbrello is for KDE, and two ways to bring KDE to Windows are: Cygwin and Virtualization.

Cygwin is relatively huge. I have tried it for sometimes, but not liked too much. MinGW/MYSYS is IMHO better :), at least for what I needed it. Virtualization is a bit new concept for me :oops:.

I have not tried it, but may be StarUML (suggested by rudin) is a better option under Windows. A search within Tigris.org could also lead to some interesting alternatives.

Michael
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

ThomasG

Thanks, I will try out the suggested programs. I don't care if Linux or Windows, have both running and use whatever does the job done.

I would already happy with a tool that gets plain C right. I just had another look at the code, haven't seen that many goto's since my days of programming BASIC on my Sharp E500s pocket calculator. Any help/tool/hint is appreciated.

Thomas