Question: Please answer this two question, writer or type clearly, thanks! In the following questions, you will apply a sequence of beta-reductions following the call-by- value
Please answer this two question, writer or type clearly, thanks!

In the following questions, you will apply a sequence of beta-reductions following the call-by- value strategy until you reduce the X-term to a value (a X-term that cannot be reduced any further. For example, given the \-term (Ax.x x Ax.x) (Ax.x) you have to respond with the following sequence of reductions: x.t12 t2 x.t12 t2 Ax. t12 t2 (4.x.xx.x.x) (.x.x) (2.x) (4.x.x) x 2 + (1x.x) dx 2 + x.x Other examples: A redex 1. x .x ((1x.x) (1.x.x x)) No reduction is possible. The only redex is under an abstraction (binder A). Ax.t12 t2 Xx.t12 t2 2. (1x.x) ((Ax.x) (1x x x)) + (4.x.x) (4.x.xx) + 4x x x A Note A is not a value and it must be reduced first. Xx. t12 t2 3. (1x.xx) x 2 x + (1x.xx) (4.x.xx) It diverges (it cannot reduce to a value with the call-by-value strategy). Xx. t12 t2 Xx.t12 t2 4. (1x. (1x.x) ly.y x)) .x.y x + (1x.x) 12. lx.yx + Iz z dx.y x For full credit, at each reduction step, you must highlight which redexes you reduce. For this question you may submit handwritten responses. However, you must make sure that your handwriting is legible and each redex is clearly identifiable. Questions: 1. (1x. ly.y x) (As. Az.z) (1x.x) 2. (Ay.y s) ((t. If.t) (As. dz. z) (1x.x)) In the following questions, you will apply a sequence of beta-reductions following the call-by- value strategy until you reduce the X-term to a value (a X-term that cannot be reduced any further. For example, given the \-term (Ax.x x Ax.x) (Ax.x) you have to respond with the following sequence of reductions: x.t12 t2 x.t12 t2 Ax. t12 t2 (4.x.xx.x.x) (.x.x) (2.x) (4.x.x) x 2 + (1x.x) dx 2 + x.x Other examples: A redex 1. x .x ((1x.x) (1.x.x x)) No reduction is possible. The only redex is under an abstraction (binder A). Ax.t12 t2 Xx.t12 t2 2. (1x.x) ((Ax.x) (1x x x)) + (4.x.x) (4.x.xx) + 4x x x A Note A is not a value and it must be reduced first. Xx. t12 t2 3. (1x.xx) x 2 x + (1x.xx) (4.x.xx) It diverges (it cannot reduce to a value with the call-by-value strategy). Xx. t12 t2 Xx.t12 t2 4. (1x. (1x.x) ly.y x)) .x.y x + (1x.x) 12. lx.yx + Iz z dx.y x For full credit, at each reduction step, you must highlight which redexes you reduce. For this question you may submit handwritten responses. However, you must make sure that your handwriting is legible and each redex is clearly identifiable. Questions: 1. (1x. ly.y x) (As. Az.z) (1x.x) 2. (Ay.y s) ((t. If.t) (As. dz. z) (1x.x))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
