Re: [Cocci] Checking statement order for patch generation with SmPL support

2017-09-08 Thread Julia Lawall
> > Execution can go from queuefree to the top of the loop, to the first if in > > the loop to the second if in the loop that has the dereference. That is > > how loops work. > > I can agree to this view. > > But I find the existence of a loop not so relevant for the source code > search pattern w

Re: [Cocci] Checking statement order for patch generation with SmPL support

2017-09-08 Thread SF Markus Elfring
>> I wonder also about the information how an ordinary for loop could influence >> the shown source code analysis result for the function >> “snd_seq_queue_find_name” >> when the questionable marked statements are contained in a single if branch. >> http://elixir.free-electrons.com/linux/v4.13/sou

Re: [Cocci] Checking statement order for patch generation with SmPL support

2017-09-07 Thread SF Markus Elfring
> Thers is a control-flow path from the bottom of a loop back up to the top. I wonder also about the information how an ordinary for loop could influence the shown source code analysis result for the function “snd_seq_queue_find_name” when the questionable marked statements are contained in a sing

Re: [Cocci] Checking statement order for patch generation with SmPL support

2017-09-07 Thread Julia Lawall
On Thu, 7 Sep 2017, SF Markus Elfring wrote: > > Thers is a control-flow path from the bottom of a loop back up to the top. > > I wonder also about the information how an ordinary for loop could influence > the shown source code analysis result for the function > “snd_seq_queue_find_name” > whe

Re: [Cocci] Checking statement order for patch generation with SmPL support

2017-09-07 Thread SF Markus Elfring
>> But I have got difficulties to interpret it in an useful way. > > Coccinelle follows control-flow paths. This information is generally fine. > Thers is a control-flow path from the bottom of a loop back up to the top. I can not follow with my intermediate understanding to such a view at the

Re: [Cocci] Checking statement order for patch generation with SmPL support

2017-09-07 Thread Julia Lawall
On Thu, 7 Sep 2017, SF Markus Elfring wrote: > >> Now I wonder why the software “Coccinelle 1.0.6-00242-g3f038a5d” finds > >> this place relevant when the function call sequence does not fit to the > >> order > >> I tried to express for a known use case. > >> I would appreciate further advice.

Re: [Cocci] Checking statement order for patch generation with SmPL support

2017-09-07 Thread SF Markus Elfring
>> Now I wonder why the software “Coccinelle 1.0.6-00242-g3f038a5d” finds >> this place relevant when the function call sequence does not fit to the order >> I tried to express for a known use case. >> I would appreciate further advice. > > Because there is a loop, This information is appropriate

[Cocci] Checking statement order for patch generation with SmPL support

2017-09-07 Thread SF Markus Elfring
Hello, I have constructed another small script for the semantic patch language. @usage@ identifier action, member, release=~"^.+free$"; expression context; @@ *release(context); <+... *action(..., (context)->member, ...) ...+> The following source code place can be found by such a simple appr

Re: [Cocci] Checking statement order for patch generation with SmPL support

2017-09-07 Thread Julia Lawall
On Thu, 7 Sep 2017, SF Markus Elfring wrote: > Hello, > > I have constructed another small script for the semantic patch language. > > @usage@ > identifier action, member, release=~"^.+free$"; > expression context; > @@ > *release(context); > <+... > *action(..., (context)->member, ...) > ...+