@Override public int getNumberOfStatements(CGNode node) { return getCFAInterpreter(node).getNumberOfStatements(node); }
@Override public IRView getIRView(CGNode node) { return getIR(node); }
/** * Extract a call graph from a given flow graph. */ public JSCallGraph extract(FlowGraph flowgraph, Iterable<? extends Entrypoint> eps, IProgressMonitor monitor) throws CancelException { DelegatingSSAContextInterpreter interpreter = new DelegatingSSAContextInterpreter(new AstContextInsensitiveSSAContextInterpreter(options, cache), new DefaultSSAInterpreter(options, cache)); return extract(interpreter, flowgraph, eps, monitor); }
/** * Extract a call graph from a given flow graph. */ public JSCallGraph extract(FlowGraph flowgraph, Iterable<? extends Entrypoint> eps, IProgressMonitor monitor) throws CancelException { DelegatingSSAContextInterpreter interpreter = new DelegatingSSAContextInterpreter(new AstContextInsensitiveSSAContextInterpreter(options, cache), new DefaultSSAInterpreter(options, cache)); return extract(interpreter, flowgraph, eps, monitor); }
protected SSAContextInterpreter makeContextInterpreter(SSAContextInterpreter appContextInterpreter) { SSAContextInterpreter defI = new DefaultSSAInterpreter(getOptions(), getAnalysisCache()); defI = new DelegatingSSAContextInterpreter(ReflectionContextInterpreter.createReflectionContextInterpreter(cha, getOptions(), getAnalysisCache()), defI); SSAContextInterpreter contextInterpreter = appContextInterpreter == null ? defI : new DelegatingSSAContextInterpreter( appContextInterpreter, defI); return contextInterpreter; }
@Override public ControlFlowGraph<SSAInstruction, ISSABasicBlock> getCFG(CGNode N) { return getCFAInterpreter(N).getCFG(N); }
@Override public IRView getIRView(CGNode node) { return getIR(node); }
protected SSAContextInterpreter makeContextInterpreter(SSAContextInterpreter appContextInterpreter) { SSAContextInterpreter defI = new DefaultSSAInterpreter(getOptions(), getAnalysisCache()); defI = new DelegatingSSAContextInterpreter(ReflectionContextInterpreter.createReflectionContextInterpreter(cha, getOptions(), getAnalysisCache()), defI); SSAContextInterpreter contextInterpreter = appContextInterpreter == null ? defI : new DelegatingSSAContextInterpreter( appContextInterpreter, defI); return contextInterpreter; }
@Override public IR getIR(CGNode node) { return getCFAInterpreter(node).getIR(node); }
public SSAContextInterpreter makeDefaultContextInterpreters(SSAContextInterpreter appContextInterpreter, AnalysisOptions options, IClassHierarchy cha) { SSAContextInterpreter c = new DefaultSSAInterpreter(options, getAnalysisCache()); c = new DelegatingSSAContextInterpreter(new AstContextInsensitiveSSAContextInterpreter(options, getAnalysisCache()), c); c = new DelegatingSSAContextInterpreter(ReflectionContextInterpreter.createReflectionContextInterpreter(cha, options, getAnalysisCache()), c); if (appContextInterpreter == null) return c; else return new DelegatingSSAContextInterpreter(appContextInterpreter, c); }
@Override public ControlFlowGraph<SSAInstruction, ISSABasicBlock> getCFG(CGNode N) { return getCFAInterpreter(N).getCFG(N); }
public SSAContextInterpreter makeDefaultContextInterpreters(SSAContextInterpreter appContextInterpreter, AnalysisOptions options, IClassHierarchy cha) { SSAContextInterpreter c = new DefaultSSAInterpreter(options, getAnalysisCache()); c = new DelegatingSSAContextInterpreter(new AstContextInsensitiveSSAContextInterpreter(options, getAnalysisCache()), c); c = new DelegatingSSAContextInterpreter(ReflectionContextInterpreter.createReflectionContextInterpreter(cha, options, getAnalysisCache()), c); if (appContextInterpreter == null) return c; else return new DelegatingSSAContextInterpreter(appContextInterpreter, c); }
@Override public Iterator<NewSiteReference> iterateNewSites(CGNode node) { return getCFAInterpreter(node).iterateNewSites(node); }
public nCFABuilder(int n, IMethod abstractRootMethod, AnalysisOptions options, IAnalysisCacheView cache, ContextSelector appContextSelector, SSAContextInterpreter appContextInterpreter) { super(abstractRootMethod, options, cache, new DefaultPointerKeyFactory()); if (options == null) { throw new IllegalArgumentException("options is null"); } setInstanceKeys(new ClassBasedInstanceKeys(options, cha)); ContextSelector def = new DefaultContextSelector(options, cha); ContextSelector contextSelector = appContextSelector == null ? def : new DelegatingContextSelector(appContextSelector, def); contextSelector = new nCFAContextSelector(n, contextSelector); setContextSelector(contextSelector); SSAContextInterpreter defI = new DefaultSSAInterpreter(options, cache); defI = new DelegatingSSAContextInterpreter(ReflectionContextInterpreter.createReflectionContextInterpreter(cha, options, getAnalysisCache()), defI); SSAContextInterpreter contextInterpreter = appContextInterpreter == null ? defI : new DelegatingSSAContextInterpreter(appContextInterpreter, defI); setContextInterpreter(contextInterpreter); }
@Override public DefUse getDU(CGNode node) { return getCFAInterpreter(node).getDU(node); }
public nCFABuilder(int n, IMethod abstractRootMethod, AnalysisOptions options, IAnalysisCacheView cache, ContextSelector appContextSelector, SSAContextInterpreter appContextInterpreter) { super(abstractRootMethod, options, cache, new DefaultPointerKeyFactory()); if (options == null) { throw new IllegalArgumentException("options is null"); } setInstanceKeys(new ClassBasedInstanceKeys(options, cha)); ContextSelector def = new DefaultContextSelector(options, cha); ContextSelector contextSelector = appContextSelector == null ? def : new DelegatingContextSelector(appContextSelector, def); contextSelector = new nCFAContextSelector(n, contextSelector); setContextSelector(contextSelector); SSAContextInterpreter defI = new DefaultSSAInterpreter(options, cache); defI = new DelegatingSSAContextInterpreter(ReflectionContextInterpreter.createReflectionContextInterpreter(cha, options, getAnalysisCache()), defI); SSAContextInterpreter contextInterpreter = appContextInterpreter == null ? defI : new DelegatingSSAContextInterpreter(appContextInterpreter, defI); setContextInterpreter(contextInterpreter); }
@Override public DefUse getDU(CGNode node) { return getCFAInterpreter(node).getDU(node); }
public ZeroXCFABuilder(Language l, IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache, ContextSelector appContextSelector, SSAContextInterpreter appContextInterpreter, int instancePolicy) { super(l.getFakeRootMethod(cha, options, cache), options, cache, new DefaultPointerKeyFactory()); ContextSelector def = new DefaultContextSelector(options, cha); ContextSelector contextSelector = appContextSelector == null ? def : new DelegatingContextSelector(appContextSelector, def); setContextSelector(contextSelector); SSAContextInterpreter c = new DefaultSSAInterpreter(options, cache); c = new DelegatingSSAContextInterpreter(ReflectionContextInterpreter.createReflectionContextInterpreter(cha, options, getAnalysisCache()), c); SSAContextInterpreter contextInterpreter = appContextInterpreter == null ? c : new DelegatingSSAContextInterpreter( appContextInterpreter, c); setContextInterpreter(contextInterpreter); ZeroXInstanceKeys zik = makeInstanceKeys(cha, options, contextInterpreter, instancePolicy); setInstanceKeys(zik); }
@Override public Iterator<CallSiteReference> iterateCallSites(CGNode node) { return getCFAInterpreter(node).iterateCallSites(node); }
public ZeroXCFABuilder(Language l, IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache, ContextSelector appContextSelector, SSAContextInterpreter appContextInterpreter, int instancePolicy) { super(l.getFakeRootMethod(cha, options, cache), options, cache, new DefaultPointerKeyFactory()); ContextSelector def = new DefaultContextSelector(options, cha); ContextSelector contextSelector = appContextSelector == null ? def : new DelegatingContextSelector(appContextSelector, def); setContextSelector(contextSelector); SSAContextInterpreter c = new DefaultSSAInterpreter(options, cache); c = new DelegatingSSAContextInterpreter(ReflectionContextInterpreter.createReflectionContextInterpreter(cha, options, getAnalysisCache()), c); SSAContextInterpreter contextInterpreter = appContextInterpreter == null ? c : new DelegatingSSAContextInterpreter( appContextInterpreter, c); setContextInterpreter(contextInterpreter); ZeroXInstanceKeys zik = makeInstanceKeys(cha, options, contextInterpreter, instancePolicy); setInstanceKeys(zik); }