mCRL2
Loading...
Searching...
No Matches
mcrl2::lts::lts_lts_t Class Reference

This class contains labelled transition systems in .lts format. More...

#include <lts_lts.h>

Inheritance diagram for mcrl2::lts::lts_lts_t:
mcrl2::lts::lts< state_label_lts, action_label_lts, detail::lts_lts_base > mcrl2::lts::detail::lts_lts_base

Public Member Functions

 lts_lts_t ()
 Creates an object containing no information.
 
void load (const std::string &filename)
 Load the labelled transition system from file.
 
void save (const std::string &filename) const
 Save the labelled transition system to file.
 
- Public Member Functions inherited from mcrl2::lts::lts< state_label_lts, action_label_lts, detail::lts_lts_base >
 lts ()
 Creates an empty LTS.
 
 lts (const lts &l)
 Creates a copy of the supplied LTS.
 
ltsoperator= (const lts &l)
 Standard assignment operator.
 
bool operator== (const lts &other) const
 Standard equality operator.
 
void swap (lts &l)
 Swap this lts with the supplied supplied LTS.
 
states_size_type num_states () const
 Gets the number of states of this LTS.
 
std::vector< state_label_lts > & state_labels ()
 Provides the state labels of an LTS.
 
const std::vector< state_label_lts > & state_labels () const
 Provides the state labels of an LTS.
 
states_size_type num_state_labels () const
 Gets the number of state labels of this LTS.
 
void set_num_states (const states_size_type n, const bool has_state_labels=true)
 Sets the number of states of this LTS.
 
transitions_size_type num_transitions () const
 Gets the number of transitions of this LTS.
 
void set_num_action_labels (const labels_size_type n)
 Sets the number of action labels of this LTS.
 
labels_size_type num_action_labels () const
 Gets the number of action labels of this LTS.
 
states_size_type initial_state () const
 Gets the initial state number of this LTS.
 
void set_initial_state (const states_size_type state)
 Sets the initial state number of this LTS.
 
states_size_type add_state (const state_label_lts &label=state_label_lts())
 Adds a state to this LTS.
 
labels_size_type add_action (const action_label_lts &label)
 Adds an action with a label to this LTS.
 
const labels_size_type tau_label_index () const
 Provide the index of the label that represents tau.
 
void set_state_label (const states_size_type state, const state_label_lts &label)
 Sets the label of a state.
 
const std::vector< action_label_lts > & action_labels () const
 The action labels in this lts.
 
void set_action_label (const labels_size_type action, const action_label_lts &label)
 Sets the label of an action.
 
const std::set< labels_size_type > & hidden_label_set () const
 Returns the hidden label set that tells for each label what its corresponding hidden label is.
 
std::set< labels_size_type > & hidden_label_set ()
 Returns the hidden label set that tells for each label what its corresponding hidden label is.
 
void set_hidden_label_set (const std::set< labels_size_type > &m)
 Sets the hidden label map that tells for each label what its corresponding hidden label is.
 
labels_size_type apply_hidden_label_map (const labels_size_type action) const
 If the action label is registered hidden, it returns tau, otherwise the original label.
 
state_label_lts state_label (const states_size_type state) const
 Gets the label of a state.
 
bool is_probabilistic (const states_size_type state) const
 Gets the label of a state.
 
action_label_lts action_label (const labels_size_type action) const
 Gets the label of an action.
 
void clear_transitions (const std::size_t n=0)
 Clear the transitions of an lts.
 
void clear_actions ()
 Clear the action labels of an lts.
 
void clear_state_labels ()
 Clear the labels of an lts.
 
void clear ()
 Clear the transitions system.
 
const std::vector< transition > & get_transitions () const
 Gets a const reference to the vector of transitions of the current lts.
 
std::vector< transition > & get_transitions ()
 Gets a reference to the vector of transitions of the current lts.
 
void add_transition (const transition &t)
 Add a transition to the lts.
 
bool is_tau (labels_size_type action) const
 Checks whether an action is a tau action.
 
void record_hidden_actions (const std::vector< std::string > &tau_actions)
 Records all actions with a string that occurs in tau_actions internally.
 
void apply_hidden_actions (const std::vector< std::string > &tau_actions)
 Rename actions in the lts by hiding the actions in the vector tau_actions.
 
