PLQ #4Done on:   Tuesday, October 8th

Question 1 @ 2024-10-08 18:25

Which of the following are true about different treatments of functions in programming languages?


Question 2 @ 2024-10-08 18:28

What expressions are in the scope of the first y in this expression:

{with {x E1}
  {with {y E2}  <--- this guy
    {with {z E3}
      {with {y E4}
        E5}}}}

Question 3 @ 2024-10-08 18:30

What is the result of the following Interactive Falsification (IF) expression from HW#4?

{if {with {x True}
      {with {y {if x False True}}
        y}}
  1
  False}

Question 4 @ 2024-10-08 18:34

At some point we had the following broken bit of code in our implementation of subst:

(define (subst expr to from)
  (cases expr
    ...
    [(With bound-id named-expr bound-body)
    (if (eq? bound-id from)
      expr
      (With bound-id
            (subst named-expr from to)
            (subst bound-body from to)))]))

Which one of the following tests can be used to demonstrate the bug in this code fragment?


Question 5 @ 2024-10-08 18:38

What are we going to do today?