fpt and WinFPT Reference Manual - Command-line Commands
| SimCon Home
| Ref Manual Home |
MIGRATION
The objectives of a migration are:
-
to transfer a software system from one compiler, operating system and/or host computer to another;
-
to verify that the migrated code behaves in the same way on the new system as on the original system;
-
to understand any differences in performance of the code between the two systems.
It is recommended that any significant migration project should involve the following steps:
-
Plan Testing of the Migration.
Set up a test suite which can be run quickly and easily on the original host. The
record / replay facility may be valuable in setting this up.
-
Capture the files which make up the code and set up an fpt project.
It is recommended that the code is set up in 3 parallel directory structures, each with the same set of
sub-directories:
-
original_source: a directory tree which is write-protected and contains the
code to be migrated;
-
modified_source: a directory tree which will contain any files modified
by hand;
-
fpt_output: a directory tree which will contain the files re-written and
systematically modified by fpt.
Please see Keeping the Directory Structure for a
description of this procedure.
-
Run fpt to check that you have the entire program. If you do not, you will need to create or identify
replacements for missing components. The command
SHOW MISSING SUB-PROGRAMS shows the routines which fpt has not read.
-
Check the Code for Errors.
It is very important to do this before beginning the migration. Errors are very much less portable than
correct code. An array reference out-of-bounds, for example, may hit an entirely different location on the
new host and on the old. Correct any errors and re-test the code on the original system. This version of
the code, with the errors corrected, will form the base code for the migration and should replace the code
in the original_source directory tree.
Script the Commands to carry out the migration. As far as possible, maintaiin the code base which will compile
and run on the original host and generate the migrated code automatically.
Attempt to make no changes to the code which are not required for migration. Changing the structure of the code
may introduce errors or changes which will make comparison of the two systems more difficult.
The migration commands are described here.