Modelica® - A Unified Object-Oriented Language for Systems Modeling Language Specification Version 3.4

Appendix A Glossary

algorithm section: part of a class definition consisting of the keyword 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 equation section, an algorithm section distinguishes inputs from outputs: An algorithm section specifies how to compute output variables as a function of given input variables. A Modelica processor may actually invert an algorithm section, i.e. compute inputs from given outputs, e.g. by search (generate and test), or by deriving an inverse algorithm symbolically. (See chapter 11.)

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 k, denoted x[k]. All elements of an array have the same type. An array element may again be an array, i.e. arrays can be nested. An array element is hence referenced using n indices in general, where n 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 chapter 10.)

array constructor: an array can be built using the array-function – with the shorthand {a, b, …}, and can also include an iterator to build an array of expressions. (See section 10.4.)

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 chapter 10.)

assignment: a statement of the form x := expr. The expression expr must not have higher variability than x. (See section 11.2.1.)

attribute: a component contained in a scalar component, such as min, max, and unit. All attributes are predefined and attribute values can only be defined using a modification, such as in Real x(unit="kg"). Attributes cannot be accessed using dot notation, and are not constrained by equations and algorithm sections. E.g. in Real x(unit="kg") = y; only the values of x and y are declared to be equal, but not their unit attributes, nor any other attribute of x and y. (See section 4.8.)

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 section 7.1.)

binding equation: Either a declaration equation or an element modification for the value of the variable. A component with a binding equation has its value bound to some expression. (See section 8.1.)

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 section 4.5.)

class type or 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 section 6.2.2.)

component or variable: an instance (object) generated by a component declaration. Special kinds of components are scalar, array, and attribute. (See section 4.4.)

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 expression. Generation of the component is suppressed if this parameter expression evaluates to false. A component declaration may be overridden by an element-redeclaration. (See section 4.4.)

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 of a local iterator variable). A scope defines a set of visible components and classes. Example reference: Ele.Resistor.u[21].r (See section 4.4 and section 10.6.9.)

declaration assignment: assignment of the form x := expression defined by a component declaration. This is similar to a declaration equation. In contrast to a declaration equation, a declaration assignment is allowed only when declaring a component contained in a function. (See section 12.4.4.)

declaration equation: Equation of the form 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 section

derived class or subclass or extended class: class B is called derived from A, if B extends A. (See chapter 7.)

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.

element modification: part of a modification, overrides the declaration equation in the class used by the instance generated by the modified element. Example: vcc(unit="V")=100. (See section 7.2.)

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: redeclare type Voltage = Real(unit="V") replaces type Voltage. (See section 7.3.)

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 section 5.3.1).

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 (solved for). In contrast to a statement in an algorithm section, an equation does not define for which of its variable it is to be solved. Special cases are: initial equations, instantaneous equations, declaration equations. (See chapter 8.)

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 section 8.5.)

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 chapter 3.)

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 chapter 7.)

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 section 5.6.)

function: a class of the specialized class function. (See chapter 12.)

function subtype or 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 section 6.5.)

identifier or ident: an atomic (not composed) name. Example: Resistor (See section 2.3.)

index or 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 section 10.5.)

inheritance interface or 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 section 6.2.2.)

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.

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 section 8.3.5 and section 11.2.7.)

interface: see type. (See section 6.2.)

literal: a real, integer, boolean, enumeration, or string literal. Used to build expressions. (See section 2.4.)

matrix: an array where the number of dimensions is 2. (See chapter 10.)

modification: part of an element. Modifies the instance generated by that element. A modification contains element modifications and element redeclarations. (See section 7.2.)

modification environment: the modification environment of a class defines how to modify the corresponding class definition when flattening the class. (See section 7.2.2.)

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: ”Ele.Resistor”. (See section 2.3.2.)

operator record: A record with user-defined operations; defining e.g. multiplication and addition see chapter 14.

partial: a class that is incomplete and cannot be instantiated in a simulation model; useful e.g. as a base-class. (See section 4.4.2.)

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 section 5.6.)

plug-compatibility: see restricted subtyping and section 6.4.

predefined type: one of the types Real, Boolean, Integer, String and types defined as enumeration types. The component declarations of the predefined types define attributes such as min, max, and unit. (See section 4.8.)

prefix: property of an element of a class definition which can be present or not be present, e.g. final, public, flow. (See section

primitive type: one of the built-in types RealType, BooleanType, IntegerType, StringType, EnumType. The primitive types are used to define attributes and value of predefined types and enumeration types. (See section 4.8.)

redeclare: the modifier that changes a replaceable element. (See section 7.3)

replaceable: an element that can be replaced by a different element having a compatible interface. (See section 7.3)

restricted subtyping or 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 section 6.4.)

scalar or scalar variable: a variable that is not an array.

simple type: Real, Boolean, Integer, String and enumeration types

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 section 4.6.)

subtype or 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 section 6.3.)

supertype: relation between types. The inverse of subtype. A is a subtype of B means that B is a supertype of A. (See section 6.3.)

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 section 6.2.1.)

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 section 6.2.)

variability: property of an expression: one of

  • continuous: an expression that may change its value at any point in time.

  • discrete: may change its value only at events during simulation.

  • parameter: constant during the entire simulation, recommended to change for a component.

  • constant: constant during the entire simulation (can be used in a package) .

Assignments x := expr and binding equations x = expr must satisfy a variability constraint: The expression must not have a higher variability than component x. (See section 3.8.)

variable: synonym for component. (See section 4.4.)

vector: an array where the number of dimensions is 1. (See chapter 10.)