This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: b. (8 pts) Write a predictive, recursive descent parser for the grammar 2. (16 pts) Lambda calculus Circle all free (unbound) variables in the following &-expression a. (2 pts) ( & a. a ( & b. b a ) a b ) a Evaluate the following &-expressions as much as possible. Show each beta-reduction b. (3 pts) ( & x. & y.y x) a ( & z.z) b c. (3 pts) ( & y. & x x y) x a b d. (8 pts) Using encodings, show 3*1 =>* 3. Show each beta-reduction. =>* indicates 0 or more steps of beta-reduction 3*1 => M * N = & x.(M (N x)) 1 = & f. & y.f y 2 = & f. & y.f (f y) 3 = & f. & y.f (f (f y)) 4 = & f. & y.f (f (f (f y)))...
View Full Document
This note was uploaded on 01/13/2012 for the course CMSC 330 taught by Professor Staff during the Fall '08 term at Maryland.
- Fall '08