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); }
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); }
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; }
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; }
private SSAContextInterpreter setupSSAContextInterpreter(IClassHierarchy cha, JSAnalysisOptions options, IAnalysisCacheView cache, SSAContextInterpreter appContextInterpreter) { SSAContextInterpreter contextInterpreter = makeDefaultContextInterpreters(appContextInterpreter, options, cha); if (options.handleCallApply()) { contextInterpreter = new DelegatingSSAContextInterpreter(new JavaScriptFunctionApplyContextInterpreter(options, cache), contextInterpreter); } setContextInterpreter(contextInterpreter); return contextInterpreter; }
/** * 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); }
private SSAContextInterpreter setupSSAContextInterpreter(IClassHierarchy cha, JSAnalysisOptions options, IAnalysisCacheView cache, SSAContextInterpreter appContextInterpreter) { SSAContextInterpreter contextInterpreter = makeDefaultContextInterpreters(appContextInterpreter, options, cha); if (options.handleCallApply()) { contextInterpreter = new DelegatingSSAContextInterpreter(new JavaScriptFunctionApplyContextInterpreter(options, cache), contextInterpreter); } setContextInterpreter(contextInterpreter); return contextInterpreter; }
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); }
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); }
result = new DelegatingSSAContextInterpreter(new FactoryBypassInterpreter(options, iAnalysisCacheView), result); result = new DelegatingSSAContextInterpreter(new GetClassContextInterpeter(), new DelegatingSSAContextInterpreter( new DelegatingSSAContextInterpreter(new ClassFactoryContextInterpreter(), new ClassNewInstanceContextInterpreter(cha)), result)); result = new DelegatingSSAContextInterpreter(new ReflectiveInvocationInterpreter(), new DelegatingSSAContextInterpreter( new JavaLangClassContextInterpreter(), result)); result = new DelegatingSSAContextInterpreter(new GetMethodContextInterpreter(),result);
result = new DelegatingSSAContextInterpreter(new FactoryBypassInterpreter(options, iAnalysisCacheView), result); result = new DelegatingSSAContextInterpreter(new GetClassContextInterpeter(), new DelegatingSSAContextInterpreter( new DelegatingSSAContextInterpreter(new ClassFactoryContextInterpreter(), new ClassNewInstanceContextInterpreter(cha)), result)); result = new DelegatingSSAContextInterpreter(new ReflectiveInvocationInterpreter(), new DelegatingSSAContextInterpreter( new JavaLangClassContextInterpreter(), result)); result = new DelegatingSSAContextInterpreter(new GetMethodContextInterpreter(),result);
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); }
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); }
public static void analyzeMethodHandles(AnalysisOptions options, SSAPropagationCallGraphBuilder builder) { options.setSelector(new InvokeExactTargetSelector(options.getMethodTargetSelector())); builder.setContextSelector(new ContextSelectorImpl(builder.getContextSelector())); builder.setContextInterpreter(new DelegatingSSAContextInterpreter(new InvokeContextInterpreterImpl(), builder.getCFAContextInterpreter())); builder.setContextInterpreter(new DelegatingSSAContextInterpreter(new FindContextInterpreterImpl(), builder.getCFAContextInterpreter())); } }
public static void analyzeMethodHandles(AnalysisOptions options, SSAPropagationCallGraphBuilder builder) { options.setSelector(new InvokeExactTargetSelector(options.getMethodTargetSelector())); builder.setContextSelector(new ContextSelectorImpl(builder.getContextSelector())); builder.setContextInterpreter(new DelegatingSSAContextInterpreter(new InvokeContextInterpreterImpl(), builder.getCFAContextInterpreter())); builder.setContextInterpreter(new DelegatingSSAContextInterpreter(new FindContextInterpreterImpl(), builder.getCFAContextInterpreter())); } }
interpreter = new DelegatingSSAContextInterpreter(new JavaScriptFunctionApplyContextInterpreter(options, cache), interpreter);
interpreter = new DelegatingSSAContextInterpreter(new JavaScriptFunctionApplyContextInterpreter(options, cache), interpreter);