From 94b204615b9b9e54c2a34ad9f5471700f61a1242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Sat, 13 Aug 2016 02:32:27 +0200 Subject: [PATCH] Wrapped translated PDDL type definitions for usability in meta encodings. --- src/plasp/pddl/TranslatorASP.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/plasp/pddl/TranslatorASP.cpp b/src/plasp/pddl/TranslatorASP.cpp index 85f3689..74010f0 100644 --- a/src/plasp/pddl/TranslatorASP.cpp +++ b/src/plasp/pddl/TranslatorASP.cpp @@ -85,7 +85,10 @@ void TranslatorASP::translateTypes() const if (types.empty()) { - m_outputStream << utils::Keyword("type") << "(object)." << std::endl; + m_outputStream + << utils::Keyword("type") << "(" + << utils::Keyword("type") << "(object))." << std::endl; + return; } @@ -94,7 +97,10 @@ void TranslatorASP::translateTypes() const { const auto typeName = utils::escapeASP(type->name()); - m_outputStream << utils::Keyword("type") << "(" << typeName << ")." << std::endl; + m_outputStream + << utils::Keyword("type") << "(" + << utils::Keyword("type") << "(" + << typeName << "))." << std::endl; const auto &parentTypes = type->parentTypes();