本文整理汇总了Java中gov.nasa.jpf.Config.getBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java Config.getBoolean方法的具体用法?Java Config.getBoolean怎么用?Java Config.getBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gov.nasa.jpf.Config
的用法示例。
在下文中一共展示了Config.getBoolean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: create
import gov.nasa.jpf.Config; //导入方法依赖的package包/类
@Override
public PredicateAbstraction create(Config config, String[]... args) {
Predicates predicates = new Predicates();
systemPredicates = createPredicates("predicates", systemPredicatesFilename); // Store a copy of the initial predicates
predicates.contexts.addAll(createPredicates("predicates", systemPredicatesFilename).contexts);
for (String[] arguments : args) {
predicates.contexts.addAll(createPredicates(arguments).contexts);
}
if (config.getBoolean("panda.verbose")) {
System.out.println(predicates.toString());
}
return new PredicateAbstraction(predicates);
}
示例2: HeuristicListener
import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public HeuristicListener(Config jpfConf, JPF jpf) {
super(jpfConf, jpf);
policiesEnabled = jpfConf.getBoolean(WorstCaseAnalyzer.ENABLE_POLICIES, WorstCaseAnalyzer.ENABLE_POLICIES_DEF);
if (policiesEnabled) {
PolicyManager policyManager = new PolicyManager(new File(getSerializedInputDir(jpfConf)));
try {
this.heuristicPolicy = policyManager.loadPolicy(measuredMethods, Policy.class);
} catch (IOException | PolicyManagerException e) {
logger.severe(e.getMessage());
throw new RuntimeException(e);
}
}
// Set termination strategy
this.terminationStrategy = jpfConf.getInstance(TERMINATION_STRATEGY_CONF,
TerminationStrategy.class, DEFAULT_TERMINATION_STRATEGY);
}
示例3: ObjectTracker
import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public ObjectTracker (Config conf, JPF jpf) {
includeClasses = StringSetMatcher.getNonEmpty(conf.getStringArray("ot.include"));
excludeClasses = StringSetMatcher.getNonEmpty(conf.getStringArray("ot.exclude", new String[] { "*" }));
trackedRefs = new SortedArrayIntSet();
int[] refs = conf.getIntArray("ot.refs");
if (refs != null){
for (int i=0; i<refs.length; i++){
trackedRefs.add(refs[i]);
}
}
logCalls = conf.getBoolean("ot.log_calls", true);
logFieldAccess = conf.getBoolean("ot.log_fields", true);
registerListener(jpf);
jpf.addPublisherExtension(ConsolePublisher.class, this);
}
示例4: 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);
}
示例5: ExecTracker
import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public ExecTracker (Config config) {
/** @jpfoption et.print_insn : boolean - print executed bytecode instructions (default=true). */
printInsn = config.getBoolean("et.print_insn", true);
/** @jpfoption et.print_src : boolean - print source lines (default=false). */
printSrc = config.getBoolean("et.print_src", false);
/** @jpfoption et.print_mth : boolean - print executed method names (default=false). */
printMth = config.getBoolean("et.print_mth", false);
/** @jpfoption et.skip_init : boolean - do not log execution before entering main() (default=true). */
skipInit = config.getBoolean("et.skip_init", true);
showShared = config.getBoolean("et.show_shared", true);
if (skipInit) {
skip = true;
}
out = new PrintWriter(System.out, true);
}
示例6: CoverageAnalyzer
import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public CoverageAnalyzer(Config conf, JPF jpf) {
includes = StringSetMatcher.getNonEmpty(conf.getStringArray("coverage.include"));
excludes = StringSetMatcher.getNonEmpty(conf.getStringArray("coverage.exclude"));
showMethods = conf.getBoolean("coverage.show_methods", false);
showMethodBodies = conf.getBoolean("coverage.show_bodies", false);
excludeHandlers = conf.getBoolean("coverage.exclude_handlers", false);
showBranchCoverage = conf.getBoolean("coverage.show_branches", true);
loadedOnly = conf.getBoolean("coverage.loaded_only", true);
showRequirements = conf.getBoolean("coverage.show_requirements", false);
if (!loadedOnly) {
getCoverageCandidates(); // this might take a little while
}
jpf.addPublisherExtension(ConsolePublisher.class, this);
}
示例7: 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");
}
}
示例8: 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;
}
示例9: 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);
}
示例10: GenericHeap
import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public GenericHeap (Config config, KernelState ks){
vm = VM.getVM();
pinDownList = new IntVector(256);
attributes |= ATTR_PINDOWN_CHANGED; // no need to clone on next add
if (config.getBoolean("vm.finalize", true)){
attributes |= ATTR_RUN_FINALIZER;
}
if (config.getBoolean("vm.sweep",true)){
attributes |= ATTR_GC;
}
}
示例11: CGMonitor
import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public CGMonitor (Config conf) {
showInsn = conf.getBoolean("cgm.show_insn", showInsn);
showChoice = conf.getBoolean("cgm.show_choice", showChoice);
showDepth = conf.getBoolean("cgm.show_depth", showDepth);
out = System.out;
}
示例12: init
import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public static boolean init (Config conf) {
loader = conf.getClassLoader();
peers = new HashMap<ClassInfo, NativePeer>();
peerPackages = getPeerPackages(conf);
config = conf;
noOrphanMethods = conf.getBoolean("vm.no_orphan_methods", false);
return true;
}
示例13: Reporter
import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public Reporter (Config conf, JPF jpf) {
this.conf = conf;
this.jpf = jpf;
search = jpf.getSearch();
vm = jpf.getVM();
int probeInterval = conf.getInt("report.probe_interval");
boolean reportStats = conf.getBoolean("report.statistics", false) || (probeInterval > 0);
started = new Date();
addConfiguredPublishers(conf);
for (Publisher publisher : publishers) {
if (reportStats || publisher.hasToReportStatistics()) {
reportStats = true;
}
if (publisher instanceof JPFListener) {
jpf.addListener((JPFListener)publisher);
}
}
if (reportStats){
getRegisteredStatistics();
}
if (probeInterval > 0){
probeTimer = createProbeIntervalTimer(probeInterval);
}
}
示例14: AllRunnablesSyncPolicy
import gov.nasa.jpf.Config; //导入方法依赖的package包/类
public AllRunnablesSyncPolicy (Config config){
breakSingleChoice = config.getBoolean("cg.break_single_choice", false);
breakLockRelease = config.getBoolean("cg.break_lock_release", true);
breakNotify = config.getBoolean("cg.break_notify", true);
breakSleep = config.getBoolean("cg.break_sleep", true);
breakYield = config.getBoolean("cg.break_yield", true);
breakPriority = config.getBoolean("cg.break_priority", true);
}
示例15: 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);
}