Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Slicer Class Reference

List of all members.

Public Methods

 Slicer (SootClass relClasses[], AnnotationManager annoManager)
 Slicer (SootClass relClasses[], Vector interestVector, AnnotationManager annoManager)
void buildPDG ()
PostProcessOnAnnotation getPostProcessOnAnnotation ()
void postProcessingOnAnnotation ()
boolean preProcessing (Vector sliceCriterionVector)
void printCriterion ()
SootClass[] result ()
void run () throws Exception
void slicing ()

Static Public Attributes

boolean Turn_On_BOFA = true
edu ksu cis bandera bofa Analysis BOFA_Analysis = null
AnnotationManager annManagerForSlicer = null
Set reachableMethods
Set unreachableClasses
Map sootMethodInfoMap = null
SliceTraceNode sliceTraceRoot
Set allSliceTraceNodes

Private Methods

void basicInformation ()
void buildInterfaceAndSuperClassMap ()
void collectOriginalMethods ()
void collectReachableMethods ()
void dumpJimpleCode (SootClass dumpedClasses[], String extension)
Set getInvokedMdsFrom (InvokeExpr invokeExpr, SootMethod enclosingMethod)
Set getInvokedMdsFrom (Stmt stmt, SootMethod enclosingMethod)
Set getStartingMethods ()
boolean haveStaticFields (SootClass sootClass)
void moreInformation ()
void outputResidualCls (boolean sliced)
void postProcessing ()
void slicingMethods ()

Static Private Methods

boolean isMethodOfObject (SootMethod sm)
boolean isObjectClass (SootClass sc)
boolean isRemovableClass (SootClass sootClass, Set residualSootClasses)
void printJimpleClass (SootClass sClass)

Private Attributes

PostProcessOnAnnotation postProcessOnAnnotation = null
SootClass residualSootClassArray []
List classInfoList = new ArrayList()
AnnotationManager cfanns
Vector sliceInterestVec

Static Private Attributes

Map interfaceImplementedByMap = null
Set originalMethods = null
int classNum
SootClass relevantClassArray []

Detailed Description

The entry class of the slicer. This class shows the program structure of the slicer: Usage of this class:

Slicer slicer = new Slicer(sootClassArray, sliceCriterion, annotationManager);
slicer.run();
... ...
SootClass sliceResult[] = slicer.result();

Definition at line 66 of file Slicer.java.


Constructor & Destructor Documentation

Slicer::Slicer SootClass   relClasses[],
AnnotationManager   annoManager
[inline]
 

The constructor for the case that there is NO slicing criterion specified by users.

Parameters:
relClasses   an array of SootClass which will be analysed and sliced by the slicer.
annoManager   annotation manager.

Definition at line 128 of file Slicer.java.

Slicer::Slicer SootClass   relClasses[],
Vector   interestVector,
AnnotationManager   annoManager
[inline]
 

The constructor for the case that there is slicing criterion specified by users.

Parameters:
relClasses   an array of SootClass which will be analysed and sliced by the slicer.
interestVector   slicing criterion. A Vector of SliceInterest.
annoManager   annotation manager.

Definition at line 159 of file Slicer.java.


Member Function Documentation

void Slicer::basicInformation   [inline, private]
 

Build up classInfoList and interfaceImplementedByMap for each class.
Set value for Slicer.classNum.

Definition at line 169 of file Slicer.java.

Referenced by buildPDG(), and run().

void Slicer::buildInterfaceAndSuperClassMap   [inline, private]
 

Insert the method's description here. Creation date: (00-10-21 1:16:30)

Definition at line 208 of file Slicer.java.

Referenced by buildPDG(), and run().

void Slicer::buildPDG   [inline]
 

Build PDG without slicing criterion: basicInformation(), moreInformation().
This method is only used by the browser of PDG.

Definition at line 258 of file Slicer.java.

void Slicer::collectOriginalMethods   [inline, private]
 

Collect all methods with slicing criterion into originalMethods.

