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

Make it explicit that tools can show the value of variables for asserts #3641

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

HansOlsson
Copy link
Collaborator

See:
modelica/ModelicaStandardLibrary#4519 and modelica/ModelicaStandardLibrary#4399 for background.

The reason for "may" is:

I thought it was sufficiently important to make it normative.

See: modelica/ModelicaStandardLibrary#4519 and modelica/ModelicaStandardLibrary#4399

The reason for "may" is:
- To not require the value to be duplicated, for cases such as: modelica/ModelicaStandardLibrary#4399
- Support even smarter debugging.

I thought it was sufficiently important to make it normative.
chapters/equations.tex Outdated Show resolved Hide resolved
@HansOlsson HansOlsson added this to the 2025-February milestone Feb 5, 2025
chapters/equations.tex Outdated Show resolved Hide resolved
Comment on lines +524 to +525
Tools are (especially for simple messages) recommended to automatically include the values of relevant variables, as part of the log or interactively accessible.
Similarly tools are recommended to include the failed condition.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is already part of the normative text above, so it needs to be removed or reformulated with the user in focus:

Suggested change
Tools are (especially for simple messages) recommended to automatically include the values of relevant variables, as part of the log or interactively accessible.
Similarly tools are recommended to include the failed condition.
In this case, for example, embedding the value of \lstinline!T! in the message is likely to result in duplicated information and should be avoided.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The idea with "especially for simple messages" was to allow tools to skip the duplicated T in such cases.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Basically to allow good compatibility with existing models that already have such complicated messages, but provide a simple recommendation for users.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok, tools may be smarter for a transition

HansOlsson and others added 2 commits February 6, 2025 10:36
Co-authored-by: Henrik Tidefelt <[email protected]>
Co-authored-by: Henrik Tidefelt <[email protected]>
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