• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 674
  • Last Modified:

How well do UML and the C language work together?

I'm aware that UML is language-agnostic, but since it was originally developed for OOP, I'm wondering how well it would describe a procedural language like C.   I need to model legacy code, but if not UML, then what?

Thank you.
0
fuze44
Asked:
fuze44
4 Solutions
 
SriVaddadiCommented:
Are you using Object C? or plain C? It also depends on what you want to draw i mean use-case would make sense but at the same time class diagram may not make sense. Sequence diagram may make some sense.
0
 
marklorenzCommented:
Do you need to create designs for new efforts in C or need to document and add to existing C code designs? In either case, you will want to use a tool - doing this by hand is not feasible in any reasonable size project.  Enterprise Architect (EA) among other tools will reverse engineer as well as generate C code from UML designs.  So, in either situation you should be all set.

There are ways to do OO designs that apply to function-oriented languages.  Take a read of this:
http://www.planetpdf.com/codecuts/pdfs/ooc.pdf

In addition, there are parts of UML and agile (e.g. user stories, collaboration and state diagrams) that apply no matter the language.  Finally, C++ and C# are in the same language family, adding different levels of OO support.  That may be a path you could consider.

Best of luck, Mark
0
 
marklorenzCommented:
0
 
DarrenDCommented:
Hi,

This is an interesting article on Rhapsody.

http://www.drdobbs.com/184401948;jsessionid=0ZOCMNSXZ3R3LQE1GHPCKH4ATMY32JVN?pgno=1

The company has been bought by IBM since and you can get a trial version here.
http://www-01.ibm.com/software/awdtools/rhapsody/

Just a thought,

Darren
0
 
fuze44Author Commented:
This effort is to diagram an existing system which is coded in plain C.  The system is very large and complex, and it employs many complex mathematical algorithms.  No one developer can understand it all, so we're wanting to make the parts and the whole more comprehensible to the team.  Abstraction via diagrams would be very helpful.  

Perhaps an OO paradigm applied to this procedural code would be helpful.  Many of the developers here are actually engineers, so it might make concepts more tangible.   Processes and data could be discussed as more distinct entities.

Thanks to everyone for your input and links.  I will read those and follow up with any questions/comments that arise.  I'll also be checking here for additional posts.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now