For questions 1--7, please read pages 17--26 (the book sections on environments and on operational semantics of expressions). 1. What is $\xi$? 2. What is $\phi$? 3. What is $\rho$? 4. In operational semantics, what kind of a thing does $e$ stand for? 5. In operational semantics, what kind of a thing does $v$ stand for? 6. Examine the evaluation rules for all the syntactic forms of Impcore, and list all the forms to which more than one rule can apply. ("Syntactic form" is in the index *twice*; you will probably find both pages helpful.) *Example answer*: more than one rule applies to the VAR(x) form. 7. Pick three of the syntactic forms from the previous question. For each one, explain briefly in your own words *why* that form has more than one evaluation rule. *Example answer*: there are two rules for the VAR form because a name can be either a formal parameter or a global variable. For question 8, please skim section 1.5, and carefully read section 1.5.2 on pages 43--53. 8. Pick one of the syntactic forms from the previous question. Find the place in the interpreter where the form is implemented, and answer the following two questions: (a) How does the interpreter decide which rule applies? Identify both the math and the code involved in the decision. (b) If neither rule applies, how does the interpreter know, and what does it do? *Example answer*: The VAR(x) form is evaluated in chunk 45a at the top of page 45. It decides which rule applies by checking the math $x \in \mathop{dom} \rho$---the code is isvalbound(e->u.var, formals). If\ the answer is yes, rule FormalVar applies. If the answer is no, the only possible rule is GlobalVar. If\ neither rule applies, it is because $x \notin \mathop{dom} \rho$ and also $x \notin \mathop{dom} \xi$. In that case, no rule's conditions are satisfied. The interpreter knows by checking isvalbound(e->u.var, formals) and then if that fails, checking isvalbound(e->u.var, globals). If both conditions fail, no rule applies, and the interpreter triggers a run-time error (by calling runerror). For questions 9 and 10, please read section 1.1.5 (page 15) on the difference between primitive functions and predefined functions, and please study the rules for function application on pages 24 to 26. 9. Function <= is *predefined*. When evaluating (<= 0 n), what rule of the operational semantics is used at the root of the derivation? 10. Function < is *primitive*. When evaluating (< n 10), what rule of the operational semantics is used at the root of the derivation?