Skip to content

Commit

Permalink
Add \firstuse terms to index
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Nov 29, 2020
1 parent b1b9bea commit 491c534
Show file tree
Hide file tree
Showing 15 changed files with 95 additions and 100 deletions.
2 changes: 1 addition & 1 deletion chapters/abstract.tex
Expand Up @@ -6,7 +6,7 @@
\end{center}

This document defines the Modelica\footnote{%
\firstuse{Modelica} is a registered trademark of the Modelica Association.
\firstuse{Modelica}\index{Modelica} is a registered trademark of the Modelica Association.
}
language, version~\mlsversion, which is developed by the Modelica Association, a non-profit organization with seat in Linköping, Sweden.
Modelica is a freely available, object-oriented language for modeling of large, complex, and heterogeneous systems.
Expand Down
3 changes: 2 additions & 1 deletion chapters/annotations.tex
Expand Up @@ -208,7 +208,8 @@ \subsubsection{Plot Curves}\label{plot-curves}

\subsubsection{Escape sequences}\label{text-markup-escape-sequences}

In an attribute inside a figure where the variable replacements of \cref{variable-replacements} or the text markup of \cref{text-markup-in-captions} can be used, the following use of \firstuse{text markup escape sequences} applies. These escape sequences are applied after the application of other markup, and is not applied at all inside some of the other markup, see details for the respective markup.
In an attribute inside a figure where the variable replacements of \cref{variable-replacements} or the text markup of \cref{text-markup-in-captions} can be used, the following use of \firstuse{text markup escape sequences}\index{text markup escape sequence}\index{escape sequence!text markup} applies.
These escape sequences are applied after the application of other markup, and is not applied at all inside some of the other markup, see details for the respective markup.

