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 isLemmaPropertySendAtoms(LemmaProperty p
)
46 return (p
& LemmaProperty::SEND_ATOMS
) != LemmaProperty::NONE
;
48 bool isLemmaPropertyNeedsJustify(LemmaProperty p
)
50 return (p
& LemmaProperty::NEEDS_JUSTIFY
) != LemmaProperty::NONE
;
53 std::ostream
& operator<<(std::ostream
& out
, LemmaProperty p
)
55 if (p
== LemmaProperty::NONE
)
62 if (isLemmaPropertyRemovable(p
))
66 if (isLemmaPropertySendAtoms(p
))
70 if (isLemmaPropertyNeedsJustify(p
))
72 out
<< " NEEDS_JUSTIFY";
79 void OutputChannel::split(TNode n
) { splitLemma(n
.orNode(n
.notNode())); }
81 void OutputChannel::trustedConflict(TrustNode pconf
)
83 Unreachable() << "OutputChannel::trustedConflict: no implementation"
87 void OutputChannel::trustedLemma(TrustNode lem
, LemmaProperty p
)
89 Unreachable() << "OutputChannel::trustedLemma: no implementation"