This page describes using unravel on a simple example and displays samples of the user interface control panels.
- Receive orientation to source code. Determine all the source files and #include files that make up the program. The unravel user should have a general idea about global variables, procedures and program structure in the source code.
- Select slicing criteria. The unravel user should develop a list of questions about the source code that can be answered by program slicing. For each planned slice, the user should note the file name and line number where the slice should be computed along with the file name, where the variable of a slicing criterion is declared. For local variables, the procedure where the local variable is declared is needed for specifying the slicing criterion.
- Make the directory containing the program to analyze the current directory.
- Execute the command: unravel. The unravel command displays an X Window based control panel called the main panel.
- Click on the Run Analyzer usa-button from the main panel. This displays the analyzer control panel.
- Select source files to analyze, then click on the Analyze Selected Files usa-button to analyze each source file in turn. A message is displayed if any source files are not ANSI C. Click on the Exit Analyzer usa-button to return to the main panel.
- Review analysis results. The Last Analysis entry of the Review History menu of the main panel pops-up a summary of each analysis. If any source files are not ANSI C, an error message identifies the problem location. The source file needs to be brought into conformance with ANSI C by changing the source file and running the analyzer again.
- Click on the Run Slicer usa-button. If there is more than one program the program selection panel is displayed; click on the desired program to start the slicer on the selected program. If there is only one main program, the selection panel is skipped and the slicer starts on that program.
- The user selects slicing criteria and displays the slices.
National Institute of Standards and Technology
Information Technology Laboratory
Mail Stop 8970
Gaithersburg, MD 20899
(Internet) jlyle [at] nist.gov (jlyle[at]nist[dot]gov)