You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say that I have f . (A -> B) ⊗ g as an input expression and with a Postwalk I want to apply this set of rules:
g => g . (B -> C)
A => A . Ob(A)
B => B . Ob(B)
etc...
My goal is to apply all the rewrites only if the input expressions have not been tagged. Tagging means adding an outer expression with operation(ex) = (.) (dot, called a type tag). Therefore, I do not want to match and transverse on left . right expressions.
For example, f in the input expression IS tagged, while g IS NOT.
I do want to tag g and the outer \otimes, but I do not want to tag anything that is inside f . (A -> B).
See Metatheory.jl/test/category/test_cat.jl.
A simple solution would be not treating left . right expressions as trees in this context. But right after this task is done, i need to treat them like trees. Overriding the TermInterface.istree every time seems like an incorrect approach. Is conditional skipping of branches of expr. trees in Rewriters possible?
The text was updated successfully, but these errors were encountered:
Strictly related to
JuliaSymbolics/TermInterface.jl#6
Let's say that I have
f . (A -> B) ⊗ g
as an input expression and with aPostwalk
I want to apply this set of rules:My goal is to apply all the rewrites only if the input expressions have not been tagged. Tagging means adding an outer expression with
operation(ex) = (.)
(dot, called a type tag). Therefore, I do not want to match and transverse onleft . right
expressions.For example,
f
in the input expression IS tagged, whileg
IS NOT.I do want to tag
g
and the outer\otimes
, but I do not want to tag anything that is insidef . (A -> B)
.See
Metatheory.jl/test/category/test_cat.jl
.A simple solution would be not treating
left . right
expressions as trees in this context. But right after this task is done, i need to treat them like trees. Overriding theTermInterface.istree
every time seems like an incorrect approach. Is conditional skipping of branches of expr. trees inRewriters
possible?The text was updated successfully, but these errors were encountered: