<<

A Component Pascal Language Report

Copyright © 1994-2001 by Oberon micro systems, Inc., Switzerland. All rights reserved. No part of this publication may be reproduced in any form or by any means, without prior written permission by Oberon microsystems. The only exception is the free electronic distribution of the Education Edition of BlackBox (see the accompanying copyright notice for details). Oberon microsystems, Inc. Technoparkstrasse 1 CH-8005 Zurich Switzerland Oberon is a trademark of Prof. . Component Pascal is a trademark of Oberon microsystems, Inc. All other trademarks and registered trademarks belong to their respec• tive owners. Authors Oberon microsystems, Inc. March 2001 Authors of Oberon-2 report H. Mossenbock, N. Wirth Institut fUr Computersysteme, ETH Zurich October 1993 Author of Oberon report N. Wirth Institut fur Computersysteme, ETH Zurich 1987 Contents 1. Introduction 2. Syntax 3. Vocabulary and Representation 4. Declarations and Rules 5. Constant Declarations 6. Type Declarations 6.1 Basic Types 6.2 Array Types 6.3 Record Types 6.4 Pointer Types 6.5 Procedure Types

377 A Component Pascal Language Report

6.6 String Types 7. Variable Declarations 8. Expressions 8.1 Operands 8.2 Operators 9. Statements 9.1 Assignments 9.2 Procedure Calls 9.3 Statement Sequences 9.4 If Statements 9.5 Case Statements 9.6 While Statements 9.7 Repeat Statements 9.8 For Statements 9.9 Loop Statements 9.10 Return and Statements 9.11 With Statements 10. Procedure Declarations 10.1 Formal Parameters 10.2 Methods 10.3 Predeclared Procedures lOA Finalization 11. Modules Appendix A: Definition of Terms Appendix B: Syntax of Component Pascal Appendix : Domains of Basic Types Appendix : Mandatory Requirements for Environment 1. Introduction Component Pascal is Oberon microsystems' refinement of the Oberon-2 language. Oberon micro systems thanks H. Mossen• bock and N. Wirth for the friendly permission to use their Oberon-2 report as basis for this document. Component Pascal is a general-purpose language in the tradi• tion of Pascal, -2, and Oberon. Its most important fea• tures are block structure, modularity, separate compilation, static typing with strong type checking (also across module boundaries), type extension with methods, dynamic loading of modules, and garbage collection. Type extension makes Component Pascal an object-oriented lan• guage. An object is a variable of an abstract consisting of private data (its state) and procedures that operate on this data. Abstract data types are declared as extensible records.

378 A Component Pascal Language Report

Component Pascal covers most terms of object-oriented lan• guages by the established vocabulary of imperative languages in order to minimize the number of notions for similar concepts. Complete type safety and the requirement of a dynamic object model make Component Pascal a component-oriented lan• guage. This report is not intended as a programmer's tutorial. It is intentionally kept concise. Its function is to serve as a reference for programmers. What remains unsaid is mostly left so inten• tionally, either because it can be derived from stated rules of the language, or because it would require to commit the definition when a general commitment appears as unwise. Appendix A defines some terms that are used to express the type checking rules of Component Pascal. Where they appear in the text, they are written in italics to indicate their special mean• ing (e.g. the same type). It is recommended to minimize the use of procedure types and super calls, since they are considered obsolete. They are retained for the time being, in order to simplify the use of existing Oberon-2 code. Support for these features may be reduced in later product releases. In the following text, red stretches denote these obsolete features. 2. Syntax An extended Backus-Naur formalism (EBNF) is used to describe the syntax of Component Pascal: Alternatives are separated by I. Brackets [ and 1 denote optionality of the enclosed expression, and braces { and} denote its repetition (possibly 0 times). Ordi• nary parentheses ( and) are used to group symbols if necessary. Non-terminal symbols start with an upper-case letter (e.g., State• ment). Terminal symbols either start with a lower-case letter (e.g., ident), or are written all in upper-case letters (e.g., BEGIN), or are denoted by strings (e.g., ":="). 3. Vocabulary and Representation The representation of (terminal) symbols in terms of characters is defined using ISO 8859-1, i.e., the Latin-1 extension of the ASCII character set. Symbols are identifiers, numbers, strings, operators, and delimiters. The following lexical rules must be observed: Blanks and line breaks must not occur within symbols (except in comments, and blanks in strings). They are ignored

379 A Component Pascal Language Report

unless they are essential to separate two consecutive symbols. Capital and lower-case letters are considered as distinct. 1. Identifiers are sequences of letters, digits, and underscores. The first character must not be a digit. ident = ( letter I "_" ) { letter I "_" I digit }. letter = flA il .. liZ" I "a" .. liZ" I "All .. "0" I "0 11 .. "Oil 1110 11 .. lIy". digit = "0" I "1" I "2" I "3" I "4" I "5" I "6" I "7" I "8" 1"9". Examples: x Scan Oberon2 GetSymbol firstLetter 2. Numbers are (unsigned) integer or real constants. The type of an integer constant is INTEGER if the constant value belongs to INTEGER, or LONGINT otherwise (see 6.1). If the constant is speci• fied with the suffix 'H' or 'L', the representation is hexadecimal, otherwise the representation is decimal. The suffix 'H' is used to specify 32-bit constants in the range -2147483648 .. 2147483647. At most 8 significant hex digits are allowed. The suffix 'L' is used to specify 64-bit constants. A real number always contains a decimal point. Optionally it may also contain a decimal scale factor. The letter E means "times ten to the power of" . A real number is always of type REAL.

number = integer I real. integer = digit { digit} I digit { hexOigit } ( "H" I "L" ). real = digit { digit} "." { digit} [ Scale Factor ]. ScaleFactor = "E" [ "+" I "-" ] digit { digit }. hexOigit = digit I "A' I "B" I "C" I "0" I "E" I "F". Examples: 1234567 INTEGER 1234567 OOH INTEGER 13 12.3 REAL 12.3 4.567E8 REAL 456700000 OFFFFOOOOH INTEGER -65536 OFFFFOOOOL LONGINT 4294901760 3. Character constants are denoted by the ordinal number of the character in hexadecimal notation followed by the letter x. character = digit { hexOigit } "X". 4. Strings are sequences of characters enclosed in single (') or double (,,) quote marks. The opening quote must be the same as the closing quote and must not occur within the string. The number of characters in a string is called its length. A string of length 1 can be used wherever a character constant is allowed and vice versa.

380 A Component Pascal Language Report

string = ' " , {char} , " , I " , " { char} " , ". Examples: "Component Pascal" "Don't worry!" 5. Operators and delimiters are the special characters, character pairs, or reserved words listed below. The reserved words con- sist exclusively of capital letters and cannot be used as identifi- ers. + ABSTRACT EXTENSIBLE POINTER 1\ ARRAY FOR PROCEDURE BEGIN IF RECORD # BY IMPORT REPEAT < CASE IN RETURN & > CLOSE IS THEN <= CONST LIMITED TO >= DIV LOOP TYPE DO MOD UNTIL I ELSE MODULE VAR $ ELSIF NIL WHILE ( EMPTY OF WITH [ END OR { EXIT OUT 6. Comments may be inserted between any two symbols in a pro• gram. They are arbitrary character sequences opened by the bracket (* and closed by *). Comments may be nested. They do not affect the meaning of a program. 4. Declarations and Scope Rules Every identifier occurring in a program must be introduced by a declaration, unless it is a predeclared identifier. Declarations also specify certain permanent properties of an object, such as whether it is a constant, a type, a variable, or a procedure. The identifier is then used to refer to the associated object. The scope of an object x extends textually from the point of its declaration to the end of the block (module, procedure, or record) to which the declaration belongs and hence to which the object is local. It excludes the scopes of equally named objects which are declared in nested blocks. The scope rules are: 1. No identifier may denote more than one object within a given scope (i.e., no identifier may be declared twice in a block); 2. An object may only be referenced within its scope; 3. A declaration of a type T containing references to another type T1 may occur at a point where T1 is still unknown. The declara• tion of T1 must follow in the same block to which T is local;

381 A Component Pascal Language Report

4. Identifiers denoting record fields (see 6.3) or methods (see 10.2) are valid in record designators only. An identifier declared in a module block may be followed by an export mark ("." or "-") in its declaration to indicate that it is exported. An identifier x exported by a module M may be used in other modules, if they import M (see Ch.11). The identifier is then denoted as M.x in these modules and is called a qualified identifier. Variables and record fields marked with "-" in their dec• laration are read-only (variables and fields) or implement-only (methods) in importing modules. Qualident = [ ident "." ] ident. IdentDef = ident [ "." I "-" ]. The following identifiers are predeclared; their meaning is defined in the indicated sections:

ABS (10.3) INTEGER (6.1 ) ANYPTR (6.1 ) FALSE (6.1 ) ANYREC (6.1 ) LEN (10.3) ASH (10.3) LONG (10.3) ASSERT (10.3) LONGINT (6.1) BITS (10.3) MAX (10.3) BOOLEAN (6.1 ) MIN (10.3) BYTE (6.1 ) NEW (10.3) CAP (10.3) ODD (10.3) CHAR (6.1 ) ORO (10.3) CHR (10.3) REAL (6.1) DEC (10.3) SET (6.1 ) ENTlER (10.3) SHORT (10.3) EXCL (10.3) SHORTCHAR (6.1 ) HALT (10.3) SHORTINT (6.1 ) INC (10.3) SHORTREAL (6.1 ) INCL (10.3) SIZE (10.3) INF (6.1 ) TRUE (6.1) 5. Constant Declarations A constant declaration associates an identifier with a constant value.

ConstantDeclaration = IdentDef "=" ConstExpression. ConstExpression = Expression. A constant expression is an expression that can be evaluated by a mere textual scan without actually executing the program. Its operands are constants (Ch.8) or predeclared functions (Ch.10.3) that can be evaluated at compile time. Examples of constant declarations are: N = 100

382 A Component Pascal Language Report

limit = 2*N - 1 fullSet = {MIN(SET) .. MAX(SET)} 6. Type Declarations A data type determines the set of values which variables of that type may assume, and the operators that are applicable. A type declaration associates an identifier with a type. In the case of structured types (arrays and records) it also defines the structure of variables of this type. A structured type cannot contain itself.

TypeDeclaration = IdentDef "=" Type. Type = Qualident I ArrayType I RecordType I PointerType I ProcedureType. Examples: Table = ARRAY N OF REAL Tree = POINTER TO Node Node = EXTENSIBLE RECORD key: INTEGER; left, right: Tree END CenterTree = POINTER TO CenterNode CenterNode = RECORD (Node) width: INTEGER; subnode: Tree END Object = POINTER TO ABSTRACT RECORD END Function = PROCEDURE (x: INTEGER): INTEGER 6.1 Basic Types The types are denoted by predeclared identifiers. The asso• ciated operators are defined in 8.2 and the predeclared function procedures in 10.3. The values of the given basic types are the fol• lowing:

1. BOOLEAN the truth values TRUE and FALSE

2. SHORTCHAR the characters of the Latin-l character set (OX .. OFFX)

3. CHAR the characters of the Unicode character set (ox .. OFFFFX)

4. BYTE the integers between MIN(BYTE) and MAX(BYTE)

5. SHORTINT the integers between MIN(SHORTINT) and MAX(SHORTINT)

383 A Component Pascal Language Report

6. INTEGER the integers between MIN(INTEGER) and MAX(INTEGER)

7. LONGINT the integers between MIN(LONGINT) and MAX(LONGINT)

8. SHORTREAL the real numbers between MIN(SHORTREAL) and MAX(SHORTREAL), the value INF

9. REAL the real numbers between MIN(REAL) and MAX(REAL), the value INF

10. SET the sets of integers between 0 and MAX(SET) Types 4 to 7 are integer types, types 8 and 9 are real types, and together they are called numeric types. They form a hierarchy; the larger type includes (the values of) the smaller type: REAL >= SHORTREAL >= LONGINT >= INTEGER >= SHORTINT >= BYTE Types 2 and 3 are character types with the type hierarchy:

