CS 424 Exam 2


Terms in this set (...)

data type
defines a collection of values and a set of predefined operations on those values
data structure
any implementation of a dictionary, declared name is the key
each time a scope is entered, push a new dictionary onto the stack
each time a scope is exited, pop a dictionary off the top of the stack
for each name declared, generate an appropriate binding and enter the name-
binding pair into the dictionary on the top of the stack
given a name reference, search the dictionary on top of the stack
if found, return the binding
repeat process on the next dictionary down in the stack
if name is not found, report an error
an association between an entity (such as a variable) and a property (such as its
value); static if the association occurs before run-time and dynamic if the
association occurs at run-time.
Heterogeneous array
an array in which one of the elements need not be of the same type
Rectangular array
a multi-dimensioned array in which all of the rows have the same number of elements and all columns have the same number of elements.
Jagged Matrix
has rows of varying number of elements; possible when multi-dimensioned array actually appear as arrays of arrays
some substructure of an array; nothing more than a referencing mechanism
Descriptor or Dope Vector
a block of information is constructed for each array during compilation; Information may include array element type,
array element size; Index type for each dimension, index range or size for each dimension, address of the first element in the array; may exist only at compile time or partially at run-time depending on language
a node whose reference count (RC) becomes 0, or any of its descendants (in the chain) whose RC becomes 0 as a result of a delete operation
type error
any error that arises because an operation is attempted on a data type for which it is undefined
type checking
the activity of ensuring that the operands of an operator are of compatible types
compatible types
one that is either legal for the operator, or is allowed under language rules to be implicitly converted, by compiler-generated code, to a legal type
an implicit type conversion
type system
provides a basis for detecting type errors; a precise definition of the bindings between the type of a variable, its values, and the possible operations on those values.
name equivalence
two types are the same if they have the same name
structural equivalence
two types are the same if they have the same structure
fundamental means of specifying computations in a programming language
operator precedence rules
define the order in which "adjacent" operators of different precedence levels are evaluated
operator associativity rules
define the order in which adjacent operators with the same precedence level are evaluated.
infix notation
each binary operator is written between its operands
Polish notation
used to eliminate semantic ambiguity
Polish prefix notation
a binary operator is always written in front of its operands
Polish postfix notation
a binary operator is always written after its operands
prefix walk
preorder traversal
postfix walk
postorder traversal
Cambridge prefix notation
an operator always precedes its operands and the entire expression is enclosed in parenthesis
functional side effect
a side effect of a function occurs when the function changes either one of its parameters or a global variable
side effect
when a procedure changes a variable from outside its scope.
referential transparency
a program has this property if any two expressions in the program that have the same value can be substituted for one another anywhere in the program, without affecting the action of the program
operator overloading
use of an operator for more than one purpose
type conversion
results in a different bit pattern to represent the value in a different type
narrowing conversion
one that converts an object to a type that cannot include all of the values of the original type
widening conversion
one in which an object is converted to a type that can include at least approximations to all the values of the original type
mixed-mode expression
one that has operands of different types
selection statement
provides the means of choosing between two or more paths of execution
Row-major order
individual elements are stored in contiguous memory locations, one row at a time
Column-major order
all the elements of the first column are stored in contiguous memory locations, then all the elements of the second column, etc
Associative Array
an unordered collection of data elements that are indexed by an equal number of values called keys
a subprogram that has multiple entries and controls them itself
overloaded subprogram
one that has the same name as another subprogram in the same referencing environment
Subprogram definition
describes the interface to and the actions of the subprogram abstraction
Subprogram call
an explicit request that the subprogram be executed
Subprogram header
the first part of the definition, including the name, the kind of subprogram, and the formal parameters
Parameter profile (signature)
the number, order and types of its parameters
a subprogram's parameter profile and, if it is a function, its return type
Subprogram declaration (prototype)
provides the protocol, but not the body, of the program; functional declarations in C and C++ are often called prototypes
formal parameter
a variable listed in the subprogram header and used in the subprogram
actual parameter
represents a value or address used in the subprogram call statement
multiple-way selection statements
allow the selection of one of any number of statements or statement groups