17storm::gbar::abstraction::AbstractionOptions
const defaultOptions;
19std::string flagToString(
bool value) {
20 return value ?
"on" :
"off";
48 return "nearest-max-dev";
50 return "most-prob-path";
52 return "max-weighted-dev";
66 return "quantitative";
71std::string validBlockModeToString(
bool restrictToValidBlocks) {
72 return restrictToValidBlocks ?
"blockenum" :
"morepreds";
76const std::string AbstractionSettings::methodOptionName =
"method";
78const std::string AbstractionSettings::useDecompositionOptionName =
"decomposition";
79const std::string AbstractionSettings::splitModeOptionName =
"split";
80const std::string AbstractionSettings::addAllGuardsOptionName =
"all-guards";
81const std::string AbstractionSettings::addInitialExpressionsOptionName =
"all-inits";
82const std::string AbstractionSettings::useInterpolationOptionName =
"interpolation";
83const std::string AbstractionSettings::precisionOptionName =
"precision";
84const std::string AbstractionSettings::relativeOptionName =
"relative";
85const std::string AbstractionSettings::pivotHeuristicOptionName =
"pivot-heuristic";
86const std::string AbstractionSettings::reuseResultsOptionName =
"reuse";
87const std::string AbstractionSettings::restrictToRelevantStatesOptionName =
"relevant";
88const std::string AbstractionSettings::solveModeOptionName =
"solve";
89const std::string AbstractionSettings::maximalAbstractionOptionName =
"maxabs";
90const std::string AbstractionSettings::rankRefinementPredicatesOptionName =
"rankpred";
91const std::string AbstractionSettings::constraintsOptionName =
"constraints";
92const std::string AbstractionSettings::useEagerRefinementOptionName =
"eagerref";
93const std::string AbstractionSettings::debugOptionName =
"debug";
94const std::string AbstractionSettings::injectRefinementPredicatesOptionName =
"injectref";
95const std::string AbstractionSettings::fixPlayer1StrategyOptionName =
"fixpl1strat";
96const std::string AbstractionSettings::fixPlayer2StrategyOptionName =
"fixpl2strat";
97const std::string AbstractionSettings::validBlockModeOptionName =
"validmode";
100 std::vector<std::string> methods = {
"games",
"bisimulation",
"bisim"};
105 .setDefaultValueString(
"bisim")
110 "The maximal number of abstraction to perform before solving is aborted.")
117 std::vector<std::string> onOff = {
"on",
"off"};
127 std::vector<std::string> splitModes = {
"all",
"none",
"non-guard"};
132 .setDefaultValueString(toString(defaultOptions.
splitMode))
136 std::vector<std::string> solveModes = {
"dd",
"sparse"};
141 .setDefaultValueString(toString(defaultOptions.
solveMode))
149 .setDefaultValueString(flagToString(defaultOptions.
addAllGuards))
154 "Sets whether all initial expressions are added as initial predicates.")
163 "Sets whether interpolation is to be used to eliminate spurious pivot blocks.")
174 .setDefaultValueDouble(defaultOptions.
precision)
187 std::vector<std::string> pivotHeuristic = {
"nearest-max-dev",
"most-prob-path",
"max-weighted-dev"};
196 std::vector<std::string> reuseModes = {
"all",
"none",
"qualitative",
"quantitative"};
201 .setDefaultValueString(toString(defaultOptions.
reuseMode))
206 "Sets whether to restrict to relevant states during the abstraction.")
215 "Sets whether to rank the refinement predicates if there are multiple.")
239 "Specifies predicates used by the refinement instead of the derived predicates.")
242 .setDefaultValueString(
"")
266 .setDefaultValueString(flagToString(defaultOptions.
debug))
270 std::vector<std::string> validModes = {
"morepreds",
"blockenum"};
282 if (methodAsString ==
"games") {
284 }
else if (methodAsString ==
"bisimulation" || methodAsString ==
"bisim") {
287 STORM_LOG_THROW_UNCONDITIONALLY(storm::exceptions::IllegalArgumentValueException,
"Unknown abstraction-refinement method '" << methodAsString <<
"'.");
296 if (splitModeAsString ==
"all") {
297 return SplitMode::All;
298 }
else if (splitModeAsString ==
"none") {
299 return SplitMode::None;
300 }
else if (splitModeAsString ==
"non-guard") {
301 return SplitMode::NonGuard;
303 return SplitMode::All;
308 if (solveModeAsString ==
"dd") {
309 return SolveMode::Dd;
311 return SolveMode::Sparse;
348 if (heuristicName ==
"nearest-max-dev") {
349 return AbstractionSettings::PivotSelectionHeuristic::NearestMaximalDeviation;
350 }
else if (heuristicName ==
"most-prob-path") {
351 return AbstractionSettings::PivotSelectionHeuristic::MostProbablePath;
352 }
else if (heuristicName ==
"max-weighted-dev") {
353 return AbstractionSettings::PivotSelectionHeuristic::MaxWeightedDeviation;
360 if (reuseModeAsString ==
"all") {
361 return ReuseMode::All;
362 }
else if (reuseModeAsString ==
"none") {
363 return ReuseMode::None;
364 }
else if (reuseModeAsString ==
"qualitative") {
365 return ReuseMode::Qualitative;
366 }
else if (reuseModeAsString ==
"quantitative") {
367 return ReuseMode::Quantitative;
369 return ReuseMode::All;
414 if (modeAsString ==
"morepreds") {
415 return ValidBlockMode::MorePredicates;
416 }
else if (modeAsString ==
"blockenum") {
417 return ValidBlockMode::BlockEnumeration;
419 return ValidBlockMode::MorePredicates;
virtual std::string getValueAsString() const =0
Retrieves the value of this argument as a string.
virtual bool setFromStringValue(std::string const &stringValue)=0
Tries to set the value of the argument from the given string.
virtual uint_fast64_t getValueAsUnsignedInteger() const =0
Retrieves the value of this argument as an unsigned integer.
virtual double getValueAsDouble() const =0
Retrieves the value of this argument as a double.
static ArgumentBuilder createUnsignedIntegerArgument(std::string const &name, std::string const &description)
Creates an unsigned integer argument with the given parameters.
static ArgumentBuilder createDoubleArgument(std::string const &name, std::string const &description)
Creates a double argument with the given parameters.
static ArgumentBuilder createStringArgument(std::string const &name, std::string const &description)
Creates a string argument with the given parameters.
static std::shared_ptr< ArgumentValidator< double > > createDoubleRangeValidatorExcluding(double lowerBound, double upperBound)
static std::shared_ptr< ArgumentValidator< std::string > > createMultipleChoiceValidator(std::vector< std::string > const &choices)
This class provides the interface to create an option...
std::shared_ptr< Option > build()
Builds an option from the data that was added to this builder.
ArgumentBase const & getArgumentByName(std::string const &argumentName) const
Returns a reference to the argument with the specified long name.
bool getHasOptionBeenSet() const
Retrieves whether the option has been set.
PivotSelectionHeuristic getPivotSelectionHeuristic() const
Retrieves the selected heuristic to select pivot blocks.
bool isUseEagerRefinementSet() const
Retrieves whether to refine eagerly.
bool isFixPlayer1StrategySet() const
Retrieves whether player 1 strategies are to be fixed.
bool isAddAllInitialExpressionsSet() const
Retrieves whether the option to add all initial expressions was set.
double getPrecision() const
Retrieves the precision that is used for detecting convergence.
SolveMode getSolveMode() const
Retrieves the mode with which to solve the games.
uint_fast64_t getMaximalAbstractionCount() const
Retrieves the maximal number of abstractions to perform until giving up on converging.
storm::gbar::abstraction::PivotSelectionHeuristic PivotSelectionHeuristic
storm::gbar::abstraction::SolveMode SolveMode
void setAddAllInitialExpressions(bool value)
Sets the option to add all initial expressions to the specified value.
std::string getInjectedRefinementPredicates() const
Retrieves a string containing refinement predicates to inject (if there are any).
SplitMode getSplitMode() const
Retrieves the selected split mode.
Method getAbstractionRefinementMethod() const
Retrieves the selected abstraction refinement method.
bool isUseInterpolationSet() const
Retrieves whether the option to use interpolation was set.
storm::gbar::abstraction::ReuseMode ReuseMode
bool isUseDecompositionSet() const
Retrieves whether the option to use the decomposition was set.
bool isAddAllGuardsSet() const
Retrieves whether the option to add all guards was set.
static const std::string moduleName
ValidBlockMode getValidBlockMode() const
Retrieves the selected mode to guarantee valid blocks.
void setAddAllGuards(bool value)
Sets the option to add all guards to the specified value.
bool getRelativeTerminationCriterion() const
Retrieves whether to use a relative termination criterion for detecting convergence.
bool isConstraintsSet() const
Retrieves whether the constraints option was set.
ReuseMode getReuseMode() const
Retrieves the selected reuse mode.
bool isRankRefinementPredicatesSet() const
bool isInjectRefinementPredicatesSet() const
Retrieves whether the option to inject the refinement predicates is set.
bool isDebugSet() const
Retrieves whether the debug option was set.
AbstractionSettings()
Creates a new set of abstraction settings.
bool isFixPlayer2StrategySet() const
Retrieves whether player 2 strategies are to be fixed.
bool isRestrictToRelevantStatesSet() const
Retrieves whether only relevant states are to be considered.
storm::gbar::abstraction::ValidBlockMode ValidBlockMode
std::string getConstraintString() const
Retrieves the string that specifies additional constraints.
storm::gbar::abstraction::SplitMode SplitMode
ModuleSettings(std::string const &moduleName)
Constructs a new settings object.
void addOption(std::shared_ptr< Option > const &option)
Adds and registers the given option.
Option & getOption(std::string const &longName)
Retrieves the option with the given long name.
#define STORM_LOG_THROW_UNCONDITIONALLY(exception, message)
std::string toString(DFTElementType const &type)
@ NearestMaximalDeviation
bool useDecomposition
A flag indicating whether decomposition is to be used during the abstraction.
bool relativeTerminationCriterion
A flag indicating whether to use a relative termination criterion.
SolveMode solveMode
The mode with which to solve the abstractions.
bool restrictToValidBlocks
A flag indicating whether the abstractor restricts the initial states to valid blocks.
bool useInterpolation
A flag indicating whether interpolation is to be used to eliminate spurious pivot blocks.
ReuseMode reuseMode
The mode determining which results are reused.
bool fixPlayer1Strategy
A flag indicating whether player 1 strategies are to be fixed.
bool debug
A flag indicating whether debug mode is enabled.
bool fixPlayer2Strategy
A flag indicating whether player 2 strategies are to be fixed.
bool addAllInitialExpressions
A flag indicating whether all initial expressions are added as initial predicates.
bool useEagerRefinement
A flag indicating whether to refine eagerly.
SplitMode splitMode
The mode that determines which predicates are split into atoms for the refinement.
bool rankRefinementPredicates
A flag indicating whether refinement predicates are to be ranked.
bool addAllGuards
A flag indicating whether all guards are added as initial predicates.
bool restrictToRelevantStates
A flag indicating whether the abstractor restricts the abstraction to relevant states.
uint_fast64_t maximalNumberOfAbstractions
The maximal number of abstractions to perform until giving up on converging.
double precision
The precision used for detecting convergence.
PivotSelectionHeuristic pivotSelectionHeuristic
The heuristic to use for pivot block selection.