Recent

Author Topic: Visualization of Pascal program dependencies  (Read 26447 times)

zamtmn

  • Hero Member
  • *****
  • Posts: 593
Re: Visualization of Pascal program dependencies
« Reply #15 on: April 25, 2017, 04:22:39 pm »
Hi All! New rev.2255

Restructured settings. Added options SourceUnit and DestUnit.
Putting SourceUnit - see dependecies when they generated.
Putting DestUnit - see dependecies on it ending.
Putting both - will see how interrelated SourceUnit and DestUnit units - as on attached screenshot

http://imgur.com/a/Nyxn1

zamtmn

  • Hero Member
  • *****
  • Posts: 593
Re: Visualization of Pascal program dependencies
« Reply #16 on: May 08, 2017, 09:48:37 pm »
Hi All!

Added the possibility of "clustering" graph. Units located in the same folder are inside the cluster, the cluster name is the path to these units (slashes are replaced on the lower dash because of the features of the language graphviz)

http://imgur.com/a/Ijz08

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Visualization of Pascal program dependencies
« Reply #17 on: May 09, 2017, 09:11:21 am »
Just say you're doing a great job.  This tool is useful for documentation, debugging and optimization.  Keep up the good work!  :)
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Visualization of Pascal program dependencies
« Reply #18 on: May 09, 2017, 01:43:29 pm »
Hi, my compiler stops at generics.collections, does the trunk compiler support namespaces ?
[edit] and is there a workaround for 3.0.2 ?
« Last Edit: May 09, 2017, 01:45:12 pm by jc99 »
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

zamtmn

  • Hero Member
  • *****
  • Posts: 593
Re: Visualization of Pascal program dependencies
« Reply #19 on: May 09, 2017, 07:13:07 pm »
Ñuño_Martínez
Thanks!

jc99
Of course it is better to use trunk, but you can compile pudgb in 3.0.2. Place https://svn.freepascal.org/svn/fpc/trunk/packages/rtl-generics/src/ (it is missing in 3.0.2) and https://svn.freepascal.org/svn/fpc/trunk/packages/fcl-passrc/src/ (there were a few important fixes) to project folder and compile.
You will also need to install the packages:
http://svn.shamangrad.net/zcad/trunk/cad_source/other/AGraphLaz/lazarus/
http://svn.shamangrad.net/zcad/trunk/cad_source/components/
« Last Edit: May 09, 2017, 08:36:31 pm by zamtmn »

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Visualization of Pascal program dependencies
« Reply #20 on: May 10, 2017, 03:12:37 pm »
Hi i made a package for both (one for each) and ... it works (Y)!
... The Yeah! - smily doesn't show ...

A small issue: the program say's Save (F2) but it only generates text, how about a SaveDialog and actual save the Data somewhere ?
[edit]
... and how about *.lpk & *.dpk files ?
« Last Edit: May 10, 2017, 03:28:40 pm by jc99 »
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

zamtmn

  • Hero Member
  • *****
  • Posts: 593
Re: Visualization of Pascal program dependencies
« Reply #21 on: May 10, 2017, 06:34:51 pm »
The attached packages are missing sources files. Also I don't think it is necessary to do the package fcl-passrc, it is in 3.0.2, though it contains more errors than the one in the trunk

>>A small issue: the program say's Save (F2) but it only generates text, how about a SaveDialog and actual save the Data somewhere ?

I prefer the web version graphwiz, so I'd better copy and paste)) But even if you want save data - save dialog easy to add. Much more interesting to make on your own display graph

>>... and how about *.lpk & *.dpk files ?
Maybe, but I won't be able to do it soon
In addition: patches and commits are very welcome))
« Last Edit: May 10, 2017, 09:43:50 pm by zamtmn »

zamtmn

  • Hero Member
  • *****
  • Posts: 593
Re: Visualization of Pascal program dependencies
« Reply #22 on: May 15, 2017, 11:27:23 pm »
Hi All!
Add 'Include to graph' and 'Exclude from graph' parameters (can be masks), for filtering units names in result graph.
In DestUnit and SourceUnit parameters also now allowed masks.

