com.ibm.wala.ipa.slicer
Class Slicer

java.lang.Object
  extended by com.ibm.wala.ipa.slicer.Slicer

public class Slicer
extends java.lang.Object

A demand-driven context-sensitive slicer. This computes a context-sensitive slice, building an SDG and finding realizable paths to a statement using tabulation. This implementation uses a preliminary pointer analysis to compute data dependence between heap locations in the SDG.


Nested Class Summary
static class Slicer.ControlDependenceOptions
          options to control control dependence edges in the sdg
static class Slicer.DataDependenceOptions
          options to control data dependence edges in the SDG
 
Field Summary
static int BAIL_OUT
           
static boolean DEBUG
           
static boolean VERBOSE
           
 
Constructor Summary
Slicer()
           
 
Method Summary
static java.util.Collection<Statement> computeBackwardSlice(SDG sdg, Statement s, CallGraph cg, PointerAnalysis pa, Slicer.DataDependenceOptions dOptions, Slicer.ControlDependenceOptions cOptions)
          Use the passed-in SDG
static java.util.Collection<Statement> computeBackwardSlice(Statement s, CallGraph cg, PointerAnalysis pointerAnalysis)
           
static java.util.Collection<Statement> computeBackwardSlice(Statement s, CallGraph cg, PointerAnalysis pa, Slicer.DataDependenceOptions dOptions, Slicer.ControlDependenceOptions cOptions)
           
static java.util.Collection<Statement> computeForwardSlice(SDG sdg, Statement s, CallGraph cg, PointerAnalysis pa, Slicer.DataDependenceOptions dOptions, Slicer.ControlDependenceOptions cOptions)
          Use the passed-in SDG
static java.util.Collection<Statement> computeForwardSlice(Statement s, CallGraph cg, PointerAnalysis pa, Slicer.DataDependenceOptions dOptions, Slicer.ControlDependenceOptions cOptions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG
See Also:
Constant Field Values

VERBOSE

public static final boolean VERBOSE
See Also:
Constant Field Values

BAIL_OUT

public static final int BAIL_OUT
See Also:
Constant Field Values
Constructor Detail

Slicer

public Slicer()
Method Detail

computeBackwardSlice

public static java.util.Collection<Statement> computeBackwardSlice(Statement s,
                                                                   CallGraph cg,
                                                                   PointerAnalysis pa,
                                                                   Slicer.DataDependenceOptions dOptions,
                                                                   Slicer.ControlDependenceOptions cOptions)
                                                            throws java.lang.IllegalArgumentException
Parameters:
s - a statement of interest
Returns:
the backward slice of s.
Throws:
java.lang.IllegalArgumentException

computeForwardSlice

public static java.util.Collection<Statement> computeForwardSlice(Statement s,
                                                                  CallGraph cg,
                                                                  PointerAnalysis pa,
                                                                  Slicer.DataDependenceOptions dOptions,
                                                                  Slicer.ControlDependenceOptions cOptions)
                                                           throws java.lang.IllegalArgumentException
Parameters:
s - a statement of interest
Returns:
the forward slice of s.
Throws:
java.lang.IllegalArgumentException

computeBackwardSlice

public static java.util.Collection<Statement> computeBackwardSlice(SDG sdg,
                                                                   Statement s,
                                                                   CallGraph cg,
                                                                   PointerAnalysis pa,
                                                                   Slicer.DataDependenceOptions dOptions,
                                                                   Slicer.ControlDependenceOptions cOptions)
                                                            throws java.lang.IllegalArgumentException
Use the passed-in SDG

Throws:
java.lang.IllegalArgumentException

computeForwardSlice

public static java.util.Collection<Statement> computeForwardSlice(SDG sdg,
                                                                  Statement s,
                                                                  CallGraph cg,
                                                                  PointerAnalysis pa,
                                                                  Slicer.DataDependenceOptions dOptions,
                                                                  Slicer.ControlDependenceOptions cOptions)
                                                           throws java.lang.IllegalArgumentException
Use the passed-in SDG

Throws:
java.lang.IllegalArgumentException

computeBackwardSlice

public static java.util.Collection<Statement> computeBackwardSlice(Statement s,
                                                                   CallGraph cg,
                                                                   PointerAnalysis pointerAnalysis)
                                                            throws java.lang.IllegalArgumentException
Parameters:
s - a statement of interest
Returns:
the backward slice of s.
Throws:
java.lang.IllegalArgumentException