Hi I-Chen: You are on the right track! The translation is best done with Demeter/Java. -- Karl >From ichenp@ccs.neu.edu Thu Dec 3 02:17:55 1998 >Subject: Re: Help (AP Lib tg)! > > Do I write this program in Demeter/Java or just Java? I am doing the >EventTranslation in Demeter/Java. I guess I'm on the wrong track. > > -IC > >On Tue, 1 Dec 1998, Karl Lieberherr wrote: > >> >> Bill is right. But lets make it simpler for I-Chen: >> Let's make it a self-contaioned problem where input is text >> and output is text. The text describes the event objects. >> >> I-Chen: Write a program that does the following translation: >> >> Example: >> Class graph: >> A = B C. >> B = D. >> C = E F. >> D = G. >> G = Z. >> E = Z. >> F = Z. >> >> Object traversed: A-object (there is only one) >> >> Strategy: >> S1: A -> * >> S2: A -> D D -> Z >> S1 S2 >> before A before A >> before ->A,B before ->A,D >> before B >> before ->B,D >> before D before D >> before ->D,G before ->D,Z >> before G >> before ->G,Z >> before Z before Z >> after Z after Z >> after ->G,Z >> after G >> after ->D,G after ->D,Z >> after D after D >> after B >> before C >> ... ... >> after ->A,B after ->A,D >> after A after A >> >> The input and output language has a cd like: >> >> Event = Kind NodeOrEdge. >> Kind : Before | After. >> Before = "before". >> After = "after". >> NodeOrEdge : Node | Edge. >> Edge = "->" Node Node. >> Node = Ident. >> >> You write a program: >> >> Input: cd, s1 >> e1 = List(Event) >> Output: e2 = List(Event) >> e2 contains only the events at the s1 level. >> >> Notice the simplification: only one strategy! >> >> Let me know when you are done with this >> self-contained problem. Then we can bringin the >> beans if there is time left. >> >> Let me know if this problem formulation is not clear. >> >> > >> >>Q >> >>(3) The mapping process is still very confusing to me, when is it done? >> >>I mean, like when the APPC beans are created or ...? >> > >> >During our discussion on Friday afternoon 11/20/98, I was told that the >> >traversal bean should traverse the objects of the CCG. So the events >> >that you recieve will be over the CCG. >> > >> >> That is correct. >> >> > >> >(Note: I had previously thought that the Traversal Bean would generate >> >events over the ICG, and the Adapter Bean would handle the actual CCG >> >objects.) >> >> This would not work so well because the same traversal might drive >> lots of APPCs each one listening to some other part of the traversal. >> >> > >> >This means the traversal bean must know about the icg, ccg & the >> >mapping. The strategy transducer needs to know about the ccg & the >> >refined strategy. >> > >> >> I think we should just make the Summing example work as our goal. >> >>so there will be two APPC beans, (Summing and Container?, not sure ), >> >>one traversal bean, the strategy transducer and a Test program >> >>(Main.java) which creates all the objects above. >> >> What are the remaining questions regarding the Summing example? >> I was hoping it would be done by now. :-) >> >> > >> >I assume you mean reverse engineer those beans (not generate them from >> >the APPC language). It may be as far as we get. The Traversal Bean is >> >not finished yet. It is unfortunate, as I was looking forward to doing >> >something more with Demeter Java. >> > >> >> yes, that was the idea. Mira and David have pitched in quite a >> bit of code to start so that you can do some of the translation >> with Demeter/Java. >> >> Maybe the best thing now is that Bill does the summing example >> (with more help from Mira and David, if needed) >> and I-Chen the transducer described earlier. >> > >> > >> >Professor Lieberherr, >> >I cced you so you could get a little update as well as respond if I'm >> >mistaken. >> > >> >______________________________________________________ >> >Get Your Private, Free Email at http://www.hotmail.com >> > >> -- Karl >> > >