com.ibm.wala.ipa.callgraph.impl.Util.addDefaultSelectors()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(12.6k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中com.ibm.wala.ipa.callgraph.impl.Util.addDefaultSelectors()方法的一些代码示例,展示了Util.addDefaultSelectors()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.addDefaultSelectors()方法的具体详情如下:
包路径:com.ibm.wala.ipa.callgraph.impl.Util
类名称:Util
方法名:addDefaultSelectors

Util.addDefaultSelectors介绍

[英]Set up an AnalysisOptions object with default selectors, corresponding to class hierarchy lookup
[中]使用默认选择器设置AnalysisOptions对象,对应于类层次结构查找

代码示例

代码示例来源:origin: com.ibm.wala/com.ibm.wala.core

public static SSAPropagationCallGraphBuilder makeZeroOneContainerCFABuilder(AnalysisOptions options, IAnalysisCacheView cache,
  IClassHierarchy cha, AnalysisScope scope, ContextSelector appSelector, SSAContextInterpreter appInterpreter) {
 if (options == null) {
  throw new IllegalArgumentException("options is null");
 }
 addDefaultSelectors(options, cha);
 addDefaultBypassLogic(options, scope, Util.class.getClassLoader(), cha);
 return new ZeroXContainerCFABuilder(cha, options, cache, appSelector, appInterpreter, ZeroXInstanceKeys.ALLOCATIONS | ZeroXInstanceKeys.SMUSH_MANY | ZeroXInstanceKeys.SMUSH_PRIMITIVE_HOLDERS
   | ZeroXInstanceKeys.SMUSH_STRINGS | ZeroXInstanceKeys.SMUSH_THROWABLES);
}

代码示例来源:origin: wala/WALA

public static SSAPropagationCallGraphBuilder makeZeroOneContainerCFABuilder(AnalysisOptions options, IAnalysisCacheView cache,
  IClassHierarchy cha, AnalysisScope scope, ContextSelector appSelector, SSAContextInterpreter appInterpreter) {
 if (options == null) {
  throw new IllegalArgumentException("options is null");
 }
 addDefaultSelectors(options, cha);
 addDefaultBypassLogic(options, scope, Util.class.getClassLoader(), cha);
 return new ZeroXContainerCFABuilder(cha, options, cache, appSelector, appInterpreter, ZeroXInstanceKeys.ALLOCATIONS | ZeroXInstanceKeys.SMUSH_MANY | ZeroXInstanceKeys.SMUSH_PRIMITIVE_HOLDERS
   | ZeroXInstanceKeys.SMUSH_STRINGS | ZeroXInstanceKeys.SMUSH_THROWABLES);
}

代码示例来源:origin: wala/WALA

public CallGraphBuilder<InstanceKey> make(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) {
  Util.addDefaultSelectors(options, cha);
  Util.addDefaultBypassLogic(options, scope, Util.class.getClassLoader(), cha);
  return new AstJavaZeroOneContainerCFABuilder(cha, options, cache, null, null);
 }
}

代码示例来源:origin: wala/WALA

public CallGraphBuilder<InstanceKey> make(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) {
  Util.addDefaultSelectors(options, cha);
  Util.addDefaultBypassLogic(options, scope, Util.class.getClassLoader(), cha);
  return new AstJavaZeroXCFABuilder(cha, options, cache, null, null, ZeroXInstanceKeys.NONE);
 }
}

代码示例来源:origin: com.ibm.wala/com.ibm.wala.cast.java

public CallGraphBuilder<InstanceKey> make(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) {
  Util.addDefaultSelectors(options, cha);
  Util.addDefaultBypassLogic(options, scope, Util.class.getClassLoader(), cha);
  return new AstJavaZeroOneContainerCFABuilder(cha, options, cache, null, null);
 }
}

代码示例来源:origin: com.ibm.wala/com.ibm.wala.cast.java

