Fix PDESystem analytic generation with defaulted parameters - #5033
Draft
ChrisRackauckas-Claude wants to merge 3 commits into
Draft
Fix PDESystem analytic generation with defaulted parameters#5033ChrisRackauckas-Claude wants to merge 3 commits into
ChrisRackauckas-Claude wants to merge 3 commits into
Conversation
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://chatgpt.com/codex/tasks/01a03a17-ad6f-7131-82fc-d0fd57ea6512
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://chatgpt.com/codex/tasks/01a03a17-ad6f-7131-82fc-d0fd57ea6512
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://chatgpt.com/codex/tasks/01a03a17-ad6f-7131-82fc-d0fd57ea6512
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Ignore this PR until it has been reviewed by @ChrisRackauckas.
This is stacked on #5031 and should be reviewed only after that prerequisite. Until the prerequisite merges, this PR includes its compatibility commit in the comparison.
What changed
PDESystemaccepts parameter defaults as pairs such ash => 1, but analytic-function generation passed those pairs directly toDestructuredArgs. The generated function consequently attempted to use aPairas an assignment target and failed withsyntax: invalid assignment location Pair(...).This change unwraps only
Pairentries while building the analytic function's parameter arguments and adds a regression test beside the existing bare-parameter test. It deliberately does not change the system's stored parameter/default representation.Regression evidence
The same focused test failed before the source fix:
The generated
Pairpayload in the syntax-error line is shortened above; the exception type, source location, expression, andsecond=1value are verbatim from the run.With the fix applied, the exact same command exited 0:
The regression boundary is the adjacent history pair
f04331935f96737b7160874a8cc281f0feead01c(passes) andb54d08729b600479f1ab467f9b1081fbf61da64e(fails). The latter commit fixed bare-symbol parameters but replaced the earlier pair extraction instead of supporting both representations.Verification
Full relevant group:
The Julia 1.11 QA group passed with the two independently identified clean-master prerequisites applied temporarily: fork commit
26a70733803c43dc137b531f429c867a83f54154andSymbolicUtils = "=4.45.0". Neither temporary prerequisite is included in this branch.Formatting and spelling:
All three exited 0 with no output.
Scope and current blockers
The normalization is intentionally local to analytic-function code generation. A mixed pair/bare collection generates and evaluates its analytic function, but broader
PDESystemparameter/default normalization remains outside this PR.A fresh unmodified resolution currently selects SymbolicUtils 4.46.0 and exposes a fixed-but-unreleased Symbolics 7.36.0
ImmutableDictbug. Separately, clean-master ModelingToolkitBase ExplicitImports QA failures are tracked in #5032. Docs were not built because this changes neither documentation nor public API. GPU and downstream groups were not run.Links
🤖 Generated with Claude Code
https://chatgpt.com/codex/tasks/01a03a17-ad6f-7131-82fc-d0fd57ea6512