From 2c95ccc54f257da633f11101c94653777a0032eb Mon Sep 17 00:00:00 2001 From: Henrik Tidefelt Date: Sun, 11 Apr 2021 23:31:52 +0200 Subject: [PATCH] Write "base class" and "short class definition" with space --- chapters/annotations.tex | 35 ++++++++++++++--------------------- chapters/classes.tex | 30 +++++++++++------------------- chapters/functions.tex | 3 ++- chapters/inheritance.tex | 12 +++++------- chapters/interface.tex | 30 ++++++++++++------------------ chapters/revisions.tex | 9 ++++----- chapters/scoping.tex | 13 +++---------- 7 files changed, 51 insertions(+), 81 deletions(-) diff --git a/chapters/annotations.tex b/chapters/annotations.tex index 1912a6f1a..42f3b693d 100644 --- a/chapters/annotations.tex +++ b/chapters/annotations.tex @@ -356,7 +356,7 @@ \section{Annotations for Code Generation}\label{annotations-for-code-generation} "Evaluate" "=" ( false | true ) \end{lstlisting}\end{synopsis} \begin{semantics} -The annotation \lstinline!Evaluate! can occur in the component declaration, its type declaration, or a base-class of the type-declaration. +The annotation \lstinline!Evaluate! can occur in the component declaration, its type declaration, or a base class of the type-declaration. In the case of multiple conflicting annotations it is handled similarly to modifiers (e.g., an \lstinline!Evaluate! annotation on the component declaration takes precedence). In the case of hierarchical components it is applied to all components, overriding any \lstinline!Evaluate!-setting for specific components. The annotation \lstinline!Evaluate! only has effect for a component declared with the prefix \lstinline!parameter!. @@ -569,11 +569,8 @@ \section{Annotations for Graphical Objects}\label{annotations-for-graphical-obje \end{lstlisting} \end{example} -The graphics is specified as an ordered sequence of graphical -primitives, which are described below. First base-class contents is -drawn according to the order of the extends-clauses, and then graphical -primitives are drawn according to the order such that later objects can -cover earlier ones. +The graphics is specified as an ordered sequence of graphical primitives, which are described below. +First base class contents is drawn according to the order of the extends-clauses, and then graphical primitives are drawn according to the order such that later objects can cover earlier ones. \begin{nonnormative} Note that the ordered sequence is syntactically a valid Modelica annotation, although there @@ -666,9 +663,8 @@ \subsubsection{Coordinate Systems}\label{coordinate-systems} \item The coordinate system annotation given in the class (if specified). \item - The coordinate systems of the first base-class where the extent on the - extends-clause specifies a null-region (if any). Note that null-region - is the default for base-classes, see \cref{extends-clause}. + The coordinate systems of the first base class where the extent on the extends-clause specifies a null-region (if any). + Note that null-region is the default for base classes, see \cref{extends-clause}. \item The default coordinate system \lstinline!CoordinateSystem(extent = {{-100, -100}, {100, 100}})!. \end{enumerate} @@ -798,7 +794,7 @@ \subsection{Component Instance}\label{component-instance} \subsection{Extends clause}\label{extends-clause} -Each extends-clause (and short-class-definition, as stated in \cref{annotations-for-graphical-objects}) may have layer specific annotations which describe the rendering of the base class' icon and diagram layers in the derived class. +Each extends-clause (and short class definition, as stated in \cref{annotations-for-graphical-objects}) may have layer specific annotations which describe the rendering of the base class' icon and diagram layers in the derived class. \begin{lstlisting}[language=modelica] record IconMap @@ -1312,7 +1308,9 @@ \section{Annotations for the Graphical User Interface}\label{annotations-for-the \end{lstlisting}% \annotationindex{obsolete} -It indicates that the class ideally should not be used anymore and gives a message indicating the recommended action. This annotation is not inherited, the assumption is that if a class uses an obsolete class (as a base-class or as the class of one of the components) that shall be updated -- ideally without impacting users of the class. If that is not possible the current class can have also have an \lstinline!obsolete! annotation. +It indicates that the class ideally should not be used anymore and gives a message indicating the recommended action. +This annotation is not inherited, the assumption is that if a class uses an obsolete class (as a base class or as the class of one of the components) that shall be updated -- ideally without impacting users of the class. +If that is not possible the current class can have also have an \lstinline!obsolete! annotation. A component declaration may have the following annotation: \begin{lstlisting}[language=modelica] @@ -1674,13 +1672,8 @@ \subsubsection{Conversion rules}\label{conversion-rules} These functions can be called with literal strings or array of strings and vectorize according to \cref{scalar-functions-applied-to-array-arguments}. -All of these convert-functions only use inheritance among user -models, and not in the library that is used for the conversion -- thus -conversions of base-classes will require multiple conversion-calls; this -ensures that the conversion is independent of the new library structure. -The name of the class used as argument to \lstinline!convertElement! and \lstinline!convertModifiers! -is similarly the old name of the class, i.e.\ the name before it is -possibly converted by \lstinline!convertClass!. +All of these convert-functions only use inheritance among user models, and not in the library that is used for the conversion -- thus conversions of base classes will require multiple conversion-calls; this ensures that the conversion is independent of the new library structure. +The name of the class used as argument to \lstinline!convertElement! and \lstinline!convertModifiers! is similarly the old name of the class, i.e.\ the name before it is possibly converted by \lstinline!convertClass!. \begin{nonnormative} Specifying conversions using the old name of a class allows the conversion to be done without access to the old @@ -1795,7 +1788,8 @@ \subsubsection{Conversion rules}\label{conversion-rules} This can be used to handle the case where the default value was changed. \end{nonnormative} -Converting modifiers with cardinality is used to remove the deprecated operator \lstinline!cardinality! from model libraries, and replace tests on cardinality in models by parameters explicitly enabling the different cases. The case where the old class is used as a base-class, and there exist outside connections to \lstinline!a!, and there is \lstinline!convertModifiers! involving the cardinality of \lstinline!a! is not handled. +Converting modifiers with cardinality is used to remove the deprecated operator \lstinline!cardinality! from model libraries, and replace tests on cardinality in models by parameters explicitly enabling the different cases. +The case where the old class is used as a base class, and there exist outside connections to \lstinline!a!, and there is \lstinline!convertModifiers! involving the cardinality of \lstinline!a! is not handled. \begin{nonnormative} Having a parameter for explicitly enabling the different cases means that instead of model \lstinline!A! internally testing if its @@ -1862,8 +1856,7 @@ \subsubsection{Conversion rules}\label{conversion-rules} Boolean b=a.quasiStatic; end B; \end{lstlisting} -The \lstinline!convertElement! call for \lstinline!DC_ElectricalExcited! is needed to avoid relying on base-classes -in the original library where \lstinline!DC_ElectricalExcited! inherits from \lstinline!PartialBasicDCMachine!. +The \lstinline!convertElement! call for \lstinline!DC_ElectricalExcited! is needed to avoid relying on base classes in the original library where \lstinline!DC_ElectricalExcited! inherits from \lstinline!PartialBasicDCMachine!. However, the inheritance among the models to convert (in this case \lstinline!B! inherits from \lstinline!A!) should be handled. \end{example} diff --git a/chapters/classes.tex b/chapters/classes.tex index 6c323ee95..49d52be87 100644 --- a/chapters/classes.tex +++ b/chapters/classes.tex @@ -17,9 +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!\indexinline{public} or \lstinline!protected!\indexinline{protected}. The default is \lstinline!public! if nothing else is specified. -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. +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} \begin{lstlisting}[language=modelica] @@ -164,7 +163,7 @@ \subsection{Component Declaration Static Semantics}\label{component-declaration- % Seems sufficient to just have \indexinline variant of 'partial' in index. A class defined with \lstinline!partial!\indexinline{partial} in the \lstinline[language=grammar]!class-prefixes! is called a \firstuse{partial} class. -Such a class is allowed to be incomplete, and cannot be instantiated in a simulation model; useful, e.g., as a base-class. +Such a class is allowed to be incomplete, and cannot be instantiated in a simulation model; useful, e.g., as a base class. If the \lstinline[language=grammar]!type-specifier! of the component does not denote a built-in type, the name of the type is looked up (\cref{static-name-lookup}). The found type is flattened with a new environment and the partially flattened enclosing class of the component. @@ -645,7 +644,7 @@ \subsection{Short Class Definitions}\label{short-class-definitions} replaceable model LoadError extends Resistor(R=R); // Gives the singular equation R=R, since the right-hand side R - // is searched for in LoadError and found in its base-class Resistor. + // is searched for in LoadError and found in its base class Resistor. end LoadError constrainedby TwoPin; encapsulated model Load2=.Resistor(R=2); // Ok encapsulated model LoadR=.Resistor(R=R); // Illegal @@ -670,11 +669,8 @@ \subsection{Short Class Definitions}\label{short-class-definitions} 'end' TN; \end{lstlisting} -Such an array class has exactly one anonymous component (\_); see also -\cref{restriction-on-combining-base-classes-and-other-elements}. -When a component of such an array class type is -flattened, the resulting flattened component type is an array type with -the same dimensions as \_ and with the optional modifier applied. +Such an array class has exactly one anonymous component (\_); see also \cref{restriction-on-combining-base-classes-and-other-elements}. +When a component of such an array class type is flattened, the resulting flattened component type is an array type with the same dimensions as \_ and with the optional modifier applied. \begin{example} The types of \lstinline!f1! and \lstinline!f2! are identical: @@ -694,13 +690,9 @@ \subsection{Short Class Definitions}\label{short-class-definitions} \end{lstlisting} \end{example} -If a short class definition does not specify any specialized class the -new class definition will inherit the specialized class (this rule -applies iteratively and also for redeclare). +If a short class definition does not specify any specialized class the new class definition will inherit the specialized class (this rule applies iteratively and also for redeclare). -A base-prefix applied in the short-class definition does not influence -its type, but is applied to components declared of this type or types -derived from it; see also \cref{restriction-on-combining-base-classes-and-other-elements}. +A base-prefix applied in the short class definition does not influence its type, but is applied to components declared of this type or types derived from it; see also \cref{restriction-on-combining-base-classes-and-other-elements}. \begin{example} \begin{lstlisting}[language=modelica] @@ -718,9 +710,9 @@ \subsection{Short Class Definitions}\label{short-class-definitions} \end{lstlisting} \end{example} -\subsection{Restriction on combining base-classes and other elements}\label{restriction-on-combining-base-classes-and-other-elements} +\subsection{Restriction on combining base classes and other elements}\label{restriction-on-combining-base-classes-and-other-elements} -It is not legal to combine other components or base-classes with an extends from an array class, a class with non-empty base-prefix, a \firstuse{simple type}\index{simple type} (\lstinline!Real!, \lstinline!Boolean!, \lstinline!Integer!, \lstinline!String! and enumeration types), or any class transitively extending from an array class, a class with non-empty base-prefix, or a simple type. +It is not legal to combine other components or base classes with an extends from an array class, a class with non-empty base-prefix, a \firstuse{simple type}\index{simple type} (\lstinline!Real!, \lstinline!Boolean!, \lstinline!Integer!, \lstinline!String! and enumeration types), or any class transitively extending from an array class, a class with non-empty base-prefix, or a simple type. \begin{example} \begin{lstlisting}[language=modelica] @@ -1018,7 +1010,7 @@ \section{Balanced Models}\label{balanced-models} If \lstinline!use_support=true!, there are two additional equations for \lstinline!support.phi! and \lstinline!support.tau! via the modifier. \end{example} \item - In other cases (declaration of a component of a \lstinline!model! or \lstinline!block! class, modifiers on extends, and modifier on short-class-definitions): Modifiers for components shall only contain redeclarations of replaceable elements and binding equations. The binding equations in modifiers for components may in these cases only be for parameters, constants, inputs and variables having a default binding equation. + In other cases (declaration of a component of a \lstinline!model! or \lstinline!block! class, modifiers on extends, and modifier on short class definitions): Modifiers for components shall only contain redeclarations of replaceable elements and binding equations. The binding equations in modifiers for components may in these cases only be for parameters, constants, inputs and variables having a default binding equation. \item All non-partial \lstinline!model! and \lstinline!block! classes must be locally balanced. \begin{nonnormative} diff --git a/chapters/functions.tex b/chapters/functions.tex index 04efe531f..4db90dceb 100644 --- a/chapters/functions.tex +++ b/chapters/functions.tex @@ -801,7 +801,8 @@ \subsection{Flexible Array Sizes and Resizing of Arrays in Functions}\label{flex \subsection{Scalar Functions Applied to Array Arguments}\label{scalar-functions-applied-to-array-arguments} -Functions with one scalar return value can be applied to arrays element-wise, e.g.\ if \lstinline!A! is a vector of reals, then \lstinline!sin(A)! is a vector where each element is the result of applying the function \lstinline!sin! to the corresponding element in \lstinline!A!. Only \lstinline!function! classes that are transitively non-replaceable (\cref{transitively-non-replaceable} and \cref{restrictions-on-base-classes-and-constraining-types-to-be-transitively-non-replaceable}) may be called vectorized. +Functions with one scalar return value can be applied to arrays element-wise, e.g.\ if \lstinline!A! is a vector of reals, then \lstinline!sin(A)! is a vector where each element is the result of applying the function \lstinline!sin! to the corresponding element in \lstinline!A!. +Only \lstinline!function! classes that are transitively non-replaceable (\cref{transitively-non-replaceable} and \cref{restrictions-on-base-classes-and-constraining-types-to-be-transitively-non-replaceable}) may be called vectorized. Consider the expression \lstinline!f(arg1, $\ldots$, argn)!, an application of the function \lstinline!f! to the arguments \lstinline!arg1!, \ldots, \lstinline!argn!. Potential vectorization of this call is defined as follows. diff --git a/chapters/inheritance.tex b/chapters/inheritance.tex index 348c3a61d..6a576d9fe 100644 --- a/chapters/inheritance.tex +++ b/chapters/inheritance.tex @@ -232,7 +232,8 @@ \subsection{Restrictions on the Kind of Base Class}\label{restrictions-on-the-ki \subsection{Restrictions on Base Classes and Constraining Types to be Transitively Non-Replaceable}\label{restrictions-on-base-classes-and-constraining-types-to-be-transitively-non-replaceable} -The class name used after \lstinline!extends! for base-classes and for constraining classes must use a class reference considered transitively non-replaceable, see definition in \cref{transitively-non-replaceable}. For a replaceable component declaration without constraining clause the class must use a class reference considered transitively non-replaceable. +The class name used after \lstinline!extends! for base classes and for constraining classes must use a class reference considered transitively non-replaceable, see definition in \cref{transitively-non-replaceable}. +For a replaceable component declaration without constraining clause the class must use a class reference considered transitively non-replaceable. \begin{nonnormative} The requirement to use a transitively non-replaceable name excludes the long form of redeclare, i.e.\ \lstinline!redeclare model extends M $\ldots$! where \lstinline!M! must be an inherited replaceable class. @@ -579,7 +580,7 @@ \section{Redeclaration}\label{redeclaration} A \lstinline!redeclare! construct as an element replaces the declaration of a local class or component with another declaration. Both \lstinline!redeclare! constructs work in the same way. The \lstinline!redeclare! construct as an element requires that the element is inherited, and cannot be combined with a modifier of the same element in the extends-clause. -For modifiers the redeclare of classes uses a special short-class-definition construct; that is a subset of normal class definitions and semantically behave as the corresponding class-definition. +For modifiers the redeclare of classes uses a special short class definition construct; that is a subset of normal class definitions and semantically behave as the corresponding class-definition. A modifier with the keyword \lstinline!replaceable!\indexinline{replaceable} is automatically seen as being a \lstinline!redeclare!. @@ -801,15 +802,12 @@ \subsection{Constraining Type}\label{constraining-type} and in any subsequent redeclaration. The precedence order is that declaration modifiers override constraining type modifiers. -If the \lstinline!constraining-clause! is not present in the original declaration -(i.e., the non-redeclared declaration): +If the \lstinline!constraining-clause! is not present in the original declaration (i.e., the non-redeclared declaration): \begin{itemize} \item The type of the declaration is also used as a constraining type. \item - The modifiers for subsequent redeclarations and constraining type are - the modifiers on the component or short-class-definition if that is - used in the original declaration, otherwise empty. + The modifiers for subsequent redeclarations and constraining type are the modifiers on the component or short class definition if that is used in the original declaration, otherwise empty. \end{itemize} The syntax of a constraining-clause\indexinline{constrainedby} is as follows: diff --git a/chapters/interface.tex b/chapters/interface.tex index a48bd28a7..586cb6ff7 100644 --- a/chapters/interface.tex +++ b/chapters/interface.tex @@ -165,11 +165,10 @@ \section{Interface or Type}\label{interface-or-type} \lstinline!IntegerType!, \lstinline!StringType! or \lstinline!BooleanType!). \end{itemize} \item - Only for an \lstinline!operator record! class and classes derived from \lstinline!ExternalObject!: the full name of the operator record base-class - (i.e.\ the one containing the operations), or the derived class. See \cref{overloaded-operators} and \cref{external-objects}. + Only for an \lstinline!operator record! class and classes derived from \lstinline!ExternalObject!: the full name of the operator record base class (i.e.\ the one containing the operations), or the derived class. + See \cref{overloaded-operators} and \cref{external-objects}. - The following item does not apply for an \lstinline!operator record! class or class derived from \lstinline!ExternalObject!, since the type is already - uniquely defined by the full name. + The following item does not apply for an \lstinline!operator record! class or class derived from \lstinline!ExternalObject!, since the type is already uniquely defined by the full name. \item For each named public element of the class or component (including both local and inherited named elements) a tuple comprised of: @@ -194,8 +193,9 @@ \section{Interface or Type}\label{interface-or-type} \end{nonnormative} \begin{nonnormative} -The public interface does not contain all of the information about the class or component. When using a class as a base-class we also need protected elements, and -for internal type-checking we need e.g.\ import-elements. However, the information is sufficient for checking compatibility and for using the class to flatten components. +The public interface does not contain all of the information about the class or component. +When using a class as a base class we also need protected elements, and for internal type-checking we need e.g.\ import-elements. +However, the information is sufficient for checking compatibility and for using the class to flatten components. \end{nonnormative} \subsection{Transitively non-Replaceable}\label{transitively-non-replaceable} @@ -217,10 +217,7 @@ \subsection{Transitively non-Replaceable}\label{transitively-non-replaceable} \end{itemize} \begin{nonnormative} -According to \cref{restrictions-on-base-classes-and-constraining-types-to-be-transitively-non-replaceable}, for a hierarchical name all -parts of the name must be transitively non-replaceable, i.e.\ in \lstinline!extends A.B.C! this implies that \lstinline!A.B.C! must be transitively -non-replaceable, as well as \lstinline!A! and \lstinline!A.B!, with the exception of the \emph{class -extends redeclaration mechanism} see \cref{the-class-extends-redeclaration-mechanism}. +According to \cref{restrictions-on-base-classes-and-constraining-types-to-be-transitively-non-replaceable}, for a hierarchical name all parts of the name must be transitively non-replaceable, i.e.\ in \lstinline!extends A.B.C! this implies that \lstinline!A.B.C! must be transitively non-replaceable, as well as \lstinline!A! and \lstinline!A.B!, with the exception of the \emph{class extends redeclaration mechanism} see \cref{the-class-extends-redeclaration-mechanism}. \end{nonnormative} \subsection{Inheritance Interface or Class Type}\label{inheritance-interface-or-class-type} @@ -296,9 +293,9 @@ \section{Interface Compatibility or Subtyping}\label{interface-compatibility-or- \lstinline!A! is a class if and only if \lstinline!B! is a class (and thus: \lstinline!A! is a component if and only if \lstinline!B! is a component). \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! shall not have one. See \cref{overloaded-operators}. + 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! 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 @@ -625,11 +622,8 @@ \section{Type Compatible Expressions}\label{type-compatible-expressions} of an enumeration type with the same enumeration literals in the same order. \item - If \lstinline!A! has an \lstinline!operator record! base-class then \lstinline!B! must also have an - \lstinline!operator record! base-class, and it must be the same, and otherwise - neither \lstinline!A! nor \lstinline!B! may have an \lstinline!operator record! base-class. This is also - the \lstinline!operator record! base-class for the expression e.g.\ for - \lstinline!if (cond) then A else B!. + If \lstinline!A! has an \lstinline!operator record! base class then \lstinline!B! must also have an \lstinline!operator record! base class, and it must be the same, and otherwise neither \lstinline!A! nor \lstinline!B! may have an \lstinline!operator record! base class. + This is also the \lstinline!operator record! base class for the expression e.g.\ for \lstinline!if (cond) then A else B!. \item If \lstinline!A! is derived from \lstinline!ExternalObject! then \lstinline!B! must also be derived from \lstinline!ExternalObject! and they must have the same full name; and otherwise diff --git a/chapters/revisions.tex b/chapters/revisions.tex index 64a8dec9b..afa32a00e 100644 --- a/chapters/revisions.tex +++ b/chapters/revisions.tex @@ -571,8 +571,8 @@ \subsection{Main changes in Modelica 3.4}\label{main-changes-in-modelica-3-4} \cref{inheritance-extends-clause}. Ticket \href{https://github.com/modelica/ModelicaSpecification/issues/2015}{\#2015}. \item - Clarified inheritance restrictions, \cref{restrictions-on-the-kind-of-base-class}. Ticket - \href{https://github.com/modelica/ModelicaSpecification/issues/1451}{\#1451}. + Clarified inheritance restrictions, \cref{restrictions-on-the-kind-of-base-class}. + Ticket \href{https://github.com/modelica/ModelicaSpecification/issues/1451}{\#1451}. \item Restricted merging of modifiers, \cref{merging-of-modifications}. Ticket \href{https://github.com/modelica/ModelicaSpecification/issues/791}{\#791}. @@ -1372,9 +1372,8 @@ \subsection{Main changes in Modelica 3.2 Revision 2}\label{main-changes-in-model Corrected license-example in \cref{licensing}. Ticket \href{https://github.com/modelica/ModelicaSpecification/issues/1127}{\#1127}. \item - Grammar was internally restructured for short-class-definition, - \cref{class-declarations}, \cref{class-definition}. Ticket - \href{https://github.com/modelica/ModelicaSpecification/issues/1140}{\#1140}. + Grammar was internally restructured for \lstinline[language=grammar]!short-class-definition!, \cref{class-declarations}, \cref{class-definition}. + Ticket \href{https://github.com/modelica/ModelicaSpecification/issues/1140}{\#1140}. \end{itemize} \subsection{Contributors to the Modelica Language, Version 3.2 Revision 2}\label{contributors-to-the-modelica-language-version-3-2-revision-2} diff --git a/chapters/scoping.tex b/chapters/scoping.tex index 818355027..c94597005 100644 --- a/chapters/scoping.tex +++ b/chapters/scoping.tex @@ -78,9 +78,7 @@ \subsection{Simple Name Lookup}\label{simple-name-lookup} This lookup in each \emph{instance} scope is performed as follows: \begin{itemize} \item - Among declared named elements (\lstinline!class-definition! and - \lstinline!component-declaration!) of the class (including elements inherited from - base-classes). + Among declared named elements (\lstinline!class-definition! and \lstinline!component-declaration!) of the class (including elements inherited from base classes). \item Among the import names of qualified import-clauses in the \emph{instance} scope. The import name of \lstinline!import A.B.C!; is \lstinline!C! and the import name of \lstinline!import D=A.B.C;! is \lstinline!D!. \item @@ -522,12 +520,7 @@ \subsubsection{Steps of Instantiation}\label{steps-of-instantiation} \paragraph*{The inherited contents of the element}\label{the-inherited-contents-of-the-element} -Classes of extends clauses of the current class are looked up in the -instance tree, modifiers (including redeclarations) are merged, the -contents of these classes are partially instantiated using the new -modification environment, and are inserted into an extends clause node, -which is an unnamed node in the current instance that only contains the -inherited contents from that base-class. +Classes of extends clauses of the current class are looked up in the instance tree, modifiers (including redeclarations) are merged, the contents of these classes are partially instantiated using the new modification environment, and are inserted into an extends clause node, which is an unnamed node in the current instance that only contains the inherited contents from that base class. The classes of extends-clauses are looked up before and after handling extends-clauses; and it is an error if those lookups generate different @@ -595,7 +588,7 @@ \subsubsection{Steps of Instantiation}\label{steps-of-instantiation} \item Find the base-class \lstinline!=D! from the modifier. This performs lookup for \lstinline!D! in \lstinline!M!, and finds the partially instantiated class \lstinline!D! \item - Instantiate the base-class \lstinline!M.D! with modifier \lstinline!p=1!, and insert as unnamed node in \lstinline!M.b.A!. + Instantiate the base class \lstinline!M.D! with modifier \lstinline!p=1!, and insert as unnamed node in \lstinline!M.b.A!. \begin{enumerate} \item Partially instantiate the component \lstinline!p! with modifier \lstinline!=1!