public CallGraphBuilder<InstanceKey> make(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope) {
  Util.addDefaultSelectors(options, cha);
  Util.addDefaultBypassLogic(options, scope, Util.class.getClassLoader(), cha);
  return new AstJavaZeroXCFABuilder(cha, options, cache, null, null, ZeroXInstanceKeys.NONE);
 }
}

代码示例来源:origin: wala/WALA

/**
 * @return an RTA Call Graph builder.
 * 
 * @param options options that govern call graph construction
 * @param cha governing class hierarchy
 * @param scope representation of the analysis scope
 */
public static CallGraphBuilder makeRTABuilder(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha,
  AnalysisScope scope) {
 addDefaultSelectors(options, cha);
 addDefaultBypassLogic(options, scope, Util.class.getClassLoader(), cha);
 return new BasicRTABuilder(cha, options, cache, null, null);
}

代码示例来源:origin: com.ibm.wala/com.ibm.wala.core

/**
 * @return an RTA Call Graph builder.
 * 
 * @param options options that govern call graph construction
 * @param cha governing class hierarchy
 * @param scope representation of the analysis scope
 */
public static CallGraphBuilder makeRTABuilder(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha,
  AnalysisScope scope) {
 addDefaultSelectors(options, cha);
 addDefaultBypassLogic(options, scope, Util.class.getClassLoader(), cha);
 return new BasicRTABuilder(cha, options, cache, null, null);
}

代码示例来源:origin: wala/WALA

/**
 * @param options options that govern call graph construction
 * @param cha governing class hierarchy
 * @param scope representation of the analysis scope
 * @param customSelector user-defined context selector, or null if none
 * @param customInterpreter user-defined context interpreter, or null if none
 * @return a 0-CFA Call Graph Builder.
 * @throws IllegalArgumentException if options is null
 */
public static SSAPropagationCallGraphBuilder makeZeroCFABuilder(Language l, AnalysisOptions options, IAnalysisCacheView cache,
  IClassHierarchy cha, AnalysisScope scope, ContextSelector customSelector, SSAContextInterpreter customInterpreter) {
 if (options == null) {
  throw new IllegalArgumentException("options is null");
 }
 addDefaultSelectors(options, cha);
 addDefaultBypassLogic(options, scope, Util.class.getClassLoader(), cha);
 return ZeroXCFABuilder.make(l, cha, options, cache, customSelector, customInterpreter, ZeroXInstanceKeys.NONE);
}

代码示例来源:origin: wala/WALA

/**
 * @param options options that govern call graph construction
 * @param cha governing class hierarchy
 * @param scope representation of the analysis scope
 * @param customSelector user-defined context selector, or null if none
 * @param customInterpreter user-defined context interpreter, or null if none
 * @return a 0-1-CFA Call Graph Builder.
 * @throws IllegalArgumentException if options is null
 */
public static SSAPropagationCallGraphBuilder makeVanillaZeroOneCFABuilder(Language l, AnalysisOptions options, IAnalysisCacheView analysisCache,
  IClassHierarchy cha, AnalysisScope scope, ContextSelector customSelector, SSAContextInterpreter customInterpreter) {
 if (options == null) {
  throw new IllegalArgumentException("options is null");
 }
 addDefaultSelectors(options, cha);
 addDefaultBypassLogic(options, scope, Util.class.getClassLoader(), cha);
 return ZeroXCFABuilder.make(l, cha, options, analysisCache, customSelector, customInterpreter, ZeroXInstanceKeys.ALLOCATIONS | ZeroXInstanceKeys.CONSTANT_SPECIFIC);
}

代码示例来源:origin: wala/WALA

/**
 * @param options options that govern call graph construction
 * @param cha governing class hierarchy
 * @param scope representation of the analysis scope
 * @return a 0-CFA Call Graph Builder augmented with extra logic for containers
 * @throws IllegalArgumentException if options is null
 */
