From def54a691540c6866baaca9b847e0ae6015f4054 Mon Sep 17 00:00:00 2001 From: OLSSON Hans Date: Fri, 9 Oct 2020 17:31:49 +0200 Subject: [PATCH] Replace 'may not' by 'shall not' And in some cases 'cannot', and in one case rewrite it completely. Closes #901 --- chapters/classes.tex | 14 ++++++------- chapters/connectors.tex | 12 +++++------ chapters/equations.tex | 6 +++--- chapters/functions.tex | 30 ++++++++++++++-------------- chapters/inheritance.tex | 2 +- chapters/interface.tex | 8 ++++---- chapters/introduction.tex | 2 +- chapters/lexicalstructure.tex | 2 +- chapters/operatorsandexpressions.tex | 4 ++-- chapters/packages.tex | 6 +++--- chapters/scoping.tex | 6 +++--- chapters/statemachines.tex | 2 +- chapters/statements.tex | 8 ++++---- chapters/syntax.tex | 2 +- 14 files changed, 52 insertions(+), 52 deletions(-) diff --git a/chapters/classes.tex b/chapters/classes.tex index 0cf4c4106..915bf8a5c 100644 --- a/chapters/classes.tex +++ b/chapters/classes.tex @@ -17,8 +17,8 @@ \section{Access Control -- Public and Protected Elements}\label{access-control-p Members of a Modelica class can have two levels of visibility: \lstinline!public! or \lstinline!protected!. The default is \lstinline!public! if nothing else is specified -A protected element, \lstinline!P!, in classes and components may not be accessed via dot notation (e.g., \lstinline!A.P!, \lstinline!a.P!, \lstinline!a[1].P!, \lstinline!a.b.P!, -\lstinline!.A.P!; but there is no restriction on using \lstinline!P! or \lstinline!P.x! for a protected element \lstinline!P!). They may not be modified or redeclared except for +A protected element, \lstinline!P!, in classes and components shall not be accessed via dot notation (e.g., \lstinline!A.P!, \lstinline!a.P!, \lstinline!a[1].P!, \lstinline!a.b.P!, +\lstinline!.A.P!; but there is no restriction on using \lstinline!P! or \lstinline!P.x! for a protected element \lstinline!P!). They shall not be modified or redeclared except for modifiers applied to protected elements in a base-class modification (not inside any component or class) and the modifier on the declaration of the protected element. \begin{example} @@ -237,7 +237,7 @@ \subsubsection{Prefix Rules}\label{prefix-rules} of the component (this is done after verifying that the type prefixes occurring on elements of the component are correct; e.g.\ the \lstinline!flow! prefix can be used on a record component and all the record elements will -generate zero-sum equations, even if elements of a record may not be +generate zero-sum equations, even if elements of a record shall not be declared with the flow prefix). When any of the type prefixes \lstinline!flow!, \lstinline!stream!, \lstinline!input! and \lstinline!output! are applied for a structured component, no element of the component may have any of these type prefixes. @@ -388,7 +388,7 @@ \subsection{Component Variability Prefixes discrete, parameter, constant}\label{ If a \lstinline!Real! variable is declared with the prefix \lstinline!discrete! it must in a simulation model be assigned in a when-clause, either by an assignment -or an equation. The variable assigned in a when-clause may not be +or an equation. The variable assigned in a when-clause shall not be defined in a sub-component of model or block specialized class. (This is to keep the property of balanced models.) @@ -531,7 +531,7 @@ \subsection{Conditional Component Declaration}\label{conditional-component-decla A parameter-expression is required since it shall be evaluated at compile time. \end{nonnormative} -A redeclaration of a component may not include a condition attribute; +A redeclaration of a component shall not include a condition attribute; and the condition attribute is kept from the original declaration (see \cref{interface-compatibility-or-subtyping}). @@ -802,7 +802,7 @@ \section{Specialized Classes}\label{specialized-classes} (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 may 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. +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. \item \lstinline!type! -- May only be predefined types, enumerations, array of type, or classes extending from type. @@ -828,7 +828,7 @@ \section{Specialized Classes}\label{specialized-classes} \item \lstinline!connector! -- 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). -Enhanced to allow \lstinline!connect! to components of connector classes. The elements of a connector may not have prefixes \lstinline!inner!, or \lstinline!outer!. May only contain components of specialized class \lstinline!connector!, \lstinline!record! and \lstinline!type!. +Enhanced to allow \lstinline!connect! to components of connector classes. The elements of a connector shall not have prefixes \lstinline!inner!, or \lstinline!outer!. May only contain components of specialized class \lstinline!connector!, \lstinline!record! and \lstinline!type!. \item \lstinline!package! -- May only contain declarations of classes and constants. Enhanced to allow \lstinline!import! of elements of packages. (See also \cref{packages} on packages.) diff --git a/chapters/connectors.tex b/chapters/connectors.tex index 23cfec1c5..987ee060a 100644 --- a/chapters/connectors.tex +++ b/chapters/connectors.tex @@ -221,7 +221,7 @@ \subsection{Expandable Connectors}\label{expandable-connectors} \end{example} \item - An expandable connector may not contain a component declared with the + An expandable connector shall not contain a component declared with the prefix \lstinline!flow!, but may contain non-expandable connector components with \lstinline!flow! components. \begin{example} @@ -268,7 +268,7 @@ \subsection{Expandable Connectors}\label{expandable-connectors} \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 may not be used without subscripts, and the subscripts must slice the array so that the sizeless dimensions are removed. +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: @@ -589,13 +589,13 @@ \section{Restrictions of Connections and Connectors}\label{restrictions-of-conne \begin{itemize} \item The connect-equations (and the special functions for overdetermined - connectors) may only be used in equations and may not be used inside + connectors) can only be used in equations and shall not be used inside if-equations with non-parametric condition, or in when-equations. \begin{nonnormative} For-equations always have parameter expressions for the array expression. \end{nonnormative} \item - A connector component may not be declared with the prefix parameter or + A connector component shall not be declared with the prefix parameter or constant. In the connect-equation the primitive components may only connect parameter variables to parameter variables and constant variables to constant variables. @@ -642,7 +642,7 @@ \section{Restrictions of Connections and Connectors}\label{restrictions-of-conne \item Variables from a protected outside connector must be part of a connection set containing at least one inside connector or one - declared public outside connector (i.e.\ it may not be an implicitly + declared public outside connector (i.e.\ it shall not be an implicitly defined part of an expandable connector). \begin{nonnormative} Otherwise it would not be possible to deduce the causality for the expandable connector element. @@ -651,7 +651,7 @@ \section{Restrictions of Connections and Connectors}\label{restrictions-of-conne In a connection set all variables having non-empty quantity attribute must have the same quantity attribute. \item - A \lstinline!connect! equation may not (directly or indirectly) connect two + A \lstinline!connect! equation shall not (directly or indirectly) connect two connectors of \lstinline!outer! elements. \begin{nonnormative} Indirectly is similar to them being part of the same connection set. However, connections to \lstinline!outer! elements are ``moved up'' before forming diff --git a/chapters/equations.tex b/chapters/equations.tex index 1e6cf3d7e..d629afded 100644 --- a/chapters/equations.tex +++ b/chapters/equations.tex @@ -279,7 +279,7 @@ \subsubsection{Restrictions on Equations within When-Equations}\label{restrictio \begin{itemize} \item - When-equations may not occur inside initial equations. + When-equations shall not occur inside initial equations. \item When-equations cannot be nested. \end{itemize} @@ -354,7 +354,7 @@ \subsubsection{Application of the Single-assignment Rule to When-Equations}\labe when-equations: \begin{itemize} \item - Two when-equations may \emph{not} define the same variable. + Two when-equations shall \emph{not} define the same variable. \begin{nonnormative} Without this rule this may actually happen for the erroneous @@ -842,7 +842,7 @@ \section{Initialization, initial equation, and initial algorithm}\label{initiali \lstinline!fixed = false!) in order to compute a solution numerically. It may be difficult for a user to figure out how many initial equations have to be added, especially if the system has a higher index. A tool may add or remove initial equations -automatically such that the resulting system is structurally nonsingular. In these cases diagnostics are appropriate since the result is not unique and may not be what the user +automatically such that the resulting system is structurally nonsingular. In these cases diagnostics are appropriate since the result is not unique and not necessarily what the user expects. A missing initial value of a discrete-time variable which does not influence the simulation result, may be automatically set to the \lstinline!start! value or its default without informing the user. For example, variables assigned in a when-clause which are not accessed outside of the when-clause and where \lstinline!pre! is not explicitly used on these variables, do not have an effect on the simulation. diff --git a/chapters/functions.tex b/chapters/functions.tex index 776718dc6..1d9980896 100644 --- a/chapters/functions.tex +++ b/chapters/functions.tex @@ -136,11 +136,11 @@ \section{Function as a Specialized Class}\label{function-as-a-specialized-class} All public variables are formal parameters. \item Input formal parameters are read-only after being bound to the actual - arguments or default values, i.e., they may not be assigned values in + arguments or default values, i.e., they shall not be assigned values in the body of the function. \item - A function may \emph{not be used in connections}, may not have - \emph{equations}, may not have \emph{initial algorithms}. + A function shall \emph{not be used in connections}, shall not have + \emph{equations}, shall not have \emph{initial algorithms}. \item A function can have at most \emph{one algorithm} section or \emph{one external function interface} (not both), which, if present, is the @@ -152,12 +152,12 @@ \section{Function as a Specialized Class}\label{function-as-a-specialized-class} \lstinline!model!, \lstinline!block!, \lstinline!operator! or \lstinline!connector! components. \item - The elements of a function may not have prefixes \lstinline!inner!, or \lstinline!outer!. + The elements of a function shall not have prefixes \lstinline!inner!, or \lstinline!outer!. \item A function may have zero or one external function interface, which, if present, is the external definition of the function. \item - For a function to be called in a simulation model, the function may + For a function to be called in a simulation model, the function shall not be partial, and the output variables must be assigned inside the function either in binding equations or in an algorithm section, or have an external function interface as its body, or be defined as a @@ -380,7 +380,7 @@ \section{Pure Modelica Functions}\label{pure-modelica-functions} Examples of restrictions on optimizing pure functions: \begin{lstlisting}[language=modelica] - Real x=if noEvent(abs(x))<1 then asin(x) else 0; // May not move asin(x) out of then + Real x=if noEvent(abs(x))<1 then asin(x) else 0; // Cannot move asin(x) out of then algorithm assertCheck(p, T); // Must call function algorithm @@ -389,7 +389,7 @@ \section{Pure Modelica Functions}\label{pure-modelica-functions} end if; y:=y+asin(x); y:=y+someOtherFunction(x); - // May not evaluate someOtherFunction(x) before asin(x) - unless b is true + // Cannot evaluate someOtherFunction(x) before asin(x) - unless b is true // The reason is that asin(x) may fail and someOtherFunction may hang, // and it might be possible to recover from this error. \end{lstlisting} @@ -433,11 +433,11 @@ \subsection{Positional or Named Input Arguments of Functions}\label{positional-o $N$ slots, where the order of the parameters is given by the order of the component declarations in the function definition. Next, for each named argument \lstinline!identifier = expression!, the \lstinline!identifier! is used to determine the corresponding slot. The value of the argument is placed in the slot, filling it (it is an error if this slot is already filled). When all arguments have been processed, the slots that are still unfilled are filled with the corresponding default value of the function definition. The default values may depend on other inputs (these dependencies -must be acyclical in the function) -- the values for those other inputs will then be substituted into the default values (this process may be repeated if the default value for that input depend on another input). The default values for inputs may not depend on non-input variables in the function. The list of filled slots is used as the argument list for the call (it is an error if any +must be acyclical in the function) -- the values for those other inputs will then be substituted into the default values (this process may be repeated if the default value for that input depend on another input). The default values for inputs shall not depend on non-input variables in the function. The list of filled slots is used as the argument list for the call (it is an error if any unfilled slots still remain). Special purpose operators with function syntax defined in the -specification may not be called with named arguments, unless otherwise +specification shall not be called with named arguments, unless otherwise noted. The type of each argument must agree with the type of the corresponding @@ -1348,7 +1348,7 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati containing reals (handled recursively) from the original record. When using smoothOrder, then the derivative record is automatically constructed. The function must have at least one input containing reals. -The output list of the derivative function may not be empty. +The output list of the derivative function shall not be empty. \begin{example} Here is one example use case with records mixing \lstinline!Real! and @@ -1430,7 +1430,7 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati useful to define the function as follows (the additional derivative = \lstinline!f_general_der! is optional and can be used when the derivative of the matrix or offset is non-zero). Note that \lstinline!f_der! must have -\lstinline!zeroDerivative! for both \lstinline!y! and \lstinline!offset!, but \lstinline!f_general_der! may not have +\lstinline!zeroDerivative! for both \lstinline!y! and \lstinline!offset!, but \lstinline!f_general_der! shall not have \lstinline!zeroDerivative! for either of them (it may \lstinline!zeroDerivative! for \lstinline!x_der!, \lstinline!y_der!, or \lstinline!offset_der!). @@ -2207,7 +2207,7 @@ \subsection{Annotations for External Libraries and Include Files}\label{annotati platforms. The library on Windows may refer to a lib-file (static library), both a lib- and dll-file (in this case the lib-file is an import-library), -or just a dll-file. It may not refer to an obj-file. +or just a dll-file. It shall not refer to an obj-file. If the directory for the specific compiler version is missing the platform specific directory is used. @@ -2556,7 +2556,7 @@ \subsubsection{Utility Functions for Allocating Strings}\label{utility-functions \end{nonnormative} \begin{nonnormative} -The reason why one may not use, for instance, \lstinline[language=C]!malloc! for string allocation is that a Modelica simulation environment may have +The reason why one should avoid, for instance, \lstinline[language=C]!malloc! for string allocation is that a Modelica simulation environment may have its own allocation scheme, e.g., a special stack for local variables of a function. \end{nonnormative} @@ -2589,7 +2589,7 @@ \subsection{External Objects}\label{external-objects} must not require any other calls to be made for the initialization to be complete (e.g., from an initial algorithm or initial equation). The destructor shall delete the object, and must not require any other - calls to be made for the deletion to be complete (e.g., from a \lstinline!when terminal()! clause). The constructor may not assume that pointers sent + calls to be made for the deletion to be complete (e.g., from a \lstinline!when terminal()! clause). The constructor shall not assume that pointers sent to the external object will remain valid for the life-time of the external object. An exception is that if the pointer to another external object is given as argument to the constructor, that pointer will remain valid as long as the other external object lives. \begin{nonnormative} @@ -2599,7 +2599,7 @@ \subsection{External Objects}\label{external-objects} \begin{nonnormative} External objects may be an input (or part of an input) to a function, in that case the destructor is not called (since the external object is active before and after the function call). Normally this is an external function, but it could be a non-external function as well (e.g.\ calling external functions one - or more times). The function input may not have a default value using the constructor. + or more times). The function input shall not have a default value using the constructor. \end{nonnormative} \item Classes derived from \lstinline!ExternalObject! can neither be used in an diff --git a/chapters/inheritance.tex b/chapters/inheritance.tex index 07bd5aa94..9f5eb4b3e 100644 --- a/chapters/inheritance.tex +++ b/chapters/inheritance.tex @@ -1031,7 +1031,7 @@ \subsection{Restrictions on Redeclarations}\label{restrictions-on-redeclarations \item An element declared as constant cannot be redeclared \item - An element declared as final may not be modified, and thus not + An element declared as final shall not be modified, and thus not redeclared \item Modelica does not allow a protected element to be redeclared as diff --git a/chapters/interface.tex b/chapters/interface.tex index a5f54801a..bafead2e9 100644 --- a/chapters/interface.tex +++ b/chapters/interface.tex @@ -311,20 +311,20 @@ \section{Interface Compatibility or Subtyping}\label{interface-compatibility-or- \item If \lstinline!A! has an \lstinline!operator record! base-class then \lstinline!B! must also have one and it must be the same. If \lstinline!A! does not have an operator record base-class - then \lstinline!B! may not have one. See \cref{overloaded-operators}. + then \lstinline!B! shall not have one. See \cref{overloaded-operators}. \item If \lstinline!A! is derived from \lstinline!ExternalObject!, then \lstinline!B! must also be derived from \lstinline!ExternalObject! and have the same full name. If \lstinline!A! is not derived from - \lstinline!ExternalObject! then \lstinline!B! may not derived from \lstinline!ExternalObject!. See + \lstinline!ExternalObject! then \lstinline!B! shall not be derived from \lstinline!ExternalObject!. See \cref{external-objects}. \item - If \lstinline!B! is not replaceable then \lstinline!A! may not be replaceable. + If \lstinline!B! is not replaceable then \lstinline!A! shall not be replaceable. \item If \lstinline!B! is transitively non-replaceable then \lstinline!A! must be transitively non-replaceable (\cref{transitively-non-replaceable}). For all elements of the inheritance interface of \lstinline!B! there must exist a compatible element with the same name and visibility in the inheritance interface of \lstinline!A!. The interface - of \lstinline!A! may not contain any other elements. + of \lstinline!A! shall not contain any other elements. \begin{nonnormative} We might even extend this to say that \lstinline!A! and \lstinline!B! should have the same contents, as in the additional restrictions below. \end{nonnormative} diff --git a/chapters/introduction.tex b/chapters/introduction.tex index 363f46bb2..14e321215 100644 --- a/chapters/introduction.tex +++ b/chapters/introduction.tex @@ -113,7 +113,7 @@ \section{Notation and Grammar}\label{notation-and-grammar} The meta symbols (of the extended BNF-grammar) are defined in~\cref{lexical-conventions}. Boldface denotes keywords of the Modelica language. Keywords are -reserved words and may not be used as identifiers, with the exception of +reserved words and shall not be used as identifiers, with the exception of \lstinline!initial! which is a keyword in section headings, and \lstinline!der! which is a keyword for declaration functions, but it is also possible to call the functions \lstinline!initial! and \lstinline!der!. diff --git a/chapters/lexicalstructure.tex b/chapters/lexicalstructure.tex index 641642fe5..a7205d5cf 100644 --- a/chapters/lexicalstructure.tex +++ b/chapters/lexicalstructure.tex @@ -107,7 +107,7 @@ \subsection{Names}\label{names} \subsection{Modelica Keywords}\label{modelica-keywords} -The following Modelica \emph{keywords} are reserved words and may not be +The following Modelica \emph{keywords} are reserved words and shall not be used as identifiers, except as listed in \cref{lexical-conventions}: \begin{center} \begin{tabular}{l l l l l} diff --git a/chapters/operatorsandexpressions.tex b/chapters/operatorsandexpressions.tex index 9b70fe2c5..541a40e3a 100644 --- a/chapters/operatorsandexpressions.tex +++ b/chapters/operatorsandexpressions.tex @@ -487,7 +487,7 @@ \subsection{Numeric Functions and Conversion Functions}\label{numeric-functions- \lstinline!(if leftJustified then "-" else "") + String(minimumLength) + "d"! \end{itemize} -Form of the \lstinline!format! string: According to ANSI-C the format string specifies one conversion specifier (excluding the leading \%), may not contain length modifiers, and may not use `\lstinline!*!' for width and/or precision. For all numeric values the format specifiers `\lstinline!f!', `\lstinline!e!', `\lstinline!E!', `\lstinline!g!', `\lstinline!G!' are allowed. For integral values it is also allowed to use the `\lstinline!d!', `\lstinline!i!', `\lstinline!o!', `\lstinline!x!', `\lstinline!X!', `\lstinline!u!', and `\lstinline!c!' format specifiers (for non-integral values a tool may round, truncate or use a different format if the integer conversion characters are used). +Form of the \lstinline!format! string: According to ANSI-C the format string specifies one conversion specifier (excluding the leading \%), shall not contain length modifiers, and shall not use `\lstinline!*!' for width and/or precision. For all numeric values the format specifiers `\lstinline!f!', `\lstinline!e!', `\lstinline!E!', `\lstinline!g!', `\lstinline!G!' are allowed. For integral values it is also allowed to use the `\lstinline!d!', `\lstinline!i!', `\lstinline!o!', `\lstinline!x!', `\lstinline!X!', `\lstinline!u!', and `\lstinline!c!' format specifiers (for non-integral values a tool may round, truncate or use a different format if the integer conversion characters are used). The `\lstinline!x!'/`\lstinline!X!' formats (hexa-decimal) and \lstinline!c! (character) for \lstinline!Integer! values give results that do not agree with the Modelica grammar. \end{semantics} @@ -954,7 +954,7 @@ \subsubsection{cardinality (deprecated)}\label{cardinality-deprecated} \end{lstlisting} \end{nonnormative} -The cardinality is counted after removing conditional components, and may not be applied to expandable connectors, elements in expandable connectors, or to arrays of connectors (but can be applied to +The cardinality is counted after removing conditional components, and shall not be applied to expandable connectors, elements in expandable connectors, or to arrays of connectors (but can be applied to the scalar elements of array of connectors). \lstinline!cardinality! should only be used in the condition of assert and if-statements that do not contain \lstinline!connect! and similar operators, see \cref{clocked-discrete-time-and-clocked-discretized-continuous-time-partition}). diff --git a/chapters/packages.tex b/chapters/packages.tex index 0ddb812b1..b6408c774 100644 --- a/chapters/packages.tex +++ b/chapters/packages.tex @@ -129,7 +129,7 @@ \subsection{Summary of Rules for Import Clauses}\label{summary-of-rules-for-impo An imported package or definition should always be referred to by its fully qualified name in the import-clause. \item - Multiple qualified import-clauses may not have the same import name. + Multiple qualified import-clauses shall not have the same import name. \end{itemize} \section{The Modelica Library Path -- MODELICAPATH}\label{the-modelica-library-path-modelicapath} @@ -315,14 +315,14 @@ \section{External resources}\label{external-resources} scheme or when restructuring packages that resource references resolve to the same resource). Any storage scheme should be constrained such that a resource with a given path should be unique for any package name -that precedes it. The first part of the path may not be the name of a +that precedes it. The first part of the path shall not be the name of a class in the package given by the authority. When Modelica packages are stored hierarchically in a file-system (i.e.\ package \lstinline!A! in a directory \filename{A} containing \filename{package.mo}) the resource \filename{modelica://A/Resources/C.jpg} should be stored in the file \filename{A/Resources/C.jpg}, it is not recommend to use \filename{modelica://A.B/C.jpg} for referencing resources; it could be stored in the file \filename{A/B/C.jpg} -- which is counter-intuitive if \lstinline!A.B! is stored together with \lstinline!A!. When Modelica packages are stored in other formats a similar mapping should be defined, such that a resource with a given path should be unique for any package name that precedes it. The first -part of the path may not be the name of a class in the package given by the authority. As above for \filename{Modelica 3.2.1/package.mo} i.e.\ resources starting from +part of the path shall not be the name of a class in the package given by the authority. As above for \filename{Modelica 3.2.1/package.mo} i.e.\ resources starting from \filename{Modelica 3.2.1}, and \filename{modelica://Modelica.Mechanics/C.jpg} is \filename{Modelica 3.2.1/Mechanics/C.jpg} -- regardless of whether \lstinline!Modelica.Mechanics! is stored in \filename{Modelica 3.2.1/package.mo}, \filename{Modelica 3.2.1/Mechanics/package.mo}, or \filename{Modelica 3.2.1/Mechanics.mo}. diff --git a/chapters/scoping.tex b/chapters/scoping.tex index 3c7957057..92c063727 100644 --- a/chapters/scoping.tex +++ b/chapters/scoping.tex @@ -123,7 +123,7 @@ \subsection{Composite Name Lookup}\label{composite-name-lookup} The rest of the name (e.g., \lstinline!B! or \lstinline!B.C!) is looked up among the declared named elements of the temporary flattened class. If the class does not satisfy the requirements for a package, the lookup is - restricted to encapsulated elements only. The class we look inside may + restricted to encapsulated elements only. The class we look inside shall not be partial in a simulation model. \end{itemize} @@ -172,7 +172,7 @@ \subsection{Global Name Lookup}\label{global-name-lookup} of the name (e.g., \lstinline!B! or \lstinline!B.C!) is looked up among the declared named elements of the temporary flattened class. If the class does not satisfy the requirements for a package, the lookup is restricted to - encapsulated elements only. The class we look inside may not be + encapsulated elements only. The class we look inside shall not be partial. \end{itemize} @@ -191,7 +191,7 @@ \section{Instance Hierarchy Name Lookup of Inner Declarations}\label{instance-hi with the same name but using the prefix \lstinline!inner! which is nearest in the enclosing instance hierarchy of the \lstinline!outer! element declaration. -Outer component declarations may not have modifications (including binding equations). +Outer component declarations shall not have modifications (including binding equations). Outer class declarations should be defined using short-class definitions without modifications. However, see also \cref{simultaneous-inner-outer-declarations}. diff --git a/chapters/statemachines.tex b/chapters/statemachines.tex index 16a9c9ca6..1b6c5a0e1 100644 --- a/chapters/statemachines.tex +++ b/chapters/statemachines.tex @@ -67,7 +67,7 @@ \section{Transitions}\label{transitions} \end{tabular} \end{center} -The \lstinline!transition! and \lstinline!initialState! equations may only be used in equations and may not be used inside if-equations with non-parametric condition, or in when-equations. +The \lstinline!transition! and \lstinline!initialState! equations can only be used in equations and cannot be used inside if-equations with non-parametric condition, or in when-equations. The operators listed below are used to query the status of the state machine. \begin{center} diff --git a/chapters/statements.tex b/chapters/statements.tex index 3a78a4b7e..dbc4fa894 100644 --- a/chapters/statements.tex +++ b/chapters/statements.tex @@ -263,7 +263,7 @@ \subsubsection{Implicit Iteration Ranges}\label{implicit-iteration-ranges} \end{lstlisting} \end{example} -The size of an array -- the iteration range -- is evaluated on entry to the for-loop and the array size may not change during the execution of the for-loop. +The size of an array -- the iteration range -- is evaluated on entry to the for-loop and the array size shall not change during the execution of the for-loop. \subsubsection{Types as Iteration Ranges }\label{types-as-iteration-ranges} @@ -447,11 +447,11 @@ \subsubsection{Restrictions on When-Statements}\label{restrictions-on-when-state \item A when-statement shall not be used within a function. \item - When-statements may not occur inside initial algorithms. + When-statements shall not occur inside initial algorithms. \item When-statements cannot be nested. \item - When-statements may not occur inside while, if, and for-clauses in + When-statements shall not occur inside while, if, and for-clauses in algorithms. \end{itemize} @@ -511,6 +511,6 @@ \subsubsection{Assert Statement}\label{assert-statement} \subsubsection{Terminate Statement}\label{terminate-statement} -See \cref{terminate}. The terminate statement may not be in functions; In +See \cref{terminate}. The terminate statement shall not be in functions; In an algorithm outside a function it does not stop the execution of the current algorithm. diff --git a/chapters/syntax.tex b/chapters/syntax.tex index 27011cdf8..8ae0836b1 100644 --- a/chapters/syntax.tex +++ b/chapters/syntax.tex @@ -66,7 +66,7 @@ \section{Lexical conventions}\label{lexical-conventions} \end{nonnormative} \item Boldface denotes keywords of the Modelica language. Keywords are - reserved words and may not be used as identifiers. + reserved words and shall not be used as identifiers. \item Productions use hyphen as separator both in the grammar and in the text. Previously the grammar used underscore.