Objects by Design Forums Here you can view your subscribed threads, work with private messages and edit your profile and preferences Registration is free! Calendar Find other members Frequently Asked Questions Search Home  
Objects by Design Forums : Powered by vBulletin version 2.3.5 Objects by Design Forums > Main Forums > UML Tools > How to do Reverse Engineering
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
SZ
Administrator

Registered: Apr 2001
Location: New York
Posts: 492

How to do Reverse Engineering

Recently we used a leading UML tool to reverse engineer a large open-source Java project and found it was missing a key feature. The feature is the preservation of packages.

TogetherSoft/Borland always had this right and I would love to know why all UML tools don't just follow their example since this is such a useful feature for deciphering a large body of code.

What TogetherSoft does is to reverse-engineer a code base into a hierarchy of class diagrams which match the package structure of the code. To link all the diagrams together, they include a package symbol on the parent class diagram with a hyperlink to the class diagram for the child package.

Just think of this as being analogous to using any file system navigation tool that has directories and files, where directories have a special icon that, when double clicked, takes you to the contents of the sub-directory.

The product I used reverse-engineered all the classes into one huge class diagram that was impossible to navigate.

Since reverse-engineering is such a useful feature of UML tools, it would surprise me if most of the tools do not work this way. However, the reality is that support for this feature is not as clean as you would like.

If you know of any tools which work the way TogetherSoft works, please add a link to this thread.

To see some reverse-engineering done by TogetherSoft, see the reversing done for JBoss and some other open source projects. Click through on the package symbols and you will see what I described above.

Report this post to a moderator | IP: Logged

Old Post 11-12-2003 02:34 AM
SZ is offline Click Here to See the Profile for SZ Click here to Send SZ a Private Message Visit SZ's homepage! Find more posts by SZ Add SZ to your buddy list Edit/Delete Message Reply w/Quote
alexb
Junior Member

Registered: Aug 2002
Location:
Posts: 13

Hi SZ,

ArgoUML Java rev. eng. preserves the hierarchy although we don't put package icons on the diagram for the parent package because navigation of the model can be done more easily via the explorer (tree/hierarchical view).

ArgoUML generates some relationships from the source like associations, imports, and generalization/specializations. These can then be navigated using the property panels. Explorer 'perspectives' like the class centric one show all the relationships for a class grouped by associations, incoming dependencies, outgoing dependencies, inheritance etc.

Since the last release the Explorer has been totally replaced with a new implementation that will sort the tree view by type and/or name, which is something that has bugged me for some time.

ArgoUML deals with Imports in a specific way. I don't know how other tools do it since I have not had time to do a review. We generate a 'resident' dependency between a class and a component that represents the source file that the class is written in. Then the source file component is associated to classes/ packages(type-on-demand imports in Java) that it imports.

ArgoUML does make a meal of the reverse engineering in some cases. I have planned some improvements to it in our public bug track system eg. making the way types are resolved consistent with the java language specification.

Having said that it is now possible to reverse engineer the whole of ArgoUML, 1000 classes, in about 5-10 minutes (given that you have a newish pc), I am pretty pleased with it.

There's an excellent paper that compares together, rose, idea and fujaba for reverse engineering. If/when I get time i'll certainly be implementing the ideas there in ArgoUML...
http://citeseer.nj.nec.com/545406.html

thanks
Alex

Report this post to a moderator | IP: Logged

Old Post 11-12-2003 08:21 PM
alexb is offline Click Here to See the Profile for alexb Click here to Send alexb a Private Message Find more posts by alexb Add alexb to your buddy list Edit/Delete Message Reply w/Quote
SZ
Administrator

Registered: Apr 2001
Location: New York
Posts: 492

Alex,
That is great news about ArgoUML reverse engineering! I will have to try it out. It has been a while....

What is nice about having the package symbols on the class diagrams is that it allows you to keep the relationships between the current package and other packages in mind while you are looking at the class diagrams.

