Storm 2.0.0.3
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
37#include "storm/io/file.h"
39
40namespace storm {
41
42namespace api {
43
44// Type aliases for backward compatibility
46
47template<typename ValueType>
49
50template<typename ValueType>
51std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> getModelParameters(storm::models::ModelBase const& model) {
52 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> modelParameters;
53 if (model.isSparseModel()) {
54 auto const& sparseModel = dynamic_cast<storm::models::sparse::Model<ValueType> const&>(model);
55 modelParameters = storm::models::sparse::getProbabilityParameters(sparseModel);
56 auto rewParameters = storm::models::sparse::getRewardParameters(sparseModel);
57 modelParameters.insert(rewParameters.begin(), rewParameters.end());
58 } else {
59 STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Retrieving model parameters is not supported for the given model type.");
60 }
61 return modelParameters;
62}
63
64template<typename ValueType>
65std::vector<typename storm::storage::ParameterRegion<ValueType>::VariableType> parseVariableList(
66 std::string const& inputString, std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> const& consideredVariables) {
67 if (inputString == "") {
68 return {};
69 }
70 std::vector<typename storm::storage::ParameterRegion<ValueType>::VariableType> variables;
71 std::vector<std::string> variableStrings;
72 boost::split(variableStrings, inputString, boost::is_any_of(","));
73 for (auto& var : variableStrings) {
74 boost::trim(var);
75 bool found = false;
76 // Find parameter in list
77 for (auto const& param : consideredVariables) {
78 if (var == param.name()) {
79 variables.push_back(param);
80 found = true;
81 break;
82 }
83 }
84 if (!found) {
85 STORM_LOG_ERROR("Variable " << var << " not found.");
86 }
87 }
88 return variables;
89}
90
91template<typename ValueType>
92std::vector<typename storm::storage::ParameterRegion<ValueType>::VariableType> parseVariableList(std::string const& inputString,
93 storm::models::ModelBase const& model) {
95}
96
97template<typename ValueType>
98std::vector<storm::storage::ParameterRegion<ValueType>> parseRegions(
99 std::string const& inputString, std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> const& consideredVariables) {
100 // If the given input string looks like a file (containing a dot and there exists a file with that name),
101 // we try to parse it as a file, otherwise we assume it's a region string.
102 if (inputString.find(".") != std::string::npos && storm::io::fileExistsAndIsReadable(inputString)) {
103 return storm::parser::ParameterRegionParser<ValueType>().parseMultipleRegionsFromFile(inputString, consideredVariables);
104 } else {
105 return storm::parser::ParameterRegionParser<ValueType>().parseMultipleRegions(inputString, consideredVariables);
106 }
107}
108
109template<typename ValueType>
110std::vector<storm::storage::ParameterRegion<ValueType>> parseRegions(std::string const& inputString, storm::models::ModelBase const& model) {
111 return parseRegions<ValueType>(inputString, getModelParameters<ValueType>(model));
112}
113
114template<typename ValueType>
116 std::string const& inputString, std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> const& consideredVariables) {
117 return storm::parser::ParameterRegionParser<ValueType>().createRegion(inputString, consideredVariables);
118}
119
120template<typename ValueType>
121std::vector<storm::storage::ParameterRegion<ValueType>> createRegion(std::string const& inputString, storm::models::ModelBase const& model) {
122 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> modelParameters;
123 if (model.isSparseModel()) {
124 auto const& sparseModel = dynamic_cast<storm::models::sparse::Model<ValueType> const&>(model);
125 modelParameters = storm::models::sparse::getProbabilityParameters(sparseModel);
126 auto rewParameters = storm::models::sparse::getRewardParameters(sparseModel);
127 modelParameters.insert(rewParameters.begin(), rewParameters.end());
128 } else {
129 STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Retrieving model parameters is not supported for the given model type.");
130 }
131 return std::vector<storm::storage::ParameterRegion<ValueType>>({createRegion<ValueType>(inputString, modelParameters)});
132}
133
134template<typename ValueType>
136 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> const& consideredVariables) {
137 // Handle the "empty region" case
138 if (inputString == "" && consideredVariables.empty()) {
140 }
141
142 auto res = parseRegions<ValueType>(inputString, consideredVariables);
143 STORM_LOG_THROW(res.size() == 1, storm::exceptions::InvalidOperationException, "Parsed " << res.size() << " regions but exactly one was expected.");
144 return res.front();
145}
146
147template<typename ValueType>
149 // Handle the "empty region" case
150 if (inputString == "" && !model.hasParameters()) {
152 }
153
154 auto res = parseRegions<ValueType>(inputString, model);
155 STORM_LOG_THROW(res.size() == 1, storm::exceptions::InvalidOperationException, "Parsed " << res.size() << " regions but exactly one was expected.");
156 return res.front();
157}
158
159template<typename ValueType>
160std::pair<std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType>,
161 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType>>
162parseMonotoneParameters(std::string const& fileName, std::shared_ptr<storm::models::sparse::Model<ValueType>> const& model) {
163 std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType> modelParameters;
164 modelParameters = storm::models::sparse::getProbabilityParameters(*model);
165 auto rewParameters = storm::models::sparse::getRewardParameters(*model);
166 modelParameters.insert(rewParameters.begin(), rewParameters.end());
167 return std::move(storm::parser::MonotonicityParser<typename storm::storage::ParameterRegion<ValueType>::VariableType>().parseMonotoneVariablesFromFile(
168 fileName, modelParameters));
169}
170
171template<typename ParametricType>
172std::shared_ptr<storm::models::sparse::Model<ParametricType>> preprocessSparseModelForParameterLifting(
173 std::shared_ptr<storm::models::sparse::Model<ParametricType>> const& model,
175 bool preconditionsValidatedManually = false) {
176 STORM_LOG_WARN_COND(preconditionsValidatedManually || storm::utility::parameterlifting::validateParameterLiftingSound(*model, task.getFormula(), engine),
177 "Could not validate whether parameter lifting is applicable. Please validate manually...");
178 std::shared_ptr<storm::models::sparse::Model<ParametricType>> consideredModel = model;
179
180 // Treat continuous time models
181 if (consideredModel->isOfType(storm::models::ModelType::Ctmc) || consideredModel->isOfType(storm::models::ModelType::MarkovAutomaton)) {
182 STORM_LOG_WARN("Parameter lifting not supported for continuous time models. Transforming continuous model to discrete model...");
183 std::vector<std::shared_ptr<storm::logic::Formula const>> taskFormulaAsVector{task.getFormula().asSharedPointer()};
184 consideredModel = storm::api::transformContinuousToDiscreteTimeSparseModel(consideredModel, taskFormulaAsVector).first;
185 STORM_LOG_THROW(consideredModel->isOfType(storm::models::ModelType::Dtmc) || consideredModel->isOfType(storm::models::ModelType::Mdp),
186 storm::exceptions::UnexpectedException, "Transformation to discrete time model has failed.");
187 }
188 return consideredModel;
189}
190
191template<typename ParametricType, typename ImpreciseType = double, typename PreciseType = storm::RationalNumber>
192std::unique_ptr<storm::modelchecker::RegionModelChecker<ParametricType>> createRegionModelChecker(storm::modelchecker::RegionCheckEngine engine,
193 storm::models::ModelType modelType);
194
195extern template std::unique_ptr<storm::modelchecker::RegionModelChecker<storm::RationalFunction>>
197 storm::models::ModelType modelType);
198
199template<typename ParametricType, typename ImpreciseType = double, typename PreciseType = storm::RationalNumber>
200std::unique_ptr<storm::modelchecker::MonotonicityBackend<ParametricType>> initializeMonotonicityBackend(
203 std::optional<std::pair<std::set<typename storm::storage::ParameterRegion<ParametricType>::VariableType>,
205 monotoneParameters = std::nullopt) {
206 // Initialize default backend
207 auto monotonicityBackend = std::make_unique<storm::modelchecker::MonotonicityBackend<ParametricType>>();
208
209 // Potentially replace default by order-based monotonicity
210 if (monotonicitySetting.useMonotonicity) {
211 std::unique_ptr<storm::modelchecker::MonotonicityBackend<ParametricType>> orderBasedBackend;
213 orderBasedBackend = std::make_unique<storm::modelchecker::OrderBasedMonotonicityBackend<ParametricType, PreciseType>>(
214 monotonicitySetting.useOnlyGlobalMonotonicity, monotonicitySetting.useBoundsFromPLA);
215 } else {
216 orderBasedBackend = std::make_unique<storm::modelchecker::OrderBasedMonotonicityBackend<ParametricType, ImpreciseType>>(
217 monotonicitySetting.useOnlyGlobalMonotonicity, monotonicitySetting.useBoundsFromPLA);
218 }
219 if (regionChecker.isMonotonicitySupported(*orderBasedBackend, task)) {
220 monotonicityBackend = std::move(orderBasedBackend);
221 } else {
222 STORM_LOG_WARN("Order-based Monotonicity enabled for region checking engine " << engine << " but not supported in this configuration.");
223 }
224 }
225
226 // Insert monotone parameters if available
227 if (monotoneParameters) {
228 for (auto const& incrPar : monotoneParameters->first) {
229 monotonicityBackend->setMonotoneParameter(incrPar, storm::analysis::MonotonicityKind::Incr);
230 }
231 for (auto const& decrPar : monotoneParameters->second) {
232 monotonicityBackend->setMonotoneParameter(decrPar, storm::analysis::MonotonicityKind::Decr);
233 }
234 }
235 return monotonicityBackend;
236}
237
238template<typename ValueType, typename ImpreciseType = double, typename PreciseType = storm::RationalNumber>
239std::unique_ptr<storm::modelchecker::RegionModelChecker<ValueType>> initializeRegionModelChecker(
240 Environment const& env, std::shared_ptr<storm::models::sparse::Model<ValueType>> const& model,
242 bool allowModelSimplification = true,
244 bool preconditionsValidated = false, MonotonicitySetting monotonicitySetting = MonotonicitySetting(),
245 std::optional<std::pair<std::set<typename storm::storage::ParameterRegion<ValueType>::VariableType>,
247 monotoneParameters = std::nullopt) {
248 auto consideredModel = preprocessSparseModelForParameterLifting(model, task, engine, preconditionsValidated);
249 auto regionChecker = createRegionModelChecker<ValueType, ImpreciseType, PreciseType>(engine, model->getType());
250 auto monotonicityBackend =
251 initializeMonotonicityBackend<ValueType, ImpreciseType, PreciseType>(*regionChecker, engine, task, monotonicitySetting, monotoneParameters);
252 if (allowModelSimplification) {
253 allowModelSimplification = monotonicityBackend->recommendModelSimplifications();
254 STORM_LOG_WARN_COND(allowModelSimplification, "Model simplification is disabled because the monotonicity algorithm does not recommend it.");
255 }
256 regionChecker->specify(env, consideredModel, task, std::nullopt, std::move(monotonicityBackend), allowModelSimplification, graphPreservationStatus);
257 return regionChecker;
258}
259
260template<typename ValueType>
261std::unique_ptr<storm::modelchecker::RegionModelChecker<ValueType>> initializeRegionModelChecker(
264 Environment env;
265 return initializeRegionModelChecker(env, model, task, engine);
266}
267
268template<typename ValueType>
269std::unique_ptr<storm::modelchecker::RegionCheckResult<ValueType>> checkRegionsWithSparseEngine(
270 Environment const& env, std::shared_ptr<storm::models::sparse::Model<ValueType>> const& model,
272 storm::modelchecker::RegionCheckEngine engine, std::vector<storm::modelchecker::RegionResultHypothesis> const& hypotheses, bool sampleVerticesOfRegions) {
273 auto regionChecker = initializeRegionModelChecker(env, model, task, engine);
274 return regionChecker->analyzeRegions(env, regions, hypotheses, sampleVerticesOfRegions);
275}
276
277template<typename ValueType>
278std::unique_ptr<storm::modelchecker::RegionCheckResult<ValueType>> checkRegionsWithSparseEngine(
279 Environment const& env, std::shared_ptr<storm::models::sparse::Model<ValueType>> const& model,
283 bool sampleVerticesOfRegions = false) {
284 std::vector<storm::modelchecker::RegionResultHypothesis> hypotheses(regions.size(), hypothesis);
285 return checkRegionsWithSparseEngine(env, model, task, regions, engine, hypotheses, sampleVerticesOfRegions);
286}
287
288template<typename ValueType, typename ImpreciseType = double, typename PreciseType = storm::RationalNumber>
289std::unique_ptr<storm::modelchecker::RegionRefinementChecker<ValueType>> initializeRegionRefinementChecker(Environment const& env,
291 auto consideredModel = preprocessSparseModelForParameterLifting(settings.model, settings.task, settings.engine, settings.preconditionsValidated);
292 auto regionChecker = createRegionModelChecker<ValueType, ImpreciseType, PreciseType>(settings.engine, settings.model->getType());
293 auto monotonicityBackend = initializeMonotonicityBackend<ValueType, ImpreciseType, PreciseType>(*regionChecker, settings.engine, settings.task,
294 settings.monotonicitySetting, settings.monotoneParameters);
295 settings.allowModelSimplification = settings.allowModelSimplification && monotonicityBackend->recommendModelSimplifications();
296 auto refinementChecker = std::make_unique<storm::modelchecker::RegionRefinementChecker<ValueType>>(std::move(regionChecker));
297 refinementChecker->specify(env, consideredModel, settings.task, std::move(settings.regionSplittingStrategy), std::move(settings.discreteVariables),
298 std::move(monotonicityBackend), settings.allowModelSimplification, settings.graphPreservationStatus);
299 return refinementChecker;
300}
301
313template<typename ValueType>
314std::unique_ptr<storm::modelchecker::RegionRefinementCheckResult<ValueType>> checkAndRefineRegionWithSparseEngine(
316 std::optional<ValueType> const& coverageThreshold, std::optional<uint64_t> const& refinementDepthThreshold = std::nullopt,
318 auto const& regionRefinementChecker = initializeRegionRefinementChecker(env, settings);
319 return regionRefinementChecker->performRegionPartitioning(env, region, coverageThreshold, refinementDepthThreshold, hypothesis, monThresh);
320}
321
322// TODO: update documentation
333template<typename ValueType>
337 std::optional<ValueType> const& precision, bool absolutePrecision,
338 std::optional<storm::logic::Bound> const& boundInvariant) {
339 auto refinementChecker = initializeRegionRefinementChecker(env, settings);
340 auto res =
341 refinementChecker->computeExtremalValue(env, region, dir, precision.value_or(storm::utility::zero<ValueType>()), absolutePrecision, boundInvariant);
342 return {storm::utility::convertNumber<storm::ExtendedRationalNumber>(res.first), std::move(res.second)};
343}
344
351template<typename ValueType>
353 STORM_LOG_THROW(settings.task.getFormula().isProbabilityOperatorFormula() || settings.task.getFormula().isRewardOperatorFormula(),
354 storm::exceptions::NotSupportedException, "Only probability and reward operators supported.");
355 STORM_LOG_THROW(settings.task.getFormula().asOperatorFormula().hasBound(), storm::exceptions::NotSupportedException,
356 "Verification requires a bounded operator formula.");
357
358 storm::logic::Bound const& bound = settings.task.getFormula().asOperatorFormula().getBound();
359 auto refinementChecker = initializeRegionRefinementChecker(env, settings);
360 return refinementChecker->verifyRegion(env, region, bound);
361}
362
363template<typename ValueType>
364void exportRegionCheckResultToFile(std::unique_ptr<storm::modelchecker::CheckResult> const& checkResult, std::string const& filename,
365 bool onlyConclusiveResults = false) {
366 auto const* regionCheckResult = dynamic_cast<storm::modelchecker::RegionCheckResult<ValueType> const*>(checkResult.get());
367 STORM_LOG_THROW(regionCheckResult != nullptr, storm::exceptions::UnexpectedException,
368 "Can not export region check result: The given checkresult does not have the expected type.");
369
370 std::ofstream filestream;
371 storm::io::openFile(filename, filestream);
372 for (auto const& res : regionCheckResult->getRegionResults()) {
373 if (!onlyConclusiveResults || res.second == storm::modelchecker::RegionResult::AllViolated || res.second == storm::modelchecker::RegionResult::AllSat ||
375 filestream << res.second << ": " << res.first << '\n';
376 }
377 }
378 storm::io::closeFile(filestream);
379}
380
381} // namespace api
382} // namespace storm
FormulaType const & getFormula() const
Retrieves the formula from this task.
Definition CheckTask.h:142
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:364
std::vector< storm::storage::ParameterRegion< ValueType > > parseRegions(std::string const &inputString, std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType > const &consideredVariables)
Definition region.h:98
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:314
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:172
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:200
storm::storage::ParameterRegion< ValueType > parseRegion(std::string const &inputString, std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType > const &consideredVariables)
Definition region.h:135
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:352
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:51
storm::pars::FeasibilityResult< storm::RationalNumber > 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:334
storm::pars::modelchecker::MonotonicityOptions MonotonicitySetting
Definition region.h:45
std::unique_ptr< storm::modelchecker::RegionRefinementChecker< ValueType > > initializeRegionRefinementChecker(Environment const &env, RefinementOptions< ValueType > settings)
Definition region.h:289
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:65
storm::storage::ParameterRegion< ValueType > createRegion(std::string const &inputString, std::set< typename storm::storage::ParameterRegion< ValueType >::VariableType > const &consideredVariables)
Definition region.h:115
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:269
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:239
storm::pars::modelchecker::RegionRefinementOptions< ValueType > RefinementOptions
Definition region.h:48
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:162
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)
The contract of a DD backend.
The result of a feasibility synthesis: a parameter valuation and the value at the initial state under...