Include file:
#include "mcrl2/lts/lts.h
mcrl2::lts::
lts
¶A class that contains a labelled transition system.
The state labels and action labels can be any type. Essentially, a labelled transition system consists of a vector of transitions. Each transition is a triple of three numbers <from, label, to>. For these numbers, there can be associated state labels (for ‘from’ and ‘to’), and action labels (for ‘label’). But it is also possible, that no state or action labels are provided. For all action labels it is maintained whether this action label is an internal ‘tau’ action. This can be indicated for each action label separately. Finally, the number of states is recalled as a separate variable.
mcrl2::lts::lts::
labels_size_type
¶typedef for std::vector< ACTION_LABEL_T >::size_type
The sort that represents the indices of labels.
mcrl2::lts::lts::
m_init_state
¶mcrl2::lts::lts::
m_nstates
¶mcrl2::lts::lts::
m_transitions
¶rename_labels
(const std::map<labels_size_type, labels_size_type> &action_rename_map)¶store_action_label_to_be_renamed
(const ACTION_LABEL_T &a, const labels_size_type i, std::map<labels_size_type, labels_size_type> &action_rename_map)¶action_label
(const labels_size_type action) const¶Gets the label of an action.
Parameters:
Returns: The label of the action.
action_labels
() constThe action labels in this lts.
Returns: The action labels of this lts.
add_action
(const ACTION_LABEL_T &label)¶Adds an action with a label to this LTS.
It is not checked whether this action label already exists.
Parameters:
Returns: The number of the added label.
add_state
(const STATE_LABEL_T &label = STATE_LABEL_T())¶Adds a state to this LTS.
It is not checked whether the added state already exists.
Parameters:
Returns: The number of the added state label.
add_transition
(const transition &t)¶Add a transition to the lts.
The transition can be added, even if there are not (yet) valid state and action labels for it.
Rename actions in the lts by hiding the actions in the vector tau_actions.
Multiactions can be partially renamed. I.e. a|b becomes a if b is hidden. In such a case the new action a is mapped onto an existing action a; if such a label a does not exist, the action label a|b is renamed to a.
Parameters:
If the action label is registered hidden, it returns tau, otherwise the original label.
Parameters:
Returns: The index of the corresponding action label in which actions are hidden.
clear
()Clear the transitions system.
The state values, action values and transitions are reset. The number of states, actions and transitions are set to 0.
clear_actions
()¶Clear the action labels of an lts.
This removes the action labels of an lts. It also resets the information regarding to what actions labels are tau. It will not change the number of action labels.
clear_state_labels
()¶Clear the labels of an lts.
This removes the action labels of an lts. It does not change the number of state labels
clear_transitions
(const std::size_t n = 0)¶Clear the transitions of an lts.
Parameters:
This resets the transition vector in an lts, but leaves other related items, such as state or action labels untouched.
get_transitions
()¶Gets a reference to the vector of transitions of the current lts.
As this vector can be huge, it is adviced to avoid to copy this vector.
Returns: A reference to the vector.
get_transitions
() constGets a const reference to the vector of transitions of the current lts.
As this vector can be huge, it is adviced to avoid to copy this vector.
Returns: A const reference to the vector.
has_action_info
() const¶Checks whether this LTS has labels associated with its actions, which are numbers.
Returns: * true if the LTS has values for labels;
has_state_info
() const¶Checks whether this LTS has state values associated with its states.
Returns: * true if the LTS has state information;
Returns the hidden label set that tells for each label what its corresponding hidden label is.
Returns: The hidden action set
Returns the hidden label set that tells for each label what its corresponding hidden label is.
Returns: The hidden action set
initial_state
() constGets the initial state number of this LTS.
Returns: The number of the initial state of this LTS.
is_probabilistic
(const states_size_type state) const¶Gets the label of a state.
Parameters:
Returns: The label of the state.
is_tau
(labels_size_type action) const¶Checks whether an action is a tau action.
Parameters:
Returns: * true if the action is a tau action;
lts
()¶Creates an empty LTS.
num_action_labels
() const¶Gets the number of action labels of this LTS.
Returns: The number of action labels of this LTS.
num_state_labels
() const¶Gets the number of state labels of this LTS.
As states do not need to have state labels, the number of state labels can differ from the number of states.
Returns: The number of state labels of this LTS.
num_states
() const¶Gets the number of states of this LTS.
Returns: The number of states of this LTS.
num_transitions
() const¶Gets the number of transitions of this LTS.
Returns: The number of transitions of this LTS.
operator==
(const lts &other) const¶Standard equality operator.
Parameters:
Records all actions with a string that occurs in tau_actions internally.
In case actions are partially hidden, e.g. action a is hidden in a|b b is the result. If b is an existing label with index j, and a|b had index i, every i is replaced by j. If there was no action b yet, the action label a|b is replaced by the action label b. Essential for the correctness is that hiding an action repeatedly in a multiaction, has the same effect as hiding it once, which is a property of hiding actions.
Parameters:
set_action_label
(const labels_size_type action, const ACTION_LABEL_T &label)¶Sets the label of an action.
Parameters:
Sets the hidden label map that tells for each label what its corresponding hidden label is.
Parameters:
set_initial_state
(const states_size_type state)¶Sets the initial state number of this LTS.
Parameters:
set_num_action_labels
(const labels_size_type n)¶Sets the number of action labels of this LTS.
If space is reserved for new action labels, these are set to the default action label.
set_num_states
(const states_size_type n, const bool has_state_labels = true)¶Sets the number of states of this LTS.
Parameters:
set_state_label
(const states_size_type state, const STATE_LABEL_T &label)¶Sets the label of a state.
Parameters:
state_label
(const states_size_type state) const¶Gets the label of a state.
Parameters:
Returns: The label of the state.
state_labels
()¶Provides the state labels of an LTS.
Returns: A reference to the state label vector of the LTS.
state_labels
() const¶Provides the state labels of an LTS.
Returns: A reference to the state label vector of the LTS.
tau_label_index
() const¶Provide the index of the label that represents tau.
Returns: const_tau_label_index, which is 0, i.e. the index of the label tau.