Skip to content

Commit

Permalink
More advanced elaboration. (modelica#3241)
Browse files Browse the repository at this point in the history
* More advanced elaboration.
Specifically this allows hieararchical additions in buses
 - if the penultimate component is potentially present.
Closes modelica#3147
* Apply suggestions from code review

Co-authored-by: Henrik Tidefelt <henrikt@wolfram.com>
Co-authored-by: Elena Shmoylova <eshmoylova@users.noreply.github.com>
  • Loading branch information
3 people committed Jan 31, 2023
1 parent 7f9cb19 commit 50b3669
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions chapters/connectors.tex
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,14 @@ \subsection{Expandable Connectors}\label{expandable-connectors}
This applies to both variables of simple types, and variables of structured types.

Then connections containing expandable connectors are elaborated:
\begin{itemize}
\begin{enumerate}
\item
If a connect-equation references a potentially present component \emph{as part of the argument} it will be marked as being present, which will allow a connection to an undeclared connector inside it.
The rule does not apply for the complete argument.
\item
One connector in the \lstinline!connect!-equation must reference a declared component, and if the other connector is an undeclared element in a declared expandable connector it is handled as follows (elements that are only potentially present are not seen as declared):
After that at least one connector in the connect equation must reference a declared component.
\item
If the other connector is undeclared it must be in a declared component and is handled as follows:
\begin{itemize}
\item
The expandable connector instance is automatically augmented with a new component having the used name and corresponding type.
Expand All @@ -124,7 +129,10 @@ \subsection{Expandable Connectors}\label{expandable-connectors}
\end{nonnormative}
For an array the \lstinline!input!/\lstinline!output! property can be deduced separately for each array element.
\end{itemize}
\end{enumerate}

Additionally:
\begin{itemize}
\item
When two expandable connectors are connected, each is augmented with the variables that are only declared in the other expandable connector (the new variables are neither \lstinline!input! nor \lstinline!output!).
This is repeated until all connected expandable connector instances have matching variables.
Expand Down

0 comments on commit 50b3669

Please sign in to comment.