当前位置: 首页>>代码示例>>Java>>正文


Java Config.hasValue方法代码示例

本文整理汇总了Java中gov.nasa.jpf.Config.hasValue方法的典型用法代码示例。如果您正苦于以下问题:Java Config.hasValue方法的具体用法?Java Config.hasValue怎么用?Java Config.hasValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gov.nasa.jpf.Config的用法示例。


在下文中一共展示了Config.hasValue方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initialize

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
/**
 * initialize object from config file
 * 
 * @param conf 
 */
private void initialize(Config conf) {
  // create a constraint solver
  ConstraintSolverFactory cFactory = new ConstraintSolverFactory(conf);
  this.solver = cFactory.createSolver(conf);
  
  // parse symbolic method info
  if(conf.hasValue(CONF_PREFIX + ".method")) {
    String id = conf.getString(CONF_PREFIX + ".method");
    ConcolicMethodConfig mc = ConcolicMethodConfig.read(id, CONF_PREFIX + ".method." + id, conf);
    registerConcolicMethod(mc);
  }
  
  // parse termination
  this.termination = parseTerminationStrategy(conf);
}
 
开发者ID:psycopaths,项目名称:jdart,代码行数:21,代码来源:ConcolicConfig.java

示例2: PathListener

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public PathListener(Config jpfConf, JPF jpf) {
  this.jpfConf = jpfConf;
  
  //TODO: we can make this even more precise by also allowing specifying the EXACT 
  //call (e.g. src line number + class) after which count collection should start 
  if(!jpfConf.hasValue(MEASURED_METHODS) && !jpfConf.hasValue(SYMBOLIC_METHODS)) {
    RuntimeException e = new RuntimeException("Must set either " + MEASURED_METHODS + " or " + SYMBOLIC_METHODS);
    logger.severe(e.getMessage());
    throw e;
  }
  this.measuredMethods = getMeasuredMethods(this.jpfConf);
  this.symbolicMethods = getSymbolicMethods(this.jpfConf);
  logger.info("Measured methods: " + this.measuredMethods.toString());
  
  this.policyManager = new PolicyManager(this.getPolicyBaseDir(jpfConf));
  if(this.visualize(this.jpfConf))
    this.visDir = this.getVisualizationDir(this.jpfConf);
  
  this.showInstrs = jpfConf.getBoolean(SHOW_INSTRS_CONF, false);
  
  this.ctxManager = new ContextManager();
  
  //Initialize state
  if(jpfConf.hasValue(WORST_CASE_STATE_BLDR_CONF)) {
    this.stateBuilder = jpfConf.getInstance(WORST_CASE_STATE_BLDR_CONF, StateBuilder.class);
  } else
    this.stateBuilder = new DepthState.DepthStateBuilder();
  
  if(jpfConf.hasValue(POLICY_GENERATOR_CLS_CONF)) {
    this.policyGenerator = jpfConf.getInstance(POLICY_GENERATOR_CLS_CONF, PolicyGenerator.class);
    this.worstCasePathBuilder = new WorstCasePath.Builder(ctxManager);
  } else {
    HistoryBasedPolicy.Builder histGenerator = new HistoryBasedPolicy.Builder();
    if(jpfConf.hasValue(HISTORY_SIZE_CONF)) {
      this.historySize = jpfConf.getInt(HISTORY_SIZE_CONF);
      histGenerator.setMaxHistorySize(historySize);
      this.worstCasePathBuilder = new WorstCasePath.Builder(ctxManager, historySize);
    } else { // adaptive by default
      histGenerator.setAdaptive(true);
      this.worstCasePathBuilder = new WorstCasePath.Builder(ctxManager);
    }
    this.policyGenerator = histGenerator;
  }

  this.wcPath = null;
}
 
开发者ID:isstac,项目名称:spf-wca,代码行数:47,代码来源:PathListener.java

示例3: visualize

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
@Override
public boolean visualize(Config jpfConf) {
  return jpfConf.hasValue(VIS_OUTPUT_PATH_CONF);
}
 
开发者ID:isstac,项目名称:spf-wca,代码行数:5,代码来源:PolicyGeneratorListener.java

示例4: serialize

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
@Override
public boolean serialize(Config jpfConf) {
  return jpfConf.hasValue(SER_OUTPUT_PATH);
}
 
开发者ID:isstac,项目名称:spf-wca,代码行数:5,代码来源:HeuristicListener.java

示例5: parse

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public void parse(String prefix, Config config) {
  String maxDepthKey = prefix + ".max_depth";
  if(config.hasValue(maxDepthKey)) {
    this.treeMaxDepth = config.getInt(maxDepthKey);
  }
  String maxAltDepthKey = prefix + ".max_alt_depth";
  if(config.hasValue(maxAltDepthKey)) {
    this.treeMaxAltDepth = config.getInt(maxAltDepthKey);
  }
  
  String maxNestDepthKey = prefix + ".max_nesting_depth";
  if(config.hasValue(maxNestDepthKey)) {
    this.maxNestingDepth = config.getInt(maxNestDepthKey);
  }
  
  String constrKey = prefix + ".constraints";
  if(config.hasValue(constrKey)) {
    String constraintsStr = config.getString(constrKey);
    setConstraints(constraintsStr);
  }

  String fdefKey = prefix + ".use_func_defs";
  if(config.hasValue(fdefKey)) {
    this.loadAxioms = config.getBoolean(fdefKey);
  }
  
  String explPrefix = prefix + ".exploration.";
  String explInitiallyKey = explPrefix + "initial";
  if(config.hasValue(explInitiallyKey)) {
    this.exploreInitially = config.getBoolean(explInitiallyKey);
  }
  String suspendKey = explPrefix + "suspend";
  if(config.hasValue(suspendKey)) {
    setSuspendExploration(config.getString(suspendKey));
  }
  String resumeKey = explPrefix + "resume";
  if(config.hasValue(resumeKey)) {
    setResumeExploration(config.getString(resumeKey));
  }
  
  
  String symbPrefix = prefix + ".symbolic.";
  String symbStaticKey = symbPrefix + "statics";
  if(config.hasValue(symbStaticKey)) {
    String symbStaticStr = config.getString(symbStaticKey);
    setSymbolicStatics(symbStaticStr);
  }
  
  String symbExclKey = symbPrefix + "exclude";
  if(config.hasValue(symbExclKey)) {
    String symbExclStr = config.getString(symbExclKey);
    setSymbolicFieldsExclude(symbExclStr);
  }
  
  String symbInclKey = symbPrefix + "include";
  if(config.hasValue(symbInclKey)) {
    String symbInclStr = config.getString(symbInclKey);
    setSymbolicFieldsInclude(symbInclStr);
  }
  
}
 
开发者ID:psycopaths,项目名称:jdart,代码行数:62,代码来源:AnalysisConfig.java

示例6: parseTerminationStrategy

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public static TerminationStrategy parseTerminationStrategy(Config conf) {
  if (!conf.hasValue("jdart.termination")) {
    return new NeverTerminate();     
  }
  return parseTerminationStrategy(conf.getProperty("jdart.termination"));
}
 
开发者ID:psycopaths,项目名称:jdart,代码行数:7,代码来源:ConcolicConfig.java


注:本文中的gov.nasa.jpf.Config.hasValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。