From: Macneil Shonle [macneil@gmail.com] Sent: Tuesday, June 29, 2004 2:49 AM To: lieber@ccs.neu.edu Subject: Re: Concrete Syntax for Objects Hi Karl, This reminds me vaugely also of what I was talking about in the section titled "Inner DSALs for Improved Code Locality" in that one page I made: http://www.cse.ucsd.edu/~mshonle/middleware.html A proper "lambda" could be made in Java with such a feature. Thanks for the message. I'd be curious about Eelco's response. -Macneil On Mon, 28 Jun 2004 12:00:43 -0400, Karl Lieberherr wrote: > > Hi Eelco: > > I just encountered your very interesting OOPSLA 2004 paper. > > Our 3D OOPSLA 2003 paper seems closely related (XAspects). Do you > agree with the comparison below? > > -- Karl > ============================================ > Concrete Syntax for Objects > Domain-Specific Language Embedding and Assimilation without > Restrictions by Martin Bravenboer and Eelco Visser OOPSLA 2004 > > MetaBorg falls into the strategic programming line of work. > > In the Demeter world we have used concrete syntax for objects since > 1988 > http://www.ccs.neu.edu/research/demeter/biblio/class-dictionaries.html > The new work has an assimilation component that is new > in its generality. > > In Demeter we would write: > JPanel panel = Jpanel.parse("some string"); > > while in MetaBorg we can write: > > JPanel panel = panel of border layout { > north = label "Welcome" > .... > } > > with the compile-time checking advantage. > > It is refreshing to see that this paper says that we use the wrong > tools like JavaCC (or ANTLR). They stress the importance of > scannerless parsing. > > Our work closest to MetaBorg is our OOPSLA 3D Track paper in 2003: > http://www.ccs.neu.edu/research/demeter/biblio/XAspects.html > > The Metaborg method has the following characteristics: > > Syntactic: > > Embedded code fragments are checked syntactically at compile-time. > Also the case in XAspects if we introduce a new aspect (e.g., > traversal aspect). > > No restrictions on syntax definition: > > XAspects is LL(k) based. > > Interaction with host language: > > Embedded code fragments should be able to refer to artifacts in the > host program and vice versa: > > XAspects also allows such interaction in both directions. > For example, a Traversal aspects refers to classes and method bodies > refer to the Traversal aspect. > > Combination of extensions: > > It is possible to combine multiple domain notations. > XAspects also has this property. > > No restrictions on assimilation: > > The translation of embedded fragments to the host language should not > be limited. It should allow global analysis. > In XAspects, translation of the traversal fragment requires global > analysis of the class graph (as an example). > > Three of the four Metaborg properties mentioned also apply to > XAspects. It would be very useful to have a better understanding of > when Metaborg and when XAspects should be used. > > One key difference between Metaborg and XAspects is that in XAspects > we don't write the embedded fragments into the Java program but into a > separate aspect. The aspect defines a new entity (e.g., a method) that > is referred to in the Java program. > > How can we implement XAspects using Metaborg? What are the benefits? > > -- Karl > >