11Location::Location(std::string
const& name, std::vector<Assignment>
const& transientAssignments) : name(name), assignments(transientAssignments) {
32 STORM_LOG_THROW(assignment.
isTransient(), storm::exceptions::InvalidArgumentException,
"Must not add non-transient assignment to location.");
33 assignments.
add(assignment);
41 return timeProgressInvariant;
45 timeProgressInvariant = expression;
48void Location::substitute(std::map<storm::expressions::Variable, storm::expressions::Expression>
const& substitution,
49 bool const substituteTranscendentalNumbers) {
50 for (
auto& assignment : assignments) {
51 assignment.
substitute(substitution, substituteTranscendentalNumbers);
Expression substitute(std::map< Variable, Expression > const &variableToExpressionMap) const
Substitutes all occurrences of the variables according to the given map.
bool isInitialized() const
Checks whether the object encapsulates a base-expression.
bool isTransient() const
Retrieves whether the assignment assigns to a transient variable.
bool isLinear() const
Checks the automaton for linearity.
Location(std::string const &name, std::vector< Assignment > const &transientAssignments={})
Creates a new location.
void addTransientAssignment(storm::jani::Assignment const &assignment)
Adds the given transient assignment to this location.
OrderedAssignments const & getAssignments() const
Retrieves the assignments of this location.
void setTimeProgressInvariant(storm::expressions::Expression const &expression)
Sets the time progress invariant of this location.
void checkValid() const
Checks whether the location is valid, that is, whether the assignments are indeed all transient assig...
void substitute(std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution, bool const substituteTranscendentalNumbers)
Substitutes all variables in all expressions according to the given substitution.
std::string const & getName() const
Retrieves the name of the location.
void changeAssignmentVariables(std::map< Variable const *, std::reference_wrapper< Variable const > > const &remapping)
Changes all variables in assignments based on the given mapping.
storm::expressions::Expression const & getTimeProgressInvariant() const
Retrieves the time progress invariant.
bool hasTimeProgressInvariant() const
Retrieves whether a time progress invariant is attached to this location.
void changeAssignmentVariables(std::map< Variable const *, std::reference_wrapper< Variable const > > const &remapping)
Changes all variables in assignments based on the given mapping.
bool areLinear() const
Checks the assignments for linearity.
bool add(Assignment const &assignment, bool addToExisting=false)
Adds the given assignment to the set of assignments.
#define STORM_LOG_THROW(cond, exception, message)
storm::expressions::Expression substituteJaniExpression(storm::expressions::Expression const &expression, std::map< storm::expressions::Variable, storm::expressions::Expression > const &identifierToExpressionMap, bool const substituteTranscendentalNumbers)