Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-04

reverse engineering tool wanted

29 messages · 12 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Darius Blaszyk
to Marc Santhoff

There is fpclasschart

Marc Santhoff wrote 23 lines
Hi, I'm searching a reverse engineering tool that can handle lazarus' code. The main goal is to generate class diagrams and sequence diagrams from source. I found this one so far, but the links for more info and downloading are dead: http://www.vclcomponents.com/Delphi/Project/Pro_Analyzer_for_Delphi_and_Pascal-info.html Is there anything else? Marc -- Marc Santhoff -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Graeme Geldenhuys
to Marc Santhoff: I'm searching a reverse engineering tool that can handle lazarus' code. The main goal is…
Marc Santhoff wrote
I'm searching a reverse engineering tool that can handle lazarus' code. The main goal is to generate class diagrams and sequence diagrams from source.

I'm not sure if ModelMaker can do the reverse engineering, but generating code and maintaining code from UML diagrams are very good.

Also there is ESS-Model: http://essmodel.sourceforge.net/

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Juha gmail
to Graeme Geldenhuys: I'm not sure if ModelMaker can do the reverse engineering, but generating code and…

Graeme Geldenhuys kirjoitti tiistai, 19. huhtikuuta 2011 09:30:57:

Also there is ESS-Model: http://essmodel.sourceforge.net/

Don't waste your time with ESS-Model. I tried to convert it, partly as a Delphi conversion exercise. I never got it near working.

It uses a complex delegated interface system to pass events. It is not fully supported by FPC.
All drawing objects are TWinControls. It uses some tricks to access protected methods of those TWinControls.
In fact it doesn't work with new Delphis either because of Delphi's changes in interface delegation.

I think it proves how difficult it is to make good quality code. ESS-Model has many smart ideas and sophisticated design, yet it depends on component internals and exotic compiler features and so breaks very easily. The Sourceforge project has not seen any activity for years and it is easy to see why!

Still, we would need a reverse engineering class diagram tool integrated in Lazarus. It would use some advanced algorithm for automatic layouting.

Juha

Reply by email

Juha gmail
to Marc Santhoff: I'm searching a reverse engineering tool that can handle lazarus' code. The main goal is…

Marc Santhoff kirjoitti tiistai, 19. huhtikuuta 2011 00:30:30:

I'm searching a reverse engineering tool that can handle lazarus' code. The main goal is to generate class diagrams and sequence diagrams from source.

Is there any tool for any language that can reverse engineer sequence diagrams from source?

A correction to my other ESS-Model related mail. It was about porting ESS- Model to Lazarus, not using it. You can still use the binary compiled with old Delphis.

Juha

Reply by email

Graeme Geldenhuys
to Juha gmail: Graeme Geldenhuys kirjoitti tiistai, 19. huhtikuuta 2011 09:30:57: Don't waste your time…
Juha wrote
Don't waste your time with ESS-Model.

I never liked it much myself, I just thought I would mention the product to the original poster.

It uses a complex delegated interface system to pass events. It is not fully supported by FPC.

That's one part of FPC that has frustrated me greatly. I used interface delegation extensively in my Delphi work, but when we switched to FPC, I had to rethink all my design work. FPC trunk finally has some interface delegation working, but I haven't played with it much. I avoid FPC trunk for our commercial development work. I have some large fpGUI changes that uses interface delegation, but can't commit those because fpGUI's policy is only to use stable FPC releases. A lovely chicken-n-egg situation. :)

All drawing objects are TWinControls. It uses some tricks to access protected methods of those TWinControls.

Helper Classes or more interface usage should help there.

In fact it doesn't work with new Delphis either because of Delphi's changes in interface delegation.

Have you got any link to this information. I would like to know more on what has changed. I've been out of the Delphi scene for a few year now.

Still, we would need a reverse engineering class diagram tool integrated in Lazarus. It would use some advanced algorithm for automatic layouting.

My personal opinion is than an "integrated class diagram / UML tool" is largely over-hyped. I use Umlet to design my classes and other processes (it has a brilliant interface to work in), then simply implement them with any IDE or code editor. This process has worked very well for years. I see no real need to have a diagram tool integrated into my IDE. That will just distract me more from writing actual code - constantly having to switch to different areas in the IDE and figuring out the auto-generated code snippets. Plus the automatically generated code might not be how I would have done it manually, or in my coding style.

Now refactoring tools inside an IDE is another story - that is far more important to me, and fits well with the process of writing code.

For an example of a well thought out IDE, take a look at some of the features of IntelliJ IDEA! Yes it has UML class diagram support, but that is not required to output lots of working code in a very short time.

ModelMaker for Delphi is a bi-directional UML+code editor. It's a real pain having to switch tools back and forth while all you really want to do is write code. Plus, if you fiddle too much with the auto-generated code, you brake the link between Delphi and ModelMaker - yet another annoyance.

I guess this is all personal preference, and largely based on what you are used too, and how you work. Bottom line is, I see no problem with first designing your application & classes on screen / paper, then switch to "implementation mode of thinking" where you start writing the actual code.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

alex
to Juha gmail: Marc Santhoff kirjoitti tiistai, 19. huhtikuuta 2011 00:30:30: Is there any tool for any…
Juha wrote 18 lines
Marc Santhoff kirjoitti tiistai, 19. huhtikuuta 2011 00:30:30: > I'm searching a reverse engineering tool that can handle lazarus' code. > The main goal is to generate class diagrams and sequence diagrams from > source. Is there any tool for any language that can reverse engineer sequence diagrams from source? A correction to my other ESS-Model related mail. It was about porting ESS- Model to Lazarus, not using it. You can still use the binary compiled with old Delphis. Juha -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarushttp://www.sparxsystems.com.au/

http://www.sparxsystems.com.au/
One of the best tools i have used converting java or c to pascal...

Reply by email

Juha gmail
to Graeme Geldenhuys: I never liked it much myself, I just thought I would mention the product to the original…

Graeme Geldenhuys kirjoitti keskiviikko, 20. huhtikuuta 2011 10:55:54:

Show quoted text 5 lines
> In fact it doesn't work with new Delphis either because of Delphi's > changes in interface delegation. Have you got any link to this information. I would like to know more on what has changed. I've been out of the Delphi scene for a few year now.

Sorry I don't. I remember someone mentioned it during the ESS-Model port discussion but I didn't find it in the original thread: http://comments.gmane.org/gmane.comp.ide.lazarus.general/40273

Anyway, The project compiled and run with Delphi2009 but didn't draw anything. The messaging through delegated interfaces didn't work as expected. BTW, there were no substantial string related problems when compiling with Delphi2009, as some applications have.

Show quoted text 6 lines
> Still, we would need a reverse engineering class diagram tool integrated > in Lazarus. It would use some advanced algorithm for automatic > layouting. My personal opinion is than an "integrated class diagram / UML tool" is largely over-hyped.

Yes, a 2-way code generating class diagram tool is over-hyped. How many people really use the 2-way link for serious coding? I screwed my code badly and then didn't want to touch such tool any more. But, a 1-way reverse engineering class diagram tool with automatic layouting would be very useful.
This is from Mattias from the above mail thread:
"Yes, it needs good sorting and filtering options. Or zooming and fish eye techniques: show the current node at normal size and related smaller. Far related should be grouped."

I had similar (independent) ideas myself.
It would show the classes around the selected class dynamically, and also allow a user selected set of classes to be saved (and maybe printed).

I use Umlet to design my classes and other processes (it has a brilliant interface to work in), then simply implement them with any IDE or code editor. [...]

It is funny, I also tried Umlet some time ago. It is a small and light tool made with Java. I mentioned it to some people. They tried to install it to their Windows but couldn't. It seems to run only on Linux.

"Write once, run everywhere". Yeah, Lazarus is not the only cross-platform system with problems.

Juha

Reply by email

Graeme Geldenhuys
to Juha gmail
Juha wrote
Sorry I don't. I remember someone mentioned it during the ESS-Model port discussion but I didn't find it in the original thread:

No problem, I'll search the documentation on Embarcadero's site.

