Here's what I did so far:
1. Integrate the contents of test.groups in output.sas and output. test.groups
doesn't exist any more.
The original PDDL fact name of a variable/value pair (x, y) can be accessed in
the search code as g_fact_names[x][y].
In the scripts, I made test.groups an optional result file of the translator.
2. Integrate the contents of all.groups in output.sas and output.
all.groups doesn't exist any more.
In particular, this means that the mutexes are now handled by the preprocessor,
so that the variable renaming and pruning of irrelevant variables that happen in
the preprocessor is also applied to the mutexes and doesn't have to be
rediscovered in the search code any more. This can reduce the number of mutexes
to consider and heavily simplifies the mutex code in the search.
The mutexes now also contribute to the reported encoding size of the translator
and preprocessor output.
In the scripts, I made all.groups an optional result file of the translator.
3. Move the mutex-related code out of the landmark graph code and into the main
code.
This was necessary because the mutex information is now part of the regular
input file, so the old approach of reading it on demand from all.groups when
needed for the landmark code wouldn't work any more.
The mutex information can be queried via a global function
bool are_mutex(const pair<int, int> &, const pair<int, int> &).
This also works for facts that refer to the same variable, in which case the
correct thing happens (a fact is mutex with all other facts of the same variable
but not with itself).
4. Clean up how the mutexes and predicate names are used in the landmark code.
The relevant code is now much, much saner.
5. Prune redundant mutex groups.
Mutex groups that only consist of a single element or in which all elements talk
about the same variable are pruned by the preprocessor (and in some cases not
generated by the translator to start with).
6. Add file format version information to output.sas and output.
There'a begin_version/end_version block near the start. The current format is
"version 3", with the idea that the original Fast Downward format (the format
that corresponded to "g_legacy_file_format = true" in the search code) is
version 1 and the LAMA format (i.e. the file format prior to this issue, which
added action costs and the begin_metric/end_metric block) is version 2.
Preprocessor and search code error out when faced with a version number
different from what they expect. (So the legacy file format and the current file
format are no longer supported after this issue is merged.)
7. Get rid of the "solvable_in_poly_time" flag in output that we haven't used
any more for a long time.
8. Fixed translate-relaxed.py.
This might work again now, but its functionality should probably be implemented
in a different way since it's a big hack, largely untested, and duplicates a lot
of code of translate.py. This should better be controlled by an option that is
handled at parse time or normalization time.
9. Made translator output more consistent.
The usual translator info (encoding size, number of variables etc.) should now
also be reported on tasks that the translator detects as unsolvable (in which
case we get the info for the trivially unsolvable task that is generated).
I'm testing this now against the first iteration of the LAMA-2011 iterated
search. If there are no significant problems/changes there, there shouldn't be
significant problems/changes anywhere, as the only part of the search code that
is significantly affected by the changes is the RHW landmark generation.
|