public static SSAPropagationCallGraphBuilder makeZeroContainerCFABuilder(AnalysisOptions options, IAnalysisCacheView cache,
  IClassHierarchy cha, AnalysisScope scope) {
 if (options == null) {
  throw new IllegalArgumentException("options is null");
 }
 addDefaultSelectors(options, cha);
 addDefaultBypassLogic(options, scope, Util.class.getClassLoader(), cha);
 ContextSelector appSelector = null;
 SSAContextInterpreter appInterpreter = null;
 return new ZeroXContainerCFABuilder(cha, options, cache, appSelector, appInterpreter, ZeroXInstanceKeys.NONE);
}

代码示例来源:origin: com.ibm.wala/com.ibm.wala.core

/**
 * @param options options that govern call graph construction
 * @param cha governing class hierarchy
 * @param scope representation of the analysis scope
 * @param customSelector user-defined context selector, or null if none
 * @param customInterpreter user-defined context interpreter, or null if none
 * @return a 0-1-CFA Call Graph Builder.
 * @throws IllegalArgumentException if options is null
 */
public static SSAPropagationCallGraphBuilder makeVanillaZeroOneCFABuilder(Language l, AnalysisOptions options, IAnalysisCacheView analysisCache,
  IClassHierarchy cha, AnalysisScope scope, ContextSelector customSelector, SSAContextInterpreter customInterpreter) {
 if (options == null) {
  throw new IllegalArgumentException("options is null");
 }
 addDefaultSelectors(options, cha);
 addDefaultBypassLogic(options, scope, Util.class.getClassLoader(), cha);
 return ZeroXCFABuilder.make(l, cha, options, analysisCache, customSelector, customInterpreter, ZeroXInstanceKeys.ALLOCATIONS | ZeroXInstanceKeys.CONSTANT_SPECIFIC);
}

代码示例来源:origin: com.ibm.wala/com.ibm.wala.core

/**
 * @param options options that govern call graph construction
 * @param cha governing class hierarchy
 * @param scope representation of the analysis scope
 * @param customSelector user-defined context selector, or null if none
 * @param customInterpreter user-defined context interpreter, or null if none
 * @return a 0-1-CFA Call Graph Builder.
 * @throws IllegalArgumentException if options is null
 */
public static SSAPropagationCallGraphBuilder makeZeroOneCFABuilder(Language l, AnalysisOptions options, IAnalysisCacheView cache,
  IClassHierarchy cha, AnalysisScope scope, ContextSelector customSelector, SSAContextInterpreter customInterpreter) {
 if (options == null) {
  throw new IllegalArgumentException("options is null");
 }
 addDefaultSelectors(options, cha);
 addDefaultBypassLogic(options, scope, Util.class.getClassLoader(), cha);
 return ZeroXCFABuilder.make(l, cha, options, cache, customSelector, customInterpreter, ZeroXInstanceKeys.ALLOCATIONS | ZeroXInstanceKeys.SMUSH_MANY | ZeroXInstanceKeys.SMUSH_PRIMITIVE_HOLDERS
   | ZeroXInstanceKeys.SMUSH_STRINGS | ZeroXInstanceKeys.SMUSH_THROWABLES);
}

代码示例来源:origin: wala/WALA

/**
 * @param options options that govern call graph construction
 * @param cha governing class hierarchy
 * @param cl classloader that can find DOMO resources
 * @param scope representation of the analysis scope
 * @param xmlFiles set of Strings that are names of XML files holding bypass logic specifications.
 * @return a 0-1-Opt-CFA Call Graph Builder.
 */
public static AstJavaCFABuilder make(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, ClassLoader cl,
  AnalysisScope scope, String[] xmlFiles, byte instancePolicy) {
 com.ibm.wala.ipa.callgraph.impl.Util.addDefaultSelectors(options, cha);
 for (String xmlFile : xmlFiles) {
  com.ibm.wala.ipa.callgraph.impl.Util.addBypassLogic(options, scope, cl, xmlFile, cha);
 }
 return new AstJavaZeroXCFABuilder(cha, options, cache, null, null, instancePolicy);
}

