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 of the source files 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 reanalyzing source files where possible. When each referenced unit file is first analyzed, MrSpidey:
The use of constraint files doesn't actually reduce the time required for the first analysis. However, on subsequent analyses, MrSpidey can use the saved constraint files to avoid having to reanalyze referenced unit files that have not been modified. This approach substantially reduces reanalysis times.
Once the analysis is completed, MrSpidey displays a version of 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 you to select the file you'd like to inspect. A typical dialog box is contained in figure 3.1.
Figure 3.1: The File|Open ... dialog box
Alternatively:
In multi-file programs, the source (or destination) of an arrow may sometimes refer to a program point in a separate file. In this case MrSpidey draws an arrow originating (or terminating) in the left margin of the program. If a margin arrow is painted red, then it refer to an expression in a file that has not yet been loaded, and clicking on the arrow provides the option to load the file:see figure 3.2.
Figure 3.2: Source in an unloaded file
A margin arrows that is painted blue refers to an expression in a file that has been loaded: see figure 3.3. Clicking on such a blue arrow provides the option to zoom to and highlight the term at the other end of the arrow, as shown in figure 3.4. These facilities can be very useful for following the flow of values through multi-file programs.
Figure 3.3: Source in another loaded file
Figure 3.4: The highlighted source in the other file