Computational Thinking and Compilers
- 93Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
93 questions
- 1The two pillars of computational thinking identified in the talk are_____and algorithms.
Hint
The first pillar helps formulate complex problems in simplified models.
Answer
abstractions
- 2Jeanette Wing argued that computational thinking should be taught alongside the three_____to every school child.
Hint
These are the traditional foundational skills of reading, writing, and arithmetic.
Answer
Rs
- 3Computational thinking involves formulating problems using abstractions so that solutions can be represented as computational steps and_____.
Hint
These are step-by-step procedures for solving problems.
Answer
algorithms
- 4There is currently no_____definition of computational thinking in educational circles.
Hint
The content says educators have not agreed on one universally accepted definition.
Answer
standard
- 5An abstraction is defined as a mathematical model with a data model and a set of_____.
Hint
These manipulate the data represented by the model.
Answer
operations
- 6The operations associated with an abstraction can be viewed as a programming language that need not be_____complete.
Hint
This term refers to the expressive power of a computational system.
Answer
Turing
- 7The dictionary abstraction has a universal set U and a subset S that is initially_____.
Hint
No elements have been inserted at the beginning.
Answer
empty
- 8The three basic dictionary operations are insert, delete, and_____whether a given element is present.
Hint
This operation checks membership in the set.
Answer
look
- 9A dictionary abstraction is useful for modeling a compiler's_____table.
Hint
Compilers use this table to associate identifiers with information.
Answer
symbol
- 10Informally, an algorithm can be thought of as a_____for doing something.
Hint
It is a set of instructions for accomplishing a task.
Answer
recipe
- 11Formally, an algorithm is defined as a Turing machine that_____on all inputs.
Hint
The machine must eventually stop rather than run forever.
Answer
halts
- 12A Turing machine that does not halt on all inputs corresponds to a_____function in recursive function theory.
Hint
This type of function may be undefined for some inputs.
Answer
partially recursive
- 13The taxonomy of computer science abstractions is based primarily on their_____.
Hint
The categories distinguish what each abstraction is used for.
Answer
purpose
- 14Dictionaries, stacks, queues, graphs, and trees are examples of_____abstractions.
Hint
These are commonly introduced in a first computer science course.
Answer
fundamental
- 15Hash tables and search trees are examples of_____implementations.
Hint
These structures are used to implement other, more fundamental abstractions.
Answer
abstract
- 16Declarative abstractions specify_____is wanted without specifying how to achieve it.
Hint
They describe the desired result rather than the implementation procedure.
Answer
what
- 17Unlike declarative abstractions, computational abstractions more closely model programming languages and are_____complete.
Hint
They have the expressive power associated with general-purpose computation.
Answer
Turing
- 18Turing machines, Boolean circuits, and quantum circuits are examples of_____abstractions.
Hint
They model systems capable of expressing computation.
Answer
computational
- 19An important property of abstractions is that they can be layered and implemented by algorithms or in terms of other_____.
Hint
Higher-level models can be built from lower-level models.
Answer
abstractions
- 20A dictionary abstraction can be implemented using a_____list abstraction.
Hint
This data structure connects elements through references.
Answer
linked
- 21The running time of an abstraction can be inferred through the process of abstraction_____.
Hint
This process builds higher-level abstractions from lower-level ones.
Answer
layering
- 22A compiler is a program that translates a source program into a semantically_____target program.
Hint
The target must preserve the meaning of the source.
Answer
equivalent
- 23Modern compilers can be viewed as compositions of phases that translate a source program through a sequence of semantically equivalent lower-level_____.
Hint
These are intermediate forms of the program.
Answer
representations
- 24The phases that translate source programs into intermediate representations are called the compiler's_____end.
Hint
This part analyzes the source language.
Answer
front
- 25The phases that ultimately generate machine or target-language code are called the compiler's_____end.
Hint
This part is closer to the target machine.
Answer
back
- 26LLVM allows several front ends to translate different programming languages into one intermediate representation called_____.
Hint
This is LLVM's intermediate representation.
Answer
LLVM-IR
- 27In the LLVM framework, a code_____transforms the intermediate representation so that better target code can be produced.
Hint
This phase improves the program before code generation.
Answer
optimizer
- 28A compiler for a new programming language on an existing machine can often be created by building a new front end that translates into_____.
Hint
The existing LLVM back end can then be reused.
Answer
LLVM-IR
- 29A compiler for an existing language on a new machine architecture primarily requires a new LLVM-IR-to-target-machine-code_____.
Hint
This component belongs to the back end.
Answer
generator
- 30Regular expressions are used as a declarative abstraction for_____analysis.
Hint
This compiler phase groups characters into tokens.
Answer
lexical
- 31The data model of regular expressions consists of sets of strings over an_____.
Hint
An alphabet is a set of permitted symbols.
Answer
alphabet
- 32The operations of the regular-expression abstraction are union, concatenation, and_____.
Hint
This operation represents repetition of a pattern.
Answer
Kleene star
- 33Ken Thompson's pattern-matching method had running time linear in the product of the regular-expression length and the input-string_____.
Hint
The complexity depends multiplicatively on the sizes of both inputs.
Answer
length
- 34Aho's regular-expression search program used a dynamic lazy construction of_____transitions.
Hint
These are transitions in a deterministic finite automaton.
Answer
DFA
- 35The observed running time of Aho's regular-expression search program was linear in the sum of the regular-expression length and the input-string_____.
Hint
The two input sizes contribute additively to the running time.
Answer
length
- 36LEX allows users to create lexical analyzers without learning an algorithm for efficient pattern_____.
Hint
The analyzer must compare input against token specifications.
Answer
matching
- 37A LEX specification recognizing integer numbers identifies one or more_____and returns the token NUM.
Hint
Integer literals are sequences of these symbols.
Answer
digits
- 38Context-free grammars are used to specify the_____structure of programming languages.
Hint
This concerns how tokens combine into valid language constructs.
Answer
grammatical
- 39The formalism introduced in the first POPL paper attached a syntax-directed scheme to a_____grammar.
Hint
The grammar class is commonly abbreviated CFG.
Answer
context-free
- 40The syntax-directed scheme translates a token stream into output that is usually a_____tree.
Hint
This tree represents the grammatical structure of the input.
Answer
syntax
- 41The productions of a context-free grammar are augmented with_____that guide translation during parsing.
Hint
These additions specify what should be done with recognized constructs.
Answer
rules
- 42YACC is a tool for constructing syntax analyzers from grammatical_____.
Hint
Users describe the language grammar rather than implement the parser algorithm directly.
Answer
specifications
- 43The name YACC stands for_____compiler compiler.
Hint
It is an acronym describing another tool for building compilers.
Answer
Yet Another
- 44LEX and YACC together can be used to build a working_____calculator from lexical and grammar specifications.
Hint
The example handles arithmetic such as addition and multiplication.
Answer
desk
- 45YACC resolves a shift-reduce conflict by conventionally favoring a_____action.
Hint
This rule helps handle ambiguous constructs such as if-then-else statements.
Answer
shift
- 46For C expressions, an ambiguous grammar can use one expression rule together with rules specifying operator precedence and_____.
Hint
This determines how operators of equal or repeated structure group.
Answer
associativity
- 47YACC can reveal difficult parsing constructs by reporting action_____in a grammar.
Hint
These indicate that the parser has more than one possible action.
Answer
conflicts
- 48A flow graph models the flow of_____in a computer program.
Hint
It represents which program blocks can execute after which others.
Answer
control
- 49In a flow graph, each node represents a_____block of the intermediate representation.
Hint
This is a straight-line sequence of instructions with one entry and one exit.
Answer
basic
- 50A definition of variable U reaches statement T if there is an execution path from the defining statement to T on which U is not_____.
Hint
In optimization terminology, the definition has not been killed.
Answer
redefined
- 51The reaching-definitions problem determines which definitions may reach particular program_____.
Hint
These are locations in the control-flow graph.
Answer
points
- 52Reaching definitions can support optimizations such as constant propagation and loop-invariant code_____.
Hint
This optimization moves computations out of loops when safe.
Answer
motion
- 53The data model for the reaching-definitions flow-graph abstraction is a semilattice of subsets of variable_____.
Hint
These are assignments whose effects may reach program points.
Answer
definitions
- 54Each flow-graph node has an input value for definitions reaching its beginning and an output value for definitions reaching its_____.
Hint
This is the other boundary of a basic block.
Answer
end
- 55A transfer function computes the output data-flow value at the end of a node from its input data-flow_____.
Hint
It describes how the basic block transforms incoming information.
Answer
value
- 56A confluence operator computes the value at the beginning of a node from the values at the ends of all its_____in the flow graph.
Hint
These are the blocks that can execute immediately before the node.
Answer
predecessors
- 57Because the data-flow values form a semilattice, the confluence operator must be commutative and_____.
Hint
The grouping of repeated combinations must not affect the result.
Answer
associative
- 58A qubit is represented as a unit vector in a complex vector space called a Hilbert_____.
Hint
This mathematical space has an inner product.
Answer
space
- 59The state of a qubit is a complex linear combination of two basis states, a phenomenon called_____.
Hint
Unlike a classical bit, a qubit can combine zero and one states.
Answer
superposition
- 60For a qubit with amplitudes alpha and beta, the sum of the squares of their absolute values must equal_____.
Hint
This condition ensures that total measurement probability is normalized.
Answer
one
- 61The evolution of a closed quantum system is represented by a_____operator.
Hint
This operator preserves vector norms and is reversible.
Answer
unitary
- 62Unitary operators are_____, whereas quantum measurements are not unitary.
Hint
Their operations can be undone by applying an inverse operator.
Answer
reversible
- 63Applying the Hadamard operator twice produces the two-dimensional_____matrix.
Hint
Applying an operation followed by its inverse leaves the state unchanged.
Answer
identity
- 64In a CNOT gate, the qubit that determines whether the other qubit is flipped is the_____qubit.
Hint
It controls the behavior of the target line.
Answer
control
- 65In a CNOT gate, the target qubit is flipped only when the control qubit is in state_____.
Hint
When the control is zero, the target passes through unchanged.
Answer
one
- 66A measurement of a single qubit produces only one classical_____as its outcome.
Hint
The possible results are zero or one.
Answer
bit
- 67Measurement collapses a qubit's state rather than applying a_____operator.
Hint
This distinguishes measurement from reversible quantum evolution.
Answer
unitary
- 68For a qubit with amplitudes alpha and beta, the probabilities of measuring zero and one are the squared absolute values of_____and beta, respectively.
Hint
The first basis state's amplitude determines the probability of observing zero.
Answer
alpha
- 69The state space of a composite quantum system is the_____product of the component state spaces.
Hint
This operation combines vector spaces and multiplies their dimensions.
Answer
tensor
- 70Taking the tensor product of two two-dimensional state spaces produces a state space of dimension_____.
Hint
The dimensions multiply when tensor products are taken.
Answer
four
- 71Adding one qubit to a quantum system_____the size of its state space.
Hint
Each additional qubit contributes a factor of two.
Answer
doubles
- 72A system of n single-qubit systems has a state space of dimension two to the power of_____.
Hint
The dimension grows exponentially with the number of qubits.
Answer
n
- 73The exponential growth of quantum state spaces makes quantum systems difficult to simulate on a_____computer.
Hint
The challenge concerns representing the huge state space using ordinary computation.
Answer
classical
- 74Quantum circuits are also known as the_____model of quantum computing.
Hint
The model represents computation as operations applied to qubits.
Answer
gate
- 75A quantum circuit is a graph consisting of lines connecting unitary operators and_____gates.
Hint
These gates convert quantum information into classical outcomes.
Answer
measurement
- 76Quantum circuits do not allow fan-out because an unknown quantum state cannot be copied, as stated by the no_____theorem.
Hint
This theorem prohibits copying an arbitrary unknown qubit.
Answer
cloning
- 77The circuit that produces the state consisting of zero-zero plus one-one over the square root of two produces an_____state.
Hint
The resulting state cannot be expressed as a tensor product of two individual states.
Answer
entangled
- 78Entangled states were described by Einstein as_____action at a distance.
Hint
This is the famous adjective in Einstein's phrase.
Answer
spooky
- 79Shor's algorithm combines a classical computer and a quantum computer to factor integers using order_____operations.
Hint
The talk describes the complexity as cubic in the input parameter.
Answer
n cubed
- 80A sufficiently large error-corrected quantum computer could make RSA encryption easy to crack using_____algorithm.
Hint
This is the quantum factoring algorithm.
Answer
Shor's
- 81The quantum part of Shor's algorithm computes the_____of a function, while classical computers perform preprocessing and postprocessing.
Hint
The quantum computer solves a periodicity problem.
Answer
period
- 82Quantum computers available today are controlled by_____computers.
Hint
These systems prepare inputs and process measurement results.
Answer
classical
- 83A quantum computer returns_____bits through measurement to the controlling classical computer.
Hint
Measurement converts quantum information into ordinary binary information.
Answer
classical
- 84The no-cloning theorem means that a quantum programming language cannot include a general_____operation for variable values.
Hint
This operation would duplicate an arbitrary unknown quantum state.
Answer
copy
- 85Qsharp is a quantum programming language developed by_____and included in its quantum development kit.
Hint
It is a major technology company with a quantum software research program.
Answer
Microsoft
- 86The use of traditional compiler frameworks for quantum languages demonstrates that compiler design principles can transfer from_____to quantum programming.
Hint
These are the conventional languages for which the compiler framework was originally developed.
Answer
classical programming languages
- 87The speaker recommends_____before programming because planning improves the chance of producing correct software.
Hint
The preferred sequence is this activity followed by programming.
Answer
thinking
- 88Computer games and puzzles can help teach computational thinking because many students prefer learning by solving problems or_____games.
Hint
This activity makes learning interactive and engaging.
Answer
playing
- 89Students have different learning styles, including word-oriented and_____-oriented styles.
Hint
This style benefits from pictures and videos.
Answer
visually
- 90Because a first explanation may not resonate with a student, repeating an idea in different_____can improve learning.
Hint
The content recommends varying the form of repetition.
Answer
ways
- 91The construction of a new compiler on an existing machine has increasingly become an exercise in software_____.
Hint
This discipline emphasizes organizing and integrating reliable software components.
Answer
engineering
- 92The best theory is motivated by practice, and the best practice is motivated by_____.
Hint
The statement describes a reciprocal relationship between abstract principles and implementation.
Answer
theory
- 93Natural language is a poor direct programming language candidate because it is inherently highly_____.
Hint
Different interpretations can lead to disagreement about intended meaning.
Answer
ambiguous

Ask anything
We've read this whole study set, so questions about it get the best answers.