You should also use the arguments -no_includes -include_headers.
julia
On Mon, 9 May 2011, Julia Lawall wrote:
> On Mon, 9 May 2011, Derek M Jones wrote:
>
> > Julia,
> >
> > Thanks for the -use_cache suggestion. I will try it
> > out on the next script.
> >
> > > You can try the -profile option to see what is taking a lot of time.
> >
> > The amount of time taken is not excessive, probably only 3'ish times
> > slower than what it would have taken to compile the source.
> >
> > > I can take a look at your semantic patch as well (I didn't see it on the
> > > blog page).
> >
> > I think your usual generosity would start to waver under the load
> > of 100 or so scripts.
> >
> > I did wonder about what information Coccinelle might be able to
> > provide for 'free', ie information it always collects when
> > processing code but does not provide a means to access.
> > For instance, the number of definitions and statements in a
> > function definition,
>
> It's not clear what this means, because statements can be nested.
>
> > or the code matched by ... .
>
> It doesn't know this. The implementation of ... keeps track of what is
> reachable from what, but not how it is reachable. How it is reachable
> would be difficult to calculate in the presence of loops. It would be
> conceptually possible to keep track of the set of control-flow graph nodes
> matched, but that is not currently expressible.
>
> > Taking Coccinelle down this path means thinking about it more
> > as an information gathering tool than a transformation tool.
> >
> > The obvious script has the problem that it does not supply
> > parameter number information:
>
> You just need a parameter list metavariable:
>
> parameter list[n] ps;
>
> Afterwards, you can use either n or ps. ps can be empty/n can be 0.
>
> When you inherit n into python it is a string (although when you inherit n
> into ocaml, it is an integer).
>
> julia
>
> > @ fn_p_any @
> > type ret_T, pany_T;
> > identifier fn, p_any;
> > @@
> >
> > ret_T fn(..., pany_T p_any, ...)
> > {
> > ... when != p_any
> > }
> >
> > @script:python @
> > param_any << fn_p_any.p_any;
> > func << fn_p_any.fn;
> > @@
> > print "unused", func, param_any
> >
> > so I wrote lots of patterns like:
> >
> > @ fn_no_p1 @
> > type ret_T, p1_T;
> > identifier fn, p1;
> > @@
> >
> > ret_T fn(p1_T p1)
> > {
> > ... when != p1
> > }
> >
> > @script:python @
> > param_1 << fn_no_p1.p1;
> > func << fn_no_p1.fn;
> > @@
> > print "1_1", func, param_1
> >
> > to match particular instances.
> >
> > >
> > > julia
> > >
> > >
> > > > Trying out a new idea with something that takes 300+ hours to run is a
> > > > bit
> > > > impractical.
> > > >
> > > > Does anybody have any thoughts on:
> > > >
> > > > o converting the source to some intermediate form that will
> > > > speed up Coccinelle processing,
> > > >
> > > > o using Coccinelle in the cloud, eg Amazon,
> > > >
> > > > o speeding up Coccinelle.
> > > >
> > > > --
> > > > Derek M. Jones tel: +44 (0) 1252 520 667
> > > > Knowledge Software Ltd mailto:[email protected]
> > > > Source code analysis http://www.knosof.co.uk
> > > > _______________________________________________
> > > > Cocci mailing list
> > > > [email protected]
> > > > http://lists.diku.dk/mailman/listinfo/cocci
> > > > (Web access from inside DIKUs LAN only)
> > > >
> > > >
> > >
> >
> > --
> > Derek M. Jones tel: +44 (0) 1252 520 667
> > Knowledge Software Ltd mailto:[email protected]
> > Source code analysis http://www.knosof.co.uk
> > _______________________________________________
> > Cocci mailing list
> > [email protected]
> > http://lists.diku.dk/mailman/listinfo/cocci
> > (Web access from inside DIKUs LAN only)
> >
>
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)