Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!ngse18 From: ngse18@castle.ed.ac.uk (J R Evans) Newsgroups: comp.lang.fortran Subject: Some Fortran tools reviewed ... Summary: TOOLPACK from NAG is a 'must have'! Message-ID: <8391@castle.ed.ac.uk> Date: 10 Feb 91 19:02:36 GMT Distribution: comp Organization: Edinburgh University Computer Services Lines: 179 The question of restructurers comes up quite often, and has recurred several times lately (it must be the prime candidate for an FAQ posting, if someone wants to put one together ...). Here is an account of my own recent experiences, which I hope will help others in the same position. For those about to hit 'n', my main conclusion is: If you deal with Fortran code, you should get a copy of TOOLPACK; it costs next to nothing and does a hell of a lot! ------------------------------------------------------------------------ A few weeks back, an ancient horror reared its head - 5000 lines of unstructured FORTRAN-66. I needed to run it to get some results for a paper, and past experience told me that whilst it normally worked, it had some nasty habits. On previous occasions, I had tidied some of its edges and seen enough of its contents to know that fixing it up manually was going to be an uphill struggle, so I decided to investigate the possibility of using mechanical means to help me improve it. (If it worked better, I'd use it more ...). I began with the two programs which were immediately available to me - FLOPPY, a style analyser and pretty-printer distributed through comp.sources.misc during 1990; and struct, a FORTRAN-66 to ratfor translator, written at Berkeley in the '70s and included with some Unix distributions. These proved of little use, so I investigated also - SPAG, a commercial restructurer and pretty printer; FORCHK, a static analyser, marketed alongside SPAG; and TOOLPACK, a public domain package of Fortran tools and proprietory enhancements distributed by NAG. Lack of time prevented me from investigating other offerings; I would otherwise have wished to evaluate - flint, (and other products) from Programming Research Ltd Here follows a mini-review of each in turn: *** FLOPPY *** Status: Probably copyright, but apparently freely redistributable Source: J Bunn, CERN computer centre, via comp.sources.misc Function: Coding convention checker and pretty-printer Notes: 1. Distributed in Fortran-77 source for IBM, VMS & Unix 2. A tandem program, FLOW, offers structure analysis (not Unix) Review: The distributed version is described as suitable for Ultrix. I compiled it on our Ultrix/RISC system, and found that the pretty-printer function worked as described, but that the resulting layout was restricted to one specific style. The distributed program dumped core when asked to analyse coding conventions; this was easy to fix (simply add SAVE NP to routine ITBIT) but didn't inspire confidence. After meeting various other problems e.g. it rejected perfectly legal statements of the form DO