Skip to content

Make parameter propagation in SingularTransformer final #4642

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

Merged

Conversation

henrikt-ma
Copy link
Contributor

@henrikt-ma henrikt-ma commented May 13, 2025

When refining the logic for parameter evaluation in System Modeler, we encountered the need to see that these parameter propagations are final.

Without it, there is a differential equation with parametric coefficients that causes incomplete index reduction since the coefficients are zero for the given parameter values.

The change is similar to #4407, where the conversation shows that making parameter propagation final isn't a controversial change.

@henrikt-ma henrikt-ma added the L: Electrical.Analog Issue addresses Modelica.Electrical.Analog label May 13, 2025
@henrikt-ma henrikt-ma requested a review from AHaumer May 13, 2025 09:40
@henrikt-ma
Copy link
Contributor Author

@AHaumer, could you please add a suitable second reviewer?

@HansOlsson
Copy link
Contributor

The final-change is good in itself.

But I don't see how there would be a index reduction failure without the change, as that would imply that non-literal parameter bindings are assumed to be modifiable after translation - which seems kind of odd to me.

Copy link
Contributor

@AHaumer AHaumer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the test case is constructed that way that L1=L2=M=L adding final to the parameter propagation makes sense and does no harm. Anyway, this examples is part of ModelicaTest, not MSL.
@henrikt-ma you have to invite at least a second reviewer, could be @HansOlsson @casella @christiankral @dietmarw .

Copy link
Contributor

@HansOlsson HansOlsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Makes sense, even if I don't see the need for it.

@AHaumer AHaumer merged commit a1d503b into modelica:master May 14, 2025
11 checks passed
@beutlich beutlich added this to the MSL4.2.0 milestone May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: Electrical.Analog Issue addresses Modelica.Electrical.Analog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants