1 /********************* */
2 /*! \file output_channel.cpp
4 ** Top contributors (to current version):
6 ** This file is part of the CVC4 project.
7 ** Copyright (c) 2009-2020 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
12 ** \brief The theory output channel interface
15 #include "theory/output_channel.h"
20 LemmaProperty
operator|(LemmaProperty lhs
, LemmaProperty rhs
)
22 return static_cast<LemmaProperty
>(static_cast<uint32_t>(lhs
)
23 | static_cast<uint32_t>(rhs
));
25 LemmaProperty
& operator|=(LemmaProperty
& lhs
, LemmaProperty rhs
)
30 LemmaProperty
operator&(LemmaProperty lhs
, LemmaProperty rhs
)
32 return static_cast<LemmaProperty
>(static_cast<uint32_t>(lhs
)
33 & static_cast<uint32_t>(rhs
));
35 LemmaProperty
& operator&=(LemmaProperty
& lhs
, LemmaProperty rhs
)
40 bool isLemmaPropertyRemovable(LemmaProperty p
)
42 return (p
& LemmaProperty::REMOVABLE
) != LemmaProperty::NONE
;
44 bool isLemmaPropertyPreprocess(LemmaProperty p
)
46 return (p
& LemmaProperty::PREPROCESS
) != LemmaProperty::NONE
;
48 bool isLemmaPropertySendAtoms(LemmaProperty p
)
50 return (p
& LemmaProperty::SEND_ATOMS
) != LemmaProperty::NONE
;
52 bool isLemmaPropertyNeedsJustify(LemmaProperty p
)
54 return (p
& LemmaProperty::NEEDS_JUSTIFY
) != LemmaProperty::NONE
;
57 std::ostream
& operator<<(std::ostream
& out
, LemmaProperty p
)
59 if (p
== LemmaProperty::NONE
)
66 if (isLemmaPropertyRemovable(p
))
70 if (isLemmaPropertyPreprocess(p
))
74 if (isLemmaPropertySendAtoms(p
))
78 if (isLemmaPropertyNeedsJustify(p
))
80 out
<< " NEEDS_JUSTIFY";
87 LemmaStatus::LemmaStatus(TNode rewrittenLemma
, unsigned level
)
88 : d_rewrittenLemma(rewrittenLemma
), d_level(level
)
92 TNode
LemmaStatus::getRewrittenLemma() const { return d_rewrittenLemma
; }
94 unsigned LemmaStatus::getLevel() const { return d_level
; }
96 LemmaStatus
OutputChannel::split(TNode n
)
98 return splitLemma(n
.orNode(n
.notNode()));
101 void OutputChannel::trustedConflict(TrustNode pconf
)
103 Unreachable() << "OutputChannel::trustedConflict: no implementation"
107 LemmaStatus
OutputChannel::trustedLemma(TrustNode lem
, LemmaProperty p
)
109 Unreachable() << "OutputChannel::trustedLemma: no implementation"
113 } // namespace theory