Caller - Fortran Call Tree Generation Program

Anthony LiCausi -- tlicausi@aol.com
Version 5.1

 

Purpose

Caller is a program for reverse engineering Fortran source code. It will generate an indentured text or HTML file of the subroutines called by a Fortran program. Caller parses the Fortran code and separates the symbols in the file, determining the use of a particular symbol as a dimensioned variable or subroutine/function call.

Caller should properly interpret both standard Fortran formatting as well as the new Fortran Free Format.

Usage

Caller is executed from the command line,

C:> caller [-v][-h][-i][-l n][-f][-d descriptor][-e exeption_list] [-p n] [-c n] [-o outname] [filename(s)]

Options

-V verbose
-v Generate Variable Table Listings
-i show intrinsic calls
-d descriptor Abstract/Purpose/Description (with comment mark)
-f use Fortran Free Format
-l n set Fortran linelength to n (default F77=72/FF=512
-h HTML off (Text)
-ssize HTML font size (1-8) (default=1)
-p n set Pagelength default is 55 (Text Only)
-c n set Maxcolumns default is 10 (Text Only)
-o name send output to file name

note: the main routine must be named

Output

Typical HTML output should look something like,

In this example "main" calls the subroutines SYSOPN, SYSDTG and CHRCHR. SYSOPN is called twice within main. In SYSDTG calls the external routine TIME, and the integer function IDATE.

The following data types are understood,

Tag

Fortran Data Type

e External
R Real
R Double Precision
I Ineteger
Z Complex
C Character
G Common
[] Dimensioned
L Logical
P Parameter
= Assignment Made
u Variable Used in Module
- Unknown/None
-  
-  
-  

 

 

 

 

Known Limitations

Spaces are significant

If subroutines are multiply defined, the program gets a produces unreliable output for those subroutines.

The following statements are not interpreted

FORMAT,
BLOCKDATA,
BLOCK,
OPEN,
INQUIRE,
REWIND,
CLOSE,
PAUSE,
STOP,
RETURN,
GOTO,
BACKSPACE,
IMPLICIT,
EQUIVALENCE,

PRIVATE,
PUBLIC,
NAMELIST,
STRUCTURE,
RECORD,
POINTER,
ALLOCATABLE,
INRINSIC,