Definition at line 275 of file Slicer.java.

Referenced by buildPDG(), and run().

void Slicer::collectReachableMethods   [inline, private]
 

Insert the method's description here. Creation date: (00-10-21 0:03:47)

Definition at line 288 of file Slicer.java.

Referenced by buildPDG(), and run().

void Slicer::dumpJimpleCode SootClass   dumpedClasses[],
String   extension
[inline, private]
 

Dump a set of soot classes into files with provided extension.
This method is only for internal debugging.

Parameters:
dumpedClasses   an array of soot classes being dumped.
extension   a string for file extension.

Definition at line 341 of file Slicer.java.

Set Slicer::getInvokedMdsFrom Stmt   stmt,
SootMethod   enclosingMethod
[inline, private]
 

Insert the method's description here. Creation date: (00-10-21 1:38:48)

Returns:
ca.mcgill.sable.util.Set
Parameters:
stmt   ca.mcgill.sable.soot.jimple.Stmt

Definition at line 399 of file Slicer.java.

Set Slicer::getInvokedMdsFrom InvokeExpr   invokeExpr,
SootMethod   enclosingMethod
[inline, private]
 

Insert the method's description here. Creation date: (00-10-21 1:48:49)

Returns:
ca.mcgill.sable.util.Set
Parameters:
invokeExpr   ca.mcgill.sable.soot.jimple.InvokeExpr

Definition at line 362 of file Slicer.java.

Referenced by collectReachableMethods(), and getInvokedMdsFrom().

PostProcessOnAnnotation Slicer::getPostProcessOnAnnotation   [inline]
 

Insert the method's description here. Creation date: (00-12-6 16:17:08)

Returns:
edu.ksu.cis.bandera.pdgslicer.PostProcessOnAnnotation

Definition at line 425 of file Slicer.java.

Set Slicer::getStartingMethods   [inline, private]
 

Insert the method's description here. Creation date: (00-10-21 0:09:43)

Returns:
ca.mcgill.sable.util.Set

Definition at line 433 of file Slicer.java.

Referenced by collectReachableMethods().

boolean Slicer::haveStaticFields SootClass   sootClass [inline, private]
 

Insert the method's description here. Creation date: (00-12-18 10:59:00)

Returns:
boolean
Parameters:
sootClass   ca.mcgill.sable.soot.SootClass

Definition at line 487 of file Slicer.java.

Referenced by basicInformation().

boolean Slicer::isMethodOfObject SootMethod   sm [inline, static, private]
 

Insert the method's description here. Creation date: (00-10-26 20:25:41)

Returns:
boolean
Parameters:
sm   ca.mcgill.sable.soot.SootMethod

Definition at line 502 of file Slicer.java.

Referenced by slicingMethods().

boolean Slicer::isObjectClass SootClass   sc [inline, static, private]
 

Insert the method's description here. Creation date: (00-10-31 9:27:42)

Returns:
boolean
Parameters:
sc   ca.mcgill.sable.soot.SootClass

Definition at line 513 of file Slicer.java.

Referenced by buildInterfaceAndSuperClassMap(), getStartingMethods(), and isMethodOfObject().

boolean Slicer::isRemovableClass SootClass   sootClass,
Set   residualSootClasses
[inline, static, private]
 

Insert the method's description here. Creation date: (00-10-31 16:28:43)

Returns:
boolean
Parameters:
sootClass   ca.mcgill.sable.soot.SootClass

Definition at line 524 of file Slicer.java.

Referenced by outputResidualCls().

void Slicer::moreInformation   [inline, private]
 

Analyse program for building PDG:
MethodCallAnalysis --- construcing naive call graph,
MODREFAnalysis() --- data flow for fields in classes,
buildMethodPDG(cfanns) --- control and data dependences,
InterClassAnalysis --- other dependences.

Definition at line 544 of file Slicer.java.

Referenced by buildPDG(), and run().

void Slicer::outputResidualCls boolean   sliced [inline, private]
 

