Welcome to McGill's Web based Program Browser.
The browser supports both simple scanning of the program
text and examining the data flow information associated
with each statement/function in the program. It uses
three frames. The top frame displays a menu of the flow
information available, and one has to simply click at
the appropriate link to view it. The left frame displays
the program in simplified form. The right frame is used
as scratch space, where the flow information is actually displayed.
The top frame currently shows the links for the following
types of information:
- Stack R/W Sets: Clicking at this link displays
the points-to based stack read/write sets.
- Heap R/W Sets: Clicking at this link displays the
connection-based heap read/write sets.
- Field-Sets: Clicking at this link displays the
set of structure fields accessed with respect to different sets
of heap pointers.
- Connection: Clicking at this link displays the
connection relationships with respect to the dereferenced
pointers at a given statement.
- Points-to: Clicking at this link displays
the points-to
relationships for the dereferenced pointers at a given statement.
- Show Intro: Clicking at this link displays
this document on the right frame for quick reference.
After clicking at one of the above links, one can subsequently
click at a statement or a function in the program, to view the
appropriate flow information for it. The information will be
displayed on the right frame. Connection and points-to information
is relevant only for basic statements that involve an indirect
reference. Stack and heap read/write sets and field sets can be viewed
for a basic statement, a
control statement or an entire function. For the latter two cases,
relevant sets over the entire control statement or function
are displayed.
Heap read/write sets are shown in terms of anchor handles
and structure fields. An anchor handle is simply a program variable
subscripted with an SSA number. The source program in
the left frame shows each variable subscripted with its current
SSA number. SSA numbers are not displayed when an address
operation is applied on a variable as its value is not being used.
In the heap read/write sets, a variable subscripted with SSA number zero
represents its anchor at the entry of the given function.
The source program also shows each call to a user-defined function
subscripted with a call expression number: the nth
call-site in a function gets the call expression number n.
Each heap related call-site (with call expression number n), has
two anchor handles associated with it:
cs_readn and cs_writen. The two
anchor handles summarize the heap locations read/written by the
function call.
Field sets are provided in addtion to heap read/write sets to show
the fields accessed with respect to a given pointer variable
across a program segment, as opposed to with respect to a specific
anchor of the variable. For functions, field sets are show only
with respect to anchor handles for parameters and global variables.
The stack read/write sets use several symbolic names. Names like
al_string_cst, al_file_ptr_target are used to denote reads/writes
of string constants or files. Symbolic names like 1-p, 1-q are
used to denote local variables of the callee whose address
is passed to the parameters p and q, and which can be accessed
via one level indirection of the respective parameters.
Similar symbolic names may be seen while viewing points-to or
connection information.
There are also a few links to facilitate program browsing itself:
clicking at a function prototype, or at a function call leads one
to the body of the function. A function call typically has two
links: one for the CGI script that displays the flow information,
and another to the body of the function called. The former
is located at the name of the function, and the latter at the
position of the arguments for a simple call, or at the assignment
operator for a call from an assignment statement. Also functions
that are never called in the program, are shown in italics.
One can browse the programs for bitonic sort,
perimeter calculation,
electromagnetic simulation and other
benchmarks from our suite, by following the
links below. Since each statement/function
in the program has a link to a CGI script, the programs are viewed
best by turning the option for underlining the links
off (from General
Preferences). Also, the user may sometimes get unexpected results
if the tool is simultaneously used by another user from the same
remote host. I am working on fixing this problem.
Please send any suggestions for improving the tool or any problems in
using it via e-mail to
ghiya@acaps.cs.mcgill.ca
.
Note that since the tool uses frames, it would not work for browsers
that do not support frames.