diff --git a/src/anthem/output/ClingoOutput.cpp b/src/anthem/output/ClingoOutput.cpp index b4bc7be..c9990ee 100644 --- a/src/anthem/output/ClingoOutput.cpp +++ b/src/anthem/output/ClingoOutput.cpp @@ -49,7 +49,7 @@ ColorStream &operator<<(ColorStream &stream, const Clingo::Symbol &symbol) case Clingo::SymbolType::Infimum: return (stream << Keyword("#inf")); case Clingo::SymbolType::Supremum: - return (stream << Keyword("sup")); + return (stream << Keyword("#sup")); case Clingo::SymbolType::Number: return (stream << Number(symbol.number())); case Clingo::SymbolType::String: diff --git a/tests/TestTranslation.cpp b/tests/TestTranslation.cpp index 67be5d9..e80d23d 100644 --- a/tests/TestTranslation.cpp +++ b/tests/TestTranslation.cpp @@ -88,4 +88,12 @@ TEST_CASE("[translation] Rules are translated correctly", "[translation]") REQUIRE(output.str() == "exists X1 (X1 in 42 and p(X1)) -> #false\n"); } + + SECTION("inf/sup") + { + input << "p(X, #inf) :- q(X, #sup)."; + anthem::translate("input", input, context); + + REQUIRE(output.str() == "V1 in X and V2 in #inf and exists X1, X2 (X1 in X and X2 in #sup and q(X1, X2)) -> p(V1, V2)\n"); + } }