Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Valuation.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <memory>
5#include <vector>
6
7namespace storm {
8namespace expressions {
10class Variable;
11
15class Valuation {
16 public:
24 Valuation(std::shared_ptr<ExpressionManager const> const& manager);
25
29 virtual ~Valuation();
30
37 virtual bool getBooleanValue(Variable const& booleanVariable) const = 0;
38
45 virtual void setBooleanValue(Variable const& booleanVariable, bool value) = 0;
46
53 virtual int_fast64_t getIntegerValue(Variable const& integerVariable) const = 0;
54
61 virtual int_fast64_t getBitVectorValue(Variable const& bitVectorVariable) const = 0;
62
69 virtual void setIntegerValue(Variable const& integerVariable, int_fast64_t value) = 0;
70
77 virtual void setBitVectorValue(Variable const& bitVectorVariable, int_fast64_t value) = 0;
78
85 virtual double getRationalValue(Variable const& rationalVariable) const = 0;
86
93 virtual void setRationalValue(Variable const& rationalVariable, double value) = 0;
94
100 ExpressionManager const& getManager() const;
101
102 protected:
108 std::shared_ptr<ExpressionManager const> const& getManagerAsSharedPtr() const;
109
115 void setManager(std::shared_ptr<ExpressionManager const> const& manager);
116
117 private:
118 // The manager responsible for the variables of this valuation.
119 std::shared_ptr<ExpressionManager const> manager;
120};
121} // namespace expressions
122} // namespace storm
This class is responsible for managing a set of typed variables and all expressions using these varia...
Valuation(std::shared_ptr< ExpressionManager const > const &manager)
Creates a valuation of all non-auxiliary variables managed by the given manager.
Definition Valuation.cpp:6
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