summaryrefslogtreecommitdiff
path: root/src/theory/arith/rewrites.cpp
blob: a7013242238084afe1374e3a19f89a3a87f8ed98 (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
51
/******************************************************************************
 * Top contributors (to current version):
 *   Andrew Reynolds
 *
 * This file is part of the cvc5 project.
 *
 * Copyright (c) 2009-2021 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.
 * ****************************************************************************
 *
 * Implementation of inference information utility.
 */

#include "theory/arith/rewrites.h"

#include <iostream>

namespace cvc5 {
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 cvc5
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback