> getRefiner(BuilderStrategy > getRefiner(
+ BuilderStrategy > getRefiner(BuilderStrategy > getRefiner(
+ BuilderStrategy > getRefiner(BuilderStrategy > getRefiner(
+ BuilderStrategy > getRefiner(BuilderStrategy > getRefiner(
+ BuilderStrategy > getRefiner(BuilderStrategy > getRefiner(
+ BuilderStrategy > getRefiner(BuilderStrategy > getRefiner(
+ BuilderStrategy > getRefiner(BuilderStrategy > getRefiner(
+ BuilderStrategy > getRefiner(BuilderStrategy > getRefiner(
+ BuilderStrategy > getRefiner(BuilderStrategy > getRefiner(
+ BuilderStrategy > getRefiner(BuilderStrategy > getRefiner(
+ BuilderStrategy > getRefiner(BuilderStrategy > getRefiner(
+ BuilderStrategy > getRefiner(BuilderStrategy > getRefiner(
+ BuilderStrategy > getRefiner(BuilderStrategy > getRefiner(
+ BuilderStrategy > getRefiner(BuilderStrategy > getRefiner(
+ BuilderStrategy > getRefiner(BuilderStrategy > getRefiner(
+ BuilderStrategy CfaPrec createPrec(final P innerPrec) {
}
@Override
- public , R> createRefiner(
- final RefutationToPrec refToPrec) {
+ public , R> createRefiner(
+ final RefutationToPrec refToPrec) {
return GlobalCfaPrecRefiner.create(refToPrec);
}
@@ -320,8 +528,9 @@ public CfaPrec createPrec(final P innerPrec) {
}
@Override
- public , R> createRefiner(
- final RefutationToPrec refToPrec) {
+ public , R> createRefiner(
+ final RefutationToPrec refToPrec) {
return LocalCfaPrecRefiner.create(refToPrec);
}
@@ -333,8 +542,10 @@ public CfaPrec CfaPrec createPrec(P innerPrec);
- public abstract , R> createRefiner(
- RefutationToPrec refToPrec);
+ public abstract <
+ S extends ExprState, A extends Action, P extends Prec, R extends Refutation>
+ PrecRefiner , R> createRefiner(
+ RefutationToPrec refToPrec);
public abstract CfaPrec getItpRefToPrec();
public RefutationToPrec getVarsRefToPrec() {
- throw new UnsupportedOperationException(String.format("Builder strategy %s can not provide Vars refutation to precision", getClass().getSimpleName()));
+ throw new UnsupportedOperationException(
+ String.format(
+ "Builder strategy %s can not provide Vars refutation to precision",
+ getClass().getSimpleName()));
}
protected SolverFactory getRefinementSolverFactory() {
@@ -421,22 +653,30 @@ public CfaLts getLts() {
public CfaConfig > buildConfig(CFA.Loc errLoc) {
final Predicate > analysis = getAnalysis();
- final ArgBuilder > argBuilder = ArgBuilder.create(
- getLts(errLoc), analysis, target,
- true);
- final Abstractor > abstractor = BasicAbstractor.builder(
- argBuilder)
- .waitlist(PriorityWaitlist.create(search.getComp(cfa, errLoc)))
- .stopCriterion(refinement.getStopCriterion())
- .logger(logger).build();
- final Refiner > refiner = refinement.getRefiner(this);
- final SafetyChecker > checker = CegarChecker.create(
- abstractor, refiner,
- logger);
+ final ArgBuilder > argBuilder =
+ ArgBuilder.create(getLts(errLoc), analysis, target, true);
+ final ArgAbstractor > abstractor =
+ BasicArgAbstractor.builder(argBuilder)
+ .waitlist(PriorityWaitlist.create(search.getComp(cfa, errLoc)))
+ .stopCriterion(refinement.getStopCriterion())
+ .logger(logger)
+ .build();
+ final ArgRefiner > refiner =
+ refinement.getRefiner(this);
+ final SafetyChecker<
+ ARG >
+ checker = ArgCegarChecker.create(abstractor, refiner, logger);
return CfaConfig.create(checker, createInitPrec());
}
- public MultiAnalysisSide , CfaPrec ,
+ CfaPrec builderStrategy) {
- return SingleExprTraceRefiner.create(ExprTraceFwBinItpChecker.create(True(), True(), builderStrategy.getRefinementSolverFactory().createItpSolver()), builderStrategy.getPrecGranularity().createRefiner(builderStrategy.getItpRefToPrec()), builderStrategy.getPruneStrategy(), builderStrategy.getLogger());
+ public
+ ArgRefiner builderStrategy) {
+ return SingleExprTraceRefiner.create(
+ ExprTraceFwBinItpChecker.create(
+ True(),
+ True(),
+ builderStrategy.getRefinementSolverFactory().createItpSolver()),
+ builderStrategy
+ .getPrecGranularity()
+ .createRefiner(builderStrategy.getItpRefToPrec()),
+ builderStrategy.getPruneStrategy(),
+ builderStrategy.getLogger());
}
- }, BW_BIN_ITP {
+ },
+ BW_BIN_ITP {
@Override
- public Refiner builderStrategy) {
- return SingleExprTraceRefiner.create(ExprTraceBwBinItpChecker.create(True(), True(), builderStrategy.getRefinementSolverFactory().createItpSolver()), builderStrategy.getPrecGranularity().createRefiner(builderStrategy.getItpRefToPrec()), builderStrategy.getPruneStrategy(), builderStrategy.getLogger());
+ public
+ ArgRefiner builderStrategy) {
+ return SingleExprTraceRefiner.create(
+ ExprTraceBwBinItpChecker.create(
+ True(),
+ True(),
+ builderStrategy.getRefinementSolverFactory().createItpSolver()),
+ builderStrategy
+ .getPrecGranularity()
+ .createRefiner(builderStrategy.getItpRefToPrec()),
+ builderStrategy.getPruneStrategy(),
+ builderStrategy.getLogger());
}
- }, SEQ_ITP {
+ },
+ SEQ_ITP {
@Override
- public Refiner builderStrategy) {
- return SingleExprTraceRefiner.create(ExprTraceSeqItpChecker.create(True(), True(), builderStrategy.getRefinementSolverFactory().createItpSolver()), builderStrategy.getPrecGranularity().createRefiner(builderStrategy.getItpRefToPrec()), builderStrategy.getPruneStrategy(), builderStrategy.getLogger());
+ public
+ ArgRefiner builderStrategy) {
+ return SingleExprTraceRefiner.create(
+ ExprTraceSeqItpChecker.create(
+ True(),
+ True(),
+ builderStrategy.getRefinementSolverFactory().createItpSolver()),
+ builderStrategy
+ .getPrecGranularity()
+ .createRefiner(builderStrategy.getItpRefToPrec()),
+ builderStrategy.getPruneStrategy(),
+ builderStrategy.getLogger());
}
},
MULTI_SEQ {
@@ -187,60 +225,229 @@ public StopCriterion getStopCriterion() {
}
@Override
- public Refiner builderStrategy) {
- return MultiExprTraceRefiner.create(ExprTraceSeqItpChecker.create(True(), True(), builderStrategy.getRefinementSolverFactory().createItpSolver()), builderStrategy.getPrecGranularity().createRefiner(builderStrategy.getItpRefToPrec()), builderStrategy.getPruneStrategy(), builderStrategy.getLogger());
+ public
+ ArgRefiner builderStrategy) {
+ return MultiExprTraceRefiner.create(
+ ExprTraceSeqItpChecker.create(
+ True(),
+ True(),
+ builderStrategy.getRefinementSolverFactory().createItpSolver()),
+ builderStrategy
+ .getPrecGranularity()
+ .createRefiner(builderStrategy.getItpRefToPrec()),
+ builderStrategy.getPruneStrategy(),
+ builderStrategy.getLogger());
}
},
UNSAT_CORE {
@Override
- public Refiner builderStrategy) {
- return SingleExprTraceRefiner.create(ExprTraceUnsatCoreChecker.create(True(), True(), builderStrategy.getRefinementSolverFactory().createUCSolver()), builderStrategy.getPrecGranularity().createRefiner(builderStrategy.getVarsRefToPrec()), builderStrategy.getPruneStrategy(), builderStrategy.getLogger());
+ public
+ ArgRefiner builderStrategy) {
+ return SingleExprTraceRefiner.create(
+ ExprTraceUnsatCoreChecker.create(
+ True(),
+ True(),
+ builderStrategy.getRefinementSolverFactory().createUCSolver()),
+ builderStrategy
+ .getPrecGranularity()
+ .createRefiner(builderStrategy.getVarsRefToPrec()),
+ builderStrategy.getPruneStrategy(),
+ builderStrategy.getLogger());
}
- }, UCB {
+ },
+ UCB {
@Override
- public Refiner builderStrategy) {
- return SingleExprTraceRefiner.create(ExprTraceUCBChecker.create(True(), True(), builderStrategy.getRefinementSolverFactory().createUCSolver()), builderStrategy.getPrecGranularity().createRefiner(builderStrategy.getItpRefToPrec()), builderStrategy.getPruneStrategy(), builderStrategy.getLogger());
+ public
+ ArgRefiner builderStrategy) {
+ return SingleExprTraceRefiner.create(
+ ExprTraceUCBChecker.create(
+ True(),
+ True(),
+ builderStrategy.getRefinementSolverFactory().createUCSolver()),
+ builderStrategy
+ .getPrecGranularity()
+ .createRefiner(builderStrategy.getItpRefToPrec()),
+ builderStrategy.getPruneStrategy(),
+ builderStrategy.getLogger());
}
},
NWT_WP {
@Override
- public Refiner builderStrategy) {
- return SingleExprTraceRefiner.create(ExprTraceNewtonChecker.create(True(), True(), builderStrategy.getRefinementSolverFactory().createUCSolver()).withoutIT().withSP().withoutLV(), builderStrategy.getPrecGranularity().createRefiner(builderStrategy.getItpRefToPrec()), builderStrategy.getPruneStrategy(), builderStrategy.getLogger());
+ public
+ ArgRefiner builderStrategy) {
+ return SingleExprTraceRefiner.create(
+ ExprTraceNewtonChecker.create(
+ True(),
+ True(),
+ builderStrategy
+ .getRefinementSolverFactory()
+ .createUCSolver())
+ .withoutIT()
+ .withSP()
+ .withoutLV(),
+ builderStrategy
+ .getPrecGranularity()
+ .createRefiner(builderStrategy.getItpRefToPrec()),
+ builderStrategy.getPruneStrategy(),
+ builderStrategy.getLogger());
}
- }, NWT_SP {
+ },
+ NWT_SP {
@Override
- public Refiner builderStrategy) {
- return SingleExprTraceRefiner.create(ExprTraceNewtonChecker.create(True(), True(), builderStrategy.getRefinementSolverFactory().createUCSolver()).withoutIT().withWP().withoutLV(), builderStrategy.getPrecGranularity().createRefiner(builderStrategy.getItpRefToPrec()), builderStrategy.getPruneStrategy(), builderStrategy.getLogger());
+ public
+ ArgRefiner builderStrategy) {
+ return SingleExprTraceRefiner.create(
+ ExprTraceNewtonChecker.create(
+ True(),
+ True(),
+ builderStrategy
+ .getRefinementSolverFactory()
+ .createUCSolver())
+ .withoutIT()
+ .withWP()
+ .withoutLV(),
+ builderStrategy
+ .getPrecGranularity()
+ .createRefiner(builderStrategy.getItpRefToPrec()),
+ builderStrategy.getPruneStrategy(),
+ builderStrategy.getLogger());
}
- }, NWT_WP_LV {
+ },
+ NWT_WP_LV {
@Override
- public Refiner builderStrategy) {
- return SingleExprTraceRefiner.create(ExprTraceNewtonChecker.create(True(), True(), builderStrategy.getRefinementSolverFactory().createUCSolver()).withoutIT().withWP().withLV(), builderStrategy.getPrecGranularity().createRefiner(builderStrategy.getItpRefToPrec()), builderStrategy.getPruneStrategy(), builderStrategy.getLogger());
+ public
+ ArgRefiner builderStrategy) {
+ return SingleExprTraceRefiner.create(
+ ExprTraceNewtonChecker.create(
+ True(),
+ True(),
+ builderStrategy
+ .getRefinementSolverFactory()
+ .createUCSolver())
+ .withoutIT()
+ .withWP()
+ .withLV(),
+ builderStrategy
+ .getPrecGranularity()
+ .createRefiner(builderStrategy.getItpRefToPrec()),
+ builderStrategy.getPruneStrategy(),
+ builderStrategy.getLogger());
}
- }, NWT_SP_LV {
+ },
+ NWT_SP_LV {
@Override
- public Refiner builderStrategy) {
- return SingleExprTraceRefiner.create(ExprTraceNewtonChecker.create(True(), True(), builderStrategy.getRefinementSolverFactory().createUCSolver()).withoutIT().withSP().withLV(), builderStrategy.getPrecGranularity().createRefiner(builderStrategy.getItpRefToPrec()), builderStrategy.getPruneStrategy(), builderStrategy.getLogger());
+ public
+ ArgRefiner builderStrategy) {
+ return SingleExprTraceRefiner.create(
+ ExprTraceNewtonChecker.create(
+ True(),
+ True(),
+ builderStrategy
+ .getRefinementSolverFactory()
+ .createUCSolver())
+ .withoutIT()
+ .withSP()
+ .withLV(),
+ builderStrategy
+ .getPrecGranularity()
+ .createRefiner(builderStrategy.getItpRefToPrec()),
+ builderStrategy.getPruneStrategy(),
+ builderStrategy.getLogger());
}
- }, NWT_IT_WP {
+ },
+ NWT_IT_WP {
@Override
- public Refiner builderStrategy) {
- return SingleExprTraceRefiner.create(ExprTraceNewtonChecker.create(True(), True(), builderStrategy.getRefinementSolverFactory().createUCSolver()).withIT().withWP().withoutLV(), builderStrategy.getPrecGranularity().createRefiner(builderStrategy.getItpRefToPrec()), builderStrategy.getPruneStrategy(), builderStrategy.getLogger());
+ public
+ ArgRefiner builderStrategy) {
+ return SingleExprTraceRefiner.create(
+ ExprTraceNewtonChecker.create(
+ True(),
+ True(),
+ builderStrategy
+ .getRefinementSolverFactory()
+ .createUCSolver())
+ .withIT()
+ .withWP()
+ .withoutLV(),
+ builderStrategy
+ .getPrecGranularity()
+ .createRefiner(builderStrategy.getItpRefToPrec()),
+ builderStrategy.getPruneStrategy(),
+ builderStrategy.getLogger());
}
- }, NWT_IT_SP {
+ },
+ NWT_IT_SP {
@Override
- public Refiner builderStrategy) {
- return SingleExprTraceRefiner.create(ExprTraceNewtonChecker.create(True(), True(), builderStrategy.getRefinementSolverFactory().createUCSolver()).withIT().withSP().withoutLV(), builderStrategy.getPrecGranularity().createRefiner(builderStrategy.getItpRefToPrec()), builderStrategy.getPruneStrategy(), builderStrategy.getLogger());
+ public
+ ArgRefiner builderStrategy) {
+ return SingleExprTraceRefiner.create(
+ ExprTraceNewtonChecker.create(
+ True(),
+ True(),
+ builderStrategy
+ .getRefinementSolverFactory()
+ .createUCSolver())
+ .withIT()
+ .withSP()
+ .withoutLV(),
+ builderStrategy
+ .getPrecGranularity()
+ .createRefiner(builderStrategy.getItpRefToPrec()),
+ builderStrategy.getPruneStrategy(),
+ builderStrategy.getLogger());
}
- }, NWT_IT_WP_LV {
+ },
+ NWT_IT_WP_LV {
@Override
- public Refiner builderStrategy) {
- return SingleExprTraceRefiner.create(ExprTraceNewtonChecker.create(True(), True(), builderStrategy.getRefinementSolverFactory().createUCSolver()).withIT().withWP().withLV(), builderStrategy.getPrecGranularity().createRefiner(builderStrategy.getItpRefToPrec()), builderStrategy.getPruneStrategy(), builderStrategy.getLogger());
+ public
+ ArgRefiner builderStrategy) {
+ return SingleExprTraceRefiner.create(
+ ExprTraceNewtonChecker.create(
+ True(),
+ True(),
+ builderStrategy
+ .getRefinementSolverFactory()
+ .createUCSolver())
+ .withIT()
+ .withWP()
+ .withLV(),
+ builderStrategy
+ .getPrecGranularity()
+ .createRefiner(builderStrategy.getItpRefToPrec()),
+ builderStrategy.getPruneStrategy(),
+ builderStrategy.getLogger());
}
- }, NWT_IT_SP_LV {
+ },
+ NWT_IT_SP_LV {
@Override
- public Refiner builderStrategy) {
- return SingleExprTraceRefiner.create(ExprTraceNewtonChecker.create(True(), True(), builderStrategy.getRefinementSolverFactory().createUCSolver()).withIT().withSP().withLV(), builderStrategy.getPrecGranularity().createRefiner(builderStrategy.getItpRefToPrec()), builderStrategy.getPruneStrategy(), builderStrategy.getLogger());
+ public
+ ArgRefiner builderStrategy) {
+ return SingleExprTraceRefiner.create(
+ ExprTraceNewtonChecker.create(
+ True(),
+ True(),
+ builderStrategy
+ .getRefinementSolverFactory()
+ .createUCSolver())
+ .withIT()
+ .withSP()
+ .withLV(),
+ builderStrategy
+ .getPrecGranularity()
+ .createRefiner(builderStrategy.getItpRefToPrec()),
+ builderStrategy.getPruneStrategy(),
+ builderStrategy.getLogger());
}
};
@@ -248,24 +455,25 @@ public StopCriterion getStopCriterion() {
return StopCriterions.firstCex();
}
- public abstract Refiner builderStrategy);
-
+ public abstract
+ ArgRefiner builderStrategy);
}
public enum Search {
BFS {
@Override
public ArgNodeComparator getComp(final CFA cfa, final CFA.Loc errLoc) {
- return ArgNodeComparators.combine(ArgNodeComparators.targetFirst(),
- ArgNodeComparators.bfs());
+ return ArgNodeComparators.combine(
+ ArgNodeComparators.targetFirst(), ArgNodeComparators.bfs());
}
},
DFS {
@Override
public ArgNodeComparator getComp(final CFA cfa, final CFA.Loc errLoc) {
- return ArgNodeComparators.combine(ArgNodeComparators.targetFirst(),
- ArgNodeComparators.dfs());
+ return ArgNodeComparators.combine(
+ ArgNodeComparators.targetFirst(), ArgNodeComparators.dfs());
}
},
@@ -277,7 +485,6 @@ public ArgNodeComparator getComp(final CFA cfa, final CFA.Loc errLoc) {
};
public abstract ArgNodeComparator getComp(CFA cfa, CFA.Loc errLoc);
-
}
public enum PredSplit {
@@ -302,8 +509,9 @@ public PrecRefiner
+ PrecRefiner PrecRefiner
+ PrecRefiner PrecRefiner {
- protected static final String UNSUPPORTED_CONFIG_VALUE = "Builder strategy %s does not support configuration value %s as %s";
+ protected static final String UNSUPPORTED_CONFIG_VALUE =
+ "Builder strategy %s does not support configuration value %s as %s";
protected final CFA cfa;
@SuppressWarnings("java:S1699")
protected BuilderStrategy(CFA cfa) {
- checkState(getSupportedDomains().contains(domain), UNSUPPORTED_CONFIG_VALUE, getClass().getSimpleName(), domain, "domain");
- checkState(getSupportedRefinements().contains(refinement), UNSUPPORTED_CONFIG_VALUE, getClass().getSimpleName(), refinement, "refinement");
- checkState(getSupportedInitPrecs().contains(initPrec), UNSUPPORTED_CONFIG_VALUE, getClass().getSimpleName(), initPrec, "initial precision");
+ checkState(
+ getSupportedDomains().contains(domain),
+ UNSUPPORTED_CONFIG_VALUE,
+ getClass().getSimpleName(),
+ domain,
+ "domain");
+ checkState(
+ getSupportedRefinements().contains(refinement),
+ UNSUPPORTED_CONFIG_VALUE,
+ getClass().getSimpleName(),
+ refinement,
+ "refinement");
+ checkState(
+ getSupportedInitPrecs().contains(initPrec),
+ UNSUPPORTED_CONFIG_VALUE,
+ getClass().getSimpleName(),
+ initPrec,
+ "initial precision");
this.cfa = cfa;
}
@@ -389,7 +618,10 @@ public CfaAnalysis getAnalysis() {
public abstract RefutationToPrec,
+ S,
+ CfaState