The purpose of the homework is to implement an interpreter for a function (traverse cg og s v) where cg is a ClassGraph, og is an ObjectGraph, s is a strategy and v is a visitor. The class graph language is the language of EOPL datatypes. The object graph language is the language of EOPL datatype values constructed by the predefined constructors. The strategy language is defined by: StrategyExp : SimpleStrategy | CompoundStrategy. SimpleStrategy = “/+/” DTN DTN. CompoundStrategy = “(join StrategyExp StrategyExp “)”. where DTN is a datatype name defined by an EOPL datatype definition. A visitor is a datatype with a start and finish function and before and after functions. A visitor definition has the following format: VisitorDef = “(define-visitor” EOPLDataType [“start” LambdaExpression] [“finish” LambdaExpression] List(NJPAdvice) // in the future: List(EJPAdvice) “getReturnValue” LambdaExpression. “)”. NJPAdvice = NJoinPoint LambdaExpression. NJoinPoint = When DTN. When : Before | After. Before = “before”. After = “after”. A start or finish LambdaExpression has type (Visitor -> void). A before or after LambdaExpression has type (Visitor DTN -> void). A getReturnValue LambdaExpression has type (Visitor -> Y) where Y is the return type of the visitor. The visitor functions are invoked when the traversal reaches states as follows: The start function is called when a traversal begins, before any nodes are visited. The default behavior is to do nothing. The finish function is called when a traversal ends, after all nodes have been visited. The default behavior is to do nothing. The getReturnValue function is called on the visitor after finish() has been called on the visitor. Its return value is returned as the return value of the traversal. To simplify the implementation, we assume that the definitions are given in the following order: class graph, object graphs, strategies, visitors followed by arbitrary Scheme code that invokes traverse methods. A visitor is a datatype with a start and finish function and before and after functions. Grammar: Program = List(StrategyDef) List(VisitorDef) List(AdaptiveMethod) SchemeProgram. DataTypeDef = “(define-datatype” DTN // EOPL-style “)”. StrategyDef = “(define-strategy” StrategyName StrategyExp “)”. StrategyExp : SimpleStrategy | CompoundStrategy. SimpleStrategy = “/+/” DTN DTN. CompoundStrategy = “(join StrategyExp StrategyExp “)”. Visitor =