From 5d9fa9d133ebb3de12e02220b212c1b96f5d1c1f Mon Sep 17 00:00:00 2001 From: Henrik Tidefelt Date: Tue, 2 Jun 2020 23:19:58 +0200 Subject: [PATCH] Don't use \textbf directly for glossary items --- chapters/glossary.tex | 124 +++++++++++++++++++++--------------------- preamble.tex | 2 + 2 files changed, 64 insertions(+), 62 deletions(-) diff --git a/chapters/glossary.tex b/chapters/glossary.tex index 7021bcb54..e42d0e127 100644 --- a/chapters/glossary.tex +++ b/chapters/glossary.tex @@ -1,5 +1,5 @@ \chapter{Glossary}\doublelabel{glossary} -\textbf{algorithm section}: part of a class definition consisting of the +\glossaryitem{algorithm section}: part of a class definition consisting of the keyword \lstinline!algorithm! followed by a sequence of statements. Like an equation, an algorithm section relates variables, i.e. constrains the values that these variables can take simultaneously. In contrast to an @@ -10,7 +10,7 @@ \chapter{Glossary}\doublelabel{glossary} outputs, e.g. by search (generate and test), or by deriving an inverse algorithm symbolically. (See \autoref{statements-and-algorithm-sections}.) -\textbf{array} or array variable: a component whose components are array +\glossaryitem{array} or array variable: a component whose components are array elements. For an array, the ordering of its components matters: The kth element in the sequence of components of an array x is the array element with index \lstinline!k!, denoted \lstinline!x[k]!. All elements of an array have the same @@ -19,19 +19,19 @@ \chapter{Glossary}\doublelabel{glossary} is the number of dimensions of the array. Special cases are matrix (n=2) and vector (n=1). Integer indices start with 1, not zero. (See \autoref{arrays}.) -\textbf{array constructor}: an array can be built using the +\glossaryitem{array constructor}: an array can be built using the array-function -- with the shorthand \{a, b, \ldots{}\}, and can also include an iterator to build an array of expressions. (See \autoref{vector-matrix-and-array-constructors}.) -\textbf{array element}: a component contained in an array. An array +\glossaryitem{array element}: a component contained in an array. An array element has no identifier. Instead they are referenced by array access expressions called indices that use enumeration values or positive integer index values. (See \autoref{arrays}.) -\textbf{assignment}: a statement of the form \lstinline!x := expr!. The expression +\glossaryitem{assignment}: a statement of the form \lstinline!x := expr!. The expression \lstinline!expr! must not have higher variability than~x. (See \autoref{simple-assignment-statements}.) -\textbf{attribute}: a component contained in a scalar component, such as +\glossaryitem{attribute}: a component contained in a scalar component, such as \lstinline!min!, \lstinline!max!, and \lstinline!unit!. All attributes are predefined and attribute values can only be defined using a modification, such as in \lstinline!Real x(unit="kg")!. Attributes cannot be accessed using dot notation, and are not @@ -40,35 +40,35 @@ \chapter{Glossary}\doublelabel{glossary} but not their unit attributes, nor any other attribute of \lstinline!x! and \lstinline!y!. (See \autoref{predefined-types-and-classes}.) -\textbf{base class}: class A is called a base class of B, if class B +\glossaryitem{base class}: class A is called a base class of B, if class B extends class A. This relation is specified by an extends clause in B or in one of B's base classes. A class inherits all elements from its base classes, and may modify all non-final elements inherited from base classes. (See \autoref{inheritance-extends-clause}.) -\textbf{binding equation}: Either a declaration equation or an element +\glossaryitem{binding equation}: Either a declaration equation or an element modification for the value of the variable. In a non-function a component with a binding equation has its value bound to some expression. (See \autoref{equation-categories}.) In a function an input component uses the value of the binding equation as default value, a non-input component starts with that value. (See \autoref{initialization-and-binding-equations-of-components-in-functions}.) -\textbf{class}: a description that generates an object called instance. +\glossaryitem{class}: a description that generates an object called instance. The description consists of a class definition, a modification environment that modifies the class definition, an optional list of dimension expressions if the class is an array class, and a lexically enclosing class for all classes. (See \autoref{class-declarations}.) -\textbf{class type} or \textbf{inheritance interface}: property of a +\glossaryitem{class type} or \glossaryitem{inheritance interface}: property of a class, consisting of a number of attributes and a set of public or protected elements consisting of element name, element type, and element attributes. (See \autoref{inheritance-interface-or-class-type}.) -\textbf{component} or \textbf{variable}: an instance (object) generated +\glossaryitem{component} or \glossaryitem{variable}: an instance (object) generated by a component declaration. Special kinds of components are scalar, array, and attribute. (See \autoref{component-declarations}.) -\textbf{component declaration}: an element of a class definition that +\glossaryitem{component declaration}: an element of a class definition that generates a component. A component declaration specifies (1) a component name, i.e., an identifier, (2) the class to be flattened in order to generate the component, and (3) an optional Boolean parameter @@ -76,7 +76,7 @@ \chapter{Glossary}\doublelabel{glossary} expression evaluates to false. A component declaration may be overridden by an element-redeclaration. (See \autoref{component-declarations}.) -\textbf{component reference}: An expression containing a sequence of +\glossaryitem{component reference}: An expression containing a sequence of identifiers and indices. A component reference is equivalent to the referenced object, which must be a component. A component reference is resolved (evaluated) in the scope of a class (or expression for the case @@ -84,35 +84,35 @@ \chapter{Glossary}\doublelabel{glossary} components and classes. Example reference: \lstinline!Ele.Resistor.u[21].r! (See \autoref{component-declarations} and \autoref{slice-operation}.) -\textbf{declaration assignment}: Deprecated name for binding equation in function. +\glossaryitem{declaration assignment}: Deprecated name for binding equation in function. -\textbf{declaration equation}: Equation of the form \lstinline!x = expression! +\glossaryitem{declaration equation}: Equation of the form \lstinline!x = expression! defined by a component declaration. The expression must not have higher variability than the declared component x. Unlike other equations, a declaration equation can be overridden (replaced or removed) by an element modification. (See \autoref{declaration-equations}.) -\textbf{derived class} or \textbf{subclass} or \textbf{extended class}: +\glossaryitem{derived class} or \glossaryitem{subclass} or \glossaryitem{extended class}: class B is called derived from A, if B extends A. (See \autoref{inheritance-modification-and-redeclaration}.) -\textbf{element}: part of a class definition, one of: class definition, +\glossaryitem{element}: part of a class definition, one of: class definition, component declaration, or extends clause. Component declarations and class definitions are called named elements. An element is either inherited from a base class or local. -\textbf{element modification}: part of a modification, overrides the +\glossaryitem{element modification}: part of a modification, overrides the declaration equation in the class used by the instance generated by the modified element. Example: \lstinline!vcc(unit="V")=1000!. (See \autoref{modifications}.) -\textbf{element-redeclaration}: part of a modification, replaces one of +\glossaryitem{element-redeclaration}: part of a modification, replaces one of the named elements possibly used to build the instance geneated by the element that contains the redeclaration. Example: \lstinline!redeclare type Voltage = Real(unit="V")! replaces \lstinline!type Voltage!. (See \autoref{redeclaration}.) -\textbf{encapsulated}: a class that does not depend on where it is +\glossaryitem{encapsulated}: a class that does not depend on where it is placed in the package-hierarchy, since its lookup is stopped at the encapsulated boundary. (See \autoref{simple-name-lookup}). -\textbf{equation}: part of a class definition. A scalar equation relates +\glossaryitem{equation}: part of a class definition. A scalar equation relates scalar variables, i.e. constrains the values that these variables can take simultaneously. When n-1 variables of an equation containing n variables are known, the value of the nth variable can be inferred @@ -121,157 +121,157 @@ \chapter{Glossary}\doublelabel{glossary} Special cases are: initial equations, instantaneous equations, declaration equations. (See \autoref{equations}.) -\textbf{event}: something that occurs instantaneously at a specific time +\glossaryitem{event}: something that occurs instantaneously at a specific time or when a specific condition occurs. Events are for example defined by the condition occurring in a when clause, if clause, or if expression. (See \autoref{events-and-synchronization}.) -\textbf{expression}: a term built from operators, function references, +\glossaryitem{expression}: a term built from operators, function references, components, or component references (referring to components) and literals. Each expression has a type and a variability. (See \autoref{operators-and-expressions}.) -\textbf{extends clause}: an unnamed element of a class definition that +\glossaryitem{extends clause}: an unnamed element of a class definition that uses a name and an optional modification to specify a base class of the class defined using the class definition. (See \autoref{inheritance-modification-and-redeclaration}.) -\textbf{flattening}: the computation that creates a flattened class of a +\glossaryitem{flattening}: the computation that creates a flattened class of a given class, where all inheritance, modification, etc. has been performed and all names resolved, consisting of a flat set of equations, algorithm sections, component declarations, and functions. (See \autoref{flattening-process}.) -\textbf{function}: a class of the specialized class function. (See \autoref{functions}.) +\glossaryitem{function}: a class of the specialized class function. (See \autoref{functions}.) -\textbf{function subtype} or \textbf{function compatible interface}: A +\glossaryitem{function subtype} or \glossaryitem{function compatible interface}: A is a function subtype of B iff A is a subtype of B and the additional arguments of function A that are not in function B are defined in such a way (e.g. additional arguments need to have default values), that A can be called at places where B is called. (See \autoref{function-compatibility-or-function-subtyping-for-functions}.) -\textbf{identifier} or ident: an atomic (not composed) name. Example: +\glossaryitem{identifier} or ident: an atomic (not composed) name. Example: \lstinline!Resistor! (See \autoref{identifiers-names-and-keywords}.) -\textbf{index} or \textbf{subscript}: An expression, typically of +\glossaryitem{index} or \glossaryitem{subscript}: An expression, typically of Integer type or the colon symbol (:), used to reference a component (or a range of components) of an array. (See \autoref{array-indexing}.) -\textbf{inheritance interface} or \textbf{class type}: property of a +\glossaryitem{inheritance interface} or \glossaryitem{class type}: property of a class, consisting of a number of attributes and a set of public or protected elements consisting of element name, element type, and element attributes. (See \autoref{inheritance-interface-or-class-type}.) -\textbf{instance}: the object generated by a class. An instance contains +\glossaryitem{instance}: the object generated by a class. An instance contains zero or more components (i.e. instances), equations, algorithms, and local classes. An instance has a type. Basically, two instances have same type, if their important attributes are the same and their public components and classes have pair wise equal identifiers and types. More specific type equivalence definitions are given e.g. for functions. -\textbf{instantaneous}: An equation or statement is instantaneous if it +\glossaryitem{instantaneous}: An equation or statement is instantaneous if it holds only at events, i.e., at single points in time. The equations and statements of a when-clause are instantaneous. (See \autoref{when-equations} and \autoref{when-statements}.) -\textbf{interface}: see type. (See \autoref{interface-or-type}.) +\glossaryitem{interface}: see type. (See \autoref{interface-or-type}.) -\textbf{literal}: a real, integer, boolean, enumeration, or string +\glossaryitem{literal}: a real, integer, boolean, enumeration, or string literal. Used to build expressions. (See \autoref{literal-constants}.) -\textbf{matrix}: an array where the number of dimensions is 2. (See +\glossaryitem{matrix}: an array where the number of dimensions is 2. (See \autoref{arrays}.) -\textbf{modification}: part of an element. Modifies the instance +\glossaryitem{modification}: part of an element. Modifies the instance generated by that element. A modification contains element modifications and element redeclarations. (See \autoref{modifications}.) -\textbf{modification environment}: the modification environment of a +\glossaryitem{modification environment}: the modification environment of a class defines how to modify the corresponding class definition when flattening the class. (See \autoref{modification-environment}.) -\textbf{name}: Sequence of one or more identifiers. Used to reference a +\glossaryitem{name}: Sequence of one or more identifiers. Used to reference a class. A class name is resolved in the scope of a class, which defines a set of visible classes. Example name: \lstinline!Ele.Resistor!. (See \autoref{names}.) -\textbf{operator record}: A record with user-defined operations; +\glossaryitem{operator record}: A record with user-defined operations; defining e.g. multiplication and addition see \autoref{overloaded-operators}. -\textbf{partial}: a class that is incomplete and cannot be instantiated +\glossaryitem{partial}: a class that is incomplete and cannot be instantiated in a simulation model; useful e.g. as a base-class. (See \autoref{component-declaration-static-semantics}.) -\textbf{partial flattening}: first find the names of declared local +\glossaryitem{partial flattening}: first find the names of declared local classes and components. Modifiers, if present, are merged to the local elements and redeclarations are performed. Then base-classes are looked up, flattened and inserted into the class. See also flattening, which additionally flattens local elements and performs modifications. (See \autoref{flattening-process}.) -\textbf{plug-compatibility}: see restricted subtyping and \autoref{plug-compatibility-or-restricted-subtyping}. +\glossaryitem{plug-compatibility}: see restricted subtyping and \autoref{plug-compatibility-or-restricted-subtyping}. -\textbf{predefined type}: one of the types \lstinline!Real!, \lstinline!Boolean!, \lstinline!Integer!, +\glossaryitem{predefined type}: one of the types \lstinline!Real!, \lstinline!Boolean!, \lstinline!Integer!, \lstinline!String! and types defined as \lstinline!enumeration! types. The component declarations of the predefined types define attributes such as \lstinline!min!, \lstinline!max!, and \lstinline!unit!. (See \autoref{predefined-types-and-classes}.) -\textbf{prefix}: property of an element of a class definition which can +\glossaryitem{prefix}: property of an element of a class definition which can be present or not be present, e.g. \lstinline!final!, \lstinline!public!, \lstinline!flow!. (See \autoref{prefix-rules}.) -\textbf{primitive type}: one of the built-in types \lstinline!RealType!, +\glossaryitem{primitive type}: one of the built-in types \lstinline!RealType!, \lstinline!BooleanType!, \lstinline!IntegerType!, \lstinline!StringType!, \lstinline!EnumType!. The primitive types are used to define attributes and value of predefined types and enumeration types. (See \autoref{predefined-types-and-classes}.) -\textbf{redeclare}: the modifier that changes a replaceable element. +\glossaryitem{redeclare}: the modifier that changes a replaceable element. (See \autoref{redeclaration}) -\textbf{replaceable}: an element that can be replaced by a different +\glossaryitem{replaceable}: an element that can be replaced by a different element having a compatible interface. (See \autoref{redeclaration}) -\textbf{restricted subtyping} or \textbf{plug-compatibility}: a type A +\glossaryitem{restricted subtyping} or \glossaryitem{plug-compatibility}: a type A is a restricted subtype of type B iff A is a subtype of B, and all public components present in A but not in B must be default-connectable. This is used to avoid introducing, via a redeclaration, an un-connected connector in the object/class of type A at a level where a connection is not possible. (See \autoref{plug-compatibility-or-restricted-subtyping}.) -\textbf{scalar} or scalar variable: a variable that is not an array. +\glossaryitem{scalar} or scalar variable: a variable that is not an array. -\textbf{simple type:} Real, Boolean, Integer, String and enumeration +\glossaryitem{simple type:} Real, Boolean, Integer, String and enumeration types -\textbf{specialized class}: one of: model, connector, package, record, +\glossaryitem{specialized class}: one of: model, connector, package, record, block, function, type. The class restriction of a class represents an assertion regarding the content of the class and restricts its use in other classes. For example, a class having the package class restriction must only contain classes and constants. (See \autoref{specialized-classes}.) -\textbf{subtype} or \textbf{interface compatible}: relation between +\glossaryitem{subtype} or \glossaryitem{interface compatible}: relation between types. A is a subtype of (interface compatible with) B iff a number of properties of A and B are the same and all important elements of B have corresponding elements in A with the same names and their types being subtypes of the corresponding element types in B. See also restricted subtyping and function restricted subtyping. (See \autoref{interface-compatibility-or-subtyping}.) -\textbf{supertype}: relation between types. The inverse of subtype. A is +\glossaryitem{supertype}: relation between types. The inverse of subtype. A is a subtype of B means that B is a supertype of A. (See \autoref{interface-compatibility-or-subtyping}.) -\textbf{transitively nonreplaceable}: a class reference is considered +\glossaryitem{transitively nonreplaceable}: a class reference is considered transitively non-replaceable if there are no replaceable elements in the referenced class, or any of its base classes or constraining types transitively at any level. (See \autoref{transitively-non-replaceable}.) -\textbf{type} or interface: property of an instance, expression, consisting of a number of attributes and a set of public +\glossaryitem{type} or interface: property of an instance, expression, consisting of a number of attributes and a set of public elements consisting of element name, element type, and element attributes. Note: The concept of class type is a property of a class definition. (See \autoref{interface-or-type}.) -\textbf{variability}: property of an expression: one of +\glossaryitem{variability}: property of an expression: one of \begin{itemize} -\item \textbf{continuous}: an expression that may change its value at any +\item \glossaryitem{continuous}: an expression that may change its value at any point in time. -\item \textbf{discrete}: may change its value only at events during +\item \glossaryitem{discrete}: may change its value only at events during simulation. -\item \textbf{parameter}: constant during the entire simulation, recommended +\item \glossaryitem{parameter}: constant during the entire simulation, recommended to change for a component. -\item \textbf{constant}: constant during the entire simulation (can be used +\item \glossaryitem{constant}: constant during the entire simulation (can be used in a package) . \end{itemize} @@ -279,7 +279,7 @@ \chapter{Glossary}\doublelabel{glossary} variability constraint: The expression must not have a higher variability than component x. (See \autoref{variability-of-expressions}.) -\textbf{variable}: synonym for component. (See \autoref{component-declarations}.) +\glossaryitem{variable}: synonym for component. (See \autoref{component-declarations}.) -\textbf{vector}: an array where the number of dimensions is 1. (See +\glossaryitem{vector}: an array where the number of dimensions is 1. (See \autoref{arrays}.) diff --git a/preamble.tex b/preamble.tex index de72ad7ac..e13102f9e 100644 --- a/preamble.tex +++ b/preamble.tex @@ -132,6 +132,8 @@ \newcommand{\autonameref}[1]{\autoref{#1}~\emph{\nameref*{#1}}} +\newcommand{\glossaryitem}[1]{\textbf{#1}} + \setcounter{secnumdepth}{5} % Note: Toc changed for appendex \setcounter{tocdepth}{1}