cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
* 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; 13+ 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] 13+ messages in thread

* 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; 13+ 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] 13+ messages in thread

* 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; 13+ 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] 13+ messages in thread

* 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; 13+ 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] 13+ messages in thread

* 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; 13+ 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] 13+ messages in thread

* 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; 13+ 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] 13+ messages in thread

* 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; 13+ 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] 13+ 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
  1 sibling, 0 replies; 13+ 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] 13+ 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; 13+ 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] 13+ messages in thread

* 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; 13+ 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] 13+ messages in thread

* Re: [Cocci] [PATCH 00/43] cocci: Add support for meta attributes to SmPL
  2020-08-01 20:36 ` Julia Lawall
@ 2020-08-02 12:16   ` Jaskaran Singh
  0 siblings, 0 replies; 13+ messages in thread
From: Jaskaran Singh @ 2020-08-02 12:16 UTC (permalink / raw)
  To: Julia Lawall; +Cc: cocci

On Sat, 2020-08-01 at 22:36 +0200, Julia Lawall wrote:
> 
> On Sun, 26 Jul 2020, Jaskaran Singh wrote:
> 
> > This patch series aims to add support for meta attributes in SmPL.
> > Currently, only meta attributes in context and minus code are
> > supported.
> > 
> > Changes include adding the MetaAttribute and MetaAttributeDecl
> > constructors to
> > the SmPL ASTs and the MetaAttributeVal constructor to the C AST.
> > 
> > Two test cases are included for detecting and removing meta
> > attributes.
> 
> Applied.
> 
> Is this the end of atributes?
> 

There are a few more patches, but not as wide as this.

Cheers,
Jaskaran.

> julia
> 
> > Jaskaran Singh (43):
> >       parsing_cocci: ast0_cocci: Add MetaAttribute &
> > MetaAttributeDecl
> >       parsing_cocci: parser: Parse meta attributes and metaattr
> > decls
> >       parsing_cocci: parse_cocci: Reflect MetaAttribute &
> > MetaAttributeDecl
> >       parsing_cocci: ast_cocci: Add MetaAttribute &
> > MetaAttributeDecl
> >       parsing_cocci: iso_pattern: Reflect MetaAttribute &
> > MetaAttributeDecl
> >       parsing_c: unparse_hrule: Reflect MetaAttribute &
> > MetaAttributeDecl
> >       parsing_cocci: pretty_print_cocci: Reflect MetaAttribute &
> > MetaAttributeDecl
> >       ocaml: coccilib: Reflect MetaAttribute & MetaAttributeDecl
> >       ocaml: yes_prepare_ocamlcocci: Reflect MetaAttribute &
> > MetaAttributeDecl
> >       parsing_c: ast_c: Add MetaAttributeVal
> >       parsing_c: unparse_hrule: Reflect MetaAttributeVal
> >       engine: cocci_vs_c: Reflect MetaAttributeVal
> >       engine: pattern_c: Reflect MetaAttributeVal
> >       engine: pretty_print_engine: Add MetaAttributeVal
> >       ocaml: coccilib: Reflect MetaAttributeVal
> >       ocaml: ocamlcocci_aux: Reflect MetaAttributeVal
> >       ocaml: run_ocamlcocci: Reflect MetaAttributeVal
> >       python: pycocci_aux: Reflect MetaAttributeVal
> >       parsing_cocci: visitor_ast0: Reflect MetaAttribute
> >       parsing_cocci: check_meta: Reflect MetaAttribute
> >       parsing_cocci: adjust_pragmas: Reflect MetaAttribute
> >       parsing_cocci: context_neg: Reflect MetaAttribute
> >       parsing_cocci: compute_lines: Reflect MetaAttribute
> >       parsing_cocci: iso_pattern: Reflect MetaAttribute
> >       parsing_cocci: function_prototypes: Reflect MetaAttribute
> >       parsing_cocci: arity: Reflect MetaAttribute
> >       parsing_cocci: unitary_ast0: Reflect MetaAttribute
> >       parsing_cocci: unparse_ast0: Reflect MetaAttribute
> >       parsing_cocci: ast0toast: Reflect MetaAttribute
> >       parsing_cocci: visitor_ast: Reflect MetaAttribute
> >       parsing_cocci: cleanup_rules: Reflect MetaAttribute
> >       parsing_cocci: free_vars: Reflect MetaAttribute
> >       parsing_cocci: get_constants: Reflect MetaAttribute
> >       parsing_cocci: get_constants2: Reflect MetaAttribute
> >       parsing_cocci: index: Reflect MetaAttribute
> >       parsing_cocci: pretty_print_cocci: Reflect MetaAttribute
> >       parsing_cocci: safe_for_multi_decls: Reflect MetaAttribute
> >       parsing_cocci: unify_ast: Reflect MetaAttribute
> >       parsing_c: unparse_cocci: Reflect MetaAttribute
> >       engine: cocci_vs_c: Reflect MetaAttribute
> >       tools: spgen: Reflect MetaAttribute
> >       tests: Add test case to match meta attribute
> >       tests: Add test case to remove a meta attribute
> > 
> >  engine/cocci_vs_c.ml                  |   23 ++++++++++++++---
> >  engine/pattern_c.ml                   |    6 ++++
> >  engine/pretty_print_engine.ml         |    1
> >  ocaml/coccilib.ml                     |    1
> >  ocaml/coccilib.mli                    |    7 +++++
> >  ocaml/ocamlcocci_aux.ml               |    2 +
> >  ocaml/run_ocamlcocci.ml               |    1
> >  ocaml/yes_prepare_ocamlcocci.ml       |    1
> >  parsing_c/ast_c.ml                    |    1
> >  parsing_c/ast_c.mli                   |    1
> >  parsing_c/lib_parsing_c.ml            |    3 ++
> >  parsing_c/lib_parsing_c.mli           |    3 ++
> >  parsing_c/pretty_print_c.ml           |   12 ++++++++
> >  parsing_c/pretty_print_c.mli          |    5 +++
> >  parsing_c/unparse_cocci.ml            |    6 ++++
> >  parsing_c/unparse_hrule.ml            |    5 +++
> >  parsing_cocci/adjust_pragmas.ml       |    3 ++
> >  parsing_cocci/arity.ml                |   29 ++++++++++++++-------
> >  parsing_cocci/ast0_cocci.ml           |    1
> >  parsing_cocci/ast0_cocci.mli          |    1
> >  parsing_cocci/ast0toast.ml            |    4 ++
> >  parsing_cocci/ast_cocci.ml            |    3 ++
> >  parsing_cocci/ast_cocci.mli           |    2 +
> >  parsing_cocci/check_meta.ml           |   27 ++++++++++++++-----
> >  parsing_cocci/cleanup_rules.ml        |   10 ++++++-
> >  parsing_cocci/compute_lines.ml        |   14 ++++++----
> >  parsing_cocci/context_neg.ml          |   18 ++++++++-----
> >  parsing_cocci/data.ml                 |    1
> >  parsing_cocci/data.mli                |    1
> >  parsing_cocci/free_vars.ml            |   28 ++++++++++++++++++--
> >  parsing_cocci/function_prototypes.ml  |   10 ++++++-
> >  parsing_cocci/get_constants.ml        |    7 ++++-
> >  parsing_cocci/get_constants2.ml       |    9 +++---
> >  parsing_cocci/index.ml                |    3 +-
> >  parsing_cocci/iso_pattern.ml          |   46
> > +++++++++++++++++++++++++++++-----
> >  parsing_cocci/lexer_cocci.mll         |   12 ++++++++
> >  parsing_cocci/parse_aux.ml            |    4 ++
> >  parsing_cocci/parse_cocci.ml          |   11 ++++++--
> >  parsing_cocci/parser_cocci_menhir.mly |   25 ++++++++++++------
> >  parsing_cocci/pretty_print_cocci.ml   |    3 ++
> >  parsing_cocci/safe_for_multi_decls.ml |    1
> >  parsing_cocci/unify_ast.ml            |    2 +
> >  parsing_cocci/unitary_ast0.ml         |    8 +++++
> >  parsing_cocci/unparse_ast0.ml         |    1
> >  parsing_cocci/visitor_ast.ml          |    7 +++--
> >  parsing_cocci/visitor_ast0.ml         |    5 ++-
> >  python/pycocci_aux.ml                 |    2 +
> >  tests/metaattr.c                      |    5 +++
> >  tests/metaattr.cocci                  |    9 ++++++
> >  tests/metaattr.res                    |    5 +++
> >  tests/remove_metaattr.c               |    5 +++
> >  tests/remove_metaattr.cocci           |    9 ++++++
> >  tests/remove_metaattr.res             |    5 +++
> >  tools/spgen/source/meta_variable.ml   |    8 +++++
> >  54 files changed, 357 insertions(+), 65 deletions(-)
> > 
> > 
> > 

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Cocci] [PATCH 00/43] cocci: Add support for meta attributes to SmPL
  2020-07-26 12:50 [Cocci] [PATCH 00/43] " Jaskaran Singh
