PLQ #10Done on:   Tuesday, March 26th

Question 1 @ 2024-03-26 18:23

Which of the following tools did we use to implement our lazy language?


Question 2 @ 2024-03-26 18:28

If the following code is executed in our Lazy Racket language, what is the result? (In this example «E₁» and «E₂» are placeholders for some expression.)

(if (list «E₁» (* 3 (/ 4 0)) «E₂»)
    11
    12)

Question 3 @ 2024-03-26 18:33

What problem in our Sloth implementation does the strict function solve?


Question 4 @ 2024-03-26 18:36

As we’ve seen last week, generators and channels give programmers more expressive control flow constructs. Which of the following statements explains why this works?


Question 5 @ 2024-03-26 18:38

Consider the following type definition for VAL from our lazy Sloth evaluator:

(define-type VAL
  [RktV  Any]
  [FunV  (Listof Symbol) SLOTH ENV]
  [ExprV SLOTH ENV (Boxof (U #f VAL))]
  [PrimV ((Listof VAL) -> VAL)])

Is this from the version of Sloth that implements a call by name or call by need language?

Choose the best answer.