PLQ #6Done on:   Tuesday, March 1st

Question 1 @ 2022-03-01 18:23

The Schlac language has the following primitive values…

(select all that apply)

Question 2 @ 2022-03-01 18:27

We can express the Lambda Calculus language (similar to our Schlac) using this BNF:

<lambda-expr> ::= x
                | λx . <lambda-expr>
                | <lambda-expr> <lambda-expr>

What is the name of the last BNF rule?

Question 3 @ 2022-03-01 18:29

Which of the following is the result of an α-conversion of the following expression?

(lambda (x y) x)

Question 4 @ 2022-03-01 18:30

What is true about the following Church encoding?

(lambda (f) (lambda (n) n))

Question 5 @ 2022-03-01 18:33

Which of the following encoded values represents the identity function in our Schlac code?


(define 0 (lambda (f x) x))
(define 1 (lambda (f x) (f x)))
(define #t (lambda (x y) x))
(define #f (lambda (x y) y))