This replaces all user-defined variable names with continuously numbered
ones so that they don’t lead to syntax problems in ASP, while still
unique and distinguishable. For instance, this avoids problems when
variable names contain hyphens, which are allowed in PDDL identifiers
but not in ASP variables.
Previously, variables referenced within values were unpacked within
values. This was inconsistent, because all predicates are usually used
in their unpacked form in the rest of the output format. This commit
makes this consistent by using variables in their packed form within
values, making it more compact to handle them.
Due to a mistake in commit 6d07fcb, the closing parenthesis and period
at the end of initial state facts was omitted. This adds these back in
order to solve this syntax error.
As Boost isn’t used in the rest of this project anymore, this commit
removes the unnecessary dependency to boost::bimap just for language
detection, and replaces it with a simple std::map instead.
Even though the parser shouldn’t be able to put variables into the goal
description, the AST theoretically allows for this case. This commit
adds a defensive check that goal descriptions are variable-free.
By accident, the support for derived predicates in goals was missing.
This commit adds this, in a very similar way to how normal predicates
are handled in the goal description.
While derived predicates stemming from the domain were already
translated, the ones from the problem were missing. This commit fixes
that, although it duplicates the definition of “contains.”