12#ifndef MCRL2_LTS_DETAIL_LTS_LOAD_H
13#define MCRL2_LTS_DETAIL_LTS_LOAD_H
28 desc.add_option(
"data", utilities::make_file_argument(
"FILE"),
29 "use FILE as the data and action specification. "
30 "FILE must be a .mcrl2 file which does not contain an init clause. ",
'D');
32 desc.add_option(
"lps", utilities::make_file_argument(
"FILE"),
33 "use FILE for the data and action specification. "
34 "FILE must be a .lps file. ",
'l');
36 desc.add_option(
"mcrl2", utilities::make_file_argument(
"FILE"),
37 "use FILE as the data and action specification for the LTS. "
38 "FILE must be a .mcrl2 file. ",
'm');
43template <
class LTS_TYPE>
44void load_lts(
const utilities::command_line_parser& parser,
const std::string& ltsfilename, LTS_TYPE& result)
47 std::string data_file;
49 if (parser.options.count(
"data"))
51 if (1 < parser.options.count(
"data"))
53 mCRL2log(
log::warning) <<
"Multiple data specification files are specified; can only use one.\n";
55 data_file_type = data_file_type_t::data_e;
56 data_file = parser.option_argument(
"data");
59 if (parser.options.count(
"lps"))
61 if (1 < parser.options.count(
"lps") || data_file_type != data_file_type_t::none_e)
63 mCRL2log(
log::warning) <<
"Multiple data specification files are specified; can only use one.\n";
66 data_file_type = data_file_type_t::lps_e;
67 data_file = parser.option_argument(
"lps");
70 if (parser.options.count(
"mcrl2"))
72 if (1 < parser.options.count(
"mcrl2") || data_file_type != data_file_type_t::none_e)
74 mCRL2log(
log::warning) <<
"Multiple data specification files are specified; can only use one.\n";
77 data_file_type = data_file_type_t::mcrl2_e;
78 data_file = parser.option_argument(
"mcrl2");
81 lts_type input_type = detail::guess_format(ltsfilename);
82 load_lts(result, ltsfilename, input_type, data_file_type, data_file);
86template <
class LTS_TYPE>
92 std::set<data::variable> global_variables;
98 if constexpr (!(LTS_TYPE::is_probabilistic_lts))
105 const typename LTS_TYPE::probabilistic_state_t&
init = l.initial_probabilistic_state();
116 std::size_t count=
init.size();
117 for(
typename LTS_TYPE::probabilistic_state_t::const_reverse_iterator i=
init.rbegin(); i!=
init.rend(); ++i)
Read-only balanced binary tree of terms.
LPS summand containing a deadlock.
\brief A stochastic distribution
A stochastic process initializer.
Linear process specification.
MCRL2_EXPORT bool init(rewriter_interface *i, RewriterCompilingJitty *this_rewriter)
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
This include file contains routines to read and write labelled transitions from and to files and from...
const function_symbol & true_()
Constructor for function symbol true.
const basic_sort & pos()
Constructor for sort expression Pos.
data_expression & real_zero()
function_symbol equal_to(const sort_expression &s)
Constructor for function symbol ==.
function_symbol if_(const sort_expression &s)
Constructor for function symbol if.
std::vector< stochastic_action_summand > stochastic_action_summand_vector
\brief vector of stochastic_action_summands
std::vector< deadlock_summand > deadlock_summand_vector
\brief vector of deadlock_summands
lps::stochastic_specification extract_specification(const LTS_TYPE &l)
void load_lts(const utilities::command_line_parser &parser, const std::string <sfilename, LTS_TYPE &result)
void add_options(utilities::interface_description &desc)
lts_type
The enumerated type lts_type contains an index for every type type of labelled transition system that...
data_file_type_t
Type for data files that contain extra information for an lts in .aut or .fsm format....
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Contains a number of auxiliary functions to recognize reals.