mCRL2
Loading...
Searching...
No Matches
lps_rewriter_type.h
Go to the documentation of this file.
1// Author(s): Jan Friso Groote (based on mcrl2/pbes/pbes_rewriter_type by Wieger Wesselink)
2// Copyright: see the accompanying file COPYING or copy at
3// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
4//
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
11
12#ifndef MCRL2_LPS_LPS_REWRITER_TYPE_H
13#define MCRL2_LPS_LPS_REWRITER_TYPE_H
14
16#include <string>
17
18namespace mcrl2 {
19
20namespace lps {
21
24{
28};
29
31inline
33{
34 if (type == "simplify")
35 {
36 return simplify ;
37 }
38 if (type == "quantifier-one-point")
39 {
41 }
42 if (type == "condition-one-point")
43 {
45 }
46 throw mcrl2::runtime_error("unknown lps rewriter option " + type);
47}
48
50inline
52{
53 switch (type)
54 {
55 case simplify:
56 return "simplify";
58 return "quantifier-one-point";
60 return "condition-one-point";
61 default:
62 return "unknown lps rewriter";
63 }
64}
65
67inline
68std::string description(const lps_rewriter_type type)
69{
70 switch (type)
71 {
72 case simplify :
73 return "for simplification";
75 return "for one point rule quantifier elimination";
77 return "simplify summands using equalities appearing in condition";
78 }
79 throw mcrl2::runtime_error("unknown lps rewriter");
80}
81
86inline
87std::istream& operator>>(std::istream& is, lps_rewriter_type& t)
88{
89 std::string s;
90 is >> s;
91 try
92 {
94 }
95 catch (const mcrl2::runtime_error&)
96 {
97 is.setstate(std::ios_base::failbit);
98 }
99 return is;
100}
101
102inline
103std::ostream& operator<<(std::ostream& os, const lps_rewriter_type t)
104{
106 return os;
107}
108
109} // namespace lps
110
111} // namespace mcrl2
112
113#endif // MCRL2_LPS_LPS_REWRITER_TYPE_H
Standard exception class for reporting runtime errors.
Definition exception.h:27
Exception classes for use in libraries and tools.
lps_rewriter_type parse_lps_rewriter_type(const std::string &type)
Parses a lps rewriter type.
std::ostream & operator<<(std::ostream &out, const action_summand &x)
lps_rewriter_type
An enumerated type for the available lps rewriters.
std::string description(const exploration_strategy strat)
std::istream & operator>>(std::istream &is, exploration_strategy &strat)
std::string print_lps_rewriter_type(const lps_rewriter_type type)
Prints a lps rewriter type.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72