Skip to content
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

Clarify impure in systems of equations. #3571

Merged
merged 11 commits into from
Jan 17, 2025

Conversation

HansOlsson
Copy link
Collaborator

No description provided.

@HansOlsson HansOlsson mentioned this pull request Sep 12, 2024
chapters/functions.tex Outdated Show resolved Hide resolved
chapters/functions.tex Outdated Show resolved Hide resolved
chapters/functions.tex Outdated Show resolved Hide resolved
chapters/functions.tex Outdated Show resolved Hide resolved
Copy link
Collaborator

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

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

The main issue which I still find unresolved is that we both have

  1. It is an error if an impure function call is part of a systems of equations (including linear systems), even if called in agreement with the restrictions above.

and

  1. …if the function call of an impure function is part of an algebraic loop. … This can occur…

Could we avoid this contradiction by a more careful formulation of 1, something like this:

Inside systems of equations (including linear systems), an impure function call is only allowed in the deprecated case of an external function neither marked pure or impure, or when pure(…) is used to bypass purity checking. The system of equations shall then be solved as if all occurring functions were pure, but the side-effect semantics of the impure function calls are undefined. Specifically, the number of times an impure function is called when solving the equations is undefined.

HansOlsson and others added 3 commits October 15, 2024 11:16
Co-authored-by: Henrik Tidefelt <henrikt@wolfram.com>
@HansOlsson HansOlsson requested a review from henrikt-ma October 15, 2024 14:57
@HansOlsson
Copy link
Collaborator Author

@henrikt-ma this should now handle the comments.

@HansOlsson
Copy link
Collaborator Author

@henrikt-ma is it ok now?

@HansOlsson HansOlsson added this to the 2024-November milestone Nov 6, 2024
chapters/functions.tex Outdated Show resolved Hide resolved
chapters/functions.tex Outdated Show resolved Hide resolved
chapters/functions.tex Outdated Show resolved Hide resolved
Copy link
Collaborator

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

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

Just some wording and formatting remaining.

Co-authored-by: Henrik Tidefelt <henrikt@wolfram.com>
@HansOlsson
Copy link
Collaborator Author

Just some wording and formatting remaining.

I think that has now been handled.

chapters/functions.tex Outdated Show resolved Hide resolved
chapters/functions.tex Outdated Show resolved Hide resolved
Copy link
Collaborator

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

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

Can't see anything that should prevent merging.

Co-authored-by: Henrik Tidefelt <henrikt@wolfram.com>
chapters/functions.tex Outdated Show resolved Hide resolved
HansOlsson and others added 2 commits January 17, 2025 16:35
Co-authored-by: Henrik Tidefelt <henrikt@wolfram.com>
Co-authored-by: Henrik Tidefelt <henrikt@wolfram.com>
@HansOlsson HansOlsson merged commit ce07d23 into modelica:master Jan 17, 2025
1 check was pending
@HansOlsson HansOlsson deleted the ClarifyImpure branch January 17, 2025 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants