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