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 |
2167 |
LemmaProperty operator|(LemmaProperty lhs, LemmaProperty rhs) |
22 |
|
{ |
23 |
|
return static_cast<LemmaProperty>(static_cast<uint32_t>(lhs) |
24 |
2167 |
| static_cast<uint32_t>(rhs)); |
25 |
|
} |
26 |
2167 |
LemmaProperty& operator|=(LemmaProperty& lhs, LemmaProperty rhs) |
27 |
|
{ |
28 |
2167 |
lhs = lhs | rhs; |
29 |
2167 |
return lhs; |
30 |
|
} |
31 |
874499 |
LemmaProperty operator&(LemmaProperty lhs, LemmaProperty rhs) |
32 |
|
{ |
33 |
|
return static_cast<LemmaProperty>(static_cast<uint32_t>(lhs) |
34 |
874499 |
& static_cast<uint32_t>(rhs)); |
35 |
|
} |
36 |
|
LemmaProperty& operator&=(LemmaProperty& lhs, LemmaProperty rhs) |
37 |
|
{ |
38 |
|
lhs = lhs & rhs; |
39 |
|
return lhs; |
40 |
|
} |
41 |
509538 |
bool isLemmaPropertyRemovable(LemmaProperty p) |
42 |
|
{ |
43 |
509538 |
return (p & LemmaProperty::REMOVABLE) != LemmaProperty::NONE; |
44 |
|
} |
45 |
364394 |
bool isLemmaPropertySendAtoms(LemmaProperty p) |
46 |
|
{ |
47 |
364394 |
return (p & LemmaProperty::SEND_ATOMS) != LemmaProperty::NONE; |
48 |
|
} |
49 |
567 |
bool isLemmaPropertyNeedsJustify(LemmaProperty p) |
50 |
|
{ |
51 |
567 |
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 |
31125 |
} // namespace cvc5 |