Skip to content

Commit

Permalink
Use 'definition' environments instead of 'description' lists
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Jun 24, 2020
1 parent e054702 commit 8f1f8d1
Showing 1 changed file with 23 additions and 32 deletions.
55 changes: 23 additions & 32 deletions chapters/synchronous.tex
Expand Up @@ -271,32 +271,23 @@ \subsection{Argument Restrictions (Component Expression)}\doublelabel{argument-r
The built-in operators (with function syntax) defined in the following
sections have partially restrictions on their input arguments that are
not present for Modelica functions. To define the restrictions, the
following term is defined:
\begin{description}
\item[Component expression:]
A Component Reference which is an Expression, i.e.\ does not refer to
models or blocks with equations. It is an instance of a (a) base type,
(b) derived type, (c) record, (d) an array of such an instance (a-c),
(e) one or more elements of such an array (d) defined by index
expressions which are parameter expressions (see below), or (f) an
element of records.
following term is used.

\begin{definition}[Component expression]
A Component Reference which is an Expression, i.e.\ does not refer to models or blocks with equations. It is an instance of a (a) base type, (b) derived type, (c) record, (d) an array of such an
instance (a-c), (e) one or more elements of such an array (d) defined by index expressions which are parameter expressions (see below), or (f) an element of records.
\begin{nonnormative}
The essential features are that one or several values are associated with the instance, that start values can be defined on these values, and that no equations are
associated with the instance. A Component Expression can be constant or can vary with time.
The essential features are that one or several values are associated with the instance, that start values can be defined on these values, and that no equations are associated with the instance.
A Component Expression can be constant or can vary with time.
\end{nonnormative}
\end{description}
\end{definition}

In the following sections the following notation is partially used when
defining the operators:
In the following sections the following notation is partially used when defining the operators.

% This should ideally be a set of definitions instead
\begin{description}
\item[The input argument is a \emph{component expression}:]
The meaning is that the input argument when calling the operator must
be a \emph{component expression}.
\begin{definition}[\emph{{[}The input argument is a{]}} component expression]
The meaning is that the input argument when calling the operator must be a \emph{component expression}.
\begin{nonnormative}
The reason for this restriction is that the start value of the input argument is returned before the first tick of the clock of the input argument and this is not
possible for a general expression.
The reason for this restriction is that the start value of the input argument is returned before the first tick of the clock of the input argument and this is not possible for a general expression.
\end{nonnormative}
\begin{example}
\begin{lstlisting}[language=modelica]
Expand All @@ -313,11 +304,11 @@ \subsection{Argument Restrictions (Component Expression)}\doublelabel{argument-r
y6 = previous(R); // error (component, no Component Expression)
\end{lstlisting}
\end{example}
\item[The input argument is a \emph{parameter expression}:]
The meaning is that the input argument when calling the operator must
have parameter variability, that is the argument must depend directly
or indirectly only on parameters, constants or literals, see
\autoref{variability-of-expressions}.
\end{definition}

\begin{definition}[\emph{{[}The input argument is a{]}} parameter expression]
The meaning is that the input argument when calling the operator must have parameter variability, that is the argument must depend directly or indirectly only on parameters, constants or literals,
see \autoref{variability-of-expressions}.
\begin{nonnormative}
The reason for this restriction is that the value of the input argument needs to be evaluated during translation, in order that clock analysis can be performed during translation.
\end{nonnormative}
Expand All @@ -331,12 +322,12 @@ \subsection{Argument Restrictions (Component Expression)}\doublelabel{argument-r
y3 = subSample(u, factor=3*u); // error (general expression)
\end{lstlisting}
\end{example}
\item[The input argument is an \emph{expression}:]
There is no restriction on the input argument when calling the
operator. This notation is used to emphasis when a standard function
call is used (is an \emph{expression}), instead of restricting the input
(is a \emph{component expression}).
\end{description}
\end{definition}

\begin{definition}[\emph{{[}The input argument is an{]}} expression]
There is no restriction on the input argument when calling the operator. This notation is used to emphasis when a standard function call is used (is an \emph{expression}), instead of restricting
the input (is a \emph{component expression}).
\end{definition}

Note that the operators defined in this chapter do not automatically vectorize,
but some operate on arrays in a similar way.
Expand Down

0 comments on commit 8f1f8d1

Please sign in to comment.