Principles of Programming Languages: Names, Bindings, Scopes, and Data Types

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/39

flashcard set

Earn XP

Description and Tags

Comprehensive vocabulary flashcards covering language design issues, variable attributes, storage allocations, scoping rules, referencing environments, and elementary and structured data types.

40 Terms

1
New cards

Imperative Languages

Programming languages designed as abstractions of the von Neumann architecture, in which memory stores both instructions and data, and processors provide operations to modify memory contents.

2
New cards

Identifier

A name used to denote program entities such as constants, variables, procedures, functions, and types.

3
New cards

Keyword

A special word that has specific syntactic meaning only within certain contexts (for example, Real acting as a type specifier in Fortran declarations but permitted as a variable name elsewhere).

4
New cards

Reserved Word

A special word in a programming language that cannot be redefined or used as a user-defined name.

5
New cards

Variable

An abstraction of a computer memory cell characterized by six fundamental attributes: name, address, value, type, lifetime, and scope.

6
New cards

Anonymous Object

An object created without being bound to an identifier or variable name, typically generated using a constructor call such as new Greeting().

7
New cards

L-value

The memory address associated with a variable.

8
New cards

R-value

The data contents stored in the memory cell associated with a variable.

9
New cards

Variable Type

The attribute that determines the set of values a variable can hold, the operations defined on those values, and their floating-point precision.

10
New cards

Lifetime

The period of execution time during which a variable is bound to a specific memory cell, determined by when it is allocated and deallocated.

11
New cards

Allocation

The process of acquiring an available memory cell from a storage pool and binding it to a variable.

12
New cards

Deallocation

The process of unbinding a memory cell from a variable and returning it to the pool of available storage.

13
New cards

Static Variable

A variable bound to memory cells prior to program execution that remains bound to the identical location until execution terminates.

14
New cards

Stack-Dynamic Variable

A variable whose storage binding is created when its declaration statement is elaborated at runtime, allocated on the execution stack.

15
New cards

Elaboration

The process of executing the executable code associated with a variable declaration statement during program execution.

16
New cards

Scalar

A single data component that holds an individual numerical or string value and corresponds to one data item processed at a time.

17
New cards

Explicit Heap-Dynamic Variable

An anonymous variable allocated and deallocated on the heap via explicit programmer instructions (such as new and delete) and referenced solely via pointers or references.

18
New cards

Implicit Heap-Dynamic Variable

A variable whose memory binding to heap storage occurs automatically upon the execution of an assignment statement.

19
New cards

Scope

The range of program statements over which a variable is visible and accessible.

20
New cards

Local Variable

A variable declared explicitly inside a specific program unit, block, or subprogram.

21
New cards

Nonlocal Variable

A variable that is accessible and visible within a given program unit but was not declared within that unit.

22
New cards

Global Variable

A variable declared outside functions or blocks that is visible and accessible throughout the entire program.

23
New cards

Static Scope

A scope resolution method based entirely on the spatial textual structure of a program, allowing variable bindings to be determined prior to runtime (such as at compile time).

24
New cards

Static Parent

The nearest enclosing static scope surrounding a given program unit or block in static-scoped languages.

25
New cards

Dynamic Scope

A scope resolution method determined at runtime based on the calling sequence of subprograms rather than program text layout.

26
New cards

Referencing Environment

The collection of all identifiers and names that are visible and accessible within a specific executing statement.

27
New cards

Active Subprogram

A subprogram whose execution has commenced but has not yet completed and terminated.

28
New cards

Named Constant

A variable that is permanently bound to a specific value at the same time it is bound to storage.

29
New cards

Manifest Constant

A named constant whose binding of value to storage occurs statically at compile time.

30
New cards

Data Type

A collection of data objects combined with a predefined set of allowable operations that can be performed on those objects.

31
New cards

Ternary Operator

A conditional operator that takes three operands using the syntax OP1 ? OP2 : OP3, acting as an inline shorthand for an if-else decision.

32
New cards

Complex Number

A numerical value represented as a+bia + bi, where aa is the real part, bibi is the imaginary part, and i2=−1i^2 = -1.

33
New cards

Rational Number

A numeric value represented as an exact fraction ab\frac{a}{b}, where aa and bb are integers and b≠0b \neq 0, preventing rounding inaccuracies.

34
New cards

Vector

A one-dimensional, dynamically resizable container of homogeneous elements that stores items in contiguous memory and adjusts its size automatically.

35
New cards

Array

A homogeneous collection of a fixed number of elements in which each element is addressed by an explicit index or subscript representing its position relative to the start.

36
New cards

Row-Major Order

A multidimensional array storage arrangement where matrix elements are stored consecutively row by row in memory.

37
New cards

Column-Major Order

A multidimensional array storage arrangement where matrix elements are stored consecutively column by column in memory.

38
New cards

Record

A structured data type that aggregates components or fields of potentially differing data types under a single identifier, accessed via dot notation.

39
New cards

List

An ordered sequence of items commonly delimited with brackets and commas, capable of dynamic resizing and often supporting heterogeneous element types.

40
New cards

Pointer

A variable that stores the physical memory address of another variable rather than storing a direct data value.