From 50b36699f815c5ee38e6a4f731da157e0fd0eccc Mon Sep 17 00:00:00 2001 From: Hans Olsson Date: Tue, 31 Jan 2023 09:21:44 +0100 Subject: [PATCH] More advanced elaboration. (#3241) * More advanced elaboration. Specifically this allows hieararchical additions in buses - if the penultimate component is potentially present. Closes #3147 * Apply suggestions from code review Co-authored-by: Henrik Tidefelt Co-authored-by: Elena Shmoylova --- chapters/connectors.tex | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/chapters/connectors.tex b/chapters/connectors.tex index fe34475f6..7cd4eb170 100644 --- a/chapters/connectors.tex +++ b/chapters/connectors.tex @@ -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. @@ -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.