1. Home
  2. Explore
  3. Computer Science
  4. Computational Thinking and Compilers

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Computational Thinking and Compilers

  • 93Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Computational Thinking
The two pillars of computational thinking identified in the talk are
and algorithms.

93 questions

  1. 1
    The 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

  2. 2
    Jeanette 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

  3. 3
    Computational 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

  4. 4
    There 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

  5. 5
    An 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

  6. 6
    The 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

  7. 7
    The 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

  8. 8
    The three basic dictionary operations are insert, delete, and
    _____
    whether a given element is present.
    Hint

    This operation checks membership in the set.

    Answer

    look

  9. 9
    A dictionary abstraction is useful for modeling a compiler's
    _____
    table.
    Hint

    Compilers use this table to associate identifiers with information.

    Answer

    symbol

  10. 10
    Informally, an algorithm can be thought of as a
    _____
    for doing something.
    Hint

    It is a set of instructions for accomplishing a task.

    Answer

    recipe

  11. 11
    Formally, an algorithm is defined as a Turing machine that
    _____
    on all inputs.
    Hint

    The machine must eventually stop rather than run forever.

    Answer

    halts

  12. 12
    A 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

  13. 13
    The taxonomy of computer science abstractions is based primarily on their
    _____
    .
    Hint

    The categories distinguish what each abstraction is used for.

    Answer

    purpose

  14. 14
    Dictionaries, stacks, queues, graphs, and trees are examples of
    _____
    abstractions.
    Hint

    These are commonly introduced in a first computer science course.

    Answer

    fundamental

  15. 15
    Hash tables and search trees are examples of
    _____
    implementations.
    Hint

    These structures are used to implement other, more fundamental abstractions.

    Answer

    abstract

  16. 16
    Declarative abstractions specify
    _____
    is wanted without specifying how to achieve it.
    Hint

    They describe the desired result rather than the implementation procedure.

    Answer

    what

  17. 17
    Unlike 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

  18. 18
    Turing machines, Boolean circuits, and quantum circuits are examples of
    _____
    abstractions.
    Hint

    They model systems capable of expressing computation.

    Answer

    computational

  19. 19
    An 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

  20. 20
    A dictionary abstraction can be implemented using a
    _____
    list abstraction.
    Hint

    This data structure connects elements through references.

    Answer

    linked

  21. 21
    The 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

  22. 22
    A 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

  23. 23
    Modern 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

  24. 24
    The phases that translate source programs into intermediate representations are called the compiler's
    _____
    end.
    Hint

    This part analyzes the source language.

    Answer

    front

  25. 25
    The 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

  26. 26
    LLVM allows several front ends to translate different programming languages into one intermediate representation called
    _____
    .
    Hint

    This is LLVM's intermediate representation.

    Answer

    LLVM-IR

  27. 27
    In 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

  28. 28
    A 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

  29. 29
    A 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

  30. 30
    Regular expressions are used as a declarative abstraction for
    _____
    analysis.
    Hint

    This compiler phase groups characters into tokens.

    Answer

    lexical

  31. 31
    The data model of regular expressions consists of sets of strings over an
    _____
    .
    Hint

    An alphabet is a set of permitted symbols.

    Answer

    alphabet

  32. 32
    The operations of the regular-expression abstraction are union, concatenation, and
    _____
    .
    Hint

    This operation represents repetition of a pattern.

    Answer

    Kleene star

  33. 33
    Ken 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

  34. 34
    Aho's regular-expression search program used a dynamic lazy construction of
    _____
    transitions.
    Hint

    These are transitions in a deterministic finite automaton.

    Answer

    DFA

  35. 35
    The 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

  36. 36
    LEX allows users to create lexical analyzers without learning an algorithm for efficient pattern
    _____
    .
    Hint

    The analyzer must compare input against token specifications.

    Answer

    matching

  37. 37
    A LEX specification recognizing integer numbers identifies one or more
    _____
    and returns the token NUM.
    Hint

    Integer literals are sequences of these symbols.

    Answer

    digits

  38. 38
    Context-free grammars are used to specify the
    _____
    structure of programming languages.
    Hint

    This concerns how tokens combine into valid language constructs.

    Answer

    grammatical

  39. 39
    The 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

  40. 40
    The 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

  41. 41
    The 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

  42. 42
    YACC is a tool for constructing syntax analyzers from grammatical
    _____
    .
    Hint

    Users describe the language grammar rather than implement the parser algorithm directly.

    Answer

    specifications

  43. 43
    The name YACC stands for
    _____
    compiler compiler.
    Hint

    It is an acronym describing another tool for building compilers.

    Answer

    Yet Another

  44. 44
    LEX 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

  45. 45
    YACC 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

  46. 46
    For 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

  47. 47
    YACC 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

  48. 48
    A flow graph models the flow of
    _____
    in a computer program.
    Hint

    It represents which program blocks can execute after which others.

    Answer

    control

  49. 49
    In 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

  50. 50
    A 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

  51. 51
    The reaching-definitions problem determines which definitions may reach particular program
    _____
    .
    Hint

    These are locations in the control-flow graph.

    Answer

    points

  52. 52
    Reaching definitions can support optimizations such as constant propagation and loop-invariant code
    _____
    .
    Hint

    This optimization moves computations out of loops when safe.

    Answer

    motion

  53. 53
    The 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

  54. 54
    Each 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

  55. 55
    A 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

  56. 56
    A 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

  57. 57
    Because 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

  58. 58
    A 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

  59. 59
    The 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

  60. 60
    For 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

  61. 61
    The evolution of a closed quantum system is represented by a
    _____
    operator.
    Hint

    This operator preserves vector norms and is reversible.

    Answer

    unitary

  62. 62
    Unitary operators are
    _____
    , whereas quantum measurements are not unitary.
    Hint

    Their operations can be undone by applying an inverse operator.

    Answer

    reversible

  63. 63
    Applying the Hadamard operator twice produces the two-dimensional
    _____
    matrix.
    Hint

    Applying an operation followed by its inverse leaves the state unchanged.

    Answer

    identity

  64. 64
    In 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

  65. 65
    In 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

  66. 66
    A measurement of a single qubit produces only one classical
    _____
    as its outcome.
    Hint

    The possible results are zero or one.

    Answer

    bit

  67. 67
    Measurement collapses a qubit's state rather than applying a
    _____
    operator.
    Hint

    This distinguishes measurement from reversible quantum evolution.

    Answer

    unitary

  68. 68
    For 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

  69. 69
    The 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

  70. 70
    Taking 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

  71. 71
    Adding one qubit to a quantum system
    _____
    the size of its state space.
    Hint

    Each additional qubit contributes a factor of two.

    Answer

    doubles

  72. 72
    A 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

  73. 73
    The 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

  74. 74
    Quantum circuits are also known as the
    _____
    model of quantum computing.
    Hint

    The model represents computation as operations applied to qubits.

    Answer

    gate

  75. 75
    A quantum circuit is a graph consisting of lines connecting unitary operators and
    _____
    gates.
    Hint

    These gates convert quantum information into classical outcomes.

    Answer

    measurement

  76. 76
    Quantum 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

  77. 77
    The 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

  78. 78
    Entangled states were described by Einstein as
    _____
    action at a distance.
    Hint

    This is the famous adjective in Einstein's phrase.

    Answer

    spooky

  79. 79
    Shor'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

  80. 80
    A 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

  81. 81
    The 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

  82. 82
    Quantum computers available today are controlled by
    _____
    computers.
    Hint

    These systems prepare inputs and process measurement results.

    Answer

    classical

  83. 83
    A quantum computer returns
    _____
    bits through measurement to the controlling classical computer.
    Hint

    Measurement converts quantum information into ordinary binary information.

    Answer

    classical

  84. 84
    The 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

  85. 85
    Qsharp 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

  86. 86
    The 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

  87. 87
    The 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

  88. 88
    Computer 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

  89. 89
    Students have different learning styles, including word-oriented and
    _____
    -oriented styles.
    Hint

    This style benefits from pictures and videos.

    Answer

    visually

  90. 90
    Because 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

  91. 91
    The 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

  92. 92
    The 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

  93. 93
    Natural 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

1 of 93
Question 1 of 93

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent