CS 330 Home Schedule Resources

Study Guide 6
Covers 3 - 3.3.3

    3 - 3.1 What and why of declarativeness
    1. What three properties does a declarative operation possess?
    2. In what sense is a declarative operation independent, stateless, and deterministic?
    3. Why is declarativeness useful or important?
    4. How/why does declarativeness improve modularity?
    5. How/why does declarativeness make programming simpler?
    6. Why is the effort needed to understand a declarative program just a sum (not a multiplication) of the effort needed to understand the subcomponents?
    7. What is referential transparency, and how does it simplify reasoning about programs?
    8. What are the two main categories of declarative programming and what is the difference between them?
    9. HTML and XML are examples of what kind of declarative programming?
    10. What is the difference between observational and definitional declarative programming?
    11. What kinds of definitional declarativeness are there?
    12. True or False. It is possible for a component interface to be declarative even if its implementation is not.
    13. Why is there a tradeoff between expressiveness and efficiency in a language?
    14. Why is it true that combining declarative operations according to the operations of the declarative model always results in a declarative operation?
    3.2 Iterative Computation
    1. What does it mean for a computation to be iterative?
    2. What is the general scheme of an iterative computation?
    3. What is significant about the implementation differences of Newton's method in Figs. 3.4 - 3.8?
    4. For good programming practice, where in a program should helper routines be defined?
    5. What is the principle behind this practice?
    6. What is a control abstraction?
    7. How can Newton's method be defined in terms of the Iterate control abstraction which takes three arguments? Compare and contrast this approach with a version implemented as a C++ 'for' loop.
    3.3 Recursive Computation
    1. What makes a function recursive?
    2. What makes a data type recursive?
    3. Compare and constrast a substitution-based abstract machine versus an environment-based abstract machine. Which is easier to implement and why? Which is easier to reason with and why?
    4. A non-iterative factorial calculation performs multiplications in the following order:
      (5*(4*(3*(2*(1*1))))). How can the association of operations be rearranged to make the calculation iterative?