| 753 | return result.str(); |
| 754 | } |
| 755 | static std::vector<std::string> get_constraint_names(AST::Array *const ann) { |
| 756 | std::vector<std::string> result; |
| 757 | if (ann) { |
| 758 | for (const auto & i : ann->a) { |
| 759 | if (i->isArray()) { |
| 760 | auto nested_result = get_constraint_names(i->getArray()); |
| 761 | result.insert(result.end(), nested_result.begin(), nested_result.end()); |
| 762 | } else if (i->isCall("mzn_constraint_name")) { |
| 763 | result.emplace_back(i->getCall()->args->getString()); |
| 764 | } |
| 765 | } |
| 766 | } |
| 767 | return result; |
| 768 | } |
| 769 | }; |
| 770 | |
| 771 | /** |