Many programming environments suffer from a rigid way to express test objects. In Dr. Scheme you need to write many make-* calls and in Java you need to write many constructor calls. For example, the following Scheme expression br1 (make-BusRoute "Route1" (list (make-Bus "Bus45" (list (make-Person "Dimitrios") (make-Person "Viera")))) (list (make-Town "Boston" (list (make-BusStop "MassAve" (list (make-Person "Bryan"))))) (make-Town "Cambridge" (list (make-BusStop "CentralSquare" (list (make-Person "Alec") (make-Person "Matthias"))))))) can be represented more succinctly as br1-succinct: Route1 buses (Bus45 (Dimitrios Viera)) towns (Boston busStops (MassAve (Bryan)) Cambridge busStops (CentralSquare (Alec Matthias))) or a variation of it. The idea is to give the users the option to choose any non-ambiguos notation to represent their test data. We specialize on LL(1) notations because non-ambiguity is undecidable. The classs dictionary behind this more succinct representation is: BusRoute = Ident "buses" List(Bus) "towns" List(Town). Bus = Ident List(Person). Town = Ident "busStops" List(BusStop). Person = Ident. BusStop = Ident List(Person). List(S) ~ "(" {S} ")". The purpose of this homework is to write a function demeter that takes as input an LL(1) class dictionary g for a language Sentences(g) and that produces as output a function that takes as input a sentence in Sentences(g) and as output we get a Scheme make-* expression that represents the same information. Your Scheme-expressions must run in Dr. Scheme, if you translate the class dictionary to Scheme define-struct data definitions. In our running example: (define-struct BusRoute (name buses towns)) (define-struct Bus (name passengers)) (define-struct Town (name busStops)) (define-struct Person (name)) (define-struct BusStop (name waiting)) Function demeter: Input: LL(1) class dictionary g Output: Function to-make Input: i in Sentences(g) Output: Scheme make expression for i Note that such a translator can save significant typing effort when defining objects. Assume a class dictionary: A1 = A2. A2 = A3. A3 = A4. ... An = An+1. An+1 = "a". The sentence (there is only one) is "a" while the Scheme make expression consists of n+1 make-* calls! Hint: For our running example, translate the class dictionary to the following one: BusRoute = "(make-BusRoute" + String List(Bus) List(Town) - ")". Bus = "(make-Bus" + String List(Person) - ")". Town = "(make-Town" + String List(BusStop) - ")". Person = "(make-Person" + String - ")". BusStop = "(make-BusStop" + String List(Person) - ")". List(S) ~ *l "(list" + + *l {*l S} - - ")". (note + - * are pretty printing directives: + indent - unindent *l new line) Pay attention to the Design Recipe. What is your Data Definition? What is your template?