JuliaSymbolics / SymbolicUtils.jl

Symbolic expressions, rewriting and simplification
https://docs.sciml.ai/SymbolicUtils/stable/
Other
524 stars 99 forks source link

DRAFT: Update Metatheory to 2.0 and TermInterface to 0.3.3 #486

Closed 0x0f0f0f closed 1 year ago

0x0f0f0f commented 1 year ago

CI Will break.

Metatheory 2.0 is not yet merged and registered: Track its status: https://github.com/JuliaSymbolics/Metatheory.jl/pull/144

0x0f0f0f commented 1 year ago

@shashi TermInterface v0.3.3 's similarterm is breaking SymbolicUtils.substitute in this test, because metadata is not set and it's falling back to head(args...) ignoring the metadata kwarg.

I'm pushing to a SymbolicUtils branch called ale/mt2. CI will break, it has to be developed locally with Metatheory.jl on this branch 2.0.0-DEV and (SymbolicUtils) pkg> dev ../local/path/of/Metatheory.jl

    struct Ctx1 end
    @syms f(t) t
    f = setmetadata(f(t), Ctx1, "yes")
    hasmetadata(f, Ctx1) # true
    newf = substitute(f, Dict(a=>b)) # unrelated substitution
    @test hasmetadata(newf, Ctx1)
    @test getmetadata(newf, Ctx1) == "yes"