The percent character `\%' shall be encoded \lstinline!%%!. The following are all the recognized escape sequences:
\begin{center}
Expand Down
12 changes: 4 additions & 8 deletions chapters/classes.tex
Expand Up @@ -326,11 +326,7 @@ \subsection{Acyclic Bindings of Constants and Parameters}\label{acyclic-bindings

\subsection{Component Variability Prefixes discrete, parameter, constant}\label{component-variability-prefixes-discrete-parameter-constant}

The prefixes \lstinline!discrete!, \lstinline!parameter!, \lstinline!constant! of a component declaration
are called variability prefixes and define in which situation the
variable values of a component are initialized (see \cref{events-and-synchronization} and
\cref{initialization-initial-equation-and-initial-algorithm}) and when they are changed in transient analysis (= solution
of initial value problem of the hybrid DAE):
The prefixes \lstinline!discrete!, \lstinline!parameter!, \lstinline!constant! of a component declaration are called \firstuse{variability prefixes}\index{variability!prefix}\index{declared variability}\index{variability!declared|see{declared variability}} and define in which situation the variable values of a component are initialized (see \cref{events-and-synchronization} and \cref{initialization-initial-equation-and-initial-algorithm}) and when they are changed in transient analysis (= solution of initial value problem of the hybrid DAE):
\begin{itemize}
\item
A variable \lstinline!vc! declared with \lstinline!constant! prefix remains constant during transient analysis,
Expand Down Expand Up @@ -736,12 +732,12 @@ \subsection{Local Class Definitions -- Nested Classes}\label{local-class-definit

\section{Specialized Classes}\label{specialized-classes}

Specialized kinds of classes (earlier known as \emph{restricted classes})
Specialized kinds of classes\index{specialized class} (earlier known as \emph{restricted classes}\index{restricted class|see{specialized class}})
% The difference between the set of specializations given here and those that are defined below need some sort of explanation.
\lstinline!record!, \lstinline!type!, \lstinline!model!, \lstinline!block!, \lstinline!package!, \lstinline!function! and \lstinline!connector!
have the properties of a general class, apart from restrictions.
Moreover, they have additional properties called \firstuse{enhancements}. The definitions of the specialized classes are given below
(additional restrictions on inheritance are in \cref{restrictions-on-the-kind-of-base-class}):
Moreover, they have additional properties called \firstuse{enhancements}\index{enhancement!specialized class}.
The definitions of the specialized classes are given below (additional restrictions on inheritance are in \cref{restrictions-on-the-kind-of-base-class}):
\begin{itemize}
\item \lstinline!record! --
Only public sections are allowed in the definition or in any of its components (i.e., \lstinline!equation!, \lstinline!algorithm!, \lstinline!initial equation!, \lstinline!initial algorithm! and \lstinline!protected! sections are not allowed). The elements of a record shall not have prefixes \lstinline!input!, \lstinline!output!, \lstinline!inner!, \lstinline!outer!, \lstinline!stream,! or \lstinline!flow!. Enhanced with implicitly available record constructor function, see \cref{record-constructor-functions}. The components directly declared in a record may only be of specialized class record or type.
Expand Down
35 changes: 20 additions & 15 deletions chapters/connectors.tex
Expand Up @@ -76,7 +76,9 @@ \subsection{Connection Sets}\label{connection-sets}

\subsection{Inside and Outside Connectors}\label{inside-and-outside-connectors}

In an element instance \lstinline!M!, each connector element of \lstinline!M! is called an \firstuse{outside connector} with respect to \lstinline!M!. Any other connector elements that is hierarchically inside \lstinline!M!, but not in one of the outside connectors of \lstinline!M!, is called an \firstuse{inside connector} with respect to \lstinline!M!. This is done before resolving \lstinline!outer! elements to corresponding \lstinline!inner! ones.
In an element instance \lstinline!M!, each connector element of \lstinline!M! is called an \firstuse{outside connector}\index{outside connector} with respect to \lstinline!M!.
Any other connector elements that is hierarchically inside \lstinline!M!, but not in one of the outside connectors of \lstinline!M!, is called an \firstuse{inside connector}\index{inside connector} with respect to \lstinline!M!.
This is done before resolving \lstinline!outer! elements to corresponding \lstinline!inner! ones.

\begin{example}
\begin{figure}[H]
Expand Down Expand Up @@ -109,10 +111,8 @@ \subsection{Inside and Outside Connectors}\label{inside-and-outside-connectors}

\subsection{Expandable Connectors}\label{expandable-connectors}

If the \lstinline!expandable! qualifier is present on a connector definition, all
instances of that connector are referred to as expandable connectors.
Instances of connectors that do not possess this qualifier will be
referred to as non-expandable connectors.
If the \lstinline!expandable! qualifier is present on a connector definition, all instances of that connector are referred to as \firstuse{expandable connectors}\index{expandable connector}.
Instances of connectors that do not possess this qualifier will be referred to as \firstuse{non-expandable connectors}\index{non-expandable connector}.

Before generating connection equations non-parameter scalar variables and non-parameter array elements declared in expandable connectors are marked as only being
potentially present. A non-parameter array element may be declared with array dimensions \lstinline!:! indicating that the size is unknown (note that the size of
Expand Down Expand Up @@ -250,8 +250,8 @@ \subsection{Expandable Connectors}\label{expandable-connectors}
\end{lstlisting}
\end{example}

An expandable connector array component for which \lstinline!size! is not defined (see \cref{array-dimension-and-size-functions}) is referred to as a \emph{sizeless array component}. Such a
component shall not be used without subscripts, and the subscripts must slice the array so that the sizeless dimensions are removed.
An expandable connector array component for which \lstinline!size! is not defined (see \cref{array-dimension-and-size-functions}) is referred to as a \firstuse{sizeless array component}\index{sizeless array component}.
Such a component shall not be used without subscripts, and the subscripts must slice the array so that the sizeless dimensions are removed.

\begin{example}
Valid and invalid uses of sizeless array components:
Expand Down Expand Up @@ -826,10 +826,11 @@ \subsection{Overconstrained Equation Operators for Connection Graphs}\label{over
If the elements of a record \lstinline!Record! are not independent from each other, the equation \lstinline!R1 = R2! contains redundant equations.
\end{nonnormative}

A type class with an \lstinline!equalityConstraint! function declaration is called \firstuse{overdetermined type}. A record class with an \lstinline!equalityConstraint! function definition is called
\firstuse{overdetermined record}. A connector that contains instances of overdetermined type and/or record classes is called overdetermined connector. An overdetermined type or record may neither
have flow components nor may be used as a type of flow components. If an array is used as argument to any of the \lstinline!Connections.*! functions it is treated as one unit -- unlike
\lstinline!connect!, there is no special treatment of this case, compare \cref{connect-equations-and-connectors}.
A type class with an \lstinline!equalityConstraint! function declaration is called \firstuse{overdetermined type}\index{overdetermined!type}.
A record class with an \lstinline!equalityConstraint! function definition is called \firstuse{overdetermined record}\index{overdetermined!record}.
A connector that contains instances of overdetermined type and/or record classes is called \firstuse{overdetermined connector}\index{overdetermined!connector}.
An overdetermined type or record may neither have flow components nor may be used as a type of flow components.
If an array is used as argument to any of the \lstinline!Connections.*! functions it is treated as one unit -- unlike \lstinline!connect!, there is no special treatment of this case, compare \cref{connect-equations-and-connectors}.

Every instance of an overdetermined type or record in an overdetermined
connector is a node in a virtual connection graph that is used to
Expand Down Expand Up @@ -865,7 +866,8 @@ \subsection{Overconstrained Equation Operators for Connection Graphs}\label{over
connect(A, B)
\end{lstlisting}\end{synopsis}
\begin{semantics}
Defines \firstuse{optional spanning-tree edge} from the overdetermined type or record instances in connector instance \lstinline!A! to the corresponding overdetermined type or record instances in connector instance \lstinline!B! for a virtual connection graph. The types of the corresponding overdetermined type or record instances shall be the same.
Defines \firstuse{optional spanning-tree edge}\index{optional spanning-tree edge} from the overdetermined type or record instances in connector instance \lstinline!A! to the corresponding overdetermined type or record instances in connector instance \lstinline!B! for a virtual connection graph.
The types of the corresponding overdetermined type or record instances shall be the same.
\end{semantics}
\end{operatordefinition*}

Expand All @@ -874,7 +876,8 @@ \subsection{Overconstrained Equation Operators for Connection Graphs}\label{over
Connections.branch(A.R, B.R)
\end{lstlisting}\end{synopsis}
\begin{semantics}
Defines a \firstuse{required spanning-tree edge} from the overdetermined type or record instance \lstinline!R! in connector instance \lstinline!A! to the corresponding overdetermined type or record instance \lstinline!R! in connector instance \lstinline!B! for a virtual connection graph. This function can be used at all places where a \lstinline!connect! statement is allowed.
Defines a \firstuse{required spanning-tree edge}\index{required spanning-tree edge} from the overdetermined type or record instance \lstinline!R! in connector instance \lstinline!A! to the corresponding overdetermined type or record instance \lstinline!R! in connector instance \lstinline!B! for a virtual connection graph.
This function can be used at all places where a \lstinline!connect! statement is allowed.

\begin{nonnormative}
E.g., it is not allowed to use this function in a when-clause. This definition shall be used if in a model with connectors \lstinline!A! and \lstinline!B! the overdetermined records \lstinline!A.R! and \lstinline!B.R! are algebraically coupled in the model, e.g., due to \lstinline!B.R = f(A.R!, \textless{}other unknowns\textgreater{}).
Expand All @@ -887,7 +890,7 @@ \subsection{Overconstrained Equation Operators for Connection Graphs}\label{over
Connections.root(A.R)
\end{lstlisting}\end{synopsis}
\begin{semantics}
The overdetermined type or record instance \lstinline!R! in connector instance \lstinline!A! is a (definite) \firstuse{root node} in a virtual connection graph.
The overdetermined type or record instance \lstinline!R! in connector instance \lstinline!A! is a (definite) \firstuse{root node}\index{definite root node}\index{root node!definite} in a virtual connection graph.

\begin{nonnormative}
This definition shall be used if in a model with connector \lstinline!A! the overdetermined record \lstinline!A.R! is (consistently) assigned, e.g., from a parameter expressions.
Expand All @@ -901,7 +904,9 @@ \subsection{Overconstrained Equation Operators for Connection Graphs}\label{over
Connections.potentialRoot(A.R, priority=$p$)
\end{lstlisting}\end{synopsis}
\begin{semantics}
The overdetermined type or record instance \lstinline!R! in connector instance \lstinline!A! is a \firstuse{potential root node} in a virtual connection graph with priority \lstinline!p! ($p \geq 0$). If no second argument is provided, the priority is zero. \lstinline!p! shall be a parameter expression of type \lstinline!Integer!. In a virtual connection subgraph without a \lstinline!Connections.root! definition, one of the potential roots with the lowest priority number is selected as root.
The overdetermined type or record instance \lstinline!R! in connector instance \lstinline!A! is a \firstuse{potential root node}\index{potential root node}\index{root node!potential} in a virtual connection graph with priority \lstinline!p! ($p \geq 0$).
If no second argument is provided, the priority is zero. \lstinline!p! shall be a parameter expression of type \lstinline!Integer!.
In a virtual connection subgraph without a \lstinline!Connections.root! definition, one of the potential roots with the lowest priority number is selected as root.

\begin{nonnormative}
This definition may be used if in a model with connector \lstinline!A! the overdetermined record \lstinline!A.R! appears differentiated -- \lstinline!der(A.R)! -- together with the \emph{constraint equations} of \lstinline!A.R!, i.e., a non-redundant subset of \lstinline!A.R! maybe used as states.
Expand Down
2 changes: 1 addition & 1 deletion chapters/equations.tex
Expand Up @@ -561,7 +561,7 @@ \section{Synchronous Data-flow Principle and Single Assignment Rule}\label{synch

\item There must exist a perfect matching of variables to equations after flattening, where a variable can only
be matched to equations that can contribute to solving for the variable
(\firstuse{perfect matching rule} -- previously called \emph{single assignment rule}); see also globally balanced \cref{balanced-models}.
(\firstuse{perfect matching rule}\index{perfect matching rule} -- previously called \emph{single assignment rule}\index{single assignment rule|see{perfect matching rule}}); see also globally balanced \cref{balanced-models}.
\end{enumerate}

\section{Events and Synchronization}\label{events-and-synchronization}
Expand Down
12 changes: 4 additions & 8 deletions chapters/functions.tex
Expand Up @@ -506,8 +506,7 @@ \subsection{Functional Input Arguments to Functions}\label{functional-input-argu
(example in \cref{function-partial-application} below).
\end{enumerate}

In all cases the provided function must be \firstuse{function type compatible}
(\cref{function-compatibility-or-function-subtyping-for-functions}) to the corresponding formal parameter of function type.
In all cases the provided function must be function-compatible (\cref{function-compatibility}) with the corresponding formal parameter of function type.

\begin{example}
A function as a positional input argument according to case (a):
Expand Down Expand Up @@ -556,12 +555,9 @@ \subsubsection{Function Partial Application}\label{function-partial-application}
default values.
\end{nonnormative}

The function created by the function partial application acts as the
original function but with the bound formal input parameters(s) removed,
i.e., they cannot be supplied arguments at function call. The binding
occurs when the partially evaluated function is created. A partially
evaluated function is \firstuse{function compatible} (see \cref{function-compatibility-or-function-subtyping-for-functions}) to the
same function where all bound arguments are removed.
The function created by the function partial application acts as the original function but with the bound formal input parameters(s) removed, i.e., they cannot be supplied arguments at function call.
The binding occurs when the partially evaluated function is created.
A partially evaluated function is function-compatible (\cref{function-compatibility}) with the same function where all bound arguments are removed.

\begin{nonnormative}
Thus, for checking function type compatibility, bound formal parameters are ignored.
Expand Down
2 changes: 1 addition & 1 deletion chapters/interface.tex
Expand Up @@ -521,7 +521,7 @@ \section{Function-Compatibility or Function-Subtyping for Functions}\label{funct
existing calls.
\end{nonnormative}

\begin{definition}[Function-compatibility or function-subtyping for functions]\index{function-compatibility}\index{subtype!functions}
\begin{definition}[Function-compatibility or function-subtyping for functions]\label{function-compatibility}\index{function-compatibility}\index{subtype!functions}
A \lstinline!function! class \lstinline!A! is \emph{function-compatible with or a function subtype of} \lstinline!function! class \lstinline!B! iff (the terms \emph{function-compatible} and \emph{function subtype} of are synonyms and used interchangeably):
\begin{itemize}
\item
Expand Down
2 changes: 1 addition & 1 deletion chapters/introduction.tex
Expand Up @@ -11,7 +11,7 @@ \section{Scope of the Specification}\label{scope-of-the-specification}
rules for translating any class described in the Modelica language to a
flat Modelica structure.

A class (of specialized class \lstinline!model!, \lstinline!class! or \lstinline!block!) intended to be simulated on its own is called a \firstuse{simulation model}.
A class (of specialized class \lstinline!model!, \lstinline!class! or \lstinline!block!) intended to be simulated on its own is called a \firstuse{simulation model}\index{simulation model}.

The flat Modelica structure is also defined for other cases than
simulation models; including functions (can be used to provide
Expand Down
2 changes: 1 addition & 1 deletion chapters/lexicalstructure.tex
Expand Up @@ -170,7 +170,7 @@ \subsection{Strings}\label{strings}

String literals appear between double quotes as in \lstinline!"between"!.
Any character in the Modelica language character set (see \cref{lexical-conventions} for allowed characters) apart from double quote (\lstinline!"!) and backslash (\lstinline!\!), including new-line, can be \emph{directly} included in a string without using an escape sequence.
Certain characters in string literals can be represented using escape sequences, i.e., the character is preceded by a backslash (\lstinline!\!) within the string.
Certain characters in string literals can be represented using escape sequences\index{escape sequence!string literal}, i.e., the character is preceded by a backslash (\lstinline!\!) within the string.
Those characters are:
\begin{center}
\begin{tabular}{c l}
Expand Down

0 comments on commit 491c534

Please sign in to comment.