Skip to content

Clarify simple function call.#3897

Open
HansOlsson wants to merge 3 commits into
modelica:masterfrom
HansOlsson:FunctionCallSemantics
Open

Clarify simple function call.#3897
HansOlsson wants to merge 3 commits into
modelica:masterfrom
HansOlsson:FunctionCallSemantics

Conversation

@HansOlsson
Copy link
Copy Markdown
Collaborator

I noticed that the issue had milestone 3.7 so I thought it best to have at least a proposal for a solution; even if we decide to postpone it.

Closes #3632

Future possibilities:

  • Could group reinit, assert, terminate in a sub-section of their own (and thus move them down one level), and put this explanation at that place (but still referenced from simple equation).
  • Modify the grammar as it currently contains:
some-equation :
( equation-or-procedure
  | if-equation
  | for-equation
  | connect-equation
  | when-equation
)
description

equation-or-procedure :
simple-equation
| function-call

connect-equation :
connect "(" component-reference "," component-reference ")"

To me it would be logical to group function-call and connect-equation after each other inside equation-or-procedure. However, we cannot view connect-equation as a kind of function-call as connect is a keyword and break connect-equation is used for selective model extension.

@HansOlsson HansOlsson added this to the ModelicaSpec3.7 milestone May 6, 2026
@HansOlsson HansOlsson added the clarification Specification of feature is unclear, but not incorrect label May 6, 2026
@henrikt-ma
Copy link
Copy Markdown
Collaborator

To me it would be logical to group function-call and connect-equation after each other inside equation-or-procedure. However, we cannot view connect-equation as a kind of function-call as connect is a keyword and break connect-equation is used for selective model extension.

The only use of equation-or-procedure and statement-or-procedure that I see is that they are mentioned non-normatively when talking about how to write a recursive descent parser. If we omitted that non-normative section, we wouldn't have to draw an artificial line between what goes directly into some-equation (statement) and what goes into equation-or-procedure (statement-or-procedure).

Comment thread chapters/equations.tex
Comment thread chapters/equations.tex Outdated
Co-authored-by: Henrik Tidefelt <henrikt@wolfram.com>
@HansOlsson
Copy link
Copy Markdown
Collaborator Author

Delay

@HansOlsson HansOlsson removed this from the ModelicaSpec3.7 milestone May 7, 2026
@HansOlsson HansOlsson added this to the 2026-June milestone Jun 4, 2026
@HansOlsson HansOlsson requested a review from henrikt-ma June 4, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clarification Specification of feature is unclear, but not incorrect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Semantics of function call equations and statements

2 participants