Report this post to a moderator | IP: Logged

Old Post 11-13-2003 12:20 AM
SZ is offline Click Here to See the Profile for SZ Click here to Send SZ a Private Message Visit SZ's homepage! Find more posts by SZ Add SZ to your buddy list Edit/Delete Message Reply w/Quote
SZ
Administrator

Registered: Apr 2001
Location: New York
Posts: 492

I am attaching a zipped PDF of the excellent article Alex referred to above to make it easier for others to find and read (the original is PostScript).

Attachment: kollmann_2002_wcre.zip
This has been downloaded 1930 time(s).

Report this post to a moderator | IP: Logged

Old Post 11-13-2003 12:30 AM
SZ is offline Click Here to See the Profile for SZ Click here to Send SZ a Private Message Visit SZ's homepage! Find more posts by SZ Add SZ to your buddy list Edit/Delete Message Reply w/Quote
SZ
Administrator

Registered: Apr 2001
Location: New York
Posts: 492

Unfortunately, the tools we have been testing for reverse-engineering have some significant limitations, especially when compared with TogetherSoft. For examples of reverse-engineered code from TogetherSoft, see http://opensource.objectsbydesign.com.

It is therefore useful to compile a list of the steps one would expect to work and work well during a reverse-engineering session:

1) Load source code into project.
2) Reverse engineer all packages into class diagrams, one per package.
3) Auto-layout the classes on each class diagram.
4) Publish the diagrams to either HTML or SVG.

We are using reasonably-sized open-source projects as the baseline for our tests. Currently,
Hibernate is the open-source project being used for testing.

The following things can (and do!) go wrong:

1) The tool cannot RE a large code base or takes a very long time or uses excessive amounts of memory.

2) Creating the diagram is a manual step requiring the user pick and add the relevant classes to a diagram without just doing all classes in a package.

3) Autolayout of the class diagram isn't performed automatically; instead, the user has to request that autolayout be performed.

4) The relationships between packages are not shown.

5) Generating an HTML rendition takes too long or never finishes.

All in all, this is not smooth!

If there are some features or steps you perefer to see for RE, please add them to this forum thread.

Report this post to a moderator | IP: Logged

Old Post 12-08-2003 03:14 AM
SZ is offline Click Here to See the Profile for SZ Click here to Send SZ a Private Message Visit SZ's homepage! Find more posts by SZ Add SZ to your buddy list Edit/Delete Message Reply w/Quote
howellsm
Junior Member

Registered: Dec 2003
Location: Wiltshire, UK
Posts: 5

Arrow Reverse Engineering Patterns

Not really relevant to UML modelling tools, but there is an excellent book called "Object-Oriented Reengineering Patterns" (ISBN: 1558606394) that you may find helpful. It describes various Good Things To Do when reverse engineering existing systems, using the usual "pattern" style.

Report this post to a moderator | IP: Logged

Old Post 12-23-2003 07:37 PM
howellsm is offline Click Here to See the Profile for howellsm Click here to Send howellsm a Private Message Find more posts by howellsm Add howellsm to your buddy list Edit/Delete Message Reply w/Quote
felchlin
Junior Member

Registered: Dec 2002
Location: San Jose, CA
Posts: 10

Rational Rose C++ Reverse Engineering

I have recently used the Rational Rose C++ Analyzer to reverse a large project. The tool does seem to preserve the namespaces and the top-level directory of the classes. For example, if a source code file is /home/felchlin/include/myfile.h, Rational puts the reversed classes from the file into Logical View/include/<namespace>/
in the tree browser.

I should mention that the tool choked on a particular header file which was included in about 20 other headers, raising an Assertion error and exiting!

Has anyone else experienced this? If so, do you know of a workaround?

Also, the auto-layout feature does not work very well for large diagrams. In addition, I find the editing and browsing (zooming/panning, etc.) experience in Rational very cumbersome.

__________________
Joe

Last edited by felchlin on 02-05-2004 at 12:09 AM

Report this post to a moderator | IP: Logged

Old Post 02-04-2004 11:54 PM
felchlin is offline Click Here to See the Profile for felchlin Click here to Send felchlin a Private Message Visit felchlin's homepage! Find more posts by felchlin Add felchlin to your buddy list Edit/Delete Message Reply w/Quote
felchlin
Junior Member

Registered: Dec 2002
Location: San Jose, CA
Posts: 10

Rational Rose Java Reverse Engineering

I have reverse engineered a large Java project with Rational Rose. The reversal went much smoother than the C++ reverse (this should be expected, since the Java language is simpler than C++).

I can't say if the package structure was preserved since my client has all their classes in the default package (grrr...don't get me started...).

I can report that the tool worked fine, other than the user-interface being clunky (typical of Rational products). Everything was generated as expected.

Given my choice, I'd probably like to try Together (see my other Rational gripes above). The bottom line is: Rational works, but it is definitely NOT a fun tool to use.

__________________
Joe

Last edited by felchlin on 02-05-2004 at 12:06 AM

Report this post to a moderator | IP: Logged

Old Post 02-05-2004 12:01 AM
felchlin is offline Click Here to See the Profile for felchlin Click here to Send felchlin a Private Message Visit felchlin's homepage! Find more posts by felchlin Add felchlin to your buddy list Edit/Delete Message Reply w/Quote
alexb
Junior Member

Registered: Aug 2002
Location:
Posts: 13

ArgoUML 0.15.3 contains several bug fixes and enhancements for reverse engineering.

I am very happy with the progress we have made, but there are still areas to improve, and ArgoUML does not have a publish tool to something like a html ArgoUMLDoc.

Any feedback you have is welcome.

Report this post to a moderator | IP: Logged

Old Post 02-08-2004 10:26 PM
alexb is offline Click Here to See the Profile for alexb Click here to Send alexb a Private Message Find more posts by alexb Add alexb to your buddy list Edit/Delete Message Reply w/Quote
pnajith
Junior Member

Registered: Jun 2004
Location:
Posts: 1

Question

As discussed in this thread, several UML tools support reverse engineering of static relationships such as Inheritance, Relation, Aggregation and Composition. Our interest is to also reverse engineer the dynamic relations like <<call>>, <<use>> and <<instantiate>>.

Does TogetherSoft or any UML tool effectively support reverse engineering of dynamic relationships? Thanks in advance for any pointers.

Report this post to a moderator | IP: Logged

Old Post 06-08-2004 04:47 AM
pnajith is offline Click Here to See the Profile for pnajith Click here to Send pnajith a Private Message Find more posts by pnajith Add pnajith to your buddy list Edit/Delete Message Reply w/Quote
ddrillich
Junior Member

Registered: Jan 2004
Location:
Posts: 20

Pnajith,

The dynamic relation that you refer to is 'officially' called a dependency.

Martin Fowler defines it as:

"A dependency exists between two elements if changes to the definition of one element (the supplier) may cause changes to the other (the client). With classes, dependencies exist for various reasons: one class sends a message to another; one class has another as part of its data; one class mentions another as a parameter to an operation. If a class changes its interface, any message sent to that class may no longer be valid."

Tools which generate class diagrams should also show these dependencies.
Rhapsody for sure does do that.
However, I didn't see it with Describe.

Regards,
Dan

Report this post to a moderator | IP: Logged

Old Post 06-08-2004 01:48 PM
ddrillich is offline Click Here to See the Profile for ddrillich Click here to Send ddrillich a Private Message Find more posts by ddrillich Add ddrillich to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 06:42 AM. Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 

< Contact Us - Objects by Design >

Powered by: vBulletin Version 2.3.5
Copyright ©2000 - 2018, Jelsoft Enterprises Limited.
Copyright 1999-2005, Objects by Design, Inc.