Storm
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
10
11namespace storm {
12
13class Environment;
14
15namespace modelchecker {
16namespace multiobjective {
17namespace preprocessing {
18
19/*
20 * This class invokes the necessary preprocessing for the constraint based multi-objective model checking algorithm
21 */
22template<class SparseModelType>
24 public:
25 typedef typename SparseModelType::ValueType ValueType;
26 typedef typename SparseModelType::RewardModelType RewardModelType;
28
34 static ReturnType preprocess(Environment const& env, SparseModelType const& originalModel, storm::logic::MultiObjectiveFormula const& originalFormula);
35
36 private:
37 struct PreprocessorData {
38 std::shared_ptr<SparseModelType> model;
39 std::vector<std::shared_ptr<Objective<ValueType>>> objectives;
40
41 // Indices of the objectives that require a check for finite reward
42 storm::storage::BitVector finiteRewardCheckObjectives;
43
44 // Indices of the objectives for which we need to compute an upper bound for the result
45 storm::storage::BitVector upperResultBoundObjectives;
46
47 std::string rewardModelNamePrefix;
48
49 // If set, some states have been merged to a deadlock state with this label.
50 boost::optional<std::string> deadlockLabel;
51
52 PreprocessorData(std::shared_ptr<SparseModelType> model);
53 };
54
58 static void removeIrrelevantStates(std::shared_ptr<SparseModelType>& model, boost::optional<std::string>& deadlockLabel,
59 storm::logic::MultiObjectiveFormula const& originalFormula);
60
68 static void preprocessOperatorFormula(storm::logic::OperatorFormula const& formula, PreprocessorData& data);
69 static void preprocessProbabilityOperatorFormula(storm::logic::ProbabilityOperatorFormula const& formula, storm::logic::OperatorInformation const& opInfo,
70 PreprocessorData& data);
71 static void preprocessRewardOperatorFormula(storm::logic::RewardOperatorFormula const& formula, storm::logic::OperatorInformation const& opInfo,
72 PreprocessorData& data);
73 static void preprocessTimeOperatorFormula(storm::logic::TimeOperatorFormula const& formula, storm::logic::OperatorInformation const& opInfo,
74 PreprocessorData& data);
75 static void preprocessLongRunAverageOperatorFormula(storm::logic::LongRunAverageOperatorFormula const& formula,
76 storm::logic::OperatorInformation const& opInfo, PreprocessorData& data);
77 static void preprocessUntilFormula(storm::logic::UntilFormula const& formula, storm::logic::OperatorInformation const& opInfo, PreprocessorData& data,
78 std::shared_ptr<storm::logic::Formula const> subformula = nullptr);
79 static void preprocessBoundedUntilFormula(storm::logic::BoundedUntilFormula const& formula, storm::logic::OperatorInformation const& opInfo,
80 PreprocessorData& data);
81 static void preprocessGloballyFormula(storm::logic::GloballyFormula const& formula, storm::logic::OperatorInformation const& opInfo,
82 PreprocessorData& data);
83 static void preprocessEventuallyFormula(storm::logic::EventuallyFormula const& formula, storm::logic::OperatorInformation const& opInfo,
84 PreprocessorData& data, boost::optional<std::string> const& optionalRewardModelName = boost::none);
85 static void preprocessCumulativeRewardFormula(storm::logic::CumulativeRewardFormula const& formula, storm::logic::OperatorInformation const& opInfo,
86 PreprocessorData& data, boost::optional<std::string> const& optionalRewardModelName = boost::none);
87 static void preprocessTotalRewardFormula(storm::logic::TotalRewardFormula const& formula, storm::logic::OperatorInformation const& opInfo,
88 PreprocessorData& data, boost::optional<std::string> const& optionalRewardModelName = boost::none);
89 static void preprocessLongRunAverageRewardFormula(storm::logic::LongRunAverageRewardFormula const& formula, storm::logic::OperatorInformation const& opInfo,
90 PreprocessorData& data, boost::optional<std::string> const& optionalRewardModelName = boost::none);
91
95 static ReturnType buildResult(SparseModelType const& originalModel, storm::logic::MultiObjectiveFormula const& originalFormula, PreprocessorData& data);
96
100 static typename ReturnType::QueryType getQueryType(std::vector<Objective<ValueType>> const& objectives);
101};
102
103} // namespace preprocessing
104} // namespace multiobjective
105} // namespace modelchecker
106} // namespace storm
static ReturnType preprocess(Environment const &env, SparseModelType const &originalModel, storm::logic::MultiObjectiveFormula const &originalFormula)
Preprocesses the given model w.r.t.
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:18
LabParser.cpp.
Definition cli.cpp:18