Wrapped translated SAS variable definitions for usability in meta encodings.

This commit is contained in:
Patrick Lühne 2016-08-13 01:36:08 +02:00
parent d0864b9efe
commit 8a82f52100
2 changed files with 3 additions and 2 deletions

View File

@ -107,9 +107,9 @@ void TranslatorASP::translateVariables() const
BOOST_ASSERT(!values.empty());
m_outputStream << std::endl;
m_outputStream << std::endl << utils::Keyword("variable") << "(";
variable.printNameAsASPPredicate(m_outputStream);
m_outputStream << "." << std::endl;
m_outputStream << ")." << std::endl;
std::for_each(values.cbegin(), values.cend(),
[&](const auto &value)

View File

@ -29,6 +29,7 @@ Variable Variable::fromSAS(utils::Parser<> &parser)
Variable variable;
parser.expect<std::string>("begin_variable");
parser.expect<std::string>("var");
variable.m_name = parser.parse<std::string>();
variable.m_axiomLayer = parser.parse<int>();