Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
ValidatingSparseMdpParameterLiftingModelChecker.cpp
Go to the documentation of this file.
3
6
8
9namespace storm {
10namespace modelchecker {
11
12template<typename SparseModelType, typename ImpreciseType, typename PreciseType>
16
17template<typename SparseModelType, typename ImpreciseType, typename PreciseType>
19 Environment const& env, std::shared_ptr<storm::models::ModelBase> parametricModel,
20 CheckTask<storm::logic::Formula, typename SparseModelType::ValueType> const& checkTask, bool generateRegionSplitEstimates, bool allowModelSimplifications) {
21 STORM_LOG_ASSERT(this->canHandle(parametricModel, checkTask), "specified model and formula can not be handled by this.");
22
23 auto mdp = parametricModel->template as<SparseModelType>();
25
26 if (!simplifier.simplify(checkTask.getFormula())) {
27 STORM_LOG_THROW(false, storm::exceptions::UnexpectedException, "Simplifying the model was not successfull.");
28 }
29
30 auto simplifiedTask = checkTask.substituteFormula(*simplifier.getSimplifiedFormula());
31
32 impreciseChecker.specify(env, simplifier.getSimplifiedModel(), simplifiedTask, false, true);
33 preciseChecker.specify(env, simplifier.getSimplifiedModel(), simplifiedTask, false, true);
34}
35
36template<typename SparseModelType, typename ImpreciseType, typename PreciseType>
41
42template<typename SparseModelType, typename ImpreciseType, typename PreciseType>
47
48template<typename SparseModelType, typename ImpreciseType, typename PreciseType>
53
54template<typename SparseModelType, typename ImpreciseType, typename PreciseType>
59
60template<typename SparseModelType, typename ImpreciseType, typename PreciseType>
62 if (impreciseChecker.getCurrentMaxScheduler()) {
63 preciseChecker.getCurrentMaxScheduler() = impreciseChecker.getCurrentMaxScheduler()->template toValueType<PreciseType>();
64 }
65 if (impreciseChecker.getCurrentMinScheduler()) {
66 preciseChecker.getCurrentMinScheduler() = impreciseChecker.getCurrentMinScheduler()->template toValueType<PreciseType>();
67 }
68 if (impreciseChecker.getCurrentPlayer1Scheduler()) {
69 preciseChecker.getCurrentPlayer1Scheduler() = impreciseChecker.getCurrentPlayer1Scheduler()->template toValueType<PreciseType>();
70 }
71}
72
74} // namespace modelchecker
75} // namespace storm
CheckTask< NewFormulaType, ValueType > substituteFormula(NewFormulaType const &newFormula) const
Copies the check task from the source while replacing the formula with the new one.
Definition CheckTask.h:52
FormulaType const & getFormula() const
Retrieves the formula from this task.
Definition CheckTask.h:140
Class to approximatively check a formula on a parametric model for all parameter valuations within a ...
virtual SparseParameterLiftingModelChecker< SparseModelType, ImpreciseType > & getImpreciseChecker() override
virtual void specify(Environment const &env, std::shared_ptr< storm::models::ModelBase > parametricModel, CheckTask< storm::logic::Formula, typename SparseModelType::ValueType > const &checkTask, bool generateRegionSplitEstimates=false, bool allowModelSimplifications=true) override
virtual SparseParameterLiftingModelChecker< SparseModelType, PreciseType > & getPreciseChecker() override
This class performs different steps to simplify the given (parametric) model.
#define STORM_LOG_ASSERT(cond, message)
Definition macros.h:11
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30
LabParser.cpp.
Definition cli.cpp:18