
19 Dec
2010
19 Dec
'10
10:40 a.m.
Hi Tim Trees - even complex ones like abstract syntax trees for programming languages - are straight-forward to manipulate. Its easy to manipulate simple trees, it isn't too hard to manipulate complex trees - though you might want a "boilerplate removal library" like Uniplate, Scrap-Your-Boilerplate, or even an attribute grammar (UUAG). The difficulty comes when you add links / references between parts of the tree as this turns the tree into a graph. Graph manipulation without pointers is convoluted. The "moral" is to avoid turning trees into graphs if you possibly can. Best wishes Stephen