PL sum shit

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

1/9

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 6:43 AM on 4/28/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

10 Terms

1
New cards

Var attrs - Name

not all variables have them

2
New cards

Var attrs - Address

the memory address with which it is

associated

– A variable may have different addresses at different

times during execution

– A variable may have different addresses at different

places in a program

– If two variable names can be used to access the same

memory location, they are called aliases

– Aliases are created via pointers, reference variables, C

and C++ unions

– Aliases are harmful to readability (program

readers must remember all of them)

3
New cards

Var attrs - Type

determines the range of values of
variables and the set of operations that are
defined for values of that type; in the case of
floating point, type also determines the precision

4
New cards

var attrs - Value

the contents of the location with which

the variable is associated

- The l-value of a variable is its address

- The r-value of a variable is its value

5
New cards

Abstract memory cell

the physical cell or

collection of cells associated with a variable

6
New cards

Scope

• The scope of a variable is the range of statements

over which it is visible

• The local variables of a program unit are those that

are declared in that unit

• The nonlocal variables of a program unit are those

that are visible in the unit but not declared there

• Global variables are a special category of nonlocal

variables

• The scope rules of a language determine how

references to names are associated with variables

7
New cards

Subscript Binding and Array Categories - Static

subscript ranges are statically

bound and storage allocation is static

(before run-time)

– Advantage: efficiency (no dynamic allocation)

8
New cards

Subscript Binding and Array Categories - Fixed stack-dynamic

subscript ranges are

statically bound, but the allocation is done

at declaration time

– Advantage: space efficiency

9
New cards

Subscript Binding and Array Categories - Fixed heap-dynamic

similar to fixed

stack-dynamic: storage binding is

dynamic but fixed after allocation (i.e.,

binding is done when requested and

storage is allocated from heap, not stack)

10
New cards

Subscript Binding and Array Categories - Heap-dynamic

binding of subscript

ranges and storage allocation is dynamic

and can change any number of times

– Advantage: flexibility (arrays can grow or

shrink during program execution)