[previous] [up] [next]     [contents]
Next: Inter-File Arrows Up: PLT MrSpidey: Static Debugger Previous: MrSpidey Type Display Preferences

Analysis of Large Programs

Large programs in DrScheme are typically split into multiple source files, where each source file contains a unit (or unit/sig) expression. The main file for the program then refers to each source file via the reference-unit (or reference-unit/sig) form, and links these multiple units together into a single compound-unit that is then invoked.

To provide a quick turn-around time when statically debugging such programs, MrSpidey uses a componential analysis to avoid re-analyzing source files where possible. When each referenced unit file is first analyzed, MrSpidey:

  1. derives a constraint system that describes the data-flow behavior of the unit;
  2. simplifies the constraint system while preserving the externally-visible information about the unit's data-flow behavior; and
  3. saves the simplified constraint system in a constraint file named file.za (where file.ss is the name of the source file).

Although the use of constraint files does not reduce the time required for the first analysis, on subsequent analyses MrSpidey can use the saved constraint files to avoid the re-analysis of referenced unit files that have not been modified. This approach substantially reduces re-analysis times.

Once the analysis is completed, MrSpidey displays the program's main file with the usual static debugging mark-ups. To view other source files, select the File|Open ... option from the MrSpidey window. This option displays a dialog box containing all the program's source files, and allows the programmer to select the file of interest. A typical dialog box is contained in figure 4.1. Alternatively:

The File|Close All option closes all the MrSpidey windows.

figure1091
Figure 4.1: The File|Open ... dialog box





PLT