![]() |
![]() |
|
plusFORT Version 6 Fortran Code Restructuring SPAG does not change the meaning of a program, or even the order in which statements are executed; it does change the way the program logic is written down, making it much easier to understand and maintain. Blocks of code are reordered so that logically related sections are physically close, and jumps in control flow are minimised. SPAG may also replicate small code fragments where this improves the re-structured code. SPAG computes complexity metrics before and after restructuring. * SPAG identifies, and optionally removes dead code (statements which could never be executed) and clutter (variables or PARAMETERs which are declared but never used). There are over 100 configuration options which allow you to customise SPAG output to local conventions and requirements. * Subprogram argument mismatch or misuse (e.g. constant actual argument is illegally modified by subprogram). An unusual feature of GXCHK is its ability to analyse local and global data together. For example, if a local variable in subprogram A has the same name as a COMMON variable in subprogram B, it could be that the programmer has omitted the relevant COMMON statement from subprogram A. GXCHK, unlike other static analysers spots this problem. GXCHK also produces a call tree, and concise but comprehensive charts showing where and how each symbol is used. Handy aggregated reports are produced for COMMON blocks and INCLUDE files. Interface specifications for every subprogram, showing calls in and out, dummy arguments, COMMON variables usage etc., can also be produced. GXCHK operates in a "compile & link" style which allows reports to be updated with minimal source code analysis. AUTOMAKE can be used to automate the process. The GXCHK database can be queried interactively. This allows users instant access to information which is vital to program development and maintenance. For example, a programmer might set up a static analysis query window in a corner of the screen, and use it to find the consequences of a change to a COMMON block. QMERGE is an unusual program, but it tackles a common problem - how to keep control of programs which exist in a number of different versions. A common application is programs which run on a variety of different machines, and require slight changes to the source code for each one. For example, there may be different file naming conventions, word length, or different ways of accessing the system. QMERGE allows the user to keep all the code variants within the master version of the source code. It comments and un-comments sections of code, depending on the setting of user-defined logical flags. Unlike a macro pre-processor or a conditional compilation tool, QMERGE does not require that you deviate from ANSI standard FORTRAN, or that you pre-process code before compiling it - the master version is legal FORTRAN and can be compiled directly. QMERGE is needed only when you switch from one version to another. |