yes, that was a prime goal in the design of the language
Back
values stored in memory have no particular
Front
format or type, only a size
Back
lexical analysis converts _____ into _____
Front
characters //// tokens
Back
in java, can a name be used before it is declared?
Front
Yes, for standard package names in the global namespace
Back
assignment operators are generally
Front
right-associative, binding form right to left
Back
which one of the following is not an example of a static semantic check?
Front
pointers are never dereferenced unless they are refer to a valid object
Back
the kleene star operator represents
Front
zero or more repetitions of a regular expression
Back
floating point numbers are represented in
Front
a sign, an exponent, and a significant
Back
it is generally possible to compile a program written in an interpreted language?
Front
Yes, when assumptions are made and there is a fall-back process to handle violation
Back
structured programming emphasized
Front
top-down design and code modularization
Back
fundamental data types include
Front
signed and unsigned integers as well floating point numbers
Back
a context-free grammar that permits multiple parse trees for the same string is
Front
ambiguous
Back
in selection
Front
a choice is made of two or more statements or expression
Back
most compiled language use
Front
lexical scoping rules
Back
dynamic method dispatch is when
Front
a child class overrides a method in a parent and selection is made at compile time
Back
Nested blocks
Front
sometimes cause scope holes
Back
which of the following is not an example of a dynamic semantic check?
Front
a function with a non-void return type a value explicitly
Back
a compiler's optimistic if it applies only optimization that are both safe and effective
Front
false
Back
in java, a primitive type are ______ and object types are ______
Front
values //// references
Back
lexical scoping
Front
is defined in terms of the textual layout of the program and can be determined by the compiler
Back
most network protocols express data in _____ form
Front
big-endian
Back
formal notation is used to describe a language's ______ and _______
Front
syntax //// semantics
Back
in two's complement representation, there
Front
is one more negative number than postive numbers
Back
numbers, identifiers, keywords, operators, and punctuation marks are different kinds of
Front
tokens
Back
syntactical analysis converts _______ into _______
Front
tokens//// a parse tree
Back
floating point numbers are generally
Front
4 and 8 bytes in length
Back
in logically controlled loops, the test must be
Front
at the beginning of the loop, in the middle of the loop, at the end of the loop
Back
compilation and interpretation are so different they cannot be used together
Front
false
Back
why are compilers able to detect more static semantic errors than interpreters?
Front
compilers examine the entire code structure
Back
various kings of control flow include
Front
nondeterminacy, exception handling, and speculation
Back
almost any well defined imperative algorithm can be expressed with only
Front
sequencing, selection and iteration
Back
right-most and left-most derivation from a context free grammar
Front
may produce the same parse tree. It depends on the grammar
Back
the kleene plue operator extends regular expressions to the expressiveness of context-free grammar
Front
false
Back
Names in programming language are a way to
Front
reduce conceptual complexity by hiding irrelevant details and refer to program elements symbolically
Back
a precondition failure indicates a problem with
Front
a caller
Back
historically, the ______ increased faster than the ______
Front
processor's speed //// memory's speed
Back
the C for statement
Front
allows any changes the user wants to variables inside its body
Back
when a loop exits, the value of the loop index variable is
Front
[it depends on the language]
Back
the set of strings defined by a regular expression is known as its
Front
language
Back
most languages have _____ modules
Front
open scope
Back
grammars are categorized into classes based on
Front
the forms of production rules they are allowed to use
Back
a machine's architecture is the _______ of the ________ of the machines in the abstract
Front
formal specification//// capabilities and operations
Back
what was the first high level programming language
Front
fortran
Back
a function call may be executed for
Front
a side effect and its return value
Back
Short-circuit operators
Front
have a defined evaluation order and ma leave operands unevaluated
Back
Section 4
(50 cards)
definite assignment requires that every variable can be shown to have
Front
an assigned value on each path before each use
Back
in two's complement representation, there
Front
is one more negative number than positive numbers
Back
in concurrency, multiple sections of code
Front
are executed at the same time
Back
python provides _____ integer operations
Front
essentially infinite precision
Back
the kleene plus operator extends regular expressions to the expressiveness of cfg
Front
false
Back
changing the value of the loop iteration variable inside the loop results in
Front
undefined behavior
Back
different implementations of the same architecture will all have identical machine languages (true/false)
Front
false
Back
well formed and nested parentheses, brackets are best recognized with
Front
a context free grammar
Back
semantic analysis is required for
Front
enforcement of the rules for a valid program that go beyond the form of the program and determining information required for the generation of the output program
Back
recursion is a central concept in
Front
functional languages
Back
association lists become inefficient when
Front
programs get larger and more complex
Back
a compiler
Front
translates a source program into a target program and then goes away
Back
all of the following are phases of a compile except
Front
numerical analysis
Back
examples of processor functional units include
Front
instruction fetch, instruction decode and ALU operation
Back
in an assignment, a variable name may appear
Front
are and I-value and as an r-value
Back
the von neumann object oriented and scripting language families are distinct and do not overlap
Front
false
Back
a binding to an object that is no longer alive is called a
Front
dangling reference
Back
the definition of a regular expressions is often extended by string processing programming languages
Front
yes
Back
static and precise type checking ensures that a variable will always be used in a type-safe manner (true/false)
Front
true
Back
to avoid ambiguity in derivation from a context-free grammar
Front
the CFG must be defined so that in any derivation, only one parse tree can result
Back
assignments have
Front
an l-value and r-value
Back
context free grammars can match counted lists easily
Front
false
Back
scope analysis help determine whether heap allocation can be used instead of stack allocation
Front
false
Back
all languages have
Front
their own particular set of operators
Back
most of the time the processor is
Front
waiting for the user to do something and running the null job
Back
among other things a regular expression can be
Front
the alternation of two regular expressions and the empty string
Back
in two's complement a negative number's highest bit is
Front
1
Back
the back end of the compiler is concerned with
Front
generating appropriate target code
Back
declarative programming languages
Front
try to get away from irrelevant implementation details and focus on what the program is to do
Back
lexical scoping ....
Front
can be determined by the compiler and is most useful in dynamic binding languages
Back
case or switch statements
Front
are often clearer and cleaner than long if/then.... chains
and can be implemented by the compiler in many ways
Back
identifying an array index out of bounds error is generally an example of _____
Front
dynamic semantic
Back
an r-value indicates
Front
the new value to store in an assignment
Back
non-determinacy is when language features may be used
Front
in any combination with consistent meaning
Back
alias analysis can be used to determine when it is safe to
Front
evaluate expressions out of order , cache values in registers, and allow access by concurrent threads
Back
the order of operands and function call argument evaluation is
Front
unspecified
Back
what type of binding does C have?
Front
static binding
Back
roles of the semantic analyzer include
Front
enforcing all dynamic rules
Back
two models of assignment are
Front
the value and the reference models
Back
scientific notation includes
Front
a sign, mantissas and an exponent
Back
floating point representation has how many representations for 0?
Front
two, +0 & -0
Back
sequencing is central concept in
Front
imperative languages
Back
why are central reference table preferred to association list?
Front
lookup is fast because each slot is a linked list with the most recent binding
Back
orthogonality is when language features may be used
Front
in any combination with consistent meaning
Back
loop invariants are normally checked
Front
before and after each loop iteration
Back
JIT(just in time) compilation is
Front
delaying compilation until the last possible moment
Back
even in strict imperative languages, a compiler might reorder statements for optimization reasons
Front
true
Back
historically the _____ increased faster than the _____
Front
processor's speed //// memory speed
Back
resolution of overloaded names is carried out by the
Front
semantic analyzer
Back
in four buts the two's complement representation for -1 is
Front
1111
Back
Section 5
(50 cards)
many common processors are
Front
either little or big endian
Back
the cost of maintaining a system is usually
Front
for more that the cost of developing it
Back
in selectively open scope modules
Front
names are automatically exported but require qualification
Back
there is always a one-to-one correspondence between names and objects
Front
false
Back
recently, increases in machine performance have been because of
Front
increases in the number of functional units/cores
Back
heap storage is preferred to stack storage when
Front
the size of the object may vary and the object may outlive the function that creates it
Back
static and precise type checking ensure that a variable will always be used in a type-safe manner
Front
true
Back
all languages have
Front
their own particular sets of operators
Back
Static semantic rules are those that can be enforced at
Front
compile time
Back
dynamic type checking can never by completely safe
Front
false
Back
A compiler is conservative if it applies only optimizations that are both safe and effective
Front
True
Back
operators are
Front
special, short names for certain functions
Back
reference counting, mark/sweep, copying and generational are kinds of
Front
garbage collection
Back
The same bits in memory might form both legal integer and legal floating point numbers
Front
True
Back
assertions are
Front
expected to be true when execution reaches them and used to check the correctness of a program
Back
Example(s) of processor functional units includes
Front
Registers and L1 Memory Cache
Back
Semantic analysis is required for
Front
Enforcement of the rules for a valid program that go beyond the form of the program.
Determining information required for the generation of the output program.
Back
Machine languages tend to be
Front
very similar to each other
Back
In two's compliment representation, there
Front
is one more negative number than positive numbers
Back
values have a type only in how
Front
they are used
Back
overloading is when
Front
two or more different objects have the same name
Back
The X86 Architecture is
Front
little-endian
Back
the three lifespans are
Front
static, stack and heap
Back
Preconditions and Postconditions
Front
are expected to be true at the beggining and end of subroutines
Back
A Post-condition failure indicates a problem with
Front
A Callee
Back
Integer numbers can be
Front
unsigned
signed
2,4,8, or 16 byte lengths
two's compliment
Back
As there are ________ machine architectures in general use, there are ___________ machine languages.
Front
very few //////// very few
Back
invariants
Front
are expected to be true at all clean points of code
Back
multiway assignment allows
Front
exchanging two variables without using tempopry
Back
a static analyzer is said to be precise if it allows the compiler to determine whether a program will always follow a rule
Front
true
Back
A c\c++ double usually has about how many decimal digits of precision?
Front
about 16
Back
Roles of the semantic analyzer includes
Front
Enforcing all parsing rules
Back
Java has what level of dynamic semantic checking?
Front
High
Back
escape analysis helps in determining whether heap allocation can be used instead of stack allocation
Front
false
Back
In four bits, the two's compliment value 1000 represents what integer?
Front
-8
Back
a processor is able to determine the type of data in memory by examining it
Front
false
Back
the fastest access memory available to the processor is
Front
registers
Back
a function's local variable must always be allocated on the stack
Front
no, not necessarily depending on the language
Back
A machine's macro architecture is
Front
How it is structured as a collection of discrete units
Back
In two's compliment the negation of a number is formed by
Front
inverting the bits adding one and ignoring any overflow
Back
An Invariant failure indicates a problem with
Front
The encompassed code
Back
an bits retrieved from memory may be decoded as a legal instruction
Front
false
Back
floating point operations are generally executed in
Front
hardware
Back
Semantic Analysis can match counted list easily
Front
True
Back
In four bits, the two's compliment representation for -1 is?
Front
1111
Back
once a binding is created between a name and an object , it persists until both the name and the object are destroyed (true/false)
Front
false
Back
forward reference is
Front
a reference to a name that has not yet been declared
Back
programmers generally can distinguish _______ at the functional level
Front
registers from main memory from peripherals
Back
All patterns of bits represent a legal floating point values
Front
True
Back
the semantic analyzer annotates the _____ with any information needed to _____
Front
parse tree //// generate dynamic semantic checks
Back
Section 6
(36 cards)
modules facilitate _________ by _____________
Front
abstraction /////// allowing data to be made private.
Back
The initial goals for COBOL included
Front
Being a portable data processing programming language
being self-documenting and readable by non-programmers.
Back
In a regular expression, the kleene star operator represents
Front
zero or more repetitions of a regular expression.
Back
A formal notation is one that is
Front
Sufficiently precise and well defined so that it can be processed mechanically
Back
Operator precedence is
Front
Organized into levels.
Back
in a regular expression, the ? operator represents
Front
zero or one occurrences of a regular expression
Back
Languages tend to differ greatly in _________ but often have very similar aspects of ____________
Front
Syntax////////Semantics
Back
With static scoping, a symbol table must be maintained at run time. (true/false)
Front
False.
Back
Which of the following is/are true about dynamic scoping
Front
The bindings cannot be resolved by examining the program text.
In general compiled languages do not use dynamic scoping.
Back
A self-hosting compiler
Front
Is written in its own language
Back
Good reasons to study programming languages include
Front
learning how to select an appropriate language for an application
making it easier to learn a new language
Back
LISP, Scheme, ML, and Haskell are examples of _____________ programming languages
Front
Functional
Back
Regular Expressions and Context Free Grammars both occur in the Chomsky Language Hierarchy, Therefore
Front
Nothing special, they are just different levels of expresivitiy
Back
The initial goals for FORTRAN included
Front
reduction in time required to write a program
reduction in time required to debug a program
reduction in training required to program
Back
The initial goals for LISP included
Front
supporting the investigation of artificial intelligence
being a practical mathematical notation for computer programs.
Back
The early big four programming languages were
Front
FORTRAN, ALGOL, LISP, AND COBOL
Back
In C, having + represent both integer and floating point addition is an example of what?
Front
operator overloading
Back
Because a given regular expression may be converted to a finite automaton, its language
Front
might be infinite depending on the regular expression.
Back
Semantics is the ________ as opposed to its _______________
Front
meaning///////form
Back
All programming languages with nested scopes provide a scope resolution operator
Front
false
Back
Regular Expressions cannot express strings that have
Front
arbitrary matching pairs.
Back
Tokens are
Front
The basic building blocks of programs.
The shortest strings of characters in a source program that have individual meaning.
Back
C and C++ differentiate declarations and definitions
Front
To support recursive and mutually-referential types.
Back
The Chomsky Language Hierarchy can be used to be differentiate grammars on the basis of
Front
The level of automaton required to recognize the grammar's language.
The complexity of the language that can be expressed by the grammar.
The storage required to recognize the grammar's language.
Back
Modularization has
Front
less chance of name collision
improved chance of data integrity
improved compartmentalization of run time erros.
Back
External fragmentation of a heap is when there is enough space, but it is not in one block
Front
true
Back
Which of the following is/are true about static scoping
Front
Scope determination can be made by the compiler
Back
Operator associativity is
Front
either left-to-right, right-to-left, or does-not-apply
Back
The hardware used to construct essentially all computers is ________ in nature
Front
imperative
Back
Context-free grammars are more expensive than regular expressions
Front
Yes
Back
A symbol table must maintain information about only one binding for a given name.
Front
False.
Back
A forward reference is
Front
A reference to a name that has not yet been declared.
Back
Aliasing can cause inefficient code because
Front
the compiler cannot depend on values kept in the registers.
Back
The exact steps to execute a program must be _______________ in a _____________
Front
determinable///////predictable and repeatable fashion
Back
A Regular Expression may refer back to an earlier matched string.
Front
False
Back
An object that outlives all of its references is known as