Implemented translation of derived predicates in action preconditions.

This commit is contained in:
Patrick Lühne 2016-12-08 01:28:00 +01:00
parent 586f53a788
commit 31182b6de9
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF

View File

@ -56,15 +56,13 @@ inline void translateLiteral(output::ColorStream &outputStream, const Expression
} }
else if (literal.is<expressions::DerivedPredicate>()) else if (literal.is<expressions::DerivedPredicate>())
{ {
//const auto &derivedPredicate = literal.as<expressions::DerivedPredicate>(); const auto &derivedPredicate = literal.as<expressions::DerivedPredicate>();
/*m_outputStream << output::Keyword("variable") << "("; outputStream << output::Keyword("derivedVariable") << "(";
translation::translatePredicate(predicate); translation::translateDerivedPredicate(outputStream, derivedPredicate);
m_outputStream << "), " << output::Keyword("value") << "("; outputStream << "), " << output::Keyword("value") << "(";
translation::translatePredicate(predicate); translation::translateDerivedPredicate(outputStream, derivedPredicate);
m_outputStream << ", " << output::Boolean("true") << ")";*/ outputStream << ", " << output::Boolean("true") << ")";
outputStream << "(derived predicate)";
} }
else else
throw output::TranslatorException("only primitive predicates and their negations supported as literals currently"); throw output::TranslatorException("only primitive predicates and their negations supported as literals currently");