[previous] [up] [next]     [contents]
Next: The Summary Window Up: The Program Window Previous: Type Information

The Value Flow Browser

MrSpidey can also explain the derivation of each value set invariant, or type. This explanation describes how the flow of values through the program yields a particular value set invariant. The collection of all potential paths along which value may flow through the program forms the program's value flow graph. MrSpidey describes each edge in the data-flow graph as an arrow overlaid on the program text that connects the relevant points of the program. Because a large number of arrows would clutter the program text, these arrows are presented in a demand-driven fashion. Each expression's popup menu provides facilities for inspecting relevant portions of the value flow graph.

figure983
Figure 2.4: Parents of tree

All of the above options can be customized to show only the flow of certain values by selecting the appropriate set of values from the Filter menu. This option is particularly useful in conjunction with the Path to Source facility for inspecting the flow of an unexpected value through the program. For example, in the program sum, the unexpected value for tree is nil. Setting the filter to this value, and then selecting Path to Source for tree results in the explanation described in figure 2.5.

figure997
Figure 2.5: Flow of nil

Clicking on the head or tail of an arrow with the left mouse button moves the current focus to the term at the other end of the arrow, which can be useful for following the flow of values through large programs. Clicking on the head or tail of an arrow with the right mouse button deletes the arrow. Alternatively, selecting Clear|Arrows deletes all arrows in the buffer.


[previous] [up] [next]     [contents]
Next: The Summary Window Up: The Program Window Previous: Type Information

PLT