|
|
|
|
What would you like to do to your code?
The following facilities are currently supported in WinFPT and FPT. Follow the hyperlinks from the
headings for more information.
And if you can't find what you want, please
contact SimCon and we will try to help.
|
|
|
Code metrics allow you to assess the scale of an engineering task,
and the risks and cost of ownership of a software package. They are key to successful project management.
|
|
Code Metrics
|
- How big is it? - Count the number of lines, statements, comments, blank lines
- How complex? - Measure the cyclomatic complexity
- How maintainable? - Assess the meaningfulness and uniqueness of variable names and the level of commentary
|
|
Report Generation
|
- Call Tree
- Symbol Table - shown collated across all routines
- Sub-program Interfaces - list both arguments and shared memory interfaces
- COMMON Block listings - COMMON blocks are listed in address order
|
|
|
Most large programs contain errors. Sometimes they result in unexplained crashes. More often the program runs,
but the results are slightly inaccurate. Inaccuracies of about 5% are quite common because they are too small
to be recognised by the program authors.
The errors listed here are rarely found by Fortran compiler and linkers. WinFPT can show that a code
is free from them.
|
|
Dead Code |
- Unused sub-programs - Find subroutines and functions which are never called
- Un-reachable Code - Find statements which can never be executed
|
|
Dead Variables |
- Variables used but never assigned - Check across all shared memory
- Variables assigned but never used
- Variables declared but never accessed
|
|
Mis-matched Arguments |
- Wrong Data Type - find, e.g. integers passed to routines where reals were expected
- Wrong data size - find, e.g. real(kind=4) objects passed where real(kind=8) objects were expected
- Wrong intent - find, e.g. variables passed by value which should be passed by reference
- Wrong array bounds - find inconsistencies between the bounds of the arrays passed and expected
- Missing arguments - detect missing arguments which are not declared to be optional
|
|
Mis-aligned Memory |
- Mis-aligned COMMON blocks - Show variables with different addresses in different routines
- COMMON blocks with different lengths - Find named COMMON blocks with different lengths in different routines
- Mixed Equivalence - Find variables of different data types occupying the same memory
|
|
Errors in Expressions |
- Loss of Precision - Detect mixed precision in arithmetic expressions
- Accidental whole array assignments - Find missing sub-scripts in DO loops - the whole array is assigned
- Integers rased to negative powers - Find errors like Time_secs = Time_microsec * 10**(-6)
|
|
Errors in Names |
- Parameters with different values in different routines - Find, e.g. g = 32.2 and g = 9.81 in the same program!
- Variables with different attributes in different routines
- Variables with the same names as keywords or intrinsics
|
|
Errors in Physical Units and Dimensions |
- Variables forced to be dimensionless
- Volumes added to areas, volts added to amps
|
|
|
WinFPT contains a powerful and flexible code formatter and browser. You can switch safely and easily from FORTRAN 77
fixed format to Fortran 90 free format - and back again if you need to test on an old but reliable compiler.
|
|
Layout Conversion |
- Convert Layout - between fixed format, VMS tab format and Fortran 90 free format
|
|
Pretty Printing |
- Indentation - Indent for control constructs and declarations
- Spacing - Specify spacing for symbols, numbers, labels and separately for every keyword and operator
- Upper/lower case - Specify case separately for keywords, operators, symbols, intrinsics
- Number format - Add leading and trailing zeros, specify data size and kind
- Renumbering labels - Number labels systematically in ascending order
|
|
Code Browsing |
- Full syntax colouring - The colours are syntax sensitive - a keyword used as a variable is coloured as a variable
- View by sub-program or by file - in sub-program view INCLUDE files appear in-line
- Flexible navigation - Navigate using the file list, call tree, symbol table or error table
|
|
|
With WinFPT, you can systematically clean up codes, enforce declarations, insert IMPLICIT NONE statements and
move COMMON blocks to INCLUDE files. The variable name editing facilities make it easy to apply
naming conventions. With these tools you can significantly reduce the workload and risk of future
maintenance.
|
|
Declarations & Names |
- Add Declarations - for undeclared variables
- Add IMPLICIT NONE - removing existing IMPLICIT statements
- Add SAVE - specify global SAVE, removing local SAVE statements
- Change kinds and data sizes - adding or changing existing declarations
- Rename Variables - Rename only the complete variable names, ignoring keywords
- Edit Variable Names - applying editing rules only to the variable names
|
|
COMMON Blocks |
- Move COMMON blocks to include files - Use a single file or one file for each COMMON
- Move all Static Variables to COMMON
|
|
Control Constructs |
- Move labels from Executable Statements - move the labels to CONTINUE statements
- Replace IF (...) Statement - rewrite the code as IF - THEN
- Replace SELECT CASE - rewrite the code as an IF - THEN - ELSE chain
|
|
Interactive Controller |
- Build an Interactive Control Environment - add code to inspect and change variables and to start and stop execution
|
|
Correct Errors |
- Correct Inconsistent Arguments - re-write the arguments or add type conversions
- Correct Formats - add missing commas and delimiters
|
|
The coverage analysis allows you to see how much of a code is actually exercised by your test suite. The
trace and record/replay facilities allow you to isolate components of a code for reproducible tests, to
compare runs on the new and old systems in migration, and to investigate the conditions which lead to
a program crash.
|
|
Coverage Analysis |
- Instrumenting Code - to record all sections of the code visited in a test
|
|
Trace Data Flow |
- Capture I/O and Sub-program Interfaces - to replay test runs without the original inputs
- Capture all variables - to replay or check data flow in program migration or debugging
|
|
With WinFPT you can write and maintain your code using small data access routines to encapsulate data
structures, and then expand the routines in-line to achieve efficiency in production builds.
|
|
WinFPT converts the control and data structures found in legacy systems to modern Fortran. Many old codes
are hugely valuable. With WinFPT you can keep them and maintain them.
|
|
Code Formatting |
|
|
Arguments and Sub-programs |
- Supply Missing Arguments - adding appropriate declarations
- Expand Internal Routines In-line - handle both Gould-SEL and Fortran 90 formats
|
|
Gould-SEL and VMS Migration |
- Replace ENCODE and DECODE - use internal READ and WRITE
- Replace Gould-SEL Memory Management - e.g. EXTENDED DUMMY, EXTENDED GLOBAL etc.
- Replace GOULD-SEL DATAPOOL - by a standard COMMON block
- Re-code ISAM File I/O - replace the I/O statements by sub-program calls
|
|
Have you ever needed to send a code to a compiler vendor to analyse a problem, without giving them access
to secret material? Have you ever needed to release code to be built by a third party without releasing
sensitive information? With WinFPT, you can do this.
|
|
Make Code Unreadable |
- Scramble Names and Strip Comments - make sensitive code safe to pass to third parties
|
|
 |
|
|
|
Copyright ©1995 to 2013 Software Validation Ltd. All rights reserved. |
|
|