28 std::string::size_type pos = s.find_last_of(
'.');
30 if (pos != std::string::npos)
32 std::string ext = s.substr(pos+1);
42 else if (ext ==
"lts")
50 else if (ext ==
"fsm")
58 else if (ext ==
"dot")
71static const std::string
type_strings[] = {
"unknown",
"lts",
"aut",
"fsm",
"dot" };
78 "Aldebaran format (CADP)",
79 "Finite State Machine format",
80 "GraphViz format (no longer supported as input format)",
130 static std::set<lts_type> s;
155 std::vector<lts_type> types(supported.begin(), supported.end());
156 std::sort(types.begin(),
158 [](
const lts_type& t1,
const lts_type& t2){ return lts_named_cmp<lts_type>(type_strings, t1, t2); });
161 for (std::vector<lts_type>::iterator i=types.begin(); i!=types.end(); ++i)
165 if (*i == default_format)
171 assert(types.size() >= 2);
172 if (i == types.end() - 2)
176 else if (i != types.end() - 1)
192 std::vector<lts_type> types(supported.begin(), supported.end());
193 std::sort(types.begin(),
195 [](
const lts_type& t1,
const lts_type& t2){ return lts_named_cmp<lts_type>(extension_strings, t1, t2); });
199 for (std::vector<lts_type>::iterator i=types.begin(); i!=types.end(); i++)
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
Algorithms for LTS, such as equivalence reductions, determinisation, etc.
This include file contains routines to read and write labelled transitions from and to files and from...
normalizer< Function > N(const Function &f)
std::string supported_lts_formats_text(lts_type default_format=lts_none, const std::set< lts_type > &supported=supported_lts_formats())
Gives a textual list describing supported LTS formats.
static std::string type_desc_strings[]
std::string extension_for_type(const lts_type type)
Gives the filename extension associated with an LTS format.
std::string string_for_type(const lts_type type)
Gives a string representation of an LTS format.
static const std::string type_strings[]
const std::set< lts_type > & supported_lts_formats()
Gives the set of all supported LTS formats.
bool lts_named_cmp(const std::string N[], T a, T b)
std::string lts_extensions_as_string(const std::string &sep=",", const std::set< lts_type > &supported=supported_lts_formats())
Gives a list of extensions for supported LTS formats.
lts_type parse_format(std::string const &s)
Determines the LTS format from a format specification string.
lts_type guess_format(std::string const &s, const bool be_verbose=true)
Determines the LTS format from a filename by its extension.
static const std::string extension_strings[]
std::string mime_type_for_type(const lts_type type)
Gives the MIME type associated with an LTS format.
static const std::set< lts_type > & initialise_supported_lts_formats()
static std::string mime_type_strings[]
lts_type
The enumerated type lts_type contains an index for every type type of labelled transition system that...
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...