[mod.computers.vax] Fortran subroutine mapper

OC.CIVIL@CU20B.COLUMBIA.EDU.UUCP (04/06/87)

-------

OC.CIVIL@CU20B.COLUMBIA.EDU.UUCP (04/06/87)

	Does anyone have a program to grind through source files for
a large FORTRAN program, and to output a list of what subroutines are
called from each subroutine?  This does not have to be elaborate; I'm
just don't want to reinvent the wheel.

	Thanks in advance.

Holt Farley
-------

art@MITRE.ARPA.UUCP (04/06/87)

I normally will compile the large fortran program.  Insert all of the
objects into a library (this includes the main program).  Then I use the 
the cross reference feature of the librarian to perform the cross reference
listings.  I think it will do more than what you are asking.


 
     
*
*---Art
*
*Arthur T. McClinton Jr.     ARPA: ART@MITRE.ARPA
*Mitre Corporation MS-Z305   Phone: 703-883-6356
*1820 Dolley Madison Blvd    Internal Mitre: ART@MWVMS or M10319@MWVM
*McLean, Va. 22102           DECUS DCS: MCCLINTON
*

  =-=- This note is in response to yours which follows

mcohen@NRTC.NORTHROP.COM.UUCP (04/07/87)

I have written such a program, and use it primarily for checking
the number of parameters on subroutine calls and finding out
where entry points are. My program has just been for internal 
use here. The documentation is short and skimpy since I have been
available for hand-holding.

A more substantial, commercial product, is the Maintainability 
Analysis Tool, or MAT, sold for around $5K by Science 
Applications International Corporation. This analyzes Fortran source and 
produces a complete analysis of intra- and inter-module variable usage. 
It catches incorrect number and type of parameters, as well as many 
cases of dubious usage. It runs on many systems, is supported, and, in 
my opinion, does a good job. If you are given the task of maintaining 
someone else's Fortran program (or even your own program), MAT will save 
you a large amount of work, and will probably catch some errors in a 
supposedly debugged program. (When I ran MAT on mine, it caught two 
errors that had gotten past me.)

For information about MAT, contact:
	Gerald M. Berns
	Science Applications International Corporation
	2361 Jefferson Davis Highway, Suite 320
	Arlington, VA 22202
	(703) 979-5900

I could make my program available (both source and object), but with
no help and the usual "this program may or may not do anything"
disclaimer.

It is my feeling that MAT is a far more useful tool, and well worth
the cost.

Martin Cohen (mcohen@nrtc.northrop.com)
Northrop Research and Tech Center
One Research Park
Palos Verdes Peninsula
CA 90274
(213) 544-5373

KFL@AI.AI.MIT.EDU.UUCP (04/07/87)

Gerry Berns at SAIC has written a program that does this and much
more.  You can reach him at (703) 979-5900.
								...Keith

BEN@TECHMAX.BITNET.UUCP (04/07/87)

I believe that is what is called a link list:
$ link/lis myprog
-------------------------------------------------------------------
|Ben Pashkoff                                   xx  xxxxxxxx      |
|System Engineer                                 xx  xxxxxx       |
|Biomedical Engineering                           xx    xx        |
|Technion, IIT                                     xx  xx         |
|Haifa, Israel 32000                                xxxx          |
|BEN@TECHMAX.BITNET                                  xx           |
-------------------------------------------------------------------

nagy%43198.hepnet@LBL.ARPA.UUCP (04/07/87)

>    Does anyone have a program to grind through source files for
>a large FORTRAN program, and to output a list of what subroutines are
>called from each subroutine?  This does not have to be elaborate; I'm
>just don't want to reinvent the wheel.
     
1. Digital's new/coming product - Source Code Analyzer - will to this.
   And, get this, SCA will do so across multiple VAX languages!
   However, this is of the "Pay Digital" type PD program.

2. INDEX is a DECUS library program which can generate a call-by or
   a called-by tree of your FORTRAN subroutines.  The latest version
   of INDEX (V3.21) has appeared on the most recent VAX SIG tape,
   tape 86D from the Fall '86 symposia.  This will probably solve
   your problem.

cdl@mplvax.UUCP (04/07/87)

In article <12292386982.73.OC.CIVIL@CU20B.COLUMBIA.EDU> OC.CIVIL@CU20B.COLUMBIA.EDU (Holt Farley) writes:
>
>	Does anyone have a program to grind through source files for
>a large FORTRAN program, and to output a list of what subroutines are
>called from each subroutine?

There is a Fortran cross-referencer (probably named INDEX) which has been
around for quite some time on various DECUS tapes.  It should do what you
want, and since its author has migrated from RSX to VMS, his program probably
has too.  (p.s. it used to work with RT11 too, last time I tried it)


-- 
	carl lowenstein		marine physical lab	u.c. san diego
	{ihnp4|decvax|akgua|dcdwest|ucbvax}	!sdcsvax!mplvax!cdl

EVERHART%ARISIA@rca.COM ("GLENN EVERHART, 609 486 6328") (04/08/87)

To perform comprehensive analysis of Fortran based systems, I'd
suggest using the INDEX program from the VAX SIG tapes (DECUS).
It does about every imaginable static analysis job (even will draw
flowcharts...) and is free and in source. Updates have appeared regularly
on the VAX SIG tapes for some time, though I think the most recent may
be spring '86. Generally speaking, trying to run a VAX system without
having a complete collection of the DECUS VAX and RSX SIG tapes is
like trying to run with your legs tied together. A decent VAX programming
environment will often have half its tools from DECUS sources. It's a
huge library and a VAX system manager should be aware what's there, just
because it'll save so much time (and money). If you need to do static
analysis of things like Algol, you probably have to pay someone... but
if you want static analysis tools for languages like Fortran or Ada,
have a look at DECUS. (To a degree, this is true for C too...).
Glenn Everhart
p.s. The old Amsterdam DECUS tape and Hamburg DECUS tape from the
early 80's had another VERY nice Fortran static analyzer. They are
in the DECUS Library catalogs but have lousy abstracts that won't
tell you much of what's there. But they, like other symposium tapes,
are worthwhile and even though they are marked RSX tapes, they have
much that runs native mode and is useful on VMS systems even without
the VAX/RSX product.