22. Glossary

This page collects the technical terminology used throughout the Gazprea specification. Its purpose is threefold: to fix the meaning of the words we use so that the specification is self-consistent, to point the reader at the authoritative literature behind each term, and to give students a jumping-off point when they need or want to specify a language or compiler task of their own.

Most entries below have a primary citation to an authoritative source: an ISO/IEC or IEEE standard, the documentation of an ongoing industrial open-source project (LLVM, GCC, GNU Binutils), or a peer-reviewed publication in a respected venue. The Gazprea-specific normative entries (for example zero value and value type) instead cite the specification chapter that states the rule in full. Where a term has a widely-used effective reference (e.g. cppreference for the C++ value categories), that reference appears alongside the authoritative citation and is explicitly labeled as non-normative.

Note

Most entries here are definitions of terminology. Where Gazprea re-uses a word from another language (for instance type qualifier, which C reserves for const/volatile/restrict/_Atomic but Gazprea uses for the mutability distinction const/var), the glossary explains the source of the word and points to the Gazprea chapter that gives its language-specific meaning.

A few entries, however, do state normative Gazprea rules – notably zero value, initialization, re-initialization, domain, and value type. These definitions are normative wherever it appears, and each is cross-referenced to the chapter that states it in full.

22.1. Terms

aggregate type

A type composed of subordinate members of possibly-different types. In ISO C the term denotes array and structure types collectively [2]. In Gazprea the aggregate types are arrays, matrices, vectors, tuples, and structs; see Types.

Terminology note. Ada calls this umbrella category composite type rather than aggregate type [1]. ISO C also defines composite type but with an unrelated meaning: the merged type produced from two compatible declarations of the same entity, not a category of types [2]. Because “composite” is a false friend between the two standards, Gazprea follows the C/C++ convention and uses aggregate type as the umbrella term.

assembler

A program that translates assembly language into relocatable machine code [15]. In the LLVM toolchain the assembler role is played by the MC layer and the llvm-mc driver [10].

compile time

The interval during which the source program is being translated by the compiler, before program execution begins. The contrast with run time matters for sizing in Gazprea: an array’s size need not be fixed at compile time, only at initialization, which is a run-time instant. The C standard specifies the phases of translation in ISO/IEC 9899 §5.1.1.2 [2].

compiler

A program that reads a source program in one language and produces an equivalent program in a target language [15]. GCC and LLVM/Clang are two production compilers whose internal architectures follow the classical front-end / middle-end / back-end division [6] [7].

Compiler subtypes. The default definition of a compiler is one thats target is machine code executable by a CPU. Two marked variants are recognized:

  • A source-to-source translator compiles from one high-level language to another high-level language [15]. The informal term transpiler is sometimes used for the same concept. The first attempt at a peer-reviewed generic definition appears in a 2023 mapping review [20]. Prefer source-to-source translator.

  • A cross-compiler runs on one host platform and emits code for a different target platform (CPU or operating system) [11] [12]. Cross-compilation is orthogonal to whether the target language is machine code or another high-level language.

constant expression

An expression that a conforming implementation is required to be able to evaluate during translation. In C++, “expressions that satisfy these requirements … are called constant expressions” [3]. See Constant Expressions for Gazprea’s specific rules; note that in Gazprea the noun is often abbreviated constexpr, which is not a keyword.

cross-compiler

A compiler that runs on one host platform (CPU + operating system) and produces code for a different target platform. Clang is designed as a native cross-compiler in which one binary can target every supported architecture via a -target flag [11]; GCC by contrast requires a separately-built host/target binary pair [12].

declaration

A construct that specifies the interpretation and attributes of a set of identifiers [2]. A declaration in Gazprea has the form defined in Declarations.

definition

A declaration that additionally causes storage to be reserved for an object, or that supplies the body of a function or procedure [2]. The C++ grammar production and definitional requirements are given in [basic.def] [3]; Gazprea does not adopt C++’s one-definition rule, so the citation is informational only.

domain

