3#include <boost/container/flat_set.hpp>
29 boost::container::flat_set<uint_fast64_t>
states;
53 std::vector<uint_fast64_t> statesSorted);
65 void add(uint_fast64_t state);
100 void addBetween(uint_fast64_t state, uint_fast64_t above, uint_fast64_t below);
116 void addRelation(uint_fast64_t above, uint_fast64_t below,
bool allowMerge =
false);
136 bool merge(uint_fast64_t var1, uint_fast64_t var2);
168 bool contains(uint_fast64_t state)
const;
204 std::vector<Node*>
getNodes()
const;
246 std::vector<uint_fast64_t>
sortStates(std::vector<uint_fast64_t>* states);
247 std::pair<bool, bool>
allAboveBelow(std::vector<uint_fast64_t>
const states, uint_fast64_t state);
258 std::pair<std::pair<uint_fast64_t, uint_fast64_t>, std::vector<uint_fast64_t>>
sortStatesForForward(uint_fast64_t currentState,
259 std::vector<uint_fast64_t>
const& successors);
268 std::pair<std::pair<uint_fast64_t, uint_fast64_t>, std::vector<uint_fast64_t>>
sortStatesUnorderedPair(
const std::vector<uint_fast64_t>* states);
313 std::shared_ptr<Order>
copy()
const;
323 bool above(
Node* node1,
Node* node2);
327 bool aboveFast(
Node* node1,
Node* node2)
const;
331 std::string nodeName(
Node n)
const;
333 std::string nodeLabel(
Node n)
const;
341 bool onlyBottomTopOrder;
346 std::vector<Node*> nodes;
348 std::vector<uint_fast64_t> statesToHandle;
354 uint_fast64_t numberOfStates;
356 uint_fast64_t numberOfAddedStates;
358 std::vector<uint_fast64_t> statesSorted;
uint_fast64_t getNumberOfDoneStates() const
void addAbove(uint_fast64_t state, Node *node)
Adds a node with the given state above the given node.
bool isTrivial(uint_fast64_t state)
void addStateSorted(uint_fast64_t state)
Node * getBottom() const
Retrieves the bottom node of the order.
bool contains(uint_fast64_t state) const
Check if state is already contained in order.
Order::NodeComparison compareFast(uint_fast64_t state1, uint_fast64_t state2, NodeComparison hypothesis=UNKNOWN) const
bool existsStateToHandle()
Order::NodeComparison compare(uint_fast64_t state1, uint_fast64_t state2, NodeComparison hypothesis=UNKNOWN)
Compares the level of the nodes of the states.
std::pair< uint_fast64_t, bool > getStateToHandle()
std::vector< uint_fast64_t > & getStatesSorted()
std::vector< uint_fast64_t > sortStates(std::vector< uint_fast64_t > *states)
Sorts the given states if possible.
NodeComparison
Constants for comparison of nodes/states.
Order()
Constructs a new Order.
void toDotOutput() const
Prints the dot output to normal STORM_PRINT.
void dotOutputToFile(std::ofstream &dotOutfile) const
Writes dotoutput to the given file.
storage::Decomposition< storage::StronglyConnectedComponent > getDecomposition() const
void addRelation(uint_fast64_t above, uint_fast64_t below, bool allowMerge=false)
Adds a new relation between two states to the order.
Node * getNode(uint_fast64_t state) const
Retrieves the pointer to a Node at which the state occurs.
bool merge(uint_fast64_t var1, uint_fast64_t var2)
Merges node of var2 into node of var1.
std::vector< Node * > getNodes() const
Returns the vector with the nodes of the order.
bool mergeNodes(Node *node1, Node *node2)
Merges node2 into node1.
std::pair< bool, bool > allAboveBelow(std::vector< uint_fast64_t > const states, uint_fast64_t state)
uint_fast64_t getNextDoneState(uint_fast64_t state) const
Returns the next done state of the order, returns the number of state if end of done states is reache...
bool getDoneBuilding() const
Returns true if done building the order.
void addToNode(uint_fast64_t state, Node *node)
Adds state to the states of the given node.
bool isTopState(uint_fast64_t) const
Checks if the given state is a top state.
std::pair< std::pair< uint_fast64_t, uint_fast64_t >, std::vector< uint_fast64_t > > sortStatesForForward(uint_fast64_t currentState, std::vector< uint_fast64_t > const &successors)
Sorts the given states if possible.
std::pair< std::pair< uint_fast64_t, uint_fast64_t >, std::vector< uint_fast64_t > > sortStatesUnorderedPair(const std::vector< uint_fast64_t > *states)
Sorts the given states if possible.
void addStateToHandle(uint_fast64_t state)
void addBetween(uint_fast64_t state, Node *node1, Node *node2)
Adds a node with the given state below node1 and above node2.
uint_fast64_t getNumberOfStates() const
Returns the number of possible states in the order.
void addBelow(uint_fast64_t state, Node *node)
Adds a node with the given state below the given node.
void setDoneState(uint_fast64_t sccNumber)
std::pair< uint_fast64_t, bool > getNextStateNumber()
std::shared_ptr< Order > copy() const
Creates a copy of the calling Order.
bool isOnlyBottomTopOrder() const
Returns if the order only consists of bottom and top states (so no in-between nodes).
uint_fast64_t getNumberOfAddedStates() const
Returns the number of added states.
bool isBottomState(uint_fast64_t) const
Checks if the given state is a bottom state.
Node * getTop() const
Retrieves the top node of the order.
void add(uint_fast64_t state)
Adds state between the top and bottom node of the order.
void setDoneBuilding(bool done=true)
If the order is fully built, this can be set to true.
void addRelationNodes(storm::analysis::Order::Node *above, storm::analysis::Order::Node *below, bool allowMerge=false)
Adds a new relation between two nodes to the order.
A bit vector that is internally represented as a vector of 64-bit values.
This class represents the decomposition of a model into blocks which are of the template type.
Nodes of the Reachability Order.
boost::container::flat_set< uint_fast64_t > states
storm::storage::BitVector statesAbove