Made initial state definition consistent with unified output format.

This commit is contained in:
Patrick Lühne 2016-08-13 03:22:25 +02:00
parent 97d33da686
commit b67168134b

View File

@ -497,7 +497,15 @@ void TranslatorASP::translateInitialState() const
// Translate single predicate // Translate single predicate
if (fact->expressionType() == Expression::Type::Predicate) if (fact->expressionType() == Expression::Type::Predicate)
this->translatePredicate(dynamic_cast<const expressions::Predicate &>(*fact)); {
const auto &predicate = dynamic_cast<const expressions::Predicate &>(*fact);
m_outputStream << utils::Keyword("variable") << "(";
this->translatePredicate(predicate);
m_outputStream << "), " << utils::Keyword("value") << "(";
this->translatePredicate(predicate);
m_outputStream << ", " << utils::Keyword("true") << ")";
}
// Assuming that "not" expression may only contain a predicate // Assuming that "not" expression may only contain a predicate
else if (fact->expressionType() == Expression::Type::Not) else if (fact->expressionType() == Expression::Type::Not)
{ {