I screwed my code badly and then didn't want to touch such tool any more.

hehehe... The same experience I had.

But, a 1-way reverse engineering class diagram tool with automatic layouting would be very useful.

Maybe for small projects, but for any medium to large scale project, such a tool is useless too. See the following URL as to why I say that.

http://img222.imageshack.us/img222/7504/tes0001.jpg

:-)
Our class design is way to large to fit on any paper our printers can handle, or what can even be displayed on a single screen. So we have to segment our UML class diagrams to specific areas of our product - only showing the classes in question. eg: Account Invoicing, Learner Registration, etc. Anything larger and it is information overload!

So your idea of selecting what classes to diagram is vital.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Unknown author
to Graeme Geldenhuys
Show quoted text 9 lines
Our class design is way to large to fit on any paper our printers can handle, or what can even be displayed on a single screen. So we have to segment our UML class diagrams to specific areas of our product - only showing the classes in question. eg: Account Invoicing, Learner Registration, etc. Anything larger and it is information overload! So your idea of selecting what classes to diagram is vital.

All this possible with fpclasschart. I added a graphviz backend to it a couple of months ago. Graphviz will do the automatic layout.

Darius

Reply by email

Graeme Geldenhuys
to Unknown author
All this possible with fpclasschart. I added a graphviz backend to it a couple of months ago. Graphviz will do the automatic layout.

Is fpclasschart usage documented somewhere? I tried to use it yesterday, just by looking at the -h help output. No luck getting it to work - using FPC 2.4.3 under 64-bit Linux.

The FPC Wiki had no help... I'll search the FPC pdf docs next.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 11 lines
On 20/04/2011 12:56, wrote: > > All this possible with fpclasschart. I added a graphviz backend to it a > couple of months ago. Graphviz will do the automatic layout. Is fpclasschart usage documented somewhere? I tried to use it yesterday, just by looking at the -h help output. No luck getting it to work - using FPC 2.4.3 under 64-bit Linux. The FPC Wiki had no help... I'll search the FPC pdf docs next.

It is not documented. In essence, it does the same as makeskel, but instead of outputting a complete FPDoc skeleton, it outputs a postscript file as per the FP classchart or (as written above) a GraphViz file.

So as I not forget, maybe a bug report should be created that this tool must be documented... (in fpdoc)

Michael.

Reply by email

Alexander Klenin
to Unknown author: All this possible with fpclasschart. I added a graphviz backend to it a couple of months…
Show quoted text 10 lines
> Our class design is way to large to fit on any paper our printers can > handle, or what can even be displayed on a single screen. So we have to > segment our UML class diagrams to specific areas of our product - only > showing the classes in question. eg: Account Invoicing, Learner > Registration, etc. ?Anything larger and it is information overload! > > So your idea of selecting what classes to diagram is vital. All this possible with fpclasschart. I added a graphviz backend to it a couple of months ago. Graphviz will do the automatic layout.

I have a long-term plan to add shapes to TAChart, to support these kinds of TeeChart diagrams:
http://www.steema.com/uploads/gallery/shape.png
http://www.steema.com/uploads/gallery/organizational1.png

With proper modularization, they can be used to draw class diagrams independently of other TAChart functionality.
In particular, I hope that data from CodeTools can be used for on-line diagram building from IDE.

Alexander S. Klenin

Reply by email

Michael Van Canneyt
to Alexander Klenin
Alexander Klenin wrote 21 lines
On Wed, Apr 20, 2011 at 21:56, wrote: >> Our class design is way to large to fit on any paper our printers can >> handle, or what can even be displayed on a single screen. So we have to >> segment our UML class diagrams to specific areas of our product - only >> showing the classes in question. eg: Account Invoicing, Learner >> Registration, etc. ?Anything larger and it is information overload! >> >> So your idea of selecting what classes to diagram is vital. > > All this possible with fpclasschart. I added a graphviz backend to it a > couple of months ago. Graphviz will do the automatic layout. I have a long-term plan to add shapes to TAChart, to support these kinds of TeeChart diagrams: http://www.steema.com/uploads/gallery/shape.png http://www.steema.com/uploads/gallery/organizational1.png With proper modularization, they can be used to draw class diagrams independently of other TAChart functionality. In particular, I hope that data from CodeTools can be used for on-line diagram building from IDE.

