The amount of time spent by application developers in order to acquire information on a code prior to performing substantial modifications, or converting it to run on a parallel platform, is considerable. In fact, this initial program analysis may take longer than the parallel port or adaptation itself. Although there are a few tools on the market which provide support for source program analysis, they generally do not provide the user with sufficient control over the amount and detail of information provided. The result is often a large amount of data, from which the relevant facts must be laboriously extracted.
This lack of appropriate support for the initial phases of program parallelization is commercially significant; it results in a much longer and more difficult porting effort. However, the kind of information which a user needs is often closely related to the kind of analysis which must be performed by automatic and semi-automatic restructuring tools.
ANALYST is a prototype software tool which attempts to fill this gap. It aims to give the user the means to specify and obtain the desired information on all or part of an application program. It provides a range of different kinds of information about a source program, at the level of detail desired, and in both text and graphical format. This work did not intend to develop new methods of analysis. Rather, it has focused on the issue of understanding just what kind of support a user needs, and both deriving and presenting information to the user in an appropriate and flexible manner. A signifant fraction of the implementation was dedicated to the development of a sophisticated graphical user interface, including tools for manipulating the graphical displays and for navigation within them. ANALYST is the result of a collaboration between tool developers at the VCPC and an experienced end user, who has been involved in the design from the outset.
The program and its parts are displayed in several forms:
The information currently presented to the user may involve one or more of these levels of representation; it includes
ANALYST thus has menu items for both local and global call site information, global equivalence information, and local and global common block usage information. In addition to the above there are menu entries for such things as printing displays, and for viewing the source code for additional program units, searching for text strings, and jumping to locations in the source code.
A
transformation menu
is included in the functionality of the system:
Transformations may be applied to the source code from within ANALYST. This
includes the ability to apply them to all statements where they may be used, or to
a specific statement or region of code. The results are immediately displayed, and
the corresponding information is updated.
The text and graphical display forms of information representation are suitably linked where appropriate. If, for example, a call graph node representing a specific program unit is clicked on, the corresponding source text is shown. Colour coding provides some information at a glance, for instance, indicating nodes containing I/O statements within the flow graph. Clicking on a node related to program statements suffices to highlight the corresponding text in the source code display. Some kinds of information are shown graphically by highlighting, emphasizing or colour-coding the corresponding nodes or arcs, or by creating a new graph. Information may also be appended to arcs in text form. In some cases, additional details are retrieved by clicking on the colour-coded or newly created node or arc.
The user may navigate graphs quickly via zoom functions, and a so-called slider, which also displays the area of the graph currently visible on the screen. Nodes of a graph may be moved by the user; subgraphs may be selected and extracted from a display, possibly in order to obtain additional information for this set of nodes and arcs. Some features of the graphical displays may be customized via an Options menu.
ANALYST is being created using X Windows and Motif; it runs on a
variety of popular workstations. ANALYST has been designed as a
stand-alone tool, but it is also part of the
Vienna Fortran Compilation System,
from which the front end and the transformation facilities come.
New functionality is still being added to ANALYST. This includes additional means of viewing the structure of a program, and will include information on the parts of an array which are accessed in a program unit. In particular, support for the selection of ALIGNMENT and DISTRIBUTION in preparation to the creation of HPF code will be available in a future version. The (sequential) profiler from VFCS can also be included in the realization of this system.