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


Java Config.getInt方法代码示例

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


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

示例1: init

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
/**
 * reset ThreadInfo statics (e.g. to reinitialize JPF) 
 */
static boolean init (Config config) {
  currentThread = null;
  
  globalTids = new HashMap<Integer, Integer>();

  String[] haltOnThrowSpecs = config.getStringArray("vm.halt_on_throw");
  if (haltOnThrowSpecs != null){
    haltOnThrow = new StringSetMatcher(haltOnThrowSpecs);
  }
  
  ignoreUncaughtHandlers = config.getBoolean( "vm.ignore_uncaught_handler", true);
  passUncaughtHandler = config.getBoolean( "vm.pass_uncaught_handler", true);

  maxTransitionLength = config.getInt("vm.max_transition_length", 5000);

  return true;
}
 
开发者ID:grzesuav,项目名称:gjpf-core,代码行数:21,代码来源:ThreadInfo.java

示例2: GenericSharednessPolicy

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
protected GenericSharednessPolicy (Config config){
  neverBreakInMethods = MethodSpecMatcher.create( config.getStringArray("vm.shared.never_break_methods"));
  
  neverBreakOnTypes = TypeSpecMatcher.create(config.getStringArray("vm.shared.never_break_types"));
  alwaysBreakOnTypes = TypeSpecMatcher.create(config.getStringArray("vm.shared.always_break_types"));
  
  neverBreakOnFields = FieldSpecMatcher.create( config.getStringArray("vm.shared.never_break_fields"));
  alwaysBreakOnFields = FieldSpecMatcher.create( config.getStringArray("vm.shared.always_break_fields"));
  
  skipFinals = config.getBoolean("vm.shared.skip_finals", true);
  skipConstructedFinals = config.getBoolean("vm.shared.skip_constructed_finals", false);
  skipStaticFinals = config.getBoolean("vm.shared.skip_static_finals", true);
  skipInits = config.getBoolean("vm.shared.skip_inits", true);
  
  breakOnExposure = config.getBoolean("vm.shared.break_on_exposure", true);
  
  useSyncDetection = config.getBoolean("vm.shared.sync_detection", true);
  lockThreshold = config.getInt("vm.shared.lockthreshold", 5);  
}
 
开发者ID:grzesuav,项目名称:jpf-core,代码行数:20,代码来源:GenericSharednessPolicy.java

示例3: IdleFilter

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public IdleFilter(Config config) {
  maxBackJumps = config.getInt("idle.max_backjumps", 500);

  String act = config.getString("idle.action", "break");
  if ("warn".equalsIgnoreCase(act)){
    action = Action.WARN;
  } else if ("break".equalsIgnoreCase(act)){
    action = Action.BREAK;
  } else if ("yield".equalsIgnoreCase(act)){
    action = Action.YIELD;
  } else if ("prune".equalsIgnoreCase(act)){
    action = Action.PRUNE;
  } else if ("jump".equalsIgnoreCase(act)){
    action = Action.JUMP;
  } else {
    throw new JPFConfigException("unknown IdleFilter action: " +act);
  }

}
 
开发者ID:grzesuav,项目名称:jpf-core,代码行数:20,代码来源:IdleFilter.java

示例4: WorstCaseAnalyzer

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public WorstCaseAnalyzer(Config config) {
  this.config = config;
  this.verbose = config.getBoolean(VERBOSE_CONF, true);
  this.rootDir = Util.createDirIfNotExist(config.getString(OUTPUT_DIR_CONF, ""));
  this.serializedDir = Util.createDirIfNotExist(rootDir, "serialized");
  this.startAt = config.getInt(START_AT_CONF, 1);
  this.incr = config.getInt(INCR_CONF, 1);
  if (verbose) {
    this.auxDir = Util.createDirIfNotExist(rootDir, "verbose");
    this.policyDir = Util.createDirIfNotExist(auxDir, "policy");
    this.heuristicDir = Util.createDirIfNotExist(auxDir, "heuristic");
  }
}
 
开发者ID:isstac,项目名称:spf-wca,代码行数:14,代码来源:WorstCaseAnalyzer.java

示例5: performAnalysis

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
private DataCollection performAnalysis(Config jpfConf) {
  boolean noSolver = jpfConf.getBoolean(NO_SOLVER_HEURISTIC_CONF, false);
  if (noSolver) {
    jpfConf.setProperty("symbolic.dp", "no_solver");
  }
  int maxInput = jpfConf.getInt(MAX_INPUT_CONF);
  jpfConf.setProperty("report.console.class", HeuristicResultsPublisher.class.getName());

  DataCollection dataCollection = new DataCollection();

  for (int inputSize = this.startAt; inputSize <= maxInput; inputSize += this.incr) {//TODO: should maxInput be included?
    logger.info("Exploring with heuristic input size " + inputSize + "...");
    jpfConf.setProperty("target.args", "" + inputSize);
    JPF jpf = new JPF(jpfConf);
    HeuristicListener heuristic = new HeuristicListener(jpfConf, jpf);
    jpf.addListener(heuristic); //weird instantiation...

    //explore guided by policy
    long start = System.currentTimeMillis();
    runJPF(jpf);
    long end = System.currentTimeMillis();

    logger.info("Heuristic exploration at input size " + inputSize + " done. Took " + ((end - start) / 1000) + "s");

    WorstCasePath wcPath = heuristic.getWcPath();

    if (wcPath == null) {
      logger.severe("No worst case path found for input size " + inputSize);
    } else {
      State wcState = wcPath.getWCState();
      dataCollection.addDatapoint(inputSize, wcState.getWC());
    }
  }
  return dataCollection;
}
 
