Re: [Cocci] More precise distinction of types for source code searches?

2019-06-26 Thread Markus Elfring
> @@ > expression x; > constant c1,c2; > @@ > > x = c1; The SmPL manual contains the promising wording “As metavariables are bound and inherited across rules, …”. https://github.com/coccinelle/coccinelle/blob/c6d7554edf7c4654aeae4d33c3f040e300682f23/docs/manual/cocci_syntax.tex#L179 The mentioned

Re: [Cocci] More precise distinction of types for source code searches?

2019-06-25 Thread Markus Elfring
> @@ > expression x; > constant c1,c2; > @@ > > x = c1; > ( > x = c1; > | > *x = c2; > ) Thanks for your suggestion of the possible usage of a SmPL disjunction. * Does it indicate a search attempt to match the first assignment statement twice (for the implementation of exclusion of duplicate s

Re: [Cocci] More precise distinction of types for source code searches?

2019-06-25 Thread Julia Lawall
On Tue, 25 Jun 2019, Markus Elfring wrote: > > The expected difference can trigger the need to express this detail > > by the usage of two identifiers based on the same metavariable type. > > I guess that this wording should be clarified a bit more according to > the current software developmen

Re: [Cocci] More precise distinction of types for source code searches?

2019-06-25 Thread Markus Elfring
> The expected difference can trigger the need to express this detail > by the usage of two identifiers based on the same metavariable type. I guess that this wording should be clarified a bit more according to the current software development status around the semantic patch language. A selection

[Cocci] More precise distinction of types for source code searches?

2019-06-24 Thread Markus Elfring
Hello, The semantic patch language supports metavariables. It can occur then that a source code search should be performed for items which should be different while they belong still to the same data type. (If these items would be identical, the software situation would provide opportunities to si