Implemented printing body of derived predicate definition rules.

This commit is contained in:
Patrick Lühne 2016-12-07 02:58:25 +01:00
parent 2334686c59
commit a8ba375e36
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
2 changed files with 12 additions and 2 deletions

View File

@ -92,7 +92,18 @@ void Action::normalize(expressions::DerivedPredicates &derivedPredicates)
{
// Normalize preconditions and effects
m_precondition = m_precondition->normalized()->decomposed(derivedPredicates);
{
// TODO: refactor
std::set<expressions::VariablePointer> parameters;
m_precondition->collectParameters(parameters);
}
m_effect = m_effect->normalized();
{
// TODO: refactor
std::set<expressions::VariablePointer> parameters;
m_effect->collectParameters(parameters);
}
// Normalize parameter names
for (size_t i = 0; i < m_parameters.size(); i++)

View File

@ -235,8 +235,7 @@ void TranslatorASP::translateDerivedPredicates() const
m_outputStream << "))";
// TODO: implement
//translateVariablesBody(m_outputStream, predicate->arguments());
translateVariablesBody(m_outputStream, predicate->parameters());
m_outputStream << ".";
});