com.ibm.wala.core.tests.demandpa
Class AbstractPtrTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.ibm.wala.core.tests.demandpa.AbstractPtrTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
ContextSensitiveTest, IntraprocTest, NoRefinePtrTest, OnTheFlyPtrTest, RefineFieldsPtrTest

public abstract class AbstractPtrTest
extends junit.framework.TestCase


Field Summary
protected  boolean debug
           
protected  AnalysisScope scope
          analysis scope from latest test
 
Constructor Summary
AbstractPtrTest()
           
 
Method Summary
protected  void doPointsToSizeTest(java.lang.String scopeFile, java.lang.String mainClass, int expectedSize)
           
protected  void doPointsToSizeTest(java.lang.String scopeFile, java.lang.String mainClass, int expected14Size, int expected15Size, int expected16Size)
           
static CGNode findInstanceMethod(CallGraph cg, IClass declaringClass, Atom name, Descriptor args)
           
static CGNode findMainMethod(CallGraph cg)
           
static CGNode findStaticMethod(CallGraph cg, Atom name, Descriptor args)
           
static PointerKey getParam(CGNode n, java.lang.String methodName, HeapModel heapModel)
           
protected  java.util.Collection<InstanceKey> getPointsToSetToTest(java.lang.String scopeFile, java.lang.String mainClass)
           
protected  StateMachineFactory<IFlowLabel> getStateMachineFactory()
           
protected  DemandRefinementPointsTo makeDemandPointerAnalysis(java.lang.String scopeFile, java.lang.String mainClass)
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

protected boolean debug

scope

protected AnalysisScope scope
analysis scope from latest test

Constructor Detail

AbstractPtrTest

public AbstractPtrTest()
Method Detail

findMainMethod

public static CGNode findMainMethod(CallGraph cg)

findStaticMethod

public static CGNode findStaticMethod(CallGraph cg,
                                      Atom name,
                                      Descriptor args)

findInstanceMethod

public static CGNode findInstanceMethod(CallGraph cg,
                                        IClass declaringClass,
                                        Atom name,
                                        Descriptor args)

getParam

public static PointerKey getParam(CGNode n,
                                  java.lang.String methodName,
                                  HeapModel heapModel)

doPointsToSizeTest

protected void doPointsToSizeTest(java.lang.String scopeFile,
                                  java.lang.String mainClass,
                                  int expected14Size,
                                  int expected15Size,
                                  int expected16Size)
                           throws ClassHierarchyException,
                                  java.lang.IllegalArgumentException,
                                  CancelException,
                                  java.io.IOException
Throws:
ClassHierarchyException
java.lang.IllegalArgumentException
CancelException
java.io.IOException

doPointsToSizeTest

protected void doPointsToSizeTest(java.lang.String scopeFile,
                                  java.lang.String mainClass,
                                  int expectedSize)
                           throws ClassHierarchyException,
                                  java.lang.IllegalArgumentException,
                                  CancelException,
                                  java.io.IOException
Throws:
ClassHierarchyException
java.lang.IllegalArgumentException
CancelException
java.io.IOException

getPointsToSetToTest

protected java.util.Collection<InstanceKey> getPointsToSetToTest(java.lang.String scopeFile,
                                                                 java.lang.String mainClass)
                                                          throws ClassHierarchyException,
                                                                 java.lang.IllegalArgumentException,
                                                                 CancelException,
                                                                 java.io.IOException
Throws:
ClassHierarchyException
java.lang.IllegalArgumentException
CancelException
java.io.IOException

makeDemandPointerAnalysis

protected DemandRefinementPointsTo makeDemandPointerAnalysis(java.lang.String scopeFile,
                                                             java.lang.String mainClass)
                                                      throws ClassHierarchyException,
                                                             java.lang.IllegalArgumentException,
                                                             CancelException,
                                                             java.io.IOException
Throws:
ClassHierarchyException
java.lang.IllegalArgumentException
CancelException
java.io.IOException

getStateMachineFactory

protected StateMachineFactory<IFlowLabel> getStateMachineFactory()