Added check that typing requirement is not added by PDDL problem.
This commit is contained in:
@@ -140,6 +140,12 @@ void Description::checkConsistency()
|
||||
if (!m_domain->isDeclared())
|
||||
throw ConsistencyException("No PDDL domain specified");
|
||||
|
||||
if (m_problem->hasRequirement(Requirement::Type::Typing)
|
||||
&& !m_domain->hasRequirement(Requirement::Type::Typing))
|
||||
{
|
||||
throw ConsistencyException("PDDL problems may not add the \"typing\" requirement");
|
||||
}
|
||||
|
||||
m_domain->checkConsistency();
|
||||
m_problem->checkConsistency();
|
||||
}
|
||||
|
@@ -344,6 +344,8 @@ void Domain::parseActionSection()
|
||||
|
||||
void Domain::checkConsistency()
|
||||
{
|
||||
// TODO: implement requirement declaration checking
|
||||
|
||||
// Verify that typing requirement is correctly declared if used
|
||||
if (!m_primitiveTypes.empty() && !hasRequirement(Requirement::Type::Typing))
|
||||
{
|
||||
|
Reference in New Issue
Block a user