[comp.sources.wanted] Fortran Source Renumbering

tim@nytim.UUCP (Tim's Personal Id.) (05/14/89)

If anyone has a program to renumber fortran source code (and perhaps
do some general  tidying up as well) I'd be very grateful to hear
about it.  I have a great deal of old source to clean up and would be
very grateful for some mechanised help.

Many thanks in advance.
+---------------------------+ At work:
| Tim Stone                 | UUCP: ...!rutgers!hombre!marob!nytim!tim   
| Chase Leasing Services Co,| Tel : (212) 552-7132
| 1 Chase Plaza,            | Fax : (212) 269-9690
| New York, NY 10081,       | 
| U.S.A.                    | "God is a comedian playing to an audience too
+---------------------------+  afraid to laugh" - Voltaire.

mem@zinn.MV.COM (Mark E. Mallett) (05/16/89)

In article <406@nytim.UUCP> tim@nytim.masa.com (Tim's Personal Id.) writes:
>If anyone has a program to renumber fortran source code (and perhaps
>do some general  tidying up as well) I'd be very grateful to hear
>about it.  I have a great deal of old source to clean up and would be
>very grateful for some mechanised help.

I have one that I wrote for TOPS-10, in MACRO-10 assembly, that does a
bunch of niffty things (reformatting, re-arrangement of FORMAT
statements, allows mnemonic labels, stuff like that)... but I'm
sure that's not what you're looking for :-)

I'm surprised I can still even remember those FORTRAN words!

-mm-
-- 
Mark E. Mallett  Zinn Computer Co/ PO Box 4188/ Manchester NH/ 03103 
Bus. Phone: 603 645 5069    Home: 603 424 8129     BIX: mmallett
uucp: mem@zinn.MV.COM  (  ...{decvax|elrond|harvard}!zinn!mem   )
Northern MA and Southern NH consultants:  Ask (in mail!) about MV.COM

buck@siswat.UUCP (A. Lester Buck) (05/16/89)

In article <406@nytim.UUCP>, tim@nytim.UUCP (Tim's Personal Id.) writes:
> If anyone has a program to renumber fortran source code (and perhaps
> do some general  tidying up as well) I'd be very grateful to hear
> about it.  I have a great deal of old source to clean up and would be
> very grateful for some mechanised help.

I don't remember for sure, but this is just the type of tool found
in the Toolpack PD distribution from NAG (Numerical Algorithms
Group).  I got the first tape of Toolpack 1 four years ago, but
there is now a much improved Toolpack 2 that includes all sorts
of nice stuff such as a pretty printer and a de-spaghettizer for
Fortran.  All for the price of a tape.  Don't have NAG's address
handy, but they are not hard to find.

-- 
A. Lester Buck		...!texbell!moray!siswat!buck

dph@lanl.gov (David Huelsbeck) (05/17/89)

From article <399@siswat.UUCP>, by buck@siswat.UUCP (A. Lester Buck):
> In article <406@nytim.UUCP>, tim@nytim.UUCP (Tim's Personal Id.) writes:
>> If anyone has a program to renumber fortran source code (and perhaps
>> do some general  tidying up as well) I'd be very grateful to hear
>> about it.  I have a great deal of old source to clean up and would be
>> very grateful for some mechanised help.
> 
> I don't remember for sure, but this is just the type of tool found
> in the Toolpack PD distribution from NAG (Numerical Algorithms
> Group).  I got the first tape of Toolpack 1 four years ago, but
> there is now a much improved Toolpack 2 that includes all sorts
> of nice stuff such as a pretty printer and a de-spaghettizer for
> Fortran.  All for the price of a tape.  Don't have NAG's address
> handy, but they are not hard to find.
> 
> -- 
> A. Lester Buck		...!texbell!moray!siswat!buck

Sorry, I tried to send this directly to Tim rather than posting it
but my machine seem to be unable to find his.  To answer a few of
you questions about Toolpack:

	
What is its current state?

	The first release was distributed to over 400 sites.  While it
	fulfilled many of its design goals, bugs and problems with 
	design and efficiency were found.  NAG, who had agreed to 
	provide public distribution for Toolpack/1, continued their
	role by helping to develop, assemble and distribute Release 2.

	Release 2 not only fixed bugs found in the first release but
	also added new tools, enhanced efficiency libraries and system
	specific versions.  NAG continues to coordinate and distribute
	Toolpack/1 with the latest version, Release 2.5, which became
	available in January of 1989.

How can interested parties get Toolpack/1?

	The standard way to get the sources for Toolpack/1 is to get
	a tape from NAG for a small distribution fee.  For detailed
	information on tape formats and fees contact:

		Numerical Algorithms Group, Inc.
		1101 31st Street, Suite 100
		Downers Grove, IL 60515-1263
		USA

	In the UK:

		Numerical Algorithms Group, Ltd.
		NAG Central Office
		Mayfield House
		256 Branbury Road
		Oxford OX2 7DE
		UK

	An alternative method for those with internet ftp capability
	is to use anonymous ftp to lambda.lanl.gov and look in the
	directory ./pub/toolpack for the various Toolpack sources
	there.  LANL is not in the business of distributing software 
	so please do not ask LANL for tapes.  If you can't ftp it get
	it from NAG. (lambda.lanl.gov is 128.165.4.10)

Exactly what tools are in Toolpack/1?

   Below  is  a  list  of the tools giving a brief description of
   their function and changes that  have  been  introduced  since
   Release  1.1,  these  changes are in addition to the fixing of
   bugs and  tidying  of  code  to  improve  maintainability  and
   readability.

    ISTAL The  documentation  generation  aid.  This tool can now
          report unexecuted segments in instrumented  code.  Some
          other minor improvements have also been made.
    ISTAN The Fortran 77 instrumentor has been improved.
    ISTCB The  change  bar  processor  is  a  new  tool  at  this
          Release.   Used  as  a  pre-processor  it   will   find
          differences   between   documents   and   insert  ISTRF
          instructions to display change and delete bars.
    ISTCD/ISTSB/ISTUD These  three  new  tools  will  unroll  and
          condense  DO  loops. The restructured code is in a form
          that can be more  easily  optimised  by  compilers  for
          vector machines.
    ISTCE The command executor tool. This tool now recognizes the
          new  tools,  this has meant a change in name of some of
          the internal commands, most notably the LS  command  is
          now named LD.
    ISTCN A  simple, stream based token stream editor that can be
          used for changing strings within Fortran program units.
          A new tool at this Release.
    ISTCR A name changer for Fortran  program  units  that  works
          selectively  on  the  symbol  table. A new tool at this
          Release.
    ISTDC The data file comparison tool has been  tidied  up  but
          remains operationally unchanged.
    ISTDS The  declaration  standardiser,  this can now deal with
          the new types and also will  not  interfer  with  items
          declared  in  INCLUDE files if these have been included
          using ISTIN.
    ISTDX The documentation extractor.
    ISTED The editor has remained unchanged, but now incorporates
          the new version of the scanner.
    ISTET A tab expander tool has been added to Toolpack/1.
    ISTFD The fortran differencer has remain unchanged.
    ISTFI The utility for finding include file dependencies.
    ISTFL The file length utility and example tool for  the  tool
          writers guide.
    ISTFP The fast polish utility.
    ISTFR A  new  tool to convert REAL, DOUBLE PRECISION, COMPLEX
          and DOUBLE COMPLEX constants to a consistent form.
    ISTGI The tool to turn intrinsics into generic references has
          remained essentially  unchanged  but  now  accepts  the
          defined DOUBLE COMPLEX intrinsics.
    ISTGP The generalised pattern matching utility.
    ISTHP The simple help program.
    ISTIN A new tool to assist in the use of INCLUDE files.
    ISTJS A  new  tool  to manipulate FORMAT statements, can join
          adjacent strings and turn H and X edit descriptors into
          strings.
    ISTLS A long name changer,  allows  Fortran  programs  to  be
          written  using  long  variable names, this tool then be
          using to map them to legal names. This is a new tool at
          this Release.
    ISTLX The Fortran 77 scanner tool files. This tool  has  been
          extensively  modified.  The tool can now split up files
          into individual token streams, one per program unit, to
          assist in the processing  of  large  input  files.  The
          error  file has now been dropped and the list file made
          optional. There are changes to the format of the  token
          stream and comment file to speed operation. The grammar
          has  been  modified to handle all types of comments, to
          allow   DOUBLE   COMPLEX   and   to   improve   general
          processing.
    ISTME A  new  tool  to modify complicated expressions so that
          during calculation the sub-expression stack is kept  to
          a minimum.
    ISTMF A  new Fortran sensitive differencing program that will
          insert the differences as comments in the output code.
    ISTMP The macro processor has  been  tidied  up  but  remains
          operationally unchanged.
    ISTPF A  new  tool,  this provides a Fortran 77 equivalent of
          the PFORT portablility verifier capability.
    ISTPL The polish tool has been modified to cope with the  new
          token  types,  several new processing options have also
          been added.
    ISTPO The polish option editor has been  modified  to  accept
          the new polish options.
    ISTPP Ensures  the consistency of PARAMETER statements across
          program units.
    ISTPT The arithmetic precision transformer can now handle the
          defined COMPLEX/DOUBLE COMPLEX mappings.
    ISTRF The  text  formatter  has  been  modified  to   provide
          additional functionality.  The most important result of
          this  is  that  Toolpack/1  documentation  can  now  be
          processed by ISTRF in a single stage without  the  need
          for pre-processing through ISTMP.
    ISTSA A  new  tool  providing a static analysis capability to
          check software conformance to the Fortran 77 standard.
    ISTSP The file split utility.
    ISTST A new tool that will rebuild the structure of  programs
          to a standard form.
    ISTSV The save/restore tool has remained unchanged.
    ISTTD The text differencer has remained unchanged.
    ISTUN This  tool  reverses  the  effect  of  ISTIN, replacing
          included files by an INCLUDE statement.
    ISTVA The attribute viewing utility is a  new  tool  at  this
          Release  that  allows the user to examine the attribute
          tables created by ISTSA.
    ISTVC The  version  controller  file.  The  minus  sign   for
          specifying options is now optional.
    ISTVS The  symbol  viewing  utility  allows users to view the
          symbol table.
    ISTVT The parse tree viewing utility allows  users  at  sites
          that have installed the WINDOW Supplementary Library to
          graphically display and print out parse trees.
    ISTVW A  new tool, based on ISTVS that gives a simple listing
          of warnings about a program unit. The warnings are  the
          same as those reported by ISTAL.
    ISTYF The parse tree flattener.
    ISTYP The  parser  has  been  modified  to  accept the target
          language extensions.  The output form of the parser has
          been modified to speed up operation.


    Combined Tool Fragments

    ISTDT The combined ISTYP/ISTDS/ISTPL tool.  Token  stream  to
          source with declaration standardisation.
    ISTLA The  combined  ISTLX/ISTYP/ISTSA  tool.  Source to full
          static analysis.
    ISTLP The  combined  ISTLX/ISTPL  tool.  Source   to   source
          polishing operation.
    ISTLY The combined ISTLX/ISTYP tool. Source to parse tree.
    ISTP2 The  combined  ISTLX/ISTPP/ISTPL tool. Source to source
          parameter setting.
    ISTQD The combined ISTLX/ISTYP/ISTDS/ISTPL  tool.  Source  to
          source declaration standardiser.
    ISTQP The  combined  ISTLX/ISTYP/ISTPT/ISTPL  tool. Source to
          source precision convertor.
    ISTQT The combined ISTLX/ISTYP/ISTPT tool.  Source  to  token
          stream with a precision conversion.


    Experimental Tools

    ISTCI The experimental command interpreter.
    ISTJF The symbolic differentiator tool.
    ISTXX The experimental simple expert systems.
    NEWTON The  old Newton system (ISTPR, ISTNA, ISTNI, ISTNL and
          ISTNR) has been deleted. Replacement of  this  facility
          is  now underway.  The file supplied on this tape is an
          early version of the instrumentor and  loader.  No  run
          time  library  can be supplied yet.  Subscribers to the
          Toolpack information service will receive news  of  the
          release date of the complete NEWTON system.


    Documentation

    TOOLS All the tool documents have been updated as required to
          reflect  current  tool operation. Documents for deleted
          tools are  no  longer  provided,  documents  have  been
          provided  for  new  tools. The new monolithic tools are
          all covered in a single manual.
    TIG   The  TIE  Installers'  Guide  (formally   the   TIECODE
          Installers'  Guide)  has  been modified to try and ease
          the installation process. This guide should be used  by
          all  installers  as  it  directs the selection of a TIE
          implementation and its installion.

dik@cwi.nl (Dik T. Winter) (05/17/89)

In article <399@siswat.UUCP> buck@siswat.UUCP (A. Lester Buck) writes:
 > I don't remember for sure, but this is just the type of tool found
 > in the Toolpack PD distribution from NAG (Numerical Algorithms
 > Group).  I got the first tape of Toolpack 1 four years ago, but
 > there is now a much improved Toolpack 2 that includes all sorts
 > of nice stuff such as a pretty printer and a de-spaghettizer for
 > Fortran.  All for the price of a tape.  Don't have NAG's address
 > handy, but they are not hard to find.
 > 
Warning: this package is not very portable.  I got the distribution
from LANL some time ago (it is available by anonymous ftp).  If you
get it, do not expect that it runs without hasle.  I am trying to
bring it into a reasonably portable form, but don't hold your breath.
-- 
dik t. winter, cwi, amsterdam, nederland
INTERNET   : dik@cwi.nl
BITNET/EARN: dik@mcvax