All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] Dynamic construction of SmPL constraints
@ 2014-12-23  7:40 SF Markus Elfring
  2014-12-23  9:38 ` Julia Lawall
  0 siblings, 1 reply; 4+ messages in thread
From: SF Markus Elfring @ 2014-12-23  7:40 UTC (permalink / raw)
  To: cocci

Hello,

I try to extract data and filter on properties from various
function implementations.
Now I would like to clarify consequences from the name resolution
process of the C programming language a bit more for safer
development of semantic patches.

Implementations from separate directories can provide different properties.
It can occasionally happen that functions from different folders
have got the same name.

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?

Regards,
Markus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Cocci] Dynamic construction of SmPL constraints
  2014-12-23  7:40 [Cocci] Dynamic construction of SmPL constraints SF Markus Elfring
@ 2014-12-23  9:38 ` Julia Lawall
  2014-12-23 21:42   ` SF Markus Elfring
  0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2014-12-23  9:38 UTC (permalink / raw)
  To: cocci

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

> Hello,
>
> I try to extract data and filter on properties from various
> function implementations.
> Now I would like to clarify consequences from the name resolution
> process of the C programming language a bit more for safer
> development of semantic patches.
>
> Implementations from separate directories can provide different properties.
> It can occasionally happen that functions from different folders
> have got the same name.
>
> 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.

julia

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Cocci] Dynamic construction of SmPL constraints
  2014-12-23  9:38 ` Julia Lawall
@ 2014-12-23 21:42   ` SF Markus Elfring
  2014-12-23 21:45     ` Julia Lawall
  0 siblings, 1 reply; 4+ messages in thread
From: SF Markus Elfring @ 2014-12-23 21:42 UTC (permalink / raw)
  To: cocci

>> 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?

Regards,
Markus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Cocci] Dynamic construction of SmPL constraints
  2014-12-23 21:42   ` SF Markus Elfring
@ 2014-12-23 21:45     ` Julia Lawall
  0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2014-12-23 21:45 UTC (permalink / raw)
  To: cocci



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-12-23 21:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-23  7:40 [Cocci] Dynamic construction of SmPL constraints SF Markus Elfring
2014-12-23  9:38 ` Julia Lawall
2014-12-23 21:42   ` SF Markus Elfring
2014-12-23 21:45     ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.