7template<
typename ValueType,
typename ConstantType>
11 for (uint_fast64_t i = 0; i < this->numberOfStates; ++i) {
12 expressionManager->declareRationalVariable(std::to_string(i));
16template<
typename ValueType,
typename ConstantType>
19 auto vec1 = std::vector<ConstantType>();
20 auto vec2 = std::vector<ConstantType>();
21 return createAndCheckAssumptions(val1, val2, order, region, vec1, vec2);
24template<
typename ValueType,
typename ConstantType>
27 std::vector<ConstantType>
const maxValues)
const {
28 std::map<std::shared_ptr<expressions::BinaryRelationExpression>,
AssumptionStatus> result;
29 STORM_LOG_INFO(
"Creating assumptions for " << val1 <<
" and " << val2);
33 result.insert(assumption);
48 result.insert(assumption);
54 result.insert(assumption);
61 result.insert(assumption);
65 result.insert(assumption);
68 STORM_LOG_INFO(
"None of the assumptions is valid, number of possible assumptions: " << result.size() <<
'\n');
72template<
typename ValueType,
typename ConstantType>
76 assumptionChecker.initializeCheckingOnSamples(formula, model, region, numberOfSamples);
79template<
typename ValueType,
typename ConstantType>
81 assumptionChecker.setSampleValues(samples);
84template<
typename ValueType,
typename ConstantType>
87 std::vector<ConstantType>
const minValues, std::vector<ConstantType>
const maxValues)
const {
91 auto assumption = std::make_shared<expressions::BinaryRelationExpression>(
94 AssumptionStatus validationResult = assumptionChecker.validateAssumption(val1, val2, assumption, order, region, minValues, maxValues);
95 return std::pair<std::shared_ptr<expressions::BinaryRelationExpression>,
AssumptionStatus>(assumption, validationResult);
98template class AssumptionMaker<RationalFunction, double>;
99template class AssumptionMaker<RationalFunction, RationalNumber>;
void setSampleValues(std::vector< std::vector< ConstantType > > const &samples)
Sets the sample values to the given vector.
std::map< std::shared_ptr< expressions::BinaryRelationExpression >, AssumptionStatus > createAndCheckAssumptions(uint_fast64_t val1, uint_fast64_t val2, std::shared_ptr< Order > order, storage::ParameterRegion< ValueType > region) const
Creates assumptions, and checks them, only VALID and UNKNOWN assumptions are returned.
AssumptionMaker(storage::SparseMatrix< ValueType > matrix)
Constructs AssumptionMaker based on the matrix of the model.
void initializeCheckingOnSamples(std::shared_ptr< logic::Formula const > formula, std::shared_ptr< models::sparse::Dtmc< ValueType > > model, storage::ParameterRegion< ValueType > region, uint_fast64_t numberOfSamples)
Initializes the given number of sample points for a given model, formula and region.
std::shared_ptr< BaseExpression const > const & getBaseExpressionPointer() const
Retrieves a pointer to the base expression underlying this expression object.
This class is responsible for managing a set of typed variables and all expressions using these varia...
storm::expressions::Expression getExpression() const
Retrieves an expression that represents the variable.
This class represents a discrete-time Markov chain.
A class that holds a possibly non-square matrix in the compressed row storage format.
index_type getColumnCount() const
Returns the number of columns of the matrix.
#define STORM_LOG_INFO(message)
AssumptionStatus
Constants for status of assumption.
RelationType
An enum type specifying the different relations applicable.