Boost logo

Boost :

Subject: Re: [boost] [GSoC] Helping out Phoenix v3
From: Joel de Guzman (joel_at_[hidden])
Date: 2010-04-02 21:42:07


On 4/2/2010 11:43 PM, Joel Falcou wrote:
> Ok, ppl may look at :
>
> https://www.lri.fr/svn/parall/prog_gen/branches/phoenix3/
>
> login/passwd : boost/boost
>
> to get a look at how I see the internals of the new phoenix working.
> The code is just a proto transform that evaluate any kind of expression
> and values from a fusion vector in a recursive, customizable way.
>
> Basically, it needs to be wrapped into a proper proto grammar+
> expression to hide that.
>
> Now, if you wanted to add for exampel a if_[] statement and have it
> evaluated properly you can overload either the evaluate PFO or
> specialize process_node.
>
> If you need to do otherthign with the expression, build a new evlauator
> like PFO and build another compile<T> instance (like coutning arity,
> turn the expression into a std::string, etc). You will notice that both
> the process_node and evaluator are proto agnostic.
>
> I'll advice using make_expr over const object to reduce compile-time (as
> stated in a old post of mine) and maybe use CRTP so we can imbue
> placeholder with proper method generating expression.

Joel, this is a wonderful start. I'll peruse the code when I get some time.
Let me add though that would be candidates study the phoenix code very
well. The last thing we would want to do is rewrite everything from scratch.
That's not my intent and that would be foolish. The strategy is to port the
"core" plus the extension mechanism to proto. By doing so, the rest would
follow nicely. That's what Eric (Niebler) did in his initial port. I would
insist not to wander too far from Eric's initial port, so I suggest studying
his code as well.

CC'ing Eric. Eric, could you send me the latest and the greatest of your
port for me to upload it somewhere prominent?

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net
http://www.facebook.com/djowel
Meet me at BoostCon
http://www.boostcon.com/home
http://www.facebook.com/boostcon

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk