FPT can add a command-line and
command-file interactive environment to a Fortran program.
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 simulation frame.
Edit the program and insert a call to the FPT library 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 at the end of 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
For example - a simulation of a cannon ball, with a simple square-law drag.
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 contains 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
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