Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

istree on Expr #6

Closed
shashi opened this issue Aug 30, 2021 · 2 comments
Closed

istree on Expr #6

shashi opened this issue Aug 30, 2021 · 2 comments

Comments

@shashi
Copy link
Member

shashi commented Aug 30, 2021

should not be true in my opinion because terms may want to hold Exprs. As we discussed, MT could use _istree(x) = istree(x) || x isa Expr...

cc @0x0f0f0f

@0x0f0f0f
Copy link
Member

0x0f0f0f commented Aug 31, 2021

I think that this issue generalizes to a broader scope. For example, I've encountered a similar problem when fixing a metatheory.jl test case regarding rewriting categorical expressions. I wanted to skip the walk of nodes with a certain specific operation using Rewriters.Postwalk (this can be reduced/converted intuitively to the case of an istree(::T) type), treating those nodes like terminals but only in a certain moment and scope. I still wanted to treat those nodes as trees during other tasks. Maybe a finer degree of control over istree is needed. Wrapping all the MT calls to TermInterface.isexpr seems like a bad hardcoding choice, because if you want to rewrite Symbolics expressions that hold Exprs as non-tree terminals MT would still treat them as trees without any degree of control. Lets chat about potential solutions that are not orthogonal to either packages design. I'm sure there is one that is compatible with both SU being specific on types and MT being as general as possible

cc @ChrisRackauckas and @philzook58 s for any suggestions

@0x0f0f0f
Copy link
Member

0x0f0f0f commented Nov 5, 2021

I would close this since the integration worked out well

@0x0f0f0f 0x0f0f0f closed this as completed Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants