GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/arith/rewrites.cpp Lines: 1 18 5.6 %
Date: 2021-03-23 Branches: 2 16 12.5 %

Line Exec Source
1
/*********************                                                        */
2
/*! \file rewrites.cpp
3
 ** \verbatim
4
 ** Top contributors (to current version):
5
 **   Andrew Reynolds
6
 ** This file is part of the CVC4 project.
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.\endverbatim
11
 **
12
 ** \brief Implementation of inference information utility.
13
 **/
14
15
#include "theory/arith/rewrites.h"
16
17
#include <iostream>
18
19
namespace CVC4 {
20
namespace theory {
21
namespace arith {
22
23
const char* toString(Rewrite r)
24
{
25
  switch (r)
26
  {
27
    case Rewrite::NONE: return "NONE";
28
    case Rewrite::CONST_EVAL: return "CONST_EVAL";
29
    case Rewrite::MOD_TOTAL_BY_CONST: return "MOD_TOTAL_BY_CONST";
30
    case Rewrite::DIV_TOTAL_BY_CONST: return "DIV_TOTAL_BY_CONST";
31
    case Rewrite::DIV_MOD_BY_ZERO: return "DIV_MOD_BY_ZERO";
32
    case Rewrite::MOD_BY_ONE: return "MOD_BY_ONE";
33
    case Rewrite::DIV_BY_ONE: return "DIV_BY_ONE";
34
    case Rewrite::DIV_MOD_PULL_NEG_DEN: return "DIV_MOD_PULL_NEG_DEN";
35
    case Rewrite::MOD_OVER_MOD: return "MOD_OVER_MOD";
36
    case Rewrite::MOD_CHILD_MOD: return "MOD_CHILD_MOD";
37
    case Rewrite::DIV_OVER_MOD: return "DIV_OVER_MOD";
38
    default: return "?";
39
  }
40
}
41
42
std::ostream& operator<<(std::ostream& out, Rewrite r)
43
{
44
  out << toString(r);
45
  return out;
46
}
47
48
}  // namespace arith
49
}  // namespace theory
50
26685
}  // namespace CVC4