We have two new members on the dem mailing list: Lars Hansen and Michael Werner. Mike has an interesting question about inlaws. >From werner@ccs.neu.edu Wed Jun 11 09:16:07 1997 >From: Michael M Werner >Subject: Re: role of ordering graph >To: lieber@ccs.neu.edu (Karl Lieberherr) >Date: Wed, 11 Jun 1997 09:16:05 -0400 (EDT) > >I like the idea of a set S of entry nodes as opposed to trying >to use the "vertex base" of the graph. As you may know I look >at these things from a software engineering viewpoint. The vertex >base is imho too unstable a set to be useful plus it doesn't >correspond to any software design construct that I know about. I agree. > >I am wondering if the latest formulation of a "strategy" >would allow an elegant strategy for the inlaws problem I >presented last year: > >A person object has a reference, spouse to another person object, >and siblings to a set of Person objects. An inlaw is either the >spouse of a sibling or the sibling of a spouse. The task is >to find all the inlaws of a given person. Excellent question. Here are some possibilities: Which are the right ones? Class graph: Person = [ Person] [ NList(Person)]. NList(S) ~ S {S}. ========================================================== The strategy graph is cyclic and has one node labeled Person. Person . ( through -> *,spouse,* Person . through -> *,siblings,* Person + through -> *,siblings,* Person . through -> *,spouse,* Person ) ========================================================== The strategy graph is acyclic and has 4 distict nodes labeled Person. start#Person . ( through -> *,spouse,* sp#Person . through -> *,siblings,* inlaw#Person + through -> *,siblings,* si#Person . through -> *,spouse,* inlaw#Person ) ========================================================== The strategy graph is acyclic and has 4 distict nodes labeled Person. through! means that the edge may be taken only once. start#Person . ( through! -> *,spouse,* sp#Person . through! -> *,siblings,* inlaw#Person + through! -> *,siblings,* si#Person . through! -> *,spouse,* inlaw#Person ) ========================================================== The strategy graph is cyclic and has one node labeled Person. through! means that the edge may be taken only once. Person . ( through! -> *,spouse,* Person . through! -> *,siblings,* Person + through! -> *,siblings,* Person . through! -> *,spouse,* Person ) ========================================================== > > Mike >