joeq.Compiler.Analysis.IPA
Class PA

java.lang.Object
  extended by joeq.Compiler.Analysis.IPA.PA

public class PA
extends Object

Pointer analysis using BDDs. Includes both context-insensitive and context-sensitive analyses. This version corresponds exactly to the description in the paper. All of the inference rules are direct copies.

Version:
$Id: PA.java 2470 2006-07-17 05:20:48Z joewhaley $
Author:
John Whaley

Nested Class Summary
 class PA.HeapPathSelector
           
 class PA.ObjectPathSelector
           
 class PA.StringMethodSelector
           
static class PA.ThreadRootMap
           
 class PA.ToString
           
static class PA.VarPathSelector
           
 
Field Summary
 PA.HeapPathSelector heapPathSelector
           
static boolean MATCH_FACTORY
           
 PA.ObjectPathSelector objectPathSelector
           
static boolean THREADS_ONLY
           
static boolean TRACE_REFLECTION
           
static boolean TRACE_REFLECTION_DOMAINS
           
 boolean USE_BOGUS_SUMMARIES
           
 PA.VarPathSelector varPathSelector
           
static boolean VerifyAssertions
           
 
Constructor Summary
PA()
           
 
Method Summary
static List activeDomains(net.sf.javabdd.BDD r)
           
 void addAllMethods()
           
 void addClassInitializer(jq_Class c)
           
 void addDefaults()
           
 void addFinalizer(jq_Class c, MethodSummary.Node h)
           
 void addPlaceholdersForParams(jq_Method m, int depth)
           
 void addThreadRun(jq_Method caller, MethodSummary.Node h, jq_Class c)
           
 void addToForNameMap(MethodSummary.ConcreteTypeNode h, net.sf.javabdd.BDD i_bdd)
           
 boolean alreadyVisited(jq_Method m)
           
 void assumeKnownCallGraph()
           
static void bdd_save(String filename, net.sf.javabdd.BDD b)
           
static void bdd_save(String filename, net.sf.javabdd.BDD b, List ds)
           
 void bindInvocations_incremental()
           
 void bindInvocations()
          Uses points-to information to bind virtual call sites.
 void bindParameters_incremental()
           
 void bindParameters()
           
 boolean bindReflection()
          Updates IE/IEcs with new edges obtained from resolving reflective invocations
static net.sf.javabdd.BDD buildContextMap(net.sf.javabdd.BDDDomain d1, BigInteger startD1, BigInteger endD1, net.sf.javabdd.BDDDomain d2, BigInteger startD2, BigInteger endD2)
           
 void buildExactVarHeapCorrespondence(CallGraph cg)
           
 void buildObjectSensitiveV1H1_(ObjectCreationGraph g)
           
 void buildObjectSensitiveV1H1(ObjectCreationGraph g)
           
 void buildThreadV1H1(Map threadNodes, CallGraph g)
           
 void buildTypes()
           
 void buildVarHeapCorrespondence(CallGraph cg)
           
 jwutil.graphs.PathNumbering countCallGraph(CallGraph cg, ObjectCreationGraph ocg, boolean updateBits)
           
 jwutil.graphs.PathNumbering countHeapNumbering(CallGraph cg, boolean updateBits)
           
 void dumpBDDRelations()
           
 void dumpCallGraph()
           
 void dumpIEcs()
           
 void dumpResults(String dumpfilename)
           
 void dumpVP(net.sf.javabdd.BDD my_vP)
           
 void dumpWithV1c(net.sf.javabdd.BDD z, net.sf.javabdd.BDDVarSet set)
           
 String getBDDDomains(net.sf.javabdd.BDD r)
           
static BogusSummaryProvider getBogusSummaryProvider()
           
static String getName(net.sf.javabdd.BDDDomain d)
           
static ReflectionInformationProvider getReflectionProvider()
           
 PAResults getResults()
           
 int getThreadRunIndex(jq_Method m, MethodSummary.Node n)
           
 net.sf.javabdd.BDD getV1H1Context(jq_Method m)
           
 net.sf.javabdd.BDD getV1V2Context(jq_Method m)
           
 boolean handleNewTargets()
           
 void initializeBDD(String bddfactory)
           
 boolean isNullConstant(MethodSummary.Node node)
           
 void iterate()
           
static PA loadResults(String bddfactory, String loaddir, String loadfilename)
           
 String longForm(Object o)
           
static void main(String[] args)
           
 void numberPaths(CallGraph cg, ObjectCreationGraph ocg, boolean updateBits)
           
 void printSizes()
           
static MethodSummary.ConcreteTypeNode readToStringResult(String str)
           
 void run(CallGraph cg, Collection rootMethods)
           
 void run(String bddfactory, CallGraph cg, Collection rootMethods)
           
 void solvePointsTo_incremental()
           
 void solvePointsTo()
           
 void visitGlobalNode(MethodSummary.Node node)
           
 void visitMethod(jq_Method m)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VerifyAssertions

public static final boolean VerifyAssertions
See Also:
Constant Field Values

USE_BOGUS_SUMMARIES

public boolean USE_BOGUS_SUMMARIES

TRACE_REFLECTION

public static boolean TRACE_REFLECTION

TRACE_REFLECTION_DOMAINS

public static boolean TRACE_REFLECTION_DOMAINS

varPathSelector

public final PA.VarPathSelector varPathSelector

THREADS_ONLY

public static boolean THREADS_ONLY

heapPathSelector

public final PA.HeapPathSelector heapPathSelector

MATCH_FACTORY

public static boolean MATCH_FACTORY

objectPathSelector

public final PA.ObjectPathSelector objectPathSelector
Constructor Detail

PA

public PA()
Method Detail

initializeBDD

public void initializeBDD(String bddfactory)

addToForNameMap

public void addToForNameMap(MethodSummary.ConcreteTypeNode h,
                            net.sf.javabdd.BDD i_bdd)

buildContextMap

public static net.sf.javabdd.BDD buildContextMap(net.sf.javabdd.BDDDomain d1,
                                                 BigInteger startD1,
                                                 BigInteger endD1,
                                                 net.sf.javabdd.BDDDomain d2,
                                                 BigInteger startD2,
                                                 BigInteger endD2)

alreadyVisited

public boolean alreadyVisited(jq_Method m)

addPlaceholdersForParams

public void addPlaceholdersForParams(jq_Method m,
                                     int depth)

visitMethod

public void visitMethod(jq_Method m)

addAllMethods

public void addAllMethods()

getV1V2Context

public net.sf.javabdd.BDD getV1V2Context(jq_Method m)

visitGlobalNode

public void visitGlobalNode(MethodSummary.Node node)

isNullConstant

public boolean isNullConstant(MethodSummary.Node node)

getBogusSummaryProvider

public static BogusSummaryProvider getBogusSummaryProvider()

buildTypes

public void buildTypes()

getReflectionProvider

public static ReflectionInformationProvider getReflectionProvider()

addClassInitializer

public void addClassInitializer(jq_Class c)

addFinalizer

public void addFinalizer(jq_Class c,
                         MethodSummary.Node h)

addThreadRun

public void addThreadRun(jq_Method caller,
                         MethodSummary.Node h,
                         jq_Class c)

solvePointsTo

public void solvePointsTo()

solvePointsTo_incremental

public void solvePointsTo_incremental()

dumpWithV1c

public void dumpWithV1c(net.sf.javabdd.BDD z,
                        net.sf.javabdd.BDDVarSet set)

dumpIEcs

public void dumpIEcs()

dumpVP

public void dumpVP(net.sf.javabdd.BDD my_vP)

bindInvocations

public void bindInvocations()
Uses points-to information to bind virtual call sites. (Adds to IE/IEcs.)


getBDDDomains

public String getBDDDomains(net.sf.javabdd.BDD r)

bindReflection

public boolean bindReflection()
Updates IE/IEcs with new edges obtained from resolving reflective invocations


bindInvocations_incremental

public void bindInvocations_incremental()

handleNewTargets

public boolean handleNewTargets()

bindParameters

public void bindParameters()

bindParameters_incremental

public void bindParameters_incremental()

assumeKnownCallGraph

public void assumeKnownCallGraph()

iterate

public void iterate()

numberPaths

public void numberPaths(CallGraph cg,
                        ObjectCreationGraph ocg,
                        boolean updateBits)

addDefaults

public void addDefaults()

run

public void run(CallGraph cg,
                Collection rootMethods)
         throws IOException
Throws:
IOException

run

public void run(String bddfactory,
                CallGraph cg,
                Collection rootMethods)
         throws IOException
Throws:
IOException

readToStringResult

public static MethodSummary.ConcreteTypeNode readToStringResult(String str)

main

public static void main(String[] args)
                 throws IOException
Throws:
IOException

printSizes

public void printSizes()

longForm

public String longForm(Object o)

dumpCallGraph

public void dumpCallGraph()
                   throws IOException
Throws:
IOException

activeDomains

public static List activeDomains(net.sf.javabdd.BDD r)

getName

public static String getName(net.sf.javabdd.BDDDomain d)

bdd_save

public static void bdd_save(String filename,
                            net.sf.javabdd.BDD b)
                     throws IOException
Throws:
IOException

bdd_save

public static void bdd_save(String filename,
                            net.sf.javabdd.BDD b,
                            List ds)
                     throws IOException
Throws:
IOException

dumpResults

public void dumpResults(String dumpfilename)
                 throws IOException
Throws:
IOException

loadResults

public static PA loadResults(String bddfactory,
                             String loaddir,
                             String loadfilename)
                      throws IOException
Throws:
IOException

getThreadRunIndex

public int getThreadRunIndex(jq_Method m,
                             MethodSummary.Node n)

countCallGraph

public jwutil.graphs.PathNumbering countCallGraph(CallGraph cg,
                                                  ObjectCreationGraph ocg,
                                                  boolean updateBits)

countHeapNumbering

public jwutil.graphs.PathNumbering countHeapNumbering(CallGraph cg,
                                                      boolean updateBits)

getV1H1Context

public net.sf.javabdd.BDD getV1H1Context(jq_Method m)

buildThreadV1H1

public void buildThreadV1H1(Map threadNodes,
                            CallGraph g)

buildObjectSensitiveV1H1

public void buildObjectSensitiveV1H1(ObjectCreationGraph g)

buildObjectSensitiveV1H1_

public void buildObjectSensitiveV1H1_(ObjectCreationGraph g)

buildVarHeapCorrespondence

public void buildVarHeapCorrespondence(CallGraph cg)

buildExactVarHeapCorrespondence

public void buildExactVarHeapCorrespondence(CallGraph cg)

getResults

public PAResults getResults()

dumpBDDRelations

public void dumpBDDRelations()
                      throws IOException
Throws:
IOException


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