Skip to content

Conversation

@HansOlsson
Copy link
Collaborator

According to decision (as far as I can see).
Closes #3779

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.

Main concern is the lack of relation to switching condition evaluability.

Co-authored-by: Henrik Tidefelt <[email protected]>
Have the same number of equations in each branch, where the number of equations is defined as in \cref{local-equation-size}.
Absence of an \lstinline!else!-branch is treated as having a branch with zero equations.
\item
Non-\lstinline!Real! equations in the \lstinline!if!-equation branches shall have component-references (or a list of them) as their left-hand-side.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I also realized that we need to distinguish between simple and non-simple equations:

Suggested change
Non-\lstinline!Real! equations in the \lstinline!if!-equation branches shall have component-references (or a list of them) as their left-hand-side.
Non-\lstinline!Real! simple equality equations (see \cref{simple-equality-equations}) in the \lstinline!if!-equation branches shall have component-references (or a list of them) as their left-hand-side.

Copy link
Collaborator Author

@HansOlsson HansOlsson Dec 17, 2025

Choose a reason for hiding this comment

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

The "list of them" was for non-simple, so if we only mention simple it would be:

Suggested change
Non-\lstinline!Real! equations in the \lstinline!if!-equation branches shall have component-references (or a list of them) as their left-hand-side.
Non-\lstinline!Real! simple equality equations (see \cref{simple-equality-equations}) in the \lstinline!if!-equation branches shall have component-references as their left-hand-side.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm… this is one of the examples in \cref{simple-equality-equations}:

(out1, out2, out3) = function_name(inexpr1, inexpr2);

What am I missing?

Absence of an \lstinline!else!-branch is treated as having a branch with zero equations.
\item
Non-\lstinline!Real! equations in the \lstinline!if!-equation branches shall have component-references (or a list of them) as their left-hand-side.
Any subscripts for such component-references must be evaluable.
Copy link
Collaborator

Choose a reason for hiding this comment

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

We also need something for the non-simple equations:

Suggested change
Any subscripts for such component-references must be evaluable.
Any subscripts for such component-references must be evaluable.
Any \lstinline!for!- and \lstinline!if!-equations in the \lstinline!if!-equation branches shall have evaluable controlling conditions, and contain equations which fullfil these requirements recursively.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To me the recursive part worked automatically: for-equations shall always have evaluable conditions, and nested if-equations containing non-Real equations follow from just applying the rule for that if-equation.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Besides the requirements on these equations, I also wanted to make clear that they may qualify for the matching of branches, despite not being given in simple equality equation form.

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.

Solvability requirement for non-Real if-equations

2 participants