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
28
30
35#include "storm/io/file.h"
37
38namespace storm {
39
40namespace api {
41
42// Type aliases for backward compatibility
44
45template<typename ValueType>
47
48template<typename ValueType>
49std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> getModelParameters(storm::models::ModelBase const& model) {
50 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> modelParameters;
51 if (model.isSparseModel()) {
52 auto const& sparseModel = dynamic_cast<storm::models::sparse::Model<ValueType> const&>(model);
53 modelParameters = storm::models::sparse::getProbabilityParameters(sparseModel);
54 auto rewParameters = storm::models::sparse::getRewardParameters(sparseModel);
55 modelParameters.insert(rewParameters.begin(), rewParameters.end());
56 } else {
57 STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Retrieving model parameters is not supported for the given model type.");
58 }
59 return modelParameters;
60}
61
62template<typename ValueType>
63std::vector<typename storm::storage::ParameterRegion<ValueType>::VariableType> parseVariableList(
64 std::string const& inputString, std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> const& consideredVariables) {
65 if (inputString == "") {
66 return {};
67 }
68 std::vector<typename storm::storage::ParameterRegion<ValueType>::VariableType> variables;
69 std::vector<std::string> variableStrings;
70 boost::split(variableStrings, inputString, boost::is_any_of(","));
71 for (auto& var : variableStrings) {
72 boost::trim(var);
73 bool found = false;
74 // Find parameter in list
75 for (auto const& param : consideredVariables) {
76 if (var == param.name()) {
77 variables.push_back(param);
78 found = true;
79 break;
80 }
81 }
82 if (!found) {
83 STORM_LOG_ERROR("Variable " << var << " not found.");
84 }
85 }
86 return variables;
87}
88
89template<typename ValueType>
90std::vector<typename storm::storage::ParameterRegion<ValueType>::VariableType> parseVariableList(std::string const& inputString,
91 storm::models::ModelBase const& model) {
93}
94
95template<typename ValueType>
96std::vector<storm::storage::ParameterRegion<ValueType>> parseRegions(
97 std::string const& inputString, std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> const& consideredVariables) {
98 // If the given input string looks like a file (containing a dot and there exists a file with that name),
99 // we try to parse it as a file, otherwise we assume it's a region string.
100 if (inputString.find(".") != std::string::npos && storm::io::fileExistsAndIsReadable(inputString)) {
101 return storm::parser::ParameterRegionParser<ValueType>().parseMultipleRegionsFromFile(inputString, consideredVariables);
102 } else {
103 return storm::parser::ParameterRegionParser<ValueType>().parseMultipleRegions(inputString, consideredVariables);
104 }
105}
106
107template<typename ValueType>
108std::vector<storm::storage::ParameterRegion<ValueType>> parseRegions(std::string const& inputString, storm::models::ModelBase const& model) {
109 return parseRegions<ValueType>(inputString, getModelParameters<ValueType>(model));
110}
111
112template<typename ValueType>
114 std::string const& inputString, std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> const& consideredVariables) {
115 return storm::parser::ParameterRegionParser<ValueType>().createRegion(inputString, consideredVariables);
116}
117
118template<typename ValueType>
119std::vector<storm::storage::ParameterRegion<ValueType>> createRegion(std::string const& inputString, storm::models::ModelBase const& model) {
120 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> modelParameters;
121 if (model.isSparseModel()) {
122 auto const& sparseModel = dynamic_cast<storm::models::sparse::Model<ValueType> const&>(model);
123 modelParameters = storm::models::sparse::getProbabilityParameters(sparseModel);
124 auto rewParameters = storm::models::sparse::getRewardParameters(sparseModel);
125 modelParameters.insert(rewParameters.begin(), rewParameters.end());
126 } else {
127 STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Retrieving model parameters is not supported for the given model type.");
128 }
129 return std::vector<storm::storage::ParameterRegion<ValueType>>({createRegion<ValueType>(inputString, modelParameters)});
130}
131
132template<typename ValueType>
134 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> const& consideredVariables) {
135 // Handle the "empty region" case
136 if (inputString == "" && consideredVariables.empty()) {
138 }
139
140 auto res = parseRegions<ValueType>(inputString, consideredVariables);
141 STORM_LOG_THROW(res.size() == 1, storm::exceptions::InvalidOperationException, "Parsed " << res.size() << " regions but exactly one was expected.");
142 return res.front();
143}
144
145template<typename ValueType>
147 // Handle the "empty region" case
148 if (inputString == "" && !model.hasParameters()) {
150 }
151
152 auto res = parseRegions<ValueType>(inputString, model);
153 STORM_LOG_THROW(res.size() == 1, storm::exceptions::InvalidOperationException, "Parsed " << res.size() << " regions but exactly one was expected.");
154 return res.front();
155}
156
157template<typename ValueType>
158std::pair<std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType>,
159 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType>>
160parseMonotoneParameters(std::string const& fileName, std::shared_ptr<storm::models::sparse::Model<ValueType>> const& model) {
161 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> modelParameters;
162 modelParameters = storm::models::sparse::getProbabilityParameters(*model);
163 auto rewParameters = storm::models::sparse::getRewardParameters(*model);
164 modelParameters.insert(rewParameters.begin(), rewParameters.end());
165 return std::move(storm::parser::MonotonicityParser<typename storm::storage::ParameterRegion<ValueType>::VariableType>().parseMonotoneVariablesFromFile(
166 fileName, modelParameters));
167}
168
169template<typename ParametricType>
170std::shared_ptr<storm::models::sparse::Model<ParametricType>> preprocessSparseModelForParameterLifting(
171 std::shared_ptr<storm::models::sparse::Model<ParametricType>> const& model,
173 bool preconditionsValidatedManually = false) {
174 STORM_LOG_WARN_COND(preconditionsValidatedManually || storm::utility::parameterlifting::validateParameterLiftingSound(*model, task.getFormula(), engine),
175 "Could not validate whether parameter lifting is applicable. Please validate manually...");
176 std::shared_ptr<storm::models::sparse::Model<ParametricType>> consideredModel = model;
177
178 // Treat continuous time models
179 if (consideredModel->isOfType(storm::models::ModelType::Ctmc) || consideredModel->isOfType(storm::models::ModelType::MarkovAutomaton)) {
180 STORM_LOG_WARN("Parameter lifting not supported for continuous time models. Transforming continuous model to discrete model...");
181 std::vector<std::shared_ptr<storm::logic::Formula const>> taskFormulaAsVector{task.getFormula().asSharedPointer()};
182 consideredModel = storm::api::transformContinuousToDiscreteTimeSparseModel(consideredModel, taskFormulaAsVector).first;
183 STORM_LOG_THROW(consideredModel->isOfType(storm::models::ModelType::Dtmc) || consideredModel->isOfType(storm::models::ModelType::Mdp),
184 storm::exceptions::UnexpectedException, "Transformation to discrete time model has failed.");
185 }
186 return consideredModel;
187}
188
189template<typename ParametricType, typename ImpreciseType = double, typename PreciseType = storm::RationalNumber>
190std::unique_ptr<storm::modelchecker::RegionModelChecker<ParametricType>> createRegionModelChecker(storm::modelchecker::RegionCheckEngine engine,
191 storm::models::ModelType modelType);
192
193extern template std::unique_ptr<storm::modelchecker::RegionModelChecker<storm::RationalFunction>>
195 storm::models::ModelType modelType);
196
197template<typename ParametricType, typename ImpreciseType = double, typename PreciseType = storm::RationalNumber>
198std::unique_ptr<storm::modelchecker::MonotonicityBackend<ParametricType>> initializeMonotonicityBackend(
201 std::optional<std::pair<std::set<typename storm::storage::ParameterRegion<ParametricType>::VariableType>,
203 monotoneParameters = std::nullopt) {
204 // Initialize default backend
205 auto monotonicityBackend = std::make_unique<storm::modelchecker::MonotonicityBackend<ParametricType>>();
206
207 // Potentially replace default by order-based monotonicity
208 if (monotonicitySetting.useMonotonicity) {
209 std::unique_ptr<storm::modelchecker::MonotonicityBackend<ParametricType>> orderBasedBackend;
211 orderBasedBackend = std::make_unique<storm::modelchecker::OrderBasedMonotonicityBackend<ParametricType, PreciseType>>(
212 monotonicitySetting.useOnlyGlobalMonotonicity, monotonicitySetting.useBoundsFromPLA);
213 } else {
214 orderBasedBackend = std::make_unique<storm::modelchecker::OrderBasedMonotonicityBackend<ParametricType, ImpreciseType>>(
215 monotonicitySetting.useOnlyGlobalMonotonicity, monotonicitySetting.useBoundsFromPLA);
216 }
217 if (regionChecker.isMonotonicitySupported(*orderBasedBackend, task)) {
218 monotonicityBackend = std::move(orderBasedBackend);
219 } else {
220 STORM_LOG_WARN("Order-based Monotonicity enabled for region checking engine " << engine << " but not supported in this configuration.");
221 }
222 }
223
224 // Insert monotone parameters if available
225 if (monotoneParameters) {
226 for (auto const& incrPar : monotoneParameters->first) {
227 monotonicityBackend->setMonotoneParameter(incrPar, storm::analysis::MonotonicityKind::Incr);
228 }
229 for (auto const& decrPar : monotoneParameters->second) {
230 monotonicityBackend->setMonotoneParameter(decrPar, storm::analysis::MonotonicityKind::Decr);
231 }
232 }
233 return monotonicityBackend;
234}
235
236template<typename ValueType, typename ImpreciseType = double, typename PreciseType = storm::RationalNumber>
237std::unique_ptr<storm::modelchecker::RegionModelChecker<ValueType>> initializeRegionModelChecker(
238 Environment const& env, std::shared_ptr<storm::models::sparse::Model<ValueType>> const& model,
240 bool allowModelSimplification = true, bool graphPreserving = true, bool preconditionsValidated = false,
241 MonotonicitySetting monotonicitySetting = MonotonicitySetting(),
242 std::optional<std::pair<std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType>,
244 monotoneParameters = std::nullopt) {
245 auto consideredModel = preprocessSparseModelForParameterLifting(model, task, engine, preconditionsValidated);
246 auto regionChecker = createRegionModelChecker<ValueType, ImpreciseType, PreciseType>(engine, model->getType());
247 auto monotonicityBackend =
248 initializeMonotonicityBackend<ValueType, ImpreciseType, PreciseType>(*regionChecker, engine, task, monotonicitySetting, monotoneParameters);
249 if (allowModelSimplification) {
250 allowModelSimplification = monotonicityBackend->recommendModelSimplifications();
251 STORM_LOG_WARN_COND(allowModelSimplification, "Model simplification is disabled because the monotonicity algorithm does not recommend it.");
252 }
253 regionChecker->specify(env, consideredModel, task, std::nullopt, std::move(monotonicityBackend), allowModelSimplification, graphPreserving);
254 return regionChecker;
255}
256
257template<typename ValueType>
258std::unique_ptr<storm::modelchecker::RegionModelChecker<ValueType>> initializeRegionModelChecker(
261 Environment env;
262 return initializeRegionModelChecker(env, model, task, engine);
263}
264
265template<typename ValueType>
266std::unique_ptr<storm::modelchecker::RegionCheckResult<ValueType>> checkRegionsWithSparseEngine(
269 std::vector<storm::modelchecker::RegionResultHypothesis> const& hypotheses, bool sampleVerticesOfRegions) {
270 Environment env;
271 auto regionChecker = initializeRegionModelChecker(env, model, task, engine);
272 return regionChecker->analyzeRegions(env, regions, hypotheses, sampleVerticesOfRegions);
273}
274
275template<typename ValueType>
276std::unique_ptr<storm::modelchecker::RegionCheckResult<ValueType>> checkRegionsWithSparseEngine(
280 bool sampleVerticesOfRegions = false) {
281 std::vector<storm::modelchecker::RegionResultHypothesis> hypotheses(regions.size(), hypothesis);
282 return checkRegionsWithSparseEngine(model, task, regions, engine, hypotheses, sampleVerticesOfRegions);
283}
284
285template<typename ValueType, typename ImpreciseType = double, typename PreciseType = storm::RationalNumber>
286std::unique_ptr<storm::modelchecker::RegionRefinementChecker<ValueType>> initializeRegionRefinementChecker(Environment const& env,
288 auto consideredModel = preprocessSparseModelForParameterLifting(settings.model, settings.task, settings.engine, settings.preconditionsValidated);
289 auto regionChecker = createRegionModelChecker<ValueType, ImpreciseType, PreciseType>(settings.engine, settings.model->getType());
290 auto monotonicityBackend = initializeMonotonicityBackend<ValueType, ImpreciseType, PreciseType>(*regionChecker, settings.engine, settings.task,
291 settings.monotonicitySetting, settings.monotoneParameters);
292 settings.allowModelSimplification = settings.allowModelSimplification && monotonicityBackend->recommendModelSimplifications();
293 auto refinementChecker = std::make_unique<storm::modelchecker::RegionRefinementChecker<ValueType>>(std::move(regionChecker));
294 refinementChecker->specify(env, consideredModel, settings.task, std::move(settings.regionSplittingStrategy), std::move(settings.discreteVariables),
295 std::move(monotonicityBackend), settings.allowModelSimplification, settings.graphPreserving);
296 return refinementChecker;
297}
298
310template<typename ValueType>
311std::unique_ptr<storm::modelchecker::RegionRefinementCheckResult<ValueType>> checkAndRefineRegionWithSparseEngine(
312 RefinementOptions<ValueType> settings, storm::storage::ParameterRegion<ValueType> const& region, std::optional<ValueType> const& coverageThreshold,
313 std::optional<uint64_t> const& refinementDepthThreshold = std::nullopt,
315 Environment env;
316 auto const& regionRefinementChecker = initializeRegionRefinementChecker(env, settings);
317 return regionRefinementChecker->performRegionPartitioning(env, region, coverageThreshold, refinementDepthThreshold, hypothesis, monThresh);
318}
319
320// TODO: update documentation
331template<typename ValueType>
332std::pair<storm::RationalNumber, typename storm::storage::ParameterRegion<ValueType>::Valuation> computeExtremalValue(
334 std::optional<ValueType> const& precision, bool absolutePrecision, std::optional<storm::logic::Bound> const& boundInvariant) {
335 Environment env;
336 auto refinementChecker = initializeRegionRefinementChecker(env, settings);
337 auto res =
338 refinementChecker->computeExtremalValue(env, region, dir, precision.value_or(storm::utility::zero<ValueType>()), absolutePrecision, boundInvariant);
339 return {storm::utility::convertNumber<storm::RationalNumber>(res.first), std::move(res.second)};
340}
341
348template<typename ValueType>
350 Environment env;
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:30
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:28
#define STORM_LOG_ERROR(message)
Definition logging.h:29
#define STORM_LOG_WARN_COND(cond, message)
Definition macros.h:36
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:28
@ 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:96
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:170
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:198
storm::storage::ParameterRegion< ValueType > parseRegion(std::string const &inputString, std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType > const &consideredVariables)
Definition region.h:133
std::unique_ptr< storm::modelchecker::RegionCheckResult< ValueType > > checkRegionsWithSparseEngine(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:266
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.
std::unique_ptr< storm::modelchecker::RegionRefinementCheckResult< ValueType > > checkAndRefineRegionWithSparseEngine(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:311
std::unique_ptr< storm::modelchecker::RegionModelChecker< ParametricType > > createRegionModelChecker(storm::modelchecker::RegionCheckEngine engine, storm::models::ModelType modelType)
Definition region.cpp:16
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, bool graphPreserving=true, 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:237
std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType > getModelParameters(storm::models::ModelBase const &model)
Definition region.h:49
std::pair< storm::RationalNumber, typename storm::storage::ParameterRegion< ValueType >::Valuation > computeExtremalValue(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:332
storm::pars::modelchecker::MonotonicityOptions MonotonicitySetting
Definition region.h:43
std::unique_ptr< storm::modelchecker::RegionRefinementChecker< ValueType > > initializeRegionRefinementChecker(Environment const &env, RefinementOptions< ValueType > settings)
Definition region.h:286
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:63
bool verifyRegion(RefinementOptions< ValueType > settings, storm::storage::ParameterRegion< ValueType > const &region)
Verifies whether a region satisfies a property.
Definition region.h:349
storm::storage::ParameterRegion< ValueType > createRegion(std::string const &inputString, std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType > const &consideredVariables)
Definition region.h:113
template std::unique_ptr< storm::modelchecker::RegionModelChecker< storm::RationalFunction > > createRegionModelChecker< storm::RationalFunction, double, storm::RationalNumber >(storm::modelchecker::RegionCheckEngine engine, storm::models::ModelType modelType)
storm::pars::modelchecker::RegionRefinementOptions< ValueType > RefinementOptions
Definition region.h:46
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:160
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:698
std::set< storm::RationalFunctionVariable > getProbabilityParameters(Model< storm::RationalFunction > const &model)
Get all probability parameters occurring on transitions.
Definition Model.cpp:694
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:24
TargetType convertNumber(SourceType const &number)