COMP 3007 Lecture Notes - Lecture 7: Eval, Operand
Document Summary
Evaluator: or interpreter, is a procedure that when applied to an expression of the language. Performs the action required to evaluate that expression: determines the meaning of expressions in a programming language. Compound expression other than a special form. Apply the value of the operator subexpression to the values of the operand subexp. Apply a compound procedure to a set of arguments, evaluate the body of the procedure in the new environment. Bootstrap: language cannot be totally defined in itself, external element is known as bootstrap. Core of the evaluator: takes as arguments. Looks up variables in environment to find their. Primitive: numbers, quoted, assignment, if, lambda, cond, begin. Apply: eval must recursively evaluate the operator part and the operands of the combination. Takes a procedure, list of args that which the procedure should apply. Can classify a procedure into either primitive or compound. Extend environment: binds params of the procedures with the arguments.