Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chapters/connectors.tex
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ \subsection{Expandable Connectors}\label{expandable-connectors}

\section{Generation of Connection Equations}\label{generation-of-connection-equations}

When generating \firstuse[connection equation]{connection equations}, \lstinline!outer! elements are resolved to the corresponding \lstinline!inner! elements in the instance hierarchy (see instance hierarchy name lookup \cref{instance-hierarchy-name-lookup-of-inner-declarations}).
When generating \firstuse[connection equation]{connection equations}, \lstinline!outer! elements are resolved to the corresponding \lstinline!inner! elements in the instance tree (see instance tree name lookup \cref{instance-hierarchy-name-lookup-of-inner-declarations}).
The arguments to each \lstinline!connect!-equation are resolved to two connector elements.

For every use of the \lstinline!connect!-equation
Expand Down
8 changes: 4 additions & 4 deletions chapters/scoping.tex
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ \subsection{Lookup of Imported Names}\label{lookup-of-imported-names1}
See \cref{lookup-of-imported-names}.


\section{Inner Declarations - Instance Hierarchy Name Lookup}\label{instance-hierarchy-name-lookup-of-inner-declarations}\label{inner-declarations-instance-hierarchy-name-lookup}
\section{Inner Declarations - Instance Tree Name Lookup}\label{instance-hierarchy-name-lookup-of-inner-declarations}\label{inner-declarations-instance-hierarchy-name-lookup}

An element declared with the prefix \lstinline!outer!\indexinline{outer} references an element instance with the same name but using the prefix \lstinline!inner!\indexinline{inner} which is nearest in the enclosing instance hierarchy of the \lstinline!outer! element declaration.
An element declared with the prefix \lstinline!outer!\indexinline{outer} references an element instance with the same name but using the prefix \lstinline!inner!\indexinline{inner} which is nearest in the enclosing instance tree of the \lstinline!outer! element declaration.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it was problematic before, but the new change adds issues.

A model has only one "instance tree", so "nearest in the enclosing instance tree" seems to roughly mean "nearest enclosing in the instance tree". However, roughly is doing quite a lot of work, and something like "nearest enclosing" is needed (but not explained) as it isn't "nearest" in the instance graph (as trees are graphs).

The intent (as we all know) is that you go up the tree (or hierarchy) step-by-step stop as soon as you find a "sibling" that is an inner element with the same name, so using "instance sub-tree" might fix some issues - but it really should be explained in more detail.

@HansOlsson HansOlsson Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

So something like:

Suggested change
An element declared with the prefix \lstinline!outer!\indexinline{outer} references an element instance with the same name but using the prefix \lstinline!inner!\indexinline{inner} which is nearest in the enclosing instance tree of the \lstinline!outer! element declaration.
An element declared with the prefix \lstinline!outer!\indexinline{outer} references an element instance with the same name but using the prefix \lstinline!inner!\indexinline{inner} whose parent in the instance tree is the closest ancestor of the \lstinline!outer! element declaration, having a matching \indexinline{inner} element.


Outer component declarations shall not have modifications (including binding equations).
Outer class declarations should be defined using short-class definitions without modifications.
Expand All @@ -188,8 +188,8 @@ \section{Inner Declarations - Instance Hierarchy Name Lookup}\label{instance-hie
An \lstinline!outer! element component may be of a partial class (but the referenced \lstinline!inner! component must be of a non-partial class).

\begin{nonnormative}
\lstinline!inner!/\lstinline!outer! components may be used to model simple fields, where some physical quantities, such as gravity vector, environment temperature or environment pressure, are accessible from all components in a specific model hierarchy.
Inner components are accessible throughout the model, if they are not ``shadowed'' by a corresponding \lstinline!inner! declaration in a more deeply nested level of the model hierarchy.
\lstinline!inner!/\lstinline!outer! components may be used to model simple fields, where some physical quantities, such as gravity vector, environment temperature or environment pressure, are accessible from all components in a specific instance tree.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"specific instance tree" make it sound as if a model may have multiple instance trees, but during translation the model only has one - so I would more say that it is accessible in a sub-tree or part of the tree, and "instance sub-tree" would be a new term, so prefer the latter:

Suggested change
\lstinline!inner!/\lstinline!outer! components may be used to model simple fields, where some physical quantities, such as gravity vector, environment temperature or environment pressure, are accessible from all components in a specific instance tree.
\lstinline!inner!/\lstinline!outer! components may be used to model simple fields, where some physical quantities, such as gravity vector, environment temperature or environment pressure, are accessible from all components in a part of the instance tree.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Or possibly something like "in the instance tree, or part of it".

Inner components are accessible throughout the model, if they are not ``shadowed'' by a corresponding \lstinline!inner! declaration in a more deeply nested level of the instance tree.
\end{nonnormative}

\begin{example}
Expand Down