diff --git a/chapters/scoping.tex b/chapters/scoping.tex index 43488db10..261646010 100644 --- a/chapters/scoping.tex +++ b/chapters/scoping.tex @@ -20,8 +20,11 @@ \section{Enclosing Classes}\doublelabel{enclosing-classes} top-level class definitions in the unnamed enclosing class is undefined. During flattening, the enclosing class of an element being flattened is -a partially flattened class. {[}\emph{For example, this means that a -declaration can refer to a name inherited through an extends-clause.}{]} +a partially flattened class. + +\begin{nonnormative} +For example, this means that a declaration can refer to a name inherited through an extends-clause. +\end{nonnormative} \begin{example} \begin{lstlisting}[language=modelica] @@ -49,19 +52,19 @@ \section{Static Name Lookup}\doublelabel{static-name-lookup} Names are looked up at class flattening to find names of base classes, component types, etc. Implicitly defined names of record constructor functions and enumeration type conversion functions are ignored during -type name lookup {[}\emph{since a record and the implicitly created -record constructor function, see \autoref{record-constructor-functions}, and an -enumeration type and the implicitly created conversion function -(\autoref{type-conversion-of-integer-to-enumeration-values}), have the same name}{]}. Names of record -classes and enumeration types are ignored during function name lookup. +type name lookup. Names of record classes and enumeration types are ignored during function name lookup. -\subsection{Simple Name Lookup}\doublelabel{simple-name-lookup} +\begin{nonnormative} +The reason to ignore the implicitly defined names is that a record and the implicitly created record constructor function, see \autoref{record-constructor-functions}, +and an enumeration type and the implicitly created conversion function (\autoref{type-conversion-of-integer-to-enumeration-values}), have the same name. +\end{nonnormative} +\subsection{Simple Name Lookup}\doublelabel{simple-name-lookup} When an element, equation, or section is flattened, any simple name - {[}not composed using dot notation{]} is first looked up sequentially among +(not composed using dot notation) is first looked up sequentially among iteration variables (if any; see below), and then looked up sequentially in each -member of the ordered set \textbf{of instance scopes (see +member of the ordered set \emph{of instance scopes (see \autoref{the-class-tree}) corresponding to lexically enclosing classes} until a match is found or an enclosing class is encapsulated. In the latter case the lookup stops except for the predefined types, functions and @@ -73,11 +76,10 @@ \subsection{Simple Name Lookup}\doublelabel{simple-name-lookup} Reference to variables successfully looked up in an enclosing class is only allowed for variables declared as constant. The values of modifiers -are thus resolved in the \textbf{instance} scope of which the modifier +are thus resolved in the \emph{instance} scope of which the modifier appears; if the use is in a modifier on a short class definition, see \autoref{short-class-definitions}. -This lookup in each \textbf{instance} scope is performed as follows - +This lookup in each \emph{instance} scope is performed as follows: \begin{itemize} \item Among declared named elements (\lstinline!class-definition! and @@ -85,16 +87,15 @@ \subsection{Simple Name Lookup}\doublelabel{simple-name-lookup} base-classes). \item Among the import names of qualified import statements in the - \textbf{instance} scope. The import name of \lstinline!import A.B.C!; is \lstinline!C! and 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 Among the public members of packages imported via unqualified - import-statements in the \textbf{instance} scope. It is an error if + import-statements in the \emph{instance} scope. It is an error if this step produces matches from several unqualified imports. \end{itemize} -\textbf{Import statements defined in inherited classes are ignored for -the lookup, i.e. import statements are not inherited.} +Import statements defined in inherited classes are ignored for the lookup, i.e. import statements are not inherited. \subsection{Composite Name Lookup}\doublelabel{composite-name-lookup} @@ -138,22 +139,20 @@ \subsection{Composite Name Lookup}\doublelabel{composite-name-lookup} \subsection{Global Name Lookup}\doublelabel{global-name-lookup} -For a name starting with dot, e.g.: \lstinline!.A! {[}\emph{or} \lstinline!.A.B!\emph{,} -\lstinline!.A.B.C! -\emph{etc}.{]} lookup is performed as follows: +For a name starting with dot, e.g.: \lstinline!.A! (or \lstinline!.A.B!, \lstinline!.A.B.C! etc.) lookup is performed as follows: \begin{itemize} \item - The first identifier [A] is looked up in the global scope. This is + The first identifier (\lstinline!A!) is looked up in the global scope. This is possible even if the class is encapsulated and import statements are - not used for this. If there does not exist a class A in global scope + not used for this. If there does not exist a class \lstinline!A! in global scope this is an error. \item - If the name is simple then the class A is the result of lookup. + If the name is simple then the class \lstinline!A! is the result of lookup. \item - If the name is a composite name then the class A is temporarily + If the name is a composite name then the class \lstinline!A! is temporarily flattened with an empty environment (i.e. no modifiers, see \autoref{modification-environment}) and using the enclosing classes of the denoted class. The rest - of the name [e.g., \lstinline!B! or \lstinline!B.C!] is looked up among the declared named + 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 @@ -175,7 +174,7 @@ \section{Instance Hierarchy Name Lookup of Inner Declarations}\doublelabel{insta 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 {[}\emph{including binding equations}{]}. +Outer component declarations may not have modifications (including binding equations). Outer class declarations should be defined using short-class definitions without modifications. However, see also \autoref{simultaneous-inner-outer-declarations}. @@ -206,15 +205,14 @@ \section{Instance Hierarchy Name Lookup of Inner Declarations}\doublelabel{insta \end{itemize} \end{itemize} -An \lstinline!outer! element component may be of a partial class {[}\emph{but the -referenced} \lstinline!inner! \emph{component must be of a non-partial class}{]}. -{[}\lstinline!inner!\emph{/}\lstinline!outer! \emph{components may be used to model simple -fields, where some physical quantities, such as gravity vector, -environment temperature or environment pressure, are accessible from all -components in a specific model hierarchy. Inner components are -accessible throughout the model, if they are not ``shadowed'' by a -corresponding} \lstinline!inner! \emph{declaration in a more deeply nested level of -the model hierarchy.}{]} +An \lstinline!outer! element component may be of a partial class (but the +referenced \lstinline!inner! component must be of a non-partial class). + +\begin{nonnormative} +\lstinline!inner!/\lstinline!outer! components may be used to model simple fields, where some physical quantities, such as gravity vector, environment temperature or +environment pressure, are accessible from all components in a specific model hierarchy. Inner components are accessible throughout the model, if they are not ``shadowed'' +by a corresponding \lstinline!inner! declaration in a more deeply nested level of the model hierarchy. +\end{nonnormative} \begin{example} Simple Example: @@ -274,10 +272,12 @@ \section{Instance Hierarchy Name Lookup of Inner Declarations}\doublelabel{insta \end{lstlisting} \end{example} -The \lstinline!inner! component shall be a subtype of the corresponding \lstinline!outer! -component. {[}\emph{If the two types are not identical, the type of the} -\lstinline!inner! \emph{component defines the instance and the} \lstinline!outer! -\emph{component references just part of the} \lstinline!inner! \emph{component}{]}. +The \lstinline!inner! component shall be a subtype of the corresponding \lstinline!outer! component. + +\begin{nonnormative} +If the two types are not identical, the type of the \lstinline!inner! component defines the instance and the \lstinline!outer! component references just part of the +\lstinline!inner! component. +\end{nonnormative} \begin{example} \begin{lstlisting}[language=modelica] @@ -326,10 +326,11 @@ \section{Simultaneous Inner/Outer Declarations}\doublelabel{simultaneous-inner-o An element declared with both the prefixes \lstinline!inner! and \lstinline!outer! conceptually introduces two declarations with the same name: one that follows the above rules for \lstinline!inner! and another that follows the rules for \lstinline!outer!. -{[}\emph{Local references for elements with both the prefix} \lstinline!inner! -\emph{and} \lstinline!outer! \emph{references the} \lstinline!outer! \emph{element. That in turn -references the corresponding element in an enclosing scope with the -prefix} \lstinline!inner!\emph{.}{]} + +\begin{nonnormative} +Local references for elements with both the prefix \lstinline!inner! and \lstinline!outer! references the \lstinline!outer! element. That in turn references the corresponding +element in an enclosing scope with the prefix \lstinline!inner!. +\end{nonnormative} Modifications of elements declared with both the prefixes \lstinline!inner! and \lstinline!outer! may have modfications, those modifications are only applied to the @@ -408,19 +409,19 @@ \subsection{Instantiation}\doublelabel{instantiation} \subsubsection{The Class Tree}\doublelabel{the-class-tree} All necessary libraries including the model which is to be instantiated -are loaded from e.g. file system and form a so called \textbf{class -tree}\emph{.} This tree represents the syntactic information from the +are loaded from e.g. file system and form a so called \firstuse{class tree}. +This tree represents the syntactic information from the class definitions. It contains also all modifications at their original -locations in syntactic form. \emph{{[}The class tree is built up -directly during parsing of the Modelica texts. For each class a local -tree is created which is then merged into the one big tree, according to -the location of the class in the class hierarchy. This tree can be seen -as the abstract syntax tree (AST) of the loaded libraries.{]}.} The -builtin classes are put into the unnamed root of the class tree. +locations in syntactic form. The builtin classes are put into the unnamed root of the class tree. + +\begin{nonnormative} +The class tree is built up directly during parsing of the Modelica texts. For each class a local tree is created which is then merged into the one big tree, according +to the location of the class in the class hierarchy. This tree can be seen as the abstract syntax tree (AST) of the loaded libraries. +\end{nonnormative} \subsubsection{The Instance Tree}\doublelabel{the-instance-tree} -The output of the instantiation process is an \textbf{instance tree}. +The output of the instantiation process is an \firstuse{instance tree}. The instance tree consists of nodes representing the elements of a class definition from the class tree. For a component the subtree of a particular node is created using the information from the class of the @@ -460,13 +461,13 @@ \subsubsection{The Instance Tree}\doublelabel{the-instance-tree} A node in the instance tree is the instance scope for the modifiers and elements syntactically defined in the class it is instantiated from. The -instance scope is the starting point for name lookup. \emph{{[}If the -name is not found the lookup is continued in the instance scope -corresponding to the lexically enclosing class. Extends clauses are -treated as unnamed nodes in the instance tree -- when searching for an -element in an instance scope the search also recursively examines the -elements of the extends clauses.} \emph{Except that inherited -import-statements are ignored.{]}} +instance scope is the starting point for name lookup. + +\begin{nonnormative} +If the name is not found the lookup is continued in the instance scope corresponding to the lexically enclosing class. Extends clauses are treated as unnamed nodes in the +instance tree --- when searching for an element in an instance scope the search also recursively examines the elements of the extends clauses. Except that inherited +import-statements are ignored. +\end{nonnormative} \subsubsection{The Instantiation Procedure.}\doublelabel{the-instantiation-procedure} @@ -512,17 +513,20 @@ \subsubsection{Steps of Instantiation}\doublelabel{steps-of-instantiation} For local classes and components in the current class, instance nodes are created and inserted into the current instance. Modifiers (including class redeclarations) are merged and associated with the instance and -the element is partially instantiated. \emph{{[}The partially -instantiated elements are used later for lookup during the generation of -the flat equation system and are instantiated fully, if necessary, using -the stored modification environment.{]}} +the element is partially instantiated. + +\begin{nonnormative} +The partially instantiated elements are used later for lookup during the generation of the flat equation system and are instantiated fully, if necessary, using the +stored modification environment. +\end{nonnormative} Equations, algorithms, and annotations of the class and the component -declaration are copied to the instance without merging. \emph{{[}The -annotations can be relevant for simulations, e.g. annotations for code -generation (\autoref{annotations-for-code-generation}.), -simulation experiments (\autoref{annotations-for-simulation-experiments}) -or functions(\autoref{declaring-derivatives-of-functions},\autoref{declaring-inverses-of-functions} and \autoref{external-function-interface}).{]}} +declaration are copied to the instance without merging. + +\begin{nonnormative} +The annotations can be relevant for simulations, e.g. annotations for code generation (\autoref{annotations-for-code-generation}.), simulation experiments +(\autoref{annotations-for-simulation-experiments}) or functions (\autoref{declaring-derivatives-of-functions}, \autoref{declaring-inverses-of-functions} and \autoref{external-function-interface}). +\end{nonnormative} Extends clauses are not looked up, but empty extends clause nodes are created and inserted into the current instance -- to be able to preserve @@ -543,9 +547,11 @@ \subsubsection{Steps of Instantiation}\doublelabel{steps-of-instantiation} At the end, the current instance is checked whether their children (including children of extends-clauses) with the same name are identical -and only the first one of them is kept. \emph{{[}This is important for -function arguments where the order matters.{]}} It is an error if they -are not identical. +and only the first one of them is kept. It is an error if they are not identical. + +\begin{nonnormative} +Only keeping the first among the children with the same name is important for function arguments where the order matters. +\end{nonnormative} \paragraph*{Recursive instantiation of components}\doublelabel{recursive-instantiation-of-components} @@ -579,90 +585,66 @@ \subsubsection{Steps of Instantiation}\doublelabel{steps-of-instantiation} equation system we have the following steps (not including checks): \begin{enumerate} \item - \emph{Instantiate \lstinline!M!: which partially instantiates \lstinline!B!, \lstinline!b!, \lstinline!C!, \lstinline!D!, and \lstinline!E!.} + Instantiate \lstinline!M!: which partially instantiates \lstinline!B!, \lstinline!b!, \lstinline!C!, \lstinline!D!, and \lstinline!E!. \item - \emph{Instantiate \lstinline!M.b!:} - + Instantiate \lstinline!M.b!: \begin{enumerate} \item - \emph{First find the class \lstinline!B! in \lstinline!M! (the partially instantiated - elements have correct name allowing lookup)} + First find the class \lstinline!B! in \lstinline!M! (the partially instantiated elements have correct name allowing lookup) \item - \emph{instantiate the partially instantiated \lstinline!M.B! with the modifier - \lstinline!redeclare model A=D(p=1)!} + instantiate the partially instantiated \lstinline!M.B! with the modifier \lstinline!redeclare model A=D(p=1)! \item - \emph{partially instantiate \lstinline!M.b.a! (no modifier), and \lstinline!M.b.A! (with - modifier \lstinline!=D(p=1)!)} + partially instantiate \lstinline!M.b.a! (no modifier), and \lstinline!M.b.A! (with modifier \lstinline!=D(p=1)!) \end{enumerate} \item - \emph{Instantiate \lstinline!M.b.a!} - + Instantiate \lstinline!M.b.a!: \begin{enumerate} \item - \emph{First find the class \lstinline!A! in \lstinline!M.b! (the partially instantiated - elements have correct name allowing lookup)} + First find the class \lstinline!A! in \lstinline!M.b! (the partially instantiated elements have correct name allowing lookup) \item - \emph{Instantiate the partially instantiated \lstinline!M.b.A! with the modifier - \lstinline!=D(p=1)!.} - + Instantiate the partially instantiated \lstinline!M.b.A! with the modifier \lstinline!=D(p=1)!. \begin{enumerate} \item - \emph{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!} + 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 - \emph{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 - \emph{Partially instantiate the component \lstinline!p! with modifier \lstinline!=1!} + Partially instantiate the component \lstinline!p! with modifier \lstinline!=1! \item - \emph{Find the base-class \lstinline!C! in \lstinline!M.D!. Since there is no local - element called \lstinline!C! the search is then continued in \lstinline!M! and finds - the partially instantiated class \lstinline!M.C!} + Find the base-class \lstinline!C! in \lstinline!M.D!. Since there is no local element called \lstinline!C! the search is then continued in \lstinline!M! and finds + the partially instantiated class \lstinline!M.C! \item - \emph{Instantiate the base-class \lstinline!M.C! as below} + Instantiate the base-class \lstinline!M.C! as below \end{enumerate} \end{enumerate} \end{enumerate} \item - \emph{Instantiate the base-class \lstinline!M.C! inserting the result into unnamed - node in \lstinline!M.b.a!} - + Instantiate the base-class \lstinline!M.C! inserting the result into unnamed node in \lstinline!M.b.a! \begin{enumerate} \item - \emph{Partially instantiate \lstinline!e!} + Partially instantiate \lstinline!e! \item - \emph{Instantiate \lstinline!e! which requires finding \lstinline!E!. First looking for - \lstinline!E! in the un-named node for extends \lstinline!M.C!, and, since there is no - local element \lstinline!E! the search is then continued in \lstinline!M! (which - lexically encloses \lstinline!M.C!) and finds \lstinline!E! class inheriting from \lstinline!Real!. - The \lstinline!e! is then instantiated using class \lstinline!E! inheriting from - \lstinline!Real!.} + Instantiate \lstinline!e! which requires finding \lstinline!E!. First looking for \lstinline!E! in the un-named node for extends \lstinline!M.C!, and, since there is + no local element \lstinline!E! the search is then continued in \lstinline!M! (which lexically encloses \lstinline!M.C!) and finds \lstinline!E! class inheriting from + \lstinline!Real!. The \lstinline!e! is then instantiated using class \lstinline!E! inheriting from \lstinline!Real!. \end{enumerate} \item - \emph{Instantiate \lstinline!M.b.a.p!} - + Instantiate \lstinline!M.b.a.p! \begin{enumerate} \item - \emph{First the class \lstinline!E! in \lstinline!M.b.a! finding \lstinline!E! class inheriting from - \lstinline!Integer!.} + First the class \lstinline!E! in \lstinline!M.b.a! finding \lstinline!E! class inheriting from \lstinline!Integer!. \item - \emph{Instantiate the \lstinline!M.b.a.p! using the class \lstinline!E! inheriting from - \lstinline!Integer! with modifier \lstinline!=1!} + Instantiate the \lstinline!M.b.a.p! using the class \lstinline!E! inheriting from \lstinline!Integer! with modifier \lstinline!=1! \item - \emph{Instantiate the base-class Integer with modifier \lstinline!=1!, and - insert as unnamed node in \lstinline!M.b.a.p!.} + Instantiate the base-class Integer with modifier \lstinline!=1!, and insert as unnamed node in \lstinline!M.b.a.p!. \end{enumerate} \end{enumerate} -An implementation can use different heuristics to be more -efficient by re-using instantiated elements as long as the resulting -flat equation system is identical. +An implementation can use different heuristics to be more efficient by re-using instantiated elements as long as the resulting flat equation system is identical. -Note that if \lstinline!D! was consistently replaced by \lstinline!A! in the example -above the result would be identical (but harder to read due to two -different classes called \lstinline!A!). +Note that if \lstinline!D! was consistently replaced by \lstinline!A! in the example above the result would be identical (but harder to read due to two different +classes called \lstinline!A!). \end{example} \subsection{Generation of the flat equation system}\doublelabel{generation-of-the-flat-equation-system} @@ -671,27 +653,24 @@ \subsection{Generation of the flat equation system}\doublelabel{generation-of-th modifications, dimension definitions, annotations, equations and algorithms are resolved to the real instance to which they are referring to, and the names are replaced by the global unique identifier of the -instance. \emph{{[}This identifier is normally constructed from the -names of the instances along a path in the instance tree (and omitting -the unnamed nodes of extends clauses), separated by dots. Either the -referenced instance belongs to the model to be simulated the path starts -at the model itself, or if not, it starts at the unnamed root of the -instance tree, e.g. in case of a constant in a package.{]}} - -\emph{{[}To resolve the names, a name lookup using the instance tree is -performed, starting at the instance scope (unless the name is fully -qualified) of the modification, algorithm or equation. If it is not -found locally the search is continued at the instance of the lexically -enclosing class of the scope {[}this is normally not equal to the parent -of the current instance{]}, and then continued with their parents as -described in \autoref{static-name-lookup}. If the found component is an outer -declaration, the search is continued using the direct parents in the -instance tree (see \autoref{instance-hierarchy-name-lookup-of-inner-declarations}). If the lookup has to look into a -class which is not instantiated yet [or only partially - instantiated], it is instantiated in place.]} - - The flat equation system consists of a list of variables with - dimensions, flattened equations and algorithms, and a list of called +instance. + +\begin{nonnormative} +This identifier is normally constructed from the names of the instances along a path in the instance tree (and omitting the unnamed nodes of extends clauses), separated +by dots. Either the referenced instance belongs to the model to be simulated the path starts at the model itself, or if not, it starts at the unnamed root of the instance +tree, e.g. in case of a constant in a package. +\end{nonnormative} + +\begin{nonnormative} +To resolve the names, a name lookup using the instance tree is performed, starting at the instance scope (unless the name is fully qualified) of the modification, algorithm +or equation. If it is not found locally the search is continued at the instance of the lexically enclosing class of the scope (this is normally not equal to the parent of +the current instance), and then continued with their parents as described in \autoref{static-name-lookup}. If the found component is an outer declaration, the search is +continued using the direct parents in the instance tree (see \autoref{instance-hierarchy-name-lookup-of-inner-declarations}). If the lookup has to look into a class which +is not instantiated yet (or only partially instantiated), it is instantiated in place. +\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 @@ -723,7 +702,7 @@ \subsection{Generation of the flat equation system}\doublelabel{generation-of-th \begin{itemize} \item - In the modifications of \textbf{value} attribute references are + In the modifications of \emph{value} attribute references are resolved using the instance scope of the modification. An equation is formed from a reference to the name of the instance and the resolved modification value of the instance, and included into the @@ -736,7 +715,7 @@ \subsection{Generation of the flat equation system}\doublelabel{generation-of-th \begin{itemize} \item - In the modifications of \textbf{non-value} attributes, e.g. start, + In the modifications of \emph{non-value} attributes, e.g. start, fixed etc. references are resolved using the instance scope of the modification. An equation is formed from a reference to the name of the instance appended by a dot and the attribute name and the @@ -767,25 +746,24 @@ \subsection{Generation of the flat equation system}\doublelabel{generation-of-th list of functions. \item Conditional components with false condition are removed afterwards and - they are not part of the simulation model. \emph{{[}Thus e.g. - parameters don't need values in them. However, type-error can be - detected.{]}} + they are not part of the simulation model. + \begin{nonnormative} + Thus e.g. parameters don't need values in them. However, type-error can be detected. + \end{nonnormative} \item Each reference is checked, whether it is a valid reference, e.g. the referenced object belongs to or is an instance, where all existing conditional declaration expressions evaluate to true or it is a - constant in a package. \emph{{[}Conditional components can be used in - connect-statements, and if the component is conditionally disabled the - connect-statement is removed.{]}} + constant in a package. + \begin{nonnormative} + Conditional components can be used in connect-statements, and if the component is conditionally disabled the connect-statement is removed. + \end{nonnormative} \end{itemize} -This leads to a flattened equation system, except for connect and -transition statements. These have to be transformed as described in -\autoref{connectors-and-connections} and \autoref{state-machines}. This may lead to further changes in the -instance tree \emph{{[}e.g. from expandable connectors \autoref{expandable-connectors}){]}} -and additional equations in the flattened equation -system \emph{{[}e.g. connect equations (\autoref{generation-of-connection-equations}), generated -equations for state machine semantics (\autoref{semantics-summary}){]}}. +This leads to a flattened equation system, except for connect and transition statements. These have to be transformed as described in +\autoref{connectors-and-connections} and \autoref{state-machines}. This may lead to further changes in the instance tree (e.g. from expandable connectors +(\autoref{expandable-connectors})) and additional equations in the flattened equation system (e.g. connect equations (\autoref{generation-of-connection-equations}), +generated equations for state machine semantics (\autoref{semantics-summary})). \begin{nonnormative} After flattening, the resulting equation system is self