joeq.Compiler.Analysis.Primitive
Class PrimitivePA

java.lang.Object
  extended by joeq.Compiler.Analysis.Primitive.PrimitivePA

public class PrimitivePA
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: PrimitivePA.java 2470 2006-07-17 05:20:48Z joewhaley $
Author:
John Whaley

Nested Class Summary
 class PrimitivePA.HeapPathSelector
           
 class PrimitivePA.ObjectPathSelector
           
 class PrimitivePA.StringMethodSelector
           
static class PrimitivePA.ThreadRootMap
           
 class PrimitivePA.ToString
           
static class PrimitivePA.VarPathSelector
           
 
Field Summary
static String fakeCloneName
           
 PrimitivePA.HeapPathSelector heapPathSelector
           
static boolean MATCH_FACTORY
           
 PrimitivePA.ObjectPathSelector objectPathSelector
           
static boolean THREADS_ONLY
           
static boolean TRACE_REFLECTION
           
static boolean TRACE_REFLECTION_DOMAINS
           
 PrimitivePA.VarPathSelector varPathSelector
           
static boolean VerifyAssertions
           
 
Constructor Summary
PrimitivePA()
           
 
Method Summary
static List activeDomains(net.sf.javabdd.BDD r)
           
 void addAllMethods()
           
 void addClassInitializer(jq_Class c)
           
 void addDefaults()
           
 void addFinalizer(jq_Class c, PrimitiveMethodSummary.Node h)
           
 void addPlaceholdersForParams(jq_Method m, int depth)
           
 void addThreadRun(jq_Method caller, PrimitiveMethodSummary.Node h, jq_Class c)
           
 void addToForNameMap(PrimitiveMethodSummary.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()
           
 int getThreadRunIndex(jq_Method m, PrimitiveMethodSummary.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(PrimitiveMethodSummary.Node node)
           
 void iterate()
           
static PrimitivePA 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()
           
 void run(CallGraph cg, Collection rootMethods)
           
 void run(String bddfactory, CallGraph cg, Collection rootMethods)
           
 void solvePointsTo_incremental()
           
 void solvePointsTo()
           
 void visitGlobalNode(PrimitiveMethodSummary.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

TRACE_REFLECTION

public static boolean TRACE_REFLECTION

TRACE_REFLECTION_DOMAINS

public static boolean TRACE_REFLECTION_DOMAINS

fakeCloneName

public static String fakeCloneName

varPathSelector

public final PrimitivePA.VarPathSelector varPathSelector

THREADS_ONLY

public static boolean THREADS_ONLY

heapPathSelector

public final PrimitivePA.HeapPathSelector heapPathSelector

MATCH_FACTORY

public static boolean MATCH_FACTORY

objectPathSelector

public final PrimitivePA.ObjectPathSelector objectPathSelector
Constructor Detail

PrimitivePA

public PrimitivePA()
Method Detail

initializeBDD

public void initializeBDD(String bddfactory)

addToForNameMap

public void addToForNameMap(PrimitiveMethodSummary.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(PrimitiveMethodSummary.Node node)

isNullConstant

public boolean isNullConstant(PrimitiveMethodSummary.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,
                         PrimitiveMethodSummary.Node h)

addThreadRun

public void addThreadRun(jq_Method caller,
                         PrimitiveMethodSummary.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

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 PrimitivePA loadResults(String bddfactory,
                                      String loaddir,
                                      String loadfilename)
                               throws IOException
Throws:
IOException

getThreadRunIndex

public int getThreadRunIndex(jq_Method m,
                             PrimitiveMethodSummary.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)

dumpBDDRelations

public void dumpBDDRelations()
                      throws IOException
Throws:
IOException


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