Chapter 10: Algorithms


1. DFA Simulation

  • Write down the algorithm for simulating a DFA.[2020, 2018, 2016]

2. DFA State Minimization

  • Write down the algorithm to minimize the number of states of a DFA.[2012]

3. DFA Construction from NFA

  • Write down the algorithm for constructing a DFA from an NFA (subset construction rule).[2019, 2010]

4. Left Factoring

  • Write down the algorithm for left factoring a grammar.[2020, 2014, 2009]

5. Operator Precedence Parsing

  • Write the algorithm for operator precedence parsing.[2013]

6. SLR Parsing Table Construction

  • Write the algorithm to construct an SLR parsing table.[2012]

7. Basic Blocks

  • Define a basic block. Write down the algorithm for partitioning into basic blocks.[2018, 2016, 2011]
  • Or, Write down the algorithm for partitioning into basic blocks from the three-address code sequence.[2014, 2009]
  • Or, What is predictive parsing? Write down the algorithm for partitioning into basic blocks.[2020]

8. DAG Construction

  • What is a DAG? Write down the algorithm for constructing a DAG.[2018, 2015, 2013, 2011]

9. Live Variable Analysis

  • What is a live variable? Write down the live variable analysis algorithm.[2015]

10. Code Generation

  • Write down the code-generation algorithm.[2012]
  • Or, Describe the code generation algorithm.[2021, 2014]