@ 2020-08-01 20:36 ` Julia Lawall
  2020-08-02 12:16   ` Jaskaran Singh
  0 siblings, 1 reply; 13+ messages in thread
From: Julia Lawall @ 2020-08-01 20:36 UTC (permalink / raw)
  To: Jaskaran Singh; +Cc: cocci



On Sun, 26 Jul 2020, Jaskaran Singh wrote:

> This patch series aims to add support for meta attributes in SmPL.
> Currently, only meta attributes in context and minus code are supported.
>
> Changes include adding the MetaAttribute and MetaAttributeDecl constructors to
> the SmPL ASTs and the MetaAttributeVal constructor to the C AST.
>
> Two test cases are included for detecting and removing meta attributes.

Applied.

Is this the end of atributes?

julia

>
> Jaskaran Singh (43):
>       parsing_cocci: ast0_cocci: Add MetaAttribute & MetaAttributeDecl
>       parsing_cocci: parser: Parse meta attributes and metaattr decls
>       parsing_cocci: parse_cocci: Reflect MetaAttribute & MetaAttributeDecl
>       parsing_cocci: ast_cocci: Add MetaAttribute & MetaAttributeDecl
>       parsing_cocci: iso_pattern: Reflect MetaAttribute & MetaAttributeDecl
>       parsing_c: unparse_hrule: Reflect MetaAttribute & MetaAttributeDecl
>       parsing_cocci: pretty_print_cocci: Reflect MetaAttribute & MetaAttributeDecl
>       ocaml: coccilib: Reflect MetaAttribute & MetaAttributeDecl
>       ocaml: yes_prepare_ocamlcocci: Reflect MetaAttribute & MetaAttributeDecl
>       parsing_c: ast_c: Add MetaAttributeVal
>       parsing_c: unparse_hrule: Reflect MetaAttributeVal
>       engine: cocci_vs_c: Reflect MetaAttributeVal
>       engine: pattern_c: Reflect MetaAttributeVal
>       engine: pretty_print_engine: Add MetaAttributeVal
>       ocaml: coccilib: Reflect MetaAttributeVal
>       ocaml: ocamlcocci_aux: Reflect MetaAttributeVal
>       ocaml: run_ocamlcocci: Reflect MetaAttributeVal
>       python: pycocci_aux: Reflect MetaAttributeVal
>       parsing_cocci: visitor_ast0: Reflect MetaAttribute
>       parsing_cocci: check_meta: Reflect MetaAttribute
>       parsing_cocci: adjust_pragmas: Reflect MetaAttribute
>       parsing_cocci: context_neg: Reflect MetaAttribute
>       parsing_cocci: compute_lines: Reflect MetaAttribute
>       parsing_cocci: iso_pattern: Reflect MetaAttribute
>       parsing_cocci: function_prototypes: Reflect MetaAttribute
>       parsing_cocci: arity: Reflect MetaAttribute
>       parsing_cocci: unitary_ast0: Reflect MetaAttribute
>       parsing_cocci: unparse_ast0: Reflect MetaAttribute
>       parsing_cocci: ast0toast: Reflect MetaAttribute
>       parsing_cocci: visitor_ast: Reflect MetaAttribute
>       parsing_cocci: cleanup_rules: Reflect MetaAttribute
>       parsing_cocci: free_vars: Reflect MetaAttribute
>       parsing_cocci: get_constants: Reflect MetaAttribute
>       parsing_cocci: get_constants2: Reflect MetaAttribute
>       parsing_cocci: index: Reflect MetaAttribute
>       parsing_cocci: pretty_print_cocci: Reflect MetaAttribute
>       parsing_cocci: safe_for_multi_decls: Reflect MetaAttribute
>       parsing_cocci: unify_ast: Reflect MetaAttribute
>       parsing_c: unparse_cocci: Reflect MetaAttribute
>       engine: cocci_vs_c: Reflect MetaAttribute
>       tools: spgen: Reflect MetaAttribute
>       tests: Add test case to match meta attribute
>       tests: Add test case to remove a meta attribute
>
>  engine/cocci_vs_c.ml                  |   23 ++++++++++++++---
>  engine/pattern_c.ml                   |    6 ++++
>  engine/pretty_print_engine.ml         |    1
>  ocaml/coccilib.ml                     |    1
>  ocaml/coccilib.mli                    |    7 +++++
>  ocaml/ocamlcocci_aux.ml               |    2 +
>  ocaml/run_ocamlcocci.ml               |    1
>  ocaml/yes_prepare_ocamlcocci.ml       |    1
>  parsing_c/ast_c.ml                    |    1
>  parsing_c/ast_c.mli                   |    1
>  parsing_c/lib_parsing_c.ml            |    3 ++
>  parsing_c/lib_parsing_c.mli           |    3 ++
>  parsing_c/pretty_print_c.ml           |   12 ++++++++
>  parsing_c/pretty_print_c.mli          |    5 +++
>  parsing_c/unparse_cocci.ml            |    6 ++++
>  parsing_c/unparse_hrule.ml            |    5 +++
>  parsing_cocci/adjust_pragmas.ml       |    3 ++
>  parsing_cocci/arity.ml                |   29 ++++++++++++++-------
>  parsing_cocci/ast0_cocci.ml           |    1
>  parsing_cocci/ast0_cocci.mli          |    1
>  parsing_cocci/ast0toast.ml            |    4 ++
>  parsing_cocci/ast_cocci.ml            |    3 ++
>  parsing_cocci/ast_cocci.mli           |    2 +
>  parsing_cocci/check_meta.ml           |   27 ++++++++++++++-----
>  parsing_cocci/cleanup_rules.ml        |   10 ++++++-
>  parsing_cocci/compute_lines.ml        |   14 ++++++----
>  parsing_cocci/context_neg.ml          |   18 ++++++++-----
>  parsing_cocci/data.ml                 |    1
>  parsing_cocci/data.mli                |    1
>  parsing_cocci/free_vars.ml            |   28 ++++++++++++++++++--
>  parsing_cocci/function_prototypes.ml  |   10 ++++++-
>  parsing_cocci/get_constants.ml        |    7 ++++-
>  parsing_cocci/get_constants2.ml       |    9 +++---
>  parsing_cocci/index.ml                |    3 +-
>  parsing_cocci/iso_pattern.ml          |   46 +++++++++++++++++++++++++++++-----
>  parsing_cocci/lexer_cocci.mll         |   12 ++++++++
>  parsing_cocci/parse_aux.ml            |    4 ++
>  parsing_cocci/parse_cocci.ml          |   11 ++++++--
>  parsing_cocci/parser_cocci_menhir.mly |   25 ++++++++++++------
>  parsing_cocci/pretty_print_cocci.ml   |    3 ++
>  parsing_cocci/safe_for_multi_decls.ml |    1
>  parsing_cocci/unify_ast.ml            |    2 +
>  parsing_cocci/unitary_ast0.ml         |    8 +++++
>  parsing_cocci/unparse_ast0.ml         |    1
>  parsing_cocci/visitor_ast.ml          |    7 +++--
>  parsing_cocci/visitor_ast0.ml         |    5 ++-
>  python/pycocci_aux.ml                 |    2 +
>  tests/metaattr.c                      |    5 +++
>  tests/metaattr.cocci                  |    9 ++++++
>  tests/metaattr.res                    |    5 +++
>  tests/remove_metaattr.c               |    5 +++
>  tests/remove_metaattr.cocci           |    9 ++++++
>  tests/remove_metaattr.res             |    5 +++
>  tools/spgen/source/meta_variable.ml   |    8 +++++
>  54 files changed, 357 insertions(+), 65 deletions(-)
>
>
>
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Cocci] [PATCH 00/43] cocci: Add support for meta attributes to SmPL
@ 2020-07-26 12:50 Jaskaran Singh
  2020-08-01 20:36 ` Julia Lawall
  0 siblings, 1 reply; 13+ messages in thread
From: Jaskaran Singh @ 2020-07-26 12:50 UTC (permalink / raw)
  To: cocci

This patch series aims to add support for meta attributes in SmPL.
Currently, only meta attributes in context and minus code are supported.

Changes include adding the MetaAttribute and MetaAttributeDecl constructors to
the SmPL ASTs and the MetaAttributeVal constructor to the C AST.

Two test cases are included for detecting and removing meta attributes.

Jaskaran Singh (43):
      parsing_cocci: ast0_cocci: Add MetaAttribute & MetaAttributeDecl
      parsing_cocci: parser: Parse meta attributes and metaattr decls
      parsing_cocci: parse_cocci: Reflect MetaAttribute & MetaAttributeDecl
      parsing_cocci: ast_cocci: Add MetaAttribute & MetaAttributeDecl
      parsing_cocci: iso_pattern: Reflect MetaAttribute & MetaAttributeDecl
      parsing_c: unparse_hrule: Reflect MetaAttribute & MetaAttributeDecl
      parsing_cocci: pretty_print_cocci: Reflect MetaAttribute & MetaAttributeDecl
      ocaml: coccilib: Reflect MetaAttribute & MetaAttributeDecl
      ocaml: yes_prepare_ocamlcocci: Reflect MetaAttribute & MetaAttributeDecl
      parsing_c: ast_c: Add MetaAttributeVal
      parsing_c: unparse_hrule: Reflect MetaAttributeVal
      engine: cocci_vs_c: Reflect MetaAttributeVal
      engine: pattern_c: Reflect MetaAttributeVal
      engine: pretty_print_engine: Add MetaAttributeVal
      ocaml: coccilib: Reflect MetaAttributeVal
      ocaml: ocamlcocci_aux: Reflect MetaAttributeVal
      ocaml: run_ocamlcocci: Reflect MetaAttributeVal
      python: pycocci_aux: Reflect MetaAttributeVal
      parsing_cocci: visitor_ast0: Reflect MetaAttribute
      parsing_cocci: check_meta: Reflect MetaAttribute
      parsing_cocci: adjust_pragmas: Reflect MetaAttribute
      parsing_cocci: context_neg: Reflect MetaAttribute
      parsing_cocci: compute_lines: Reflect MetaAttribute
      parsing_cocci: iso_pattern: Reflect MetaAttribute
      parsing_cocci: function_prototypes: Reflect MetaAttribute
      parsing_cocci: arity: Reflect MetaAttribute
      parsing_cocci: unitary_ast0: Reflect MetaAttribute
      parsing_cocci: unparse_ast0: Reflect MetaAttribute
      parsing_cocci: ast0toast: Reflect MetaAttribute
      parsing_cocci: visitor_ast: Reflect MetaAttribute
      parsing_cocci: cleanup_rules: Reflect MetaAttribute
      parsing_cocci: free_vars: Reflect MetaAttribute
      parsing_cocci: get_constants: Reflect MetaAttribute
      parsing_cocci: get_constants2: Reflect MetaAttribute
      parsing_cocci: index: Reflect MetaAttribute
      parsing_cocci: pretty_print_cocci: Reflect MetaAttribute
      parsing_cocci: safe_for_multi_decls: Reflect MetaAttribute
      parsing_cocci: unify_ast: Reflect MetaAttribute
      parsing_c: unparse_cocci: Reflect MetaAttribute
      engine: cocci_vs_c: Reflect MetaAttribute
      tools: spgen: Reflect MetaAttribute
      tests: Add test case to match meta attribute
      tests: Add test case to remove a meta attribute

 engine/cocci_vs_c.ml                  |   23 ++++++++++++++---
 engine/pattern_c.ml                   |    6 ++++
 engine/pretty_print_engine.ml         |    1 
 ocaml/coccilib.ml                     |    1 
 ocaml/coccilib.mli                    |    7 +++++
 ocaml/ocamlcocci_aux.ml               |    2 +
 ocaml/run_ocamlcocci.ml               |    1 
 ocaml/yes_prepare_ocamlcocci.ml       |    1 
 parsing_c/ast_c.ml                    |    1 
 parsing_c/ast_c.mli                   |    1 
 parsing_c/lib_parsing_c.ml            |    3 ++
 parsing_c/lib_parsing_c.mli           |    3 ++
 parsing_c/pretty_print_c.ml           |   12 ++++++++
 parsing_c/pretty_print_c.mli          |    5 +++
 parsing_c/unparse_cocci.ml            |    6 ++++
 parsing_c/unparse_hrule.ml            |    5 +++
 parsing_cocci/adjust_pragmas.ml       |    3 ++
 parsing_cocci/arity.ml                |   29 ++++++++++++++-------
 parsing_cocci/ast0_cocci.ml           |    1 
 parsing_cocci/ast0_cocci.mli          |    1 
 parsing_cocci/ast0toast.ml            |    4 ++
 parsing_cocci/ast_cocci.ml            |    3 ++
 parsing_cocci/ast_cocci.mli           |    2 +
 parsing_cocci/check_meta.ml           |   27 ++++++++++++++-----
 parsing_cocci/cleanup_rules.ml        |   10 ++++++-
 parsing_cocci/compute_lines.ml        |   14 ++++++----
 parsing_cocci/context_neg.ml          |   18 ++++++++-----
 parsing_cocci/data.ml                 |    1 
 parsing_cocci/data.mli                |    1 
 parsing_cocci/free_vars.ml            |   28 ++++++++++++++++++--
 parsing_cocci/function_prototypes.ml  |   10 ++++++-
 parsing_cocci/get_constants.ml        |    7 ++++-
 parsing_cocci/get_constants2.ml       |    9 +++---
 parsing_cocci/index.ml                |    3 +-
 parsing_cocci/iso_pattern.ml          |   46 +++++++++++++++++++++++++++++-----
 parsing_cocci/lexer_cocci.mll         |   12 ++++++++
 parsing_cocci/parse_aux.ml            |    4 ++
 parsing_cocci/parse_cocci.ml          |   11 ++++++--
 parsing_cocci/parser_cocci_menhir.mly |   25 ++++++++++++------
 parsing_cocci/pretty_print_cocci.ml   |    3 ++
 parsing_cocci/safe_for_multi_decls.ml |    1 
 parsing_cocci/unify_ast.ml            |    2 +
 parsing_cocci/unitary_ast0.ml         |    8 +++++
 parsing_cocci/unparse_ast0.ml         |    1 
 parsing_cocci/visitor_ast.ml          |    7 +++--
 parsing_cocci/visitor_ast0.ml         |    5 ++-
 python/pycocci_aux.ml                 |    2 +
 tests/metaattr.c                      |    5 +++
 tests/metaattr.cocci                  |    9 ++++++
 tests/metaattr.res                    |    5 +++
 tests/remove_metaattr.c               |    5 +++
 tests/remove_metaattr.cocci           |    9 ++++++
 tests/remove_metaattr.res             |    5 +++
 tools/spgen/source/meta_variable.ml   |    8 +++++
 54 files changed, 357 insertions(+), 65 deletions(-)


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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-08-08 11:35 UTC | newest]

Thread overview: 13+ 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
2020-07-26 12:50 [Cocci] [PATCH 00/43] " Jaskaran Singh
2020-08-01 20:36 ` Julia Lawall
2020-08-02 12:16   ` 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).