joeq.Compiler.Quad
Class AndersenPointerAnalysis

java.lang.Object
  extended by joeq.Compiler.Quad.AndersenPointerAnalysis

public class AndersenPointerAnalysis
extends Object

Version:
$Id: AndersenPointerAnalysis.java 2465 2006-06-07 23:03:17Z joewhaley $
Author:
John Whaley

Nested Class Summary
static class AndersenPointerAnalysis.AccessPath
           
static class AndersenPointerAnalysis.Path
           
static class AndersenPointerAnalysis.Visitor
           
 
Field Summary
static boolean COMPARE_RTA
          Compare our result to RTA, and dump the statistics.
static boolean DO_TWICE
          Do the analysis twice, and report timings for each.
static boolean FORCE_GC
          Force a garbage collection after every iteration of the algorithm.
static boolean FULL_DUMP
          Dump the call graph after analysis has completed.
static boolean HANDLE_ESCAPE
          Controls the handling of references that escape to native methods or threads.
static int HISTOGRAM_SIZE
           
static boolean IGNORE_CLINIT
          Don't explicitly model the calling of methods.
static boolean INCLUSION_BACK_EDGES
          Keep track of inclusion back edges.
static AndersenPointerAnalysis INSTANCE
           
static PrintStream out
          Output stream for trace information.
static boolean REUSE_CACHES
          Reuse the lookup cache across multiple iterations of the algorithm.
static boolean TRACE
          Controls the output of trace information.
static boolean TRACE_CHANGE
          Output the cause of the *first* change in each iteration.
static boolean TRACE_CYCLES
          Output debugging information on the collapsing of cycles.
static boolean TRACK_CHANGED_FIELDS
          Track which fields have changed between iterations.
static boolean TRACK_CHANGES
          Keep track of whether cache entries change between iterations, to avoid the reconstruction and reduce the number of set union operations.
static boolean TRACK_REASONS
          Keep track of the reason why each inclusion edge was added to the graph.
static boolean USE_SET_REPOSITORY
          Use a set repository, rather than a set factory.
static boolean USE_SOFT_REFERENCES
          Controls the use of soft references for the lookup cache.
static boolean VerifyAssertions
          Enable/disable assertion checking.
 
Constructor Summary
AndersenPointerAnalysis(boolean addDefaults)
          Creates new AndersenPointerAnalysis
 
Method Summary
 boolean addToRootSet(ControlFlowGraph cfg)
          Add a control flow graph to the root set.
 boolean addToRootSet(MethodSummary s)
           
static Map buildOriginalCallGraph(Map m)
           
static String compareWithOriginal(Map cg, Map original)
           
static String computeHistogram2(Map m)
           
 String computeStats()
           
 CallGraph getCallGraph()
           
static CallTargets getCallTargets_CHA(ProgramLocation pl)
           
static CallTargets getCallTargets(ProgramLocation pl, Set nodes)
           
 jwutil.collections.Pair getPair(Object left, Object right)
           
 void initializeStatics(boolean addMethodsToVisit)
           
 void iterate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

public static PrintStream out
Output stream for trace information.


TRACE

public static boolean TRACE
Controls the output of trace information. This is useful in debugging the analysis, but causes a LOT of information to be dumped.


TRACE_CHANGE

public static final boolean TRACE_CHANGE
Output the cause of the *first* change in each iteration.

See Also:
Constant Field Values

TRACE_CYCLES

public static final boolean TRACE_CYCLES
Output debugging information on the collapsing of cycles.

See Also:
Constant Field Values

VerifyAssertions

public static final boolean VerifyAssertions
Enable/disable assertion checking.

See Also:
Constant Field Values

FULL_DUMP

public static boolean FULL_DUMP
Dump the call graph after analysis has completed.


COMPARE_RTA

public static boolean COMPARE_RTA
Compare our result to RTA, and dump the statistics.


DO_TWICE

public static boolean DO_TWICE
Do the analysis twice, and report timings for each.


IGNORE_CLINIT

public static boolean IGNORE_CLINIT
Don't explicitly model the calling of methods.


HANDLE_ESCAPE

public static final boolean HANDLE_ESCAPE
Controls the handling of references that escape to native methods or threads. "true" means it takes a pessimistic view of threads and native methods, assuming that they can update any reference passed into them in arbitrary ways. "false" means it takes an optimistic view, assuming that they make no modifications that will matter to the pointer analysis.

See Also:
Constant Field Values

USE_SOFT_REFERENCES

public static final boolean USE_SOFT_REFERENCES
Controls the use of soft references for the lookup cache.

See Also:
Constant Field Values

FORCE_GC

public static boolean FORCE_GC
Force a garbage collection after every iteration of the algorithm.


REUSE_CACHES

public static final boolean REUSE_CACHES
Reuse the lookup cache across multiple iterations of the algorithm.

See Also:
Constant Field Values

TRACK_CHANGES

public static final boolean TRACK_CHANGES
Keep track of whether cache entries change between iterations, to avoid the reconstruction and reduce the number of set union operations.

See Also:
Constant Field Values

TRACK_CHANGED_FIELDS

public static final boolean TRACK_CHANGED_FIELDS
Track which fields have changed between iterations. ***DOESN'T GIVE CORRECT ANSWERS IN SOME CASES***

See Also:
Constant Field Values

TRACK_REASONS

public static boolean TRACK_REASONS
Keep track of the reason why each inclusion edge was added to the graph.


INCLUSION_BACK_EDGES

public static final boolean INCLUSION_BACK_EDGES
Keep track of inclusion back edges.

See Also:
Constant Field Values

USE_SET_REPOSITORY

public static final boolean USE_SET_REPOSITORY
Use a set repository, rather than a set factory. The set repository attempts to reduce memory usage by reusing set data structures.

See Also:
Constant Field Values

INSTANCE

public static AndersenPointerAnalysis INSTANCE

HISTOGRAM_SIZE

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

AndersenPointerAnalysis

public AndersenPointerAnalysis(boolean addDefaults)
Creates new AndersenPointerAnalysis

Method Detail

addToRootSet

public boolean addToRootSet(ControlFlowGraph cfg)
Add a control flow graph to the root set. We get the method summary for the given control flow graph, and add that to the root set.

Parameters:
cfg - control flow graph to add
Returns:
boolean whether the root set changed

addToRootSet

public boolean addToRootSet(MethodSummary s)

initializeStatics

public void initializeStatics(boolean addMethodsToVisit)

computeStats

public String computeStats()

buildOriginalCallGraph

public static Map buildOriginalCallGraph(Map m)

compareWithOriginal

public static String compareWithOriginal(Map cg,
                                         Map original)

computeHistogram2

public static String computeHistogram2(Map m)

iterate

public void iterate()

getCallTargets_CHA

public static CallTargets getCallTargets_CHA(ProgramLocation pl)

getCallTargets

public static CallTargets getCallTargets(ProgramLocation pl,
                                         Set nodes)

getPair

public jwutil.collections.Pair getPair(Object left,
                                       Object right)

getCallGraph

public CallGraph getCallGraph()


Copyright © 2001-2008 John Whaley. All Rights Reserved.