harpoon.Analysis.PointerAnalysis
Class InterProcPA

java.lang.Object
  |
  +--harpoon.Analysis.PointerAnalysis.InterProcPA
All Implemented Interfaces:
Serializable

public abstract class InterProcPA
extends Object
implements Serializable

InterProcPA is a "functional" class (i.e. it contains just some methods, no persistent data) that wraps the inter-procedural part of the pointer analysis. Normally, this should be a part of the PointerAnalysis, but that class is already too big and some code segmentation is always good!
In the implementation of this class, most of the methods are static and have PointerAnalysis pa as their first argument. This stands for the this hidden argument that would exist if all those methods were in the PointerAnalysis class.

Version:
$Id: InterProcPA.java,v 1.3 2002/02/26 22:41:18 cananian Exp $
Author:
Alexandru SALCIANU <salcianu@retezat.lcs.mit.edu>
See Also:
Serialized Form

Field Summary
static boolean DEBUG
          Activates a lot of debug messages.
static int MAX_CALLEES
          Call sites with more than MAX_CALLEES callees are simply considered to be holes.
static boolean VERY_NEW_MAPPINGS
           
static boolean WARNINGS
          Displays some warnings, eg for the call sites with 0 callees.
 
Constructor Summary
InterProcPA()
           
 
Method Summary
static harpoon.Analysis.PointerAnalysis.ParIntGraphPair analyze_call(PointerAnalysis pa, MetaMethod current_mmethod, CALL q, ParIntGraph pig_before)
          Analyzes the call site q inside current_method.
static Set getUnharmfulMethods()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_CALLEES

public static final int MAX_CALLEES
Call sites with more than MAX_CALLEES callees are simply considered to be holes.

See Also:
Constant Field Values

DEBUG

public static final boolean DEBUG
Activates a lot of debug messages.

See Also:
Constant Field Values

WARNINGS

public static final boolean WARNINGS
Displays some warnings, eg for the call sites with 0 callees. This is not necessarily an error! For example, if an application never instantiates a SecurityManager, each call to a method of that class has ZERO callees!

See Also:
Constant Field Values

VERY_NEW_MAPPINGS

public static boolean VERY_NEW_MAPPINGS
Constructor Detail

InterProcPA

public InterProcPA()
Method Detail

analyze_call

public static harpoon.Analysis.PointerAnalysis.ParIntGraphPair analyze_call(PointerAnalysis pa,
                                                                            MetaMethod current_mmethod,
                                                                            CALL q,
                                                                            ParIntGraph pig_before)
Analyzes the call site q inside current_method. If analyzing the call is not possible (e.g. one of the callees is native, hence unanalyzable), the call site is skipped and all the parameters are marked as escaping through that call site.

Parameters:
pa - The PointerAnalysis object that calls this method. This parameter stands for the this pointer that would exist if this method were in the PointerAnalysis class.
q - The analyzed call site.
pig_before - The parallel interaction graph at the program point just before the call site; this graph will be mutated, it is the responsability of the caller to clone it if it is necessary somewhere else.
Returns:
Two graphs are returned: one for the normal return from the procedure, the other one for a return due to an exception.

getUnharmfulMethods

public static Set getUnharmfulMethods()