DIRECTORY SafeStorage, IO, Atom, Rope, Basics, Imager, MathExpr, AlgebraClasses; Evaluator: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; EXPR: TYPE = MathExpr.EXPR; Object: TYPE = AlgebraClasses.Object; SimpleBinaryStructureLUB: AlgebraClasses.BinaryStructureLUBOp; SimplePolyStructureForVar: AlgebraClasses.UnaryOp; BinaryStructureLUB: AlgebraClasses.BinaryStructureLUBOp; Eval: PROC[expr: EXPR, sourceStructureForMethod: Object _ NIL] RETURNS[Object]; KillVariable: AlgebraClasses.UnaryOp; KillAll: AlgebraClasses.TrueNullaryOp; END. ”Evaluator.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Arnon, March 4, 1986 12:02:24 pm PST Type Abbreviations from Imported Interfaces Evaluator Check for trivial cases; if not, see if canRecast one structure as the other; if so do it, else return NIL (thus if we get GeneralExpressions back, we know that it's really the LUB) Given variable V, returns the structure Z[V]. This one has some algebraic smarts. First calls SimpleBinaryStructureLUB, then gets fancy; if fails, returns GeneralExpressions. effects: Evaluates the input, looking first for (outermost) method in sourceStructureForMethod if nonNIL. sourceStructureForMethod must be nonNIL for nullary methods. effects: delete the Environment value associated with var, if present. Only needed when want to delete a variable name entirely, not if just want to replace. Do a ResetEnvironment, i.e. kill all variables Κ„˜codešœ Οc™Kšœ Οmœ1™Kšœ΅™΅K™—š‘œ˜2K™-K™—š‘œ&˜8Kšœ1‘œ9™‚K™—š ‘œŸœŸœ%ŸœŸœ ˜OKšœj™jKšœ<™<—K˜š‘ œ˜%Kšœ‘ œ™ŸK™—š‘œ˜&Kšœ.™.K˜K™K™——K˜KšŸœ˜J˜—…—(@