diff --git a/src/plasp/pddl/Domain.cpp b/src/plasp/pddl/Domain.cpp index fda1ad3..5103f79 100644 --- a/src/plasp/pddl/Domain.cpp +++ b/src/plasp/pddl/Domain.cpp @@ -167,8 +167,9 @@ void Domain::parseRequirementSection() m_context.parser.skipWhiteSpace(); } + // If no requirements are specified, assume STRIPS if (m_requirements.empty()) - throw utils::ParserException(m_context.parser, "Requirements section does not contain any requirements"); + m_requirements.emplace_back(Requirement::Type::STRIPS); m_context.parser.expect(")"); } @@ -199,10 +200,6 @@ void Domain::computeDerivedRequirements() m_requirements.push_back(Requirement(requirement)); }; - // If no requirements are specified, assume STRIPS - if (m_requirements.empty()) - addRequirementUnique(Requirement::Type::STRIPS); - if (hasRequirement(Requirement::Type::ADL)) { addRequirementUnique(Requirement::Type::STRIPS);