Closed 0x0f0f0f closed 1 year ago
I have an update for SymbolicUtils.
@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"
Merging #144 (635d72a) into master (305a9d2) will decrease coverage by
4.31%
. The diff coverage is74.33%
.
@@ Coverage Diff @@
## master #144 +/- ##
==========================================
- Coverage 76.64% 72.32% -4.32%
==========================================
Files 15 15
Lines 1400 1337 -63
==========================================
- Hits 1073 967 -106
- Misses 327 370 +43
Impacted Files | Coverage Δ | |
---|---|---|
src/EGraphs/EGraphs.jl | 100.00% <ø> (ø) |
|
src/EGraphs/Schedulers.jl | 31.64% <30.00%> (-8.36%) |
:arrow_down: |
src/utils.jl | 37.50% <32.94%> (+0.65%) |
:arrow_up: |
src/Rewriters.jl | 33.00% <35.29%> (+0.68%) |
:arrow_up: |
src/Patterns.jl | 65.85% <56.00%> (-7.07%) |
:arrow_down: |
src/matchers.jl | 73.25% <73.33%> (+0.63%) |
:arrow_up: |
src/EGraphs/analysis.jl | 74.50% <74.25%> (-9.64%) |
:arrow_down: |
src/Rules.jl | 72.41% <75.00%> (-1.20%) |
:arrow_down: |
src/EGraphs/intdisjointmap.jl | 75.00% <78.04%> (+1.19%) |
:arrow_up: |
src/Syntax.jl | 81.69% <82.40%> (-0.92%) |
:arrow_down: |
... and 15 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Pushing an update where default operations in patterns are function objects (old-school before-MT SymbolicUtils style)
Huge thanks to @Wilkenfeld that helped me in achieving the goals for this release
few important notes @shashi @ChrisRackauckas :
Classical rewriting interface (@rule ~a + ~a => etc...
) is unchangedsimilarterm(::Type{SomeExpr}, ...)
was removed, now`E-Graph rewriting interface requires an additional function to be defined when working with user types:Symbolics needs to be updated for this.