The pull request linked in the summary handles the changes discussed below. We did not remove the state/operator conversion methods in TaskProxy because task transformations are used internally in CEGAR. This is fine and unrelated to this issue, as this transformation only happens while the abstraction is built. The CEGAR classes that take a transformed task cannot deal with arbitrary transformations but since there is no way of calling the code with transformations other than those explicitly used this is not a problem.
The old code also used to wrap some tasks in transformations that add axioms in a way that deals with negative values. This transformation is now done in an explicit wrapping evaluator similar to the cost-modifying evaluator. The main difference is that the axiom evaluator cannot be used from the commandline and is wrapped around the relevant heuristics on demand (i.e., they cannot be used on the command-line without getting wrapped). The point of this is that the delete-relaxation heuristics would be incorrect when used with an unwrapped task with axioms and that the task transformation does not end up with a valid task (axioms are no longer stratifiable), so it cannot be used in arbitrary circumstances.
Both the cost-modifying evaluator and the axiom-handling evaluator now use a common class of a task-transforming evaluator that just "forwards" its state. Evaluators receive states from their own task, so if they use nested evaluators for a different task, they would have to give them a registered state from the transformed task. However, we don't want to register and store states twice when using task transformations that do not affect the states. The new forwarding evaluator uses a registry that registers a state from a different registry by giving it the same ID it has in the other registry, without actually storing it. Lookup etc. is delegated to the other registry. Using this, the new state-forwarding evaluator can give its nested evaluator a state from its own task without duplicating the state. There are rough edges regarding const-correctness which we intent to fix in issue1227.
One final change we had to do was to support the heuristic caching, boosting, etc. through transformations. To that end, we introduced a new class EvaluatorCall that represents a single call to an evaluator, where EvaluatorContext represents this call and all its sub-calls. In particular, the state stored in an EvaluatorContext represents the state for which the root node of the call "tree" is evaluated, while an EvaluatorCall can contain a different state (a transformation of the state in the context). The EvaluatorCall has a reference to the EvaluatorContext, and accesses it for statistics, caching, and properties about the call.
Previously, each heuristic converted the incoming state before evaluating it. This had the side effect of unpacking the state. As this conversion is now no longer done, we unpack the state in the heuristic base class to get the same behaviour as before. Figuring out better settings for each heuristic is issue1236.
|