Hi Doug: >From dougo@ccs.neu.edu Tue Nov 3 16:08:12 1998 >From: Doug Orleans >Date: Tue, 3 Nov 1998 16:07:58 -0500 (EST) >To: Karl Lieberherr >Cc: jayantha@ccs.neu.edu, johan@ccs.neu.edu, lorenz@ccs.neu.edu, > mira@ccs.neu.edu >Subject: Re: Demeter/Java priority list > >Karl Lieberherr writes: > > The most urgent task is that in the AP library the following work: > > > > Strategies going through alternation classes. > >Can you be more specific? I don't remember any bugs with strategies >going through alternation classes, just one with around methods & alt >classes. I had a cd like: A = B Q. B : C | D. C = Z. D = Z. ... traversal: from A via B to Z that did not work. But I found a work-around: A = B Q. B = B1. B1 : C | D. C = Z. D = Z. ... and it worked. This needs to work without work-around. > > > >From the BUGS file: > > > > ** name mappings for strategies > >This is done, except for negative constraints, which I am working on. > > > ** strategies through an edge > > > > You should be able to say "through -> *,x,*" in a strategy. > >This has some subtleties, but shouldn't be too hard. I still would >like some input to my question about the meaning of "through -> A,a,A". From Doug: So here's a dilemma: What does "via A only-through -> A,a,A to A" mean? Does it mean we must go through at least 1 self-edge, or does it include the option of going through no edges? What's implemented is the latter, and to me it seems slightly more intuitive: "only through edge a" means "not through any edge which is not a". This also jibes with the notion of only-through being a "negative constraint" on the strategy edge, even though it's expressed positively, since we're excluding edges. It's less intuitive, though, when you consider that "via -> A,a,A" gets translated into the above (conceptually; this isn't implemented currently, but it's our standard workaround), but "via edge a" seems to imply that it must go through edge a at least once. This isn't addressed in the strategies paper, either, since a strategy graph only talks about nodes in the class graph, not edges. This situation comes up in the in-laws example, where we want to go from Person via -> *,spouse,* via Person via -> *,sibling,* to Person. (Or, with a name map, Person via -> *,spouse,* via Spouse via -> *,sibling,* to Inlaw, where Spouse and Inlaw are mapped to Person.) We don't want to go through zero spouse edges, we need to go through at least one (and no more than one, but that's can be handled by bypassing Person). From Karl: The strategy paper says: An element predicate for G is a predicate over V union E. A function B mapping each edge of S to an element predicate for G is called a constraint map for S and G. only-through -> A,a,A means: keep only -> A,a,A: for all others the element predicate is false. >Does it mean we >must go through at least 1 self-edge, or does it include the option of >going through no edges? >What's implemented is the latter. What you have implemented is correct according to the semantics in the paper with Boaz. We allow trivial paths. The path set of from A to A also includes the trivial path. >It's less intuitive, though, when you consider that "via -> A,a,A" >gets translated into the above (conceptually; this isn't implemented >currently, but it's our standard workaround), but "via edge a" seems >to imply that it must go through edge a at least once. >This isn't >addressed in the strategies paper, either, since a strategy graph only >talks about nodes in the class graph, not edges. The constraint map of a strategy graph talks about class graph edges. I agree with you that "via -> A,a,A" is misleading in this case. It really does not force the traversal of the self-loop. To force the traversal of a self-loop twice we use a name map: from X via Y to Z {bypassing {X,Y,Z}} X -> A Y -> A Z -> A In the ICG, we have: X = Y. Y = Z. or something similar. Because of the path expansion condition fundamental to strategies we must go through an edge from A to A twice. I was just talking to Doug and he was pointing out that he needs to change the implementation of intercopy edges. > > > ** named strategies > > > > You should be able to name a strategy and refer to it in a later > > strategy expression. > >This should be straightforward. Johan, did you do this already as >part of your one-class-per-traversal stuff? Johan has done something. > > > Those are in order of priority. Does this ordering look right? > >Well, the strategies through an edge will be the hardest, so I'd >prefer to do it last. Also, there's a workaround that works in most >cases: replace > > through -> X,y,Z > > with > > via X only-through -> X,y,Z via Z > >but there's a bug there that Johan reported that I haven't tracked >down yet. > > > Please can you make a time plan for those bug fixes. > >Name mappings: Thursday. >Named strategies: Monday. >Through an edge: end of next week, maybe? > >--Doug > Great plan. -- Karl