5#include <unordered_map>
47 std::string
const&
getName()
const;
221 std::vector<Edge>
const&
getEdges()
const;
287 void substitute(std::map<storm::expressions::Variable, storm::expressions::Expression>
const& substitution,
bool const substituteTranscendentalNumbers);
344 void writeDotToStream(std::ostream& outStream, std::vector<std::string>
const& actionNames)
const;
363 std::unordered_map<std::string, FunctionDefinition> functionDefinitions;
366 std::vector<Location> locations;
369 std::unordered_map<std::string, uint64_t> locationToIndex;
376 std::vector<uint64_t> locationToStartingIndex;
379 std::set<uint64_t> initialLocationIndices;
385 std::set<uint64_t> actionIndices;
This class is responsible for managing a set of typed variables and all expressions using these varia...
Automaton(Automaton &&other)=default
detail::ConstEdges ConstEdges
VariableSet & getVariables()
Retrieves the variables of this automaton.
Automaton clone(storm::expressions::ExpressionManager &manager, std::string const &nameOfClone, std::string const &variablePrefix) const
bool usesAssignmentLevels(bool onlyTransient=false) const
Retrieves whether the automaton uses an assignment level other than zero.
std::set< storm::expressions::Variable > getAllExpressionVariables() const
Retrieves all expression variables used by this automaton.
void addEdge(Edge const &edge)
Adds an edge to the automaton.
storm::expressions::Expression const & getInitialStatesRestriction() const
Gets the expression restricting the legal initial values of the automaton's variables.
Automaton & operator=(Automaton &&other)=default
bool hasLocation(std::string const &name) const
Retrieves whether the automaton has a location with the given name.
Automaton(Automaton const &other)=default
void registerTemplateEdge(std::shared_ptr< TemplateEdge > const &)
Adds the template edge to the list of edges.
Automaton & operator=(Automaton const &other)=default
void finalize(Model const &containingModel)
Finalizes the building of this automaton.
bool hasVariable(std::string const &name) const
storm::expressions::Expression getInitialStatesExpression() const
Retrieves the expression defining the legal initial values of the automaton's variables.
storm::expressions::Variable const & getLocationExpressionVariable() const
Retrieves the expression variable that represents the location of this automaton.
Location const & getLocation(uint64_t index) const
Retrieves the location with the given index.
std::set< uint64_t > const & getInitialLocationIndices() const
Retrieves the indices of the initial locations.
std::vector< storm::expressions::Expression > getAllRangeExpressions() const
Retrieves a list of expressions that characterize the legal values of the variables in this automaton...
bool isLinear() const
Checks the automaton for linearity.
void setInitialStatesRestriction(storm::expressions::Expression const &initialStatesRestriction)
Sets the expression restricting the legal initial values of the automaton's variables.
Variable const & addVariable(Variable const &variable)
Adds the given variable to this automaton.
bool hasTrivialInitialStatesExpression() const
Retrieves whether the initial states expression is trivial in the sense that the automaton has no ini...
std::set< uint64_t > getUsedActionIndices() const
Retrieves the action indices appearing at some edge of the automaton.
FunctionDefinition const & addFunctionDefinition(FunctionDefinition const &functionDefinition)
Adds the given function definition.
void addInitialLocation(std::string const &name)
Adds the location with the given name to the initial locations.
uint64_t getNumberOfEdges() const
Retrieves the number of edges.
bool hasRestrictedInitialStates() const
Retrieves whether the initial restriction is set and unequal to true.
uint64_t addLocation(Location const &location)
Adds the given location to the automaton.
void changeAssignmentVariables(std::map< Variable const *, std::reference_wrapper< Variable const > > const &remapping)
Changes all variables in assignments based on the given mapping.
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 containsVariablesOnlyInProbabilitiesOrTransientAssignments(std::set< storm::expressions::Variable > const &variables) const
Checks whether the provided variables only appear in the probability expressions or the expressions b...
std::vector< Location > const & getLocations() const
Retrieves the locations of the automaton.
Edge const & getEdge(uint64_t index) const
Retrieves the edge with the given index in this automaton.
uint64_t getNumberOfLocations() const
Retrieves the number of locations.
void simplifyIndexedAssignments()
Edges getEdgesFromLocation(std::string const &name)
Retrieves the edges of the location with the given name.
bool hasNonTrivialInitialStates() const
Retrieves whether this automaton has non-trivial initial states.
bool hasEdgeLabeledWithActionIndex(uint64_t actionIndex) const
Retrieves whether there is an edge labeled with the action with the given index in this automaton.
bool hasTransientVariable() const
Retrieves whether this automaton has a transient variable.
bool hasInitialStatesRestriction() const
Retrieves whether this automaton has an initial states restriction.
void pushTransientRealLocationAssignmentsToEdges()
Pushes the assignments to real-valued transient variables to the edges.
void writeDotToStream(std::ostream &outStream, std::vector< std::string > const &actionNames) const
std::unordered_map< std::string, FunctionDefinition > const & getFunctionDefinitions() const
Retrieves all function definitions of this automaton.
std::string const & getName() const
Retrieves the name of the automaton.
bool hasTransientEdgeDestinationAssignments() const
Retrieves whether there is any transient edge destination assignment in the automaton.
std::set< uint64_t > getActionIndices() const
Retrieves the set of action indices that are labels of edges of this automaton.
void liftTransientEdgeDestinationAssignments(int64_t maxLevel=0)
Lifts the common edge destination assignments to edge assignments.
std::vector< Edge > & getEdges()
Retrieves the edges of the automaton.
void pushEdgeAssignmentsToDestinations()
Pushes the edge assignments to the corresponding destinations.
uint64_t getLocationIndex(std::string const &name) const
EdgeContainer const & getEdgeContainer() const
Retrieves the container of all edges of this automaton.
void restrictToEdges(storm::storage::FlatSet< uint_fast64_t > const &edgeIndices)
Restricts the automaton to the edges given by the indices.
std::map< uint64_t, std::string > buildIdToLocationNameMap() const
Builds a map from ID to Location Name.
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.