NMBU REALTEK, INF205, 2024 (spring semester): Glossary
Abstract class
We agreed on 12.3. to add this to the glossary on the content from calendar week 10.
Amdahl's law
From calendar week 12.
Asynchrony
We agreed on 22.4. to add this to the glossary on the content from calendar week 16.
Backtracking
From calendar week 17.
Class (entity type, concept)
- nn klasse f., m. (entitetstype m., omgrep n.)
- nb klasse m., f. (entitetstype m., begrep n.)
Definition: A class is a type that is instantiated by objects; in object-oriented programming, class definitions and the members of a class are the main tool for organizing both the code and the data.
- The members of an object comprise its properties (variables that belong to the object) and methods (functions that belong to the object).
- Classes can stand in a hierarchical relationship: A more general superclass and its more specific subclass (also, "derived class" or "child"). An object of the subclass then (automatically) is also an object of the superclass; it has all the members defined in its class definition, but also inherits the members defined for the superclass, to which it also belongs.
- In entity-relationship (E-R) diagram terminology, a class is called an entity type. When working with knowledge representation in digitalization, it is usually called a concept.
- From SKOS, a semantic artefact for organizing conceptual schemes: "Concepts are the units of thought - ideas, meanings, or (categories of) objects and events - which underlie many knowledge organization systems" (Isaac & Summers 2009).
- Note that E-R terminology distinguishes between an entity type and the corresponding entity set, i.e., the set of all individuals that instantiate the entity type. Out of these, however, the term that most closely describes a class in OOP would be "entity type."
See also: Object-oriented programming, ownership, pointer, relation, typing.
Compilation
Definition: Compilation (or compiling) is the process of transforming a human-readable source code into a lower-level machine code. It is done by a compiler.
- In C/C++, the compiler is run on the source files; in C++, these files usually have the file ending *.cpp, *.cxx, or *.C. The compiler is not run on the header files (usually with a *.h file ending).
- The machine code created by compiling a source file with a C/C++ compiler is called object code; it is stored as an object file, which usually has a *.o file ending.
- The object files produced by compiling are not executable by themselves: They need to be linked into one stand-alone executable file.
See also: Namespace, typing.
Computational complexity
From calendar week 17.
Command-line argument
We agreed on 26.2. to add this to the glossary on the content from calendar week 8.
compile-time
We agreed on 12.2. to add this to the glossary on the content from calendar week 6.
Concurrency
From calendar week 12.
Configuration space
We agreed on 15.4. to add this to the glossary on the content from calendar week 15.
Constant expression
From calendar week 8.
Constructor
Definition: Method that is called in order to allocate an object.
- Important special constructors discussed in the lecture are the copy constructor ("rule of three:" define it jointly with an overloaded copy assignment operator) and the move constructor ("rule of five:" define it jointly with an overloaded copy assignment operator).
See also: Destructor, object-oriented programming, typing.
Container
- nn konteinar, container m.
- nb konteiner, container m.
Definition (Stroustrup): "A class with the main purpose of holding objects is commonly called a container."
- Container objects take ownership of any contained data. The programmer needs to take care of this whenever there are data subject to manual memory management (new and delete) in a self-designed container.
- Examples include the standard template library (STL) containers (list, map, set, vector, etc.). Other than for educational purposes as an exercise, it does not make sense to reimplement these standard data structures by hand.
- Many problems require special, tailored container data structures in order to be solved efficiently. It is then part of the development work to both design and implement the required data structure.
See also: Object-oriented programming, ownership, pointer, queue.
Dangling pointer
We agreed on 26.2. to add this to the glossary on the content from calendar week 8.
Depth-first search
We agreed on 15.4. to add this to the glossary on the content from calendar week 15.
Destructor
Definition: Method that is called upon deallocating an object.
See also: Constructor, object-oriented programming.
Distributed system
From calendar week 16.
Domain decomposition
From calendar week 15.
Dynamic library
From calendar week 8.
Embarrassing parallelism
From calendar week 15.
Graph
From calendar week 11.
Hasse diagram
We agreed on 22.4. to add this to the glossary on the content from calendar week 16.
Heap [memory management]
We agreed on 19.2. to add this to the glossary on the content from calendar week 7.
Interface
We agreed on 12.3. to add this to the glossary on the content from calendar week 10.
Load balancing
From calendar week 17.
Memory leak
We agreed on 26.2. to add this to the glossary on the content from calendar week 8.
Message passing
We agreed on 8.4. to add this to the glossary on the content from calendar week 12.
Middleware
We agreed on 22.4. to add this to the glossary on the content from calendar week 16.
Namespace
Definition: A namespace is a collection of names, i.e., rigid designators for functions, variables, classes, etc.; namespaces and the names they contain can be accessed globally, from anywhere in the source code.
- To access name Y defined in namespace X, we write X::Y.
- With using namespace X; all the names from X can be accessed without a prefix.
See also: Compilation, object-oriented programming, procedural programming.
Object-oriented programming
- nn objektorientert programmering f.
- nb objektorientert programmering f., m.
Definition: Object-oriented programming (OOP) is the programming paradigm where classes are the highest-level device for structuring code, data, and the program control flow.
- In object oriented programming, the focus is on how data belong together and how we can facilitate safe and correct access to data.
- Classes are instantiated by objects, which can carry out methods, i.e., functions that belong to the object.
See also: Class, container, destructor, namespace, procedural programming, relation.
Operator overlading
From calendar week 11.
Ownership [memory management]
- nn eigarskap n., m.
- nb eierskap n.
Definition: In the context of manual memory management, one object x taking ownership of another object y means that the memory use of y is managed through x. It usually implies that x acts as a container for y.
See also: Class, container.
pass-by-reference
Definition: "Passing by reference" can refer to any mode of passing an argument to a function that permits the called function to access the original data item, at the same address in memory, rather than receiving only a copy.
See also: Pass-by-value, pointer.
pass-by-value
- nn verdioverføring f.
- nb verdioverføring f., m.
Summary: When an argument is passed by value to a function, a copy of the argument values is created in memory (on the stack, in the stack frame of the called function). The function works with its own copy; it cannot access the original variable.
See also: Pass-by-reference, procedural programming.
Petri net
From calendar week 16.
Pointer
Definition: A pointer is a variable that has a memory address as its value.
See also: Class, container, pass-by-reference, reference, static array, wild pointer.
Procedural programming
- nn procedyreprogrammering f.
- nb procedyreprogrammering f., m.
Definition: Procedural programming is the programming paradigm where procedures are employed as the highest-level device for structuring code and the program control flow.
- In the above definition, procedures are blocks of code that provide an interface for argument passing from outside.
- The procedures are called functions in many programming languages, including C/C++ and Python.
- The paradigm is nonetheless called "procedural programming," not "functional programming." Note that functional programming exists as well, but means something different altogether (LISP and similar languages).
See also: Namespace, object-oriented programming, pass-by-value.
Queue
Definition: A queue is a sequential (list-like) dynamic data structure that functions by the principle first in, first out (FIFO).
- A queue class must provide a method for appending an element, usually called push and
done on one end of the queue (e.g., enqueue or push_back), and a method for detaching an element,
usually called pop and done at the other end of the queue (e.g., dequeue or pop_front).
- Singly and doubly linked lists are well suitable for
implementing a queue, since both push and pop
can be realized in constant time. However, a singly linked
list should only be used if the data structure includes an explicit
reference to the tail node; otherwise, the whole list needs to
be traversed just to reach the tail, taking O(n) time.
- Dynamic arrays are less suitable for this purpose, requiring
O(n) time for the push and pop
operations in the long run (as their capacity gets exhausted).
See also: Container, static array.
Rank [MPI]
We agreed on 8.4. to add this to the glossary on the content from calendar week 12.
Reference
Definition: A reference is an alias for the data item stored at a given memory address; the address remains hidden from the programmer, who can use the reference as if it was the data item itself.
- A reference, with the name z, for variable y of type Y is declared and initialized as follows: Y& z = y; From now on, z and y can be used interchangeably.
- Theoretically it is possible to use references anywhere in the code, for any purpose; they are equivalent in functionality to pointer. But in practice, they are rarely used for anything other than passing a function argument by reference.
- Upon accessing a reference, implicit dereferencing occurs. Example: int& z = y; cout << z; This will print out the value of y. This stands in contrast to pointers, where explicit dereferencing using the operator "*" would be needed: int* x = y; cout << *x;
See also: Pointer.
Relation (object property, relationship type)
- nn relasjon m. (objekteigenskap m., forholdstype m.)
- nb relasjon m. (objektegenskap m., forholdstype m.)
Summary: A relation specifies how objects from given classes can be connected to each other.
- Example from the lecture: For a city, we can say that it is in a country. For a country, we can say that it contains cities. Therefore there is an N-to-1 relation between cities and countries. It could be called "is in" from the perspective of the city and "contains" from the perspective of the country.
- Entity-relationship (E-R) diagrams can be used as a design tool and to visualize the relations.
- A concrete instance of the relation (e.g., the fact that Oslo is in Norway) is called a relationship.
- Note that the term "entity-relationship diagram" is strictly speaking a misnomer: The most common type of E-R diagrams do not show entites (i.e., objects), but classes (i.e., entity types). They do not show relationships, but relations (i.e., relationship types).
- In ontology-based knowledge engineering, a relation is called an object property.
See also: Class, object-oriented programming.
Rule of three
We agreed on 12.3. to add this to the glossary on the content from calendar week 10.
Rule of five
From calendar week 11.
Runtime
We agreed on 12.2. to add this to the glossary on the content from calendar week 6.
Sampling [of a high-dimensional space]
We agreed on 15.4. to add this to the glossary on the content from calendar week 15.
Static array
- nn, nb statisk array n., m.
Definition: An array is a variable referring to a contiguous region in memory that can hold the content of multiple elementary variables or objects. A static array is just that, without any special additional functionality, as opposed to a dynamic array which provides the additional functionality that it can be resized.
- An array containing elements of type X is, for almost all purposes, of the type X*, i.e., pointer to X, containing the memory address of the first (index-0) element of the array.
- If an array has been allocated on the heap manually, using new, it has to be deallocated using delete[], not delete; using delete would only deallocate the first (index-0) element.
See also: Pointer, queue, wild pointer.
Stack [data structure]
From calendar week 10.
Stack [memory management]
We agreed on 19.2. to add this to the glossary on the content from calendar week 7.
State space
From calendar week 15.
Strong scaling
We agreed on 8.4. to add this to the glossary on the content from calendar week 12.
Synchronization
From calendar week 12.
Trace (Mazurkiewicz trace)
From calendar week 16.
Typing
Definition: Typing is the mechanism by which a data type is assigned to data items.
- Static typing assigns types at compile time, whereas dynamic typing assigns them at runtime. C/C++ uses static typing.
- Explicit typing requires the programmer to specify the data type upon introducing (declaring) a variable; implicit typing does not require this. C/C++ uses explicit typing; however, in modern C++, the keyword auto can be used in certain cases in the place of an explicit data type. Then, the compiler determines the data type.
See also: Class, compilation.
Wild pointer
Definition: A wild pointer is a pointer that unintentionally holds an invalid memory address as its value.
- Most commonly, that invalid value is nullptr, i.e., the memory address 0x0000000000000000. This value is often assigned on purpose, to mark that the pointer does not point at a data item, but in such cases it should never be dereferenced while holding the value nullptr; e.g., it should be protected by an if clause like if(p != nullptr) { … }. Note that if handled correctly, avoiding any dereferencing, a null pointer is not considered a wild pointer.
- Faulty pointer arithmetics can be another cause, e.g., upon dereferencing an array index that is out of bounds.
See also: Pointer, static array.
Referenced literature
Index