Remove `unsorted_arguments` from Walks in Rewriters
0x0f0f0f opened this issue · comments
Metatheory.jl/src/Rewriters.jl
Line 198 in 918e1cd
This was something that could have made sense strictly in SymbolicUtils.jl where terms are optimized during construction, in a general purpose setting this may make things slower but won't mess up terms.
An example of why this is an issue. In SymbolicUtils.jl @ syms a b ; b + a
is always automatically reduced to a + b
because of the constructor of Add
. In other term types, if unsorted_arguments
really provides an unsorted representation, it is dangerous to use it in Walk
, because the constructor may just store arguments in their order. This has happened to me with Term
. cc @shashi
The speedup here is good enough that we need to allow it, preferably by default. I don't yet believe it is dangerous in walk -- walk means to visit every node.