On Wed, 24 Aug 2011, SF Markus Elfring wrote: > > There is no documentation of the AST. > > It's a pity. > > > > An important point of an abstract semantic graph seems to be the notion of > > abstraction. But there is no such notion in coccinelle. > > I think that there are some abstractions used in your software already. > > > > Coccinelle needs to reconstruct the source code as is, > > so it can't abstract. > > I do not agree to this conclusion. I guess that the used data structure > "control flow graph" and the technology "computation tree logic" result in a > different view. > > > > Some of the effect of abstraction is provided by the isomorphisms, > > which in some sense introduce abstraction at the transformation > > specification level. > > I am looking for corresponding functionality from your scripting interfaces. > - Is a CFG-API available (as a class library)? > - Can a function call tree be inspected? > - How do you think about a safe drill-down from the higher level structures > to the source code tokens?
There is no effort whatsoever to make it easy to access the elements of the abstract syntax tree. You can access whatever can be bound to a metavariable. To figure out how to do that you have to study the ML code of Coccinelle. I think that if one finds onesself wanting to do a lot of that, one would be better off using another tool. julia _______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
