Contents
1 Introduction
- 1.1 Overview
- 1.2 Installation
- 1.3 Licensing
- 1.4 Configuration Files
- 1.5 Command line Arguments
- 1.6 Exit Codes
2 SPAG - Renovation & Analysis
2.1 Introduction
- 2.1.1 What does it do?
- 2.1.2 Code Restructuring
- 2.1.3 Code Replication
- 2.1.4 Dispatch Loops and Internal Subroutines
- 2.1.5 Translation to Fortran 95
- 2.1.6 Adding or Rewriting Declarations
- 2.1.7 Translation of VAX Structures
- 2.1.8 Clutter Removal
- 2.1.9 Renaming Variables
- 2.1.10 Define a Corporate Style
- 2.1.11 Dynamic Analysis
- 2.1.12 Coverage Analysis
- 2.1.12 Symbol Table Files
- 2.2 Source Language
- 2.3 Organizational Considerations
- 2.4 The SPAG Command Line
- 2.5 The SPAG Configuration File
2.6 SPAG Configuration Data
- Item 1 Source Code Output
- Item 2 Symbol Tables
- Item 3 Clutter Checks
- Item 4 Declaration Standardization
- Item 5 Variable Renaming
- Item 6 Timing, Test Coverage and Hot-spot Analysis
- Item 7 Complexity Metrics
- Item 8 Interface Summary Reports
- Item 9 Source File re-ordering
- Item 10 Output Files
- Item 11 Interface Module Output
- Item 12 Safe Functions
- Item 13 Conversion of isolated COMMON to Fortran 95 modules
- Item 14 Conversion of INCLUDE file to Fortran 95 modules "on the fly"
- Item 15 Creation of FORTRAN 95 INTERFACE modules.
- Item 16 Add INTENT to dummy arguments
- Item 18 Configuration Options in Header
- Item 20 Computed GOTO
- Item 21 SELECT CASE
- Item 22 Arithmetic IF
- Item 23 Logical IF + GOTO
- Item 24 DO WHILE
- Item 25 EXIT and CYCLE
- Item 26 Statement Replication
- Item 27 Relocation into DO loop
- Item 28 Relocate RETURN or STOP followed by END
- Item 29 Remove Unreachable Code
- Item 30 Convert VAX Structures
- Item 31 Dispatch Loops and Internal Subroutines
- Item 35 Dynamic Analysis Element Size
- Item 36 Static Local Variables
- Item 40 Relocate FORMAT statements
- Item 41 Use of CONTINUE
- Item 42 Single statement block IFs
- Item 43 Logic Reversal in block IF
- Item 44 Insert Redundant ELSE
- Item 45 DO loops
- Item 46 Character Constants
- Item 47 Fortran 95 Relational Operators
- Item 48 Fortran 95 END SUBROUTINE statements
- Item 49 Remove Redundant RETURN and STOP
- Item 51 Input Statement Length
- Item 53 Old-style Direct Access
- Item 54 PDP style PARAMETER
- Item 55 FUNCTION with no Arguments
- Item 56 INCLUDE file Search Rule (1)
- Item 59 SQL Statements
- Item 60 Reformat Declaration Statements
- Item 61 Tab Characters
- Item 62 GOTO or GO TO
- Item 63 ENDIF or END IF
- Item 64 BLOCKDATA or BLOCK DATA
- Item 65 DOUBLEPRECISION or DOUBLE PRECISION
- Item 66 Space after Fortran Keywords
- Item 67 Spaces around + and -
- Item 68 Spaces around =
- Item 69 Spaces around Logical Operators
- Item 70 Spaces around Commas
- Item 71 Spaces in IF statement
- Item 73 Spaces around Concatenation Operator
- Item 79 Separate Declaration for every variable
- Item 80 Preserve Statement Labels
- Item 81 New Label Base
- Item 82 Label Increment 0
- Item 83 Label Increment 1
- Item 84 Label Increment 2
- Item 85 Label Increment 3
- Item 86 Label Increment 4
- Item 87 Label Increment 5
- Item 88 Format Label Base
- Item 89 Format Label Increment
- Item 90 Label Justification
- Item 100 Case of Local Variables
- Item 101 Case of COMMON variables
- Item 102 Case of Dummy Arguments
- Item 103 Case of PARAMETERs
- Item 104 Case of other Symbols
- Item 106 CASE of logical and relational operators
- Item 107 Case of Fortran keywords
- Item 108 Case of Character Strings
- Item 109 Case of Comments
- Item 121 Right Margin for Output
- Item 122 Left Margin for Output
- Item 123 Unit of Indentation
- Item 124 Maximum Indentation
- Item 125 Continuation Character
- Item 126 Comment Character
- Item 127 Comment Justification
- Item 130 COMMON Block Alignment Tests
- Item 131 Floating Point Equality Test
- Item 132 Variable Name Checks
- Item 133 Subprogram Argument Checks
- Item 134 Unused Variable Checks
- Item 135 Used but not Set Checks
- Item 136 Unused COMMON blocks and INCLUDE files
- Item 138 Conversion of #include to INCLUDE
- Item 140 Input Source Form
- Item 141 Output Source Form
- Item 210 File containing Intrinsic Function Names
- Item 211 File containing Renames
- Item 213 File for Translation INTEGER*2 etc.
- Item 215 INCLUDE file Search Path (2)
- Item 220 Header Record Identifier
- Item 221 Interface Description Header Marker
- Item 222 Interface Description Trailer Marker
- Item 223 Marker for First Executable Statement
- Item 229 Directory for SPAG Output Files (new in version 7.10)
- Item 230 Output File Directory (or prefix)
- Item 231 Output File Extension
- Item 232 Symbol File Directory (or prefix)
- Item 233 Symbol File Extension
- Item 234 Coverage Data File Directory (or prefix)
- Item 235 Coverage Data File Extension
- Item 236 Module File Directory (or prefix)
- Item 237 Module File Extension
- Item 238 Prefix for Names and Labels invented by SPAG
- Item 240 Dynamic Analysis Probe Routine Root 1
- Item 241 Dynamic Analysis Probe Routine Root 2
- Item 242 Dynamic Analysis Undefine Routine Root
- Item 243 Program Entry Trace Routine
- Item 244 Program Exit Trace Routine
- Item 245 Subprogram Entry Trace Routine
- Item 246 Subprogram Exit Trace Routine
- Item 247 Code Block Entry Trace Routine
2.7 Using SPAG
- 2.7.1 Control Flow Restructuring
- 2.7.2 Adding Declarations
- 2.7.3 Rewriting Declarations
- 2.7.4 Converting INCLUDE files to MODULEs "on the fly"
- 2.7.5 Converting isolated INCLUDE files
- 2.7.6 COMMON block Modules
- 2.7.7 Interface Modules
- 2.7.8 Removing Clutter
- 2.7.9 Renaming Symbols
- 2.7.10 The 'ASIS' Directive
- 2.7.11 The ANCHOR Directive
- 2.7.12 Comments in Restructured Code
- 2.7.13 Using Case to make Programs more Readable
- 2.7.14 Symbol Table Output
- 2.7.15 Some Pitfalls
2.8 Dynamic Analysis
- 2.8.1 What is it?
- 2.8.2 Worked Example
- 2.8.3 Dynamic Analysis using SPAG
- 2.8.4 COMMON Variables
- 2.8.5 Initialized COMMON Variables
- 2.8.6 Summary
- 2.8.7 False Positives
- 2.8.8 Mixed Code
- 2.8.9 EQUIVALENCE & Dynamic Analysis
- 2.8.10 Static or Dynamic?
- 2.9 Coverage Analysis
- 2.10 Processing Fortran 95 Modules
3 GXCHK - Global Cross Checks
3.1 Introduction
- 3.1.1 Information Warning and Error Messages
- 3.1.2 Static Analysis Documentation
- 3.1.3 Per Symbol Reports
- 3.1.4 Source Code Amendments
- 3.2 The GXCHK Command Line
- 3.3 The GXCHK Configuration File
3.4 GXCHK Configuration Data
- Item 302 Character Output Format
- Item 304 Page Width in Characters
- Item 305 Filter Input Data
- Item 308 Interface Summary Output
- Item 309 Preparation for Dynamic Analysis
- Item 311 Subprogram Error Reporting
- Item 312 COMMON Block Error Reporting
- Item 313 INCLUDE file Error Reporting
- Item 314 COMMON Variable Error Reporting
- Item 315 PARAMETER Error Reporting
- Item 316 Argument Type Checking
- Item 317 MODULEs and MODULE variables
- Item 318 Use of default Types
- Item 320 Subprogram Location Report
- Item 321 Subprogram Documentation
- Item 322 COMMON block Documentation
- Item 323 INCLUDE file Documentation
- Item 324 COMMON Variable Documentation
- Item 325 PARAMETER Documentation
- Item 326 MODULE Documentation
- Item 327 MODULE Variable Documentation
- Item 329 Modularization Report
- Item 330 Call Tree
- Item 331 'Used by Nothing' Reports
- Item 332 Orphan Branches
- Item 350 Per Symbol Reports
- Items 401-450 Error Severity Codes
3.5 Using GXCHK
- 3.5.1 COMMON Variable Consistency
- 3.5.2 Symbol Table Size
- 3.5.3 Name Clashes
- 3.5.4 GXCHK Messages
- 3.5.5 Some Pitfalls
3.6 Interface Summaries
- 3.6.1 What Are They?
- 3.6.2 Dummy Arguments
- 3.6.3 External Subprograms
- 3.6.4 COMMON Variables
- 3.6.5 Local Variables and PARAMETERs
3.7 Modularization Reports
- 3.7.1 What Are They?
- 3.7.2 Internalization Reports
- 3.7.3 Flattening the Calling Structure
- 3.7.4 Cluster Analysis Reports
- 3.7.5 Planning Modularization
4 CVRANAL - Coverage Analysis
- 4.1 Introduction
- 4.2 The CVRANAL Command Line
- 4.3 The CVRANAL Configuration File
4.4 CVRANAL Configuration Data
- Item 501 Type of Run
- Item 502 Box Drawing Characters
- Item 503 Lines per Page
- Item 504 Page Width in Characters
- Item 510 Unexercised Code Report
- Item 511 Execution Hot-spot Report (file)
- Item 512 Execution Hot-spot Report (screen)
- Item 513 Source Code Annotation
- Item 550 Source Code Directories
4.5 Using CVRANAL
- 4.5.1 Source Code Changes
- 4.5.2 Execution Count Overflow
- 4.5.3 Troubleshooting
5 QMERGE - Version Selection
- 5.1 What Does it Do?
- 5.2 The QMERGE Command Line
- 5.3 Specifying Conditions
- 5.4 Source Code Directives
6 QSPLIT
- 6.1 Use of QSPLIT
- 6.2 Example of Merged File
7 AUTOMAKE - Automated Compile & Link for Fortran and C
7.1 Introduction
- 7.1.1 What does it do?
- 7.1.2 How does it do that?
- 7.1.3 How do I set it up?
- 7.1.4 What can go wrong?
- 7.2 Running AUTOMAKE
- 7.3 The AUTOMAKE Configuration File
- 7.4 Multi-Phase Compilation
- 7.5 Notes
8 PFFE -
plus
FORT
Front End
- 8.1 Introduction
- 8.2 The Working Directory
- 8.3 Configuration Pages
- 8.4 Running SPAG and GXCHK
- 8.5 Running CVRANAL
- 8.6 Running HyperKWIC
9 HyperKWIC
- 9.1 Anatomy of a HyperKWIC Report
- 9.2 How Is It Used?
- 9.3 Running
hyperkwic
- 9.4 Command Line Switches
- 9.5 Language Syntax Configuration
Appendix A - Symbol Table Format
Appendix B - Probe Routines