Re: [Cocci] Checking influence of loops?

2019-04-13 Thread Markus Elfring
>>> Typically when there is a loop or goto.
>>
>> I find such a case distinction interesting.
>>
>>
>>> But there is no special handling of either construct.
>>
>> Does this information contain a contradiction?
>
> No.  Draw a control flow graph of a loop and see what should happen for
> such a pattern.

I am still curious if it can be achieved that two statements
(with a SmPL ellipsis between them) will be found only at different positions.

How should be excluded that two generic search specifications
will be merged?

Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] Checking influence of loops?

2019-04-13 Thread Markus Elfring
>>> If you have a pattern like
>>>
>>> AAA
>>> ...
>>> BBB
>>>
>>> The AAA and BBB might match the same code
>>
>> I agree to this information in principle.
>> But I imagine that this source code should be found
>> at different positions.
>
> No there is no such constraint.

My software expectations might be different from your view here.


>>> if there is a possible flow of execution from the match
>>> of AAA to itself.
>>
>> I am curious on the circumstances when such details
>> would be really relevant.
>
> Typically when there is a loop or goto.

I find such a case distinction interesting.


> But there is no special handling of either construct.

Does this information contain a contradiction?

Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] Checking influence of loops?

2019-04-13 Thread Julia Lawall



On Sat, 13 Apr 2019, Markus Elfring wrote:

> >> Should two search specifications (with SmPL ellipses) between them
> >> be kept separate for the desired diff output?
> >
> > I don't understand any of your answers precisely.
>
> I hope that we can come closer again to a better understanding
> of the reported software situation.
>
>
> > If you have a pattern like
> >
> > AAA
> > ...
> > BBB
> >
> > The AAA and BBB might match the same code
>
> I agree to this information in principle.
> But I imagine that this source code should be found
> at different positions.

No there is no such constraint.

>
>
> > if there is a possible flow of execution from the match
> > of AAA to itself.
>
> I am curious on the circumstances when such details
> would be really relevant.

Typically when there is a loop or goto.  But there is no special handling
of either construct.

julia
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] Checking influence of loops?

2019-04-13 Thread Markus Elfring
>> Should two search specifications (with SmPL ellipses) between them
>> be kept separate for the desired diff output?
>
> I don't understand any of your answers precisely.

I hope that we can come closer again to a better understanding
of the reported software situation.


> If you have a pattern like
>
> AAA
> ...
> BBB
>
> The AAA and BBB might match the same code

I agree to this information in principle.
But I imagine that this source code should be found
at different positions.


> if there is a possible flow of execution from the match
> of AAA to itself.

I am curious on the circumstances when such details
would be really relevant.

Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] Checking influence of loops?

2019-04-13 Thread Julia Lawall


On Sat, 13 Apr 2019, Markus Elfring wrote:

> > Your ifs may be in a loop.
> 
>  Does your technology treat this control flow in special ways?
> >>>
> >>> No.
> >>
> >> Would the quoted information be irrelevant then for the discussed use case?
> >
> > No idea what the above means.
>
> It seems that there is another communication difficulty involved.
>
> Your feedback indicated concerns for the handling of loops
> in the shown source code search results, didn't it?
>
>
> > There are control flow paths that cause ... to connect things.
>
> I guess that these “connections” need further clarifications.
>
>
> > The process of matching doesn't know if the connection is due to a loop,
> > and if, a goto, or anything else.
>
> Should two search specifications (with SmPL ellipses) between them
> be kept separate for the desired diff output?

I don't understand any of your answers precisely.

If you have a pattern like

AAA
...
BBB

The AAA and BBB might match the same code if there is a possible flow of
execution from the match of AAA to itself.

julia___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] Checking influence of loops?

2019-04-13 Thread Markus Elfring
> Your ifs may be in a loop.

 Does your technology treat this control flow in special ways?
>>>
>>> No.
>>
>> Would the quoted information be irrelevant then for the discussed use case?
>
> No idea what the above means.

It seems that there is another communication difficulty involved.

Your feedback indicated concerns for the handling of loops
in the shown source code search results, didn't it?


> There are control flow paths that cause ... to connect things.

I guess that these “connections” need further clarifications.


> The process of matching doesn't know if the connection is due to a loop,
> and if, a goto, or anything else.

Should two search specifications (with SmPL ellipses) between them
be kept separate for the desired diff output?

Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] Checking influence of loops?

2019-04-13 Thread Markus Elfring
>>> Your ifs may be in a loop.
>>
>> Does your technology treat this control flow in special ways?
>
> No.

Would the quoted information be irrelevant then for the discussed use case?

Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] Checking influence of loops?

2019-04-13 Thread Markus Elfring
> Your ifs may be in a loop.

Does your technology treat this control flow in special ways?

Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci