|
The Gould-SEL DATAPOOL was a first step towards the Fortran 90 MODULE
construct. A DATAPOOL declaration is written in the same way as an ordinary
COMMON block, with the COMMON block name /DATAPOOL/. However, the names in the
declaration do not occupy consecutive memory locations starting from the
beginning of the COMMON. The addresses of DATAPOOL variables are stored
centrally in a database maintained by the operating system. The DATAPOOL
typically contains thousands of variables, but each sub-program need declare
only the names which it uses. For example.
The MPX operating system generates a listing to show the contents of the
DATAPOOL. A short extract is shown here.
FPT uses this listing to generate an INCLUDE file which represents the
DATAPOOL as a standard Fortran 77 COMMON block. For example.
The INCLUDE file is typically several thousand lines long.
The original DATAPOOL declarations are replaced in the code by INCLUDE
statements for this file. For example.
These changes are sufficient to convert the DATAPOOL construct to standard
Fortran.
However, some of the advantages of the original DATAPOOL construct are lost.
Also the entire DATAPOOL INCLUDE file is included in every sub-program which
references any DATAPOOL variable. This has the effect of adding several thousand
irrelevant declarations to the compilation of every sub-program. On some
systems, the impact on compilation time is significant.
The DATAPOOL Toolkit, DPTK
A set of tools was developed to manipulate the standard Fortran 77 DATAPOOL
in collaboration with Applied Dynamics
Internatonal Inc. The components are:
- FPT itself, which generates a text file which describes the DATAPOOL. The
file contains the address, data type and array bounds of each variable, and
comments to indicate the date of the entry, and the author of last change for
that variable. Initially, the author is FPT. This text file is used by the
remaining tools to find the attributes of the DATAPOOL variables. It is not
edited manually.
- DPEDIT: This is an editor which enables a user to add, delete or modify
DATAPOOL declarations. The editor automatically logs the time of modification
and the user.
- DPSCAN: This tool scans a program for DATAPOOL variables and inserts
declarations for them. The declarations are made in INCLUDE files, with one
INCLUDE file for every DATAPOOL variable.
An extract from a DATAPOOL text file is shown in this example.
This file is used by DPSCAN to generate INCLUDE statements for every DATAPOOL
variable, for example.
The INCLUDE files are maintained by the toolkit. They contain the
declarations of the DATAPOOL variables, and comments which indicate the date,
time and author of the last change. For example.
|