Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
region.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <optional>
5#include <set>
6#include <string>
7#include <vector>
8
9#include <boost/algorithm/string.hpp>
10
29
31
36#include "storm/io/file.h"
38
39namespace storm {
40
41namespace api {
42
43// Type aliases for backward compatibility
45
46template<typename ValueType>
48
49template<typename ValueType>
50std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> getModelParameters(storm::models::ModelBase const& model) {
51 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> modelParameters;
52 if (model.isSparseModel()) {
53 auto const& sparseModel = dynamic_cast<storm::models::sparse::Model<ValueType> const&>(model);
54 modelParameters = storm::models::sparse::getProbabilityParameters(sparseModel);
55 auto rewParameters = storm::models::sparse::getRewardParameters(sparseModel);
56 modelParameters.insert(rewParameters.begin(), rewParameters.end());
57 } else {
58 STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Retrieving model parameters is not supported for the given model type.");
59 }
60 return modelParameters;
61}
62
63template<typename ValueType>
64std::vector<typename storm::storage::ParameterRegion<ValueType>::VariableType> parseVariableList(
65 std::string const& inputString, std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> const& consideredVariables) {
66 if (inputString == "") {
67 return {};
68 }
69 std::vector<typename storm::storage::ParameterRegion<ValueType>::VariableType> variables;
70 std::vector<std::string> variableStrings;
71 boost::split(variableStrings, inputString, boost::is_any_of(","));
72 for (auto& var : variableStrings) {
73 boost::trim(var);
74 bool found = false;
75 // Find parameter in list
76 for (auto const& param : consideredVariables) {
77 if (var == param.name()) {
78 variables.push_back(param);
79 found = true;
80 break;
81 }
82 }
83 if (!found) {
84 STORM_LOG_ERROR("Variable " << var << " not found.");
85 }
86 }
87 return variables;
88}
89
90template<typename ValueType>
91std::vector<typename storm::storage::ParameterRegion<ValueType>::VariableType> parseVariableList(std::string const& inputString,
92 storm::models::ModelBase const& model) {
94}
95
96template<typename ValueType>
97std::vector<storm::storage::ParameterRegion<ValueType>> parseRegions(
98 std::string const& inputString, std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> const& consideredVariables) {
99 // If the given input string looks like a file (containing a dot and there exists a file with that name),
100 // we try to parse it as a file, otherwise we assume it's a region string.
101 if (inputString.find(".") != std::string::npos && storm::io::fileExistsAndIsReadable(inputString)) {
102 return storm::parser::ParameterRegionParser<ValueType>().parseMultipleRegionsFromFile(inputString, consideredVariables);
103 } else {
104 return storm::parser::ParameterRegionParser<ValueType>().parseMultipleRegions(inputString, consideredVariables);
105 }
106}
107
108template<typename ValueType>
109std::vector<storm::storage::ParameterRegion<ValueType>> parseRegions(std::string const& inputString, storm::models::ModelBase const& model) {
110 return parseRegions<ValueType>(inputString, getModelParameters<ValueType>(model));
111}
112
113template<typename ValueType>
115 std::string const& inputString, std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> const& consideredVariables) {
116 return storm::parser::ParameterRegionParser<ValueType>().createRegion(inputString, consideredVariables);
117}
118
119template<typename ValueType>
120std::vector<storm::storage::ParameterRegion<ValueType>> createRegion(std::string const& inputString, storm::models::ModelBase const& model) {
121 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> modelParameters;
122 if (model.isSparseModel()) {
123 auto const& sparseModel = dynamic_cast<storm::models::sparse::Model<ValueType> const&>(model);
124 modelParameters = storm::models::sparse::getProbabilityParameters(sparseModel);
125 auto rewParameters = storm::models::sparse::getRewardParameters(sparseModel);
126 modelParameters.insert(rewParameters.begin(), rewParameters.end());
127 } else {
128 STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Retrieving model parameters is not supported for the given model type.");
129 }
130 return std::vector<storm::storage::ParameterRegion<ValueType>>({createRegion<ValueType>(inputString, modelParameters)});
131}
132
133template<typename ValueType>
135 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> const& consideredVariables) {
136 // Handle the "empty region" case
137 if (inputString == "" && consideredVariables.empty()) {
139 }
140
141 auto res = parseRegions<ValueType>(inputString, consideredVariables);
142 STORM_LOG_THROW(res.size() == 1, storm::exceptions::InvalidOperationException, "Parsed " << res.size() << " regions but exactly one was expected.");
143 return res.front();
144}
145
146template<typename ValueType>
148 // Handle the "empty region" case
149 if (inputString == "" && !model.hasParameters()) {
151 }
152
153 auto res = parseRegions<ValueType>(inputString, model);
154 STORM_LOG_THROW(res.size() == 1, storm::exceptions::InvalidOperationException, "Parsed " << res.size() << " regions but exactly one was expected.");
155 return res.front();
156}
157
158template<typename ValueType>
159std::pair<std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType>,
160 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType>>
161parseMonotoneParameters(std::string const& fileName, std::shared_ptr<storm::models::sparse::Model<ValueType>> const& model) {
162 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> modelParameters;
163 modelParameters = storm::models::sparse::getProbabilityParameters(*model);
164 auto rewParameters = storm::models::sparse::getRewardParameters(*model);
165 modelParameters.insert(rewParameters.begin(), rewParameters.end());
166 return std::move(storm::parser::MonotonicityParser<typename storm::storage::ParameterRegion<ValueType>::VariableType>().parseMonotoneVariablesFromFile(
167 fileName, modelParameters));
168}
169
170template<typename ParametricType>
171std::shared_ptr<storm::models::sparse::Model<ParametricType>> preprocessSparseModelForParameterLifting(
172 std::shared_ptr<storm::models::sparse::Model<ParametricType>> const& model,
174 bool preconditionsValidatedManually = false) {
175 STORM_LOG_WARN_COND(preconditionsValidatedManually || storm::utility::parameterlifting::validateParameterLiftingSound(*model, task.getFormula(), engine),
176 "Could not validate whether parameter lifting is applicable. Please validate manually...");
177 std::shared_ptr<storm::models::sparse::Model<ParametricType>> consideredModel = model;
178
179 // Treat continuous time models
180 if (consideredModel->isOfType(storm::models::ModelType::Ctmc) || consideredModel->isOfType(storm::models::ModelType::MarkovAutomaton)) {
181 STORM_LOG_WARN("Parameter lifting not supported for continuous time models. Transforming continuous model to discrete model...");
182 std::vector<std::shared_ptr<storm::logic::Formula const>> taskFormulaAsVector{task.getFormula().asSharedPointer()};
183 consideredModel = storm::api::transformContinuousToDiscreteTimeSparseModel(consideredModel, taskFormulaAsVector).first;
184 STORM_LOG_THROW(consideredModel->isOfType(storm::models::ModelType::Dtmc) || consideredModel->isOfType(storm::models::ModelType::Mdp),
185 storm::exceptions::UnexpectedException, "Transformation to discrete time model has failed.");
186 }
187 return consideredModel;
188}
189
190template<typename ParametricType, typename ImpreciseType = double, typename PreciseType = storm::RationalNumber>
191std::unique_ptr<storm::modelchecker::RegionModelChecker<ParametricType>> createRegionModelChecker(storm::modelchecker::RegionCheckEngine engine,
192 storm::models::ModelType modelType);
193
194extern template std::unique_ptr<storm::modelchecker::RegionModelChecker<storm::RationalFunction>>
196 storm::models::ModelType modelType);
197
198template<typename ParametricType, typename ImpreciseType = double, typename PreciseType = storm::RationalNumber>
199std::unique_ptr<storm::modelchecker::MonotonicityBackend<ParametricType>> initializeMonotonicityBackend(
202 std::optional<std::pair<std::set<typename storm::storage::ParameterRegion<ParametricType>::VariableType>,
204 monotoneParameters = std::nullopt) {
205 // Initialize default backend
206 auto monotonicityBackend = std::make_unique<storm::modelchecker::MonotonicityBackend<ParametricType>>();
207
208 // Potentially replace default by order-based monotonicity
209 if (monotonicitySetting.useMonotonicity) {
210 std::unique_ptr<storm::modelchecker::MonotonicityBackend<ParametricType>> orderBasedBackend;
212 orderBasedBackend = std::make_unique<storm::modelchecker::OrderBasedMonotonicityBackend<ParametricType, PreciseType>>(
213 monotonicitySetting.useOnlyGlobalMonotonicity, monotonicitySetting.useBoundsFromPLA);
214 } else {
215 orderBasedBackend = std::make_unique<storm::modelchecker::OrderBasedMonotonicityBackend<ParametricType, ImpreciseType>>(
216 monotonicitySetting.useOnlyGlobalMonotonicity, monotonicitySetting.useBoundsFromPLA);
217 }
218 if (regionChecker.isMonotonicitySupported(*orderBasedBackend, task)) {
219 monotonicityBackend = std::move(orderBasedBackend);
220 } else {
221 STORM_LOG_WARN("Order-based Monotonicity enabled for region checking engine " << engine << " but not supported in this configuration.");
222 }
223 }
224
225 // Insert monotone parameters if available
226 if (monotoneParameters) {
227 for (auto const& incrPar : monotoneParameters->first) {
228 monotonicityBackend->setMonotoneParameter(incrPar, storm::analysis::MonotonicityKind::Incr);
229 }
230 for (auto const& decrPar : monotoneParameters->second) {
231 monotonicityBackend->setMonotoneParameter(decrPar, storm::analysis::MonotonicityKind::Decr);
232 }
233 }
234 return monotonicityBackend;
235}
236
237template<typename ValueType, typename ImpreciseType = double, typename PreciseType = storm::RationalNumber>
238std::unique_ptr<storm::modelchecker::RegionModelChecker<ValueType>> initializeRegionModelChecker(
239 Environment const& env, std::shared_ptr<storm::models::sparse::Model<ValueType>> const& model,
241 bool allowModelSimplification = true,
243 bool preconditionsValidated = false, MonotonicitySetting monotonicitySetting = MonotonicitySetting(),
244 std::optional<std::pair<std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType>,
246 monotoneParameters = std::nullopt) {
247 auto consideredModel = preprocessSparseModelForParameterLifting(model, task, engine, preconditionsValidated);
248 auto regionChecker = createRegionModelChecker<ValueType, ImpreciseType, PreciseType>(engine, model->getType());
249 auto monotonicityBackend =
250 initializeMonotonicityBackend<ValueType, ImpreciseType, PreciseType>(*regionChecker, engine, task, monotonicitySetting, monotoneParameters);
251 if (allowModelSimplification) {
252 allowModelSimplification = monotonicityBackend->recommendModelSimplifications();
253 STORM_LOG_WARN_COND(allowModelSimplification, "Model simplification is disabled because the monotonicity algorithm does not recommend it.");
254 }
255 regionChecker->specify(env, consideredModel, task, std::nullopt, std::move(monotonicityBackend), allowModelSimplification, graphPreservationStatus);
256 return regionChecker;
257}
258
259template<typename ValueType>
260std::unique_ptr<storm::modelchecker::RegionModelChecker<ValueType>> initializeRegionModelChecker(
263 Environment env;
264 return initializeRegionModelChecker(env, model, task, engine);
265}
266
267template<typename ValueType>
268std::unique_ptr<storm::modelchecker::RegionCheckResult<ValueType>> checkRegionsWithSparseEngine(
269 Environment const& env, std::shared_ptr<storm::models::sparse::Model<ValueType>> const& model,
271 storm::modelchecker::RegionCheckEngine engine, std::vector<storm::modelchecker::RegionResultHypothesis> const& hypotheses, bool sampleVerticesOfRegions) {
272 auto regionChecker = initializeRegionModelChecker(env, model, task, engine);
273 return regionChecker->analyzeRegions(env, regions, hypotheses, sampleVerticesOfRegions);
274}
275
276template<typename ValueType>
277std::unique_ptr<storm::modelchecker::RegionCheckResult<ValueType>> checkRegionsWithSparseEngine(
278 Environment const& env, std::shared_ptr<storm::models::sparse::Model<ValueType>> const& model,
282 bool sampleVerticesOfRegions = false) {
283 std::vector<storm::modelchecker::RegionResultHypothesis> hypotheses(regions.size(), hypothesis);
284 return checkRegionsWithSparseEngine(env, model, task, regions, engine, hypotheses, sampleVerticesOfRegions);
285}
286
287template<typename ValueType, typename ImpreciseType = double, typename PreciseType = storm::RationalNumber>
288std::unique_ptr<storm::modelchecker::RegionRefinementChecker<ValueType>> initializeRegionRefinementChecker(Environment const& env,
290 auto consideredModel = preprocessSparseModelForParameterLifting(settings.model, settings.task, settings.engine, settings.preconditionsValidated);
291 auto regionChecker = createRegionModelChecker<ValueType, ImpreciseType, PreciseType>(settings.engine, settings.model->getType());
292 auto monotonicityBackend = initializeMonotonicityBackend<ValueType, ImpreciseType, PreciseType>(*regionChecker, settings.engine, settings.task,
293 settings.monotonicitySetting, settings.monotoneParameters);
294 settings.allowModelSimplification = settings.allowModelSimplification && monotonicityBackend->recommendModelSimplifications();
295 auto refinementChecker = std::make_unique<storm::modelchecker::RegionRefinementChecker<ValueType>>(std::move(regionChecker));
296 refinementChecker->specify(env, consideredModel, settings.task, std::move(settings.regionSplittingStrategy), std::move(settings.discreteVariables),
297 std::move(monotonicityBackend), settings.allowModelSimplification, settings.graphPreservationStatus);
298 return refinementChecker;
299}
300
312template<typename ValueType>
313std::unique_ptr<storm::modelchecker::RegionRefinementCheckResult<ValueType>> checkAndRefineRegionWithSparseEngine(
315 std::optional<ValueType> const& coverageThreshold, std::optional<uint64_t> const& refinementDepthThreshold = std::nullopt,
317 auto const& regionRefinementChecker = initializeRegionRefinementChecker(env, settings);
318 return regionRefinementChecker->performRegionPartitioning(env, region, coverageThreshold, refinementDepthThreshold, hypothesis, monThresh);
319}
320
321// TODO: update documentation
332template<typename ValueType>
333std::pair<storm::ExtendedRationalNumber, typename storm::storage::ParameterRegion<ValueType>::Valuation> computeExtremalValue(
335 storm::solver::OptimizationDirection const& dir, std::optional<ValueType> const& precision, bool absolutePrecision,
336 std::optional<storm::logic::Bound> const& boundInvariant) {
337 auto refinementChecker = initializeRegionRefinementChecker(env, settings);
338 auto res =
339 refinementChecker->computeExtremalValue(env, region, dir, precision.value_or(storm::utility::zero<ValueType>()), absolutePrecision, boundInvariant);
340 return {storm::utility::convertNumber<storm::ExtendedRationalNumber>(res.first), std::move(res.second)};
341}
342
349template<typename ValueType>
351 STORM_LOG_THROW(settings.task.getFormula().isProbabilityOperatorFormula() || settings.task.getFormula().isRewardOperatorFormula(),
352 storm::exceptions::NotSupportedException, "Only probability and reward operators supported.");
353 STORM_LOG_THROW(settings.task.getFormula().asOperatorFormula().hasBound(), storm::exceptions::NotSupportedException,
354 "Verification requires a bounded operator formula.");
355
356 storm::logic::Bound const& bound = settings.task.getFormula().asOperatorFormula().getBound();
357 auto refinementChecker = initializeRegionRefinementChecker(env, settings);
358 return refinementChecker->verifyRegion(env, region, bound);
359}
360
361template<typename ValueType>
362void exportRegionCheckResultToFile(std::unique_ptr<storm::modelchecker::CheckResult> const& checkResult, std::string const& filename,
363 bool onlyConclusiveResults = false) {
364 auto const* regionCheckResult = dynamic_cast<storm::modelchecker::RegionCheckResult<ValueType> const*>(checkResult.get());
365 STORM_LOG_THROW(regionCheckResult != nullptr, storm::exceptions::UnexpectedException,
366 "Can not export region check result: The given checkresult does not have the expected type.");
367
368 std::ofstream filestream;
369 storm::io::openFile(filename, filestream);
370 for (auto const& res : regionCheckResult->getRegionResults()) {
371 if (!onlyConclusiveResults || res.second == storm::modelchecker::RegionResult::AllViolated || res.second == storm::modelchecker::RegionResult::AllSat ||
373 filestream << res.second << ": " << res.first << '\n';
374 }
375 }
376 storm::io::closeFile(filestream);
377}
378
379} // namespace api
380} // namespace storm
FormulaType const & getFormula() const
Retrieves the formula from this task.
Definition CheckTask.h:141
virtual bool isMonotonicitySupported(MonotonicityBackend< ParametricType > const &backend, CheckTask< storm::logic::Formula, ParametricType > const &checkTask) const =0
Returns whether this region model checker can work together with the given monotonicity backend.
virtual bool hasParameters() const
Checks whether the model has parameters.
Definition ModelBase.cpp:58
virtual bool isSparseModel() const
Checks whether the model is a sparse model.
Definition ModelBase.cpp:11
Base class for all sparse models.
Definition Model.h:34
static storm::storage::ParameterRegion< ParametricType > createRegion(std::string const &regionBound, std::set< VariableType > const &consideredVariables)
static std::vector< storm::storage::ParameterRegion< ParametricType > > parseMultipleRegions(std::string const &regionsString, std::set< VariableType > const &consideredVariables)
static std::vector< storm::storage::ParameterRegion< ParametricType > > parseMultipleRegionsFromFile(std::string const &fileName, std::set< VariableType > const &consideredVariables)
storm::utility::parametric::VariableType< ParametricType >::type VariableType
#define STORM_LOG_WARN(message)
Definition logging.h:35
#define STORM_LOG_ERROR(message)
Definition logging.h:36
#define STORM_LOG_WARN_COND(cond, message)
Definition macros.h:54
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:39
@ Incr
the result is monotonically increasing
@ Decr
the result is monotonically decreasing
void exportRegionCheckResultToFile(std::unique_ptr< storm::modelchecker::CheckResult > const &checkResult, std::string const &filename, bool onlyConclusiveResults=false)
Definition region.h:362
std::vector< storm::storage::ParameterRegion< ValueType > > parseRegions(std::string const &inputString, std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType > const &consideredVariables)
Definition region.h:97
std::unique_ptr< storm::modelchecker::RegionRefinementCheckResult< ValueType > > checkAndRefineRegionWithSparseEngine(Environment const &env, RefinementOptions< ValueType > settings, storm::storage::ParameterRegion< ValueType > const &region, std::optional< ValueType > const &coverageThreshold, std::optional< uint64_t > const &refinementDepthThreshold=std::nullopt, storm::modelchecker::RegionResultHypothesis hypothesis=storm::modelchecker::RegionResultHypothesis::Unknown, uint64_t monThresh=0)
Checks and iteratively refines the given region with the sparse engine.
Definition region.h:313
std::shared_ptr< storm::models::sparse::Model< ParametricType > > preprocessSparseModelForParameterLifting(std::shared_ptr< storm::models::sparse::Model< ParametricType > > const &model, storm::modelchecker::CheckTask< storm::logic::Formula, ParametricType > const &task, storm::modelchecker::RegionCheckEngine engine, bool preconditionsValidatedManually=false)
Definition region.h:171
std::unique_ptr< storm::modelchecker::MonotonicityBackend< ParametricType > > initializeMonotonicityBackend(storm::modelchecker::RegionModelChecker< ParametricType > const &regionChecker, storm::modelchecker::RegionCheckEngine engine, storm::modelchecker::CheckTask< storm::logic::Formula, ParametricType > const &task, MonotonicitySetting const &monotonicitySetting, std::optional< std::pair< std::set< typename storm::storage::ParameterRegion< ParametricType >::VariableType >, std::set< typename storm::storage::ParameterRegion< ParametricType >::VariableType > > > monotoneParameters=std::nullopt)
Definition region.h:199
storm::storage::ParameterRegion< ValueType > parseRegion(std::string const &inputString, std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType > const &consideredVariables)
Definition region.h:134
std::pair< storm::ExtendedRationalNumber, typename storm::storage::ParameterRegion< ValueType >::Valuation > computeExtremalValue(Environment const &env, RefinementOptions< ValueType > settings, storm::storage::ParameterRegion< ValueType > const &region, storm::solver::OptimizationDirection const &dir, std::optional< ValueType > const &precision, bool absolutePrecision, std::optional< storm::logic::Bound > const &boundInvariant)
Finds the extremal value in the given region.
Definition region.h:333
std::pair< std::shared_ptr< storm::models::sparse::Model< ValueType > >, std::vector< std::shared_ptr< storm::logic::Formula const > > > transformContinuousToDiscreteTimeSparseModel(std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, std::vector< std::shared_ptr< storm::logic::Formula const > > const &formulas)
Transforms the given continuous model to a discrete time model.
bool verifyRegion(Environment const &env, RefinementOptions< ValueType > settings, storm::storage::ParameterRegion< ValueType > const &region)
Verifies whether a region satisfies a property.
Definition region.h:350
std::unique_ptr< storm::modelchecker::RegionModelChecker< ParametricType > > createRegionModelChecker(storm::modelchecker::RegionCheckEngine engine, storm::models::ModelType modelType)
Definition region.cpp:16
std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType > getModelParameters(storm::models::ModelBase const &model)
Definition region.h:50
storm::pars::modelchecker::MonotonicityOptions MonotonicitySetting
Definition region.h:44
std::unique_ptr< storm::modelchecker::RegionRefinementChecker< ValueType > > initializeRegionRefinementChecker(Environment const &env, RefinementOptions< ValueType > settings)
Definition region.h:288
std::vector< typename storm::storage::ParameterRegion< ValueType >::VariableType > parseVariableList(std::string const &inputString, std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType > const &consideredVariables)
Definition region.h:64
storm::storage::ParameterRegion< ValueType > createRegion(std::string const &inputString, std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType > const &consideredVariables)
Definition region.h:114
template std::unique_ptr< storm::modelchecker::RegionModelChecker< storm::RationalFunction > > createRegionModelChecker< storm::RationalFunction, double, storm::RationalNumber >(storm::modelchecker::RegionCheckEngine engine, storm::models::ModelType modelType)
std::unique_ptr< storm::modelchecker::RegionCheckResult< ValueType > > checkRegionsWithSparseEngine(Environment const &env, std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, storm::modelchecker::CheckTask< storm::logic::Formula, ValueType > const &task, std::vector< storm::storage::ParameterRegion< ValueType > > const &regions, storm::modelchecker::RegionCheckEngine engine, std::vector< storm::modelchecker::RegionResultHypothesis > const &hypotheses, bool sampleVerticesOfRegions)
Definition region.h:268
std::unique_ptr< storm::modelchecker::RegionModelChecker< ValueType > > initializeRegionModelChecker(Environment const &env, std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model, storm::modelchecker::CheckTask< storm::logic::Formula, ValueType > const &task, storm::modelchecker::RegionCheckEngine engine, bool allowModelSimplification=true, storm::pars::analysis::GraphPreservationStatus graphPreservationStatus=storm::pars::analysis::GraphPreservationStatus::GraphPreserving, bool preconditionsValidated=false, MonotonicitySetting monotonicitySetting=MonotonicitySetting(), std::optional< std::pair< std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType >, std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType > > > monotoneParameters=std::nullopt)
Definition region.h:238
storm::pars::modelchecker::RegionRefinementOptions< ValueType > RefinementOptions
Definition region.h:47
std::pair< std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType >, std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType > > parseMonotoneParameters(std::string const &fileName, std::shared_ptr< storm::models::sparse::Model< ValueType > > const &model)
Definition region.h:161
void closeFile(std::ofstream &stream)
Close the given file after writing.
Definition file.h:47
bool fileExistsAndIsReadable(std::string const &filename)
Tests whether the given file exists and is readable.
Definition file.h:66
void openFile(std::string const &filepath, std::ofstream &filestream, bool append=false, bool silent=false)
Open the given file for writing.
Definition file.h:18
@ AllSat
the formula is satisfied for all well-defined parameters in the given region
@ AllViolated
the formula is violated for all well-defined parameters in the given region
@ AllIllDefined
the formula is ill-defined for all parameters in the given region
RegionResultHypothesis
hypothesis for the result for a single Parameter Region
RegionCheckEngine
The considered engine for region checking.
@ ExactParameterLifting
Parameter lifting approach with exact arithmethics.
std::set< storm::RationalFunctionVariable > getRewardParameters(Model< storm::RationalFunction > const &model)
Get all parameters occurring in rewards.
Definition Model.cpp:736
std::set< storm::RationalFunctionVariable > getProbabilityParameters(Model< storm::RationalFunction > const &model)
Get all probability parameters occurring on transitions.
Definition Model.cpp:732
GraphPreservationStatus
Describes to what extent a set of regions is known to be well-defined and to preserve the graph struc...
@ GraphPreserving
The regions are known (or assumed) to preserve the graph structure of the model.
static bool validateParameterLiftingSound(storm::models::sparse::Model< ValueType > const &model, storm::logic::Formula const &formula, storm::modelchecker::RegionCheckEngine engine)
Checks whether the parameter lifting approach is sound on the given model with respect to the provide...
ValueType zero()
Definition constants.cpp:26
TargetType convertNumber(SourceType const &number)