UML And C No Longer Oil And Water

Nov. 16, 2006
Many UML 2.0 products have been able to generate code for languages like Ada, C, C++, and Java from UML (Universal Modeling Language) models. Typically, though, the C developer was expected to learn UML. Legacy code would be maintained, but t

Many UML 2.0 products have been able to generate code for languages like Ada, C, C++, and Java from UML (Universal Modeling Language) models. Typically, though, the C developer was expected to learn UML. Legacy code would be maintained, but the new target would be UML. While it's not a bad approach, it doesn't always make friends.

The new C support in the latest release (V7) of Telelogic's Rhapsody breaks the mold by allowing C developers to employ modeling while retaining the file and directory hierarchy they already use with tools such as the Eclipse IDE (integrated development environment).

This isn't just a use of the existing source files but rather showing and building graphical models using these file relationships (see the figure). Rhapsody's reverse engineering feature can scan source files and create these C-style models, making startup almost effortless.

Even more important is the ability to move back and forth between the Eclipse CDT (C/C++ Development Tools) and the UML model. Changes move in both directions, letting designers complete high-level UML design and have the changes reflected in the code. Likewise, new functions added to the C source code will show up as functions available in UML. A few mouse clicks can move from C source code to the matching UML definition and back again.

Of course, changes can drive programmers and managers to drink if the right code management tools aren't used. That's why the new graphical differentiation feature is so important. It graphically highlights changes in the UML models.

Another addition in V7 is support for the Mathworks' Simulink R2006b. It provides a similar linkage between UML and Simulink's code allowing equations and Simulink modeling code to be incorporated into Rhapsody. The integration provides co-execution capabilities.

The Mathworks
www.mathworks.com
Telelogic
www.telelogic.com

About the Author

William G. Wong | Senior Content Director - Electronic Design and Microwaves & RF

I am Editor of Electronic Design focusing on embedded, software, and systems. As Senior Content Director, I also manage Microwaves & RF and I work with a great team of editors to provide engineers, programmers, developers and technical managers with interesting and useful articles and videos on a regular basis. Check out our free newsletters to see the latest content.

You can send press releases for new products for possible coverage on the website. I am also interested in receiving contributed articles for publishing on our website. Use our template and send to me along with a signed release form. 

Check out my blog, AltEmbedded on Electronic Design, as well as his latest articles on this site that are listed below. 

You can visit my social media via these links:

I earned a Bachelor of Electrical Engineering at the Georgia Institute of Technology and a Masters in Computer Science from Rutgers University. I still do a bit of programming using everything from C and C++ to Rust and Ada/SPARK. I do a bit of PHP programming for Drupal websites. I have posted a few Drupal modules.  

I still get a hand on software and electronic hardware. Some of this can be found on our Kit Close-Up video series. You can also see me on many of our TechXchange Talk videos. I am interested in a range of projects from robotics to artificial intelligence. 

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!