35 return isA<UndefValue>(expr);
39 inline bool isTrue(
const Condition* cond) {
40 return isA<True>(cond);
53 std::queue<const Condition*> conditionsToProcess;
54 if (condition !=
nullptr) {
55 conditionsToProcess.push(condition);
56 while (!conditionsToProcess.empty()) {
57 condition = conditionsToProcess.front();
58 conditionsToProcess.pop();
59 if (
const auto* ramConj =
dynamic_cast<const Conjunction*
>(condition)) {
60 conditionsToProcess.push(&ramConj->getLHS());
61 conditionsToProcess.push(&ramConj->getRHS());
63 conditionList.emplace_back(condition->
clone());
78 inline Own<Condition>
toCondition(
const VecOwn<Condition>& conds) {
79 Own<Condition> result;
80 for (
auto const& cur : conds) {
81 if (result ==
nullptr) {
96 inline std::vector<const ram::Condition*>
findConjunctiveTerms(
const ram::Condition* condition) {
97 std::vector<const ram::Condition*> conditionList;
98 std::queue<const ram::Condition*> conditionsToProcess;
99 if (condition !=
nullptr) {
100 conditionsToProcess.push(condition);
101 while (!conditionsToProcess.empty()) {
102 condition = conditionsToProcess.front();
103 conditionsToProcess.pop();
104 if (
const auto* ramConj =
dynamic_cast<const ram::Conjunction*
>(condition)) {
105 conditionsToProcess.push(&ramConj->getLHS());
106 conditionsToProcess.push(&ramConj->getRHS());
108 conditionList.emplace_back(condition);
112 return conditionList;