19 "Trying to convert variable " << variable.
getName() <<
" to a constant, but the variable does not have an initial value.");
24template<
typename JaniStructureType>
40 return !assignmentTypes.
hasEdgeAssignment && !assignmentTypes.hasEdgeDestinationAssignment && !assignmentTypes.hasLocationAssignment;
47 std::vector<storm::expressions::Variable> variablesToErase;
50 variablesToErase.push_back(globalVar.getExpressionVariable());
53 for (
auto const& varToErase : variablesToErase) {
54 STORM_LOG_INFO(
"Transformed Variable " << varToErase.getName() <<
" to a constant since it is not assigned any value.");
60 variablesToErase.clear();
61 for (
auto const& localVar : aut.getVariables()) {
63 variablesToErase.push_back(localVar.getExpressionVariable());
66 for (
auto const& varToErase : variablesToErase) {
67 STORM_LOG_INFO(
"Transformed Variable " << varToErase.getName() <<
" to a constant since it is not assigned any value.");
68 auto erasedJaniVariable = aut.getVariables().eraseVariable(varToErase);
std::string const & getName() const
Retrieves the name of the variable.
ResultType find(Model const &model, storm::jani::Variable const &variable)
virtual bool isBoundedType() const
virtual bool isBasicType() const
VariableSet & getGlobalVariables()
Retrieves the variables of this automaton.
std::vector< Automaton > & getAutomata()
Retrieves the automata of the model.
void addConstant(Constant const &constant)
Adds the given constant to the model.
bool hasInitExpression() const
Retrieves whether an initial expression is set.
storm::expressions::Variable const & getExpressionVariable() const
Retrieves the associated expression variable.
storm::expressions::Expression const & getInitExpression() const
Retrieves the initial expression Should only be called if an initial expression is set for this varia...
std::string const & getName() const
Retrieves the name of the variable.
std::shared_ptr< Variable > eraseVariable(storm::expressions::Variable const &variable)
Erases the given variable from this set.
#define STORM_LOG_INFO(message)
#define STORM_LOG_ASSERT(cond, message)
bool canTransformVariable(storm::jani::Variable const &variable, JaniStructureType const &janiStructure)
storm::jani::Constant createConstantFromVariable(storm::jani::Variable const &variable)