Include file:

#include "mcrl2/lts/lts_fsm.h
class mcrl2::lts::detail::lts_fsm_base

Protected attributes

std::vector<std::pair<std::string, std::string>> m_parameters

m_parameters contain the parameters corresponding to the consecutive elements of a state vector. A parameter consists of two strings: a variable name and a string indicating its sort.

std::vector<std::vector<std::string>> m_state_element_values

state_element_values contain the values that can occur at the i-th position of a state label

Public member functions

void add_process_parameter(const std::string &name, const std::string &sort)

Set the state parameters for this LTS.


  • name The variable name of the added parameter.
  • sort The sort of the added parameter.
std::size_t add_state_element_value(std::size_t idx, const std::string &s)

Adds a string to the state element values for the idx-th position in a state vector. Returns the number given to this string.


  • idx The parameter index.
  • s String to be added as value for the indicate parameter.

Returns: The index for the added parameter.

void 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.

void clear_process_parameters()

Clear the state parameters for this LTS.

std::pair<std::string, std::string> process_parameter(std::size_t i) const

Returns the i-th parameter of the state vectors stored in this LTS.


  • i The index of the parameter.

Returns: The variable/sort of the state parameter at index i.

std::vector<std::pair<std::string, std::string>> process_parameters() const

Return the parameters of the state vectors stored in this LTS.

Returns: The state parameters stored in this LTS.

std::string state_element_value(std::size_t parameter_index, std::size_t element_index) const

Returns the element_index’th element for the parameter with index parameter_index.

If there are no values for the parameter_index, the element_index is transformed to a string, and this string is returned.


  • parameter_index The index for this parameter.
  • element_index The index to the value string corresponding to this parameter.

Returns: The string corresponding to the two given indices.

const std::vector<std::string> &state_element_values(std::size_t idx) const

Provides the vector of strings that correspond to the values of the number at position idx in a vector.


  • idx The index of the parameter.

Returns: A vector containing strings representing the possible values that this parameter can have.

std::string state_label_to_string(const state_label_fsm &l) const

Pretty print a state value of this FSM.

The label l is printed as (t1,...,tn). It uses information from the lts.


  • l The state value to pretty print.

Returns: The pretty-printed representation of value.

void swap(lts_fsm_base &other)

Standard swap function.

lts_type type() const

The lts_type of this labelled transition system. In this case lts_fsm.

Returns: Returns lts_fsm as type of this transition system.