Question: all info is given. these are 3 seperate questions. problem 4: no other info is provided. thats about it. posted problem 4 too so that
5. Call by value) repeat problem 4 but do beta reductions according to call by value W/ This is asking you to repeat problem 4. The answer to this question should have the same format as the answer to problem 4. 6. (Normal Order) repeat problem 4 but do beta reductions according to normal order evaluation // This is asking you to repeat problem 4. The answer to this question should have the same format as the answer to problem 4. 7. (Evaluating Expressions) Evaluate each of the following expressions 7.1. trufis trufls trufls tru 7.2. trufls tru fls trufls tru fls trufis trufls tru 7.3. 2 (plus 2) 3 7.4. fst (snd (pair (pair 12) (pair (34)))) 7.5. a pair 1 2 b-pair 3 4 cpair a b d-pair ba cpaired f-pair de fstand - 14. fst (snd calculate 2 fstand (paire 1) 4. (Beta reductions) For each of the following expressions, identify the redexes and, for each redex, do only one beta reduction step to reduce the redex. If renaming is needed you should do renaming first before doing the beta reduction Example 1 Ax x x) Answer Example 2 (Ax. ny. 12. * y Aw. z)(x y z w) Answer ny. Az. * y aw. 2)(x y z w) "(.x. du. Av. x u lw. )(x y z w) (du. iv. x u Aw. v) x y z w) - lu. iv. x y z w) u lw.v Example 3 (Ax. (dy. x)y) 2 Answer // This expression has two redexes. You should show one beta reduction for each redex separately not one // after the other ay x)y) 2-dy. 2) // beta reduction for first redex (Ax. x)) 2 (Ax. x) z // beta reduction for second redex // The examples above clearly show that you should answer by highlighting the redexes and also highlight the result of the // reduction (and the renaming if applicable). You should follow the same format as the examples below 4.1. ((x, 2)(x2)) (ax. (ax. 2)(x2)) 4.2. (ax. (ay. x) (Az.xyz)) (y 2) 4.3. (ax. ly. x Az. xy Ax. xz) ((Azyz) yz) 4.4. iy. (ax. ly. x Ax. 1z.xyz) ((Az. yz) (Azyz)) 4.5. (ay. x Az.xyz) (ay, Az yz)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
