CSE 3302 Exam 3 Chapter 7 Slides

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/98

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

99 Terms

1
New cards

Syntax

What the language constructs look like

2
New cards

Semantics

What the language constructs actually do; expected behavior

3
New cards

Language Reference Manual

Common way to specify semantics using natural language, often imprecise

4
New cards

Translator Definition

Specifies semantics by implementing a compiler or interpreter

5
New cards

Formal Definition

Uses mathematical methods to precisely define semantics

6
New cards

Denotational Semantics

Formal method describing program behavior using functions

7
New cards

Name (Identifier)

Symbolic label for a language entity or construct

8
New cards

Value

Storable quantity associated with a name

9
New cards

Location

Memory address where a value is stored

10
New cards

Attribute

Property that determines the meaning of a name (e.g., type, value)

11
New cards

Binding

Process of associating an attribute with a name

12
New cards

Binding Time

Moment when a binding occurs

13
New cards

Static Binding

Binding that occurs before execution

14
New cards

Dynamic Binding

Binding that occurs during execution

15
New cards

Static Attribute

Attribute bound statically

16
New cards

Dynamic Attribute

Attribute bound dynamically

17
New cards

Predefined Identifier

Name defined by the language itself (e.g., true, false)

18
New cards

Symbol Table

Data structure mapping names to attributes

19
New cards

Lexical Analysis

Determines if a character string is a valid token

20
New cards

Syntax Analysis

Checks if a sequence of tokens forms a valid phrase

21
New cards

Static Semantic Analysis

Ensures names conform to their declared attributes

22
New cards

Declaration

Statement that introduces a name and binds attributes

23
New cards

Definition

Declaration that binds all potential attributes

24
New cards

Prototype

Function declaration specifying type but not implementation

25
New cards

Block

Sequence of declarations followed by statements

26
New cards

Compound Statement

Block used as a single statement (e.g., in C)

27
New cards

Local Declaration

Declaration within a block

28
New cards

Nonlocal Declaration

Declaration from an enclosing block

29
New cards

Lexical Address

Pair of level number and offset identifying a name

30
New cards

Scope

Region of a program where a binding is valid

31
New cards

Lexical Scope

Scope determined by block structure

32
New cards

Declaration-Before-Use Rule

In C, a name's scope starts at its declaration

33
New cards

Scope Hole

Region where a global name is shadowed by a local one

34
New cards

Shadowing

Local declaration hides a nonlocal one

35
New cards

Visibility

Region where a name's binding is accessible

36
New cards

Insertion

Adding a name and its attributes to the symbol table

37
New cards

Lookup

Retrieving attributes for a name from the symbol table

38
New cards

Deletion

Removing a name's binding from the symbol table

39
New cards

Static Scoping

Bindings determined at compile time

40
New cards

Dynamic Scoping

Bindings determined at runtime

41
New cards

Overloading

Using the same name for multiple functions or operators

42
New cards

Overload Resolution

Choosing the correct function based on context

43
New cards

Calling Context

Information used to resolve overloaded functions

44
New cards

Operator Overloading

Defining multiple meanings for built-in operators

45
New cards

Function Overloading

Defining multiple functions with the same name but different parameters

46
New cards

Environment

Maps names to locations

47
New cards

Static Allocation

Memory assigned at load time

48
New cards

Dynamic Allocation

Memory assigned during execution

49
New cards

Activation

A function call

50
New cards

Activation Record

Memory allocated for a function call

51
New cards

Lifetime (Extent)

Duration an object exists in memory

52
New cards

Pointer

Variable storing the address of another object

53
New cards

Heap

Memory area for dynamic allocation

54
New cards

Storage Class

Type of allocation (static, automatic, dynamic)

55
New cards

Variable

Object whose value can change during execution

56
New cards

Assignment Statement

Updates a variable's value

57
New cards

L-Value

Refers to a variable's location

58
New cards

R-Value

Refers to a variable's value

59
New cards

Assignment by Sharing

Copies location, not value

60
New cards

Assignment by Cloning

Copies value into a new location

61
New cards

Value Semantics

Standard assignment behavior

62
New cards

Reference Semantics

Assignment using shared locations (pointers)

63
New cards

Constant

Entity with a fixed value

64
New cards

Literal

Direct representation of a value (e.g., 42, 'a')

65
New cards

Manifest Constant

Named literal

66
New cards

Compile-Time Constant

Value known at compile time

67
New cards

Static Constant

Value known at load time

68
New cards

Dynamic Constant

Value computed during execution

69
New cards

Alias

Two names bound to the same object

70
New cards

Side Effect

Change in state that persists beyond a statement

71
New cards

Dangling Reference

Pointer to a deallocated object

72
New cards

Garbage

Allocated memory that is no longer accessible

73
New cards

Garbage Collection

Automatic reclamation of unused memory

74
New cards

Struct

User-defined type containing fields with their own declarations

75
New cards

Struct Symbol Table

Local symbol table embedded in a struct

76
New cards

Scope Resolution Operator (

:): Used in C++ to access global variables shadowed by locals

77
New cards

Named Scope

A scoping unit with its own symbol table (e.g., Ada packages, C++ namespaces)

78
New cards

Symbol Table Stack

Layered structure of symbol tables for nested scopes

79
New cards

Search Path

Order in which symbol tables are searched for a name

80
New cards

Overloaded Name

Same name used for different constructs (e.g., type, function, variable)

81
New cards

Automatic Conversion

Implicit type conversion during overload resolution

82
New cards

Semantic Difference

Difference in meaning; operators and functions have none, only syntactic difference

83
New cards

Struct Field Access

Using dot notation to access fields within a struct

84
New cards

Struct Deletion

Struct's symbol table deleted only when the struct itself is deleted

85
New cards

Recursive Declaration

Declaration that refers to itself (e.g., recursive functions)

86
New cards

Scope of Function Name

Must begin before the function body to allow recursion

87
New cards

Dynamic Scope Output

Output affected by runtime bindings

88
New cards

Lexical Scope Output

Output determined by static bindings

89
New cards

Symbol Table Complexity

Increases with dynamic scoping and nested structures

90
New cards

Interpreter Environment

Runtime structure for managing dynamic bindings

91
New cards

Class/Package/Module

Scoping units in object-oriented and modular languages

92
New cards

Ada Scope

Named block with its own symbol table

93
New cards

Java Overloading

Allows same name for type, function, and variable

94
New cards

C++ Operator Overloading

Allows built-in operators to be overloaded with fixed syntax rules

95
New cards

Function Call Ambiguity

Occurs when multiple overloads could match a call

96
New cards

Return Type Resolution

Used in Ada but ignored in C++ and Java

97
New cards

Dot Member Notation

Syntax for accessing struct fields

98
New cards

Execution Path

Determines bindings in dynamic scoping

99
New cards

Symbol Table Search

Begins in current scope and continues outward until name is found