32 const std::string& output_filename,
33 const std::string& parameter_selection)
44 const std::string& output_filename,
46 bool instantiate_free_variables,
47 bool ignore_conditions,
64 algorithm.
run(instantiate_free_variables, ignore_conditions);
75void lpsinfo(
const std::string& input_filename,
76 const std::string& input_file_message
82 std::cout << input_file_message <<
"\n\n";
83 std::cout << info.info();
87 const std::string& output_filename,
88 const std::string& invariant_filename,
89 const std::string& dot_file_name,
93 const bool no_elimination,
94 const bool simplify_all,
95 const bool all_violations,
96 const bool counter_example,
97 const bool path_eliminator,
98 const bool apply_induction,
106 if (!invariant_filename.empty())
108 std::ifstream instream(invariant_filename.c_str());
110 if (!instream.is_open())
124 throw mcrl2::runtime_error(
"A file containing an invariant must be specified using the option --invariant=INVFILE.");
129 mCRL2log(
log::warning) <<
"The invariant is not checked; it may not hold for this LPS." << std::endl;
156 algorithm.
run(invariant, !no_elimination);
162 const std::string& output_filename
171void lpspp(
const std::string& input_filename,
172 const std::string& output_filename,
173 bool print_summand_numbers,
181 << (input_filename.empty()?
"standard input":input_filename)
182 <<
" to " << (output_filename.empty()?
"standard output":output_filename)
194 if (output_filename.empty())
200 std::ofstream output_stream(output_filename.c_str());
203 output_stream << text;
204 output_stream.close();
213void lpsrewr(
const std::string& input_filename,
214 const std::string& output_filename,
221 switch (rewriter_type)
247 const std::string& output_filename,
248 const bool decluster)
255 mCRL2log(
log::debug) <<
"Sum elimination completed, saving to " << output_filename << std::endl;
260 const std::string& output_filename,
262 const std::string& sorts_string,
263 const bool finite_sorts_only,
264 const bool tau_summands_only)
268 std::set<data::sort_expression> sorts;
271 if(!sorts_string.empty())
274 for (
const std::string& part : parts)
279 else if (finite_sorts_only)
285 const std::set<data::sort_expression>& sort_set=spec.
data().
sorts();
286 sorts = std::set<data::sort_expression>(sort_set.begin(),sort_set.end());
297 const std::string& output_filename,
298 const bool add_invariants,
299 const bool apply_fourier_motzkin,
310void txt2lps(
const std::string& input_filename,
311 const std::string& output_filename
315 std::ifstream ifs(input_filename);
rewrite_strategy strategy
The rewrite strategies of the rewriter.
Rewriter that operates on data expressions.
const std::set< sort_expression > & sorts() const
Gets the normalised sort declarations including those that are system defined. This is the set with a...
Algorithm class that can be used to apply the binary algorithm.
void run()
Apply the algorithm to the specification passed in the constructor.
Algorithm class for elimination of constant parameters.
void run(bool instantiate_global_variables=false, bool ignore_conditions=false)
Runs the constelm algorithm.
bool check_invariant(const data::data_expression &a_invariant)
precondition: the argument passed as parameter a_invariant is a valid expression in internal mCRL2 fo...
void remove_singleton_sorts()
Removes parameters with a singleton sort.
void remove_trivial_summands()
Removes summands with condition equal to false.
Stores the following properties of a linear process specification:
void run(const data::data_expression &invariant, bool apply_prover)
const data::variable_list & process_parameters() const
Returns the sequence of process parameters.
const LinearProcess & process() const
Returns the linear process of the specification.
const data::data_specification & data() const
Returns the data specification.
Linear process specification.
Class implementing the sum elimination lemma.
void run()
Apply the sum elimination lemma to all summands in the specification.
void run(const SummandListType &list, Container &result)
Standard exception class for reporting runtime errors.
Interface to class invariant_eliminator.
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
Add your file description here.
IO routines for linear process specifications.
add your file description here.
print_format_type
print_format_type represents the available pretty print formats
std::string pp_format_to_string(const print_format_type pp_format)
Print string representation of pretty print format.
smt_solver_type
The enumeration type smt_solver_type enumerates all available SMT solvers.
data_expression parse_data_expression(std::istream &in, const VariableContainer &variables, const data_specification &dataspec=detail::default_specification(), bool type_check=true, bool translate_user_notation=true, bool normalize_sorts=true)
Parses and type checks a data expression.
sort_expression parse_sort_expression(std::istream &in, const data_specification &data_spec=detail::default_specification())
Parses and type checks a sort expression.
std::string pp(const abstraction &x)
void lpspp(const std::string &input_filename, const std::string &output_filename, bool print_summand_numbers, core::print_format_type format)
void lpssumelm(const std::string &input_filename, const std::string &output_filename, const bool decluster)
std::string pp_with_summand_numbers(const specification &x)
void txt2lps(const std::string &input_filename, const std::string &output_filename)
void parse_lps(std::istream &, Specification &)
void save_lps(const Specification &spec, std::ostream &stream, const std::string &target="")
Save an LPS in the format specified.
void lpsuntime(const std::string &input_filename, const std::string &output_filename, const bool add_invariants, const bool apply_fourier_motzkin, const data::rewriter::strategy rewrite_strategy)
std::string pp(const action_summand &x)
void lpssuminst(const std::string &input_filename, const std::string &output_filename, const data::rewriter::strategy rewrite_strategy, const std::string &sorts_string, const bool finite_sorts_only, const bool tau_summands_only)
bool lpsinvelm(const std::string &input_filename, const std::string &output_filename, const std::string &invariant_filename, const std::string &dot_file_name, data::rewriter::strategy rewrite_strategy, data::detail::smt_solver_type solver_type, const bool no_check, const bool no_elimination, const bool simplify_all, const bool all_violations, const bool counter_example, const bool path_eliminator, const bool apply_induction, const int time_limit)
void one_point_condition_rewrite(T &x, const DataRewriter &R, typename std::enable_if<!std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
Applies the one point condition rewriter to all embedded data expressions in an object x.
void lpsparelm(const std::string &input_filename, const std::string &output_filename)
atermpp::aterm specification_to_aterm(const specification_base< LinearProcess, InitialProcessExpression > &spec)
Conversion to aterm.
void lpsbinary(const std::string &input_filename, const std::string &output_filename, const std::string ¶meter_selection)
void parelm(Specification &spec, bool variant1=true)
Removes unused parameters from a linear process specification.
lps_rewriter_type
An enumerated type for the available lps rewriters.
void lpsconstelm(const std::string &input_filename, const std::string &output_filename, data::rewriter::strategy rewrite_strategy, bool instantiate_free_variables, bool ignore_conditions, bool remove_trivial_summands, bool remove_singleton_sorts)
void rewrite(T &x, Rewriter R, typename std::enable_if<!std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
void remove_singleton_sorts(Specification &spec)
Removes parameters with a singleton sort from a linear process specification.
data::assignment_list remove_redundant_assignments(const data::assignment_list &assignments, const data::variable_list &do_not_remove)
Removes assignments of the form x := x from v for variables x that are not contained in do_not_remove...
void lpsrewr(const std::string &input_filename, const std::string &output_filename, const data::rewriter::strategy rewrite_strategy, const lps::lps_rewriter_type rewriter_type)
void load_lps(Specification &spec, std::istream &stream, const std::string &source="")
Load LPS from file.
std::set< data::sort_expression > finite_sorts(const data::data_specification &s)
Return a set with all finite sorts in data specification s.
void one_point_rule_rewrite(T &x, typename std::enable_if<!std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
Applies the one point rule rewriter to all embedded data expressions in an object x.
void lpsinfo(const std::string &input_filename, const std::string &input_file_message)
void remove_trivial_summands(Specification &spec)
Removes summands with condition equal to false from a linear process specification.
std::string remove_whitespace(const std::string &text)
Removes whitespace from a string.
std::vector< std::string > split(const std::string &line, const std::string &separators)
Split the text.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Rewriter for LPSs that takes equalities of the form p_i == c, where p_i is a process parameter,...
A property map containing properties of an LPS specification.
Provides an implementation of the sum elimination lemma, as well as the removal of unused summation v...
Instantiate summation variables.
Removes time from a linear process.