top_left_banner  SimCon logo

Fortran Quality Assurance

Fortran programs are used to design aircraft, ships, bridges, power plant, space craft, medical drugs ... Perhaps most importantly, they are used to model the Earth's climate and to inform the prediction of climate change. The engineers and scientists already know that the results they generate are about right. Man years of program development on expensive equipment are invested for the last few percent of accuracy which go beyond the engineer or scientist's intuition. The achievement of this last few percent depends on the quality of the code.

The issues handled by fpt are:

Is the code well written?

Is it well formatted, adequately commented and are the variable names meaningful?

Is the code fully tested?

Do the tests exercise all of the code? Is the test suite well automated?

Are there errors?

Errors in Microsyntax, Syntax and Semantics

When fpt reads a program it carries out a detailed syntactic and semantic analysis in the same way as a Fortran compiler. Diagnostics are reported, for example:

Most, but not all of these occurrences indicate problems. fpt supports nearly all of the language extensions used in different compilers but there must be some which we have not yet encountered. We attempt to keep fpt up to date with the latest Fortran standard, but new keywords and constructs are added every few years.

These diagnostics are always issued unless they have been explicitly suppressed (See the SUPPRESS ERROR command).

Checks for Specific Classes of Error

Commands are available to check for specific classes of errors. Most of the checks may also be modified by filters which suppress reports of the less serious cases. The checks include:

QA Auditing or QA Enforcement?

QA Auditing

In auditing the objective is to assess the state of a code, not to change it. It is recommended that a standard test regime is set up in an fsp file with a chosen set of checks, and that this is applied to a number of projects to gain a comparative feel for code quality. The procedure for setting up projects and fsp files is described in "Running fpt" in the fpt Reference Manual.

In addition to the error checks described above the following may be useful:

QA Enforcement

If the intention is to enforce a QA regime and to remove errors, it is recommended that the project is set up in the same way as a software migration. This is essentially a migration from the original sources to a corrected code base. Please see the description of Migration in the fpt Reference Manual. We recommend setting up parallel original_source, modified_source and fpt_output directory structures as described there. fpt may then be used to reformat the code and to make some of the changes.

The commands for automatic error correction are described in Error Correction. The following systematic changes may also be useful:

Copyright ©1995 to 2025 Software Validation Ltd. All rights reserved.