I don't think that we necessarily should use OperatorID instead of int, since I
personally associate OperatorID with the task interface classes (AbstractTask or
TaskProxy). Here, however, we have a custom class AbstractOperator and could use
any identifier to these operators. Actually, with the intended change of this
issue, MatchTree will not know anything about AbstractOperator at all, but only
on "regression preconditions", so I'm fine with it using plain ints as IDs.
Regarding the dump method, I don't think dumping the operators separately and
having to manually map the operator IDs from the MatchTreep dump to separate
output of operators makes debugging easier. I see how the tree output gets more
compact, but that's it. Anyway, I don't think breaking/changing this method is a
good reason not to do the suggested changes, because I see the dump method
rather as a service for developer than a core part.
|