In a Gazprea iterator loop or domain expression, the array-typed operand to the right of in. The domain is evaluated exactly once, at initialization; the resulting value is captured for the lifetime of the loop, and subsequent modifications to any variable that appeared in the domain expression do not affect the domain variable. In general PL usage the analogous notion is the range of a range-based loop (C++ for (x : R) [3]), archaically called the iteration scheme of an Ada for loop [1].

domain expression

The whole Gazprea construct x in E used inside an iterator loop or generator: the iterator variable x bound over the domain E. Domain expressions can only appear inside iterator loops and generators.

dynamic

Determined or known at run time. Used as the antonym of static. ISO/IEC 9899 §6.2.4 uses “dynamic” implicitly by contrasting static storage duration with automatic and allocated storage durations whose extents are established during execution [2].

explicit cast

A conversion the programmer writes out explicitly in the program text with the as<toType>(value) syntax, as opposed to an implicit cast, which the compiler inserts automatically. Both are casts; the explicit form is specified in Type Casting.

expression

“A sequence of operators and operands that specifies a computation. An expression can result in a value and can cause side effects” [3]. The syntactic shape of expressions in Gazprea is defined in Expressions. Note that in gazprea an expression is functionally pure.

functional purity

An informal property of a language, expression, or function: the absence of observable side effects. There is no ISO definition; the standard academic reference is Strachey’s characterization of referential transparency [21]. Gazprea invokes functional purity as the motivation for forbidding mutable globals and for the input-only nature of function arguments.

Once again, consult with a Haskell programmer.

glvalue

A “generalized” lvalue: “an expression whose evaluation determines the identity of an object, function, non-static data member, or a direct base class relationship” [3]. One of the three C++11 value categories (together with prvalue and xvalue). See the non-normative summary at [24] for an accessible introduction. Note that gazprea does not contain glvalues, this is for extended reading.

identifier

“A sequence of nondigit characters … and digits, which designates one or more entities” [2]. Gazprea’s lexical rules for identifiers are in Identifiers.

ill-formed

A program is ill-formed if it is not well-formed [4]. A conforming implementation is required to issue a diagnostic for at least one violation of a diagnosable rule in an ill-formed program.

implementation-defined behavior

“Unspecified behavior where each implementation documents how the choice is made” [2]. Distinct from unspecified behavior (no documentation obligation) and undefined behavior (no requirements at all).

Gazprea policy. A conforming Gazprea implementation must not have any user-distinguishable implementation-defined behavior or unspecified behavior, and has no undefined behavior at all. Every program is either well-formed and produces the output required by this specification, or it is ill-formed and the implementation emits an error.

implicit cast

A conversion the compiler performs automatically, with no syntax in the program text. In Gazprea, “cast” is the umbrella term for both implicit casts and the explicit casts written as<toType>(value); an implicit cast is simply the automatic counterpart (e.g. integer -> real when arithmetic mixes them). The mechanism is specified in Implicit Casts. Most implicit casts can also be written explicitly as an as<> cast; a scalar-to-array explicit cast must then state the destination size (see Scalar to Array).

implicit conversion

An automatic conversion inserted by the language, without a cast, to make an operand’s type match a required target type. ISO C collects the rules under §6.3 “Conversions” [2].

Gazprea uses this general term only in the glossary. In the Gazprea specification proper the analogous mechanism is called an implicit cast, described in Implicit Casts.

initialization

The run time instant at which a variable’s declaration first executes. A declaration is surrounded by two program points such that any control path reaching the first point (preceding the declaration) must pass through the second point [15]; at run time control reaches the point preceding the declaration along some control-flow path, and may reach it more than once. For example, a declaration in a loop body, or one on a branch of a conditional, is reached once per time control flows through it.

A variable is initialized on the first transit of control through the path between the two points enclosing the declaration. Each subsequent execution of the same declaration begins a fresh lifetime rather than mutating the previous one (see re-initialization).

A variable’s array and matrix dimensions are settled exactly once, at initialization, and are then fixed for the remainder of that variable’s lifetime: an array is sized once and can never be resized. A size may be any integer expression. It need not be a compile time constant, but it is evaluated a single time, at the first execution of the declaration, and later changes to that expression’s inputs do not affect the array. (Ada draws a similar once-only distinction termed elaboration; Gazprea keeps a single definition of a variable’s size and calls the instant it happens initialization.)