代码示例来源:origin: com.ibm.wala/com.ibm.wala.cast.java

/**
 * @param options options that govern call graph construction
 * @param cha governing class hierarchy
 * @param cl classloader that can find DOMO resources
 * @param scope representation of the analysis scope
 * @param xmlFiles set of Strings that are names of XML files holding bypass logic specifications.
 * @return a 0-1-Opt-CFA Call Graph Builder.
 */
public static AstJavaCFABuilder make(AnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, ClassLoader cl,
  AnalysisScope scope, String[] xmlFiles, byte instancePolicy) {
 com.ibm.wala.ipa.callgraph.impl.Util.addDefaultSelectors(options, cha);
 for (String xmlFile : xmlFiles) {
  com.ibm.wala.ipa.callgraph.impl.Util.addBypassLogic(options, scope, cl, xmlFile, cha);
 }
 return new AstJavaZeroXCFABuilder(cha, options, cache, null, null, instancePolicy);
}

代码示例来源:origin: com.ibm.wala/com.ibm.wala.cast.js

public CallGraphBuilder<InstanceKey> make(JSAnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) {
  com.ibm.wala.ipa.callgraph.impl.Util.addDefaultSelectors(options, cha);
  options.setSelector(new StandardFunctionTargetSelector(cha, options.getMethodTargetSelector()));

  return new JSZeroOrOneXCFABuilder(cha, options, cache, null, null, ZeroXInstanceKeys.NONE, true);
 }
}

代码示例来源:origin: wala/WALA

public CallGraphBuilder<InstanceKey> make(JSAnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) {
  com.ibm.wala.ipa.callgraph.impl.Util.addDefaultSelectors(options, cha);
  options.setSelector(new StandardFunctionTargetSelector(cha, options.getMethodTargetSelector()));

  return new JSZeroOrOneXCFABuilder(cha, options, cache, null, null, ZeroXInstanceKeys.NONE, true);
 }
}

代码示例来源:origin: wala/WALA

public CallGraphBuilder<InstanceKey> make(JSAnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) {
  com.ibm.wala.ipa.callgraph.impl.Util.addDefaultSelectors(options, cha);
  options.setSelector(new StandardFunctionTargetSelector(cha, options.getMethodTargetSelector()));

  return new JSZeroOrOneXCFABuilder(cha, options, cache, null, null, ZeroXInstanceKeys.NONE, false);
 }
}

代码示例来源:origin: com.ibm.wala/com.ibm.wala.cast.js

public CallGraphBuilder<InstanceKey> make(JSAnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) {
  com.ibm.wala.ipa.callgraph.impl.Util.addDefaultSelectors(options, cha);
  options.setSelector(new StandardFunctionTargetSelector(cha, options.getMethodTargetSelector()));

  return new JSZeroOrOneXCFABuilder(cha, options, cache, null, null, ZeroXInstanceKeys.NONE, false);
 }
}

代码示例来源:origin: wala/WALA

public static void addDefaultDispatchLogic(AnalysisOptions options, IClassHierarchy cha) {
 com.ibm.wala.ipa.callgraph.impl.Util.addDefaultSelectors(options, cha);
 Map<Atom,MethodTargetSelector> methodTargetSelectors = HashMapFactory.make();
 methodTargetSelectors.put(JavaScriptLoader.JS.getName(), new JavaScriptConstructTargetSelector(cha,
   new StandardFunctionTargetSelector(cha, options.getMethodTargetSelector())));
 methodTargetSelectors.put(Language.JAVA.getName(), options.getMethodTargetSelector());
 options.setSelector(new CrossLanguageMethodTargetSelector(methodTargetSelectors));
}

相关文章