It is sometimes necessary to release proprietary or sensitive source code to third
parties, so that it can be compiled and run in a new environment. You may, for example,
need to send code examples to a compiler vendor to analyse a problem. FPT can strip
comments, remove formatting and rename symbols so that the code is un-maintainable,
but still compiles and runs with its original meaning.
This example code is part of an (unclassified) F16 aircraft model (Thanks are
due to John Hall, John Burnell and Gordon Dickman at DERA Bedford for its use).
If this model is to be linked against external libraries, the global names, i.e.
the names of COMMON blocks and sub-programs, must be preserved.
The command to FPT is %hide names:2. The comments
are stripped, the formatting is removed and local names are
made meaningless.
See here.
If the program does not call external routines (other than intrinsic functions)
all of the names may be changed. The command
is %hide names:3. The
result is shown here.
The modified code still compiles, links and runs in exactly the same way as the
original. However the effort required to recover the meaning and to make the code
maintainable would be prohibitive.
|