next up previous contents
Next: ZEBRA Up: Packages Previous: Packages   Contents

EXTRACT

EXTRACT is a software tool developed by the SOUDAN II PDK experiment and successfully used by them to handle their off-line software. It provides two facilities: a one-shot pre-compiler and simple source module management.

The pre-compiler allows for modest program variants and is well suited to the problem that besets almost all collaborative software: machine dependent differences in the extensions to the FORTRAN 77 standard. All code variations must appear at the point in the code where they are required, EXTRACT simply switches them on and off by adding or removing a leading comment character as required by the user. For example consider the following code fragment:-

 
      *IF VAX THEN
            OPEN(UNIT=1,READONLY,STATUS='OLD')
      *ELSEIF APOLLO THEN
      *$      OPEN(UNIT=1,READONLY,STATUS='READONLY')
      *ELSE
      *$      OPEN(UNIT=1,STATUS='OLD')
      *ENDIF

This code has been passed through EXTRACT with the VAX option selected. The VAX variant is active and the other versions, one for the APOLLO and another for any other type of machine, are disabled.

The beauty of this system is its simplicity; having passed the code through EXTRACT once it need not be done again, regardless of how often the code is compiled, until a new version of the code is acquired. Also, as all variants remain visible, any modification to one variant should remind the programmer to consider the other variants as well.

In order to provide source module management, EXTRACT needs to know where each module starts and ends and the name of each module. This is done by adding FILE and ENDFILE lines to the source. The format of the lines can be chosen so that they appear as comments in the source language. So, for example, for FORTRAN source the lines are *FILE and *ENDFILE. The term source not only covers FORTRAN but can include DCL command procedures, UNIX script files and documentation e.t.c. Keywords on the FILE line define, amongst other things, the module name, the language, the associated library and the last modified date.

EXTRACT operates on a single input file containing an arbitrary number of source modules. It can select modules by an combination of name, library, language or date and output to a single file or to multiple files. A typical request is to select all FORTRAN77 modules and to write each to a separate file each with the name: module-name.for.

EXTRACT is described in more detail in the Programmer's Manual. For a complete list of EXTRACT options available see:-

...doc/soft/extract_options.doc


next up previous contents
Next: ZEBRA Up: Packages Previous: Packages   Contents
sno Guest Acct 2009-09-09