JuliaSymbolics / SymbolicUtils.jl

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

Import `maketerm` in SymbolicUtils.Code to resolve `UndefVarError` #619

Closed bowenszhu closed 1 week ago

bowenszhu commented 1 week ago

This pull request addresses a failing test case encountered in the Symbolics.jl integration test CI https://github.com/JuliaSymbolics/SymbolicUtils.jl/actions/runs/9640298551/job/26624028476?pr=615#step:6:987 in PR https://github.com/JuliaSymbolics/SymbolicUtils.jl/pull/615 due to an undefined maketerm function at https://github.com/JuliaSymbolics/SymbolicUtils.jl/blob/43797eb43b33b8d6b0374eac8cd6f87f94bcf79d/src/code.jl#L766

The CI test was failing with an UndefVarError: maketerm not defined error. This occurred because the maketerm function, although used, was not explicitly imported within the SymbolicUtils.Code module.

This pull request resolves the issue by explicitly importing the maketerm function within the SymbolicUtils.Code module. This ensures that the function is accessible and prevents the UndefVarError from occurring during testing.

github-actions[bot] commented 1 week ago

Benchmark Results

master d1edbd65e17fca... master/d1edbd65e17fca...
overhead/acrule/a+2 0.736 ± 0.017 μs 0.749 ± 0.017 μs 0.983
overhead/acrule/a+2+b 0.711 ± 0.016 μs 0.72 ± 0.017 μs 0.987
overhead/acrule/a+b 0.249 ± 0.0059 μs 0.268 ± 0.0061 μs 0.928
overhead/acrule/noop:Int 25.9 ± 0.92 ns 26.2 ± 0.05 ns 0.988
overhead/acrule/noop:Sym 0.0374 ± 0.0056 μs 0.0365 ± 0.0058 μs 1.02
overhead/rule/noop:Int 0.0451 ± 0.00073 μs 0.0446 ± 0.001 μs 1.01
overhead/rule/noop:Sym 0.0559 ± 0.002 μs 0.0559 ± 0.0023 μs 1
overhead/rule/noop:Term 0.0555 ± 0.0028 μs 0.056 ± 0.0023 μs 0.991
overhead/ruleset/noop:Int 0.132 ± 0.0035 μs 0.136 ± 0.0027 μs 0.971
overhead/ruleset/noop:Sym 0.164 ± 0.0061 μs 0.147 ± 0.0048 μs 1.12
overhead/ruleset/noop:Term 3.95 ± 0.17 μs 3.87 ± 0.14 μs 1.02
overhead/simplify/noop:Int 0.148 ± 0.003 μs 0.143 ± 0.0016 μs 1.04
overhead/simplify/noop:Sym 0.154 ± 0.0072 μs 0.158 ± 0.0041 μs 0.979
overhead/simplify/noop:Term 0.0401 ± 0.0023 ms 0.0396 ± 0.0023 ms 1.01
overhead/simplify/randterm (+, *):serial 0.123 ± 0.0057 s 0.124 ± 0.0018 s 0.994
overhead/simplify/randterm (+, *):thread 0.0753 ± 0.025 s 0.0773 ± 0.024 s 0.974
overhead/simplify/randterm (/, *):serial 0.233 ± 0.0075 ms 0.23 ± 0.0071 ms 1.01
overhead/simplify/randterm (/, *):thread 0.265 ± 0.009 ms 0.264 ± 0.0082 ms 1.01
overhead/substitute/a 0.0585 ± 0.0016 ms 0.0571 ± 0.0015 ms 1.02
overhead/substitute/a,b 0.0512 ± 0.0015 ms 0.0498 ± 0.0014 ms 1.03
overhead/substitute/a,b,c 16.9 ± 0.76 μs 17 ± 0.88 μs 0.996
polyform/easy_iszero 0.0362 ± 0.0031 ms 0.0347 ± 0.0019 ms 1.05
polyform/isone 2.79 ± 0.01 ns 2.79 ± 0.01 ns 1
polyform/iszero 1.89 ± 0.038 ms 1.86 ± 0.041 ms 1.01
polyform/simplify_fractions 2.64 ± 0.049 ms 2.6 ± 0.05 ms 1.02
time_to_load 4.5 ± 0.0081 s 4.51 ± 0.023 s 0.999

Benchmark Plots

A plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. Go to "Actions"->"Benchmark a pull request"->[the most recent run]->"Artifacts" (at the bottom).