Lesson 10.1: Semantic Issues of Variables

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

1/41

encourage image

There's no tags or description

Looks like no tags are added yet.

42 Terms

1
New cards

Variables

abstraction of a computer memory cell or collection of memory cells

2
New cards

Variables

collection of attributes

3
New cards

Names

string of characters used to identify some entity

4
New cards

Identifiers

another name for names

5
New cards

Names

they can be keyword, reserved word, variable name, function name, etc.

6
New cards

Variable Names

most common names in programs are _ _

7
New cards

Address

it is the machine memory address associated with the variable

8
New cards

L Value

another name for address

9
New cards

Multiple Address

one variable may have _ _

10
New cards

Same Address

multiple variable may have access to the _ _

11
New cards

Type

determines the range of values the variable can store

12
New cards

Value

contents of the memory cells associated with the variable

13
New cards

R Value

another name for value

14
New cards

Lifetime

the time during which the variable is bound to a specific memory location

15
New cards

Allocate memory for variable

lifetime, step (1)

16
New cards

Bound memory cells to variable

lifetime, step (2)

17
New cards

Use variable

lifetime, step (3)

18
New cards

Unbound memory cells

lifetime, step (4)

19
New cards

Deallocate memory of the variable

lifetime, step (5)

20
New cards

Scope

range of statement in which the variable is visible

21
New cards

Bindings

association between an attribute and entity

22
New cards

Bindings

the time in which binding takes placed is called binding time

23
New cards

Early Binding

bindings are done during translation

24
New cards

Late Binding

bindings are done during run-time

25
New cards

Efficiency

early binding focuses on

26
New cards

Flexibility

late binding focuses on

27
New cards

Static Binding

bindings that occurs before run-time and does not change

28
New cards

Dynamic Binding

binding are done before/ during run-time and can change during execution

29
New cards

Type Binding

it is the binding of variable to a data type

30
New cards

Data Type Binding

another name for type binding

31
New cards

Declarations

type binding, data types are bound using _

32
New cards

Explicit declaration

the data type is specified in the variable declaration

33
New cards

Implicit declaration

data type is not specified in the declaration but inferred based on literals or some conventions

34
New cards

Type Binding

implicit declaration decreases the reliability of a program since it prevents the compilation process to detect possible type errors

35
New cards

Static Type Binding

the data type is assigned during translation, and does not change during execution

36
New cards

Dynamic Type Binding

variable is bound to a type during execution (and may be rebound)

37
New cards

More flexible

dynamic type binding makes the program _ _ since it allows a variable to change types

38
New cards

Error Detection Capability

_ _ _decreases since types are not checked beforehand

39
New cards

Storage Binding

binding of memory locations to a variable

40
New cards

Allocation

process of taking memory cells from the pool of available memory

41
New cards

Deallocation

process of putting back the unbound memory to the available memory pool

42
New cards

Storage Binding

the lifetime of a variable is defined by when the _ _ occurred