-
Notifications
You must be signed in to change notification settings - Fork 116
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
Fix missing metadata
when operation and resulting BasicSymbolic
subtype mismatch
#632
Conversation
Benchmark Results
Benchmark PlotsA plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. |
6d89149
to
cfbfc4f
Compare
cfbfc4f
to
d8327c0
Compare
Thank you @bowenszhu!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is the correct fix. Thanks!
@bowenszhu could you merge and release this fix when you feel comfortable? |
This PR addresses an issue in the
basicsymbolic
function where it incorrectly assumes that the+
and*
operations always result inAdd
andMul
objects, respectively.SymbolicUtils.jl/src/types.jl
Lines 589 to 600 in 2ec473e
Currently, when arguments possess metadata, the operations might return a
Term
object instead, as seen inSymbolicUtils.jl/src/types.jl
Lines 1082 to 1083 in 2ec473e
SymbolicUtils.jl/src/types.jl
Lines 1136 to 1138 in 2ec473e
This inconsistency was causing problems in Vaibhavdixit02/SymbolicAnalysis.jl#43 (comment)
This PR corrects this problem by explicitly handling the
Term
case. This ensures themaketerm
function behaves consistently and correctly handles arguments with metadata.