@Override public IMethod getMethod() throws UnimplementedError { return ir.getMethod(); }
@Override public AstMethod getMethod() { return (AstMethod)super.getMethod(); }
@Override public IMethod getMethod() throws UnimplementedError { return ir.getMethod(); }
@Override public AstMethod getMethod() { return (AstMethod)super.getMethod(); }
public NullPointerSolver(NullPointerFrameWork<B> problem, int maxVarNum, IR ir, B entry) { this(problem, maxVarNum, entry, ir, ParameterState.createDefault(ir.getMethod())); }
public NullPointerSolver(NullPointerFrameWork<B> problem, int maxVarNum, IR ir, B entry) { this(problem, maxVarNum, entry, ir, ParameterState.createDefault(ir.getMethod())); }
public ExplodedCFGNullPointerAnalysis(TypeReference[] ignoredExceptions, IR ir, ParameterState paramState, MethodState mState, boolean optHasExceptions) { this.ignoredExceptions = (ignoredExceptions != null ? ignoredExceptions.clone() : null); this.ir = ir; this.initialState = (paramState == null ? ParameterState.createDefault(ir.getMethod()) : paramState); this.mState = (mState == null ? MethodState.DEFAULT : mState); this.optHasExceptions = optHasExceptions; }
public SSACFGNullPointerAnalysis(TypeReference[] ignoredExceptions, IR ir, ParameterState paramState, MethodState mState) { this.ignoredExceptions = (ignoredExceptions != null ? ignoredExceptions.clone() : null); this.ir = ir; this.initialState = (paramState == null ? ParameterState.createDefault(ir.getMethod()) : paramState); this.mState = (mState == null ? MethodState.DEFAULT : mState); }
public ExplodedCFGNullPointerAnalysis(TypeReference[] ignoredExceptions, IR ir, ParameterState paramState, MethodState mState, boolean optHasExceptions) { this.ignoredExceptions = (ignoredExceptions != null ? ignoredExceptions.clone() : null); this.ir = ir; this.initialState = (paramState == null ? ParameterState.createDefault(ir.getMethod()) : paramState); this.mState = (mState == null ? MethodState.DEFAULT : mState); this.optHasExceptions = optHasExceptions; }
public SSACFGNullPointerAnalysis(TypeReference[] ignoredExceptions, IR ir, ParameterState paramState, MethodState mState) { this.ignoredExceptions = (ignoredExceptions != null ? ignoredExceptions.clone() : null); this.ir = ir; this.initialState = (paramState == null ? ParameterState.createDefault(ir.getMethod()) : paramState); this.mState = (mState == null ? MethodState.DEFAULT : mState); }
public NullPointerState getState(T block) { assert pruned != null || solver != null : "No solver initialized for method " + ir.getMethod().toString(); if (pruned != null && solver == null) { // empty IR ... so states have not changed and we can return the initial state as a save approximation return new NullPointerState(maxVarNum, ir.getSymbolTable(), initialState); } else { return solver.getOut(block); } }
public NullPointerState getState(T block) { assert pruned != null || solver != null : "No solver initialized for method " + ir.getMethod().toString(); if (pruned != null && solver == null) { // empty IR ... so states have not changed and we can return the initial state as a save approximation return new NullPointerState(maxVarNum, ir.getSymbolTable(), initialState); } else { return solver.getOut(block); } }
/** * @return {@link DefUse} information for m, built according to the specified options. null if unavailable * @throws IllegalArgumentException if ir is null */ public synchronized DefUse findOrCreateDU(IR ir, Context C) { if (ir == null) { throw new IllegalArgumentException("ir is null"); } DefUse du = (DefUse) duCache.find(ir.getMethod(), C, ir.getOptions()); if (du == null) { du = new DefUse(ir); duCache.cache(ir.getMethod(), C, ir.getOptions(), du); } return du; }
/** * @return {@link DefUse} information for m, built according to the specified options. null if unavailable * @throws IllegalArgumentException if ir is null */ public synchronized DefUse findOrCreateDU(IR ir, Context C) { if (ir == null) { throw new IllegalArgumentException("ir is null"); } DefUse du = (DefUse) duCache.find(ir.getMethod(), C, ir.getOptions()); if (du == null) { du = new DefUse(ir); duCache.cache(ir.getMethod(), C, ir.getOptions(), du); } return du; }
/** * @see org.eclipse.jface.action.IAction#run() * * @throws IllegalStateException if the viewer is not running */ @Override public void run() { IR ir = getIRForSelection(); // spawn the viewer System.err.println("Spawn IR Viewer for " + ir.getMethod()); try { PDFViewUtil.ghostviewIR(cg.getClassHierarchy(), ir, psFile, dotFile, dotExe, gvExe); } catch (WalaException e) { e.printStackTrace(); } }
protected TypeInference(IR ir, boolean doPrimitives) { if (ir == null) { throw new IllegalArgumentException("ir is null"); } this.language = ir.getMethod().getDeclaringClass().getClassLoader().getLanguage(); this.cha = ir.getMethod().getDeclaringClass().getClassHierarchy(); this.ir = ir; this.doPrimitives = doPrimitives; this.BOTTOM = new ConeType(cha.getRootClass()); initialize(); solve(); }
protected TypeInference(IR ir, boolean doPrimitives) { if (ir == null) { throw new IllegalArgumentException("ir is null"); } this.language = ir.getMethod().getDeclaringClass().getClassLoader().getLanguage(); this.cha = ir.getMethod().getDeclaringClass().getClassHierarchy(); this.ir = ir; this.doPrimitives = doPrimitives; this.BOTTOM = new ConeType(cha.getRootClass()); initialize(); solve(); }
public FlowGraphSSAVisitor(IR ir, FlowGraph flowgraph) { super(ir.getMethod(), ir.getSymbolTable(), cache.getDefUse(ir)); this.ir = ir; this.flowgraph = flowgraph; this.factory = flowgraph.getVertexFactory(); this.func = factory.makeFuncVertex(ir.getMethod().getDeclaringClass()); if(method instanceof AstMethod) { this.lexicalInfo = ((AstMethod)method).lexicalInfo(); this.exposedVars = lexicalInfo.getAllExposedUses(); } else { this.lexicalInfo = null; this.exposedVars = EmptyIntSet.instance; } }
public FlowGraphSSAVisitor(IR ir, FlowGraph flowgraph) { super(ir.getMethod(), ir.getSymbolTable(), cache.getDefUse(ir)); this.ir = ir; this.flowgraph = flowgraph; this.factory = flowgraph.getVertexFactory(); this.func = factory.makeFuncVertex(ir.getMethod().getDeclaringClass()); if(method instanceof AstMethod) { this.lexicalInfo = ((AstMethod)method).lexicalInfo(); this.exposedVars = lexicalInfo.getAllExposedUses(); } else { this.lexicalInfo = null; this.exposedVars = EmptyIntSet.instance; } }
/** * What are the exception types which s may throw? */ private static TypeReference[] computeExceptions(IClassHierarchy cha, IR ir, SSAInstruction s) throws InvalidClassFileException { Collection<TypeReference> c = null; Language l = ir.getMethod().getDeclaringClass().getClassLoader().getLanguage(); if (s instanceof SSAInvokeInstruction) { SSAInvokeInstruction call = (SSAInvokeInstruction) s; c = l.inferInvokeExceptions(call.getDeclaredTarget(), cha); } else { c = s.getExceptionTypes(); } if (c == null) { return null; } else { TypeReference[] exceptions = new TypeReference[c.size()]; Iterator<TypeReference> it = c.iterator(); for (int i = 0; i < exceptions.length; i++) { exceptions[i] = it.next(); } return exceptions; } }