Re: [Cocci] Concerns around type safety for usage of expressions

2019-11-22 Thread Markus Elfring
>> 2. Can the data type become restricted not only by the detail >>that it refers to a pointer? > > You can put any type, such as int x;. You can also put parts of types > such as expression * x; or struct x; This information fits to my wording for restricted searches, doesn't it? >> 3. Why

Re: [Cocci] Concerns around type safety for usage of expressions

2019-11-22 Thread Julia Lawall
On Fri, 22 Nov 2019, Markus Elfring wrote: > > T *ptr for example. > > 1. Does this information for a “type constraint” distract from my questions? > > 2. Can the data type become restricted not only by the detail >that it refers to a pointer? You can put any type, such as int x;. You can

Re: [Cocci] Concerns around type safety for usage of expressions

2019-11-22 Thread Markus Elfring
> T *ptr for example. 1. Does this information for a “type constraint” distract from my questions? 2. Can the data type become restricted not only by the detail that it refers to a pointer? 3. Why should such a SmPL specification matter for the handling of expressions? Regards, Markus __

Re: [Cocci] Concerns around type safety for usage of expressions

2019-11-22 Thread Markus Elfring
Another example: “[PATCH] coccinelle: improve array.cocci” from 2019-11-18 https://public-inbox.org/git/0d9cf772-268d-bd00-1cbb-0bbbec9df...@web.de/ >>> >>> OK, so you already know how to express type constraints for things. >> >> Where do you see that I did this? > > T *ptr for exam

Re: [Cocci] Concerns around type safety for usage of expressions

2019-11-22 Thread Julia Lawall
On Fri, 22 Nov 2019, Markus Elfring wrote: > >> Another example: > >> “[PATCH] coccinelle: improve array.cocci” from 2019-11-18 > >> https://public-inbox.org/git/0d9cf772-268d-bd00-1cbb-0bbbec9df...@web.de/ > > > > OK, so you already know how to express type constraints for things. > > Where do

Re: [Cocci] Concerns around type safety for usage of expressions

2019-11-22 Thread Markus Elfring
>> Another example: >> “[PATCH] coccinelle: improve array.cocci” from 2019-11-18 >> https://public-inbox.org/git/0d9cf772-268d-bd00-1cbb-0bbbec9df...@web.de/ > > OK, so you already know how to express type constraints for things. Where do you see that I did this? > So what are you actually askin

Re: [Cocci] Concerns around type safety for usage of expressions

2019-11-22 Thread Markus Elfring
>> Do you find it easier to clarify transformation possibilities around >> applications of a macro like “COPY_ARRAY”? >> https://github.com/git/git/blob/d966095db01190a2196e31195ea6fa0c722aa732/git-compat-util.h#L889 > > I still don't understand what you are asking. I hope that also this communica

Re: [Cocci] Concerns around type safety for usage of expressions

2019-11-22 Thread Julia Lawall
On Fri, 22 Nov 2019, Markus Elfring wrote: > >>> You can specify the type of an expression rather than just expression. > >> > >> How is this approach different from the search for “specific data types” > >> (which I know already)? > > > > I have no idea what you are referring to. > > Do you fin

Re: [Cocci] Concerns around type safety for usage of expressions

2019-11-22 Thread Markus Elfring
>>> You can specify the type of an expression rather than just expression. >> >> How is this approach different from the search for “specific data types” >> (which I know already)? > > I have no idea what you are referring to. Do you find it easier to clarify transformation possibilities around ap

Re: [Cocci] Concerns around type safety for usage of expressions

2019-11-22 Thread Julia Lawall
On Fri, 22 Nov 2019, Markus Elfring wrote: > > You can specify the type of an expression rather than just expression. > > How is this approach different from the search for “specific data types” > (which I know already)? I have no idea what you are referring to. julia > > I came along an use

Re: [Cocci] Concerns around type safety for usage of expressions

2019-11-22 Thread Markus Elfring
> You can specify the type of an expression rather than just expression. How is this approach different from the search for “specific data types” (which I know already)? I came along an use case where a generic source code search can find update candidates. But it would be nice if safety concerns

Re: [Cocci] Concerns around type safety for usage of expressions

2019-11-22 Thread Julia Lawall
On Fri, 22 Nov 2019, Markus Elfring wrote: > Hello, > > The semantic patch language supports source code searches also for uses > of specific data types. Such restricted searches can occasionally be nice. > But we would like to find more software variations often enough. > The consequence is tha

[Cocci] Concerns around type safety for usage of expressions

2019-11-22 Thread Markus Elfring
Hello, The semantic patch language supports source code searches also for uses of specific data types. Such restricted searches can occasionally be nice. But we would like to find more software variations often enough. The consequence is that metavariables of the kind “expression” will usually be