• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/97

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

97 Cards in this Set

  • Front
  • Back
The activity of ensuring that the the operands of an operator are of compatible types
type checking
The range of statements in which the variable is visible
scope
A variable that can be referenced in that statement
visible
The method of binding names to nonlocal variables
static scoping
When the scope can only be determined at runtime
dynamic scoping
The collection of all variables that are visible in the statement
referencing environment
A variable that is bound to a value only once
named constant
Named constants in languages that use static binding of values
manifest constant
A collection of data values and a set of predefined operations on those values
data types
The collection of the attributes of a variable
descriptor
The most common primitive numeric data type
integer
Data types that are not defined in terms of other types
primitive data type
The simplest of all data types
boolean
A type in which the variables have a wide range of values that consist of memory addresses and a special value, nil
pointer
When a pointer can be used to access a location in the area where storage is dynamically allocated
heap
Variables that are no longer accessible to the user program.
garbage
This type refers to an object or value in memory
reference
Name several proposed solutions to the dangling-pointer problem
tombstone, locks-and-keys
the range of statements over which it is visible
variable scope
define implicit heap-dynamic and list the advantages and disadvantages of both
-allocation and deallocation caused by assignment statements
-advantages:flexibility
-disadvantages: inefficient bc all attributes are dynamic; loss of error detection
define explicit-heap-dynamic variables and list the advantages and disadvantages of each
-allocated and deallocated by explicit directives, specified by the programmer, which take effect during execution
-advantages:provides for dynamic storage management
-disadvantaged:inefficient and unreliable
the range of statements over which it is visible
variable scope
define implicit heap-dynamic and list the advantages and disadvantages of both
-allocation and deallocation caused by assignment statements
-advantages:flexibility
-disadvantages: inefficient bc all attributes are dynamic; loss of error detection
define explicit-heap-dynamic variables and list the advantages and disadvantages of each
-allocated and deallocated by explicit directives, specified by the programmer, which take effect during execution
-advantages:provides for dynamic storage management
-disadvantaged:inefficient and unreliable
name several proposed solutions to the dangling pointer problem
tombstones, locks and keys
a type in which the variables have a wide range of values that consists of memory addresses and a special value, nil
pointer
named constants in languages that use static binding of value
manifest constants
a pointer that contains the address of a heap-dynamic variable that has been deallocated
dangling pointer
activity of ensuring that the operands of an operator are of compatible types
type checking
when the memory cell to which a variable is bound somehow must be taken from a pool of available memory
allocation
time during which the variable is bound to a specific memory location
lifetime
an abstraction of a memory cell
variable
name the six attributes of a variable
-name
-address
-value
-type
-lifetime
-scope
what is the l-value, and the r-value of a variable
the l-value is its address and the r-value it its value
an association such as between an attribute and an entity or between an operation and a symbol
binding
the time at which binding takes place
binding time
a type of binding that occurs before run time and remains unchanged throughout program execution
static binding
first occurs during execution or can change during execution of a program
dynamic binding
after language design and implementation, what are the four time bindings that can take place in a program
-compile time
-lead time
-link time
-run time
what are the design issues for names
-case sensitivity
-special words
-reserved words
-keywords
what is the potential danger of case sensitive names
-violates the design principle that language constructs that look similar should have similar meanings
In what ways are reserved words better than keywords
-the ability to redefine keywords can be confusing
which category of C++ reference variables is always aliases
pointers
when more than one variable can be used to access the same memory location
alias
a special word of a programming language that cannot be used as a name
reserved word
a word of a programming language that is special only in certain contexts
keywords
name the primitive data types
-int
-float
-complex
-decimal
-boolean
-character
those not defined in terms of other data types
primitive data type
represents an instance of a user-defined (abstract data) type
object
what are the main design issues for all data types
-what operations are defined
-how are they specified
a collection of data objects and a set of predefined operations on those objects
data types
the collection of the attributes of a variable
descriptor
the contents of the memory cell or cells associated with the variable
variable value
determines the range of values the variable can store and the set of operations that are defined for values of the type
variable type
a variable that is bound to a value only when it is bound to storage
named constant
what is the advantage of a named constant
-readability & modifiability
-used to parameterize programs
what are the advantages and disadvantages of dynamic scoping
-advantage:convenience
-disadvantage:while in a subprogram is executing, its variables are visible to all subprograms it calls; impossible to statically type check; poor readability bc it is not possible to determine the type of the variable
what are the advantages and disadvantages of static scoping
-advantage: works well with many situations
-disadvantage: too much access is possible as a program evolves, the initial structure is destroyed and local variables often become global; subprograms also gravitate toward becoming global rather than nested
in this language a global variable can be assigned a function only if it has been declared to be global in a function
python
in this language global variables can be accessed in a function through the $GLOBALS array or by declaring it global
PHP
in these languages a declaration outside a function definition specifies that it is defined in another file
C, C++
these languages allow variable declarations to appear outside function definitions
C, C++, PHP, Python
distinguish between a lexer and a parser
-a lexer is a low-level part called a lexical analyzer that matches patterns for character strings
-a parser is a high-level part (syntax analyzer) that finds all syntax errors and produces the parse tree
describes the meaning of a statement or program by giving the effects of running it on a machine
operational semantics
uses functions to map language to meaning
denotational semantics
this is based on mathematical logic and is the most abstract, states what can be proven about the program
axiomatic semantics
most commonly used coding for characters that was ____ code
8-bit ascii
currently a code called ______ with 16-bits is often used
unicode
what is the difference between syntax and semantics
-syntax is the form of its expressions,statement, and program units
-semantics are the meanings of those expressions, statements, and program units
what does PERL stand for
practical extraction and report language
what is the first high level programming language
FORTRAN
the collection of all names that are visible in the statement
referencing environment
based on the calling sequence of subprograms and can only be determined at run time
dynamic scope
define static variable and list the advantages and disadvantages of each
-is bound to a memory cell before execution begins and remains bound to the same memory cell throughout execution
-advantages: efficiency and history sensitive subprogram support
-disadvantage: lack of flexibility (no recursion)
define stack-dynamic variable and list the advantages and disadvantages
-when storage bindings are created for variables when their declarations statements are elaborated (when the executable code associated with it is executed)
-advantage:allows recursion, conserves storage
-disadvantage:overhead of allocation and deallocation
when the scope of a variable can be statically determined prior to program execution
static scope
the time during which the variable is bound to a specific memory location
lifetime
variables that are visible but are not declared there
nonlocal variables
who created Scheme
Sussman and Steele in 1975 MIT
what are the design issues for the string type
-Should strings be simply a kind of character array or a primitive type
-should strings have static or dynamic length
what are the design issues for arrays
-what types are legal for subscripts
-are subscripting expressions in element references range checked
-when are subscript ranges bound
-when does an array allocation take place
-are ragged or rectangular multidimensioned arrays allowed, or both
-can arrays be initialized when they have their storage allocated
-what kind of slices are allowed if any
a type whose variable may store different type values at different times during program execution
union
what are the design issues for unions
-should type checking be required
-should unions be embedded in records
an aggregate of data elements in which the individual elements are identified by names and accessed through offsets from the beginning of the structure
record
what are the design issues of pointers
-what are the scope and lifetime of a pointer variable
-what is the lifetime of a heap-dynamic variable
-are pointers restricted as to the type of value to which they can point
-are pointers used for dynamic storage management, indirect addressing, or both
-should the language support pointer types, reference types, or both
the means of choosing between two or more execution paths in a program
selection statement
example of a two-way statement
if statement
what are the design issues of a two-way selection statement
-what is the form and type of expression that controls the selection
-how are the then and else clause specified
-how should the meaning of nested selectors be specified
allows the selection of one of any number of statements or statement groups
multiple selection construct
what are the design issues of a multiple selection construct
-what is the form and type of the expression that controls the selection
-how are the selectable segments specified
-is execution flow through the structure restricted to include just a single segment
-how are the case values specified
-how should unrepresented selector expression values be handles, if at all
causes a statement or collection of statements to be executed to zero, one, or more times
iterative statement
what are the design issues of iterative statements
-how is iteration controlled
-where should the control mechanism appear in the loop construct
when the repetition control is based on a Boolean expression rather than a counter
logically controlled loops
what are the design issues for a logically controlled lop
-should the control be pretest or posttest
-should the logically controlled loop be a special form of a counting loop or a seperate statement
transfers execution control to a specified location in the program
unconditional branch statement
each line in a selection construct consisting of a Boolean expression (a guard) and a statement or statement sequence
guarded command
a nameless function in Scheme
lambda expression