initializer

The syntactic element that supplies an initial value to a newly declared object. In C++ the grammar is given in [dcl.init.general] [3]. Gazprea’s initializer positions and rules are covered in Declarations.

interpreter

A program that does not produce a target program, but “appears to directly execute the operations specified in the source program on inputs supplied by the user” [15]. Contrast with compiler and translator.

iterator

A cursor that yields the elements of a collection one at a time, in a defined order. The concept is standard across modern language families: Python defines it operationally through the iterator protocol (__iter__ / __next__) [19]; C++ defines iterators as generalized pointers into a range, with the requirements collected in [iterator.requirements] [3]. In Gazprea the word is used informally for the mechanism that a iterator loop uses to walk its domain; the visible binding is the iterator variable.

iterator variable

In a Gazprea iterator loop or domain expression, the identifier to the left of in. A fresh binding is introduced at the start of every iteration (see re-initialization) and destroyed at the end of that iteration. In other languages the equivalent binding is Ada’s loop parameter [1] and C++’s for-range-declaration [3].

lifetime

“The portion of program execution during which storage is guaranteed to be reserved” for an object. “An object exists, has a constant address, and retains its last-stored value throughout its lifetime” [2].

Rust makes lifetime a first-class object of the type system such that every reference carries a compile-time lifetime parameter that the borrow-checker uses to prove memory safety without a garbage collector. The Rust Reference chapter on lifetimes [13] and the Rustonomicon chapter on references [14] together give the most operationally-precise treatment of the concept in a production language.

The interval during which the linker runs, after translation of each translation unit and before program execution. ISO C describes this as translation phase 8 [2]. Link-time optimization (LTO), performed at this point, is documented for the LLVM toolchain in [9].

linker

A program that combines separately-translated translation units into a single executable, resolving external references between them. The GNU ld documentation gives the canonical operational description [5]. See also link time.

literal

A token whose value is the token itself: integer, floating-point, character, string, boolean, and (in C++) pointer literals [3]. Contrast a literal with a constant expression, which may be composed of literals and other operators.

lvalue

“An expression (with an object type other than void) that potentially designates an object” [2]. C++ defines an lvalue as “a glvalue that is not an xvalue[3]. The historical origin of the “l-value” and “r-value” terminology is Strachey’s 1967 lectures, published as [21]. See the non-normative summary [24] for a modern taxonomy.

name binding

The association of an identifier with an entity (an object, function, type, etc.) within a scope. ISO C uses the operational phrase “the declaration … is visible at the point the identifier occurs” [2] rather than the term “binding”. The academic origin of “binding” as the association of names with denotable values in an environment is Strachey [21].

object

“A region of data storage in the execution environment, the contents of which can represent values” [2]. In this glossary the word always refers to the run-time storage-region entity, in the ISO C sense.

Gazprea note. Gazprea is not an object-oriented language. It has no user-defined classes, no inheritance, and no virtual dispatch. Gazprea uses object oriented terminology to describe aggregates, particularly the vector type, which exposes methods (push, len, append) via dot syntax. Those are built-in operations on the vector’s storage-region object, not a user-facing object-model feature; when a Gazprea sentence says “object” it always means the storage region, never a vector-as-instance-of-a-class.

primitive type

A type provided directly by the language and not composed of other types. The LLVM Language Reference distinguishes primitive types (i32, floating-point types, void, etc.) from derived and aggregate types [7]. In Gazprea the primitive types are boolean, integer, real, and character. See also scalar type, ISO C’s term for the same four Gazprea types.

prvalue

A “pure r-value”: “an expression whose evaluation initializes an object or computes the value of an operand of an operator … or an expression that has type cv void” [3]. One of the three C++11 value categories. See the non-normative summary at [24] for an accessible introduction.

pure function

See functional purity.

re-declaration

A second (or nth) declaration of the same identifier within a given scope. In Gazprea a re-declaration always introduces a fresh binding that shadows the enclosing binding for the remainder of the scope; it does not modify the original. The general PL concept is scope shadowing [17].