bool has_state_info () const
 Checks whether this LTS has state values associated with its states.
 
bool has_action_info () const
 Checks whether this LTS has labels associated with its actions, which are numbers.
 
- Public Member Functions inherited from mcrl2::lts::detail::lts_lts_base
 lts_lts_base ()
 Default constructor.
 
bool operator== (const lts_lts_base &other) const
 Standard equality function;.
 
void swap (lts_lts_base &l)
 
const data::data_specificationdata () const
 Returns the mCRL2 data specification of this LTS.
 
const process::action_label_listaction_label_declarations () const
 Return action label declarations stored in this LTS.
 
void set_action_label_declarations (const process::action_label_list &decls)
 Set the action label information for this LTS.
 
void set_data (const data::data_specification &spec)
 Set the mCRL2 data specification of this LTS.
 
const data::variable_listprocess_parameters () const
 Return the process parameters stored in this LTS.
 
const data::variableprocess_parameter (std::size_t i) const
 Returns the i-th parameter of the state vectors stored in this LTS.
 
void set_process_parameters (const data::variable_list &params)
 Set the state parameters for this LTS.
 

Additional Inherited Members

- Public Types inherited from mcrl2::lts::lts< state_label_lts, action_label_lts, detail::lts_lts_base >
typedef state_label_lts state_label_t
 The type of state labels.
 
typedef action_label_lts action_label_t
 The type of action labels.
 
typedef detail::lts_lts_base base_t
 The type of the used lts base.
 
typedef std::vector< state_label_lts >::size_type states_size_type
 The sort that contains the indices of states.
 
typedef std::vector< action_label_lts >::size_type labels_size_type
 The sort that represents the indices of labels.
 
typedef std::vector< transition >::size_type transitions_size_type
 The sort that contains indices of transitions.
 
- Static Public Member Functions inherited from mcrl2::lts::detail::lts_lts_base
static lts_type type ()
 Yields the type of this lts, in this case lts_lts.
 
- Static Public Attributes inherited from mcrl2::lts::lts< state_label_lts, action_label_lts, detail::lts_lts_base >
static constexpr bool is_probabilistic_lts
 An indicator that this is not a probabilistic lts.
 
- Protected Member Functions inherited from mcrl2::lts::lts< state_label_lts, action_label_lts, detail::lts_lts_base >
void rename_labels (const std::map< labels_size_type, labels_size_type > &action_rename_map)
 
void store_action_label_to_be_renamed (const action_label_lts &a, const labels_size_type i, std::map< labels_size_type, labels_size_type > &action_rename_map)
 
- Protected Attributes inherited from mcrl2::lts::lts< state_label_lts, action_label_lts, detail::lts_lts_base >
states_size_type m_nstates
 
states_size_type m_init_state
 
std::vector< transitionm_transitions
 
std::vector< state_label_ltsm_state_labels
 
std::vector< action_label_ltsm_action_labels
 
std::set< labels_size_typem_hidden_label_set
 
- Protected Attributes inherited from mcrl2::lts::detail::lts_lts_base
data::data_specification m_data_spec
 
data::variable_list m_parameters
 
process::action_label_list m_action_decls
 

Detailed Description

This class contains labelled transition systems in .lts format.

In this .lts format, an action label is a multi action, and a state label is an expression of the form STATE(t1,...,tn) where ti are data expressions.

Definition at line 373 of file lts_lts.h.

Constructor & Destructor Documentation

◆ lts_lts_t()

mcrl2::lts::lts_lts_t::lts_lts_t ( )
inline

Creates an object containing no information.

Definition at line 377 of file lts_lts.h.

Member Function Documentation

◆ load()

void mcrl2::lts::lts_lts_t::load ( const std::string &  filename)

Load the labelled transition system from file.

If the filename is empty, the result is read from stdout.

Parameters
[in]filenameName of the file to which this lts is written.

Definition at line 520 of file liblts_lts.cpp.

◆ save()

void mcrl2::lts::lts_lts_t::save ( const std::string &  filename) const

Save the labelled transition system to file.

If the filename is empty, the result is read from stdin.

Parameters
[in]filenameName of the file from which this lts is read.

Definition at line 508 of file liblts_lts.cpp.


The documentation for this class was generated from the following files: