Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

The Unravel Project - An Example

This page describes using unravel on a simple example and displays samples of the user interface control panels.

  1. 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.  

  2. 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.  

  3. Make the directory containing the program to analyze the current directory.  

  4. Execute the command: unravel. The unravel command displays an X Window based control panel called the main panel. 

  5. Click on the Run Analyzer usa-button from the main panel. This displays the analyzer control panel. 

  6. 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. 

  7. 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. 

  8. 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. 

  9. The user selects slicing criteria and displays the slices.

Contact Information

Jim Lyle

National Institute of Standards and Technology
Information Technology Laboratory
Mail Stop 8970
Gaithersburg, MD 20899

(Voice) +1(301)975-3270
(Fax) +1(301)926-3696
(Internet) jlyle [at] nist.gov (jlyle[at]nist[dot]gov)

Created December 5, 2011, Updated August 25, 2016