public class Slicer extends Object
Modifier and Type | Class and Description |
---|---|
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
|
static class |
Slicer.SliceProblem
Tabulation problem representing slicing
|
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
static boolean |
VERBOSE |
Constructor and Description |
---|
Slicer() |
public static final boolean DEBUG
public static final boolean VERBOSE
public static Collection<Statement> computeBackwardSlice(Statement s, CallGraph cg, PointerAnalysis<InstanceKey> pa, Slicer.DataDependenceOptions dOptions, Slicer.ControlDependenceOptions cOptions) throws IllegalArgumentException, CancelException
s
- a statement of interestCancelException
IllegalArgumentException
public static Collection<Statement> computeForwardSlice(Statement s, CallGraph cg, PointerAnalysis<InstanceKey> pa, Slicer.DataDependenceOptions dOptions, Slicer.ControlDependenceOptions cOptions) throws IllegalArgumentException, CancelException
s
- a statement of interestCancelException
IllegalArgumentException
public static Collection<Statement> computeBackwardSlice(SDG sdg, Statement s) throws IllegalArgumentException, CancelException
public static Collection<Statement> computeForwardSlice(SDG sdg, Statement s) throws IllegalArgumentException, CancelException
public static Collection<Statement> computeBackwardSlice(SDG sdg, Collection<Statement> ss) throws IllegalArgumentException, CancelException
protected static Collection<Statement> computeSlice(SDG sdg, Collection<Statement> ss, boolean backward) throws CancelException
ss
- a collection of statements of interestCancelException
public Collection<Statement> slice(SDG sdg, Collection<Statement> roots, boolean backward) throws CancelException
sdg
- governing system dependence graphroots
- set of roots to slice frombackward
- do a backwards slice?Statement
s found by the slicerCancelException
protected Slicer.SliceProblem makeSliceProblem(Collection<Statement> roots, ISDG sdgView, boolean backward)
public static Collection<Statement> computeBackwardSlice(Statement s, CallGraph cg, PointerAnalysis<InstanceKey> pointerAnalysis) throws IllegalArgumentException, CancelException
s
- a statement of interestCancelException
IllegalArgumentException