Dump slicing result into residualSootClassArray.
Print out summary information on the slicing result.

Definition at line 566 of file Slicer.java.

Referenced by postProcessing(), and preProcessing().

void Slicer::postProcessing   [inline, private]
 

Insert the method's description here. Creation date: (00-12-5 10:09:36)

Definition at line 635 of file Slicer.java.

Referenced by run().

void Slicer::postProcessingOnAnnotation   [inline]
 

Insert the method's description here. Creation date: (00-12-5 10:09:36)

Definition at line 650 of file Slicer.java.

boolean Slicer::preProcessing Vector   sliceCriterionVector [inline]
 

Insert the method's description here. Creation date: (00-12-5 10:11:32)

Definition at line 660 of file Slicer.java.

Referenced by run().

void Slicer::printCriterion   [inline]
 

Print out slicing criterion for each class and method.

Definition at line 685 of file Slicer.java.

Referenced by preProcessing().

void Slicer::printJimpleClass SootClass   sClass [inline, static, private]
 

Print out Jimple code of a soot class.
This method is only for internal debugging.

Parameters:
sClass   a soot class being printed.

Definition at line 707 of file Slicer.java.

SootClass [] Slicer::result   [inline]
 

Get result of slicing as an array of SootClass.

Definition at line 715 of file Slicer.java.

void Slicer::run   [inline]
 

Start the slicer after creating an object of Slicer.
Four steps are included in this method:

  • basicInformation --- Collect some basic information of program;
  • PreProcess --- Determine slicing criterion;
  • moreInformation() --- Build program dependency graph for each method in the program;
  • slicing() --- Slice each method in the program, construct residual program, and dump residual program.

Definition at line 730 of file Slicer.java.

void Slicer::slicing   [inline]
 

Slice each method need to be sliced --- slicingMethods();
Postprocess for slicing --- PostProcess.
Dump slicing result --- outputResidualCls.

Definition at line 767 of file Slicer.java.

Referenced by run().

void Slicer::slicingMethods   [inline, private]
 

Slice each method with SlicingMethod.

The process of slicing is fix point reaching process:
(UP U DOWN)*( slicing criterion)
where UP and DOWN is constraint call graph driven up and down.

Definition at line 786 of file Slicer.java.

Referenced by slicing().


Member Data Documentation

Set Slicer::allSliceTraceNodes [static]
 

a set of SliceTraceNode.

Definition at line 97 of file Slicer.java.

List Slicer::classInfoList = new ArrayList() [private]
 

a list of ClassInfo.

Definition at line 86 of file Slicer.java.

int Slicer::classNum [static, private]
 

number of involved classes.

Definition at line 113 of file Slicer.java.

Map Slicer::interfaceImplementedByMap = null [static, private]
 

a map from SootClass to a Set of SootClass, representing that one interface is implemented by a set of classes, or one abstract class is implemented(extended) by a set of classes.

Definition at line 104 of file Slicer.java.

Set Slicer::originalMethods = null [static, private]
 

a Set of MethodInfo such that the corresponding method has slicing criterion.

Definition at line 109 of file Slicer.java.

Set Slicer::reachableMethods [static]
 

a set of reachable SootMethod.

Definition at line 74 of file Slicer.java.

SootClass Slicer::residualSootClassArray[] [private]
 

an array for residual classes.

Definition at line 82 of file Slicer.java.

Vector Slicer::sliceInterestVec [private]
 

slicing criterion --- a vector of SliceInterest.

Definition at line 119 of file Slicer.java.

Map Slicer::sootMethodInfoMap = null [static]
 

a map from SootMethod to MethodInfo, for all methods of all involved classes.

Definition at line 92 of file Slicer.java.

Set Slicer::unreachableClasses [static]
 

a set of unreachable SootClass.

Definition at line 78 of file Slicer.java.


The documentation for this class was generated from the following file:
Generated at Thu Feb 7 07:21:24 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001