comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » dependency tree / call graph in idl (cscope for idl)?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
dependency tree / call graph in idl (cscope for idl)? [message #63673] Wed, 19 November 2008 07:51 Go to next message
Sven Utcke is currently offline  Sven Utcke
Messages: 10
Registered: October 2007
Junior Member
Hi,

what's the recommended way to do dependency tracking in IDL, you know,
FUNCTION X depeneds on PRO Y which calls FUNCTIONs A, B, and C. That
stuff. Preferably, but not necessarily from emacs?

In C, I would for example use cscope <http://cscope.sourceforge.net/>.

Reason I'm asking: I inherited a project with quite a few
interdependent files (79 files so far, with 14000 lines, but I'm sure
to find I missed some once dependency tracking works), and in order to
get any idea at all what this is doing I would like to look at some
sort of call graph.

So what is the IDL-way of doing this?

Sven
--
___ _ _____ ___ Dr.-Ing. Sven Utcke ___ ___ _____ __
/ __| |/ / __| __| phone: +49 40 899-8-5317 | \| __/ __\ \ / /
| (_ | ' <\__ \__ \ fax : +49 40 899-4-5317 | |) | _|\__ \\ V /
\___|_|\_\___|___/ http://www.desy.de/~utcke (to come)|___/|___|___/ |_|
Re: dependency tree / call graph in idl (cscope for idl)? [message #63771 is a reply to message #63673] Thu, 20 November 2008 02:21 Go to previous messageGo to next message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Sven Utcke schrieb:
> Reimar Bauer <R.Bauer@fz-juelich.de> writes:
>
>> you may be interested in
>> http://www.fz-juelich.de/icg/icg-1/idl_icglib/idl_source/idl _html/dbase/tar_gz_dependencies_dbase.pro.html
>>
>> This procedure founds all dependent routines from a given routine. They
>> are saved into a tar.gz file Additional Informations about the routines
>> are saved into an html file.
>
> Sorry, I'm probably a bit dense this morning: what do I need to do in
> order to get such a list from my sources?
>
> Thanks
>
> Sven

doenload the program tar_gz_dependencies as sav or tgz and run it with
one of your programs

tar_gz_dependencies,'f_names'

Reimar
Re: dependency tree / call graph in idl (cscope for idl)? [message #63773 is a reply to message #63673] Thu, 20 November 2008 02:14 Go to previous messageGo to next message
Sven Utcke is currently offline  Sven Utcke
Messages: 10
Registered: October 2007
Junior Member
Reimar Bauer <R.Bauer@fz-juelich.de> writes:

> you may be interested in
> http://www.fz-juelich.de/icg/icg-1/idl_icglib/idl_source/idl _html/dbase/tar_gz_dependencies_dbase.pro.html
>
> This procedure founds all dependent routines from a given routine. They
> are saved into a tar.gz file Additional Informations about the routines
> are saved into an html file.

Sorry, I'm probably a bit dense this morning: what do I need to do in
order to get such a list from my sources?

Thanks

Sven
--
___ _ _____ ___ Dr.-Ing. Sven Utcke ___ ___ _____ __
/ __| |/ / __| __| phone: +49 40 899-8-5317 | \| __/ __\ \ / /
| (_ | ' <\__ \__ \ fax : +49 40 899-4-5317 | |) | _|\__ \\ V /
\___|_|\_\___|___/ http://www.desy.de/~utcke (to come)|___/|___|___/ |_|
Re: dependency tree / call graph in idl (cscope for idl)? [message #63774 is a reply to message #63673] Thu, 20 November 2008 02:11 Go to previous messageGo to next message
Sven Utcke is currently offline  Sven Utcke
Messages: 10
Registered: October 2007
Junior Member
Craig Markwardt <cbmarkwardt@gmail.com> writes:

> Really you want to do something like,
> RESOLVE_ALL, /CONTINUE, UNRESOLVED=unresolved

So I do. BTW, how do I tell IDL to rescan the PATH to find any
routines I might have added since it last looked?

Sven
--
___ _ _____ ___ Dr.-Ing. Sven Utcke ___ ___ _____ __
/ __| |/ / __| __| phone: +49 40 899-8-5317 | \| __/ __\ \ / /
| (_ | ' <\__ \__ \ fax : +49 40 899-4-5317 | |) | _|\__ \\ V /
\___|_|\_\___|___/ http://www.desy.de/~utcke (to come)|___/|___|___/ |_|
Re: dependency tree / call graph in idl (cscope for idl)? [message #63787 is a reply to message #63673] Thu, 20 November 2008 00:51 Go to previous messageGo to next message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Sven Utcke schrieb:
> Hi,
>
> what's the recommended way to do dependency tracking in IDL, you know,
> FUNCTION X depeneds on PRO Y which calls FUNCTIONs A, B, and C. That
> stuff. Preferably, but not necessarily from emacs?
>
> In C, I would for example use cscope <http://cscope.sourceforge.net/>.
>
> Reason I'm asking: I inherited a project with quite a few
> interdependent files (79 files so far, with 14000 lines, but I'm sure
> to find I missed some once dependency tracking works), and in order to
> get any idea at all what this is doing I would like to look at some
> sort of call graph.
>
> So what is the IDL-way of doing this?
>
> Sven

Hi Sven,

you may be interested in
http://www.fz-juelich.de/icg/icg-1/idl_icglib/idl_source/idl _html/dbase/tar_gz_dependencies_dbase.pro.html

This procedure founds all dependent routines from a given routine. They
are saved into a tar.gz file Additional Informations about the routines
are saved into an html file.

cheers
Reimar
Re: dependency tree / call graph in idl (cscope for idl)? [message #63794 is a reply to message #63673] Wed, 19 November 2008 19:26 Go to previous messageGo to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Nov 19, 1:30 pm, Sven Utcke <utcke+n...@informatik.uni-hamburg.de>
wrote:
>
> It would at least tell me which routines I had missed so far, but
> alas:
>
>   IDL> RESOLVE_ALL
>   % Attempt to call undefined procedure/function: 'HALT'.
>   % Error occurred at: RESOLVE_ALL_BODY  290
>     /opt/products/idl/7.0/idl70/lib/resolve_all.pro
>   %                    RESOLVE_ALL       351
>     /opt/products/idl/7.0/idl70/lib/resolve_all.pro
>   %                    $MAIN$          
>   % Execution halted at: $MAIN$          
>
> Does not look to good, does it?

Really you want to do something like,
RESOLVE_ALL, /CONTINUE, UNRESOLVED=unresolved

Then you will find out at the end if there are any unresolved
functions or procedures (they wil be stored in the 'unresolved'
variable.

Craig
Re: dependency tree / call graph in idl (cscope for idl)? [message #63801 is a reply to message #63673] Wed, 19 November 2008 13:08 Go to previous messageGo to next message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On Nov 19, 11:30 am, Sven Utcke <utcke+n...@informatik.uni-hamburg.de>
wrote:
> "mgal...@gmail.com" <mgal...@gmail.com> writes:
>> On Nov 19, 8:51 am, Sven Utcke <utcke+n...@informatik.uni-hamburg.de>
>> wrote:
>>> So what is the IDL-way of doing this?
>
>> There is nothing I know in IDL that would do this currently. The only
>> suggestion I have is to start a fresh IDL session. Compile the 79
>> files that you have so far
>
> Any easy< way to do that, as they are in several (sub) directories?
>
>> and then use RESOLVE_ALL. This will compile
>> routines that are called by the original 79 (and the routines that are
>> called by those routines, etc.). There should be messages in the
>> output log like "% Compiled module: ..." that should give an
>> indication of the needed routines. Of course, this is far short of a
>> call graph, but might serve depending on your requirements.
>
> It would at least tell me which routines I had missed so far, but
> alas:
>
>   IDL> RESOLVE_ALL
>   % Attempt to call undefined procedure/function: 'HALT'.
>   % Error occurred at: RESOLVE_ALL_BODY  290
>     /opt/products/idl/7.0/idl70/lib/resolve_all.pro
>   %                    RESOLVE_ALL       351
>     /opt/products/idl/7.0/idl70/lib/resolve_all.pro
>   %                    $MAIN$          
>   % Execution halted at: $MAIN$          
>
> Does not look to good, does it?

This is telling you that you are missing HALT. And furthermore,
halt.pro is not in your !path.

Mike
--
www.michaelgalloy.com
Tech-X Corporation
Associate Research Scientist
Re: dependency tree / call graph in idl (cscope for idl)? [message #63802 is a reply to message #63673] Wed, 19 November 2008 10:34 Go to previous messageGo to next message
Sven Utcke is currently offline  Sven Utcke
Messages: 10
Registered: October 2007
Junior Member
Paolo <pgrigis@gmail.com> writes:

> David Fanning wrote:
>> Sven Utcke writes:
>>
>>> what's the recommended way to do dependency tracking in IDL, you know,
>>> FUNCTION X depeneds on PRO Y which calls FUNCTIONs A, B, and C. That
>>> stuff. Preferably, but not necessarily from emacs?
>>>
>>> In C, I would for example use cscope <http://cscope.sourceforge.net/>.
>>>
>>> Reason I'm asking: I inherited a project with quite a few
>>> interdependent files (79 files so far, with 14000 lines, but I'm sure
>>> to find I missed some once dependency tracking works), and in order to
>>> get any idea at all what this is doing I would like to look at some
>>> sort of call graph.
>>>
>>> So what is the IDL-way of doing this?
>>
>> Whew! Don't you just hate it when someone comes to IDL for
>> the first time from a modern programming language. :-(
>
> This task may not even be *feasible* if the program does not
> consistently use square brackets for array!

Well, it might not be that bad. [c,e,idl]tags at least finds all
function and procedure definitions (although I would wish it would
also find each place where a function is called, but there). Would be
nice to also have global variables (which are used extensively within
the code in question --- is this good IDL praxis?), but I guess it
ought to be possible to hack [e,idl]tags to do that. But again this
leaves the problem of finding all uses...

Sven
--
___ _ _____ ___ Dr.-Ing. Sven Utcke ___ ___ _____ __
/ __| |/ / __| __| phone: +49 40 899-8-5317 | \| __/ __\ \ / /
| (_ | ' <\__ \__ \ fax : +49 40 899-4-5317 | |) | _|\__ \\ V /
\___|_|\_\___|___/ http://www.desy.de/~utcke (to come)|___/|___|___/ |_|
Re: dependency tree / call graph in idl (cscope for idl)? [message #63803 is a reply to message #63673] Wed, 19 November 2008 10:30 Go to previous messageGo to next message
Sven Utcke is currently offline  Sven Utcke
Messages: 10
Registered: October 2007
Junior Member
"mgalloy@gmail.com" <mgalloy@gmail.com> writes:

> On Nov 19, 8:51�am, Sven Utcke <utcke+n...@informatik.uni-hamburg.de>
> wrote:

>> So what is the IDL-way of doing this?
>
> There is nothing I know in IDL that would do this currently. The only
> suggestion I have is to start a fresh IDL session. Compile the 79
> files that you have so far

Any easy< way to do that, as they are in several (sub) directories?

> and then use RESOLVE_ALL. This will compile
> routines that are called by the original 79 (and the routines that are
> called by those routines, etc.). There should be messages in the
> output log like "% Compiled module: ..." that should give an
> indication of the needed routines. Of course, this is far short of a
> call graph, but might serve depending on your requirements.

It would at least tell me which routines I had missed so far, but
alas:

IDL> RESOLVE_ALL
% Attempt to call undefined procedure/function: 'HALT'.
% Error occurred at: RESOLVE_ALL_BODY 290
/opt/products/idl/7.0/idl70/lib/resolve_all.pro
% RESOLVE_ALL 351
/opt/products/idl/7.0/idl70/lib/resolve_all.pro
% $MAIN$
% Execution halted at: $MAIN$

Does not look to good, does it?

Sven
--
___ _ _____ ___ Dr.-Ing. Sven Utcke ___ ___ _____ __
/ __| |/ / __| __| phone: +49 40 899-8-5317 | \| __/ __\ \ / /
| (_ | ' <\__ \__ \ fax : +49 40 899-4-5317 | |) | _|\__ \\ V /
\___|_|\_\___|___/ http://www.desy.de/~utcke (to come)|___/|___|___/ |_|
Re: dependency tree / call graph in idl (cscope for idl)? [message #63818 is a reply to message #63673] Wed, 19 November 2008 08:35 Go to previous messageGo to next message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On Nov 19, 8:51 am, Sven Utcke <utcke+n...@informatik.uni-hamburg.de>
wrote:
> what's the recommended way to do dependency tracking in IDL, you know,
> FUNCTION X depeneds on PRO Y which calls FUNCTIONs A, B, and C.  That
> stuff.  Preferably, but not necessarily from emacs?
>
> In C, I would for example use cscope <http://cscope.sourceforge.net/>.
>
> Reason I'm asking: I inherited a project with quite a few
> interdependent files (79 files so far, with 14000 lines, but I'm sure
> to find I missed some once dependency tracking works), and in order to
> get any idea at all what this is doing I would like to look at some
> sort of call graph.
>
> So what is the IDL-way of doing this?

There is nothing I know in IDL that would do this currently. The only
suggestion I have is to start a fresh IDL session. Compile the 79
files that you have so far and then use RESOLVE_ALL. This will compile
routines that are called by the original 79 (and the routines that are
called by those routines, etc.). There should be messages in the
output log like "% Compiled module: ..." that should give an
indication of the needed routines. Of course, this is far short of a
call graph, but might serve depending on your requirements.

I have thought about adding such a feature to IDLdoc. At some point, I
think I will need a full blown IDL parser to extract all the
information I want to get from a code base.

Mike
--
www.michaelgalloy.com
Tech-X Corporation
Associate Research Scientist
Re: dependency tree / call graph in idl (cscope for idl)? [message #63845 is a reply to message #63673] Thu, 20 November 2008 09:47 Go to previous message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Nov 20, 10:55 am, "mgal...@gmail.com" <mgal...@gmail.com> wrote:
> On Nov 20, 3:11 am, Sven Utcke <utcke+n...@informatik.uni-hamburg.de>
> wrote:
>
>> Craig Markwardt <cbmarkwa...@gmail.com> writes:
>>> Really you want to do something like,
>>>  RESOLVE_ALL, /CONTINUE, UNRESOLVED=unresolved
>
>> So I do. BTW, how do I tell IDL to rescan the PATH to find any
>> routines I might have added since it last looked?
>
> IDL> path_cache, /rebuild
>
> Mike
> --www.michaelgalloy.com
> Tech-X Corporation
> Associate Research Scientist

There's my "nugget" for the day! Thanks Mike!
Re: dependency tree / call graph in idl (cscope for idl)? [message #63849 is a reply to message #63774] Thu, 20 November 2008 08:55 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On Nov 20, 3:11 am, Sven Utcke <utcke+n...@informatik.uni-hamburg.de>
wrote:
> Craig Markwardt <cbmarkwa...@gmail.com> writes:
>> Really you want to do something like,
>>  RESOLVE_ALL, /CONTINUE, UNRESOLVED=unresolved
>
> So I do. BTW, how do I tell IDL to rescan the PATH to find any
> routines I might have added since it last looked?

IDL> path_cache, /rebuild

Mike
--
www.michaelgalloy.com
Tech-X Corporation
Associate Research Scientist
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: loop for 365 days with 18 days interval
Next Topic: how can i get an [n,1] array without reform?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:12:45 PDT 2025

Total time taken to generate the page: 0.00736 seconds