CMSC 221/321 Homework set 3 Due: Tuesday, Oct 26, 2010 Homework 3.1: Write an ML program implementing substitution-based, call-by-value semantics (Fun[BSv]) for the Fun language. Test your implementation by computing (fact 3) (factorial of 3). Homework 3.2: Define an environment-based call-by-name big-step semantics for Fun (Fun[BSEn]). (Hint: Recall that the environment-based semantics for SAEL(by-name) needed to employ expression closures () in environment bindings. You will also need function closures in this semantics. These are just expression closures where the expression is a Fun(x,e) expression.) Homework 3.3: Define a CR-style small-step transition semantics for Fun (substitution-based). Homework 3.4: Extend the CEK abstract machine to handle Fun. Test it by writing an ML implementation and computing (fact 3) again as in Homework 3.1.