From bdelav@hotmail.com Sun Nov 22 08:52:53 1998 Received: from hotmail.com (f69.hotmail.com [207.82.251.209]) by amber.ccs.neu.edu (8.9.1a/8.9.1) with SMTP id IAA09021 for ; Sun, 22 Nov 1998 08:46:50 -0500 (EST) Received: (qmail 24708 invoked by uid 0); 22 Nov 1998 13:46:19 -0000 Message-ID: <19981122134619.24707.qmail@hotmail.com> Received: from 204.215.172.111 by www.hotmail.com with HTTP; Sun, 22 Nov 1998 05:46:18 PST X-Originating-IP: [204.215.172.111] From: "Bill de la Vega" To: dougo@ccs.neu.edu Cc: lieber@ccs.neu.edu, ichenp@ccs.neu.edu Subject: TGVertex v Vertex MIME-Version: 1.0 Content-Type: text/plain Date: Sun, 22 Nov 1998 05:46:18 PST Status: R Thanks for the pointer, Doug. Small questions: I also need to know a little about Vertex, the thing returned by ClassGraph.findVertex(NameI c); In the (0.7.2) code there is TGVertex. Are you renaming it or are they 2 different classes? I assume that the Enumerations from Enumeraton TraversalGraph.vertices(); Enumeraton TraversalGraph.edges(); contain Vertex & Edge objects. Separate broader issue: Before I took a good look at the tg interface, I started creating a Vertex & an Edge class. But if I can see the source for your Graph, Vertex & Edge classes I will use those. It seems like they must be core to Demeter, so they must be well used (read as: finished, debugged, & generally better than what I would write). Is this reasonable to you? i.e., Do you think that they will change enough to warrant me creating separate classes? It seems to me that even if you expect them to change quite a bit, I should still utilize them since this work is expected to be integrated. ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com From dougo@ccs.neu.edu Sun Nov 22 15:31:42 1998 Received: from vega.ccs.neu.edu (dougo@vega.ccs.neu.edu [129.10.116.206]) by amber.ccs.neu.edu (8.9.1a/8.9.1) with ESMTP id PAA18188; Sun, 22 Nov 1998 15:31:40 -0500 (EST) Received: (from dougo@localhost) by vega.ccs.neu.edu (8.9.1a/8.9.1) id PAA11922; Sun, 22 Nov 1998 15:31:39 -0500 (EST) From: Doug Orleans Date: Sun, 22 Nov 1998 15:31:38 -0500 (EST) To: "Bill de la Vega" Cc: lieber@ccs.neu.edu, ichenp@ccs.neu.edu, dougo@ccs.neu.edu Subject: Re: TGVertex v Vertex In-Reply-To: <19981122134619.24707.qmail@hotmail.com> References: <19981122134619.24707.qmail@hotmail.com> X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <13912.28222.647443.892603@vega.ccs.neu.edu> X-Face: (4D-osoq?}7M3\EgvbWKo Small questions: > I also need to know a little about Vertex, the thing returned by > ClassGraph.findVertex(NameI c); > In the (0.7.2) code there is TGVertex. Are you renaming it or are they 2 > different classes? I renamed it, although it also changed a bit. Why do you need to use findVertex? That was part of the old interface, and I forgot to take it out of the new public interface. I think you should be able to get along without using Vertex, as long as you don't need the mark sets (for multi-edge strategies) (which will have their own interface eventually). > I assume that the Enumerations from > Enumeraton TraversalGraph.vertices(); > Enumeraton TraversalGraph.edges(); > contain Vertex & Edge objects. Nope: /** An enumeration of the vertices (NameI objects) in the traversal graph. */ edges() does, though, but that will likely change or go away-- I only put it there for symmetry. The generator doesn't use it. > Separate broader issue: > Before I took a good look at the tg interface, I started creating a > Vertex & an Edge class. But if I can see the source for your Graph, > Vertex & Edge classes I will use those. It seems like they must be core > to Demeter, so they must be well used (read as: finished, debugged, & > generally better than what I would write). > > Is this reasonable to you? i.e., Do you think that they will change > enough to warrant me creating separate classes? It seems to me that even > if you expect them to change quite a bit, I should still utilize them > since this work is expected to be integrated. Well, the generator uses its own classes for vertices and edges in the class graph, mainly because the form of the grammar for the input language dictates the structure. If you're going to be using the class dictionary grammar, you should just use the generator source code (or at least its class structure); unfortunately I haven't put that into its own package yet, but that's the long-term goal. Same with strategy graphs. Even if you don't need to use any particular syntax, it's probably a good idea to have your own classes for vertices and edges; the tg package classes are mainly meant to be internal to that package. The current main exception is that the meetsConstraint method (which your StrategyGraphI implementation must implement) takes an Edge object as an argument; you can use this method and abstract visitor to traverse it: Edge { traversal toAll(EdgePartsVisitor); } EdgePartsVisitor { before { Edge, CEdge, AEdge, IEdge, -> Edge,source,Vertex, -> Edge,dest,Vertex, -> Vertex,name,NameI, -> CEdge,name,NameI }; after { Edge, CEdge, AEdge, IEdge, -> Edge,source,Vertex, -> Edge,dest,Vertex, -> Vertex,name,NameI, -> CEdge,name,NameI }; } In other words, make your own visitor as a subclass of EdgePartsVisitor, and define before & after methods that are subsets of the ones listed here, and call Edge.toAll() with it. This is kind of a shady part of the interface that may go away eventually, but use it if you need to. The current source (using the new tg package interface) is in ~dougo/demjava/src. Let me know if you have any questions about it. --Doug From bdelav@hotmail.com Sun Nov 22 15:55:14 1998 Received: from hotmail.com (f258.hotmail.com [207.82.251.149]) by amber.ccs.neu.edu (8.9.1a/8.9.1) with SMTP id PAA18810 for ; Sun, 22 Nov 1998 15:55:13 -0500 (EST) Received: (qmail 22066 invoked by uid 0); 22 Nov 1998 20:54:41 -0000 Message-ID: <19981122205441.22065.qmail@hotmail.com> Received: from 204.215.172.110 by www.hotmail.com with HTTP; Sun, 22 Nov 1998 12:54:40 PST X-Originating-IP: [204.215.172.110] From: "Bill de la Vega" To: dougo@ccs.neu.edu Cc: lieber@ccs.neu.edu, ichenp@ccs.neu.edu Subject: Re: TGVertex v Vertex MIME-Version: 1.0 Content-Type: text/plain Date: Sun, 22 Nov 1998 12:54:40 PST Status: R >Bill de la Vega writes: > > Small questions: > > I also need to know a little about Vertex, the thing returned by > > ClassGraph.findVertex(NameI c); > > In the (0.7.2) code there is TGVertex. Are you renaming it or are they 2 > > different classes? > >I renamed it, although it also changed a bit. Why do you need to use >findVertex? I don't need findVertex. It's the only part of the interface that mentions Vertex directly. So I used it as an example for clarity. Since the Enumeraton TraversalGraph.vertices(); _doesn't_ return Vertexs I won't use them. > That was part of the old interface, and I forgot to take >it out of the new public interface. I think you should be able to get >along without using Vertex, as long as you don't need the mark sets >(for multi-edge strategies) (which will have their own interface >eventually). > > > I assume that the Enumerations from > > Enumeraton TraversalGraph.vertices(); > > Enumeraton TraversalGraph.edges(); > > contain Vertex & Edge objects. > >Nope: > /** An enumeration of the vertices (NameI objects) in the traversal graph. */ > >edges() does, though, but that will likely change or go away-- I only >put it there for symmetry. The generator doesn't use it. > > > Separate broader issue: > > Before I took a good look at the tg interface, I started creating a > > Vertex & an Edge class. But if I can see the source for your Graph, > > Vertex & Edge classes I will use those. It seems like they must be core > > to Demeter, so they must be well used (read as: finished, debugged, & > > generally better than what I would write). > > > > Is this reasonable to you? i.e., Do you think that they will change > > enough to warrant me creating separate classes? It seems to me that even > > if you expect them to change quite a bit, I should still utilize them > > since this work is expected to be integrated. > >Well, the generator uses its own classes for vertices and edges in the >class graph, mainly because the form of the grammar for the input >language dictates the structure. If you're going to be using the class >dictionary grammar, you should just use the generator source code (or >at least its class structure); unfortunately I haven't put that into >its own package yet, but that's the long-term goal. Same with >strategy graphs. Even if you don't need to use any particular syntax, >it's probably a good idea to have your own classes for vertices and >edges; the tg package classes are mainly meant to be internal to that >package. OK, I'll use my own. Thanks for the help, Bill. ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com