[Cocci] Wildcard matching
Derek M Jones
derek at knosof.co.uk
Thu Apr 30 14:29:09 CEST 2009
>> Is there any way around this? I don't think it should be necessary to
>> write *all* versions of these functions?
> Since there is no particular reason why a function whose name contains a
> particular substring has a particular function, Coccinelle doesn't support
> wildcards. Perhaps you can find some other distinguishing feature of the
> function, such as its argument type (I guess not in this case) or the type
> that it returns. Otherwise, you have to write them all out.
There is lots of empirical evidence to suggest that developers do use
particular substrings to denote related functionality.
and for more than you could possibly want to know about identifiers
Working on mining common sequences of operations
provides more evidence that some sequences appear throughout source.
Derek M. Jones tel: +44 (0) 1252 520 667
Knowledge Software Ltd mailto:derek at knosof.co.uk
Source code analysis http://www.knosof.co.uk
More information about the Cocci