* Re: [Cocci] [PATCH 00/43] cocci: Add support for meta attributes to SmPL [not found] <e4f3c4e8-03e8-dbc2-5871-0d111b3086a4@web.de> @ 2020-08-02 7:06 ` Julia Lawall [not found] ` <eead5e2a-da8d-83cd-eeb4-f193702b800f@web.de> 0 siblings, 1 reply; 10+ messages in thread From: Julia Lawall @ 2020-08-02 7:06 UTC (permalink / raw) To: Markus Elfring; +Cc: cocci On Sun, 2 Aug 2020, Markus Elfring wrote: > > > Two test cases are included for detecting and removing meta attributes. > > > > Applied. > > Does this information indicate that you do not care for specific > patch review concerns according to these test cases at the moment? Yes, that's what it means. julia > > * https://lore.kernel.org/cocci/e0df5e31-bf24-0876-f485-e274db6000aa@web.de/ > https://systeme.lip6.fr/pipermail/cocci/2020-July/008035.html > > * https://lore.kernel.org/cocci/25fb4894-65d3-dc57-dbfd-93d3482d8fee@web.de/ > https://systeme.lip6.fr/pipermail/cocci/2020-July/008036.html > > Regards, > Markus > _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <eead5e2a-da8d-83cd-eeb4-f193702b800f@web.de>]
* Re: [Cocci] [PATCH 00/43] cocci: Add support for meta attributes to SmPL [not found] ` <eead5e2a-da8d-83cd-eeb4-f193702b800f@web.de> @ 2020-08-02 11:48 ` Julia Lawall [not found] ` <82af6b44-ea09-b86f-81f7-e96e8594a31d@web.de> 0 siblings, 1 reply; 10+ messages in thread From: Julia Lawall @ 2020-08-02 11:48 UTC (permalink / raw) To: Markus Elfring; +Cc: cocci On Sun, 2 Aug 2020, Markus Elfring wrote: > >>> Applied. > >> > >> Does this information indicate that you do not care for specific > >> patch review concerns according to these test cases at the moment? > > > > Yes, that's what it means. > > Would you like to integrate corresponding patches for known open issues > (a bit later) then? No, the code is fine. julia _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <82af6b44-ea09-b86f-81f7-e96e8594a31d@web.de>]
* Re: [Cocci] [00/43] cocci: Add support for meta attributes to SmPL [not found] ` <82af6b44-ea09-b86f-81f7-e96e8594a31d@web.de> @ 2020-08-02 13:13 ` Julia Lawall [not found] ` <065fee88-5206-5d9b-c83c-4e6a20aefd85@web.de> 0 siblings, 1 reply; 10+ messages in thread From: Julia Lawall @ 2020-08-02 13:13 UTC (permalink / raw) To: Markus Elfring; +Cc: cocci [-- Attachment #1: Type: text/plain, Size: 490 bytes --] On Sun, 2 Aug 2020, Markus Elfring wrote: > >> Would you like to integrate corresponding patches for known open issues > >> (a bit later) then? > > > > No, the code is fine. > > Will the Coccinelle software itself present a warning like “metavariable __attr__ > not used in the - or context code”? No. It's not a metavariable. julia > https://github.com/coccinelle/coccinelle/blob/675b96701895fbcb98cbec38a50bdb17fa5cc869/parsing_cocci/check_meta.ml#L746 > > Regards, > Markus > [-- Attachment #2: Type: text/plain, Size: 136 bytes --] _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <065fee88-5206-5d9b-c83c-4e6a20aefd85@web.de>]
* Re: [Cocci] [00/43] cocci: Add support for meta attributes to SmPL [not found] ` <065fee88-5206-5d9b-c83c-4e6a20aefd85@web.de> @ 2020-08-02 14:34 ` Julia Lawall [not found] ` <8f357aa0-7811-a5b8-a061-814899654e88@web.de> 0 siblings, 1 reply; 10+ messages in thread From: Julia Lawall @ 2020-08-02 14:34 UTC (permalink / raw) To: Markus Elfring; +Cc: cocci [-- Attachment #1: Type: text/plain, Size: 801 bytes --] On Sun, 2 Aug 2020, Markus Elfring wrote: > >> Will the Coccinelle software itself present a warning like “metavariable __attr__ > >> not used in the - or context code”? > > > > No. It's not a metavariable. > > How do you call the following items in the update step “[PATCH 42/43] tests: > Add test case to match meta attribute”? > https://lore.kernel.org/cocci/25fb4894-65d3-dc57-dbfd-93d3482d8fee@web.de/ > https://systeme.lip6.fr/pipermail/cocci/2020-July/008036.html > > attribute name __attr__; > attribute a; attribute a; declares a metavariable that matches attributes. attribute name __attr__; declares that __attr__ is the name of an attribute. These "name" declarations can be used in the parsing of the C code as a hint that __attr__ should be parsed in a special way. julia [-- Attachment #2: Type: text/plain, Size: 136 bytes --] _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <8f357aa0-7811-a5b8-a061-814899654e88@web.de>]
* Re: [Cocci] [00/43] cocci: Add support for meta attributes to SmPL [not found] ` <8f357aa0-7811-a5b8-a061-814899654e88@web.de> @ 2020-08-02 15:34 ` Julia Lawall [not found] ` <c1822815-456f-316d-93b5-88beb55a0d69@web.de> 0 siblings, 1 reply; 10+ messages in thread From: Julia Lawall @ 2020-08-02 15:34 UTC (permalink / raw) To: Markus Elfring; +Cc: cocci [-- Attachment #1: Type: text/plain, Size: 1287 bytes --] On Sun, 2 Aug 2020, Markus Elfring wrote: > >> How do you call the following items in the update step “[PATCH 42/43] tests: > >> Add test case to match meta attribute”? > >> https://lore.kernel.org/cocci/25fb4894-65d3-dc57-dbfd-93d3482d8fee@web.de/ > >> https://systeme.lip6.fr/pipermail/cocci/2020-July/008036.html > >> > >> attribute name __attr__; > >> attribute a; > > > > attribute a; declares a metavariable that matches attributes. > > > > attribute name __attr__; declares that __attr__ is the name of an attribute. > > Is this specification also a declaration of a metavariable? No. > > > > These "name" declarations can be used in the parsing of the C code as a > > hint that __attr__ should be parsed in a special way. > > Will a more helpful explanation be added to the software documentation > like the SmPL manual? > https://github.com/coccinelle/coccinelle/blob/e06b9156dfa02a28cf3cbf0913a10513f3d163ab/docs/manual/cocci_syntax.tex#L452 The discussion of attribute name and name in general already seems clear enough. > > Which display do you get for the command “spatch --parse-cocci tests/metaattr.cocci” > according to the discussed development version of your software? There is no warning. The code is now on github. You can test it yourself. julia [-- Attachment #2: Type: text/plain, Size: 136 bytes --] _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <c1822815-456f-316d-93b5-88beb55a0d69@web.de>]
* Re: [Cocci] [00/43] cocci: Add support for meta attributes to SmPL [not found] ` <c1822815-456f-316d-93b5-88beb55a0d69@web.de> @ 2020-08-02 16:16 ` Julia Lawall [not found] ` <74a5a472-4431-46e7-bd8b-95886f031c93@web.de> 0 siblings, 1 reply; 10+ messages in thread From: Julia Lawall @ 2020-08-02 16:16 UTC (permalink / raw) To: Markus Elfring; +Cc: cocci [-- Attachment #1: Type: text/plain, Size: 1528 bytes --] On Sun, 2 Aug 2020, Markus Elfring wrote: > >>> attribute name __attr__; declares that __attr__ is the name of an attribute. > >> > >> Is this specification also a declaration of a metavariable? > > > > No. > > How do you distinguish between metavariables and other SmPL variables then? Metavariables don't have "name" in their declaration. There is a sentence about that in the documentation. The {\bf name} modifier specifies that instead of declaring a metavariable to match over some kind, the identifiers are to be considered as elements of that kind when they appear in the code. "instead of declaring a metavariable" says that the thing that is declared is not a metavariable. julia > > > >> Will a more helpful explanation be added to the software documentation > >> like the SmPL manual? > >> https://github.com/coccinelle/coccinelle/blob/e06b9156dfa02a28cf3cbf0913a10513f3d163ab/docs/manual/cocci_syntax.tex#L452 > > > > The discussion of attribute name and name in general already seems clear enough. > > I got an other impression. > > > >> Which display do you get for the command “spatch --parse-cocci tests/metaattr.cocci” > >> according to the discussed development version of your software? > > > > There is no warning. The code is now on github. You can test it yourself. > > Should software users get informed about unused items in consistent ways? > https://github.com/coccinelle/coccinelle/blob/04f36d537b9f6c0c127d05184cccd21f1a46b952/parsing_cocci/check_meta.ml#L711 > > Regards, > Markus > [-- Attachment #2: Type: text/plain, Size: 136 bytes --] _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <74a5a472-4431-46e7-bd8b-95886f031c93@web.de>]
* Re: [Cocci] [00/43] cocci: Add support for meta attributes to SmPL [not found] ` <74a5a472-4431-46e7-bd8b-95886f031c93@web.de> @ 2020-08-02 17:00 ` Julia Lawall [not found] ` <3474ebf5-c902-63e9-8244-08a0f3407b72@web.de> 0 siblings, 1 reply; 10+ messages in thread From: Julia Lawall @ 2020-08-02 17:00 UTC (permalink / raw) To: Markus Elfring; +Cc: cocci [-- Attachment #1: Type: text/plain, Size: 2001 bytes --] On Sun, 2 Aug 2020, Markus Elfring wrote: > >> How do you distinguish between metavariables and other SmPL variables then? > > > > Metavariables don't have "name" in their declaration. There is a sentence > > about that in the documentation. > > > > The {\bf name} modifier specifies that instead of declaring a metavariable > > to match over some kind, the identifiers are to be considered as elements > > of that kind when they appear in the code. > > See also: > https://github.com/coccinelle/coccinelle/blob/e06b9156dfa02a28cf3cbf0913a10513f3d163ab/docs/manual/cocci_syntax.tex#L458 > > > > "instead of declaring a metavariable" says that the thing that is declared > > is not a metavariable. > > It seems that we stumble on different interpretations also around a wording > like “to match over some kind”. > > * Which is the category of SmPL identifiers which contain the key word “name” > in their data type (or “kind” if you would like to prevent to denote them > as metavariables)? The ones that have "name" in the BNF. > > * How do you think about to add square brackets to a line in the TeX SmPL grammar? > https://github.com/coccinelle/coccinelle/blob/e06b9156dfa02a28cf3cbf0913a10513f3d163ab/docs/manual/cocci_syntax.tex#L245 > > \CASE{attribute \opt{name} \NT{ids} ;} No, there will be a separate entry for attribute name;. Putting \opt{} would lead to the confusion that you are falling into. They are different things. > > >> Should software users get informed about unused items in consistent ways? > >> https://github.com/coccinelle/coccinelle/blob/04f36d537b9f6c0c127d05184cccd21f1a46b952/parsing_cocci/check_meta.ml#L711 > > Do you care if a SmPL name variable would accidentally not be used > (like in the script “https://github.com/coccinelle/coccinelle/blob/04f36d537b9f6c0c127d05184cccd21f1a46b952/tests/metaattr.cocci#L2”)? It actually is used, to help parsing the .c file. This information will be added to the documentation shortly. julia [-- Attachment #2: Type: text/plain, Size: 136 bytes --] _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <3474ebf5-c902-63e9-8244-08a0f3407b72@web.de>]
* Re: [Cocci] [00/43] cocci: Add support for meta attributes to SmPL [not found] ` <3474ebf5-c902-63e9-8244-08a0f3407b72@web.de> @ 2020-08-03 5:46 ` Julia Lawall 2020-08-03 8:22 ` Jaskaran Singh 1 sibling, 0 replies; 10+ messages in thread From: Julia Lawall @ 2020-08-03 5:46 UTC (permalink / raw) To: Markus Elfring; +Cc: cocci [-- Attachment #1: Type: text/plain, Size: 1679 bytes --] On Mon, 3 Aug 2020, Markus Elfring wrote: > >> Do you care if a SmPL name variable would accidentally not be used > >> (like in the script “https://github.com/coccinelle/coccinelle/blob/04f36d537b9f6c0c127d05184cccd21f1a46b952/tests/metaattr.cocci#L2”)? > > > > It actually is used, to help parsing the .c file. This information will > > be added to the documentation shortly. > > I would expect that the following SmPL script variant will generate > also a patch. > (Why would extra “help” be needed for parsing source files?) > > @replacement@ > attribute a; > identifier b; > @@ > -int > +char > b a = 1; Only if the C code is able to be parsed (note that you could have tested this instead of expecting something). It's not well defined whether something is an attribute or not. Coccinelle has some heuristics for that. But even if the declaration is completely useless, I also don't care. It's one line in a test case. It hurts nothing. Much more time has been wasted on this discussion than on any confusion that line would cause. > > > By the way: > I have noticed another detail which I find questionable at the moment. > > elfring@Sonne:~/Projekte/Coccinelle/20160205> spatch --parse-cocci tests/metaattr-2.cocci > … > ( > -int > >>> char > b a = 1; > | > -signed > >>> char > -int b a = 1; > ) > … > > I would interpret the display for the second part of such a SmPL > disjunction in the way that a variable definition will be deleted > (instead of taking only the key word “signed” also into account > according to the isomorphism “add_signed”). I'm not sure why the whole declaration became removed. Thanks for the report. julia [-- Attachment #2: Type: text/plain, Size: 136 bytes --] _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Cocci] [00/43] cocci: Add support for meta attributes to SmPL [not found] ` <3474ebf5-c902-63e9-8244-08a0f3407b72@web.de> 2020-08-03 5:46 ` Julia Lawall @ 2020-08-03 8:22 ` Jaskaran Singh [not found] ` <04cb5eb3-bed8-9e8e-255b-fbae06144016@web.de> 1 sibling, 1 reply; 10+ messages in thread From: Jaskaran Singh @ 2020-08-03 8:22 UTC (permalink / raw) To: Markus Elfring, Julia Lawall; +Cc: cocci On Mon, 2020-08-03 at 07:37 +0200, Markus Elfring wrote: > > > Do you care if a SmPL name variable would accidentally not be > > > used > > > (like in the script “ > > > https://github.com/coccinelle/coccinelle/blob/04f36d537b9f6c0c127d05184cccd21f1a46b952/tests/metaattr.cocci#L2” > > > )? > > > > It actually is used, to help parsing the .c file. This information > > will > > be added to the documentation shortly. > > I would expect that the following SmPL script variant will generate > also a patch. > (Why would extra “help” be needed for parsing source files?) > > @replacement@ > attribute a; > identifier b; > @@ > -int > +char > b a = 1; > > > By the way: > I have noticed another detail which I find questionable at the > moment. > > elfring@Sonne:~/Projekte/Coccinelle/20160205> spatch --parse-cocci > tests/metaattr-2.cocci > … > ( > -int > >>> char > b a = 1; > -signed > >>> char > -int b a = 1; > ) > … > Probably a pretty printing mistake. I'll fix this. Thanks, Jaskaran. > I would interpret the display for the second part of such a SmPL > disjunction > in the way that a variable definition will be deleted (instead of > taking only > the key word “signed” also into account according to the isomorphism > “add_signed”). > > Regards, > Markus _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <04cb5eb3-bed8-9e8e-255b-fbae06144016@web.de>]
* Re: [Cocci] [00/43] cocci: Add support for meta attributes to SmPL [not found] ` <04cb5eb3-bed8-9e8e-255b-fbae06144016@web.de> @ 2020-08-08 11:35 ` Jaskaran Singh 0 siblings, 0 replies; 10+ messages in thread From: Jaskaran Singh @ 2020-08-08 11:35 UTC (permalink / raw) To: Markus Elfring, Julia Lawall; +Cc: cocci On Sat, 2020-08-08 at 13:33 +0200, Markus Elfring wrote: > > Probably a pretty printing mistake. I'll fix this. > > How do you think about to clarify any related software dependencies? > What do you mean? > Regards, > Markus _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-08-08 11:35 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <e4f3c4e8-03e8-dbc2-5871-0d111b3086a4@web.de> 2020-08-02 7:06 ` [Cocci] [PATCH 00/43] cocci: Add support for meta attributes to SmPL Julia Lawall [not found] ` <eead5e2a-da8d-83cd-eeb4-f193702b800f@web.de> 2020-08-02 11:48 ` Julia Lawall [not found] ` <82af6b44-ea09-b86f-81f7-e96e8594a31d@web.de> 2020-08-02 13:13 ` [Cocci] [00/43] " Julia Lawall [not found] ` <065fee88-5206-5d9b-c83c-4e6a20aefd85@web.de> 2020-08-02 14:34 ` Julia Lawall [not found] ` <8f357aa0-7811-a5b8-a061-814899654e88@web.de> 2020-08-02 15:34 ` Julia Lawall [not found] ` <c1822815-456f-316d-93b5-88beb55a0d69@web.de> 2020-08-02 16:16 ` Julia Lawall [not found] ` <74a5a472-4431-46e7-bd8b-95886f031c93@web.de> 2020-08-02 17:00 ` Julia Lawall [not found] ` <3474ebf5-c902-63e9-8244-08a0f3407b72@web.de> 2020-08-03 5:46 ` Julia Lawall 2020-08-03 8:22 ` Jaskaran Singh [not found] ` <04cb5eb3-bed8-9e8e-255b-fbae06144016@web.de> 2020-08-08 11:35 ` Jaskaran Singh
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).