开发者ID:isstac,项目名称:spf-wca,代码行数:36,代码来源:WorstCaseAnalyzer.java

示例6: ResultsPublisher

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public ResultsPublisher(Config conf, Reporter reporter) {
  super(conf, reporter);
  this.conf = conf;
  this.cfgInputSize = conf.getInt(CFG_INPUT_SIZE_CONF, -1);
  String resultsFile = conf.getString("target") + ".csv";

  this.generateSMTLibFormat = conf.getBoolean(SMTLIB_CONF, false);
  this.generateOmegaFormat = conf.getBoolean(OMEGA_CONF, false);
  baseDir = getResultsDir(conf);
  
  file = new File(baseDir, resultsFile);
}
 
开发者ID:isstac,项目名称:spf-wca,代码行数:13,代码来源:ResultsPublisher.java

示例7: HeapTracker

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public HeapTracker (Config config, JPF jpf) {
  maxHeapSizeLimit = config.getInt("heap.size_limit", -1);
  maxLiveLimit = config.getInt("heap.live_limit", -1);
  throwOutOfMemory = config.getBoolean("heap.throw_exception");
  showTypeStats = config.getBoolean("heap.show_types");
  maxTypesShown = config.getInt("heap.max_types", 20);

  includes = StringSetMatcher.getNonEmpty(config.getStringArray("heap.include"));
  excludes = StringSetMatcher.getNonEmpty(config.getStringArray("heap.exclude"));

  jpf.addPublisherExtension(ConsolePublisher.class, this);
}
 
开发者ID:grzesuav,项目名称:gjpf-core,代码行数:13,代码来源:HeapTracker.java

示例8: IntIntervalGenerator

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public IntIntervalGenerator(Config conf, String id) {
  super(id);
  min = conf.getInt(id + ".min");
  max = conf.getInt(id + ".max");
  delta = conf.getInt(id + ".delta", 1);

  reset();
}
 
开发者ID:grzesuav,项目名称:gjpf-core,代码行数:9,代码来源:IntIntervalGenerator.java

示例9: StateSpaceAnalyzer

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public StateSpaceAnalyzer(Config config, JPF jpf) {
  m_maxStates = config.getInt("ssa.max_states", -1);
  m_maxTime = config.getDuration("ssa.max_time", -1);
  m_maxMemory = config.getMemorySize("ssa.max_memory", -1);
  m_maxChoices = config.getInt("ssa.max_choices", -1);
  m_maxOutputLines = config.getInt("ssa.max_output_lines", 10);

  initGroupers(config);

  jpf.addPublisherExtension(ConsolePublisher.class, this);
}
 
开发者ID:grzesuav,项目名称:gjpf-core,代码行数:12,代码来源:StateSpaceAnalyzer.java

示例10: ChoiceSelector

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public ChoiceSelector (Config config, JPF jpf) {
  random = new Random( config.getInt("choice.seed", 42));

  threadSet = StringSetMatcher.getNonEmpty(config.getStringArray("choice.threads"));
  if (threadSet != null) {
    threadsAlive = false;
  }

  calls = StringSetMatcher.getNonEmpty(config.getStringArray("choice.calls"));
  callSeen = false;

  startDepth = config.getInt("choice.depth", -1);
  if (startDepth != -1) {
    depthReached = false;
  }

  // if nothing was specified, we just do single choice (simulation)
  if ((threadSet == null) && (calls == null) && (startDepth == -1)) {
    threadsAlive = false;
    callSeen = false;
    depthReached = false;
  }

  VM vm = jpf.getVM();
  trace = ChoicePoint.readTrace(config.getString("choice.use_trace"), vm.getSUTName());
  searchAfterTrace = config.getBoolean("choice.search_after_trace", true);
  vm.setTraceReplay(trace != null);
}
 
开发者ID:grzesuav,项目名称:gjpf-core,代码行数:29,代码来源:ChoiceSelector.java

示例11: MethodAnalyzer

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public MethodAnalyzer (Config config, JPF jpf){
  jpf.addPublisherExtension(ConsolePublisher.class, this);
  
  maxHistory = config.getInt("method.max_history", Integer.MAX_VALUE);
  format = config.getString("method.format", "raw");
  skipInit = config.getBoolean("method.skip_init", true);
  showDepth = config.getBoolean("method.show_depth", false);
  showTransition = config.getBoolean("method.show_transition", false);
  
  includes = StringSetMatcher.getNonEmpty(config.getStringArray("method.include"));
  excludes = StringSetMatcher.getNonEmpty(config.getStringArray("method.exclude"));
  
  vm = jpf.getVM();
  search = jpf.getSearch();
}
 
开发者ID:grzesuav,项目名称:jpf-core,代码行数:16,代码来源:MethodAnalyzer.java

示例12: 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

示例13: AllPoliciesExtractor

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public AllPoliciesExtractor(Config config) {
  this.from = config.getInt(SIZE_FROM,1);
  this.to = config.getInt(SIZE_TO,1);
  this.conf = config;
}
 
开发者ID:isstac,项目名称:spf-wca,代码行数:6,代码来源:AllPoliciesExtractor.java

示例14: 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

示例15: MinimizePreemption

import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public MinimizePreemption (Config config, VM vm) {
  super(config,vm);
  
  threshold = config.getInt("search.mp.threshold", Integer.MAX_VALUE);
}
 
开发者ID:grzesuav,项目名称:gjpf-core,代码行数:6,代码来源:MinimizePreemption.java


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