Isn't drawing of diagrams a bit far-fetched for a charting component ? I mean, I can use a screw-driver as a hammer, but this is not really its purpose, and definitely not the best tool for the job ?

I can see it as part of a larger 2-D graphics suite, of course.

Michael.

Reply by email

Marc Santhoff
to Michael Van Canneyt
Michael Van Canneyt wrote 30 lines
On Wed, 20 Apr 2011, Alexander Klenin wrote: > On Wed, Apr 20, 2011 at 21:56, wrote: >>> Our class design is way to large to fit on any paper our printers can >>> handle, or what can even be displayed on a single screen. So we have to >>> segment our UML class diagrams to specific areas of our product - only >>> showing the classes in question. eg: Account Invoicing, Learner >>> Registration, etc. Anything larger and it is information overload! >>> >>> So your idea of selecting what classes to diagram is vital. >> >> All this possible with fpclasschart. I added a graphviz backend to it a >> couple of months ago. Graphviz will do the automatic layout. > > I have a long-term plan to add shapes to TAChart, to support these > kinds of TeeChart diagrams: > http://www.steema.com/uploads/gallery/shape.png > http://www.steema.com/uploads/gallery/organizational1.png > > With proper modularization, they can be used to draw class diagrams > independently of other TAChart functionality. > In particular, I hope that data from CodeTools can be used > for on-line diagram building from IDE. Isn't drawing of diagrams a bit far-fetched for a charting component ? I mean, I can use a screw-driver as a hammer, but this is not really its purpose, and definitely not the best tool for the job ? I can see it as part of a larger 2-D graphics suite, of course.

There is at least aggpas, although I don't know if it is compilable using fpc.

And there has been another graphics and shape drawing core with demo apps by a guy named Angus, the rest (family name, project name, link) I forgot and cannot find anymore ...

Marc Santhoff

Reply by email

Graeme Geldenhuys
to Marc Santhoff
Marc Santhoff wrote
> I can see it as part of a larger 2-D graphics suite, of course.

I agree with Michael... those screenshots from Alexander has nothing to do with general charting and graphs. I cannot see a use for such functionality.

There is at least aggpas, although I don't know if it is compilable using fpc.

It is, and a copy of aggpas is even included with Lazarus for some time now. There is apparently some 64-bit issue still remaining though (if I remember correctly).

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Marc Santhoff
to Juha gmail: Marc Santhoff kirjoitti tiistai, 19. huhtikuuta 2011 00:30:30: Is there any tool for any…
Juha (gmail) wrote 7 lines
Marc Santhoff kirjoitti tiistai, 19. huhtikuuta 2011 00:30:30: > I'm searching a reverse engineering tool that can handle lazarus' code. > The main goal is to generate class diagrams and sequence diagrams from > source. Is there any tool for any language that can reverse engineer sequence diagrams from source?

Not?

Hmm, I was using Modelmaker with Delphi1 & 2 until they switched from having surrounding the generated lines by code tags to some closed binary format. That was long ago ... so I had hoped there was some tool for selectively following method calls hopping through classes.

The only sequence diagram I found around the lazarus website is that one (lovely ASCII Art ;):

http://wiki.lazarus.freepascal.org/LCL_Drag_Drop#Message_Sequence_Chart_or_UML_Sequence_Diagram

But that one must be hand drawn.

Marc Santhoff

Reply by email

Alexander Klenin
to Michael Van Canneyt: Isn't drawing of diagrams a bit far-fetched for a charting component ? I mean, I can use…

2011/4/20 Michael Van Canneyt :

Show quoted text 5 lines
Isn't drawing of diagrams a bit far-fetched for a charting component ? I mean, I can use a screw-driver as a hammer, but this is not really its purpose, and definitely not the best tool for the job ? I can see it as part of a larger 2-D graphics suite, of course.

Well, just about every other charting component on the market does it, for better or worse.

Alexander S. Klenin

Reply by email

