Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcsun!ukc!harrier.ukc.ac.uk!trh From: trh@ukc.ac.uk (T.R.Hopkins) Newsgroups: comp.lang.fortran Subject: Static Analyzers for Fortran Message-ID: <6447@harrier.ukc.ac.uk> Date: 10 Dec 90 12:22:06 GMT Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 69 This is in response to an earlier article requesting information on static analyzers for Fortran -- I thought the reply might be of interest to more people than just the requester. We have three such tools on site 1) QA-Fortran from Programming Research Ltd, Waynflete House, 74-76 High Street Esher, Surrey KT10 9QS, UK This performs a full static analysis of Fortran code for adherence to the Fortran 77 Standard; it also checks argument passing to subprograms for type and number and takes account of direction of passing. It also provides a number of complexity metric values which have proved very useful in identifying code likely to be a maintenance problem. Calling trees are also provided. It is available on most systems supporting a C compiler (certainly VMS and SUNs -- we run it on both of these). There is a nice X interface available if you are running on a workstation -- I think a DEC-Windows version is in the pipeline. 2) FORCHECK from Polyhedron Software Ltd., Magdalen House 98 Abingdon Road, Standlake, Witney, OX8 7RN, UK This performs most of the static checks QA-Fortran performs -- I don't think it is a thorough on inter-module checks but it still does a good job. Calling trees are also provided. There are no complexity metrics. This one is written in Fortran and is available on many platforms. 3) TOOLPACK from NAG Ltd, Wilkinson House, Jordan Hill Road, Oxford, OX2 8DR, UK. This is public domain s/ware -- you just pay a distribution fee although if you pay a bit more (around Pounds UK 200) you can get a number of machine specific versions. This package contains a large number (50+) of Fortran tools including precision transformers, pretty printers etc. On the static analysis side there is a verifier tool which performs many of the static checks that the two tools above perform. Unfortunately, due to the way Toolpack works, the final output is just a list of error messages -- you have to match them back to the source; QA-Fortran and FORCHECK both have their errors in with a source listing or as soon as possible in the case of inter module checks. There is a separate tool which produces call trees. The whole tool-kit is written in Fortran 77; a C interface is available for the interface to the operating system. These tools have saved us an enormous amount of heartache and located a number of difficult bugs -- I certainly wouldn't want to go back to the dark ages when we didn't have such aids for Fortran!! Hope this helps, Tim