Department of Computer
Science The University of Arizona Tucson, Arizona IPD153a March 26, 1996 http://www.cs.arizona.edu/icon/docs/ipd153.htm |
Shrub
is a visualization program that displays the tree resulting
from procedure activity in Icon programs. It obtains its data from an event
stream [2]. Procedure events are processed and displayed in a window, with
Shrub interacting with the user primarily through the mouse [3].Shrub
keeps track of how many times each procedure has been
resumed (with the first call being 1). Both this information and the names
of procedures can be displayed or hidden by clicking on buttons.Appendix A contains a user's manual for Shrub. Examples of displays produced bystate color called black returning green failing red suspended grey resumed blue removed orange
Shrub
are contained in Appendix B.
Shrub
could be enhanced. Procedure
events are the natural basis for updating the display of a call tree, but
it may be hard for a user to find a desired point of execution in terms
of procedure events. In some cases, one procedure or several procedures
out of many may be of interest. A way of specifying procedure activity selectively
would be useful. Other possible enhancements include more control over the
display itself in terms of colors and layout.Shrub
also could be adapted to other uses. Expressions in Icon
have the same evaluation characteristics as procedures: They can return,
fail, or suspend. String scanning has similar characteristics. Both of these
activities can be visualized using the same model as used by Shrub
.
The Icon Programming
Language, Prentice-Hall, Inc., Englewood Cliffs, NJ, second edition,
1990.
Writing Icon Program Execution Monitors,
The Univ. of Arizona Icon Project Document IPD264,
1996.
Graphics
Facilities for the Icon Programming Language; Version 9.1, The Univ.
of Arizona Icon Project Document IPD268,
1996.
Shrub
is called as
whereshrub [-skip n] [-delay t] file
file
is an event stream. If no file is specified, Shrub
reads the event stream from standard input.-skip n
This option causes Shrub
to skip to procedure event
n
before displaying the call tree. This may also be done during
the execution of Shrub
by pressing the rightmost mouse button.
See the details below.-delay t
This option causes Shrub
to update the screen with
the next procedure event every t
thousandths of a second. For
example, -delay 500
causes a delay of one half second in updating
the screen between events. In the absence of this option, the display is
not updated until one of the two leftmost mouse buttons is pressed.
quit
button.
Shrub
displays. The
program that produced these displays is a recursive-descent parser with
procedures for matching nonterminal symbols. The relative "bushiness"
of the call trees reflects suspended procedures matching sequences of nonterminal
symbols.