Re-declarations arise in every scope, not only iterator loops. The specific case where a re-declaration inside an iterator loop body shadows the iterator variable is called out under re-initialization: the shadow lives for one iteration only, and the next iteration re-initializes the iterator variable normally.

re-initialization

In a Gazprea iterator loop, the binding, performed at the start of every iteration, of the iterator variable to the next element of the captured domain. Because re-initialization introduces a fresh binding from the captured domain, neither reassignment of the loop domain expression nor mutation of the iterator variable inside the body carries information into the next iteration.

referential transparency

The property that an expression’s value depends only on the values of its subexpressions, so that any subexpression may be replaced by an equal-valued subexpression without changing the whole [21]. The term is due to Quine [18].

Gazprea guarantees referential transparency only for pure functions (see Functions) and for expressions built exclusively out of them. It is not guaranteed for procedures, which may have side effects and whose return value can therefore change between calls with the same arguments; nor for any expression that transitively depends on a procedure call. This is why Gazprea forbids calling procedures inside functions (aside from a mutating vector/string method such as push/append on a function-local variable; see Functions), forbids mutable globals, and restricts the operators that may combine a procedure call’s return value (see Procedures).

run time

The interval during which the program is executing, after translation and link time are complete. Ada defines the corresponding process, execution, as “the process by which a construct achieves its run-time effect” [1].

rvalue

C++ defines an rvalue as “a prvalue or an xvalue[3]. In C the term is used informally as the complement of lvalue. Historical origin: Strachey [21]. See the non-normative summary at [24] for the modern C++ taxonomy.

scalar type

A type whose values are atomic in the sense that they are not composed of sub-elements. ISO C: “Arithmetic types and pointer types are collectively called scalar types” [2]. Ada groups enumeration, integer, and real types as scalar [1]. In Gazprea the scalar types are boolean, integer, real, and character. See also primitive type, the LLVM-derived term for the same four Gazprea types.

scope

“The region of program text within which [an] identifier is visible” [2]. ISO C distinguishes four kinds of scope: function, file, block, and function prototype. Gazprea’s scope rules are described in Declarations and Namespaces.

sequenced before

“An asymmetric, transitive, pair-wise relation between evaluations executed by a single thread … if A is sequenced before B (or, equivalently, B is sequenced after A), then the execution of A shall precede the execution of B” [3]. The relation supplants the older ISO C sequence point model for describing the ordering of side effects.

side effect

“Reading an object designated by a volatile glvalue, modifying an object, … calling a library I/O function, or calling a function that does any of those operations” – any “change in the state of the execution or translation environment” [3]. ISO C gives an equivalent enumeration [2].

source-to-source translator

A compiler that translates from one high-level language into another high-level language rather than into machine code [15]. The informal industry term transpiler denotes the same concept; see the note in compiler.

statement

A syntactic construct whose primary role is to be executed for its effect rather than to compute a value. The C++ grammar enumerates the kinds of statement in [stmt.pre] [3]. Gazprea’s statements are covered in Statements.

static

Determined or known at compile time. Ada gives a nice definition: “Static means determinable at compile time, using the declared properties or values of the program entities” [1]. Contrast with dynamic.

storage duration

The property of an object that determines its lifetime. ISO C defines four storage durations: static, thread, automatic, and allocated [2].

translation

The act of processing a source program to produce a target program. ISO C notes that “translation units may be separately translated and then later linked to produce an executable program” [2]. Distinct from compile time, which refers to when translation happens.

translation unit

“The unit of program text after preprocessing … consist[ing] of a sequence of external declarations” [2]. In Gazprea each .gaz source file corresponds to one translation unit.

translator

A generic term for a program that reads a source program and writes an equivalent program in a different language; a compiler, assembler, and source-to-source converter are all translators [15].

type

A characterization of a set of values together with a set of operations on those values [1] [17]. Gazprea’s types are enumerated in Types.

type casting

Explicit conversion of a value from one type to another, invoked by an explicit syntactic form. ISO C’s cast operator is defined in §6.5.4 [2]. Gazprea’s casting rules are covered in Type Casting.

type inference

