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

Prohibit clocks as input for hold #2174

Closed
modelica-trac-importer opened this issue Nov 4, 2018 · 3 comments · Fixed by #2773
Closed

Prohibit clocks as input for hold #2174

modelica-trac-importer opened this issue Nov 4, 2018 · 3 comments · Fixed by #2773
Labels
bug Something isn't working decided A decision has been made (label added before the spec is changed)

Comments

@modelica-trac-importer
Copy link
Collaborator

Reported by jfrenkel on 31 Mar 2017 08:44 UTC
Since the type Clock is a base type it is a Component Expression and Component Expression are valid as input for hold.
But the result of a holded Clock seems useless or at least obfuscating.
Hence Clocks as input for hold should be prohibited.


Migrated-From: https://trac.modelica.org/Modelica/ticket/2174

@modelica-trac-importer modelica-trac-importer added this to the ModelicaSpec3.4 milestone Nov 4, 2018
@modelica-trac-importer modelica-trac-importer added discussion Indicates that there's a discussion; not clear if bug, enhancement, or working as intended P: high labels Nov 4, 2018
@modelica-trac-importer
Copy link
Collaborator Author

Comment by hansolsson on 10 May 2017 14:56 UTC
Replying to [ticket:2174 Jens Frenkel]:

Since the type Clock is a base type it is a Component Expression and Component Expression are valid as input for hold.
But the result of a holded Clock seems useless or at least obfuscating.
Hence Clocks as input for hold should be prohibited.

It says that the input to hold is a clocked Component Expression, and for clocked variables it says:
"The elements of clocked variables r(ti) are of base type Real, Integer, Boolean, enumeration, String that are associated uniquely with a clock c(ti)."

A simple way of stating this is that: clock variables are not clocked variables!

Thus it seems this restriction is already present, and we can close this ticket.

@modelica-trac-importer
Copy link
Collaborator Author

Comment by hansolsson on 18 May 2017 15:13 UTC
Language group:
The restrictions are not clear - it references 16.2.3 is referenced, but does not defined "clocked component expression" ("clocked" is defined in 16.2.1).
Could be other similar cases as well.
Combining "clocked" and "component expression" gives the restriction.

@modelica-trac-importer modelica-trac-importer added bug Something isn't working and removed P: high discussion Indicates that there's a discussion; not clear if bug, enhancement, or working as intended labels Nov 4, 2018
@HansOlsson HansOlsson added the decided A decision has been made (label added before the spec is changed) label Dec 11, 2020
@HansOlsson
Copy link
Collaborator

There is a decision, but the text isn't updated yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working decided A decision has been made (label added before the spec is changed)
Projects
None yet
Development

Successfully merging a pull request may close this issue.