This is all basic features who I wanted to implement. Сhange the version number from 0.1 to 0.99

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Visualization of Pascal program dependencies
« Reply #23 on: May 16, 2017, 01:15:18 am »
The attached packages are missing sources files. Also I don't think it is necessary to do the package fcl-passrc, it is in 3.0.2, though it contains more errors than the one in the trunk

of cause they do or don't, the source files are in the fpc-trunk-folder. That's why I made those files, that way i can explicitly use the trunc version.
If you don't call it "save" instead call it "generate" and "generate gml" then I'm happy too. And maybe some newbies are less confused.
Greetings (and a BIG Thumb-Up from my side)
 _
|  )
|  |_
|   _)
|    _)
|   _)
\__)
WTG, well done.

PS: Here's a Patch, naming some components, and redirect the output to a separate folder. -> less cleanup-work to do, and more-easy to secure. I drive a stict security-System (WanaCry-Save) only the compiler is allowed to write into the bin-(&sub)-folder, and only executables in the bin-(&sub) folders are allowed to run.
see restric'tor or SRP
« Last Edit: May 16, 2017, 01:59:48 am by jc99 »
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

zamtmn

  • Hero Member
  • *****
  • Posts: 593
Re: Visualization of Pascal program dependencies
« Reply #24 on: May 16, 2017, 03:42:19 am »
Applied with a few changes: remove your packages rtl-generics and fcl-passrc - in the trunk they're not needed, fix binary path from ../../bin/ to bin/

Thanks!

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Visualization of Pascal program dependencies
« Reply #25 on: May 16, 2017, 10:56:38 am »
Hi zamtmn,
the "../../bin" was to show the concept for me it's actual "../../../../bin" so that binaries from all projects go to that path and the user-rights and SRP-rules have only to be set once.

BTW: Did your code compile ?
The name of the buttons don't go together: in the .pas it's btnXXX and in the .lfm  it's ToolbuttonX.

BTW2: Are the translations correct, since I don't speak russian, I used bing-translate.
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

zamtmn

  • Hero Member
  • *****
  • Posts: 593
Re: Visualization of Pascal program dependencies
« Reply #26 on: May 16, 2017, 01:45:39 pm »
I don't think we need to go above the folder PUDGB, who knows what will be there the person download the source code. You can move the binary anywhere you want, but it is not necessary to contribute inrepository.

Yes, button names were different, very strange that it compiled without problems. Fixed, thanks!

Comments in russian can be erased, initially the project was supposed to be another one, these comments I did for him. The manger need some moments I can comment in detail now. In the future I will comment on all

zamtmn

  • Hero Member
  • *****
  • Posts: 593
Re: Visualization of Pascal program dependencies
« Reply #27 on: May 20, 2017, 02:42:36 am »
Hi All!

Started doing the vector graph renderer. As graph layout I plan to use graphviz (dll or exe), get svg data from it, and draw them. Will use ZCAD engine, so now even more dependencies((

zamtmn

  • Hero Member
  • *****
  • Posts: 593
Re: Visualization of Pascal program dependencies
« Reply #28 on: May 22, 2017, 10:51:30 pm »
Hi All!

First working vizualizer prototype: http://imgur.com/a/yQ0tl yet without dashes and without beziers
But unfortunately lazarus doesn't have a good svg reader. I tried to make my own implementation, SVG is bad format((

zamtmn

  • Hero Member
  • *****
  • Posts: 593
Re: Visualization of Pascal program dependencies
« Reply #29 on: October 05, 2017, 11:41:37 am »
Hi All!

New version  - rev2386.
Build with last fcl-passrc (include many fixes). Reorganize options, add new options -  "Collapse clusters mask" and "Expand clusters mask"
« Last Edit: October 05, 2017, 11:43:43 am by zamtmn »

 

TinyPortal © 2005-2018