CHAR >= SHORTCHAR 6.2 Array Types An array is a structure consisting of a number of elements which are all of the same type, called the element type. The number of elements of an array is called its length. The elements of the array are designated by indices, which are integers between a and the length minus 1. ArrayType = ARRAY [Length { '," Length} 1OF Type. Length = ConstExpression. A type of the form ARRAY LO, L1, .. . ,Ln OF T is understood as an abbreviation of

ARRAY LO OF ARRAY L1 OF

ARRAYLnOFT Arrays declared without length are called open arrays. They are restricted to pointer base types (see 6.4), element types of open array types, and formal parameter types (see 10.1). Examples: ARRAY 10, N OF INTEGER ARRAY OF CHAR

384 A Component Pascal Language Report

6.3 Record Types A record type is a structure consisting of a fixed number of ele• ments, called fields, with possibly different types. The record type declaration specifies the name and type of each field. The scope of the field identifiers extends from the point of their dec• laration to the end of the record type, but they are also visible within designators referring to elements of record variables (see 8.1). If a record type is exported, field identifiers that are to be visible outside the declaring module must be marked. They are called public fields; unmarked elements are called private fields. RecordType = RecAttributes RECORD [ "(" BaseType ")" ] FieldList { ";" FieldList } END. RecAttributes =[ ABSTRACT I EXTENSIBLE I LIMITED ]. BaseType = Qualident. FieldList = [ IdentList ":" Type ]. IdentList = IdentDef { "," IdentDef}. The usage of a record type is restricted by the presence or absence of one of the following attributes: ABSTRACT, EXTENSIBLE, and LIMITED.

A record type marked as ABSTRACT cannot be instantiated. No variables or fields of such a type can ever exist. Abstract types are only used as base types for other record types (see below). Variables of a LIMITED record type can only be allocated inside the module where the record type is defined. The restriction applies to static allocation by a variable declaration (Ch. 7) as well as to dynamic allocation by the standard procedure NEW (Ch.10.3).

Record types marked as ABSTRACT or EXTENSIBLE are extensible, i.e., a record type can be declared as an extension of such a record type. In the example TO = EXTENSIBLE RECORD x: INTEGER END T1 = RECORD (TO) y: REAL END T1 is a (direct) extension of TO and TO is the (direct) base type of T1 (see App. A). An extended type T1 consists of the fields of its base type and of the fields which are declared in T1. All identifiers declared in the extended record must be different from the iden• tifiers declared in its base type record (s). The base type of an abstract record must be abstract. Alternatively, a pointer type can be specified as the base type. The record base type of the pointer is used as the base type of the declared record in this case. A record which is an extension of a hidden (i.e., non-exported) record type may not be exported. Each record is implicitly an

385 A Component Pascal Language Report

extension of the predeclared type ANYREC. ANYREC does not con• tain any fields and can only be used in pointer and variable parameter declarations. Summary of attributes: attribute extension allocate none no yes EXTENSIBLE yes yes ABSTRACT yes no LIMITED m defining module only Examples of record type declarations: RECORD day, month, year: INTEGER END

LIMITED RECORD name, firstname: ARRAY 32 OF CHAR; age: INTEGER; salary: REAL END 6.4 Pointer Types Variables of a pointer type P assume as values pointers to varia• bles of some type T. T is called the pointer base type of P and must be a record or array type. Pointer types adopt the exten• sion relation of their pointer base types: if a type T1 is an exten• sion of T, and P1 is of type POINTER TO T1, then P1 is also an exten• sion of P. PointerType =POINTER TO Type. If p is a variable of type P = POINTER TO T, a call of the predeclared procedure NEW(p) (see 10.3) allocates a variable of type T in free storage. If T is a record type or an array type with fixed length, the allocation has to be done with NEW(p); if T is an n-dimen• sional open array type the allocation has to be done with NEW(p, eO, ... , en-1) where T is allocated with lengths given by the expres• sions eO, ... , en-1. In either case a pointer to the allocated variable is assigned to p. p is of type P. The referenced variable pi' (pro• nounced as p-referenced) is of type T. Any pointer variable may assume the value NIL, which points to no variable at all. All fields or elements of a newly allocated record or array are cleared, which implies that all embedded pointers and procedure varia• bles are initialized to NIL. The predeclared type ANYPTR is defined as POINTER TO ANYREC. Any pointer to a record type is therefore an extension of ANYPTR. The procedure NEW cannot be used for variables of type ANYPTR.

386 A Component Pascal Language Report

6.S Procedure Types

Variables of a procedure type T have a procedure (or NIL) as value. If a procedure P is assigned to a variable of type T, the for• mal parameter lists (see Ch. 10.1) of P and T must match (see App. A). P must not be a predeclared procedure or a method nor may it be local to another procedure. ProcedureType = PROCEDURE [ FormalParameters ]. 6.6 String Types Values of a string type are sequences of characters terminated by a null character (ox). The length of a string is the number of char• acters it contains excluding the null character. Strings are either constants or stored in an array of character type. There are no pre• declared identifiers for string types because there is no need to use them in a declaration. Constant strings which consist solely of characters in the range OX .. OFFX and strings stored in an array of SHORTCHAR are of type Shortstring, all others are of type String. 7. Variable Declarations Variable declarations introduce variables by defining an identi• fier and a data type for them. Variable Declaration = IdentList ":" Type. Record and pointer variables have both a static type (the type with which they are declared - simply called their type) and a dynamic type (the type of their value at run-time). For pointers and variable parameters of record type the dynamic type may be an extension of their static type. The static type determines which fields of a record are accessible. The dynamic type is used to call methods (see 10.2). Examples of variable declarations (refer to examples in Ch. 6): i, j, k: INTEGER x, y: REAL p, q: BOOLEAN

s: SET

F: Function a: ARRAY 100 OF REAL

387 A Component Pascal Language Report

w: ARRAY 16 OF RECORD name: ARRAY 32 OF CHAR; count: INTEGER END t, c: Tree 8. Expressions Expressions are constructs denoting rules of computation whereby constants and current values of variables are combined to compute other values by the application of operators and function procedures. Expressions consist of operands and opera• tors. Parentheses may be used to express specific associations of operators and operands. 8.1 Operands With the exception of set constructors and literal constants (numbers, character constants, or strings), operands are denoted by designators. A designator consists of an identifier referring to a constant, variable, or procedure. This identifier may possibly be qualified by a module identifier (see Ch. 4 and 11) and may be followed by selectors if the designated object is an element of a structure.

Designator = Qualident {"." ident 1"[" ExpressionList")" I "1\" I "(" Qualident ")" I ActualParameters } [ "$" ]. ExpressionList = Expression { "," Expression }. ActualParameters = "(" [ ExpressionList] ")". If a designates an array, then ale] denotes that element of a whose index is the current value of the expression e. The type of e must be an integer type. A designator of the form a[eO, e1, ... , en] stands for a[eO][e1]. .. [en]. If r designates a record, then r.f denotes the field f of r or the method f of the dynamic type of r (Ch. 10.2). If a or rare read-only, then also ale] and rJ are read-only. If p designates a pointer, p" denotes the variable which is refer• enced by p. The designators p"J, p"[e], and P"$ may be abbreviated as p.f, p[e], and p$, i.e., record, array, and string selectors imply dereferencing. Dereferencing is also implied if a pointer is assigned to a variable of a record or array type (Ch. 9.1), if a pointer is used as actual parameter for a formal parameter of a record or array type (Ch. 10.1), or if a pointer is used as argu• ment of the standard procedure LEN (Ch. 10.3). A type v(T) asserts that the dynamic type of v is T (or an extension of T), i.e., program execution is aborted, if the dynamic

388 A Component Pascal Language Report type of v is not T (or an extension of T). Within the designator, v is then regarded as having the static type T. The guard is applica• ble, if 1. v is an IN or VAR parameter of record type or v is a pointer to a record type, and if 2. T is an extension of the static type of v. If the designated object is a constant or a variable, then the des• ignator refers to its current value. If it is a procedure, the desig• nator refers to that procedure unless it is followed by a (possibly empty) parameter list in which case it implies an activation of that procedure and stands for the value resulting from its execu• tion. The actual parameters must correspond to the formal parameters as in proper procedure calls (see 10.1). If a designates an array of character type, then a$ denotes the null terminated string contained in a. It leads to a run-time error if a does not contain a ox character. The $ selector is applied implic• itly if a is used as an operand of the concatenation operator (Ch. 8.2.4), a relational operator (Ch. 8.2.5), or one of the predeclared procedures LONG and SHORT (Ch. 10.3). Examples of designators (refer to examples in Ch.7): i (INTEGER) ali] (REAL) w[3].name[ i ] (CHAR) t.left.right (Tree) t(CenterTree ).subnode (Tree) w[i].name$ (String) 8.2 Operators Four classes of operators with different precedences (binding strengths) are syntactically distinguished in expressions. The operator - has the highest precedence, followed by multiplica• tion operators, addition operators, and relations. Operators of the same precedence associate from left to right. For example, x• y-z stands for (x-y)-z.

Expression = SimpleExpression [ Relation Simple Expression ]. Simple Expression = [ "+" I "-" ] Term { AddOperator Term }. Term = Factor { MulOperator Factor }. Factor = Designator I number I character I string I NIL I Set I "(" Expression ")" I "-" Factor. Set = "{" [ Element { "," Element}] "}" . Element = Expression [" .. " Expression]. Relation = 11=" 1"#" 1"<" 1"<=" 111>" 111>=11 liN liS. AddOperator = 11+" I"_" I OR. MulOperator = "*" I "/" I DIV I MOD I "&".

389 A Component Pascal Language Report

The available operators are listed in the following tables. Some operators are applicable to operands of various types, denoting different operations. In these cases, the actual operation is iden• tified by the type of the operands. The operands must be expres• sion compatible with respect to the operator (see App. A). 8.2.1 Logical operators OR logical disjunction p OR q "if p then TRUE, else q" & logical conjunction p & q "if p then q, else FALSE" negation -p "not p"

These operators apply to BOOLEAN operands and yield a BOOLEAN result. The second operand of a disjunction is only evaluated if the result of the first is FALSE. The second oprand of a conjunction is only evaluated if the result of the first is TRUE. 8.2.2 Arithmetic operators

+ sum difference product I real quotient DIV integer quotient MOD modulus

The operators +, -,', and I apply to operands of numeric types. The type of the result is REAL if the operation is a division (I) or one of the operand types is a REAL. Otherwise the result type is SHORT• REAL if one of the operand types is SHORTREAL, LONGINT if one of the operand types is LONGINT, or INTEGER in any other case. If the result of a real operation is too large to be represented as a real number, it is changed to the predeclared value INF with the same sign as the original result. Note that this also applies to 1.010.0, but not to 0.010.0 which has no defined result at all and leads to a run-time error. When used as monadic operators, - denotes sign inversion and + denotes the identity operation. The operators DIV and MOD apply to integer operands only. They are related by the following formulas: x = (x DIV y) • Y + (x MOD y) o <= (x MOD y) < y or 0 >= (x MOD y) > y Note: x DIV y = ENTIER(X/y) Examples: x Y xDIVy xMODy 5 3 1 2 -5 3 -2 1 5 -3 -2 -1 -5 -3 -2

390 A Component Pascal Language Report

Note: (-5) DIV 3 =-2 but -5 DIV 3 = -(5 DIV 3) = -1 8.2.3 Set operators + union difference (x - y = x * (-y)) intersection symmetric set difference (x / y = (x-y) + (y-x))

Set operators apply to operands of type SET and yield a result of type SET. The monadic minus sign denotes the complement of x, i.e., -x denotes the set of integers between 0 and MAX(SET) which are not elements of x. Set operators are not associative «(a+b)-c # a+(b-c) . A set constructor defines the value of a set by listing its elements between curly brackets. The elements must be integers in the range O.. MAX(SET). A range a ..b denotes all integers i with i >= a and i <= b. 8.2.4 String operators + string concatenation The concatenation operator applies to operands of string types. The resulting string consists of the characters of the first oper• and followed by the characters of the second operand. If both operands are of type Shortstring the result is of type Shortstring, otherwise the result is of type String. 8.2.5 Relations equal # unequal < less <= less or equal > greater >= greater or equal IN set membership IS type test

Relations yield a BOOLEAN result. The relations =, #, <, <=, >, and >= apply to the numeric types, character types, and string types. The relations = and # also apply to BOOLEAN and SET, as well as to pointer and procedure types (including the value NIL). x IN 5 stands for "x is an element of 5". X must be an integer in the range O.. MAX(SET), and 5 of type SET. v IS T stands for "the dynamic type of v is T (or an extension of T)" and is called a type test. It is applicable if

1. v is an IN or VAR parameter of record type or v is a pointer to a record type, and if 2. T is an extension of the static type of v.

391 A Component Pascal Language Report

Examples of expressions (refer to examples in Ch.7): 1991 INTEGER i DIV 3 INTEGER -p OR q BOOLEAN (i+j) • (i-j) INTEGER s - {S, 9, 13} SET i +x REAL a[i+j) • a[i-j) REAL (0 <= i) & (i < 100) BOOLEAN t.key = 0 BOOLEAN kiN {i..j-1} BOOLEAN w[ij.name$ <= "John" BOOLEAN t IS CenterTree BOOLEAN 9. Statements Statements denote actions. There are elementary and structured statements. Elementary statements are not composed of any parts that are themselves statements. They are the assignment, the procedure call, the return, and the exit statement. Structured statements are composed of parts that are themselves state• ments. They are used to express sequencing and conditional, selective, and repetitive execution. A statement may also be empty, in which case it denotes no action. The empty statement is included in order to relax punctuation rules in statement sequences. Statement = [ Assignment I ProcedureCali1 If Statement I CaseStatement I WhileStatement I RepeatStatement I ForStatement I LoopStatement I WithStatement I EXIT I RETURN [ Expression jj. 9.1 Assignments Assignments replace the current value of a variable by a new value specified by an expression. The expression must be assign• ment compatible with the variable (see App. A). The assignment operator is written as ":=" and pronounced as becomes. Assignment = Designator ":=" Expression. If an expression e of type Te is assigned to a variable v of type Tv, the following happens:

1. if Tv and Te are record types, all fields of that type are assigned;

2. if Tv and Te are pointer types, the dynamic type of v becomes the dynamic type of e;

3. if Tv is an array of character type and e is a string of length m < LEN(v), v[ij becomes ei for i = 0 .. m-1 and v[mj becomes ox. It leads to a run-time error if m >= LEN(v).

392 A Component Pascal Language Report

Examples of assignments (refer to examples in Ch.7): i :=0 p:= i =j x:= i + 1 k := Log2(i+j) F := Log2 (* see 10.1 *) s := {2, 3, 5, 7,11,13} ali] := (x+y) * (x-y) t.key := i w[i+1].name := "John" t:= c 9.2 Procedure Calls A procedure call activates a procedure. It may contain a list of actual parameters which replace the corresponding formal parameters defined in the procedure declaration (see Ch. 10). The correspondence is established by the positions of the parameters in the actual and formal parameter lists. There are two kinds of parameters: variable and value parameters. If a formal parameter is a variable parameter, the corresponding actual parameter must be a designator denoting a variable. If it denotes an element of a structured variable, the component selectors are evaluated when the formal/actual parameter sub• stitution takes place, i.e., before the execution of the procedure. If a formal parameter is a value parameter, the corresponding actual parameter must be an expression. This expression is • uated before the procedure activation, and the resulting value is assigned to the formal parameter (see also 10.1). Procedure Call = Designator [ ActualParameters ]. Examples: Writelnt(i*2+ 1) (* see 10.1 *) INC(w[k].count) t.lnsert("John") (* see 11 *) 9.3 Statement Sequences Statement sequences denote the sequence of actions specified by the component statements which are separated by semicolons.

StatementSequence = Statement { ";" Statement }. 9.4 If Statements If Statement = IF Expression THEN StatementSequence { ELSIF Expression THEN StatementSequence } [ ELSE StatementSequence ] END. If statements specify the conditional execution of guarded state• ment sequences. The Boolean expression preceding a statement

393 A Component Pascal Language Report

sequence is called its guard. The guards are evaluated in sequence of occurrence, until one evaluates to TRUE, whereafter its associated statement sequence is executed. If no guard is sat• isfied, the statement sequence following the symbol ELSE is exe• cuted, if there is one. Example: IF (ch >= "A") & (ch <= "ZOO) THEN Readldentifier ELSIF (ch >= "0") & (ch <= "9") THEN ReadNumber ELSIF (ch =""') OR (ch ="") THEN ReadString ELSE SpecialCharacter END 9.5 Case Statements Case statements specify the selection and execution of a state• ment sequence according to the value of an expression. First the case expression is evaluated, then that statement sequence is executed whose case label list contains the obtained value. The case expression must be of an integer or character type that includes the values of all case labels. Case labels are constants, and no value must occur more than once. If the value of the expression does not occur as a label of any case, the statement sequence following the symbol ELSE is selected, if there is one, otherwise the program is aborted. CaseStatement = CASE Expression OF Case { "I" Case} [ ELSE StatementSequence ) END. Case = [ CaseLabelList ":" StatementSequence ). CaseLabelList = CaseLabels { "," Case Labels }. CaseLabels = ConstExpression [ " .. " ConstExpression). Example: CASEch OF "A" .. "Z": Readldentifier "0" .. "9": ReadNumber ""', "": ReadString ELSE Special Character END 9.6 While Statements While statements specify the repeated execution of a statement sequence while the Boolean expression (its guard) yields TRUE. The guard is checked before every execution of the statement sequence. WhileStatement = WHILE Expression DO StatementSequence END. Examples: WHILE i > 0 DO i := i DIV 2; k := k + 1 END

394 A Component Pascal Language Report

WHILE (t # NIL) & (t.key # i) DO t := Ueft END 9.7 Repeat Statements A repeat statement specifies the repeated execution of a state• ment sequence until a condition specified by a Boolean expres• sion is satisfied. The statement sequence is executed at least once. RepeatStatement = REPEAT StatementSequence UNTIL Expression. 9.8 For Statements A for statement specifies the repeated execution of a statement sequence while a progression of values is assigned to an integer variable called the control variable of the for statement. ForStatement = FOR ident ":=" Expression TO Expression I BY ConstExpression ) DO StatementSequence END. The statement FOR v := beg TO end BY step DO statements END is equivalent to temp := end; v := beg; IF step> 0 THEN WHILE v <= temp DO statements; INC(v, step) END ELSE WHILE v >= temp DO statements; INC(v, step) END END temp has the same type as v. step must be a nonzero constant expression. If step is not specified, it is assumed to be 1. Examples: FOR i := 0 TO 79 DO k := k + ali) END FOR i := 79 TO 1 BY -1 DO ali) := ali-1) END 9.9 Loop Statements A loop statement specifies the repeated execution of a statement sequence. It is terminated upon execution of an exit statement within that sequence (see 9.10). LoopStatement = LOOP StatementSequence END. Example: LOOP Read Int(i); IF i < 0 THEN EXIT END; Writelnt(i) END

395 A Component Pascal Language Report

Loop statements are useful to express repetitions with several exit points or cases where the exit condition is in the middle of the repeated statement sequence. 9.10 Return and Exit Statements A return statement indicates the termination of a procedure. It is denoted by the symbol RETURN, followed by an expression if the procedure is a function procedure. The type of the expression must be assignment compatible (see App. A) with the result type specified in the procedure heading (see Ch.1O). Function procedures require the presence of a return statement indicating the result value. In proper procedures, a return state• ment is implied by the end of the procedure body. Any explicit return statement therefore appears as an additional (probably exceptional) termination point.

An exit statement is denoted by the symbol EXIT. It specifies ter• mination of the enclosing loop statement and continuation with the statement following that loop statement. Exit statements are contextually, although not syntactically associated with the loop statement which contains them. 9.11 With Statements With statements execute a statement sequence depending on the result of a type test and apply a type guard to every occurrence of the tested variable within this statement sequence. WithStatement = WITH [ Guard DO StatementSequence I { "I" [ Guard DO StatementSequence I } [ ELSE StatementSequence I END. Guard = Oualident ":" Oualident.

If v is a variable parameter of record type or a pointer variable, and if it is of a static type TO, the statement

WITH v: T1 DO S1 I v: T2 DO S2 ELSE S3 END

has the following meaning: if the dynamic type of v is T1, then the statement sequence S1 is executed where v is regarded as if it had the static type T1; else if the dynamic type of v is T2, then S2 is executed where v is regarded as if it had the static type T2; else S3 is executed. T1 and T2 must be extensions of TO. If no type test is satisfied and if an else clause is missing the program is aborted. Example: WITH t: CenterTree DO i := t.width; c := t.subnode END

396 A Component Pascal Language Report

10. Procedure Declarations A procedure declaration consists of a procedure heading and a pro• cedure body. The heading specifies the procedure identifier and the formal parameters. For methods it also specifies the receiver parameter and the attributes (see 10.2). The body contains decla• rations and statements. The procedure identifier is repeated at the end of the procedure declaration. There are two kinds of procedures: proper procedures and function procedures. The latter are activated by a function designator as a constituent of an expression and yield a result that is an operand of the expression. Proper procedures are activated by a proce• dure call. A procedure is a function procedure if its formal parameters specify a result type. The body of a function proce• dure must contain a return statement which defines its result. All constants, variables, types, and procedures declared within a procedure body are local to the procedure. Since procedures may be declared as local objects too, procedure declarations may be nested. The call of a procedure within its declaration implies recursive activation. Local variables whose types are pointer types or procedure types are initialized to NIL before the body of the procedure is executed. Objects declared in the environment of the procedure are also visible in those parts of the procedure in which they are not con• cealed by a locally declared object with the same name. Procedure Declaration = ProcedureHeading ";" [ Procedure Body ident ]. ProcedureHeading = PROCEDURE [ Receiver ]ldentDef [ FormalParameters ] MethAttributes. ProcedureBody = DeclarationSequence [ BEGIN StatementSequence ] END. DeciarationSequence ={ CONST { ConstantDeciaration ";" } I TYPE { TypeDeclaration ";" } I VAR { VariableDeclaration ";" } } { ProcedureDeclaration ";" I ForwardDeclaration ";" }. ForwardDeciaration = PROCEDURE "A" [ Receiver ]ldentDef [ FormalParameters ] MethAttributes. If a procedure declaration specifies a receiver parameter, the pro• cedure is considered to be a method of the type of the receiver (see 10.2). A forward declaration serves to allow forward refer• ences to a procedure whose actual declaration appears later in the text. The formal parameter lists of the forward declaration

397 A Component Pascal Language Report

and the actual declaration must match (see App. A) and the names of corresponding parameters must be equal. 10.1 Formal Parameters Formal parameters are identifiers declared in the formal param• eter list of a procedure. They correspond to actual parameters specified in the procedure call. The correspondence between for• mal and actual parameters is established when the procedure is called. There are two kinds of parameters, value and variable parameters, the latter indicated in the formal parameter list by the presence of one of the keywords VAR, IN, or OUT. Value parameters are local variables to which the value of the corre• sponding actual parameter is assigned as an initial value. Varia• ble parameters correspond to actual parameters that are varia• bles, and they stand for these variables. Variable parameters can be used for input only (keyword IN), output only (keyword OUT), or input and output (keyword VAR). IN can only be used for array and record parameters. Inside the procedure, input parameters are read-only. Like local variables, output parameters of pointer types and procedure types are initialized to NIL. Other output parameters must be considered as undefined prior to the first assignment in the procedure. The scope of a formal parameter extends from its declaration to the end of the procedure block in which it is declared. A function procedure without parameters must have an empty parameter list. It must be called by a func• tion designator whose actual parameter list is empty too. The result type of a procedure can be neither a record nor an array. Formal Parameters = "(" [ FPSection { ";" FPSection } ] ")" [ ":" Type ]. FPSection = [VAR liN lOUT] ident {"," ident} ":" Type.

Let f be the formal parameter and a the corresponding actual parameter. If f is an open array, then a must be array compatible to f and the lengths of f are taken from a. Otherwise a must be parameter compatible to f (see App. A) Examples of procedure declarations: PROCEDURE Readlnt (OUT x: INTEGER); VAR i: INTEGER; ch: CHAR; BEGIN i := 0; Read(ch); WHILE ("0" <= ch) & (ch <= "9") DO i := 10' i + (ORD(ch) - ORD("O")); Read(ch) END; x:= i END Readlnt

398 A Component Pascal Language Report

PROCEDURE Writelnt (x: INTEGER); (*0 <= x < 100000*) VAR i: INTEGER; buf: ARRAY 5 OF INTEGER; BEGIN i :=0; REPEAT buf[i] := x MOD 10; x:= x DIV 10; INC(i) UNTIL x = 0; REPEAT DEC(i); Write(CHR(buf[i] + ORD("O"))) UNTIL i = 0 END Writelnt PROCEDURE WriteString (IN s: ARRAY OF CHAR); VAR i: INTEGER; BEGIN i := 0; WHILE (i < LEN(s)) & (s[i] # OX) DO Write(s[i]); INC(i) END END WriteString

PROCEDURE Log2 (x: INTEGER): INTEGER; VAR y: INTEGER; (*assume x > 0*) BEGIN Y := 0; WHILE x > 1 DO x := x DIV 2; INC(y) END; RETURN y END Log2 PROCEDURE Modify (VAR n: Node); BEGIN INC(n.key) END Modify 10.2 Methods Globally declared procedures may be associated with a record type declared in the same module. The procedures are said to be methods bound to the record type. The binding is expressed by the type of the receiver in the heading of a procedure declaration. The receiver may be either a VAR or IN parameter of record type T or a value parameter of type POINTER TO T (where T is a record type). The method is bound to the type T and is considered local to it. ProcedureHeading = PROCEDURE [ Receiver ]ldentDef [ FormalParameters ] MethAttributes. Receiver = "(" [ VAR liN] ident ":" ident ")". MethAttributes = ["," NEW] ["," (ABSTRACT I EMPTY I EXTENSIBLE)].

If a method M is bound to a type TO, it is implicitly also bound to any type T1 which is an extension of TO. However, if a method M' (with the same name as M) is declared to be bound to T1, this overrides the binding of M to T1. M' is considered a redefinition of M for T1. The formal parameters of M and M' must match, except if M is a function returning a pointer type. In the latter case, the function result type of M' must be an extension of the function result type of M (covariance) (see App. A). If M and T1 are exported (see Chapter 4) M' must be exported too. If M is not

399 A Component Pascal Language Report

exported, M' must not be exported either. If M and M' are exported, they must use the same export marks. The following attributes are used to restrict and document the desired usage of a method: NEW, ABSTRACT, EMPTY, and EXTENSIBLE. NEW must be used on all newly introduced methods and must not be used on redefining methods. The attribute helps to detect inconsistencies between a record and its extension when one of the two is changed without updating the other. Abstract and empty method declarations consist of a procedure header only. Abstract methods are never called. A record con• taining abstract methods must be abstract. A method redefined by an abstract method must be abstract. An abstract method of an exported record must be exported. Calling an empty method has no effect. Empty methods may not return function results and may not have OUT parameters. A record containing new empty methods must be extensible or abstract. A method rede• fined by an empty method must be empty or abstract. Abstract or empty methods are usually redefined (implemented) in a record extension . They may not be called via super calls. A con• crete (nonabstract) record extending an abstract record must implement all abstract methods bound to the base record. Concrete methods (which contain a procedure body) are either extensible or final (no attribute). A final method cannot be rede• fined in a record extension. A record containing extensible meth• ods must be extensible or abstract. If v is a designator and M is a method, then v.M denotes that method M which is bound to the dynamic type of v. Note, that this may be a different method than the one bound to the static type of v. v is passed to M's receiver according to the parameter passing rules specified in Chapter 10.1. If r is a receiver parameter declared with type T, r.MA denotes the method M bound to the base type of T (super call). In a forward declaration of a method the receiver parameter must be of the same type as in the actual method declaration. The formal parameter lists of both declarations must match (App. A) and the names of corresponding parameters must be equal. Methods marked with "-" are "implement-only" exported. Such a method can be redefined in any importing module but can only be called within the module containing the method declaration.

400 A Component Pascal Language Report

(Currently, the also allows super calls to implement• only methods outside of their defining module. This is a tempo• rary feature to make migration easier.) Examples: PROCEDURE (I: Tree) Insert (node: Tree), NEW, EXTENSIBLE; VAR p, father: Tree; BEGIN p:= t; REPEAT father:= p; IF node. key = p.key THEN RETURN END; IF node.key < pkey . THEN p := p.left ELSE p := p.right END UNTIL P = NIL; IF node.key < father. key THEN father. left := node ELSE father. right := node END; node. left := NIL; node.right := NIL END Insert PROCEDURE (I: CenterTree) Insert (node: Tree); (*redefinition*) BEGIN Writelnt(node(CenterTree).width); !.Insert" (node) (* calls the Insert method of Tree *) END Insert PROCEDURE (obj : Object) Draw (w: Window), NEW, ABSTRACT

PROCEDURE (obj: Object) Notify (e : Event), NEW, EMPTY 10.3 Predeclared Procedures The following table lists the predeclared procedures. Some are generic procedures, i.e., they apply to several types of operands. v stands for a variable, x and y for expressions, and T for a type. The first matching line gives the correct result type. Function procedures Name Argument type Result type Function

ABS(x) <= INTEGER INTEGER absolute value LONGINT type of x real type type of x

ASH(x, y) x: <= INTEGER INTEGER arithmetic shift (x * 2"y) x: LONGINT; LONGINT y: integer type

BITS(x) INTEGER SET {i I ODD(x DIV 211j)}

401 A Component Pascal Language Report

CAP (x) character type type of x x is a Latin-l letter: corresponding capital letter

CHR(x) integer type CHAR character with ordinal number x

ENTIER(x) real type LONGINT largest integer not greater than x

LEN(v, x) v: array; INTEGER length of v in dimension x x: integer constant (first dimension = 0)

LEN(v) array type INTEGER equivalent to LEN(v, 0) String INTEGER length of string (not counting ox)

LONG(x) BYTE SHORTINT identity SHORTINT INTEGER INTEGER LONGINT SHORTREAL REAL SHORTCHAR CHAR Shortstring String

MAX(T) T = basic type T maximum value of type T T=SET INTEGER maximum element of a set

MAX(x, y) <= INTEGER INTEGER the larger value of x and y integer type LONGINT <= SHORTREAL SHORTREAL numeric type REAL SHORTCHAR SHORTCHAR character type CHAR

MIN(T) T = basic type T minimum value of type T T=SET INTEGER 0

MIN(x,y) <= INTEGER INTEGER the smaller of x and y integer type LONGINT <= SHORTREAL SHORTREAL numeric type REAL SHORTCHAR SHORTCHAR character type CHAR

OOO(x) integer type BOOLEAN x MOD 2 = 1

ORO(x) CHAR INTEGER ordinal number of x SHORTCHAR SHORTINT ordinal number of x SET INTEGER (SUM i: iIN x: 2"i)

402 A Component Pascal Language Report

SHORT(x) LONGINT INTEGER identity INTEGER SHORTINT identity SHORTINT BYTE identity REAL SHORTREAL identity (truncation possible) CHAR SHORTCHAR projection String Shortstring projection

SIZE(T) any type INTEGER number of bytes required by T

SIZE cannot be used in constant expressions because its value depends on the actual compiler implementation, Proper procedures Name Argument types Function

ASSERT(x) x: Boolean expression terminate program execution if not x

ASSERT(x, n) x: Boolean expression; terminate program n: integer constant execu tion if not x

DEC(v) integer type v := v - 1

DEC(v, n) v, n: integer type v :=V - n

EXCL(v, x) v: SET; x: integer type v := v - {x} o <= x <= MAX(SET)

HALT(n) integer constant terminate program execution

INC(v) integer type v := v + 1

INC(v, n) v, n: integer type v:= v + n

INCL(v, x) v: SET; x: integer type v:= v + {x} o <= X <= MAX(SET)

NEW(v) pointer to record or fixed array allocate v"

NEW(v, xO, "', xn) v: pointer to open array; allocate v" with xi: integer type lengths xO .. xn

In ASSERT(x, n) and HALT(n), the interpretation of n is left to the underlying system implementation, 10.4 Finalization

A predeclared method named FINALIZE is associated with each record type as if it were declared to be bound to the type ANYREC:

403 A Component Pascal Language Report

PROCEDURE (a: ANYPTR) FINALIZE-, NEW, EMPTY;

The FINALIZE procedure can be implemented for any pointer type. The method is called at some unspecified time after an object of that type (or a base type of it) has become unreachable via other pointers (not globally anchored anymore) and before the object is deallocated. It is not recommended to re-anchor an object in its finalizer and the finalizer is not called again when the object repeatedly becomes unreachable. Multiple unreacha• ble objects are finalized in an unspecified order. 11. Modules A module is a collection of declarations of constants, types, vari• ables, and procedures, together with a sequence of statements for the purpose of assigning initial values to the variables. A module constitutes a text that is compilable as a unit. Module = MODULE ident ";" [ ImportList I DeclarationSequence [ BEGIN StatementSequence I [CLOSE StatementSequence I END ident ".". ImportList = IMPORT Import { "," Import} ";". Import = [ ident ":=" I ident. The import list specifies the names of the imported modules. If a module A is imported by a module M and A exports an identifier x, then x is referred to as A.x within M. If A is imported as B := A, the object x must be referenced as B.x. This allows short alias names in qualified identifiers. A module must not import itself. Identifiers that are to be exported (i.e., that are to be visible in client modules) must be marked by an export mark in their dec• laration (see Chapter 4).

The statement sequence following the symbol BEGIN is executed when the module is added to a system (loaded), which is done after the imported modules have been loaded. It follows that cyclic import of modules is illegal. Individual exported proce• dures can be activated from the system, and these procedures serve as commands. Variables declared in a module are cleared prior to the execution of the module body. This implies that all pointer or procedure typed variables are initialized to NIL.

The statement sequence following the symbol CLOSE is executed when the module is removed from the system. Example: MODULE Trees; (* exports: Tree, Node, Insert, Search, Write, Init *)

404 A Component Pascal Language Report

IMPORT StdLog; TYPE Tree' = POINTER TO Node; Node' = RECORD (' exports read-only: Node.name ') name-: POINTER TO ARRAY OF CHAR; left, right: Tree END; PROCEDURE (t: Tree) Insert' (name: ARRAY OF CHAR), NEW; VAR p, father: Tree; BEGIN p :=t; REPEAT father:= p; IF name = p.name" THEN RETURN END; IF name < p.name" THEN p := p.left ELSE p := p.right END UNTIL P = NIL; NEW(p); p.left := NIL; p.right:= NIL; NEW(p.name, LEN(name$)+ 1); p.name" := name$; IF name < father.nameA THEN father.left := p ELSE father. right := p END END Insert; PROCEDURE (t: Tree) Search' (name: ARRAY OF CHAR): Tree, NEW; VAR p: Tree; BEGIN p:= t; WHILE (p # NIL) & (name # p.name") DO IF name < p.name" THEN p := p.left ELSE p := p.right END END; RETURN P END Search; PROCEDURE (t: Tree) Write', NEW; BEGIN IF Ueft # NIL THEN Ueft.Write END; StdLog.String(t.name); StdLog.Ln; IF tright # NIL THEN t.right.Write END END Write; PROCEDURE Init' (t: Tree); BEGIN NEW(t.name, 1); t.name[O] := OX; t.left:= NIL; t.right:= NIL END Init;

BEGIN StdLog.String("Trees loaded"); StdLog.Ln CLOSE StdLog.String("Trees removed"); StdLog.Ln END Trees.

405 A Component Pascal Language Report

Appendix A: Definition of Terms

Character types SHORTCHAR, CHAR Integer types BYTE, SHORTINT, INTEGER, LONGINT Real types SHORTREA~REAL Numeric types integer types, real types String types Shortstring, String Basic types BOOLEAN, SET, character types, numeric types Same types Two variables a and b with types Ta and Tb are of the same type if 1. Ta and Tb are both denoted by the same type identifier, or 2. Ta is declared in a type declaration of the form Ta = Tb, or 3. a and b appear in the same identifier list in a variable, record field, or formal parameter declaration. Equal types Two types Ta and Tb are equal if 1. Ta and Tb are the same type, or 2. Ta and Tb are open array types with equal element types, or 3. Ta and Tb are procedure types whose formal parameter lists match, or 4. Ta and Tb are pointer types with equal base types. Matching formal parameter lists Two formal parameter lists match if 1. they have the same number of parameters, and 2. they have either equal function result types or none, and 3. parameters at corresponding positions have equal types, and 4. parameters at corresponding positions are both either value, IN, OUT, or VAR parameters. Type inclusion Numeric and character types include (the values of) smaller types of the same class according to the following hierarchies:

REAL >= SHORTREAL >= LONGINT >= INTEGER >= SHORTINT >= BYTE CHAR >= SHORTCHAR Type extension (base type) Given a type declaration Tb = RECORD (Ta) ... END, Tb is a direct extension of Ta, and Ta is a direct base type of Tb. A type Tb is an extension of a type Ta (Ta is a base type of Tb) if 1. Ta and Tb are the same types, or 2. Tb is a direct extension of an extension of Ta, or 3. Ta is of type ANYREC. If Pa = POINTER TO Ta and Pb = POINTER TO Tb, Pb is an extension of Pa (Pa is a base type of Pb) if Tb is an extension of Ta.

406 A Component Pascal Language Report

Assignment compatible An expression e of type Te is assignment compatible with a varia• ble v of type Tv if one of the following conditions hold: 1. Te and Tv are equal and neither abstract, extensible or limited record nor open array types; 2. Te and Tv are numeric or character types and Tv includes Te; 3. Te and Tv are pointer types and Te is an extension of Tv; 4. Tv is a pointer or a procedure type and e is NIL; 5. Tv is an numeric type and e is a constant expression whose value is contained in Tv; 6. Tv is an array of CHAR, Te is String or Shortstring, and LEN(e) < LEN(v); 7. Tv is an array of SHORTCHAR, Te is Shortstring, and LEN(e) < LEN(v); 8. Tv is a procedure type and e is the name of a procedure whose formal parameters match those of Tv. Array compatible An actual parameter a of type Ta is array compatible with a formal parameter f of type Tf if 1. Tf and Ta are equal types, or 2. Tf is an open array, Ta is any array, and their element types are array compatible, or 3. Tf is an open array of CHAR and Ta is String, or 4. Tf is an open array of SHORTCHAR and Ta is Shortstring. Parameter compatible An actual parameter a of type Ta is parameter compatible with a formal parameter f of type Tf if 1. Tf and Ta are equal types, or 2. f is a value parameter and Ta is assignment compatible with Tf, or 3. f is an IN or VAR parameter and Tf and Ta are record types and Ta is an extension of Tf. Expression compatible For a given operator, the types of its operands are expression com• patible if they conform to the following table. The first matching line gives the correct result type. Type T1 must be an extension of type TO:

407 A Component Pascal Language Report

operator first operand second operand result type

+ - * DIV MOD <= INTEGER <= INTEGER INTEGER integer type integer type LONGINT integer type integer type REAL

+ - * / <= SHORTREAL <= SHORTREAL SHORTREAL numeric type numeric type REAL SET SET SET

+ Shortstring Shortstring Shortstring string type string type String OR & - BOOLEAN BOOLEAN BOOLEAN

= # < <= > >= numeric type numeric type BOOLEAN character type character type BOOLEAN string type string type BOOLEAN

=# BOOLEAN BOOLEAN BOOLEAN SET SET BOOLEAN pointer type TO pointer type TO orT1, NIL or T1, NIL BOOLEAN procedure type T, procedure type T, NIL NIL BOOLEAN

IN integer type, SET BOOLEAN O.. MAX(SET)

IS TO type T1 BOOLEAN

Constant expressions are calculated at compile time with maxi• mum precision (LONGINT for integer types, REAL for real types) and the result is handled like a numeric literal of the same value. If a real constant x with Ixl <= MAX(SHORTREAL) or x = INF is combined with a nonconstant operand of type SHORTREAL, the constant is considered a SHORTREAL and the result type is SHORTREAL.

Appendix B: Syntax of Component Pascal Module MODULE ident ";" [ ImportList ] DeclSeq [ BEGIN StatementSeq ] [CLOSE StatementSeq] END ident ".". ImportList IMPORT [ident ":="] ident { "," [ident ":="] ident} "; ". DeclSeq { CONST { ConstDecl ";" } I TYPE { TypeDecl "; " } I VAR { VarDecl ";" } } { ProcDecl ";" I ForwardDecl ";" }. ConstDecl IdentOef "=" ConstExpr. TypeDecl IdentDef· "=" Type. VarDeci IdentList ":" Type. ProcDeci PROCEDURE [ Receiver ]ldentDef [ FormalPars ] [","NEW] ["," (ABSTRACT I EMPTY I EXTENSIBLE) 1 [ ";" DeCtSeq [ BEGIN StatementSeq 1END ident ].

408 A Component Pascal Language Report

ForwardDecl PROCEDURE "1\" I Receiver IldentDef I FormalPars I. FormalPars "(" I FPSection { ";" FPSection } I ")" I ":" Type I· FPSection I VAR liN lOUT I ident { "," ident} ":" Type. Receiver "(" I VAR liN I ident ":" ident ")". Type Qualident I ARRAY I ConstExpr { "," ConstExpr} I OF Type I t ABSTRACT I EXTENSIBLE I LIMITED I RECORD I "("Qualident")" I FieldList { ";" FieldList } END I POINTER TO Type 1 PROCEDURE I FormalPars I. FieldList I IdentList ":" Type I· StatementSeq Statement { ";" Statement }. Stale(l'lent I Designator ":=" Expr 1Designator I "(" I ExprList I ")" I IIF Expr THEN StatementSeq { ELSIF Expr THEN StatementSeq } I ELSE StatementSeq I END I CASE Expr OF Case { "I" Case} I ELSE StatementSeq I END 1 WHILE Expr DO StatementSeq END I REPEAT StatementSeq UNTIL Expr I FOR ident ":=" Expr TO Expr I BY ConstExpr I DO StatementSeq END 1 LOOP StatementSeq END I WITH I Guard DO StatementSeq I { "I" I Guard DO StatementSeq I } I ELSE StatementSeq I END 1 EXIT 1 RETURN I Expr II. Case I Case Labels { "," CaseLabels} ":" StatementSeq I. Case Labels ConstExpr I ".. " ConstExpr I. Guard Qualident ":" Qualident. ConstExpr Expr. Expr SimpleExpr I Relation SimpleExpr I. SimpleExpr I "+" I "-" I Term { AddOp Term }. Term Factor { MulOp Factor}. Factor Designator 1 number 1character I string 1NIL 1 Set I "(" Expr ")" 1 "-" Factor. Set "{" I Element {"," Element} I"}". Element Exprl " .. " Exprl. Relation "=" 111#" 1"<" 111<=11 1">" 1">=" liN I IS. AddOp "+" I "-" I OR. MulOp "." 1 "/" 1DIV 1MOD 1 "&". Designator Qualident { "." ident 1 "I" ExprList "]" 1 "I\" 1 "(" Qualident ")" 1 "(" I ExprList I ")" } I "$" I· ExprList Expr { "," Expr}. IdentList IdentDef { "," IdentDef}. Qualident I ident "." I ident. IdentDef ident [ 11*11 I ".11 ] .

409 A Component Pascal Language Report

Appendix C: Domains of Basic Types Type Domain BOOLEAN FALSE, TRUE SHORTCHAR OX .. OFFX CHAR OX .. OFFFFX BYTE -128 .. 127 SHORTINT -32768 .. 32767 INTEGER -2147483648 .. 2147483647 LONGINT -9223372036854775808 .. 9223372036854775807 SHORTREAL -3.4E38 .. 3.4E38, INF (32-bit IEEE format) REAL -1.8E308 .. 1.8E308, INF (64-bit IEEE format) SET set of 0 .. 31 Appendix D: Mandatory Requirements for Environment The Component Pascal definition implicitly relies on three fun• damental assumptions. 1) There exists some run-time type information that allows to check the dynamic type of an object. This is necessary to imple• ment type tests and type guards.

2) There is no DISPOSE procedure. Memory cannot be deallo• cated manually, since this would introduce the safety problem of memory leaks and of dangling pointers, i.e., premature deallo• cation. Except for those embedded systems where no dynamic memory is used, or where it can be allocated once and never needs to be released, an automatic garbage collector is required. 3) Modules and at least their exported procedures (commands) and exported types must be retrievable dynamically. If neces• sary, this may cause modules to be loaded. The programming interface used to load modules or to access the mentioned meta information is not defined by the language, but the language compiler needs to preserve this information when generating code. Except for fully linked applications where no modules will ever be added at run-time, a linking loader for modules is required. Embedded systems are important examples of appli• cations that can be fully linked. An implementation that doesn't fulfill these compiler and envi• ronment requirements is not compliant with Component Pascal.

410 B Literatu rverzeich nis

Bucher [1] Alfred V. Aho, Jeffrey D. Ullman: Informatik. Datenstrukturen und Konzepte der Abstraktion. International Thomson Publishing Company, Bonn (1996) 1042 S. [2] Grady Booch, Jim Rumbaugh, Ivar Jacobsen: Das UML• Benutzerhandbuch. Addison-Wesley Longman Verlag GmbH, Bonn (1999) 550 S. [3] Hartmut Ernst: Grundlagen und Konzepte der Informatik. Eine Einfahrung in die Informatik ausgehend von den fundamentalen Grundlagen. Friedr. Vieweg & Sohn Verlagsgesellschaft mbH, Braunschweig, Wiesbaden (2000) 822 S. [4] Martin Fowler, Kendall Scott: UML konzentriert. Die neue Standard-Objektmodellierungssprache anwenden. Addison• Wesley Longman Verlag GmbH, Bonn (1998) 188 S. [5] Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides: Entwurfsmuster. Elemente wiederverwendbarer objektorientierter Software. Addison-Wesley Deutschland GmbH, Bonn (1996) 430 S. [6] Gerhard Goos: Vorlesungen aber Informatik. Band 1: Grundlagen und funktionales Programmieren. Springer• Verlag, Berlin, Heidelberg (1997) 2. Auflage, 394 S. [7] Gerhard Goos: Vorlesungen aber Informatik. Band 2: Objektorientiertes Programmieren und Algorithmen. Springer-Verlag, Berlin, Heidelberg (1999) 2. Auflage, 370S. [8] Gerhard Goos: Vorlesungen aber Informatik. Band 3: Berechenbarkeit, formale Sprachen, Spezifikationen. Springer• Verlag, Berlin, Heidelberg (1997) 284 S. [9] Gerhard Goos: Vorlesungen aber Informatik. Band 4: Paralleles Rechnen und nicht-analytische Losungsverfahren. Springer-Verlag, Berlin, Heidelberg (1998) 292 S. [10] Jacob Gore: Object Structures. Building Object-Oriented Software Components with Eiffel. Addison-Wesley Publishing Company Inc, Reading (1996) 469 S.

411 B Literaturverzeichnis

[11] Frank Griffel: Componentware. Konzepte und Techniken eines Softwareparadigmas. dpunkt-Verlag fur digitale Technologie GmbH, Heidelberg (1998) 645 S. [12] Wolfgang Hesse, Gunter Merbeth, Rainer Fr6lich: Software-Entwicklung. Vorgehensmodelle, ProjektfUhrung, Produktverwaltung. R. Oldenbourg Verlag GmbH, Munchen, Wien (1992) 292 S. [13] Jean-Marc Jezequel: Object-Oriented Software Engineering with Eiffel. Addison-Wesley Publishing Company Inc, Reading (1996) 340 S. [14] Jean-Marc Jezequel, Michel Train, Christine Mingins: Design Patterns and Contracts. Addison Wesley Longman Inc, Reading (2000) 348 S. [15] Peter Kammerer: Von Pascal zu Assembler. Eine Einfuhrung in die maschinennahe Programmierung fur INTEL und MOTOROLA. Friedr. Vieweg & Sohn Verlagsgesellschaft mbH, Braunschweig, Wiesbaden (1998) 251 S. [16] N. Metropolis, J. Howlett, Gian-Carlo Rota (Hrsg.): A History of Computing in the Twentieth Century. A collection of essays with introductory essay and indexes. Academic Press Inc, New York (1980) 693 S. [17] Bertrand Meyer: Objektorientierte Softwareentwicklung. Carl Hanser Verlag, Munchen, Wien (1990) 547 S. [18] Bertrand Meyer: Eiffel: The Language. Prentice Hall International (UK) Ltd, Hertfordshire (1992) 594 S. [19] Bertrand Meyer: Reusable Software. The Base Object• Oriented Component Libraries. Prentice Hall International (UK) Ltd, Hertfordshire (1994) 514 S. [20] Bertrand Meyer: Eiffel: The Reference. ISE Technical Report TR-EI-41 fER (1995) Version 3.3.4, 100 S. [21] Bertrand Meyer: Object-oriented Software Construction. Prentice Hall PTR, Upper Saddle River (1997) 2nd edition, 1260 S. [22] Hanspeter M6ssenb6ck: Objektorientierte Programmierung in Oberon-2. Springer-Verlag, Berlin, Heidelberg (1994) 2. Auflage, 286 S. [23] J6rg R. Muhlbacher, Bernhard Leisch, Ulrich Kreuzeder: Programmieren mit Oberon-2 unter Windows. Carl Hanser Verlag, Munchen, Wien (1995) 353 S.

412 B Literaturverzeichnis

[24] Eric Nikitin: Into the Realm of Oberon. An Introduction to Programming and the Oberon-2 . Springer-Verlag, New York (1998) 199 s. [25] Bernd Oesterreich: Objektorientierte Softwareentwicklung mit der Unified Modeling Language. R. Oldenbourg Verlag, Miinchen, Wien (1997) 3. aktual. Auflage, 294 S. [26] Bernd-Uwe Pagel, Hans-Werner Six: Software Engineering. Band 1: Die Phasen der Softwareentwicklung. Addison• Wesley, Bonn (1994) 895 s. [27] Gustav Pomberger, Giinther Blaschek: Grundlagen des Software Engineering. Prototyping und objektorientierte Software-Entwicklung. Carl Hanser Verlag, Miinchen, Wien (1993) 337 s. [28] Peter Rechenberg: Was ist Informatik? Eine allgemeinverstandliche Einfiihrung. Carl Hanser Verlag, Miinchen, Wien (1994) 2. bearb. u. erweit. Auflage, 349 S. [29] Peter Rechenberg, Gustav Pomberger (Hrsg.): Informatik• Handbuch. Carl Hanser Verlag, Miinchen, Wien (1999) 2. aktual. u. erweit. Auflage, 1166 S. [30] Martin Reiser, Niklaus Wirth: Programmieren in Oberon. Das neue Pascal. Addison-Wesley Deutschland GmbH, Bonn (1994) 343 s. [31] Clemens Szyperski: Component Software. Beyond Object• Oriented Programming. Addison-Wesley Longman Ltd, Harlow (1998) 411 S. [32] Kim Walden, Jean-Marc Nerson: Seamless Object-Oriented Software Architecture. Analysis and Design of Reliable Systems. Prentice Hall International (UK) Ltd, Hertfordshire (1995) 438 s. [33] Niklaus Wirth: Algorithmen und Datenstrukturen mit Modula-2. B. G. Teubner, Stuttgart (1996) 5. Auflage, 299 S. [34] Niklaus Wirth: Grundlagen und Techniken des Compilerbaus. Addison-Wesley Deutschland GmbH, Bonn (1996) 195 s. Artikel [35] Derek Andrews: Programming and Programming Languages. In: Mark Woodman (Hrsg.): Programming Language Choice. Practice and Experience. International Thomson Computer Press, London (1996) S. 255-276 [36] Friedrich L. Bauer: Wer erfand den Neumann'schen Rechner? Informatik-Spektrum, Band 21, Heft 2 (April 1998) S. 84- 88

413 B Literaturverzeichnis

[37] Christiane Floyd, Fanny-Michaela Reisin, G. Schmidt: STEPS to Software Development with Users. In: C. Ghezzi, J. A. McDermid (Hrsg.): ESEC '89. Lecture Notes in Computer Science, Bd. 387, Springer-Verlag (1989) S. 48- 64 [38] Dirk Siefkes: Beziehungskiste Mensch - Maschine. In: Gero von Randow (Hrsg.): Das kritische Computerbuch. Grafit Verlag GmbH, Dortmund (1990) S. 90-110 [39] Horst Zuse: Anmerkungen zum John-von-Neumann-Rechner. FIFF-Kommunikation, 2/99 (Juni 1999) S. 10-19 Elektronische [40] J. Stanley Warford: Programming in BlackBox. Quellen Prepublication, Pepperdine University (1996 -1999); ftp:/ /ftp.pepperdine.edu/pub/compsci/prog-bbox [41] ftp:/ /ftp.inf.ethz.ch/pub/software/Oberon [42] ftp:/ /ftp.ssw.uni-linz.ac.at/pub/Oberon [43] The Oberon Webring home page; http://www.factorial.com/hosted/webrings/oberon [44] The Oberon Home Page der ETH Zurich; http://www.oberon.ethz.ch [45] http://oberon.ssw.uni-linz.ac.at/ Oberon.html [46] Oberon microsystems Inc. home page; http://www.oberon.ch [47] http://www.zel.org/entry.htm [48] http://www.modulaware.com [49] Oberon Newsgroup; comp.lang.oberon [50] http://www.omg.com/uml

414 c Sachwortverzeichnis Symbole 133,143-147,154-155, - 18,114 163-164,198-199,230, " 18,64 237,243,294,320,322,334, # 18,342 367 $ 284 -boolesche 8,20,197,227,231, & 136 288 () 19,22,64,71 - konstante 121 * 18,113 - parameterlose 114--115 + 18,169 - parametrisierte 115 . 22,64 Ablauf 100, 156,203,232,280 ... 3 ---7 Ausfiihrung 81 / 18 - als dynamische Einheit : 71 - eines Algorithmus 189,224 - eines Programms 48,58,81- := 128 < 18,206,316,335,342 83,88,112,119-120, <= 18, 206,342 151-152,157,194,211, = 18,64,128,342 218,220,237,239,276, > 18,206,342 279 >= 18, 206, 342 Ablaufkontrolle 156 [] 64,136 Ableitung 69,86 ABSTRACT 265, 267 1\ 276,356 3 Abstraktion 1,10,15,17,36,38,41- { } 64,197 42,45, 75-76, 126,207, 251-253,255,260-261, I 64,297 265,313,337-338 - 122 - Datenabstraktion 142, 147 ~ 69 Abstraktionsebene 56 "bedienen" 12 "Bedienerfehler" 151,226 access ---7 Zugriff o access control ---7 Zugriffskontrolle OX 312 ACTIONS 4,25-26,72,112-113, 116-117,122-123,198 A Adresse 54,176,280 Abbilder 365-366 - einer Variable 115, 127, 129 Abbildung 60, 121 - eines Reihungselements 136, Abbruch 213 - eines Kommandoaufrufs 292 Adressraum 54 - eines Programmablaufs 151- Aggregation 146,261,302,304 152,194,220 Aktion 3-8,13,15,17-19,21,32- Abfrage 3,5-7,15,18,21-22,25, 33,35, 44, 82, 116, 133, 27,32,34, 37,44,113, 124, 144-147,154,163,177,180,

415 C Sachwortverzeichnis

199,227,230-231,233- 177,220,297-298,307, 234,237,244,253,264-266, 353 288,292,294,296-297, - bewachte 353, 362 322-323 - elementare 76,147 - abstrakte 301 - geschachtelte 220 - Daueraktion 291, 307 - initialisierende 189 - Hintergrundaktion 304 - Steueranweisung 203 - parametrisierte 294 - strukturierte 76, 181, 224 Algebra - Testanweisung 293,295 - boolesche 17,218 - Wiederholungsanweisung Algol 60 85, 129 77,189,226 Algorithmus 45,50,53,55-56,61, Anweisungsteil 116,121-123,127, 74-77,82,129,142,146- 131,141,154,161,270,279, 147,155-156,166,177,181, 321,325,341,353 187-190,195,197,201- Anwendbarkeit 7, 58 202,208,211,217,222-225, Anwender 41,49,139,151,172, 227,237,266,271,305-307, 185 320,322-323 Anwendung 10,41-43,47,56,88, - Ableitungsalgorithmus 69 102,235,241,293,295,312, - iterativer 322, 334 333,336 - randomisierter 297 Anwendungsbereich 41,56,237, - rekursiver 315,323,334 248 - Sortieralgorithmus 227 ANYREC 303 - strukturierter 199 application - Suchalgorithmus 223-225, -7 Anwendung 227 Aquivalenz 17 Aliassituation 278,289,325 - semantische 100, 342 Alphabet 51-52,65,71,232 - strukturelle 5 Alternative - von Algorithmen 222 -7 Auswahl - von booleschen Ausdriicken AND 18,136 218-219,255 Anderbarkeit 44,48-49,139,141- - von EBNF und Syntaxdia• 143,283 gramm 68 Anforderung 43,48,58,139,151, - von Entwiirfen 194 153,163,173 - von Programmstiicken 157, Anker 304,307,326 297 Anpassbarkeit 48, 139 - von regularem Ausdruck Anpassung 255,269,362 und Zustandsdia• - kovariante 259, 353 gramm 233 Antivalenz 17 - von Vertrag und Zustands- Anweisung 22,45,59, 75-76,80, diagramm 231-232 101-102,114,116,119, Arbeitsteilung 10,118,261 127-128,130,156-157, Arithmetik 35,191,206 166,168,189-190,192- ARRAY 134-135,158,164,296 193,203,222,224,227,245, ASSERT 120,123,128,157,190, 271,295,311,314,326 192,203,210,277,279,312 - Auswahlanweisung 77,157, assignment

416 C Sachwortverzeichnis

~ Zuweisung 110,163,184,295 Assoziation 257,261 - mittlerer 312,317 Assoziativitat 339 - Suchaufwand 312,317 Attribut Aufwandsabschatzung 224-225 ~ Feld, eines Verbunds Ausdruck 22,24,27-28,45,65,76, - einer Klasse 267,290,349, 113,116,127-128,130,136, 355 142,175,193,218,268,271, - einer Prozedur 244,247,267, 297-298 343,349 - arithmetischer 22-23,59 - eines Textteils 98 - boolescher 29, 120, 189, 197, - eines Zeichens 363 219,227-228,232 Aufgabe 4-5,41-45,47-49,53,56, - EBNF-Ausdruck 64,72,232, 61,82,84,139,187-188, 271 237,240,248 - ganzzahliger 136 Aufgabenteilung 15,44, 261, 285 - konstanter 135-136,193 Aufgerufener 20,22,24,176 - OLD-Ausdruck 29,289 Aufruf 23,26,28,102,106, 113,116, - pradikatenlogischer 226 150,152,154,157,162,166, - regularer 45,232-233 168-169,188,208,211,223, - relationaler 23, 128,222, 342 233-234,244,263,267,269, - seiteneffektbehafteter 23 271,275-276,279-280, - seiteneffektfreier 23,128 289-291,300-303,305- - Teilausdruck 23, 128, 218 307,325,342,355,367 - undefinierter 218-219 - einer Abfrage 22,24,149,295 - zusammengesetzter 23 - einer Aktion 22,32,149,166, Ausfuhrbarkeit 9,15 294 Ausfuhrung 25,28,61,101,107, - einer Funktion 297,300-301, 325-326 312 ~ Ablauf - einer Operation 142 - einer Aktion 239 - einer Prozedur 76,114, 129, - einer Anweisung 298, 353 162,181,191,214-215, - einer Daueraktion 291 217,244,247,361 - einer Operation 23 - eines Dienstes 20-21, 24-26, - einer Schleife 191,193 30,37,123,195-196, - eines Dienstes 29-31, 123 239,244,294 - eines Kommandoaufrufs - eines Kommandos 13,93, 104,152,154-155,195, 101-104,149,152,162, 240,268 172-173,178,187,195, - eines Moduls 99 200,216,292 - eines Prozeduraufrufs 175, Aufrufbarkeit 32-33 303,306,325 Aufrufer 20,24,176,274,280,353 - eines Priiflings 293 Aufrufkeller 152 - eines Tests 291,294 Aufrufkette 152 - eines Zweigs 156 Aufrufstelle 22, 116 Ausfuhrungszeit Auftrag 29-30,154,319 ~ Laufzeit Aufwand 220, 333 Ausgabe 11,13,53, 100,103,155, - fiir Entwicklung 42-43,48, 158-159,162,165-166,

417 C Sachwortverzeichnis

187,190,195,197,209,226, -leerer 314,322-323 264,290,301,368 - Teilbaum 314-317,319,322- ~ Daten, Ausgabedaten 323 - Fehlerausgabe 93 - Verzeichnisbaum 90 - grafische 201,205,214,312 - vielverzweigter 313 - sortierte 204 Bedeutung - Standardausgabe 103 ~ Semantik - tabellierte 214 Bedingung 30-31,33-34,45,76, - Testausgabe 93,295 119-121,124,139,155-157, -textuelle 200,204,374 177,180,185,188-189,209, Ausgabestrom 157,162,195,374 223,271-273,297,306,321, Ausnahmebehandlung 126 339,374 Aussage 18,29-30,218 - Abbruchbedingung 190-193, - logische 32 203,225,311 - pradikatenlogische 187 ~ Invariante Auswahl 7, 45, 156,271 ~ N achbedingung ~ Anweisung ~ Vorbedingung - mehrfache 156, 297 - atomare 224 - von EBNF-Ausdriicken 65 - Fortsetzungsbedingung 189, Auswertung 22-24,127,191,193, 191-192,273 218-220 - konstante 139,191 - bedingte - Kontextbedingung 72 ~ kurze - nichttriviale 35 - kurze 218-220,222,227-228 -Schleifenbedingung 189,203, -lange 218,220,227-228 222,225 - vollstandige - seiteneffektfreie 157,190, ~ lange 203,311 - triviale 34-35 B Befehl 15,53-54,84 backing storage device - AufrufbefehI 55 ~ Gerat, Ein-/ Ausgabegerat - MaschinenbefehI 60,82, 138 Backus-Naur-Form 85 - SprungbefehI 55 - erweiterte 44,59,64,66,84- Befehlsausfiihrung 55 85,103,148,270-271, Befehlsausfiihrungszeit 56 314 Befehlsvorrat 53-54 balanced tree Befehlszyklus 55 ~ Baum, ausgewogener Begrenzer 71, 112, 128 basic type Begriff 5,12,145-146,252,255,314 ~ Typ, Grundtyp - Oberbegriff 253,261 Baum 313-320,322-324,326,361 - Unterbegriff 253,261 - abstrakter 313 Behalter 8, 89, 93, 187,207, 253- - ausgewogener 317 255,257-258,262,304,336, - Binarbaum 313-314 338,363 - binarer Suchbaum 316 ~ Modul, Behaltermodul - geordneter Binarbaum 316- - Datenbehalter 365 317,321,333-335,376 - generischer 362 - konkreter 313 - polymorpher 336,362,374

418 C Sachwortverzeichnis behaviour Bezug 176,276-277,279-280,300, ~ Verhalten 347,367 Benutzbarkeit 48, 182, 185 - expliziter 274,280 Benutzer 1,11,13-15,41,43,47-48, - hiingender 279 81,92-93,98,104,151-152, - impliziter 176,274 156,162,168,173,177, - konstanter 176 182-183,185,262,363 - Selbstbezug 304 Benutzerhandbuch 97 Bibliothek 88-89 Benutzung 3,8-9,11-14,20,37, - Klassenbibliothek 262, 375 130,260,284 - Modulbibliothek 200,208, Benutzungsoberfliiche 1,11-15, 262 48,110,149,153-154, 158- Bildschirm 13,53,93, 159,363,369 159,163,165,173,182, binary search tree 185-187 ~ Baum, geordneter Biniir• - grafische 87,110,173,184, baum 363 binary tree - interaktive 375 ~ Baum, Biniirbaum - kommandoorientierte 103 Bindelader - meniiorientierte 103, 162 - dynamischer 80,101-102, Bereichsiiberschreitung 35,136- 106, 108 137 Binder 62,83,101 Beschriftung Bindezeit 62, 82-83 - eines Steuerelements 169, binding 180, 182 ~ Bindung - eines Zustands 7 Bindung 61-62,80,109 Betriebssystem 58, 67, 80, 83, 87, - dynamische 269,285,303, 89, 102, 194 336,342,347 Bezeichnendes 52 - statische 81,342 Bezeichner 127, 148 - Typbindung 18, 23,25,27- Bezeichnetes 52 28,38,128,268 Beziehung 12, 32 - von formalem an aktuellen - Aufrufbeziehung 152 Parameter 24 - Benutzungsbeziehung 2-3, - von Konstante an Wert 113 37,44,79,239,260- - von Name an Typ 174 261,265,285,287 - von Steuerelement an - Bestandteilbeziehung 145- Modulmerkmal 170 146 - von Variable an Typ 114 - Erweiterungsbeziehung 258, - von Variable an Wert 114, 127 260-261,265,285 Bit 6, 54, 138 - Implementationsbeziehung Bitmuster 60 145 BlackBox 87-88,90-93,96,98,101- - Importbeziehung 103,105-110,112,120,126, ~ Benutzungsbeziehung 136,149,152,157,177,183, - Kunde-Lieferant-Beziehung 185,194-195,224,279, ~ Benutzungsbeziehung 291-294,364,366,368, - Ursache-Wirkungs-Bezie• 374-375 hung 2,29 - Servervariante 90

419 C Sachwortverzeichnis

BlackBox Component Builder 81, client 85,87 -7 Kunde BlackBox Component Framework client-supplier-relation 88,177,260,364 -7 Beziehung, Benutzungsbe• Blatt 314,317,322 ziehung BOOLEAN 18 Code 60,213,224 breadth-first traversal - ASCII-Code 66 -7 Traversierung, Breitentra- - geladener 238 versierung - Maschinencode Browser 88,94-96,110,117,158 -70bjektcode Buchstabe 118,174,272 - Objektcode 56,61--62,81,84, bug 90,97,100-102,106, -7 Fehlerursache 108-110,118-119,293 BYTE 140 - Quellcode 56 Byte 54 - Unicode 66--67 - Zeichencode 60 c Codeerzeugung 112,194 C 58,60,80,84,126,129,136 Codeexpansion 120,129 C++ 58,80,84,126, 129, 136, 259, Codierung 279,342 -7 Implementierung call - Binarcodierung 53,60 -7 Aufruf commander callee -7 Symbol, Aufrufsymbol -7 Aufgerufener compatible caller -7 Typvertraglichkeit -7 Aufrufer compiler -7 Kompilierer -7 A ufrufkeller -7 Ubersetzer carrier Component Pascal 39,45,51,58, -7 Trager 66-67,73,75,77,79-80, Carrier-Rider-Mapper 363,365- 83-85,87,99,101,103, 366,375 110-117,119-120,122-124, CASE 297-298 126-131,135,138,140, CHAR 18, 134, 236 143-145, 147-148,163, character 165,169,174-175,187,193, -7 Zeichen 198,200,206-207,217- child 219,229,236,239-241, -7 Kind 244-246,248-249,259, CHR 135,190 262,264,267-268,275- CLASS 36-37,72,230,235-236, 278,289,294,297-298,322, 245,254-257,264-266,288 335,342,352 Cleo 39,44,51,66,72,86,111-117, - Language Report 73, 75,93 119,122-124,126,144-145, computer 147-148,165,175, 197- -7 Rechner 198,206,218-219,229, CONST 75,112-113,138 235-236,239,241,244- container 245,264,267,288-289,314 -7 Behalter

420 C Sachwortverzeichnis contract Datenmanipulation 375 ~ Vertrag Datenpaar 205 controller Datenstruktur 45, 142 ~ Interaktor - abstrakte 142-143,201,238, control variable 247-248 ~ Variable, Zahlvariable - dynamische 278,334 - konkrete 142-143,147,225 D - unerreichbare 278 dangling reference Datentyp 134,316 ~ Bezug,hangender - abstrakter 238,243,247-248, Darstellung 45, 52 318,333 - codierte 60 ~Typ - einer Zahl 135 Dateniibertragung 60 - grafische 3,7,44 Datenverarbeitung 12,52, 60,226 - hexadezimale 70, 135 Debugger 99,152 - im Rechner 57,61 DEC 129 Datei 62,90-91,96-97,99,107-108, declaration 172,293,364 ~ Vereinbarung - ASCII-Textdatei 93 decomposition - Dokumentationsdatei 91, ~ Zerlegung 95-96 deep copy - Objektcodedatei 91-92,107- ~ Kopieren, tiefes 109,117,119,137,224 defect - Quelltextdatei 91-92, 95 ~ Fehlerursache - Ressourcendatei 91 DEFINITION 118,158-159,205, - Schnittstellendatei 91-92, 214,244,289,292,302,342, 95-96, 107-109, 117 348,354 Dateiverwaltung 87, 90 Dekrementierung 129,194 Daten 6,13,49,53-55,61,74,76, depth-first traversal 84,98,106,108,139,143, ~ Traversierung, Tiefentra• 146-147,202,226,237- versierung 238,241,243,262,307,316, Dereferenzierung 275-277, 279 363,365 design - Ausgabedaten 45,52,100 ~ Entwurf - Eingabedaten 45, 52, 81, 224 ~ Zerlegung - formatierte 367, 369 design pattern - gespeicherte 316 ~ Muster, Entwurfsmuster - konkrete 76 Deutsche Industrie-Norm 50 -lokale 225 developer - nichtfliichtige 93 ~ Entwickler - rohe 367, 369 Diagramm 200,313 - strukturierte 163 ~ Klassendiagramm Datenbank 89 ~ Objektdiagramm Datenelement 142,144,211,227, ~ Syntaxdiagramm 316,319 ~ Zustandsdiagramm Datenfluss 106-107,111 - Haufigkeitsdiagramm 205, Datenkapselung 143-144,245 214,216

421 C Sachwortverzeichnis

Dialogbox 13,88-89,91-92,149, - zusammengesetztes 93, 98, 163,165-174,176,178, 368 180-181,184-186,226, Dokumentation 89,93-95,97, 112, 262,363-364 339 - bewachte 178,180-182 - Online-Dokumentation 110, - Defaultdialogbox 169-170, 185,374-375 184 Dokumentsystem 98 - editierte 171 dot notation - eines Meniibefehls 169 ~ Notation, Punktnotation - Inspekteurdialogbox 170- Drag-&-Drop 98 171,180,183 Drag-&-Pick 98 -leere 184 Drucker 13,53 - meldende 184 Dualsystem 53,60 Dialogsystem 12, 152 Durchlaufen Dienst 2-6,8-9,15, 19-22,26-31, - einer Liste 306,312,314 33-34,36-39,44-45,48,86, - eines Syntaxdiagramms 68 88,112,121, 144-147, 151, - eines Zustandsdiagramms 7, 153,165,187,195,198-199, 232 202,226,230,233,237,241, Durchschnitt 288, 324-325, 339 253-255,258,260,262- dynamic binding 264,285,293-295,297, ~ Bindung, dynamische 302-303,320,337-338, dynamisch 28,34,62,80-81,84, 341,362 116,136,162,203,223-224, - abstrakter 259-260, 266 234,240,259 - geerbter 259,338 - implementierter 259 E - offentlicher 25, 86 EBNF - parametrisierter 21,24 ~ Backus-Naur-Form, erwei• - redefinierter 267 terte - seiteneffektbehafteter 6 edge - seiteneffektfreier 6 ~ Kante - spezifizierter 227 Editieren 61,107,171 Differenz 288,324-325,327 Editor 62,87-89,91,98,106, 110 - symmetrische 288, 324-325 - Dialogboxeditor 103,170, Digitaltechnik 53 184-185 directed graph - Texteditor 98, 103 ~ Graph, gerichteter Effekt 6,18,28-29, 157,284 disjunkt 288 Effizienz 49-50,54,79,120,129, Disjunktion 17,218-219,232 137-138,176,194,199, DIV 18 209-210,220,222-223, Dokument 43,53,87-89,92,98, 225,280,283,313 103,110,149,172,191 Eiffel 39,249,259,342,375 - aktives 93 Ein-/ Ausgabe 13-14,48,154,157, - Benutzungsdokument 48 160,162-163,185,187,201, - interaktives 93 214,225,262,293 - Meniidokument 155 - sequenzielle 173,185 - Ressourcendokument 171 -textuelle 201

422 C Sachwortverzeichnis

Ein-/ Ausgabebaustein 53 - eines Modells 2, 5 Eingabe 11,13,53,62,100-101, - eines Verbunds 163 151,154-155, 157-159, - kleinstes 321,323-324 162,165-166,173,226,271, - Steuerelement einer Dialog- 273,284,363,366,368 box 169-170,184 ~ Daten, Eingabedaten Empfanger 243,247,264,289,302, - Texteingabe 94, 366 318-319,325,347,353, Eingabestrom 157-158,162,187- 361-362 190,195,202,284 - aktueller 244 Einheit 17, 239 - namenloser 244 - adressierbare 54 EMPTY 343 - Darstellungseinheit 6 Entladen 107 - dynamische 81 Entladen eines Moduls 99,104- - Funktionseinheit 293 105,275,301 - Ladeeinheit 74,80,240 Entlader 110 -lexikalische 66-67,71,104 Entwerfer 39, 226 -logische 4, 240 Entwickler 2,8-10,14-15,28,36, - Modellierungseinheit 2, 38, 42,44,47,56-57,84,88,93, 237 98,103-104, 107, 118, 142, - modulare 142 152,172,239,261-262,293, - Programmeinheit 49,74 327,354 - Schutzeinheit 240 Entwicklerhandbuch 97 - Softwareeinheit 12,45-46 Entwicklungsumgebung 85, 88, - Struktureinheit 44, 237, 248 105,126,364 - syntaktische 64-65,71,99, - integrierte 88,95 161 - komponentenorientierte 88 - Ubersetzungseinheit 74,79, Entwurf 10, 14, 41, 43-46, 49-51, 82,240 61-62, 106,134,138,146, - vertraglich spezifizierte 293 152-154, 163, 166,178, - Zeiteinheit 291,303 187-188,190-195,197, - Zerlegungseinheit 44 200-205,208-209,211,225, Einheitlichkeit 283 261,263-264,267,280,283, Einschrankung 327 287,291-293,296,298,301, Element 312,317,320,340,342, ~ Datenelement 363-364,366,368,375 - einer Liste 305-307,312 ~ Zerlegung - einer Menge 8,33-34,138, - objektorientierter 261,342 198,264,333-337, Erben 254-255,268,285 354-355,361,376 Ergebnis 3,5-7,18,22,29,81,198, - einer Reihung 136-137,147, 218-219,297,300,325,362 197-198,201,206, Erlembarkeit 58 208-210,213,227,284 error - einer Sprache 58-59 ~ Fehler - einer Struktur 304,313 Ersetzbarkeit 240 - eines Baums 316,319,321- Ersetzungsschritt 69 323 Erweiterbarkeit 48, 88, 110, 259, - eines Behalters 134,362,374 318

423 C Sachwortverzeichnis

Erweiterung 43,49,254-256,269, EXTENSIBLE 289-290,319,348- 288,296,302-303,337- 349 340,347,353,355,362,368, extension 376 -7 Erweiterung - einer Klasse 258-260, 265, 285,302 F - eines Moduls 200 Fabrik 240,300,340349,355,368- - invariante 259,352 369,374 - konkrete 336, 340, 347, 353- factory 354,364 -7 Fabrik - kovariante 257-258,352, Fallunterscheidung 375-376 -7 Auswahl - Standarderweiterung 364 FALSE 18,218 - Typerweiterung 240-241, Falter 92,97-98 244,258 fault Erzeugung -7 Verhalten, Fehlverhalten - dynamische 279 Fehler 35,43,4649,83,99-100, - einer dynamischen Variable 109,119,124,139,151-152, 276-278 191,218-219,229,280, - eines Objekts 238,279,295, 293-296,325,347,353-354 300,306,338,341,355 - Denkfehler 293 ESC 312 - Eingabefehler 162 evaluation - Laufzeitfehler 83,109,220 -7 Auswertung - Programmierfehler 130,220 EXCL 138 - Schnittstellenfehler 108 execute - semantischer 83 -7 ausfiihren - Syntaxfehler 25,83,99-100, Exemplar 17,37-38, 75, 135, 137, 271-272 217,230,234-235,237- - Tippfehler 135 238,241,243,251-252,255, - Typfehler 27,80, 128 258,264,275,277,335 - Ubersetzungszeitfehler 83 - Einzelexemplar 230, 238, 247 Fehlerart 83 Existenzdauer 162,275,279 Fehlerdiagnose 295 EXIT 203 Fehlererkennung 46, 295 explizit 69,75,77,80,135-136,176, Fehlermarke 99-100 245,276 Fehlermeldung 93,99,110,280 Export 112, 144,301,318 Fehlernummer 120-121,150,157, - eines Felds 165 353 - eines Typs 175 Fehlerquelle 129,142,194,261,279 - schreibgeschiitzter 114,143, Fehlerstelle 99 165 Fehlerursache 126,152,293,295 Exportart 165 Feld 169,241,247,286,303 Exportmarke 112-115,118 - Anzeigefeld 163-164,166 Exportpolitik 144,240 - boolesches 169 expression - einer Dialogbox 165-166, -7 Ausdruck 168, 182-184 EXTENDS 254 - eines Verbunds 164-166,

424 C Sachworfverzeichnis

168-169,177,244 forward declaration - exportiertes 169 -7 Vereinbarung, Vorwarts• - privates 243, 245 vereinbarung - schreibgeschiitztes 169 forwarding - Textfeld 169,173 -7 Weiterleitung Fenster 93-94,96,119,150,152, framework 162,205,214,301,363,369, -7 Geriist 374 Funktion 45,76,113,115,143-144, - aktives 99, 104, 155, 158, 363 147,153,185,210,216,223, - Ausgabefenster 204,262- 243,247,259,300,318,322, 263,284 324,369 - Kommandofenster 103 - abstrakte 286 - Loaded-Modules-Fenster -7 Funktionalitat 105 - boolesche 342 - Log-Fenster 93,103-104,110, - Fabrikfunktion 300-301,347, 154,157,159,162,173, 349,355,365-367,369, 291,374 376 - Meniifenster 103,162 -lokale 300 - Textfenster 94, 102, 149, 157, - parameterlose 115,198 367 - parametrisierte 342 - Trapfenster 120,149-150, - seiteneffektbehaftete 297, 152,154,295 300 - Variables-Fenster 152 - seiteneffektfreie 124 - XYplane-Fenster 214 - Standardfunktion 135,190 FenstergroBe 98 - Suchfunktion 216,221-223 field - typgebundene 342 -7 Feld, eines Verbunds - Zufallsfunktion 297 Finalisierungsteil 74,80,301 Funktionalitat 43,47,49-50,146, Flache 153,293 - kartesische 205,214-216 Funktionskopf 115 Flexibilitat 54,217-218,269 Funktionsrumpf 115-116 fold -7 Falter G Folge 45,271,304 garbage collection - sortierte 316 -7 Speicherbereinigung - von Aktionsaufrufen 28,233 Genauigkeit 60 - von Anweisungen 76, 156, Generalisierung 252,261,285,336 189,203,311 Generizitat 207,335 - von EBNF-Ausdriicken 65 Gerat 11 - von Kanten 314 - Ein-/ Ausgabegerat 53 - von Kommandoaufrufen 103 - Hintergrundspeichergerat - von Zustanden 211,232 53 F()R 26,113,193,197,204-205,209, - Peripheriegerat 53 266 Geriist 88-89, 110 Formalisieren 42,188,190,197,205 - Black-Box-Geriist 260 Formatierung von Daten 365,375 - Komponentengeriist 181 129 Gleichheit

425 C Sachwortverzeichnis

- strukturelle 361 181,198-199,201,214,219, Gleichung 128 226,229,233,235-237,241, Grammatik 59 243-244,255,259,261- Graph 313 263,267,269-270,280, Graphentheorie 313 288-290,293-294,296, Grenze 298,301-302,308,312,320, - Indexgrenze 136 322,325,327,333-335,366, - Obergrenze 193 370,372,374,376 - U ntergrenze 193 - einer Abfrage 126 - Zahlbereichsgrenze 193 - einer Klasse 238 GroBe 23-24,29,34,75-76,79,113, - einer Prozedur 269 169,245,258,268 - eines Moduls 9,139,238 - BezugsgroBe 353 - generische 235,335 - boolesche 18-19,130 - partielle 215,337 - feste 75 - vollstandige 338 - polymorphe 258,268, 301 Implementationssprache 45, 51, - typgebundene 84 56,62,74,111,126,207, - typisierte 19 236,342 - veranderliche 75 Implementierung 11,41,45-46,50, - ZeitgroBe 291 61-62, 106, 111,147,249, guard 260,287-288,294,301- ~ Wachter 302,312,316-317,320,325, Giiltigkeitsbereich 283 342 Implementierungszyklus 107 H IMPLIES 18 HALT 157 Implikation 17,219,232 Hardvvare 48,52-53,295 implizit 34,69,75,175-176,193, height 245,277,279 ~Hohe IMPORT 77-78, 207 Hierarchie Import 77 - von Klassen 338, 364 Importliste 77-78, 107 - von Typen 221, 338 IN 19,23, 138 Hintergrund 291-292,301-303 INC 129 Hohe eines Baums 317,333 INCL 138 Hypertextsystem 93 Index 136,138,140,199,201,206, Hyperverbindung 92-93,97-98, 209-211,213-214,222,300 104,119,150,172 Indexberechnung 137 Indizierung 136, 147,277 I Informatik 85, 375 inherit identifier ~ Erben ~Name Initialisierung 2,30,80,119,130, IF 77,156-157,166,192,194,220, 169,172,175,195,202,208, 279,297,306-307 214,226,248,276,300,341, Implementation 9-10,12,15,21, 353,361,366,376 32,34,43,45-49,74,88, - Defaultinitialisierung 130, 109,111,116,127,138, 245,284 142-147,154,157,176,178,

426 C Sachwortverzeichnis

- einer Schleife 189,199,214 - verletzte 30 - eines Objekts 245,300 I~VARIA~IS 30,72,119,123-124 - explizite 130-131 Iteration - implizite 130-131,134,275 ~ Schleife Initialisierungsteil 74,80,131, 134, ~ Wiederholung 137,139,151, 155 Inkrementierung 129,194,214, J 223-224 Java 126,129,259 Inorder 315-316,320-321,324,361 INODI 24, 158,230 K input/output device Kante 313-314,316 . ~ Gerat, Ein-/ Ausgabegerat - gerichtete 145,313 mstance - ungerichtete 145 ~ Exemplar Kardinalitat 135,145,363 instruction Kind 314,319 ~ Befehl Klammer 22-23,65 INTEGER 18, ll4, 122, 140,236 - textuelle 3,245 Interaktion 93,152,168,183-184, Klasse 36-38,44,49,75,82,89,145, 291,363 229-230,234-243,245- Interaktor 363,368 249,252-256,258,260,262, interface 264-265,267-268,280, ~ Schnittstelle International Standardization 284,286,290,293-294296 302-304,312,318,333- ' Organization 66 334,336-337,340,342- Interpretation 101 343,348-349,354-355, Interpreter 88-89, 101 365,368 - Kommandointerpreter 101- - abstrakte 253-255,259-260, 104,106, llO, 149, 152, 265-267,284,290,301, 154 303, 336-337, 347, Intervall 136, 138, 193, 297 363-364 - Zeitintervall 291-293,303- - allgemeine 258 304 - Anwendungsklasse 338 Invariante 30-35,38-39,44, 120, - Basisklasse 254-255,258- 122-124,143,147,155,220, 231,237,240,246,254-255, 260,285,303,337-340, 347,362 280,293,321,340 - Behalterklasse 362 - geerbte 255 - elementspezifische 236 - Implementationsinvariante - erweiterbare 290,338 139,321 - Erweiterungsklasse 254-255, - Klasseninvariante 37, 246, 257-260,266-267, 290,294,339 285-286,290,301- - klasseniibergreifende 240 303,339-340 - Modulinvariante 30,80,84, - exportierte 317 121, 131, 139,246 - Fabrikklasse 368 - objektiibergreifende 240, - finale 355 339-341,347,353, - fragile Basisklasse 362 361-362,374 - Funktionsklasse 293

427 C Sachwortverzeichnis

- generische 235-236,262 - Gliederungskommentar 117, - Implementationsklasse 338, 197 364,374 Kommutativitat 218-219 - konkrete 254-257,259,265, Kompatibilitiit 109,268 284,301,303,338, Kompilation 100-101 340-341,374 Kompilierer 101 - Konzeptklasse 337-342,347, ~ Ubersetzer 354,362,364,374-376 Komplexitat 5,43-44,223, 225, - Kundenklasse 37,260 227-228 - Lieferantenklasse 37,260 Komplexitatsanalyse 228 - Mengenklasse 262,265,288, Komponente 10-11,43,49,88-89, 292,316,333,335-337, 110,240,269 376 - anpassbare 285 - partiell implementierte 238, - atomare 248 255 - Behalterkomponente 304 - polymorphe 336-337, 362, - erweiterbare 285 376 - Grundkomponente 88 - private 240,301,303,365,374 - Hardwarekomponente 295 - Schnittstellenklasse 337-338, - minimale 88 374 - Standardkomponente 88 - spezielle 258 Komponentenorientierung 240, - Zeichenkettenklasse 336,347 259 Klassendiagramm 145,252-253, Komposition 145-146,261,296, 257,296,366,368 302-303,305 Klassifikation 146,238,252,255, Konjunktion 17, 30-31, 58, 218- 260-261,285 219,232 - von Klassen 337 Konkretion 41-42,188,252,273 - von Typen 221 Konstante 45,75-76,113-114,141- Knoten 145,313,323 142,144,147,161,240,297 - eines Baums 314,316-317, -literale 121,127,141 319,321-324 - symbolische 121,141,283, - erreichbarer 313-314 296 - Startknoten 313-314 Konstrukt - Zielknoten 313-314 - einer Sprache 58-59,84 Kommando 13,62,81,101-103, - Kontrollkonstrukt 106,149,151,154-156,161, - Austrittsstelle 203 166,168,172,177-178, - Eintrittsstelle 203 180-182,187,195,200, - Ende 203 225-226,261-263,285- - Schleifenkonstrukt 202 286,292-293,303 Kontext 52, 203 - Ausgabekommando 263,268 Konvertierung 60 - parameterloses 154,163 - Typkonvertierung 168 - Testkommando 295,341 Konzept 38, 337-339 Kommandoknopf 169,173,178, - mathematisches 339 180, 184 - objektorientiertes 249,342 Kommandooberflache 110 - Testkonzept 362 Kommentar 112,118, 122, 148, 223 Kopieren 176,208,335,338-339

428 C Sachwortverzeichnis

- seichtes 325-326,353, 361 leaf - tiefes 326,353,361 ~ Blatt Korrektheit 48, 130,139,143,153, Lehrbarkeit 58 191,210,220,222,295,327 Leistungsmerkmal - einer Schleife 222 ~ Qualitatsmerkmal Kovarianz 258,352 LEN 135 Kunde 2--6,8-10,12-15,19-21,25- Lesbarkeit 22,30,49,58,141,197, 26,28-30,34,37,77,79,86, 201,348 105,109-110, 112-114, Lesen 189,192 118-119,133-134,139, - sequenzielles 157 142-143,146,151-153, lexikalisch 66 175,195-196,207,215,229, library 233-234,243-245,255, ~ Bibliothek 260-261,264-265,267, Lieferant 2-4,6,8-10,12-15,20- 284-285,290,303,321,327, 21,29-30,33,37,77,79-80, 337,355,365-366,369,374 107,109, ll8, 142, 146, 151-152,207,215,260- L 261,265,285,302 Laden 61-62, 108 - privater 317 - bei Bedarf 80, 83-84 LIMITED 355 - d ynamisches 80, 84, 107, 172, Lineal 204, 368-369 240,259 linker - eines Moduls 104,109, ll9, ~ Binder 130-131,134,137,139, Liste 287,302,304-307,312,314, 151,245,275,304,354 324,376 - im Voraus 81 -leere 304 Lader 62,83,88-89,101,106,109- - verkettete 304,312,333-334 llO Literal 70-71 Ladezeit 62, 83, 105 loader Lager 96-98, 110, 118 ~ Lader Liinge Logik 18 - einer Liste 312 - Aussagenlogik 17,32, 197, - einer Reihung 135-136,164, 218 216-218,224,227,276 - Pradikatenlogik 187,197- - einer Zeichenkette 70, 353 198 language Lokalitat 283 ~ Sprache LONGINT 140 Laufzeit 62,80,83, ll4, 128, 136, LOOP 202-203 139,218,238-239,269,279, Lucke 294,302,304,312,353,362 - semantische 56 Laufzeitinformation 126, 152, 295 Laufzeitumgebung 88 M Layout Machtigkeit - Defaultlayout 169-170 - einer Sprache 342 - einer Dialogbox 169,171- - eines Sprachkonstrukts 194 173,364 mapper Layoutmodus 170-171,180 ~ Abbilder

429 C Sachwortverzeichnis

~aschine 11-12,52,56-57 163,170,175,202,204,244, - abstrakte 133 252,268,283,285,288 ~askenmodus 172 - exportiertes 108, 112, 118, ~aterial 216,243 144-145,240,283 ~athematik 18,23,59,129,134, - importiertes 79 206,300,313,339,347 -lokales 79,161-162 ~aus 13,53,95 - 6ffentliches ~ausklick 94,363 ~ exportiertes ~auszeiger 363 - privates 112,118,143 ~AX 135,190 ~ethode 38 ~edium 12 - Entwurfsmethode 45 ~elder 183,185 - Spezifikationsmethode 28, ~eldung 48,104,154-156,164, 39,44,293,334 168,173,177,185,291 - Testmethode 46,293 memory ~IN 135,190 ~ Speicher mistake ~enge 8,20,33,134,137-139,147, ~ Fehler, Denkfehler 235,245,262,266,274,280, ~OD 18,35 285-286,288,290,296- ~odell 1,5,14,25,51,63,105,186, 297,304,312-313,318- 229,251,253,363,365,369 319,321,326,333,335-337, - Dokumentenmodell 93 354-355,361,376 - Entwicklungsmodell 98-99, - geordnete 316 101, 106 - Grundmenge 134, 138 - Entwurfsmodell 296,301, -leere 139,197-199,245,319 303,318 - Teilmenge 134 - Kunden-Lieferanten-~odell - von ganzen Zahlen 140 2,9,11-14,29-30,37, - von Zeichen 20,34,187-190, 57,153 195,197-199,201 - mathematisches 8, 14 - von Zeichenketten 298,312, - ~ensch-~aschine-~odell 11 317,327 - physisches 1-2,4,14,171, - zufallige 300 229-230,251 ~engenlehre 8,337 - Prozessor- und Speichermo• ~ensch-~aschine-Interaktion 11- dell 60 14,53,57,151-152 - Softwareentwicklungsmo• ~enu 13,92,94,98,103,149,151, dell 42-43,46 170,172 - Softwaremodell 4,8,14,51, - Aufrufmenu 149,154,173, 73, 82, 87,230 185,262,292 - modulares 2, 38 -textuelles 185 - objektorientiertes 38 ~enubefehl 93-96,99-100,102, - Textmodell 363,369 104-105,152,158,169- -Zustands-Verhaltens-~odell 170,172,184,204,224 2 ~enudefinition 88,98 ~odellieren 3-8,14-15,18-19,36, ~enUleiste 172 42,51,61,230,233,241, ~enuoberflache 92,110 248,251,257 ~erkmal 2,5,75,109-110,112,118, - objektorientiertes 44, 249

430 C Sachwortverzeichnis

Model-View-Controller 363-364, - Klassenmodul 245,249,262, 366,375 285,287,289,294,327, Modul 2-9,12-15,19-20,22,25- 347-349,354-355,376 26,28,30,34,36-38,44,49, - Kommandomodul 13-14, 58,73, 75, 77-80,82,84, 104,149,151,153-154, 87-91,93-96,98-99,101- 160,162-163,165- 104,107-110,112,118,121, 167,169,173,177-178, 124,130,140,142,144-145, 181,184-186,287 149,152,157,172-173,175, - Konstantenmodul 121,247, 177,187,195-196,199,201, 312 206-208,211-212,214,216, - Konzeptklassenmodul 342- 224-225,227,230,234, 343 236-241,244-249,259- - kundenloses 105 261,264-265,267,273,280, - Kundenmodul 118, 355,362 284-288,293-294,297, ~ Kunde 312,333,336,338-340,354, - Lieferantenmodul 118 362,367-368,374,376 ~ Lieferant - iinderbares 220 - Maschinenmodul 133 - ausfiihrbares 119,195,205, - Mengenklassenmodul 288, 238 312,318 - Ausgabemodul 159, 204, 372 - mit Zustand 133-134,247 - Behiilterklassenmodul 287 - ohne Zustand 216, 245, 247 - Behiiltermodul 134,187 - Quellmodul 150 - Cleo-Modul 74 - Standardmodul 158,166, - Component-Pascal-Modul 168,172,185,187,204, 74,99 214,301-302,362,374 - defektes 123 - syntaktisch korrektes 117 - dokumentiertes 327 - Testmodul 46, 287-288,290, - Ein-/ Ausgabemodul 216, 292,294,298,301-302, 335,362,374 307,376 - Eingabemodul 158, 202, 370 - Testwerkzeugmodul 287, - Eintrittsmodul 82 290,292,308 - elementspezifisches 207 - Typenmodul 245, 247 - entladbares 105 - vereinbarendes 21, 112, 127, - erweiterbares 220 240,275,355 - erweitertes 197 - Werkzeugkastenmodul 216, - Funktionsmodul 153,162- 243,247 164,166,177,184-186, - wiederverwendbares 83, 293 205-206,220,287 - geladenes 104-105,107,150, Modula 73,85,239 152 Modulart 246 - generisches 207-208 MODULE 3-6,8,19-21,26-27,31, - globales 92 33-36,58,72,74,77-79,99, - Grafikausgabemodul 215 112,117-118,124,131-132, - implementiertes 152,238, 134,137-138,140,144,153, 327 160,163,167,178,196,206, - importiertes 107 212,215,220,235-236,241,

431 C Sachwortverzeichnis

246-248,280,298,308,327, 248 343,349,355,370,372 - explizit definierter 69 Moduleigenschaft 37-38 - exportierter 113 Modulkopf 74,77 - implizit definierter 69 Muster 17,36,155,302,311-312, - Klassenname 242 340,342,354,362,364,371, - Kommandoname 102 374 - Konstantenname 141 ~ Carrier-Rider-Mapper -lokaler 78 ~ Model-View-Controller - MerkmaIname 244 - algorithmisches 159,166, - Moduldateiname 91, 287 197-198,306,314 - ModuIname 3, 21,25,37, 58, - Entwurfsmuster 44,257,290, 91-92,95-97,99,102, 300-301, 335, 337, 104,152,169,244,247 362-363,365-366,375 - Objektname 36-37, 234 - fUr Delegation 319 - Parametername 19, 21, 23, 25 - fur Fabrik 369 - Pfadname 172 - fur FOR-Schleife 193 - Prozedurname 120, 243 - fur Kommando 178 - qualifizierter 21-22,77,95, - fUr Schleifenabbruch 195 164,244,247-248,348 - fur sequenzielle Eingabe 202 - Subsystemname 88,91-92, - fur Traversierung 315 112,241 - fur Wachter 177 - Typname 18,140,174,242, - fUr WHILE-Schleife 189 303,306,339,348,353, MVC 362 ~ Model-View-Controller - unqualifizierter 21 - Variablenname 127,174 N - Verzeichnisname 91 ~achbedingung 29-30,32-33,38- ~amengebung 5,21,91-92,174 39,44,120-124,131-132, ~amenliste 114 155,197,215,220-222,227, ~amenraum 120, 169 232-234,237,253-255, ~amenskonflikt 21,87, 168,283, 257,273,284,289,293-294, 287 325 ~ATURAL 18,34,114,122 - zusammengesetzte 218 ~ebenlaufigkeit 291,302 ~achfolger 304,307 ~egation 17,58 ~ame 3,5,18,28,38,48,68,70-72, nesting 75,112-114,136,164,169, ~ Schachtelung 174-175,177,183,188,193, ~EW 267,276-277,305,353 228,233-234,241-242, ~ichtterminal 64,66-68,72,86,99, 253,256,266-267,276,278, 233,270-271 287,289,348 ~IL 275,278-280 - Abfragenname 5 node - Aktionsname 4,6-7,117,124 ~ Knoten - Aliasname 78,121,202,204, ~OT 18,122 263,273,278 ~otation 39,44-46,51,126,129 - Dienstname 3,21, 25, 28, 113 - EB~F-~otation 85 - Empfangername 244,247- - formale 3

432 C Sachwortverzeichnis

- funktionale 342 Operand 22-23,27,218-219,324- - Infixnotation 342 325,342 - mathematische 22,342 Operation 17-18,23,27,65,67,75, - Punktnotation 77,101,244, 84, 137-138, 142, 147, 158, 342 165,206,218-219,221,243, - Softwarenotation 22 275,277,293,313,325-326, - textuelle 3 336,339,353 notifier - arithmetische 18,140 ~ Melder - Baumoperation 324, 333 - Eingabeoperation 154 o - elementare 224-225 Oberon 39,58,73,85,157,214,239 - Erzeugungsoperation 238, Object Management Group 148 276 Objekt 17,36-38,92-93,98,100, - exportierte 144 102,145,152,165,172,234, - klassengebundene 342 236-244,251,258,262,264, - Leseoperation 158-159,188, 267-269,278,284-285, 202,367 289-291,294-296,300- -logische 17-18 307,313,316,326,336-341, - Loschoperation 279 349,355,365,367-369,374 - Mengenoperation 138,262, - aktives 110 288,296,318,334,339 - Behalterobjekt 172 - relationale 18 - dynamisches 376 - Schreiboperation 158-159, - Einzelobjekt 38 369 - Empfangerobjekt 266,289 - Vektoroperation 206,210, - erreichbares 307, 326 216,225 - Fabrikobjekt 368 - vererbbare 342 - interaktives 110 Operator 71,120,169,342 -lokales 245 - boolescher 218 - Mengenobjekt 296,300,337 - Gleichheitsoperator 128 - passives 110 - Modulo-Operator 35 - selektiertes 170 - Negationsoperator 122 - statisches 376 Optimierung 50,129,143,213,222, - typisches 366 238,283 - unerreichbares 307 Option 271 - zufalliges 353,361 - einer Anweisung 77 Objektdiagramm 367-368 - eines EBNF-Ausdrucks 65 Objektorientierung 249, 284 OR 18 Objektstruktur 319,371 ORO 135,190 - dynamische 278,287,289, Ordnung 60,146,252,321,323,376 304,312-313,334,366, - alphabetische 316 368 - partielle 335, 337 - rekursive 334 - vollstandige 316,335-337 - unerreichbare 326 OUT 24 OLD 29, 32, 122, 126 p open array ~ Reihung, offene Parameter 3-4,18-20,27-29,34,

433 C Sachwortverzeichnis

37-38,45,75-76,79, 86, ~ Weg 103,113,116,120,129,154, performance 159,172,177, 183,224,230, ~ Leistungsfahigkeit 233,243,247,253,256,264, Pflege 48 266,268,279,283, 289, Plankalkiil 129 293-294,318,320,352 Plattforrn 48,87,194 - aktueller 24-25,27,103,175- Plattforrnunabhangigkeit 87 176,217-218,223,264, POINTER 274,319,336 266, 268, 280, 294, 321 pointer - Ausgabeparameter 24, 158, ~ Zeiger 176,276,284,297 Polymorphie 258,268,285,303, - Ein-/ Ausgabeparameter 24, 335,347 158,177,223,233,244, Portierbarkeit 48,87,220 267, 279 Position 365 - Eingabeparameter 19,23, - Leseposition 158,192 159,176,223,264,267, - Schreibposition 158 276,340 - Tabulatorposition 204,368- -formaler 21-24,27,86,117, 369 124,175-176,216- P()sT 30,32,119,233 218,227,230,268-269, postcondition 280,289,305, 307 ~ Nachbedingung - geklammerter 342 Postorder 315 - generischer 206-207 Pragmatik 57-58,84, 126, 128, 138, - polymorpher 269,369 220,342 - Referenzparameter 176,268- Praorder 315,324,361 269,274,277,280 PRE 30,32,119,233 - Reihungsparameter 217-218 precondition - Wertparameter 280 ~ Vorbedingung - Zeigerparameter 276,320, predeclared procedure 324 ~ Prozedur, Standardproze• Parameterart 19,21,24-25,116- dur 117,158,175,223,233,243, Prinzip 267 - der Abstraktion 10,38,260- Parameteriibergabe 23-24,27,137, 261 165,175,216,268,275, - der begrifflichen Klassifika• 277-278 tion 261 - polymorphe 269,301 - der Trennung von Abfrage Parameteriibergabeart und Aktion 5,15,126 ~ Parameterart - der Trennung von Schnitt• parent stelle und Implemen• ~ Vater tation 10, 15, 118,237 parenthesis - der Zerlegung und Zusam• ~ Klammer menfassung 4-5,15, parser 261 ~ Zerteiler - der Zusammenfassung Pascal 73, 80,85 gleichartiger Objekte path zu Klassen 38

434 C Sachwortverzeichnis

PROCEDURE 76,112-113,115- - strukturiertes 45,77,199, 117,122-124,175,177, 203,227,284 182-183,197-199,204, Programmierer 130-131,163,177, 217,222-223,243-244, 181,183,191,207,220,245, 263-264,267,271-274, 279,293,342 280,285-286,303,319- Programmierkonvention 8, 69, 327,334,352 112-113,116,157,174,177, Produkt 43,46-50,87-88 183,203,242,287 Programm 2-3,11,15,38,51-54, Programmiersprache 15, 39,45,49, 56-57,59-62,66,79,81-82, 51-52,56-59,62-63,65,67, 84,88,92,107,113,119, 73,77, 79-85,87,93,102, 129,140-141,146,148,174, 110,126,129-130,134,136, 187,200,239,251,261,270, 194,218,220,224,227,249, 283,363 279,342 - als statische Einheit 81 - h6here 42,56,61,84 - Anwendungsprogramm 88, - modulare 84 92 - objektorientierte 240,259, - Assemblerprogramm 56 279,363 - aufrufbares 106 - seiteneffektfreie 129 - ausfiihrbares 9,42,51,62,81, - sichere 84 83,100,111,126 - speichersichere 136 - Component-Pascal-Pro- Programmierstil 318 gramm 73,87,112 programming language - Eintrittspunkt 81-82 ~ Programmiersprache - korrektes 48 Projektion 316-317 - objektorientiertes 375 Prototyp 43 - Quellprogramm 56,61-62, - einer Benutzungsoberflache 81,112 184 - robustes 48, 151 Prozedur 45, 75-76,94, 103, 116, - sicheres 220 118-119,122,130,137,144, - Simulationsprogramm 13 152,158,161,166,168,174, - syntaktisch fehlerhaftes 83 177,182-184,187,197,206, - syntaktisch korrektes 83 217,227,241,243,245-247, - Testprogramm 46 263-264,267,269,271- - unvollstandiges 82 274,279,283-284,286, - vollstandiges 82 290-291,294,301,318, Programmierbarkeit 53 320-321,325-326,340, Programmieren 85, 98, 106, 181, 343,348,352-353,361 218,278,294-295,297,334 - abstrakte 267,290,343,347 - klassenorientiertes 239 - aufgerufene 269,280 - komponentenorientiertes - aufrufende 158-159 374 - Ausgabeprozedur 204,214 - maschinennahes 85 - effektlose 343 - modulares 142, 147 - exportierte 123,141,175,181 - objektorientiertes 85,229, - finale 290, 347 239,243,249,251,260, - Funktionsprozedur 279,374 ~ Funktion

435 C Sachwortverzeichnis

- geerbte 303,348 Priifung - gew6hnliche 75,101,116, - einer Invariante 123-124 147,149,169,216,247, - einer Zusicherung 295 270,318,320-322 Pseudocode 45,55,155,166,190 - implementierte 303, 347 public - Initialisierungsprozedur 245 ~ Dienst, 6ffentlicher - Invariantenpriifprozedur ~ Merkmal, exportiertes 321,340,347,362,374 Punktschreibweise - konkrete 347 ~ Notation, Punktnotation -leere 343 -lokale 204,225,283,307,320- ~ 321,327 Qualitat 47,84 - Modulprozedur 339 Qualitatsmerkmal 47,50, 153 - neu definierte 348,354 - funktionales 47 - parameterlose 169,290 - Leistungsmerkmal 47, 49 - parametrisierte 216,290 - strukturelles 47-48 - private 166,319,321 Quantor 187 - redefinierbare 290,343,349 QUERIES 3,25-26,72,112-116, - redefinierte 296,348,354 198 - rekursive 318,320,324,327 - Schnittstellenprozedur 291 R - Sortierprozedur 216-217 read-only export - spezifizierte 227 ~ Export, schreibgeschiitzter - Standardprozedur 120, 129, Reaktionsfahigkeit 293 157,276 REAL 18 - Traversierungsprozedur 327 Realisierung 52,146 - typgebundene 240,243-248, receiver 263-264, 267, 294, ~ Empfanger 318-319 Rechner 9,11-13,41--42,44,51-53, - iiberladene 276 56-58,61,84-85,100-101, - vereinbarende 275 293 - vordeklarierte Rechnerarchitektur 58,85 ~ Standardprozedur Recht 25-26,38,112,259 Prozedurende - Schreibrecht 165 - dynamisches 116 RECORD 163-164,245 - statisches 116 REDEFINES 257,267 Prozedurkopf 118, 122, 161 Redefinition 257,260,265, 285, Prozedurrumpf 118,161-162,244, 336,338,340,342,349,353 248,267,371,374 Referenziibergabe 175-176 -leerer 343 Regel 4-5,53 Prozess 81 - EBNF-Regel 64,67,70,72,75, Prozessor 49,53,55-56,81,84 77,85,148,270,284 Prozessorleistung 56 - Einsetzungsregel 258,269 Prozessorzeit 49-50,291 - Namenregel 92,96 Priifling 287-288,293--296,312, - Syntaxregel 30,59, 272 334 - Transformationsregel 3 - fehlerfreier 294 - Typvertraglichkeitsregel 268

436 C Sachwortverzeichnis

- Verhaltensregel 58 Riickkehr aus Prozeduraufruf 275, Register 54--55 326 Reihenfolge Riickkehrstelle einer Prozedur - von Aufrufen 226 116,225 - von Bedingungen 157 Riickwartsrechnen 295 - von Knoten 314 run - von Operanden 219 -7 Ausfiihrung - von Operatoren 219 - von Teilaufgaben 226 S Reihung 135-138,142-143,147, Schachtelung 163,176,197-198,201,205, -textuelle 239 208-211,222,227,235,275, - von Kornrnentaren 148 278,284,296 Schalter 6,20,32,133-134,138, - boolesche 135 144,147,177,255 - ganzzahlige 225 Schleife 189-191,194-195,199, - offene 216-217,227,276 209,213,216,224,226-227, - sortierbare 206 266,284,306,314,320 - sortierte 206, 209-210,227 - Ausgabeschleife 192,195, - statische 376 204,214 Reirnplernentation 260 - Bedingungsschleife 189,199, Reiter 365-367, 369 203,209,226,311,314 Rekursion 314,321,323,334 - Eingabeschleife 191- 193,195 Relation 336,339,342,347 - Endlosschleife 191,194 - Brauchtrelation 79,314 - fuBgesteuerte 311 - geerbte 336 - kopfgesteuerte 189,203 - Gleichheitsrelation 339 - rurnpfgesteuerte 203 - Ordnungsrelation 206,316, - terrninierende 191-194,226 335,337,339 - Zahlschleife 193-194,199, - Teilrnengenrelation 337 209,226 RENAMES 257 Schleifendurchlauf 191-193,198, REPEAT 311-312 209,222,224 repository Schleifenrurnpf 189,191-195, 199, -7 Lager 202-203,213,225,311 Ressource 87-88,91,97 Schleifenvariante 192 result Schnittstelle 8-15,38,44,47,49,53, -7 Ergebnis 74,79,88-90,94-95,97, RETURN 115-116,203,222 101, 103, 108-110, 118, rider 142-143,146-147,154, -7 Reiter 163,169,186,205,214,216, right 237,244--245,284,288,292, -7 Recht 301-302,312,333,335,337, Robustheit 48,151,153,162-163, 342,354,364,366,374 173,178,185 - anwendungsorientierte 366 Rolle 1-2,12,14-15,37 - eines Moduls 91,149,170 root - erweiterte 286 -7 Wurzel - flache 347-348 Riickgabe 300 - Kornrnandoschnittstelle 154,

437 C Sachwortverzeichnis

163 - Typsieherheit 84,208,217- - kurze 354 218,268-269,277,362 - prozedurale 291 Sieht 363, 368-369 -rohe 365 - dokumentzentrierte 92,110 - spezifizierte 293 - Textsicht 363, 368 - syntaktische 158-159,266, Siehtbarkeit 112,127,162 289,291 side effect - vollstandige 337 ~ Seiteneffekt - wiederverwendbare 88 Signatur 25,75,101,103,115,177, Schnittstellendefinition 91 183,223,257,259,274-275 Schreiben - eingeschrankte 149 - sequenzielles 157 Simulation 2,14,25,28,36 Schreibmarke 98,100,102 singleton Schrittweite 193,209 ~ Einzelobjekt seamless software development size ~ Softwareentwicklung, ~ Umfang nahtlose 363 Seiteneffekt 6,23,297,300, 312, Software 1,42,47-49,52-53,139, 347,349,355 152,237,248,338-339 Selektion 94, 158 - modulare 3 Semantik 34,44,52,57-59,84,117, Softwareentwieklung 6,10,14,38, 120-121,126,128,136,142, 41,46,50,106 154,157-159, 190, 193, - evolutionare 42, 50 203-204,214,218-220, - inkrementelle 43 223,266,273,277,279,286, - iterative 43,46 291,301-302,311,320,342, - komponentenorientierte 43, 353 49-50 - dynamische 28,193 - nahtlose 43,50 - Referenzsemantik 277,280, - partizipative 43,50 289-290,301-302, Softwareentwieklungsprozess 42- 318,335 43 - statische 25 Softwarekonstruktion - Wertsemantik 277,290,318 - objektorientierte 248,284 Sequenz Softwaretechnik 9,41,50,339,347 ~ Folge Sortieren 205,208,227 Server 90 Speicher 49, 53-55, 84, 104, 238, service 278-279 ~ Dienst - Hauptspeieher 53, 62, 109 SET 138 - Hintergrundspeieher 62 shallow copy Speieheradressierung 54 ~ Kopieren, seiehtes Speieherbarkeit 364,374 SHORTINT 140 Speicherbedarf 49-50, 75, 137, Sieherheit 79,83,141,143,194,209, 139-140 216,220,259,268,280,283 - von Code 224 - Modulsieherheit 84,280 - von Daten 224 - Speichersicherheit 84, 136, Speicherbereieh 278 208,218,279 Speicherbereinigung

438 C Sachwortverzeichnis

- automatische 278-279,307, 126,236 326 Sprache 5-6,15,51,56,72 Speicherinhalt 54 ~ Implementationssprache Speicherkapazitat 56, 191 ~ Programmiersprache Speicherplatz 83-84,105,114-115, ~ Spezifikationssprache 136,165,279 - Assemblersprache 56, 60 - belegter 138 - Entwurfssprache 51 - einer dynamischen Variable -formale 51-52,64-65,67,270 276,278 - Kommandosprache 102-103, - einer lokalen Variable 162 110 - einer Reihung 135-136, 209 - Maschinensprache 42, 54, 56 - einer unerreichbaren Varia- - Modellierungssprache 147 ble 279 - regulare 232, 270 - einer Variable 119,127 - Zielsprache 126 - einer Zeigervariable 275 Sprachumgebung 62,83,87-88, - eines formalen Parameters 110,157,214,224 175 Spur 211,227 Speicherplatzverwaltung 279 Stabilitat 43-44, 362 Speicherung 60,375 state - Programmspeicherung 54 ~ Zustand Speicherzelle 54,115,176,280 state chart Spezialisierung 252,257,261,285 ~ Zustandsdiagramm Spezifikation 8-9,11,15,20,28,32, statement 35,38,41-46,48-51,61-62, ~ Anweisung 82,106,111,117,119,126, statisch 25, 34,62,81,84, 116, 162, 139,142,144,146-148,162, 203,223,234,259,293,304 197-198,206,211,229, string 232-233,235-236,249, ~ Zeichenkette 253-257, 288,293,340 Struktur 9,44,47,59,74-75,146, - durch Vertrag 30,32,34,37- 205,239,293,304,312-313, 39,44,46,111,119, 325 124,147,151,177,185, ~ Datenstruktur 197,206,226,231,233, ~ Objektstruktur 287,293-296,334 - algorithmische 187,225 -exakte 126 - Aufrufstruktur - formale 34, 198 ~ Benutzungsstruktur - generische 206-207,335 - Benutzungsstruktur 44, 234, - partielle 265,287 ~ unvollstandige - Dateiverzeichnisstruktur 90, - pradikatenlogische 226 313 - semantische 111 - dynamische 268 - syntaktische 111,117 - eines Baums 322, 324, 326 - unvollstandige 28,32,34, - eines Modells 5 288,296 - Entwurfsstruktur 129,318 - verbale 197 - Erweiterungsstruktur 265 - vollstandige 32-34, 198 - Klassenstruktur 366 Spezifikationssprache 44,51,111, - Klassifikationsstruktur 252-

439 C Sachwortverzeichnis

253,257,260 - Zuweisungssymbol 128 - Listenstruktur 306 Symmetrie 339 - Organisationsstruktur 333 Syntax 25,44,57,59,63,65-66,68, - Programmstruktur 275 70,73,75,77,84-86,103- - rekursive 314 104,129,148,154,161,164, - Speicherstruktur von Daten 203,243-244,267,270,314, 174,237 342 - statische 268,318, 366 - EBNF-Syntax 99,104 - syntaktische 274 Syntaxanalyse 270,284-285 - Zerlegungsstruktur 46 Syntaxdiagramm 44,59,64,67-68, Strukturgesetz 77 85,232 Strukturierungsmittel 260-261 System 43,82,259 Subsystem 87-92,96-97, 110, 112, - komponentenorientiertes 118,121,134,171,287 248 - Dienstesubsystem 287 - Standardsubsystem 88-89 T Subsystemubersicht 97 Tabelle 200,204 subtree - Wertetabelle 218 ~ Teilbaum Task 195 Suchen 206,210,227,313 Tastatur 13,53 - in Baum 322, 333 Tastaturpuffer 312 - in geordnetem Biniirbaum Taste 95,312 317 - Abbruchtaste 195 - in Liste 306,312 - Escape-Taste 195,291 Sucher 95 Tastendruck 363 Suchzeit 225 Tastenkombination 95,194-195 Suffix 242 Terminal 64,66-68,71,232 supplier Test 41,45-46,50, 104,106,169, ~ Lieferant 195,216,287,291-295,301, Symbol 52,64-65,121,232,271, 320,340,354,362 273,312 - Black-Box-Test 293 ~ Nichtterminal - Dauertest 290-293, 312, 334 ~ Terminal - eines Funktionsmoduls 185 - Aufrufsymbol 92,102-104, - eines Moduls 151 149,154-155,172- - Einzeltest 290, 292-293, 295- 173,185 296,340,354 - Dereferenzierungssymbol - erfolgreicher 293, 295 276 - Funktionstest 293 - exportiertes 91 - partieller 294 - Gleichheitssymbol 129 - randomisierter 294-295,334, - Metasymbol 64, 67 340,374 - Operatorsymbol 342 - Stresstest 294 - Referenzierungssymbol 274 - Zufallstest 294 - Startsymbol 64,67, 69, 72, Tester 126, 151, 293, 295 271 Testfall 46,294-295 - Zeichenkettenendesymbol - zufiilliger 296, 340 284 Testszenarium 287,296,312,341-

440 C Sachwortverzeichnis

342 Trapzeitpunkt 151-152 Text 92,94,99-100,112,149,155, Traversierung 320-321,324 157-158,162,223,239, - Breitentraversierung 315 261-262,272,363-364, - eines Baums 314 366,368-369,374 - rekursive 322 - Ausgabetext 204,363,374 - Tiefentraversierung 315 - Dokumentationstext 96 Trennung - Eingabetext 102, 187, 191- - von Funktion und Ein-/ Aus• 193,195,200,202,209, gabe 15,153,187,214 261,263,270,274,283, - von Sicht und Modell 363 285-286,363 TRUE 18,218 - formatierter 185 Typ 17-18,23,27,35,37-38,45,75- - Programmtext 22,25, 112, 76,114-115,127-128,134, 201 137,144,158,163-165,168, - Quelltext 56,84,90,94-102, 176,193,201,208,216,230, 104,106-108,112,152, 233,235,237-238,240, 238,244,293,295,361 244-245,253,255,258,263, - selektierter 94 268-269,275,277,294- Titel 297,304,318,333,335-337, - einer Dialogbox 172 341,365,374 - eines Fensters 204,214,369 - Abfragetyp 21-22 trace - abstrakter 268 ~Spur ~ Datentyp Triiger 365-366 - anonymer 174,217,318-319 Transformation 14,19,22,34,45, - anwendungsspezifischer 365 112-113,115-116,119,122, - Basistyp 216,258,275,277, 124,147-148,198 319 - eines Programmstiicks 194, - boolescher 18,23 297 - derselbe 20,208,217 - von Cleo in Component Pas• - dynamischer 269,353 cal 111,117 - einfacher 174 - von Modellen 2-4, 8 - Elementtyp - von Modul in Klasse 236- - einer Menge 20, 134, 237,246-248 139-140, 199, - von Programmen 62,148 235-236,241,245, - von Spezifikation in Imple- 262,318,335-337, mentation 126, 229, 376 245-246,249,289 - einer Reihung 135, 137- transition 138,197,206,208, ~ Zustandsiibergang 216-217,221 Transitivitiit 339 - Empfiingertyp 353 Trap 120,136,151,157,195,218, - Ergebnistyp 25,259,353 279-280,294-295,298,353 - erweiterbarer 284,319 Trapnummer - Erweiterungstyp 258,268 ~ Fehlemummer - exportierter 141,177,318- Trapstelle 150 319 Trapursache 150,295 - Feldtyp 165

441 C Sachwortverzeichnis

- Ganzzahltyp 18,34,140 Typvertraglichkeit 27,38,174,193, - generischer 134 217,258,268-269,303,337, - globaler 175 353 - Grundtyp 18,37-38,75,114, 116,138,140,174,176 U - implizit vereinbarter 75 Uberladung 120 - Indextyp 140 - eines Operators 342 - konkreter 134,206-207,235- Uberlauf 140,191 236,241 Ubersetzbarkeit 58 - Mengentyp 138,319 - getrennte 79 - Parametertyp 19,21,24-25, Ubersetzer 42,62,79,81,83-84, 141,174-175,206,216, 88-89, 91,99-101, 106--11Q, 259,264-265,353 112,117-118,120,128-130, - Platzhaltertyp 206 139,190,213,219-220,244, - privater 319 268 - Reihungstyp 164,216,274 Ubersetzerart 100 - Standardtyp 75,303,342,365 Ubersetzung 61--62,99,107-108, - statischer 269,275,352-353 137,240 - strukturgleicher 217 - bedingte 295 - strukturierter 174,176 - getrennte 79, 107 - Verbundtyp 164,177,240- - unabhangige 79 241,243,247,267,274, Ubersetzungszeit 62,79,82,105, 303,318 108, 120, 128, 135-136, - vorvereinbarter 238-239,269,275,362 ~ Grundtyp Umbenennung 257,259 ~ Standardtyp Umfang eines Baums 317 - Zahlentyp 18, 23 UML - Zeichentyp 18, 134 ~ Unified Modeling Lan• - Zeigerbasistyp 274,276 guage - Zeigertyp 242,247,274,280, Undo/Redo 98 318-319 Unified Modeling Language 44, Typangabe 18-19,113 51,144,147-148,261 Typanpassung 135,137,140 Unterlauf 209 TYPE 75,174,201,207,217,267, user 274,303-304,336 ~ Benutzer type checking uses relation ~ Typpriifung ~ Beziehung, Benutzungsbe• Typeigenschaft 34-35,38 ziehung TYPES 235 Typinformation 238 v typing value ~ Bindung, Typbindung Typprtifung 25,27-28,38,79,84, ~Wert VAR 75,112-115,127,129-130, 128,174,217,259,268 138,158,165,188,190,201, - dynamische 259,353,375 208,210,217,243,245,275, - statische 268,353,375 277 Typtest 376 Variable 45,60,75-76,80,114-115,

442 C Sachwortverzeichnis

127-128,130-131,136- 283-284,325-326,354, 137,151,161,164-166, 361,376 174-176,188-189,191- - einer Abfrage 21 192,201,217,247,268,271, - einer Aktion 21,23 275,279,283,311,321 - einer Funktion 76, 115 - boolesche 134 - einer GroBe 37 - dynamische 276-280,284 - einer Klasse 239,294 - exportierte 143 - einer Konstante 75,121, 138, - ganzzahlige 129,193 141 - globale 130-131,150-151, - einer Prozedur 75,175 224,275 - einer Variable 75,114,127, - implizite 193 138,223 - indizierte 136-137 - eines Dienstes 20-21 - Laufvariable - eines Objekts 36-37,236,244, ~ Zahlvariable 294,355 -lesbare 144 - eines Parameters 23 -lokale 130,152,162,168,175, - eines Typs 75,140-141,174, 222,275,283,321 206,217,221,247,262, - private 115,243, 304 274,304,336 - Puffervariable 213 - eines Verbundtyps 244 - qualifizierte 164-165 - globale 245 - referenzierte 276-278 -lokale 161,245 - Reihungsvariable 135,276, - Vorwartsvereinbarung 361 278 Vereinbarungsteil 74 - Schleifenvariable 193,214 - einer Prozedur 161 - schreibbare 144 - eines Moduls 161 - schreibgeschiitzte 113-114, Vereinigung 288,324-325,327,339 127,143-144,140194 Verfahren - statische 275 - Testverfahren 287,293-296, - unerreichbare 278-279 334-335,339-340, - Verbundvariable 165,303 347,374 - Verbundzeigervariable 303 - Zufallsverfahren 294 - Zahlvariable 193-194 Verfeinern 190,205,208,211 - Zeigervariable 275-280 - schrittweises 45, 188, 199, Vater 314 225,284 Vektor 206,216,221,243 Vergleich 223,275, 277-278,335, - ganzzahliger 208 338-339 - reeller 208 Vergleichbarkeit 336,374 Verallgemeinern 4, 266 Verhalten 2, 7-8, 15,28,45,47, 63, Verbalisieren 5,34,42 81,146,231,252,257-258 Verbund 165,169,176,240,247- - beobachtbares 293 248 - eines Objekts 37, 340 - erweiterbarer 248 - Fehlverhalten 293 Vereinbarung 20,24,28,38,45,75, - Laufzeitverhalten 49,224 113-114,129-130,134- - spezifiziertes 9, 34 136,138,141,148,190,218, Verkettung von Zeichenketten 169 236,238,243,245,267,275, Version

443 C Sachwortverzeichnis

- Codeversion 109 Weg 7,314,317,322 - einer Prozedur 352 Weiterleitung 215,302-303,367, - einer Schnittstelle 109 369 - eines Merkmals 109 Werkzeug 12,41-42,50,57,61-62, - eines Moduls 104-105,284 87-89,91-92,94-96,98, - Testversion 295 101,105-106,110,152,200 - von BlackBox 87 - Testwerkzeug 46, 287-288, Versionierung 109 290,301,308,312 Versionsnummer 109 Werkzeugkasten 87 Verstiindlichkeit 5, 11,48-49,58, Wert 3-5,18-19,22-24,29,54,60, 112,194,241 70,75-76,113,115-116, Vertrag 30,119,231,237,254,293, 121,128-130,134-135, 318,320-321 140-141,154,157-159, - geerbter 259 163,166,168, 175-176, Vertragsbruch 294 182-183,188-189,191, Verwendbarkeit 283 193,197-198,206,208- Verzeichnis 91 210,218,222,224,227,275, - Arbeitsverzeichnis 90-91 280,290,296,298,303-304, - Installationsverzeichnis 90- 321,353,367 91 - Anfangswert 130 - Ressourcenverzeichnis 171 - boolescher 219 - Subsystemverzeichnis 91, - Datenwert 316 103 - Defaultinitialisierungswert - Unterverzeichnis 90 321 - Wurzelverzeichnis 90-91 - Defaultwert 119,130,169, view 276 ~ Sicht - Durchschnittswert 224 Visualisierung 375 - einer Abfrage 154, 166 Vollstiindigkeit 82 - einer Konstante 141 Vorbedingung 29-34,38-39,44, - einer Variable 151 120-121,123-124,136- - eines Ausdrucks 127 137,150-152,154-155, - eines Dialogfelds 183 177,197,214,220,232-233, - Eingabewert 156,166 237,253-255,257, 273, - Ergebniswert 22-24,140,222 279-280,293-294 - ganzzahliger 140 - implizite 279 - Indexwert 136,210 - verletzte 353 - kleinster 140 Vordergrund 291-292 - konvertierter 168 Vorgiinger 307 - Parameterwert 24,27-28, Vorrang 65 151,159,294,297 - Schiitzwert 224 W - iibergebener 27 Wiichter 177,180-181,183,185, - Zufallswert 294,296-297, 226,353 341 - gemeinsamer 182 Wertebereich 17-18,22,29,34-35, Wartbarkeit 48-49,338 60, 75, 115, 127, 134-135, Wartung 48 140,275,335

444 C Sachwortverzeichnis

- vollstandig geordneter 316 - liochkomma 158 Wertiibergabe 175-176 - kleinstes 191 WIiILE 77,189-190,192,195,209- - Leerzeichen 3, 155, 158 210,234,286,3Q6-307 - Pluszeichen 169 Wiederholung 45,69,188-189,194, - Punkt 22,99 271,314 - Steuerzeichen 312 ~ Anweisung - Tabulatorzeichen 158,204, ~ Schleife 214 - eines EBNF-Ausdrucks 65 - Unicodezeichen 70, 209 Wiederverwendbarkeit 43--44,49, - Unterstrich 3 87-88,195,200,205,217, - Zeilenumbruchzeichen 158- 240,264,287,335 159,214 Wiederverwendung 10,49 - zufalliges 297, 300 WITIi 353 Zeichenfolge 51-52,59-60,112, Wort 52,64-65,68,72,82,241,272 363 -leeres 65 Zeichenkette 51, 70,88, 158, 164, - Maschinenwort 54 312,316 - reserviertes 71 ~ Zeichenfolge - Schliisselwort 3,30,36,58, -leere 169 71-72,77,99, 112, - literale 169 115-116,118,164,235, - zufallige 353,376 243,245 Zeichensatz 51,60,66 Wortart 5 ~ Alphabet Wurzel 313-317,319,322-323 - ASCII-Zeichensatz 67,312 - LatinI 66-67 Z Zeiger 216,242,274,276-280,284, Zahl 18,53,60,70,135,190,192, 300,304,307,319,335, 206 367-368,371 - ganze 18,201,297 - Ergebniszeiger 324 - Gleitpunktzahl 18,60 -lokaler 305,307 - KomplexitatsmaBzahl 225 - polymorpher 302-303,305 - MaBzahl 223-224 Zeilenumbruch 98 - natiirliche 18,34 Zeitpunkt - negative 140, 181 - absoluter 302, 304 - Ordnungszahl 60, 70, 135, - Aufrufzeitpunkt 303 138,205 Zentraleinheit 53 - zufallige 297 Zerlegung 41,43--46,50,225,261, Zahlbereich 193-194 285 Zahlensystem 60 - modulare 44,49,199 ~ Dualsystem Zerteiler 270 Zahler 201 Zerteilung 70,271 Zeichen 18,51-52,58-60,66,69- Zufallszahlengenerator 297 70,135, 137-138,190,192, Zugriff 20,54,138,165,211,258, 200,316,363 355,365,375 - alphanumerisches 297 - auf Feld 247 - Escape 292,312 - auf formalen Parameter 176 - groBtes 191 - auf Reihungselement 136,

445 C Sachwortverzeichnis

148,213 - einer Dialogbox 184 - auf Variable 247 -einer Kommandoausfiihrung - Datenzugriff 365 152 - direkter 142-143,147 - einer Variable 128,147 - indirekter 142 - eines Kommandoknopfs -lesender 113-114,130,142 177-178,183 - schreibender 114-115,142 - eines Moduls 3,5--6,29,131, - sequenzieller 365 134,152,196 - Speicherzugriff 84 - eines Objekts 37, 339 - wahlfreier 365 - eines Steuerelements 182- Zugriffsart 113 183 Zugriffsbeschriinkung 26 - interner 293 Zugriffskontrolle 25-26,38, 128 - Maschinenzustand 133 Zugriffsrecht 113 - Nachzustand 7,231-232 Zusammenfassen 4,36,38,261 - Startzustand 232 Zusicherung 46,119-122,126,128, - Vorzustand 7, 231-232 147,157,190,203,210,221, Zustandsdiagramm 7-8,15,33,45, 277,293-295,297,301,311, 231-233 320,325,339,341,347,349, Zustandsiibergang 7,231-232 355,374 Zustandsiibergangsdiagramm - verletzte 294 ~ Zustandsdiagramm Zustand 1-2,6-7,17,22-23,29,32- Zuverliissigkeit 42-43,47,143,362 33,61,119,124,146, lSI, Zuweisung 45,60,76, 114, 127- 155,162,166, 168,223, 132,136-137,147,162,165, 231-233,230 239,245- 175-176,181,210,213- 246,254,278,294-295, 214,223-225,268,275, 305-306,325-326 277-278,290,325,367 - Anfangszustand 2, 155, 187, - einer Reihung 208 202 - eines Objekts 355 - diskreter 53

446