This is a brief description of the VPOISO tool and its usage. For more details on VPOISO and the theory of its operation , please see Automatic Isolation of Compiler Errors by David. B. Whalley, University of Florida.
Index
1. Background
2. Required Files
3. Reserved File Names
4. Running VPOISO
VPOISO is a tool that is used to isolate bugs in the vpo optimizer during development. Since even a small source program could easily undergo thousands of transformations during optimization when compiled, manual attempts to figure out the transformation in which a bug was introduced is very time consuming. VPOISO, given basic information about an application that is erroneously optimized, automates the process of finding the first optimization error which is manifest in the applications output. It does so by binary searching the total range of transformations. It uses the output of the application to drive the search. By comparing this output to a reference output, which is correct, it determines whether the application was correctly compiled and optimized. VPOISO does not isolate compiler errors (i.e., errors found in all phases prior to optimization).
Note: VPOISO requires that vpo be compiled with the VPOISO conditional compilation flag
turned on.
VPOISO works with three files:
This file contains a description of the applications to be run, how they are to be run,
etc. The format of the file is a command followed by a colon, followed by arguments for
the command The file has the format shown in the table below. All the commands are
case sensitive, required and they must appear in the order shown in isolate.txt. The
indication optional in the description means the argument for the command may be left
blank.
Command |
Description |
cexfiles | List of cex source files for application, separated by space and terminated with #. Cex files can be generated with vpolcc using the -k command line switch.. |
link command | Command used to generate executable fiel for application. |
maximum time | Maximum time to run VPOISO on application in minutes. (optional) |
execute command | Command to invoke application (including any command line arguments and input redirection). |
desired output file | File containing the output from the application when it runs correctly. This is used as the reference against which the actual output of the application will be compared for correctness. |
actual output file | File that should contain the actual output generated by the application each time VPOISO runs it. |
compilation flags | Switches to be passed on to vpo. (optional) |
disregard string | A maximum of ten 60 character strings that may be found in the desired or actual output and that should be ignored in the comparison of the two files to determine whether the application ran correctly. (optional) |
An example of a isolate.txt file is shown below.
cexfiles: join #
link command: cc -o join.vp join.o
maximum time: 10
execute command: join.vp -j1 4 -j2 3 -o 1.2 2.1 1.6 -t: /etc/passwd /etc/group
> tmp.out
desired output file: join.out
actual output file: tmp.out
compilation flags: LVGOCMSFA
disregard strings:
This is a file generated by vpo when VPOISO invokes it for the first time on the application specified in isolate.txt. The contents of this file simply tell VPOISO the number of transformations that are made by vpo for each function in the application code when all optimization flags are turned on . It is read by VPOISO to know the total number of transformations possible and to communicate this information to the user.
An example of a numtrans.txt file follows. In this case there is a single .cex source
file containing three functions. The function main contains 569 transformations with all
optimizations run to their full extent, function dumm1 has 204 transformations, etc.
join : main : 569
join : dummy1 : 204
join : dummy2 : 78
Note: vpo does not by default generate the numtrans.txt file. It must be invoked
with the -TD switch to have it create this file.
This is generated by VPOISO based on the contents of the numtrans.txt file. The list and order of functions will be identical to those in numtrans.txt. However, the value associated with each function name is the maximum number of transformations that vpo should perform for the corresponding function. This in effect is how VPOISO zeroes in on the culprit transformation that causes a vpo bug.
An example of a maxtrans.txt file, corresponding to the numtrans.txt file example above, follows. In the next invocation of vpo (from VPOISO or using the -TM switch), vpo would perform 100 transformations for main, 0 transformations for the other two functions and stop.
join : main : 100
join : dummy1 : 0
join : dummy2 : 0
Note: VPO by default will perform all transformations for each function in
the application code. To control the number of transformations it performs for each
function, it must be invoked with the -TM switch.
The files disregard.txt and desired.txt are used by VPOISO. Therefor, no useful files
with these names should be contained in the directory in which VPOISO is invoked as they
will be destroyed.
Before you run VPOISO:
VPOISO is designed to allow you to "fake out" the result of the output
comparison between the desired and actual output file. The result of the comparison drives
VPOISO's next step and at which optimization transformation it will make vpo stop. Thus,
the prompting allows for pausing between VPOISO's binary search for the culprit
transformation in the optimization. Once you launch VPOISO, you will prompted to
foce the comparison to fail, pass, allow the comparison or to always allow the comparison
without prompting. You enter f, p, c or d, respectively for each option.
Last Updated: June 10, 2000 (jwd@virginia.edu)