Michael Van Canneyt
to Alexander Klenin
Alexander Klenin wrote 9 lines
2011/4/20 Michael Van Canneyt : > Isn't drawing of diagrams a bit far-fetched for a charting component ? > I mean, I can use a screw-driver as a hammer, but this is not really its > purpose, and definitely not the best tool for the job ? > > I can see it as part of a larger 2-D graphics suite, of course. Well, just about every other charting component on the market does it, for better or worse.

No doubt. I do doubt I would use them.

Because I can't possibly see why you would want this in a single component. One is for statistics, the other for diagrams. Thus, I would make this 2 separate components. About the only intersection they have is that they draw on a canvas.

That is, of course, assuming you'd implement it in a single component.

Michael.

Reply by email

Alexander Klenin
to Michael Van Canneyt
Michael Van Canneyt wrote 11 lines
> Well, just about every other charting component on the market does it, > for better or worse. No doubt. I do doubt I would use them. Because I can't possibly see why you would want this in a single component. One is for statistics, the other for diagrams. Thus, I would make this 2 separate components. About the only intersection they have is that they draw on a canvas. That is, of course, assuming you'd implement it in a single component.

Seeing as TAChart currently consists of 13 components, I think your assumption is not likely to be correct ;-)

Alexander S. Klenin

Reply by email

Michael Van Canneyt
to Alexander Klenin
Alexander Klenin wrote 16 lines
On Thu, Apr 21, 2011 at 02:45, Michael Van Canneyt wrote: >> Well, just about every other charting component on the market does it, >> for better or worse. > > No doubt. I do doubt I would use them. > > Because I can't possibly see why you would want this in a single component. > One is for statistics, the other for diagrams. Thus, I would make this 2 > separate components. About the only intersection they have is that they draw > on a canvas. > > That is, of course, assuming you'd implement it in a single component. Seeing as TAChart currently consists of 13 components, I think your assumption is not likely to be correct ;-)

I am very glad to hear this, and in that case suggest you change the name of the suite to something which covers the contents better. I am tempted to call it misleading, seeing that I still associate a single bar/pie/line chart with it :-)

Michael.

Reply by email

Alexander Klenin
to Michael Van Canneyt
Michael Van Canneyt wrote 7 lines
> Seeing as TAChart currently consists of 13 components, > I think your assumption is not likely to be correct ;-) I am very glad to hear this, and in that case suggest you change the name of the suite to something which covers the contents better. I am tempted to call it misleading, seeing that I still associate a single bar/pie/line chart with it :-)

Try googling "charting component" -- you will see that the TAChart functionality is quite well aligned with the term.

Alexander S. Klenin

Reply by email

alex kovacic
to Marc Santhoff: How long did it take to get that one up and running and how long to be working…

-

Marc Santhoff wrote 11 lines
Am Mittwoch, den 20.04.2011, 18:08 +1000 schrieb alex: > http://www.sparxsystems.com.au/ > One of the best tools i have used converting java or c to pascal... > How long did it take to get that one up and running and how long to be working productively using it?

download a 30 day trial - it will take you a half a day or less

Alex Kovacic (PTC,HPTC,MHGSA,BSc,MSc) Cytogentics and Molecular Genetics Level 4, Campus Centre,SEALS, POWH, Randwick, 2031, NSW,Australia Work Tel :9382 9168 email-1: email-2:

Reply by email

Marco van de Voort
to Graeme Geldenhuys: I agree with Michael... those screenshots from Alexander has nothing to do with general…
Graeme Geldenhuys wrote 10 lines
I agree with Michael... those screenshots from Alexander has nothing to do with general charting and graphs. I cannot see a use for such functionality. > There is at least aggpas, although I don't know if it is compilable > using fpc. It is, and a copy of aggpas is even included with Lazarus for some time now. There is apparently some 64-bit issue still remaining though (if I remember correctly).

Despite the mini-libc hack it's still not free from its Kylix heritage in general. Uses specialistic defines to check for OS X and Linux. Fails to compile under FreeBSD. Needs a thoroughly cleanup before I would base something major on it.

Reply by email