From f2a1528ea947ff265c30b73d563e95e005611114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Sat, 4 Jun 2016 17:28:52 +0200 Subject: [PATCH] Fixed determination of default requirement (STRIPS). --- src/plasp/pddl/Domain.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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);