Storm
A Modern Probabilistic Model Checker
|
#include <Order.h>
Classes | |
struct | Node |
Nodes of the Reachability Order. More... | |
Public Types | |
enum | NodeComparison { UNKNOWN , BELOW , ABOVE , SAME } |
Constants for comparison of nodes/states. More... | |
Public Member Functions | |
Order (storm::storage::BitVector *topStates, storm::storage::BitVector *bottomStates, uint_fast64_t numberOfStates, storage::Decomposition< storage::StronglyConnectedComponent > sccsSorted, std::vector< uint_fast64_t > statesSorted) | |
Constructs an order with the given top and bottom states. | |
Order (uint_fast64_t top, uint_fast64_t bottom, uint_fast64_t numberOfStates, storage::Decomposition< storage::StronglyConnectedComponent > sccsSorted, std::vector< uint_fast64_t > statesSorted) | |
Constructs an order with the given top state and bottom state. | |
Order () | |
Constructs a new Order. | |
void | add (uint_fast64_t state) |
Adds state between the top and bottom node of the order. | |
void | addAbove (uint_fast64_t state, Node *node) |
Adds a node with the given state above the given node. | |
void | addBelow (uint_fast64_t state, Node *node) |
Adds a node with the given state below the given node. | |
void | addBetween (uint_fast64_t state, Node *node1, Node *node2) |
Adds a node with the given state below node1 and above node2. | |
void | addBetween (uint_fast64_t state, uint_fast64_t above, uint_fast64_t below) |
Adds a node with the given state between the nodes of below and above. | |
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. | |
void | addRelation (uint_fast64_t above, uint_fast64_t below, bool allowMerge=false) |
Adds a new relation between two states to the order. | |
void | addToNode (uint_fast64_t state, Node *node) |
Adds state to the states of the given node. | |
bool | mergeNodes (Node *node1, Node *node2) |
Merges node2 into node1. | |
bool | merge (uint_fast64_t var1, uint_fast64_t var2) |
Merges node of var2 into node of var1. | |
Order::NodeComparison | compare (uint_fast64_t state1, uint_fast64_t state2, NodeComparison hypothesis=UNKNOWN) |
Compares the level of the nodes of the states. | |
Order::NodeComparison | compareFast (uint_fast64_t state1, uint_fast64_t state2, NodeComparison hypothesis=UNKNOWN) const |
NodeComparison | compare (Node *node1, Node *node2, NodeComparison hypothesis=UNKNOWN) |
Compares the level of the two nodes. | |
NodeComparison | compareFast (Node *node1, Node *node2, NodeComparison hypothesis=UNKNOWN) const |
bool | contains (uint_fast64_t state) const |
Check if state is already contained in order. | |
Node * | getBottom () const |
Retrieves the bottom node of the order. | |
bool | getDoneBuilding () const |
Returns true if done building the order. | |
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 reached. | |
uint_fast64_t | getNumberOfDoneStates () const |
Node * | getNode (uint_fast64_t state) const |
Retrieves the pointer to a Node at which the state occurs. | |
std::vector< Node * > | getNodes () const |
Returns the vector with the nodes of the order. | |
std::vector< uint_fast64_t > & | getStatesSorted () |
Node * | getTop () const |
Retrieves the top node of the order. | |
uint_fast64_t | getNumberOfAddedStates () const |
Returns the number of added states. | |
uint_fast64_t | getNumberOfStates () const |
Returns the number of possible states in the order. | |
bool | isBottomState (uint_fast64_t) const |
Checks if the given state is a bottom state. | |
bool | isTopState (uint_fast64_t) const |
Checks if the given state is a top state. | |
bool | isOnlyBottomTopOrder () const |
Returns if the order only consists of bottom and top states (so no in-between nodes). | |
std::vector< uint_fast64_t > | sortStates (std::vector< uint_fast64_t > *states) |
Sorts the given states if possible. | |
std::pair< bool, bool > | allAboveBelow (std::vector< uint_fast64_t > const states, uint_fast64_t 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. | |
std::vector< uint_fast64_t > | sortStates (storm::storage::BitVector *states) |
Sorts the given states if possible. | |
bool | isTrivial (uint_fast64_t state) |
std::pair< uint_fast64_t, bool > | getNextStateNumber () |
bool | existsNextState () |
bool | existsStateToHandle () |
std::pair< uint_fast64_t, bool > | getStateToHandle () |
void | addStateToHandle (uint_fast64_t state) |
void | addStateSorted (uint_fast64_t state) |
void | setDoneBuilding (bool done=true) |
If the order is fully built, this can be set to true. | |
void | toDotOutput () const |
Prints the dot output to normal STORM_PRINT. | |
void | dotOutputToFile (std::ofstream &dotOutfile) const |
Writes dotoutput to the given file. | |
std::shared_ptr< Order > | copy () const |
Creates a copy of the calling Order. | |
void | setDoneState (uint_fast64_t sccNumber) |
bool | isInvalid () const |
Protected Member Functions | |
storage::Decomposition< storage::StronglyConnectedComponent > | getDecomposition () const |
storm::analysis::Order::Order | ( | storm::storage::BitVector * | topStates, |
storm::storage::BitVector * | bottomStates, | ||
uint_fast64_t | numberOfStates, | ||
storage::Decomposition< storage::StronglyConnectedComponent > | sccsSorted, | ||
std::vector< uint_fast64_t > | statesSorted | ||
) |
Constructs an order with the given top and bottom states.
topStates | A Bitvector with the top states of the resulting order. |
bottomStates | A Bitvector with the bottom states of the resulting order. |
numberOfStates | Maximum number of states in order. |
statesSorted | Pointer to a vector which contains the states which still need to added to the order. |
storm::analysis::Order::Order | ( | uint_fast64_t | top, |
uint_fast64_t | bottom, | ||
uint_fast64_t | numberOfStates, | ||
storage::Decomposition< storage::StronglyConnectedComponent > | sccsSorted, | ||
std::vector< uint_fast64_t > | statesSorted | ||
) |
Constructs an order with the given top state and bottom state.
top | The top state of the resulting order. |
bottom | The bottom state of the resulting order. |
numberOfStates | Maximum number of states in order. |
statesSorted | Pointer to a vector which contains the states which still need to added to the order. |
void storm::analysis::Order::add | ( | uint_fast64_t | state | ) |
void storm::analysis::Order::addAbove | ( | uint_fast64_t | state, |
Node * | node | ||
) |
void storm::analysis::Order::addBelow | ( | uint_fast64_t | state, |
Node * | node | ||
) |
void storm::analysis::Order::addBetween | ( | uint_fast64_t | state, |
uint_fast64_t | above, | ||
uint_fast64_t | below | ||
) |
Adds a node with the given state between the nodes of below and above.
Result: below -> state -> above
state | The given state. |
above | The state number of the state below which a new node (with state) is added. |
below | The state number of the state above which a new node (with state) is added. |
void storm::analysis::Order::addRelation | ( | uint_fast64_t | above, |
uint_fast64_t | below, | ||
bool | allowMerge = false |
||
) |
void storm::analysis::Order::addRelationNodes | ( | storm::analysis::Order::Node * | above, |
storm::analysis::Order::Node * | below, | ||
bool | allowMerge = false |
||
) |
void storm::analysis::Order::addStateSorted | ( | uint_fast64_t | state | ) |
void storm::analysis::Order::addStateToHandle | ( | uint_fast64_t | state | ) |
void storm::analysis::Order::addToNode | ( | uint_fast64_t | state, |
Node * | node | ||
) |
std::pair< bool, bool > storm::analysis::Order::allAboveBelow | ( | std::vector< uint_fast64_t > const | states, |
uint_fast64_t | state | ||
) |
Order::NodeComparison storm::analysis::Order::compare | ( | Node * | node1, |
Node * | node2, | ||
NodeComparison | hypothesis = UNKNOWN |
||
) |
Compares the level of the two nodes.
node1 | The first node. |
node2 | The second node. |
Order::NodeComparison storm::analysis::Order::compare | ( | uint_fast64_t | state1, |
uint_fast64_t | state2, | ||
NodeComparison | hypothesis = UNKNOWN |
||
) |
Compares the level of the nodes of the states.
Behaviour unknown when one or more of the states does not occur at any Node in the Order.
State1 | the first state. |
State2 | the second state. |
Order::NodeComparison storm::analysis::Order::compareFast | ( | Node * | node1, |
Node * | node2, | ||
NodeComparison | hypothesis = UNKNOWN |
||
) | const |
Order::NodeComparison storm::analysis::Order::compareFast | ( | uint_fast64_t | state1, |
uint_fast64_t | state2, | ||
NodeComparison | hypothesis = UNKNOWN |
||
) | const |
bool storm::analysis::Order::contains | ( | uint_fast64_t | state | ) | const |
std::shared_ptr< Order > storm::analysis::Order::copy | ( | ) | const |
void storm::analysis::Order::dotOutputToFile | ( | std::ofstream & | dotOutfile | ) | const |
Order::Node * storm::analysis::Order::getBottom | ( | ) | const |
|
protected |
bool storm::analysis::Order::getDoneBuilding | ( | ) | const |
uint_fast64_t storm::analysis::Order::getNextDoneState | ( | uint_fast64_t | state | ) | const |
std::pair< uint_fast64_t, bool > storm::analysis::Order::getNextStateNumber | ( | ) |
Order::Node * storm::analysis::Order::getNode | ( | uint_fast64_t | state | ) | const |
std::vector< Order::Node * > storm::analysis::Order::getNodes | ( | ) | const |
uint_fast64_t storm::analysis::Order::getNumberOfAddedStates | ( | ) | const |
uint_fast64_t storm::analysis::Order::getNumberOfDoneStates | ( | ) | const |
uint_fast64_t storm::analysis::Order::getNumberOfStates | ( | ) | const |
std::vector< uint_fast64_t > & storm::analysis::Order::getStatesSorted | ( | ) |
std::pair< uint_fast64_t, bool > storm::analysis::Order::getStateToHandle | ( | ) |
Order::Node * storm::analysis::Order::getTop | ( | ) | const |
bool storm::analysis::Order::isBottomState | ( | uint_fast64_t | state | ) | const |
bool storm::analysis::Order::isOnlyBottomTopOrder | ( | ) | const |
bool storm::analysis::Order::isTopState | ( | uint_fast64_t | state | ) | const |
bool storm::analysis::Order::isTrivial | ( | uint_fast64_t | state | ) |
bool storm::analysis::Order::merge | ( | uint_fast64_t | var1, |
uint_fast64_t | var2 | ||
) |
void storm::analysis::Order::setDoneBuilding | ( | bool | done = true | ) |
If the order is fully built, this can be set to true.
void storm::analysis::Order::setDoneState | ( | uint_fast64_t | sccNumber | ) |
std::vector< uint_fast64_t > storm::analysis::Order::sortStates | ( | std::vector< uint_fast64_t > * | states | ) |
Sorts the given states if possible.
states | Vector of the states to be sorted. |
std::vector< uint_fast64_t > storm::analysis::Order::sortStates | ( | storm::storage::BitVector * | states | ) |
Sorts the given states if possible.
states | Bitvector of the states to be sorted. |
std::pair< std::pair< uint_fast64_t, uint_fast64_t >, std::vector< uint_fast64_t > > storm::analysis::Order::sortStatesForForward | ( | uint_fast64_t | currentState, |
std::vector< uint_fast64_t > const & | successors | ||
) |
Sorts the given states if possible.
states | Vector of the states to be sorted. |
std::pair< std::pair< uint_fast64_t, uint_fast64_t >, std::vector< uint_fast64_t > > storm::analysis::Order::sortStatesUnorderedPair | ( | const std::vector< uint_fast64_t > * | states | ) |
Sorts the given states if possible.
states | Vector of the states to be sorted. |
void storm::analysis::Order::toDotOutput | ( | ) | const |