SimCon - Fortran Analysis, Engineering & Migration About UsDownloadsPricing Home | SimCom logo
$keywords!
FPT - Interactive Control of a Fortran Program
Consultancy
Migration & Software QA
 
WinFPT & FPT
WinFPT
FPT Summary
 
Error Correction
Hosts
Metrics
Migration
Optimization/Optimisation
QA
Reports
Security
Standardisation  
Updates & Release notes
$keywords!
WinFPT & FPT - Special Issues
Checking Expressions
Continuation Lines
Datapool
File Handling
File Names
Hex Numbers
Program Control
Record/Replay
Tab Format
Tracing Execution
 
Gould-SEL
VMS & Unix
 
Associated Companies
IQS Solutions
 
 
Fortran Program Control

FPT can add a command-line and command-file interactive environment to a Fortran program. Command files may be set up to initialise the program and to carry out experiments. Variables in COMMON blocks are visible in the interactive environment and can be inspected and changed at run-time.

The system can be used for non-real-time experiments, or for run-time control of a real-time program.

The steps in setting up a non-real-time system are:

  • Set up an FPT specification file for the program. This contains a list of all the primary files (the INCLUDE files are found automatically). Run FPT on the program, and deal with any errors which FPT reports.
  • Identify one or more points in the program flow where it may be interrupted for program initialisation, or for inspection and modification of variables. If the program is a continuous system simulation, for example, it could be interrupted at the start of each frame. Edit the program and insert a call to the subroutine ADB at these points. ADB passes control to the interactive environment.
  • Edit the program and insert a call to the subroutine ADINIT to initialise the interactive environment. ADINIT is called during program initialisation, before any call to ADB.
  • Add the specification file FPTMAIN:adbserve.fsp to the specification file for the program. Run FPT again, and build the output. The output files will contain all of the code used in setting up the interactive environment.
  • For example - a simulation of a cannon ball, with a simple square-law drag.

    Scripted Experiments

    The environment supports command file scripts, for example, click here for a script to initialise the cannon ball.

    An Example Session

    Interactive sessions may be logged automatically. Click here for an example.

    What Does FPT Do? - How Does it Work?

    FPT creates a database which contains the names and descriptions of all of the variables in COMMON blocks in the original program. The database is written as two new Fortran COMMON blocks initialised by BLOCK DATA.

    The interactive environment is written in Software Validation's ACL product. ACL calls service routines which use the database to access the program COMMON blocks at run-time.

    All of the code required is written in Fortran, and all is made available, without licence restrictions, in the FPT distribution.

    Control of Real-Time Programs

    When the program is to run in real-time, the subroutines ADB and ADINIT are built into a separate thread or separate program, which shares the main program COMMON blocks. Usually a flag or MUTEX is inserted in the main program frame which allows the interactive handler to pause and continue the main program.

    Is This a Symbolic Debugger?

    FPT's access database mechanism is unlike a symbolic debugger in that:

    • The command set is biased towards engineering rather than programming. It is similar to the command line environments for some Gould-SEL (Encore) and Applied Dynamics Internatonal simulation systems.

    • The system is less powerful than a debugger. There is no direct access to the program code or to local variables.

    • The system is much less invasive than a symbolic debugger. The program runs fully optimized and at full speed.

    • Users may modify and extend the command set, and customise it to their specific applications.

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