28 fsm_.initial_probabilistic_state().get():
29 fsm_.initial_probabilistic_state().begin()->
state()),
52 for (std::size_t i = 0; i <
fsm.process_parameters().size(); i++)
54 const std::vector<std::string>& values =
fsm.state_element_values(i);
55 out <<
fsm.process_parameter(i).first <<
"(" << values.size() <<
") " <<
fsm.process_parameter(i).second <<
" ";
56 for (
const std::string& s: values)
58 out <<
" \"" << s <<
"\"";
72 for (std::size_t j = 0; j < state_parameters.size(); j++)
78 out << state_parameters[j];
129 out <<
"---" << std::endl;
131 out <<
"---" << std::endl;
136 out <<
"---" << std::endl;
138 out <<
"\n" << std::endl;
145 if (filename.empty() || filename==
"-")
153 throw mcrl2::runtime_error(std::string(
"Error parsing .fsm file from standard input.\n") + e.what());
158 std::ifstream is(filename.c_str());
178 if (filename.empty() || filename==
"-")
184 std::ofstream os(filename.c_str());
Read-only balanced binary tree of terms.
This class contains strings to be used as values for action labels in lts's.
mcrl2::lts::probabilistic_state< std::size_t, mcrl2::utilities::probabilistic_arbitrary_precision_fraction > probabilistic_state
void load(const std::string &filename)
Save the labelled transition system to file.
void save(const std::string &filename) const
Save the labelled transition system to file.
states_size_type num_states() const
Gets the number of states of this LTS.
ACTION_LABEL_T action_label(const labels_size_type action) const
Gets the label of an action.
bool has_state_info() const
Checks whether this LTS has state values associated with its states.
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_T state_label(const states_size_type state) const
Gets the label of a state.
const std::vector< transition > & get_transitions() const
Gets a const reference to the vector of transitions of the current lts.
The class lts_fsm_t contains labelled transition systems in .fsm format.
void save(const std::string &filename) const
Save the labelled transition system to file.
void load(const std::string &filename)
Save the labelled transition system to file.
const PROBABILISTIC_STATE_T & initial_probabilistic_state() const
Gets the initial state number of this LTS.
const PROBABILISTIC_STATE_T & probabilistic_state(const states_size_type index) const
Gets the probabilistic label of an index.
std::size_t size() const
Gets the number of probabilistic states in the vector representation of this state....
STATE get() const
Get a probabilistic state if is is simple, i.e., consists of a single state.
This class contains state labels for the fsm format.
A class containing triples, source label and target representing transitions.
Standard exception class for reporting runtime errors.
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
A simple straighforward parser for .fsm files.
This include file contains routines to read and write labelled transitions from and to files and from...
std::string pp(const abstraction &x)
void translate_to_probabilistic_lts(const lts< STATE_LABEL_T, ACTION_LABEL_T, LTS_BASE > &l_plain, probabilistic_lts< STATE_LABEL_T, ACTION_LABEL_T, PROBABILISTIC_STATE_T, LTS_BASE > &l_probabilistic)
void swap_to_non_probabilistic_lts(probabilistic_lts< STATE_LABEL_T, ACTION_LABEL_T, PROBABILISTIC_STATE_T, LTS_BASE > &l_probabilistic, lts< STATE_LABEL_T, ACTION_LABEL_T, LTS_BASE > &l_plain)
void parse_fsm_specification(std::istream &from, probabilistic_lts_fsm_t &result)
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
std::size_t swap_initial_state(const std::size_t i)
std::size_t number_of_initial_state
const probabilistic_lts_fsm_t & fsm
void write_probabilistic_state(const detail::lts_fsm_base::probabilistic_state &probabilistic_state)
fsm_writer(std::ostream &out_, const probabilistic_lts_fsm_t &fsm_)