GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/output_channel.cpp Lines: 14 35 40.0 %
Date: 2021-09-29 Branches: 2 28 7.1 %

Line Exec Source
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
 * The theory output channel interface.
14
 */
15
16
#include "theory/output_channel.h"
17
18
namespace cvc5 {
19
namespace theory {
20
21
1431
LemmaProperty operator|(LemmaProperty lhs, LemmaProperty rhs)
22
{
23
  return static_cast<LemmaProperty>(static_cast<uint32_t>(lhs)
24
1431
                                    | static_cast<uint32_t>(rhs));
25
}
26
1431
LemmaProperty& operator|=(LemmaProperty& lhs, LemmaProperty rhs)
27
{
28
1431
  lhs = lhs | rhs;
29
1431
  return lhs;
30
}
31
416020
LemmaProperty operator&(LemmaProperty lhs, LemmaProperty rhs)
32
{
33
  return static_cast<LemmaProperty>(static_cast<uint32_t>(lhs)
34
416020
                                    & static_cast<uint32_t>(rhs));
35
}
36
LemmaProperty& operator&=(LemmaProperty& lhs, LemmaProperty rhs)
37
{
38
  lhs = lhs & rhs;
39
  return lhs;
40
}
41
248867
bool isLemmaPropertyRemovable(LemmaProperty p)
42
{
43
248867
  return (p & LemmaProperty::REMOVABLE) != LemmaProperty::NONE;
44
}
45
167015
bool isLemmaPropertySendAtoms(LemmaProperty p)
46
{
47
167015
  return (p & LemmaProperty::SEND_ATOMS) != LemmaProperty::NONE;
48
}
49
138
bool isLemmaPropertyNeedsJustify(LemmaProperty p)
50
{
51
138
  return (p & LemmaProperty::NEEDS_JUSTIFY) != LemmaProperty::NONE;
52
}
53
54
std::ostream& operator<<(std::ostream& out, LemmaProperty p)
55
{
56
  if (p == LemmaProperty::NONE)
57
  {
58
    out << "NONE";
59
  }
60
  else
61
  {
62
    out << "{";
63
    if (isLemmaPropertyRemovable(p))
64
    {
65
      out << " REMOVABLE";
66
    }
67
    if (isLemmaPropertySendAtoms(p))
68
    {
69
      out << " SEND_ATOMS";
70
    }
71
    if (isLemmaPropertyNeedsJustify(p))
72
    {
73
      out << " NEEDS_JUSTIFY";
74
    }
75
    out << " }";
76
  }
77
  return out;
78
}
79
80
void OutputChannel::trustedConflict(TrustNode pconf)
81
{
82
  Unreachable() << "OutputChannel::trustedConflict: no implementation"
83
                << std::endl;
84
}
85
86
void OutputChannel::trustedLemma(TrustNode lem, LemmaProperty p)
87
{
88
  Unreachable() << "OutputChannel::trustedLemma: no implementation"
89
                << std::endl;
90
}
91
92
}  // namespace theory
93
22746
}  // namespace cvc5