Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bool.cpp
Go to the documentation of this file.
1#include "bool.hpp"
2
3namespace smt_terms {
4
5Bool Bool::operator|(const Bool& other) const
6{
7 cvc5::Term res = solver->term_manager.mkTerm(cvc5::Kind::OR, { this->term, other.term });
8 ;
9 return { res, this->solver };
10}
11
12void Bool::operator|=(const Bool& other)
13{
14 this->term = this->solver->term_manager.mkTerm(cvc5::Kind::OR, { this->term, other.term });
15}
16
17Bool Bool::operator&(const Bool& other) const
18{
19 cvc5::Term res = solver->term_manager.mkTerm(cvc5::Kind::AND, { this->term, other.term });
20 return { res, this->solver };
21}
22
23void Bool::operator&=(const Bool& other)
24{
25 this->term = this->solver->term_manager.mkTerm(cvc5::Kind::AND, { this->term, other.term });
26}
27
28Bool Bool::operator==(const Bool& other) const
29{
30 cvc5::Term res = solver->term_manager.mkTerm(cvc5::Kind::EQUAL, { this->term, other.term });
31 return { res, this->solver };
32}
33
34Bool Bool::operator!=(const Bool& other) const
35{
36 cvc5::Term res = solver->term_manager.mkTerm(cvc5::Kind::EQUAL, { this->term, other.term });
37 res = solver->term_manager.mkTerm(cvc5::Kind::NOT, { res });
38 return { res, this->solver };
39}
40
42{
43 cvc5::Term res = solver->term_manager.mkTerm(cvc5::Kind::NOT, { this->term });
44 return { res, this->solver };
45}
46}; // namespace smt_terms
cvc5::TermManager term_manager
Definition solver.hpp:82
Bool element class.
Definition bool.hpp:14
Solver * solver
Definition bool.hpp:16
Bool operator&(const Bool &other) const
Definition bool.cpp:17
Bool operator!() const
Definition bool.cpp:41
Bool operator!=(const Bool &other) const
Definition bool.cpp:34
void operator|=(const Bool &other)
Definition bool.cpp:12
cvc5::Term term
Definition bool.hpp:17
Bool operator==(const Bool &other) const
Definition bool.cpp:28
void operator&=(const Bool &other)
Definition bool.cpp:23
Bool operator|(const Bool &other) const
Definition bool.cpp:5