CS G262 Assignment #4. Assigned: Thursday, 30 September 2004 Due: Thursday, 7 October 2004, by 6pm Implement an attribute evaluator for quirk21 as specified below. This phase shall define a top-level procedure named evaluator1 that takes an abstract syntax tree for a complete quirk21 program and returns that tree, after recording certain E.dleaf, E.free, and E.tail attributes via side effect as follows: For each lambda expression E with body E0, the evaluator1 procedure uses astUpdate1 on E0 (not E) to record E0.dleaf using the encoding described by the table below: value encoding ----- -------- true 1 false 0 For every expression E, the evaluator1 procedure uses astUpdateFree to record E.free, represented as a list of Qsymbol, without duplicates. For each procedure call expression E, the evaluator operation uses astUpdate2 to record E.tail using the encoding described by the table above. The evaluator1 procedure should have no side effects apart from those listed above. The instructor is providing Scheme code to parse a quirk21 program and to return an alpha-converted form of the program. This code will be made available in /course/csg262/Assignments/Assignment4 That directory will include an implementation of the set operations from SRFI-1. Students are encouraged to use the SRFI-1 operations instead of writing their own. Students are not allowed to use implementation-specific set operations, as that would not be portable. All submitted code should run in any R5RS-conforming implementation of Scheme. Please do not modify the instructor's code, as that would make it harder to combine your attribute evaluator phase with a code generator written by someone else. If you find a bug in the instructor's code, please report it. Submit this assignment using the submit script that is documented on the course web page.