1 |
|
/****************************************************************************** |
2 |
|
* Top contributors (to current version): |
3 |
|
* Andrew Reynolds |
4 |
|
* |
5 |
|
* This file is part of the cvc5 project. |
6 |
|
* |
7 |
|
* Copyright (c) 2009-2021 by the authors listed in the file AUTHORS |
8 |
|
* in the top-level source directory and their institutional affiliations. |
9 |
|
* All rights reserved. See the file COPYING in the top-level source |
10 |
|
* directory for licensing information. |
11 |
|
* **************************************************************************** |
12 |
|
* |
13 |
|
* Implementation of inference information utility. |
14 |
|
*/ |
15 |
|
|
16 |
|
#include "theory/arith/rewrites.h" |
17 |
|
|
18 |
|
#include <iostream> |
19 |
|
|
20 |
|
namespace cvc5 { |
21 |
|
namespace theory { |
22 |
|
namespace arith { |
23 |
|
|
24 |
|
const char* toString(Rewrite r) |
25 |
|
{ |
26 |
|
switch (r) |
27 |
|
{ |
28 |
|
case Rewrite::NONE: return "NONE"; |
29 |
|
case Rewrite::CONST_EVAL: return "CONST_EVAL"; |
30 |
|
case Rewrite::MOD_TOTAL_BY_CONST: return "MOD_TOTAL_BY_CONST"; |
31 |
|
case Rewrite::DIV_TOTAL_BY_CONST: return "DIV_TOTAL_BY_CONST"; |
32 |
|
case Rewrite::DIV_MOD_BY_ZERO: return "DIV_MOD_BY_ZERO"; |
33 |
|
case Rewrite::MOD_BY_ONE: return "MOD_BY_ONE"; |
34 |
|
case Rewrite::DIV_BY_ONE: return "DIV_BY_ONE"; |
35 |
|
case Rewrite::DIV_MOD_PULL_NEG_DEN: return "DIV_MOD_PULL_NEG_DEN"; |
36 |
|
case Rewrite::MOD_OVER_MOD: return "MOD_OVER_MOD"; |
37 |
|
case Rewrite::MOD_CHILD_MOD: return "MOD_CHILD_MOD"; |
38 |
|
case Rewrite::DIV_OVER_MOD: return "DIV_OVER_MOD"; |
39 |
|
default: return "?"; |
40 |
|
} |
41 |
|
} |
42 |
|
|
43 |
|
std::ostream& operator<<(std::ostream& out, Rewrite r) |
44 |
|
{ |
45 |
|
out << toString(r); |
46 |
|
return out; |
47 |
|
} |
48 |
|
|
49 |
|
} // namespace arith |
50 |
|
} // namespace theory |
51 |
31125 |
} // namespace cvc5 |