Hi Daniel: Thank you for your update on your project. Here is a bit of Princeton history related to traversal strategies (succinct path set specifications) which might be a useful tool for your project. (I was on the Princeton faculty for 4 years during which 3 of my students got their Ph.D.) Dick Lipton had a project on succinct graph specifications and a Ph.D. student, Hana Galperin, who wrote her Ph.D. thesis on this topic. This sparked my interest in succinct graph specifications and I found a good application in object-oriented programming. Our latest work in this area is at: ftp://ftp.ccs.neu.edu/pub/people/lieber/strategies.ps We have refined this technology during the last 7 years and is used in several compiler projects including in an industrial project for writing compilers for application specific languages. http://www.ccs.neu.edu/research/demeter/evaluation/gte-labs/ Daniel writes: >Traversals seem to be a nice way to describe arbitary graph walks, >but it's not clear that in a compiler context you'd need anything more than >a few tree walks like pre or post order. Traversals are ubiquitous. You can view a single method as a traversal: you traverse one object. But most of the time you traverse entire clusters of objects. Daniel writes: >The long term plans are to have the ASDL tool asdlGen generate visitor >patterns for the OO languages we support (Java and C++), but this feature >probably isn't going to make it into the first relase of asdlGen planned for >this January. Supporting the visitor pattern is what we do very well. We also have an abstract syntax description language similar to yours. See: http://www.ccs.neu.edu/research/demeter/DemeterJava/use/ for our source code and http://www.ccs.neu.edu/research/demeter/DemeterJava/use/latest-demjava/demjava.cd for the meta model of Demeter/Java. Daniel writes: >Since I haven't finalized on any of the details of the support >for visitors in asdlGen, maybe it'll be worth while for you to send me some >hints after the first relase makes it out. Ideally, I'd just like to provide >enough knobs on the asdlGen tool so you can tweak it to get the kind of code >your taversal tool needs. There's a demo of the asdlGen on the webpage I >listed above, so it'll give you an idea of what kind of code we are >producing from ASDL specifications. I am happy to give you advice on how strategies and visitors are best used in ASDL. I have run your tool over the web and found many similarities to how Demeter/Java generates code. See: http://www.ccs.neu.edu/research/demeter/DemeterJava/use/ for info about Demeter/Java and http://www.ccs.neu.edu/research/demeter/ for info. about Demeter in general. Best regards, -- Karl ==================================== >From danwang@CS.Princeton.EDU Mon Nov 24 11:28:34 1997 >To: lieber@ccs.neu.edu >Cc: zephyr@virginia.edu >Subject: Re: Lieberherr message >From: Daniel Wang >Date: 24 Nov 1997 11:28:21 -0500 >In-Reply-To: Norman Ramsey's message of Mon, 24 Nov 1997 08:04:19 -0500 >Message-ID: > >> ------- Forwarded Message >> From: Karl Lieberherr >> Received: (lieber@localhost) >> by stockberg.ccs.neu.edu (8.8.6/8.6.4) id WAA00831; Wed, 29 Oct 1997 22:56:36 -0500 (EST) >> Date: Wed, 29 Oct 1997 22:56:36 -0500 (EST) >> Message-Id: <199710300356.WAA00831@stockberg.ccs.neu.edu> >> To: zephyr-investigators@virginia.edu >> Subject: Zephyr and traversal strategies >> Cc: dem@ccs.neu.edu >> >> Hi: >> >> Mitchell Wand told me about your interesting Zephyr project. >> I thought I would share the idea of traversal strategies with you since we >> find it to be very useful to traverse abstract syntax trees. >{stuff deleted} > >> Since both your and our project is supported by DARPA and NSF, it would >> be interesting to have some sharing of know-how. >> >> We in turn would like to use your compiler infrastructure project >> to compile Demeter/Java directly into machine code, >> provided it supports a traversal/visitor style of programming >> based on traversal strategies. > > >I'm one of the students reponsible for the ASDL tools. > http://www.cs.princeton.edu/zephyr/ASDL > >I haven't had time to carefully examine everything, but I'm not sure exactly >how the traversal style of programming will be useful in a compiler >context. Traversals seem to be a nice way to describe arbitary graph walks, >but it's not clear that in a compiler context you'd need anything more than >a few tree walks like pre or post order. > >The long term plans are to have the ASDL tool asdlGen generate visitor >patterns for the OO languages we support (Java and C++), but this feature >probably isn't going to make it into the first relase of asdlGen planned for >this January. Since I haven't finalized on any of the details of the support >for visitors in asdlGen, maybe it'll be worth while for you to send me some >hints after the first relase makes it out. Ideally, I'd just like to provide >enough knobs on the asdlGen tool so you can tweak it to get the kind of code >your taversal tool needs. There's a demo of the asdlGen on the webpage I >listed above, so it'll give you an idea of what kind of code we are >producing from ASDL specifications. >