Skip to content

Conversation

HansOlsson
Copy link
Collaborator

@HansOlsson HansOlsson commented Sep 30, 2025

As far as I understand the use of previous for interval clocks was intended to be resolved in #2022 - but for some reason the real interval clock part seemed to have been missed. But please verify that this is the intended semantics.

I continued the example to show the similarity with rational interval clock.

Closes #3753

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.

I can't say anything regarding the "intention", but I can at least say that this is a backwards incompatible change, and we need to keep in mind the upset feelings around the backwards incompatible changes introduced in MSL 4.1.0. However, if no tool ever implemented what is currently in the specification, I think the risk of upsetting users is negligible.

That said, I personally don't have strong opinions about what is the better semantics to have in the specification. I find it more important to take into consideration how existing tools behave.

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.

Actually, better to make a dummy "request changes" while waiting for more input from tool vendors in #3753.

@HansOlsson HansOlsson added this to the 2025-October milestone Oct 1, 2025
@HansOlsson
Copy link
Collaborator Author

Language group: Agreed, incompatible change.

\begin{lstlisting}[language=modelica]
// first clock tick: previous(realNextInterval) = 0.002
Real realNextInterval(start = 0.002);
Real y3(start = 0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the point of calling the variable y3, wouldn't just y be a better name?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I saw it as continuing the previous example (for rational interval clock) where we have y1 and y2.
But y would work as well.

Co-authored-by: Henrik Tidefelt <[email protected]>
\begin{example}
\begin{lstlisting}[language=modelica]
// first clock tick: previous(realNextInterval) = 0.002
Real realNextInterval(start = 0.002);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Rather than having the very long name realNextInterval here, I think we could simply call it nextInterval, and at the same time update the example above to not use the name nextInterval for something which we call intervalCounter in the normative text. Calling it nextIntervalCounter in that example would make more sense.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Now updated.

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.

Wrong interpretation of real interval clock interval?

2 participants