41template <
typename Specification>
42void save_lps(
const Specification& spec, std::ostream& stream,
const std::string& target =
"")
44 mCRL2log(
log::debug) <<
"Saving LPS" << (target.empty() ?
"" :
" to " + target) <<
".\n";
53template <
typename Specification>
54void load_lps(Specification& spec, std::istream& stream,
const std::string& source =
"")
56 mCRL2log(
log::debug) <<
"Loading LPS" << (source.empty() ?
"" :
" from " + source) <<
".\n";
58 if constexpr (std::is_same<Specification, specification>::value)
73template <
typename Specification>
74void save_lps(
const Specification& spec,
const std::string& filename)
76 if (filename.empty() || filename ==
"-")
78 save_lps(spec, std::cout,
"standard output");
82 std::ofstream ofs(filename, std::ios_base::binary);
94template <
typename Specification>
95void load_lps(Specification& spec,
const std::string& filename)
97 if (filename.empty() || filename ==
"-")
99 load_lps(spec, std::cin,
"standard input");
103 std::ifstream ifs(filename, std::ios_base::binary);
The interface for a class that reads aterm from a stream. The default constructed term aterm() indica...
The interface for a class that writes aterm to a stream. Every written term is retrieved by the corre...
Reads terms from a stream in the steamable binary aterm format.
Writes terms in a streamable binary aterm format to an output stream.
Linear process specification.
Standard exception class for reporting runtime errors.
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
void save_lps(const Specification &spec, std::ostream &stream, const std::string &target="")
Save an LPS in the format specified.
std::ostream & operator<<(std::ostream &out, const action_summand &x)
specification remove_stochastic_operators(const stochastic_specification &spec)
Converts a stochastic specification to a specification. Throws an exception if non-empty distribution...
std::istream & operator>>(std::istream &is, exploration_strategy &strat)
void load_lps(Specification &spec, std::istream &stream, const std::string &source="")
Load LPS from file.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...