The compile-time reconstruction of a type that has been omitted from a program. Milner’s polymorphic type inference (algorithm W), and the accompanying soundness result, is the foundational academic reference [16]. Gazprea’s type inference is described in Type Inference.

type qualifier

In ISO C the term refers to the cv-qualifiers const, restrict, volatile, and _Atomic, defined in §6.7.3 [2]. Gazprea re-uses the phrase for the mutability qualifiers const and var (see Type Qualifiers).

type system

A tractable syntactic method for classifying phrases of a language by the kinds of values they compute [17]. Type systems are traditionally divided into static systems (checking performed before execution) and dynamic systems (checking performed during execution); see Pierce, Chapter 1 [17].

Further reading (for the curious student). The deep connection between type systems and formal logic is the Curry-Howard correspondence. Wadler’s ACM lecture “Propositions as Types” [22] is a short, entry-level survey; Sørensen and Urzyczyn’s book-length Lectures on the Curry-Howard Isomorphism [23] is the standard textbook. These are not required reading for Gazprea, but students designing their own type systems in future courses may encounter them.

undefined behavior

“Behavior … for which this document imposes no requirements” [2]. A program exhibiting undefined behavior at run time is not obliged to signal an error, terminate, or produce any particular output. Contrast unspecified behavior and implementation-defined behavior. Gazprea has no undefined behavior at all: every program is either well-formed and produces the specified output, or it is ill-formed and the implementation emits an error.

unspecified behavior

“Use of an unspecified value, or other behavior where this document provides two or more possibilities and imposes no further requirements on which is chosen in any instance” [2]. Gazprea should not have _any_ unspecified behaviour. If you find any unspecified behaviour, please open an issue on the public github, as this is a specification error.

value category

“Every expression belongs to exactly one of the fundamental categories in [the C++] taxonomy: lvalue, xvalue, or prvalue. This property of an expression is called its value category” [3]. A non-normative overview lives at [24].

value type

A type whose values are stored inline, by value, rather than through indirection. In Gazprea every aggregate type except vector behaves as though it is a value type. Due to value-type behaviour requiring a value to be materializable, nesting of aggregate type definitions must be acyclic through value types, so a struct or tuple may refer to its own type only through a vector (see Storable Types, Nesting, and Recursion).

terialization “Materialization is the blanket term for any actions that are required […] to generate a symbol definition that is safe to call or access.” [8] .

well-formed

“C++ program constructed according to the syntax rules, diagnosable semantic rules, and the one-definition rule” [4]. Gazprea uses “well-formed” throughout in this generalized sense: a Gazprea program is well-formed if it satisfies every diagnosable rule stated in this specification.

xvalue

An “expiring” value: “a glvalue that denotes an object whose resources can be reused (usually because it is near the end of its lifetime)” [3]. One of the three C++11 value categories. See the non-normative summary at [24] for an accessible introduction.

zero value

The value a variable of a given type holds when it is declared without an initializer. It is 0 for integer, 0.0 for real, false for boolean, and '\0' (the null character) for character. For a fixed-size array or matrix it is that shape filled with the element type’s zero value; for a tuple or struct, each member set to its own zero value; for a vector or string, the empty collection. A const variable declared without an initializer keeps its zero value for its entire lifetime; a shorter array value stored into a longer array is padded with the element type’s zero value. This rule is stated normatively, in the context of Gazprea’s RAII-style initialization, in Declarations.

22.2. Authoritative sources

The primary citations for the entries above are listed here.

Standards

Industrial and open-source documentation

Peer-reviewed and textbook literature

Effective (non-normative) references

22.3. On writing glossaries

The structure of this page follows established documentation practice. The Diataxis framework classifies a glossary as reference documentation, whose job is to describe – accurately, austerely, and without narrative – the technical vocabulary of a system [25]. The Write the Docs community guide reiterates the constraint that reference material should be optimized for lookup rather than for narrative reading [26]. Guidance on the craft of glossary-writing itself is summarized by Lester at The Word Factory [27]. ISO/IEC/IEEE 26514:2022 gives the formal standards-track requirements for user documentation, including terminology sections [28].