| 155 | : Predicate(id), operands_(std::move(operands)) {} |
| 156 | |
| 157 | string ToString() const override { |
| 158 | if (operands().empty()) { |
| 159 | return "#true"; |
| 160 | } |
| 161 | |
| 162 | std::vector<string> operands_str; |
| 163 | std::transform(operands().begin(), operands().end(), |
| 164 | std::back_inserter(operands_str), |
| 165 | [](Predicate* pred) { return pred->ToString(); }); |
| 166 | |
| 167 | return absl::StrCat("(", absl::StrJoin(operands_str, " & "), ")"); |
| 168 | } |
| 169 | |
| 170 | Kind kind() const override { return Kind::kAnd; } |
| 171 |