Menu

#21 Ride parallel reductions on a single tree traversal

open
6
2012-08-29
2011-03-29
Tom Harwood
No

"Mix-in" reduction-time code would be useful to allow auxiliary processing to be enabled or disabled (or run in a separate pass over the tree) as desired by the caller.

Discussion

  • Tom Harwood

    Tom Harwood - 2011-03-29

    The labeling pass is the unch in the crunch here -- if both passes matched the same patterns then they could run independently. However, fully independent implementation is not always what's required; sometimes the auxiliary pass generates information for the main pass.

     
  • Tom Harwood

    Tom Harwood - 2011-04-06

    There is a very similar requirement to separate reduction logic from tree parsing logic.
    One possible syntax is:

    nonterminal = Pattern fooBar Reduction fooReduceRoutine;

    Or, for ride-along annotations:

    nonterminal = Pattern fooBar Annotation processFoo
    {
    return reduction_result;
    }

     

Log in to post a comment.

MongoDB Logo MongoDB