Storm 1.11.1.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
30
32
38#include "storm/io/file.h"
40
41namespace storm {
42
43namespace api {
44
45// Type aliases for backward compatibility
47
48template<typename ValueType>
50
51template<typename ValueType>
52std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> getModelParameters(storm::models::ModelBase const& model) {
53 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> modelParameters;
54 if (model.isSparseModel()) {
55 auto const& sparseModel = dynamic_cast<storm::models::sparse::Model<ValueType> const&>(model);
56 modelParameters = storm::models::sparse::getProbabilityParameters(sparseModel);
57 auto rewParameters = storm::models::sparse::getRewardParameters(sparseModel);
58 modelParameters.insert(rewParameters.begin(), rewParameters.end());
59 } else {
60 STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Retrieving model parameters is not supported for the given model type.");
61 }
62 return modelParameters;
63}
64
65template<typename ValueType>
66std::vector<typename storm::storage::ParameterRegion<ValueType>::VariableType> parseVariableList(
67 std::string const& inputString, std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> const& consideredVariables) {
68 if (inputString == "") {
69 return {};
70 }
71 std::vector<typename storm::storage::ParameterRegion<ValueType>::VariableType> variables;
72 std::vector<std::string> variableStrings;
73 boost::split(variableStrings, inputString, boost::is_any_of(","));
74 for (auto& var : variableStrings) {
75 boost::trim(var);
76 bool found = false;
77 // Find parameter in list
78 for (auto const& param : consideredVariables) {
79 if (var == param.name()) {
80 variables.push_back(param);
81 found = true;
82 break;
83 }
84 }
85 if (!found) {
86 STORM_LOG_ERROR("Variable " << var << " not found.");
87 }
88 }
89 return variables;
90}
91
92template<typename ValueType>
93std::vector<typename storm::storage::ParameterRegion<ValueType>::VariableType> parseVariableList(std::string const& inputString,
94 storm::models::ModelBase const& model) {
95 return parseVariableList<ValueType>(inputString, getModelParameters<ValueType>(model));
96}
97
98template<typename ValueType>
99std::vector<storm::storage::ParameterRegion<ValueType>> parseRegions(
100 std::string const& inputString, std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> const& consideredVariables) {
101 // If the given input string looks like a file (containing a dot and there exists a file with that name),
102 // we try to parse it as a file, otherwise we assume it's a region string.
103 if (inputString.find(".") != std::string::npos && storm::io::fileExistsAndIsReadable(inputString)) {
104 return storm::parser::ParameterRegionParser<ValueType>().parseMultipleRegionsFromFile(inputString, consideredVariables);
105 } else {
106 return storm::parser::ParameterRegionParser<ValueType>().parseMultipleRegions(inputString, consideredVariables);
107 }
108}
109
110template<typename ValueType>
111std::vector<storm::storage::ParameterRegion<ValueType>> parseRegions(std::string const& inputString, storm::models::ModelBase const& model) {
112 return parseRegions<ValueType>(inputString, getModelParameters<ValueType>(model));
113}
114
115template<typename ValueType>
117 std::string const& inputString, std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> const& consideredVariables) {
118 return storm::parser::ParameterRegionParser<ValueType>().createRegion(inputString, consideredVariables);
119}
120
121template<typename ValueType>
122std::vector<storm::storage::ParameterRegion<ValueType>> createRegion(std::string const& inputString, storm::models::ModelBase const& model) {
123 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> modelParameters;
124 if (model.isSparseModel()) {
125 auto const& sparseModel = dynamic_cast<storm::models::sparse::Model<ValueType> const&>(model);
126 modelParameters = storm::models::sparse::getProbabilityParameters(sparseModel);
127 auto rewParameters = storm::models::sparse::getRewardParameters(sparseModel);
128 modelParameters.insert(rewParameters.begin(), rewParameters.end());
129 } else {
130 STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Retrieving model parameters is not supported for the given model type.");
131 }
132 return std::vector<storm::storage::ParameterRegion<ValueType>>({createRegion<ValueType>(inputString, modelParameters)});
133}
134
135template<typename ValueType>
137 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> const& consideredVariables) {
138 // Handle the "empty region" case
139 if (inputString == "" && consideredVariables.empty()) {
141 }
142
143 auto res = parseRegions<ValueType>(inputString, consideredVariables);
144 STORM_LOG_THROW(res.size() == 1, storm::exceptions::InvalidOperationException, "Parsed " << res.size() << " regions but exactly one was expected.");
145 return res.front();
146}
147
148template<typename ValueType>
150 // Handle the "empty region" case
151 if (inputString == "" && !model.hasParameters()) {
153 }
154
155 auto res = parseRegions<ValueType>(inputString, model);
156 STORM_LOG_THROW(res.size() == 1, storm::exceptions::InvalidOperationException, "Parsed " << res.size() << " regions but exactly one was expected.");
157 return res.front();
158}
159
160template<typename ValueType>
161std::pair<std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType>,
162 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType>>
163parseMonotoneParameters(std::string const& fileName, std::shared_ptr<storm::models::sparse::Model<ValueType>> const& model) {
164 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> modelParameters;
165 modelParameters = storm::models::sparse::getProbabilityParameters(*model);
166 auto rewParameters = storm::models::sparse::getRewardParameters(*model);
167 modelParameters.insert(rewParameters.begin(), rewParameters.end());
168 return std::move(storm::parser::MonotonicityParser<typename storm::storage::ParameterRegion<ValueType>::VariableType>().parseMonotoneVariablesFromFile(
169 fileName, modelParameters));
170}
171
172template<typename ParametricType>
173std::shared_ptr<storm::models::sparse::Model<ParametricType>> preprocessSparseModelForParameterLifting(
174 std::shared_ptr<storm::models::sparse::Model<ParametricType>> const& model,
176 bool preconditionsValidatedManually = false) {
177 STORM_LOG_WARN_COND(preconditionsValidatedManually || storm::utility::parameterlifting::validateParameterLiftingSound(*model, task.getFormula(), engine),
178 "Could not validate whether parameter lifting is applicable. Please validate manually...");
179 std::shared_ptr<storm::models::sparse::Model<ParametricType>> consideredModel = model;
180
181 // Treat continuous time models
182 if (consideredModel->isOfType(storm::models::ModelType::Ctmc) || consideredModel->isOfType(storm::models::ModelType::MarkovAutomaton)) {
183 STORM_LOG_WARN("Parameter lifting not supported for continuous time models. Transforming continuous model to discrete model...");
184 std::vector<std::shared_ptr<storm::logic::Formula const>> taskFormulaAsVector{task.getFormula().asSharedPointer()};
185 consideredModel = storm::api::transformContinuousToDiscreteTimeSparseModel(consideredModel, taskFormulaAsVector).first;
186 STORM_LOG_THROW(consideredModel->isOfType(storm::models::ModelType::Dtmc) || consideredModel->isOfType(storm::models::ModelType::Mdp),
187 storm::exceptions::UnexpectedException, "Transformation to discrete time model has failed.");
188 }
189 return consideredModel;
190}
191
192template<typename ParametricType, typename ImpreciseType = double, typename PreciseType = storm::RationalNumber>
193std::unique_ptr<storm::modelchecker::RegionModelChecker<ParametricType>> createRegionModelChecker(storm::modelchecker::RegionCheckEngine engine,
194 storm::models::ModelType modelType) {
195 STORM_LOG_THROW(modelType == storm::models::ModelType::Dtmc || modelType == storm::models::ModelType::Mdp, storm::exceptions::NotSupportedException,
196 "Unable to create a region checker for the provided model type.");
197
198 switch (engine) {
200 if (modelType == storm::models::ModelType::Dtmc) {
201 return std::make_unique<
203 } else {
204 return std::make_unique<
206 }
208 if (modelType == storm::models::ModelType::Dtmc) {
209 return std::make_unique<
211 } else {
212 return std::make_unique<storm::modelchecker::SparseMdpParameterLiftingModelChecker<storm::models::sparse::Mdp<ParametricType>, PreciseType>>();
213 }
215 return std::make_unique<
218 if (modelType == storm::models::ModelType::Dtmc) {
219 return std::make_unique<storm::modelchecker::ValidatingSparseParameterLiftingModelChecker<storm::models::sparse::Dtmc<ParametricType>,
220 ImpreciseType, PreciseType>>();
221 } else {
222 return std::make_unique<storm::modelchecker::ValidatingSparseParameterLiftingModelChecker<storm::models::sparse::Mdp<ParametricType>,
223 ImpreciseType, PreciseType>>();
224 }
225 default:
226 STORM_LOG_THROW(false, storm::exceptions::UnexpectedException, "Unexpected region model checker type.");
227 }
228 return nullptr;
229}
230
231template<typename ParametricType, typename ImpreciseType = double, typename PreciseType = storm::RationalNumber>
232std::unique_ptr<storm::modelchecker::MonotonicityBackend<ParametricType>> initializeMonotonicityBackend(
235 std::optional<std::pair<std::set<typename storm::storage::ParameterRegion<ParametricType>::VariableType>,
237 monotoneParameters = std::nullopt) {
238 // Initialize default backend
239 auto monotonicityBackend = std::make_unique<storm::modelchecker::MonotonicityBackend<ParametricType>>();
240
241 // Potentially replace default by order-based monotonicity
242 if (monotonicitySetting.useMonotonicity) {
243 std::unique_ptr<storm::modelchecker::MonotonicityBackend<ParametricType>> orderBasedBackend;
245 orderBasedBackend = std::make_unique<storm::modelchecker::OrderBasedMonotonicityBackend<ParametricType, PreciseType>>(
246 monotonicitySetting.useOnlyGlobalMonotonicity, monotonicitySetting.useBoundsFromPLA);
247 } else {
248 orderBasedBackend = std::make_unique<storm::modelchecker::OrderBasedMonotonicityBackend<ParametricType, ImpreciseType>>(
249 monotonicitySetting.useOnlyGlobalMonotonicity, monotonicitySetting.useBoundsFromPLA);
250 }
251 if (regionChecker.isMonotonicitySupported(*orderBasedBackend, task)) {
252 monotonicityBackend = std::move(orderBasedBackend);
253 } else {
254 STORM_LOG_WARN("Order-based Monotonicity enabled for region checking engine " << engine << " but not supported in this configuration.");
255 }
256 }
257
258 // Insert monotone parameters if available
259 if (monotoneParameters) {
260 for (auto const& incrPar : monotoneParameters->first) {
261 monotonicityBackend->setMonotoneParameter(incrPar, storm::analysis::MonotonicityKind::Incr);
262 }
263 for (auto const& decrPar : monotoneParameters->second) {
264 monotonicityBackend->setMonotoneParameter(decrPar, storm::analysis::MonotonicityKind::Decr);
265 }
266 }
267 return monotonicityBackend;
268}
269
270template<typename ValueType, typename ImpreciseType = double, typename PreciseType = storm::RationalNumber>
271std::unique_ptr<storm::modelchecker::RegionModelChecker<ValueType>> initializeRegionModelChecker(
272 Environment const& env, std::shared_ptr<storm::models::sparse::Model<ValueType>> const& model,
274 bool allowModelSimplification = true, bool graphPreserving = true, bool preconditionsValidated = false,
275 MonotonicitySetting monotonicitySetting = MonotonicitySetting(),
276 std::optional<std::pair<std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType>,
278 monotoneParameters = std::nullopt) {
279 auto consideredModel = preprocessSparseModelForParameterLifting(model, task, engine, preconditionsValidated);
280 auto regionChecker = createRegionModelChecker<ValueType, ImpreciseType, PreciseType>(engine, model->getType());
281 auto monotonicityBackend =
282 initializeMonotonicityBackend<ValueType, ImpreciseType, PreciseType>(*regionChecker, engine, task, monotonicitySetting, monotoneParameters);
283 if (allowModelSimplification) {
284 allowModelSimplification = monotonicityBackend->recommendModelSimplifications();
285 STORM_LOG_WARN_COND(allowModelSimplification, "Model simplification is disabled because the monotonicity algorithm does not recommend it.");
286 }
287 regionChecker->specify(env, consideredModel, task, std::nullopt, std::move(monotonicityBackend), allowModelSimplification, graphPreserving);
288 return regionChecker;
289}
290
291template<typename ValueType>
292std::unique_ptr<storm::modelchecker::RegionModelChecker<ValueType>> initializeRegionModelChecker(
295 Environment env;
296 return initializeRegionModelChecker(env, model, task, engine);
297}
298
299template<typename ValueType>
300std::unique_ptr<storm::modelchecker::RegionCheckResult<ValueType>> checkRegionsWithSparseEngine(
303 std::vector<storm::modelchecker::RegionResultHypothesis> const& hypotheses, bool sampleVerticesOfRegions) {
304 Environment env;
305 auto regionChecker = initializeRegionModelChecker(env, model, task, engine);
306 return regionChecker->analyzeRegions(env, regions, hypotheses, sampleVerticesOfRegions);
307}
308
309template<typename ValueType>
310std::unique_ptr<storm::modelchecker::RegionCheckResult<ValueType>> checkRegionsWithSparseEngine(
314 bool sampleVerticesOfRegions = false) {
315 std::vector<storm::modelchecker::RegionResultHypothesis> hypotheses(regions.size(), hypothesis);
316 return checkRegionsWithSparseEngine(model, task, regions, engine, hypotheses, sampleVerticesOfRegions);
317}
318
319template<typename ValueType, typename ImpreciseType = double, typename PreciseType = storm::RationalNumber>
320std::unique_ptr<storm::modelchecker::RegionRefinementChecker<ValueType>> initializeRegionRefinementChecker(Environment const& env,
322 auto consideredModel = preprocessSparseModelForParameterLifting(settings.model, settings.task, settings.engine, settings.preconditionsValidated);
323 auto regionChecker = createRegionModelChecker<ValueType, ImpreciseType, PreciseType>(settings.engine, settings.model->getType());
324 auto monotonicityBackend = initializeMonotonicityBackend<ValueType, ImpreciseType, PreciseType>(*regionChecker, settings.engine, settings.task,
325 settings.monotonicitySetting, settings.monotoneParameters);
326 settings.allowModelSimplification = settings.allowModelSimplification && monotonicityBackend->recommendModelSimplifications();
327 auto refinementChecker = std::make_unique<storm::modelchecker::RegionRefinementChecker<ValueType>>(std::move(regionChecker));
328 refinementChecker->specify(env, consideredModel, settings.task, std::move(settings.regionSplittingStrategy), std::move(settings.discreteVariables),
329 std::move(monotonicityBackend), settings.allowModelSimplification, settings.graphPreserving);
330 return refinementChecker;
331}
332
344template<typename ValueType>
345std::unique_ptr<storm::modelchecker::RegionRefinementCheckResult<ValueType>> checkAndRefineRegionWithSparseEngine(
346 RefinementOptions<ValueType> settings, storm::storage::ParameterRegion<ValueType> const& region, std::optional<ValueType> const& coverageThreshold,
347 std::optional<uint64_t> const& refinementDepthThreshold = std::nullopt,
349 Environment env;
350 auto const& regionRefinementChecker = initializeRegionRefinementChecker(env, settings);
351 return regionRefinementChecker->performRegionPartitioning(env, region, coverageThreshold, refinementDepthThreshold, hypothesis, monThresh);
352}
353
354// TODO: update documentation
365template<typename ValueType>
366std::pair<storm::RationalNumber, typename storm::storage::ParameterRegion<ValueType>::Valuation> computeExtremalValue(
368 std::optional<ValueType> const& precision, bool absolutePrecision, std::optional<storm::logic::Bound> const& boundInvariant) {
369 Environment env;
370 auto refinementChecker = initializeRegionRefinementChecker(env, settings);
371 auto res =
372 refinementChecker->computeExtremalValue(env, region, dir, precision.value_or(storm::utility::zero<ValueType>()), absolutePrecision, boundInvariant);
373 return {storm::utility::convertNumber<storm::RationalNumber>(res.first), std::move(res.second)};
374}
375
382template<typename ValueType>
384 Environment env;
386 storm::exceptions::NotSupportedException, "Only probability and reward operators supported");
387 STORM_LOG_THROW(settings.task.getFormula().asOperatorFormula().hasBound(), storm::exceptions::NotSupportedException,
388 "Verification requires a bounded operator formula.");
389
390 storm::logic::Bound const& bound = settings.task.getFormula().asOperatorFormula().getBound();
391 auto refinementChecker = initializeRegionRefinementChecker(env, settings);
392 return refinementChecker->verifyRegion(env, region, bound);
393}
394
395template<typename ValueType>
396void exportRegionCheckResultToFile(std::unique_ptr<storm::modelchecker::CheckResult> const& checkResult, std::string const& filename,
397 bool onlyConclusiveResults = false) {
398 auto const* regionCheckResult = dynamic_cast<storm::modelchecker::RegionCheckResult<ValueType> const*>(checkResult.get());
399 STORM_LOG_THROW(regionCheckResult != nullptr, storm::exceptions::UnexpectedException,
400 "Can not export region check result: The given checkresult does not have the expected type.");
401
402 std::ofstream filestream;
403 storm::io::openFile(filename, filestream);
404 for (auto const& res : regionCheckResult->getRegionResults()) {
405 if (!onlyConclusiveResults || res.second == storm::modelchecker::RegionResult::AllViolated || res.second == storm::modelchecker::RegionResult::AllSat ||
407 filestream << res.second << ": " << res.first << '\n';
408 }
409 }
410 storm::io::closeFile(filestream);
411}
412
413} // namespace api
414} // namespace storm
virtual bool isProbabilityOperatorFormula() const
Definition Formula.cpp:180
OperatorFormula & asOperatorFormula()
Definition Formula.cpp:492
virtual bool isRewardOperatorFormula() const
Definition Formula.cpp:184
Bound const & getBound() const
FormulaType const & getFormula() const
Retrieves the formula from this task.
Definition CheckTask.h:140
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:32
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:25
#define STORM_LOG_ERROR(message)
Definition logging.h:26
#define STORM_LOG_WARN_COND(cond, message)
Definition macros.h:38
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30
@ 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:396
std::vector< storm::storage::ParameterRegion< ValueType > > parseRegions(std::string const &inputString, std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType > const &consideredVariables)
Definition region.h:99
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:173
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:232
storm::storage::ParameterRegion< ValueType > parseRegion(std::string const &inputString, std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType > const &consideredVariables)
Definition region.h:136
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:300
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:345
std::unique_ptr< storm::modelchecker::RegionModelChecker< ParametricType > > createRegionModelChecker(storm::modelchecker::RegionCheckEngine engine, storm::models::ModelType modelType)
Definition region.h:193
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:271
std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType > getModelParameters(storm::models::ModelBase const &model)
Definition region.h:52
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:366
storm::pars::modelchecker::MonotonicityOptions MonotonicitySetting
Definition region.h:46
std::unique_ptr< storm::modelchecker::RegionRefinementChecker< ValueType > > initializeRegionRefinementChecker(Environment const &env, RefinementOptions< ValueType > settings)
Definition region.h:320
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:66
bool verifyRegion(RefinementOptions< ValueType > settings, storm::storage::ParameterRegion< ValueType > const &region)
Verifies whether a region satisfies a property.
Definition region.h:383
storm::storage::ParameterRegion< ValueType > createRegion(std::string const &inputString, std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType > const &consideredVariables)
Definition region.h:116
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:163
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.
@ ParameterLifting
Parameter lifting approach.
@ ValidatingParameterLifting
Parameter lifting approach with a) inexact (and fast) computation first and b) exact validation of ob...
@ RobustParameterLifting
Parameter lifting approach based on robust markov models instead of generating nondeterminism.
@ 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:707
std::set< storm::RationalFunctionVariable > getProbabilityParameters(Model< storm::RationalFunction > const &model)
Get all probability parameters occurring on transitions.
Definition Model.cpp:703
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...
LabParser.cpp.
std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType > const & discreteVariables
storm::modelchecker::RegionCheckEngine engine
std::shared_ptr< storm::models::sparse::Model< ValueType > > model
storm::modelchecker::CheckTask< storm::logic::Formula, ValueType > task
storm::modelchecker::RegionSplittingStrategy regionSplittingStrategy
std::optional< std::pair< std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType >, std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType > > > monotoneParameters