[Cocci] Dynamic construction of SmPL constraints

Julia Lawall julia.lawall at lip6.fr
Tue Dec 23 22:45:05 CET 2014



On Tue, 23 Dec 2014, SF Markus Elfring wrote:

> >> I see that there are some development challenges when I would like
> >> to construct SmPL constraints in the way that they will take the directory
> >> hierarchy for a source file into account.
> >> How can this functionality be achieved?
> > 
> > You always have the file name information available in a position
> > variable.
> > 
> > Without knowing concretely what you want to do that is the only suggestion
> > that I have.
> 
> I try to prepare my semantic patches for name space issues with the
> C programming language. A few of my SmPL approaches should be applicable in
> general ways so that I can avoid efforts at other places.
> 
> It seems that SmPL constraints are set up at start of the program "spatch".
> I imagine that more fine-tuning will help to achieve safer and better
> handling of relevant background information at the moment when a concrete
> source file should be analysed.
> The directory hierarchy should influence the identifier selection somehow,
> shouldn't it?

I'm not sure that this is a reasonable direction of thought.  There can be 
multiple definitions in some directories that are used in completely 
disjoint directories.  On the other hand, a single file can have multiple 
definitions of the same function.

julia


More information about the Cocci mailing list