[Uml-devel] (forw) Re: Umbrello UML Modeller

Sebastian Stein seb.stein at hpfsc.de
Thu Oct 17 13:41:06 UTC 2002


Maybe some ideas how to fiddle out the assoc. problem between classes for
code import parsing. He is providing a tool, but I think it is too huge
(it's a hacked version of gcc).

Steinchen

----- Forwarded message from Mike Godfrey <migod at uwaterloo.ca> -----

From: Mike Godfrey <migod at uwaterloo.ca>
Subject: Re: Umbrello UML Modeller
Date: 17 Oct 2002 16:16:17 -0400
To: Sebastian Stein <seb.stein at hpfsc.de>

On Thu, 2002-10-17 at 13:44, Sebastian Stein wrote:
> Mike Godfrey <migod at uwaterloo.ca> [021017 16:22]:
> > (if you're looking to add reverse engineering features, you can also
> > easily extract the info you need from .class files, whihc would be a
> > cool feature.)
> 
> What do you mean with .class files? Is this something specific to Java? I'm
> not the Java guru ;-)

Java .class files can be queried at the command line using simple tools
contained in the JDK.  That is, you can extract all of the interface
info you would want without parsing the source (or even having the
source!).  You need to do a small amount of manipulation to the output
(it's a little cryptic but it's dead simple).

So a little Perl/AWK script can get you reverse engineering of Java
.class files.  This is probably an afternoon's worth of work and well
worth the trouble!

Lots of Java is distributed as byte code only.  What a cool feature to
have.

> 
> Anyway. I've tested the import filters for C++. You can import header files
> and Umbrello is generating the classes with the operations and attributes.

I'm using C++ more myself these days too.  I took Umbrello for a simple
test drive and it seemed to work well on my small examples.  I do wonder
how well you would do with ugly-but-legal code that's hard to parse. 
C++ is notorious for this.

A couple of possible problems (I didn't investigate): 
-- I note that some C++ programmers use .H or .hh for their headers.
-- how do you handle ifdefs in the headers (ie for one arch, I need
extra methods or a different param type)

> So that is ok, but Umbrello is not able to determine the connections between
> the classes. I don't know if some other tools can do this because I think
> this is really hard to do.

Ah yes, relationship resolution problem.  It's simple in Java (assuming
correct code). For C++ doing a naive job is simple; doing a correct one
is almost impossible and basically requires writing or hacking a
compiler.

Our research group has such a tool for C++ called cppx.  It's a hacked
version of gcc/g++ that grabs the internal representation and outputs
entity and relationship information about C++ program entities (it can
also do C).  You might want to have a look at it.  It's open source of
course (since it's a hacked version of gcc/g++).

http://swag.uwaterloo.ca/~cppx/

It's in early "stable" release.


> 
> Oh yes, I forgot to mention, that you are welcome to join the mailing lists
> on sf.net/project/uml. We are allways very interested in support (not only
> coding). There are a lot of discussions about the right interpretation of
> uml specs and so on. It's a hard topic I think.

To be honest, I would love to do this.  I do research in reverse
engineering and visualization or sw systems.  However, it's probably not
a good use of my time as I must go up for tenure review soon.

However, I am definitely not interested in long arguments about the True
Nature of UML :-)



> Steinchen
> -- 
> http://www.hpfsc.de/ - die Seite rund um:
> Assembler, Bundeswehr, TFT LCDs, Halle/Saale, Fahrradtouren,
> Wanderstaat Mauma, Raumschiff USS Nathan, Enemy Room, MLCAD Tutorial
-- 
Michael Godfrey PhD, Assistant Professor
Nortel Networks Jr Chair, Telecommunications Software Engineering
Univ of Waterloo, School of Computer Science
email:  migod at uwaterloo.ca 
URL:    http://www.uwaterloo.ca/~migod

----- End forwarded message -----

-- 
http://www.hpfsc.de/ - die Seite rund um:
Assembler, Bundeswehr, TFT LCDs, Halle/Saale, Fahrradtouren,
Wanderstaat Mauma, Raumschiff USS Nathan, Enemy Room, MLCAD Tutorial




More information about the umbrello-devel mailing list