diff --git a/chapters/annotations.tex b/chapters/annotations.tex index b772a759b..d10ee9986 100644 --- a/chapters/annotations.tex +++ b/chapters/annotations.tex @@ -1900,7 +1900,7 @@ \subsection{Mapping of Versions to File System}\label{mapping-of-versions-to-fil \subsection{Version Date and Build Information}\label{version-date-and-build-information} -Besides version information, a top level class can have additionally the following top-level annotations to specify associated information to the version number:% +Besides version information, a top-level class can have additionally the following top-level annotations to specify associated information to the version number:% \begin{lstlisting}[language=modelica] String versionDate "UTC date of first version build (in format: YYYY-MM-DD)"; Integer versionBuild "Larger number is a more recent maintenance update"; @@ -2080,8 +2080,7 @@ \subsection{Protection of Classes}\label{protection-of-classes} has no effect. \begin{example} -If the annotation is given on the top level of a package and at no other class in this -package, then the \lstinline!access! annotation holds for all classes in this package. +If the annotation is given on the top level of a package and at no other class in this package, then the \lstinline!access! annotation holds for all classes in this package. \end{example} \begin{nonnormative} diff --git a/chapters/classes.tex b/chapters/classes.tex index 2b5792ecd..6c64b9421 100644 --- a/chapters/classes.tex +++ b/chapters/classes.tex @@ -240,7 +240,8 @@ \subsubsection{Prefix Rules}\label{prefix-rules} variables declared as \lstinline!output! are computed in the function body, see \cref{function-call}. \item - In \emph{simulation} \emph{models} and \emph{blocks} (i.e., on the top level of a model or block that shall be simulated), these prefixes define the interaction with the environment where the simulation model or block is used. Especially, the \lstinline!input! prefix defines that values for such a variable have to be provided from the simulation environment and the \lstinline!output! prefix defines that the values of the corresponding variable can be directly utilized in the simulation environment, see the notion of \emph{globally balanced} in \cref{balanced-models}. + In \emph{simulation} \emph{models} and \emph{blocks} (i.e., on the top level of a model or block that shall be simulated), these prefixes define the interaction with the environment where the simulation model or block is used. + Especially, the \lstinline!input! prefix defines that values for such a variable have to be provided from the simulation environment and the \lstinline!output! prefix defines that the values of the corresponding variable can be directly utilized in the simulation environment, see the notion of \emph{globally balanced} in \cref{balanced-models}. \item In component \emph{models} and \emph{blocks}, the \lstinline!input! prefix defines that a binding equation has to be provided for the corresponding @@ -943,7 +944,7 @@ \section{Balanced Models}\label{balanced-models} This represents the number of connection equations that will be provided when the class is used. \end{nonnormative} \item - The number of (top level) public input variables that neither are connectors nor have binding equations. + The number of (top-level) public input variables that neither are connectors nor have binding equations. \begin{nonnormative} I.e., top-level inputs are treated as known variables. This represents the number of binding equations that will be provided when the class is used. \end{nonnormative} @@ -990,7 +991,7 @@ \section{Balanced Models}\label{balanced-models} \item The number of input and flow variables present in each (top-level) public connector component. \item - The number of (top level) public input variables that neither are connectors nor have binding equations. + The number of (top-level) public input variables that neither are connectors nor have binding equations. \begin{nonnormative} I.e., top-level inputs are treated as known variables. \end{nonnormative} diff --git a/chapters/equations.tex b/chapters/equations.tex index 0927ff177..b9c50f849 100644 --- a/chapters/equations.tex +++ b/chapters/equations.tex @@ -934,7 +934,7 @@ \subsection{Recommended selection of start-attributes}\label{recommended-selecti \begin{nonnormative} A model has a hierarchical component structure. Each component of a model can be given a unique model component hierarchy level number. -The top level model has a level number of 1. +The top-level model has a level number of 1. The level number increases by 1 for each level down in the model component hierarchy. The model component hierarchy level number is used to give \lstinline!start!-attribute a confidence number, where a lower number means that the \lstinline!start!-attribute is more confident. Loosely, if the \lstinline!start!-attribute is set or modified on level $i$ then the confidence number is $i$. diff --git a/chapters/packages.tex b/chapters/packages.tex index a71836510..3a1a5514e 100644 --- a/chapters/packages.tex +++ b/chapters/packages.tex @@ -84,7 +84,7 @@ \subsection{Lookup of Imported Names}\label{lookup-of-imported-names} Lookup of the name of an imported package or class deviates from the normal lexical lookup. For example, consider \lstinline!A.B.C! in the \lstinline!import!-clauses \lstinline!import A.B.C;!, \lstinline!import D = A.B.C;!, or \lstinline!import A.B.C.*;!. -Here, lookup starts with the lexical lookup of the first part of the name (\lstinline!A!) at the top-level. +Here, lookup starts with the lexical lookup of the first part of the name (\lstinline!A!) at the top level. Qualified \lstinline!import!-clauses may only refer to packages or elements of packages, i.e., in \lstinline!import A.B.C;! or \lstinline!import D = A.B.C;!, \lstinline!A.B! must be a package. Unqualified \lstinline!import!-clauses may only import from packages, i.e., in \lstinline!import A.B.*;!, \lstinline!A.B! must be a package. diff --git a/chapters/scoping.tex b/chapters/scoping.tex index 2b765f950..335a47444 100644 --- a/chapters/scoping.tex +++ b/chapters/scoping.tex @@ -646,7 +646,7 @@ \subsection{Generation of the flat equation system}\label{generation-of-the-flat \end{nonnormative} The flat equation system consists of a list of variables with dimensions, flattened equations and algorithms, and a list of called functions which are flattened separately. -A flattened function consists of algorithm or external-clause and top-level variables (variables directly declared in the function or one of its base classes) -- which recursively can contain other variables; the list of non-top level variables is not needed. +A flattened function consists of algorithm or external-clause and top-level variables (variables directly declared in the function or one of its base classes) -- which recursively can contain other variables; the list of non-top-level variables is not needed. The instance tree is recursively walked through as follows for elements of the class (if necessary a partially instantiated component is first diff --git a/chapters/statemachines.tex b/chapters/statemachines.tex index b6035cc6b..e9ec0f44b 100644 --- a/chapters/statemachines.tex +++ b/chapters/statemachines.tex @@ -233,15 +233,11 @@ \section{State Machine Semantics}\label{state-machine-semantics} states are enumerated from 1 and up. The transition conditions are stored in a separate array \lstinline!c[:]! since they are time varying. -The semantics model is a discrete-time system with inputs \{\lstinline!c[:]!, -\lstinline!active!, \lstinline!reset!\} with \lstinline!t! being an array corresponding to the inputs to the -transition operator, outputs \{\lstinline!activeState!, \lstinline!activeReset!, -\lstinline!activeResetStates[:]!\} and states \{\lstinline!nextState!, \lstinline!nextReset!, -\lstinline!nextResetStates[:]!\}. For a top level state machine, active is -always true. For sub-state machines, active is true only when the parent -state is active. For a top level state machine, reset is true at the -first activation only. For sub-state machine, reset is propagated from -the state machines higher up. +The semantics model is a discrete-time system with inputs \{\lstinline!c[:]!, \lstinline!active!, \lstinline!reset!\} with \lstinline!t! being an array corresponding to the inputs to the transition operator, outputs \{\lstinline!activeState!, \lstinline!activeReset!, \lstinline!activeResetStates[:]!\} and states \{\lstinline!nextState!, \lstinline!nextReset!, \lstinline!nextResetStates[:]!\}. +For a top-level state machine, active is always true. +For sub-state machines, active is true only when the parent state is active. +For a top-level state machine, reset is true at the first activation only. +For sub-state machine, reset is propagated from the state machines higher up. \subsection{State Activation}\label{state-activation} @@ -467,10 +463,8 @@ \subsection{Example}\label{example} \item \lstinline!state1! is a meta state with two parallel state machines in it. \item - \lstinline!stateA! declares \lstinline!v! as \lstinline!outer output!. \lstinline!state1! is on an intermediate - level and declares \lstinline!v! as \lstinline!inner outer output!, i.e.\ matches lower level - \lstinline!outer v! by being \lstinline!inner! and also matches higher level \lstinline!inner v! by being - \lstinline!outer!. The top level declares \lstinline!v! as \lstinline!inner! and gives the start value. + \lstinline!stateA! declares \lstinline!v! as \lstinline!outer output!. \lstinline!state1! is on an intermediate level and declares \lstinline!v! as \lstinline!inner outer output!, i.e.\ matches lower level \lstinline!outer v! by being \lstinline!inner! and also matches higher level \lstinline!inner v! by being \lstinline!outer!. + The top level declares \lstinline!v! as \lstinline!inner! and gives the start value. \item \lstinline!count! is defined with a start value in \lstinline!state1!. It is reset when a reset transition (\lstinline!v >= 20!) is made to \lstinline!state1!.