Question: 3 Evaluation For the tasks in this section, consider the following program, which we'll call e . e ( f s t ( x :

3 Evaluation
For the tasks in this section, consider the following program, which we'll call e.
e(fst(x: int int.fstx,x: int int.sndx))(snd((?bar(1),bar(2)),(?bar(3),bar(4))))
We'll use v to refer to the value that results from evaluating e.
Task 3.1(7 points).
Write a full derivation (proof tree) for a big-step evaluation of e, that is, a derivation of the conclusion ev.
Task 3.2(7 points).
Evaluate e fully using control stacks. That is, fill out all of the steps in the following outline:
e
|...
|v
where e and v are the program and return value above.
Task 3.3(3 points).
Decompose e(from above) into an evaluation context E and expression e0 such that e=E[e0] and e0|e0' for some e0'. You don't need to define e0'(just E and e0) or justify this step. And you only need to do it for the first step of the evaluation, you don't need to step it all the way to a value.
3 Evaluation For the tasks in this section,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!