Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
GraphConditions.h
Go to the documentation of this file.
1#pragma once
2
3#include <type_traits>
4#include <unordered_set>
5
6#pragma clang diagnostic push
7#pragma clang diagnostic ignored "-Wmacro-redefined" // clash for likely() macro between Ginac and Sylvan
8#pragma clang diagnostic ignored "-Wthread-safety-negative"
9#pragma clang diagnostic ignored "-Wundefined-reinterpret-cast"
10#pragma clang diagnostic ignored "-Wunused-template"
11#include <carl/formula/Formula.h>
12#pragma clang diagnostic pop
13
16
17namespace storm {
18namespace analysis {
19
20template<typename ValueType, typename Enable = void>
22 typedef void* val;
23};
24
25template<typename ValueType>
26struct ConstraintType<ValueType, typename std::enable_if<std::is_same<storm::RationalFunction, ValueType>::value>::type> {
27 typedef carl::Formula<typename storm::RationalFunction::PolyType::PolyType> val;
28};
29
33template<typename ValueType>
35 private:
36 // A set of constraints that says that the DTMC actually has valid probability distributions in all states.
37 std::unordered_set<typename ConstraintType<ValueType>::val> wellformedConstraintSet;
38
39 // A set of constraints that makes sure that the underlying graph of the model does not change depending
40 // on the parameter values.
41 std::unordered_set<typename ConstraintType<ValueType>::val> graphPreservingConstraintSet;
42
43 // A set of variables
44 std::set<storm::RationalFunctionVariable> variableSet;
45
46 void wellformedRequiresNonNegativeEntries(std::vector<ValueType> const&);
47
48 public:
56
62 std::unordered_set<typename ConstraintType<ValueType>::val> const& getWellformedConstraints() const;
63
69 std::unordered_set<typename ConstraintType<ValueType>::val> const& getGraphPreservingConstraints() const;
70
75 std::set<storm::RationalFunctionVariable> const& getVariables() const;
76
83
90};
91
92} // namespace analysis
93} // namespace storm
std::unordered_set< typename ConstraintType< ValueType >::val > const & getWellformedConstraints() const
Returns the set of wellformed-ness constraints.
std::unordered_set< typename ConstraintType< ValueType >::val > const & getGraphPreservingConstraints() const
Returns the set of graph-preserving constraints.
ConstraintCollector(storm::models::sparse::Model< ValueType > const &model)
Constructs a constraint collector for the given Model.
std::set< storm::RationalFunctionVariable > const & getVariables() const
Returns the set of variables in the model.
void operator()(storm::models::sparse::Model< ValueType > const &model)
Constructs the constraints for the given Model by calling the process method.
Base class for all sparse models.
Definition Model.h:30
void process()