Fixed meta encoding for sequential, incremental planning.

This commit is contained in:
2016-05-23 00:24:48 +02:00
parent 5b42b09e5d
commit 5db8af9ffc
4 changed files with 14 additions and 20 deletions

View File

@@ -181,11 +181,11 @@ void TranslatorASP::translate(std::ostream &ostream) const
const auto &value1 = *i;
const auto &value2 = *j;
ostream << ":- ";
value1.printAsASPHoldsPredicate(ostream);
ostream << "mutex(";
value1.printAsASPPredicateBody(ostream);
ostream << ", ";
value2.printAsASPHoldsPredicate(ostream);
ostream << "." << std::endl;
value2.printAsASPPredicateBody(ostream);
ostream << ")." << std::endl;
}
});
@@ -205,11 +205,11 @@ void TranslatorASP::translate(std::ostream &ostream) const
const auto &value1 = i->value();
const auto &value2 = j->value();
ostream << ":- ";
value1.printAsASPHoldsPredicate(ostream);
ostream << "mutex(";
value1.printAsASPPredicateBody(ostream);
ostream << ", ";
value2.printAsASPHoldsPredicate(ostream);
ostream << "." << std::endl;
value2.printAsASPPredicateBody(ostream);
ostream << ")." << std::endl;
}
});
}

View File

@@ -120,16 +120,6 @@ void Value::printAsASPPredicateBody(std::ostream &ostream) const
////////////////////////////////////////////////////////////////////////////////////////////////////
void Value::printAsASPHoldsPredicate(std::ostream &ostream) const
{
if (m_sign == Value::Sign::Negative)
ostream << "not ";
ostream << "holds(" << utils::escapeASP(m_name) << ", t)";
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void Value::printAsSAS(std::ostream &ostream) const
{
if (m_sign == Value::Sign::Positive)