Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
TemplateEdge.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <vector>
5
9
10namespace storm {
11namespace jani {
12class Model;
13
15 public:
16 TemplateEdge() = default;
17 TemplateEdge(TemplateEdge const&) = default;
19 TemplateEdge(storm::expressions::Expression const& guard, OrderedAssignments const& assignments, std::vector<TemplateEdgeDestination> const& destinations);
20
22 void setGuard(storm::expressions::Expression const& newGuard);
23
24 void addDestination(TemplateEdgeDestination const& destination);
25
30 void finalize(Model const& containingModel);
31
32 std::size_t getNumberOfDestinations() const;
33 std::vector<TemplateEdgeDestination> const& getDestinations() const;
34 std::vector<TemplateEdgeDestination>& getDestinations();
35 TemplateEdgeDestination const& getDestination(uint64_t index) const;
36
39
48 bool addTransientAssignment(Assignment const& assignment, bool addToExisting = false);
49
54
58 void substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution, bool const substituteTranscendentalNumbers);
59
63 void changeAssignmentVariables(std::map<Variable const*, std::reference_wrapper<Variable const>> const& remapping);
64
70 void liftTransientDestinationAssignments(int64_t maxLevel = 0);
71
76
80 bool usesVariablesInNonTransientAssignments(std::set<storm::expressions::Variable> const& variables) const;
81
86
90 bool usesAssignmentLevels(bool onlyTransient = false) const;
91
96 int64_t const& getLowestAssignmentLevel() const;
97
102 int64_t const& getHighestAssignmentLevel() const;
103
107 bool isLinear() const;
108
110
114 TemplateEdge simplifyIndexedAssignments(bool syncronized, VariableSet const& localVars) const;
115
116 private:
117 // The guard of the template edge.
119
120 // The destinations of the template edge.
121 std::vector<TemplateEdgeDestination> destinations;
122
124 OrderedAssignments assignments;
125
126 int64_t lowestAssignmentLevel, highestAssignmentLevel;
127
131};
132
133} // namespace jani
134} // namespace storm
bool hasTransientEdgeDestinationAssignments() const
Retrieves whether there is any transient edge destination assignment in the edge.
void finalize(Model const &containingModel)
Finalizes the building of this edge.
TemplateEdge(TemplateEdge const &)=default
storm::expressions::Expression const & getGuard() const
bool usesVariablesInNonTransientAssignments(std::set< storm::expressions::Variable > const &variables) const
Checks whether the provided variables appear on the right-hand side of non-transient assignments.
std::vector< TemplateEdgeDestination > const & getDestinations() const
int64_t const & getLowestAssignmentLevel() const
Retrieves the lowest assignment level occurring in a destination assignment.
bool isLinear() const
Checks the template edge for linearity.
bool usesAssignmentLevels(bool onlyTransient=false) const
Retrieves whether the edge uses an assignment level other than zero.
void setGuard(storm::expressions::Expression const &newGuard)
void liftTransientDestinationAssignments(int64_t maxLevel=0)
Finds the transient assignments common to all destinations and lifts them to the edge.
OrderedAssignments const & getAssignments() const
std::size_t getNumberOfDestinations() const
int64_t const & getHighestAssignmentLevel() const
Retrieves the highest assignment level occurring in a destination assignment If no assignment exists,...
void pushAssignmentsToDestinations()
Shifts the assingments from the edges to the destinations.
bool hasEdgeDestinationAssignments() const
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.
bool addTransientAssignment(Assignment const &assignment, bool addToExisting=false)
Adds a transient assignment to this edge.
void changeAssignmentVariables(std::map< Variable const *, std::reference_wrapper< Variable const > > const &remapping)
Changes all variables in assignments based on the given mapping.
TemplateEdge simplifyIndexedAssignments(bool syncronized, VariableSet const &localVars) const
Simplify Indexed Assignments.
TemplateEdgeDestination const & getDestination(uint64_t index) const
storm::storage::FlatSet< storm::expressions::Variable > const & getWrittenGlobalVariables() const
Retrieves a set of (global) variables that are written by at least one of the edge's destinations.
void addDestination(TemplateEdgeDestination const &destination)
boost::container::flat_set< Key, std::less< Key >, boost::container::new_allocator< Key > > FlatSet
Redefinition of flat_set was needed, because from Boost 1.70 on the default allocator is set to void.
Definition BoostTypes.h:13
LabParser.cpp.
Definition cli.cpp:18