Storm 1.10.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
SparseMultiObjectivePreprocessor.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <string>
5
12
13namespace storm {
14
15class Environment;
16
17namespace modelchecker {
18namespace multiobjective {
19namespace preprocessing {
20
21/*
22 * This class invokes the necessary preprocessing for the constraint based multi-objective model checking algorithm
23 */
24template<class SparseModelType>
26 public:
27 typedef typename SparseModelType::ValueType ValueType;
28 typedef typename SparseModelType::RewardModelType RewardModelType;
30
38 static ReturnType preprocess(Environment const& env, SparseModelType const& originalModel, storm::logic::MultiObjectiveFormula const& originalFormula,
39 bool produceScheduler);
40
41 private:
42 struct PreprocessorData {
43 std::shared_ptr<SparseModelType> model;
44 std::vector<std::shared_ptr<Objective<ValueType>>> objectives;
45
46 // Indices of the objectives that require a check for finite reward
47 storm::storage::BitVector finiteRewardCheckObjectives;
48
49 // Indices of the objectives for which we need to compute an upper bound for the result
50 storm::storage::BitVector upperResultBoundObjectives;
51
52 std::string rewardModelNamePrefix;
53
54 // If set, some states have been merged to a deadlock state with this label.
55 boost::optional<std::string> deadlockLabel;
56
57 // Mapping of incorporated memory to model+memory
58 std::optional<storm::storage::SparseModelMemoryProductReverseData> memoryIncorporationReverseData;
59
60 PreprocessorData(std::shared_ptr<SparseModelType> model);
61 };
62
66 static void removeIrrelevantStates(std::shared_ptr<SparseModelType>& model, boost::optional<std::string>& deadlockLabel,
67 storm::logic::MultiObjectiveFormula const& originalFormula);
68
76 static void preprocessOperatorFormula(storm::logic::OperatorFormula const& formula, PreprocessorData& data);
77 static void preprocessProbabilityOperatorFormula(storm::logic::ProbabilityOperatorFormula const& formula, storm::logic::OperatorInformation const& opInfo,
78 PreprocessorData& data);
79 static void preprocessRewardOperatorFormula(storm::logic::RewardOperatorFormula const& formula, storm::logic::OperatorInformation const& opInfo,
80 PreprocessorData& data);
81 static void preprocessTimeOperatorFormula(storm::logic::TimeOperatorFormula const& formula, storm::logic::OperatorInformation const& opInfo,
82 PreprocessorData& data);
83 static void preprocessLongRunAverageOperatorFormula(storm::logic::LongRunAverageOperatorFormula const& formula,
84 storm::logic::OperatorInformation const& opInfo, PreprocessorData& data);
85 static void preprocessUntilFormula(storm::logic::UntilFormula const& formula, storm::logic::OperatorInformation const& opInfo, PreprocessorData& data,
86 std::shared_ptr<storm::logic::Formula const> subformula = nullptr);
87 static void preprocessBoundedUntilFormula(storm::logic::BoundedUntilFormula const& formula, storm::logic::OperatorInformation const& opInfo,
88 PreprocessorData& data);
89 static void preprocessGloballyFormula(storm::logic::GloballyFormula const& formula, storm::logic::OperatorInformation const& opInfo,
90 PreprocessorData& data);
91 static void preprocessEventuallyFormula(storm::logic::EventuallyFormula const& formula, storm::logic::OperatorInformation const& opInfo,
92 PreprocessorData& data, boost::optional<std::string> const& optionalRewardModelName = boost::none);
93 static void preprocessCumulativeRewardFormula(storm::logic::CumulativeRewardFormula const& formula, storm::logic::OperatorInformation const& opInfo,
94 PreprocessorData& data, boost::optional<std::string> const& optionalRewardModelName = boost::none);
95 static void preprocessTotalRewardFormula(storm::logic::TotalRewardFormula const& formula, storm::logic::OperatorInformation const& opInfo,
96 PreprocessorData& data, boost::optional<std::string> const& optionalRewardModelName = boost::none);
97 static void preprocessLongRunAverageRewardFormula(storm::logic::LongRunAverageRewardFormula const& formula, storm::logic::OperatorInformation const& opInfo,
98 PreprocessorData& data, boost::optional<std::string> const& optionalRewardModelName = boost::none);
99
103 static ReturnType buildResult(SparseModelType const& originalModel, storm::logic::MultiObjectiveFormula const& originalFormula, PreprocessorData& data);
104
108 static typename ReturnType::QueryType getQueryType(std::vector<Objective<ValueType>> const& objectives);
109};
110
111} // namespace preprocessing
112} // namespace multiobjective
113} // namespace modelchecker
114} // namespace storm
static ReturnType preprocess(Environment const &env, SparseModelType const &originalModel, storm::logic::MultiObjectiveFormula const &originalFormula, bool produceScheduler)
Preprocesses the given model w.r.t.
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:16
LabParser.cpp.