Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Valuation.h
Go to the documentation of this file.
1#ifndef STORM_STORAGE_EXPRESSIONS_VALUATION_H_
2#define STORM_STORAGE_EXPRESSIONS_VALUATION_H_
3
4#include <cstdint>
5#include <memory>
6#include <vector>
7
8namespace storm {
9namespace expressions {
10class ExpressionManager;
11class Variable;
12
16class Valuation {
17 public:
25 Valuation(std::shared_ptr<ExpressionManager const> const& manager);
26
30 virtual ~Valuation();
31
38 virtual bool getBooleanValue(Variable const& booleanVariable) const = 0;
39
46 virtual void setBooleanValue(Variable const& booleanVariable, bool value) = 0;
47
54 virtual int_fast64_t getIntegerValue(Variable const& integerVariable) const = 0;
55
62 virtual int_fast64_t getBitVectorValue(Variable const& bitVectorVariable) const = 0;
63
70 virtual void setIntegerValue(Variable const& integerVariable, int_fast64_t value) = 0;
71
78 virtual void setBitVectorValue(Variable const& bitVectorVariable, int_fast64_t value) = 0;
79
86 virtual double getRationalValue(Variable const& rationalVariable) const = 0;
87
94 virtual void setRationalValue(Variable const& rationalVariable, double value) = 0;
95
101 ExpressionManager const& getManager() const;
102
103 protected:
109 std::shared_ptr<ExpressionManager const> const& getManagerAsSharedPtr() const;
110
116 void setManager(std::shared_ptr<ExpressionManager const> const& manager);
117
118 private:
119 // The manager responsible for the variables of this valuation.
120 std::shared_ptr<ExpressionManager const> manager;
121};
122} // namespace expressions
123} // namespace storm
124
125#endif /* STORM_STORAGE_EXPRESSIONS_VALUATION_H_ */
This class is responsible for managing a set of typed variables and all expressions using these varia...
The base class of all valuations of variables.
Definition Valuation.h:16
virtual void setRationalValue(Variable const &rationalVariable, double value)=0
Sets the value of the given boolean variable to the provided value.
virtual int_fast64_t getIntegerValue(Variable const &integerVariable) const =0
Retrieves the value of the given integer variable.
virtual void setIntegerValue(Variable const &integerVariable, int_fast64_t value)=0
Sets the value of the given integer variable to the provided value.
virtual void setBooleanValue(Variable const &booleanVariable, bool value)=0
Sets the value of the given boolean variable to the provided value.
ExpressionManager const & getManager() const
Retrieves the manager responsible for the variables of this valuation.
Definition Valuation.cpp:14
virtual double getRationalValue(Variable const &rationalVariable) const =0
Retrieves the value of the given rational variable.
void setManager(std::shared_ptr< ExpressionManager const > const &manager)
Sets the manager responsible for the variables in this valuation.
Definition Valuation.cpp:22
virtual bool getBooleanValue(Variable const &booleanVariable) const =0
Retrieves the value of the given boolean variable.
virtual int_fast64_t getBitVectorValue(Variable const &bitVectorVariable) const =0
Retrieves the value of the given bit vector variable.
virtual ~Valuation()
Declare virtual destructor, so we can properly delete instances later.
Definition Valuation.cpp:10
virtual void setBitVectorValue(Variable const &bitVectorVariable, int_fast64_t value)=0
Sets the value of the given bit vector variable to the provided value.
std::shared_ptr< ExpressionManager const > const & getManagerAsSharedPtr() const
Retrieves the manager responsible for the variables of this valuation.
Definition Valuation.cpp:18
LabParser.cpp.
Definition cli.cpp:18