From 47952844138e7b870f38fce309a9e1da991bcf35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Thu, 24 Nov 2016 13:43:32 +0100 Subject: [PATCH] Removed unintended commented-out code. --- src/anthem/output/ClingoOutput.cpp | 210 ----------------------------- 1 file changed, 210 deletions(-) diff --git a/src/anthem/output/ClingoOutput.cpp b/src/anthem/output/ClingoOutput.cpp index dd6cf39..b4bc7be 100644 --- a/src/anthem/output/ClingoOutput.cpp +++ b/src/anthem/output/ClingoOutput.cpp @@ -251,215 +251,5 @@ ColorStream &operator<<(ColorStream &stream, const Clingo::AST::Term &term) //////////////////////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////////////////////////// - - -/* -inline std::ostream &operator<<(std::ostream &out, Disjunction const &x) { - out << Detail::print(x.elements, "", "; ", "", false); - return out; -} - -inline std::ostream &operator<<(std::ostream &out, HeadAggregate const &x) { - if (x.left_guard) { out << x.left_guard->term << " " << x.left_guard->comparison << " "; } - out << x.function << " { " << Detail::print(x.elements, "", "; ", "", false) << " }"; - if (x.right_guard) { out << " " << x.right_guard->comparison << " " << x.right_guard->term; } - return out; -} - -inline std::ostream &operator<<(std::ostream &out, HeadAggregateElement const &x) { - out << Detail::print(x.tuple, "", ",", "", false) << " : " << x.condition; - return out; -} - -inline std::ostream &operator<<(std::ostream &out, BodyAggregate const &x) { - if (x.left_guard) { out << x.left_guard->term << " " << x.left_guard->comparison << " "; } - out << x.function << " { " << Detail::print(x.elements, "", "; ", "", false) << " }"; - if (x.right_guard) { out << " " << x.right_guard->comparison << " " << x.right_guard->term; } - return out; -} - -inline std::ostream &operator<<(std::ostream &out, BodyAggregateElement const &x) { - out << Detail::print(x.tuple, "", ",", "", false) << " : " << Detail::print(x.condition, "", ", ", "", false); - return out; -} - -inline std::ostream &operator<<(std::ostream &out, Aggregate const &x) { - if (x.left_guard) { out << x.left_guard->term << " " << x.left_guard->comparison << " "; } - out << "{ " << Detail::print(x.elements, "", "; ", "", false) << " }"; - if (x.right_guard) { out << " " << x.right_guard->comparison << " " << x.right_guard->term; } - return out; -} - -inline std::ostream &operator<<(std::ostream &out, ConditionalLiteral const &x) { - out << x.literal << Detail::print(x.condition, " : ", ", ", "", true); - return out; -} - -inline std::ostream &operator<<(std::ostream &out, Literal const &x) { - out << x.sign << x.data; - return out; -} - -inline std::ostream &operator<<(std::ostream &out, Boolean const &x) { - out << (x.value ? "#true" : "#false"); - return out; -} - -inline std::ostream &operator<<(std::ostream &out, Comparison const &x) { - out << x.left << x.comparison << x.right; - return out; -} - -inline std::ostream &operator<<(std::ostream &out, Id const &x) { - out << x.id; - return out; -} - -inline std::ostream &operator<<(std::ostream &out, CSPLiteral const &x) { - out << x.term; - for (auto &y : x.guards) { out << y; } - return out; -} - -inline std::ostream &operator<<(std::ostream &out, CSPGuard const &x) { - out << "$" << x.comparison << x.term; - return out; -} - -inline std::ostream &operator<<(std::ostream &out, CSPSum const &x) { - if (x.terms.empty()) { out << "0"; } - else { out << Detail::print(x.terms, "", "$+", "", false); } - return out; -} - -inline std::ostream &operator<<(std::ostream &out, CSPProduct const &x) { - if (x.variable) { out << x.coefficient << "$*$" << *x.variable.get(); } - else { out << x.coefficient; } - return out; -} - -inline std::ostream &operator<<(std::ostream &out, Pool const &x) { - // NOTE: there is no representation for an empty pool - if (x.arguments.empty()) { out << "(1/0)"; } - else { out << Detail::print(x.arguments, "(", ";", ")", true); } - return out; -} - -inline std::ostream &operator<<(std::ostream &out, Function const &x) { - bool tc = x.name[0] == '\0' && x.arguments.size() == 1; - bool ey = x.name[0] == '\0' || !x.arguments.empty(); - out << (x.external ? "@" : "") << x.name << Detail::print(x.arguments, "(", ",", tc ? ",)" : ")", ey); - return out; -} - -inline std::ostream &operator<<(std::ostream &out, Interval const &x) { - out << "(" << x.left << ".." << x.right << ")"; - return out; -} - -inline std::ostream &operator<<(std::ostream &out, BinaryOperation const &x) { - out << "(" << x.left << x.binary_operator << x.right << ")"; - return out; -} - -inline std::ostream &operator<<(std::ostream &out, UnaryOperation const &x) { - out << left_hand_side(x.unary_operator) << x.argument << right_hand_side(x.unary_operator); - return out; -} - -inline std::ostream &operator<<(std::ostream &out, Variable const &x) { - out << x.name; - return out; -} - -inline std::ostream &operator<<(std::ostream &out, Term const &x) { - out << x.data; - return out; -} - -inline std::ostream &operator<<(std::ostream &out, Rule const &x) { - out << x.head << Detail::print_body(x.body, " :- "); - return out; -} - -inline std::ostream &operator<<(std::ostream &out, Definition const &x) { - out << "#const " << x.name << " = " << x.value << "."; - if (x.is_default) { out << " [default]"; } - return out; -} - -inline std::ostream &operator<<(std::ostream &out, ShowSignature const &x) { - out << "#show " << (x.csp ? "$" : "") << x.signature << "."; - return out; -} - -inline std::ostream &operator<<(std::ostream &out, ShowTerm const &x) { - out << "#show " << (x.csp ? "$" : "") << x.term << Detail::print_body(x.body); - return out; -} - -inline std::ostream &operator<<(std::ostream &out, Minimize const &x) { - out << Detail::print_body(x.body, ":~ ") << " [" << x.weight << "@" << x.priority << Detail::print(x.tuple, ",", ",", "", false) << "]"; - return out; -} - -inline std::ostream &operator<<(std::ostream &out, Script const &x) { - std::string s = x.code; - if (!s.empty() && s.back() == '\n') { - s.back() = '.'; - } - out << s; - return out; -} - -inline std::ostream &operator<<(std::ostream &out, Program const &x) { - out << "#program " << x.name << Detail::print(x.parameters, "(", ",", ")", false) << "."; - return out; -} - -inline std::ostream &operator<<(std::ostream &out, External const &x) { - out << "#external " << x.atom << Detail::print_body(x.body); - return out; -} - -inline std::ostream &operator<<(std::ostream &out, Edge const &x) { - out << "#edge (" << x.u << "," << x.v << ")" << Detail::print_body(x.body); - return out; -} - -inline std::ostream &operator<<(std::ostream &out, Heuristic const &x) { - out << "#heuristic " << x.atom << Detail::print_body(x.body) << " [" << x.bias<< "@" << x.priority << "," << x.modifier << "]"; - return out; -} - -inline std::ostream &operator<<(std::ostream &out, ProjectAtom const &x) { - out << "#project " << x.atom << Detail::print_body(x.body); - return out; -} - -inline std::ostream &operator<<(std::ostream &out, ProjectSignature const &x) { - out << "#project " << x.signature << "."; - return out; -} - -inline std::ostream &operator<<(std::ostream &out, Statement const &x) { - out << x.data; - return out; -} -*/ - -//////////////////////////////////////////////////////////////////////////////////////////////////// - } }