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

InterClassAnalysis Class Reference

List of all members.

Public Methods

 InterClassAnalysis (List cl)

Private Methods

void checkOneMdForInsFdsNotInCurrentClass (Map interferenceMap, MethodInfo methodInfo, Set interferRefList)
void checkOneMethod (Map interferenceMap, MethodInfo methodInfo, Set interferRefList, boolean haveInstanceField)
Set containsField (Set insFdSet, SootField sf)
void initInterferenceMap (Set fieldRefList, Map interfMap)
void interferenceDependence ()
Map interferForMethod (MethodInfo currentMethod)
void lookupInterferDefStmt (ClassInfo classInfo, Map interferenceMap, MethodInfo currentMdInfo)
void lookupReadyDependStmt (Map readyMap, List methodsList, MethodInfo currentMethodInfo, List lockPairList, List waitStmtList)
void readyDependence ()
Map readyForMethod (MethodInfo currentMethod, List lockPairList, List waitStmtList)

Private Attributes

List classList

Detailed Description

This class is for the analysis of ready dependence and interference dependence.

Definition at line 49 of file InterClassAnalysis.java.


Constructor & Destructor Documentation

InterClassAnalysis::InterClassAnalysis List   cl [inline]
 

This constructor calls
(1) readyDependenc()
(2) interferenceDependence().

Parameters:
cl   a list of ClassInfo.'

Definition at line 63 of file InterClassAnalysis.java.


Member Function Documentation

void InterClassAnalysis::checkOneMdForInsFdsNotInCurrentClass Map   interferenceMap,
MethodInfo   methodInfo,
Set   interferRefList
[inline, private]
 

Check (find out) all definitions in one method for each field reference in the set interferRefList. And put those definitions into the interference map.

Parameters:
interferenceMap   interference map.
methodInfo   method to be checked.
interferRefList   a list of DataBox represents a reference of field.

Definition at line 78 of file InterClassAnalysis.java.

Referenced by interferForMethod(), and lookupInterferDefStmt().

void InterClassAnalysis::checkOneMethod Map   interferenceMap,
MethodInfo   methodInfo,
Set   interferRefList,
boolean   haveInstanceField
[inline, private]
 

Check all definitions in one method such that define values which are used in an element of interferRefList. And put those definitions intp interference map.

Parameters:
interferenceMap   interference map from Stmt to a List of InterferStmt.
methodInfo   method be checked.
interferRefList   a list of DataBox which represents a reference of field.
havaInstanceField   control if the check will include instance field references.

Definition at line 120 of file InterClassAnalysis.java.

Referenced by interferForMethod(), and lookupInterferDefStmt().

Set InterClassAnalysis::containsField Set   insFdSet,
SootField   sf
[inline, private]
 

Get all field references from a set with the given field sf.

Returns:
a set of InstanceFieldRef.
Parameters:
insFdSet   a set of InstanceFieldRef.
sf   a sootfield.

Definition at line 155 of file InterClassAnalysis.java.

Referenced by checkOneMdForInsFdsNotInCurrentClass().

void InterClassAnalysis::initInterferenceMap Set   fieldRefList,
Map   interfMap
[inline, private]
 

Initialize interference map with given set.

Parameters:
fieldRefList   a set of field reference DataBox.
interfMap   interference map to be initialized.

Definition at line 173 of file InterClassAnalysis.java.

Referenced by interferForMethod().

Map InterClassAnalysis::interferForMethod MethodInfo   currentMethod [inline, private]
 

Analyse intereference dependence for one method by calling
(1) initInterferenceMap();
(2) (Map,MethodInfo,Set, boolean) checkOneMethod(); checkOneMethodForStaticBasedFd()};
(4) checkOneMdForInsFdsNotInCurrentClss();
(5) lookupInterferDefStmt().

Parameters:
currentMethod   current method.
Returns:
a map of interference dependence from Stmt to a List of InterferStmt.

Definition at line 213 of file InterClassAnalysis.java.

Referenced by interferenceDependence().

void InterClassAnalysis::interferenceDependence   [inline, private]
 

Analyse interference dependence for each method by calling interferForMethod().

Definition at line 184 of file InterClassAnalysis.java.

Referenced by InterClassAnalysis().

void InterClassAnalysis::lookupInterferDefStmt ClassInfo   classInfo,
Map   interferenceMap,
MethodInfo   currentMdInfo
[inline, private]
 

Find out all definitions in curren class for each use of field reference in current method. And put those definitions into interference map.

Parameters:
classInfo   current class.
interferenceMap   interference map.
currentMdInfo   current method.

Definition at line 258 of file InterClassAnalysis.java.

Referenced by interferForMethod().

void InterClassAnalysis::lookupReadyDependStmt Map   readyMap,
List   methodsList,
MethodInfo   currentMethodInfo,
List   lockPairList,
List   waitStmtList
[inline, private]
 

Look up all ready dependence from a list of method starting from current method with lock pair list and wait statement list.
There are two kinds of ready dependences: entermonitor statement in one method may be ready dependent on exitmonitor statement in other method, if they are associated with the same lock; wait statement in one method may be ready dependent on notify or notifyAll statement in other method, if they are associated with the same lock.

Parameters:
readyMap   map for ready dependence.
methodsList   a list of MethodInfo.
currentMethodInfo   current method.
lockPairList   lock pair list.
waitStmtList   wait statement list.

Definition at line 320 of file InterClassAnalysis.java.

Referenced by readyForMethod().

void InterClassAnalysis::readyDependence   [inline, private]
 

Analyse ready dependence for each method in the class list by calling readyForMethod().

Definition at line 375 of file InterClassAnalysis.java.

Referenced by InterClassAnalysis().

Map InterClassAnalysis::readyForMethod MethodInfo   currentMethod,
List   lockPairList,
List   waitStmtList
[inline, private]
 

Analyse ready dependence for one method by calling (Map, List MethodInfo,List,List) lookupReadyDependStmt().

Parameters:
currentMethod   current method.
lockPairList   lock pair list of current method.
waitStmtList   wait statement list of current method.
Returns:
a of ready dependence from Stmt to a List of ReadyDependStmt.

Definition at line 406 of file InterClassAnalysis.java.

Referenced by readyDependence().


Member Data Documentation

List InterClassAnalysis::classList [private]
 

A list of ClassInfo.

Definition at line 54 of file InterClassAnalysis.java.


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