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

Which Modelica Language version for MSL 4.1.0? #4175

Closed
HansOlsson opened this issue Aug 7, 2023 · 7 comments · Fixed by #4208
Closed

Which Modelica Language version for MSL 4.1.0? #4175

HansOlsson opened this issue Aug 7, 2023 · 7 comments · Fixed by #4208
Labels
question Unexplained or undecided issue
Milestone

Comments

@HansOlsson
Copy link
Contributor

Known issues (will check if more):

  • Conditional connectors (Modelica Language 3.4 is problematic).

#3947 indicate that the current library is not correct according to Modelica Language 3.4 - basically one should get a diagnostics for some examples; and it doesn't make sense to patch them for 3.4 semantics.

Thus if we want MSL to be correct and be able to detect if Modelica.Mechanics.Rotational.Components.IdealGear has enabled and unconnected support-connector we need 3.6 semantics and a new annotation in the library (mustBeConnected).
If we skip detecting IdealGear issue we can say that we use 3.6 semantics but the library does not contain 3.6 features.

@beutlich
Copy link
Member

beutlich commented Aug 8, 2023

I see conceptual similarities to #1886 where MSL 3.2.2 was based on Modelica Language 3.2, but the pure/impure semantics was missing/insufficient. It was then (temporarily) fixed by introduction of the vendor neutral annotation __ModelicaAssociation_Impure such that MSL 3.2.2 could still be based on Modelica Language 3.2. Hence, what about introducing __ModelicaAssociation_mustBeConnected now for MSL 4.1.0?

@beutlich beutlich added the question Unexplained or undecided issue label Aug 8, 2023
@beutlich beutlich added this to the MSL4.1.0 milestone Aug 8, 2023
@HansOlsson
Copy link
Contributor Author

I see conceptual similarities to #1886 where MSL 3.2.2 was based on Modelica Language 3.2, but the pure/impure semantics was missing/insufficient. It was then (temporarily) fixed by introduction of the vendor neutral annotation __ModelicaAssociation_Impure such that MSL 3.2.2 could still be based on Modelica Language 3.2. Hence, what about introducing __ModelicaAssociation_mustBeConnected now for MSL 4.1.0?

To me that situation was different.

  • Tools will not support new keywords ("impure" or "pure") without explicit support for them, whereas a new annotation can be parsed.
  • The pure semantics of 3.2 are broken (even if you don't have "pure") and have been a mess to clean up. That's why we needed to add an annotation. The connection restrictions for conditional components of 3.4 are also broken, but the connection restrictions of 3.6 restores backwards compatibility with 3.3; so "mustBeConnected" isn't as needed.

To me that seems like a worse option:

  • Tools will have to implement support for that as well.
  • We need to document it.
  • We will later have to update this, and there's a risk that it spreads to user libraries.

If we don't want to add mustBeConnected to MSL 4.1.0 I would propose that we don't add anything for this release. Instead we state that 3.6 semantics are used, but no 3.6 features are used (we could rely on the general rule that bug-fixes can be implemented even for earlier versions, but that seems messy).

@HansOlsson
Copy link
Contributor Author

HansOlsson commented Sep 12, 2023

Note that figure-annotations added in 3.5 should also be considered - #4094

I see the following possibilities:

  • Stay on Modelica Language 3.4 even if problematic.
  • Switch to Modelica Language 3.6 - but without using any new features (no new syntax, no new annotations).
  • Switch to Modelica Language 3.6 - but only use 3.6 annotations, and no other features (no new syntax, but new annotations).
  • Switch to Modelica Language 3.6 (new syntax, annotations, and features).

I don't see switching to 3.5 as a good option. (And my preference is for only 3.6 annotations, and otherwise 3.6 without anything new; I don't view 3.4 as a good option, and I understand that many view 3.6 as too breaking.)

@henrikt-ma
Copy link
Contributor

As I believe it is hard to find the necessary tools to ensure that only certain parts of 3.6 are used, I propose going for the more pragmatic approach of switching to 3.6 fully, but give tool vendors time to react if new and not yet supported features are being used. This also gives a chance for tool vendors to prioritize adding support for the new features that get used by the MSL, features that could otherwise remain unimplemented for very long if there is no pressure from use in important libraries. In other words, waiting for all tool vendors to say that they fully support 3.6 does not seem like a feasible way forward.

@MartinOtter
Copy link
Member

I like the option:

  • Switch to Modelica Language 3.6 - but only use 3.6 annotations, and no other features (no new syntax, but new annotations).

@MartinOtter
Copy link
Member

In MAP-LIB Meeting for option #3:
8 in favor (Elena, Hans, Hubertus, Dag, Martin,Malte, Leo, Harisankar) , no one against
Malte also is in favor of #3 and #4.
Decision: Use #3 for the next MSL version

@beutlich
Copy link
Member

With that decision there is now the chance to add the figure annotation, too. Right? See #4094 for the first idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Unexplained or undecided issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants