From d9e5b5826b6400c23ac880d2e51bec38ded4a9f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Sun, 22 May 2016 16:03:37 +0200 Subject: [PATCH] Added exception for currently unsupported action costs. --- src/plasp/sas/TranslatorASP.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plasp/sas/TranslatorASP.cpp b/src/plasp/sas/TranslatorASP.cpp index a2f7272..ec17ca4 100644 --- a/src/plasp/sas/TranslatorASP.cpp +++ b/src/plasp/sas/TranslatorASP.cpp @@ -22,6 +22,9 @@ TranslatorASP::TranslatorASP(const Description &description) void TranslatorASP::checkSupport() const { + if (m_description.usesActionCosts()) + throw TranslatorException("Action costs are currently unsupported"); + const auto &variables = m_description.variables(); std::for_each(variables.cbegin(), variables.cend(), @@ -44,6 +47,9 @@ void TranslatorASP::checkSupport() const if (!effect.conditions().empty()) throw TranslatorException("Conditional effects are currently unsupported"); }); + + if (operator_.costs() != 1) + throw TranslatorException("Action costs are currently unsupported"); }); if (!m_description.axiomRules().empty())