lambda parse tree access
Hello, i am writing a multiple dispatch framework and as i am feeling scientific i am gonna try to add a predicate dispatch fearure to it. For that i need to build big nested expression template instances that represent the predicates, so that i cant evaluate them at the time of method invocation. As an additional feature i want to sort the predicates for specifity (one predicate is true at a subset of cases of another predicate and is as such more specific) and for that i need access to the parse tree of a lambda expression. Is there documentation available on this topic and does lambda have a public interface for that? Does it make sense to use lambda as a library for writing expression template algorithms? Thanks in advance
Sascha Krissler wrote:
Hello,
i am writing a multiple dispatch framework and as i am feeling scientific i am gonna try to add a predicate dispatch fearure to it. For that i need to build big nested expression template instances that represent the predicates, so that i cant evaluate them at the time of method invocation. As an additional feature i want to sort the predicates for specifity (one predicate is true at a subset of cases of another predicate and is as such more specific) and for that i need access to the parse tree of a lambda expression. Is there documentation available on this topic and does lambda have a public interface for that? Does it make sense to use lambda as a library for writing expression template algorithms? Thanks in advance
I don't think Boost.Lambda's expression template tree data structure is documented. I am actively working on a generic expression template framework called proto. It is already checked into Boost CVS as part of xpressive (see boost/xpressive/proto on CVS HEAD). It is also being used in the development of Spirit-2. I think it would be a very good fit for what you are trying to do. Unfortunately, the code is still in some flux, and as such is not documented. I have some read-me material you might find helpful, but nothing complete or comprehensive. Let me know, and I can send it along. -- Eric Niebler Boost Consulting www.boost-consulting.com
On Sat, Dec 16, 2006 at 06:00:40PM -0800, Eric Niebler wrote:
Sascha Krissler wrote:
Hello,
i am writing a multiple dispatch framework and as i am feeling scientific i am gonna try to add a predicate dispatch fearure to it.
I am actively working on a generic expression template framework called proto. It is already checked into Boost CVS as part of xpressive (see boost/xpressive/proto on CVS HEAD). It is also being used in the development of Spirit-2. I think it would be a very good fit for what you are trying to do.
what i need is to analyze the parse tree. so basically i need to access all the information on operators, variables, constants and subexpressions as metafunctions. so a generic expression template framework is exactly what i want. as i want to sort predicates and do other stuff with them, some code may be generic enough to be included.
Unfortunately, the code is still in some flux, and as such is not documented. I have some read-me material you might find helpful, but nothing complete or comprehensive. Let me know, and I can send it along.
feed me please (use the From: address). readme files seem to be missing in the cvs. time is not such a big problem, as i still work on other parts.
Sascha Krissler wrote:
On Sat, Dec 16, 2006 at 06:00:40PM -0800, Eric Niebler wrote:
Hello,
i am writing a multiple dispatch framework and as i am feeling scientific i am gonna try to add a predicate dispatch fearure to it. I am actively working on a generic expression template framework called
Sascha Krissler wrote: proto. It is already checked into Boost CVS as part of xpressive (see boost/xpressive/proto on CVS HEAD). It is also being used in the development of Spirit-2. I think it would be a very good fit for what you are trying to do.
what i need is to analyze the parse tree. so basically i need to access all the information on operators, variables, constants and subexpressions as metafunctions. so a generic expression template framework is exactly what i want. as i want to sort predicates and do other stuff with them, some code may be generic enough to be included.
You might also be interested with Phoenix which exposes the parse tree as fusion sequences. Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net
On Sun, Dec 17, 2006 at 12:00:18PM +0900, Joel de Guzman wrote:
Sascha Krissler wrote:
what i need is to analyze the parse tree. so basically i need to access all the information on operators, variables, constants and subexpressions as metafunctions. so a generic expression template framework is exactly what i want. as i want to sort predicates and do other stuff with them, some code may be generic enough to be included.
You might also be interested with Phoenix which exposes the parse tree as fusion sequences.
whats the intended role of proto in spirit2? will phoenix build on it?
Eric Niebler
I am actively working on a generic expression template framework called proto. It is already checked into Boost CVS as part of xpressive (see boost/xpressive/proto on CVS HEAD). It is also being used in the development of Spirit-2. I think it would be a very good fit for what you are trying to do.
So I am too late again. Actually I am working on a rework (better complete redesign) of Daixtrose called etl that fits the way things work at boost and also makes use of fusion and mpl. If you are interested in some fragments of my design thoughts, please contact me by mail. I am very interested in having compile time differentiation supported right from the beginning. Also I have some thoughts about how to implement flexible disambiguation mechanisms and how to achieve non-intrusive ETs for all classes. After a first glance at proto I feel like disambiguation is not included, but I may be wrong ...
Unfortunately, the code is still in some flux, and as such is not documented. I have some read-me material you might find helpful, but nothing complete or comprehensive. Let me know, and I can send it along.
Yes, please. I have some comments on your code, but feel a little lost with all the preprocessor stuff. If you can provide some meta info like e.g. design decisions this makes a first step much easier ( especially for coders like me with lower skills than Eric N.). Markus
On 12/18/06, Markus Werle
Eric Niebler
writes: I am actively working on a generic expression template framework called proto. It is already checked into Boost CVS as part of xpressive (see boost/xpressive/proto on CVS HEAD). It is also being used in the development of Spirit-2. I think it would be a very good fit for what you are trying to do.
So I am too late again. Actually I am working on a rework (better complete redesign) of Daixtrose called etl that fits the way things work at boost and also makes use of fusion and mpl.
Unfortunately, the code is still in some flux, and as such is not
documented. I have some read-me material you might find helpful, but nothing complete or comprehensive. Let me know, and I can send it along.
Yes, please. I have some comments on your code, but feel a little lost with all the preprocessor stuff. If you can provide some meta info like e.g. design decisions this makes a first step much easier ( especially for coders like me with lower skills than Eric N.).
Markus
Add me to the list of people wanting stuff like this. I, too, was tempted to write my own, but was hoping I could use lamda or something else. Tony
participants (5)
-
Eric Niebler
-
Gottlob Frege
-
Joel de Guzman
-
Markus Werle
-
Sascha Krissler