From: Jaskaran Singh <jaskaransingh7654321@gmail.com>
To: cocci@systeme.lip6.fr
Cc: linux-kernel-mentees@lists.linuxfoundation.org
Subject: [Cocci] [PATCH 00/32] cocci: Add cast attributes to C and SmPL ASTs
Date: Tue, 28 Apr 2020 22:31:56 +0530 [thread overview]
Message-ID: <20200428170228.7002-1-jaskaransingh7654321@gmail.com> (raw)
This patch series aims to add cast attributes to the C and SmPL ASTs, and
match them in C source code. This is a continuation of the series "cocci:
Improve C parsing of attributes"[1].
Three test cases are included:
- detect_cast_attr: Test case to detect a parameter attribute.
- remove_cast_attr: Test case to remove a parameter attribute as per the
given SmPL.
- remove_cast_attr_allminus: Test case to replace a type in a cast and
checking if the attribute is removed as well.
[1]https://www.mail-archive.com/cocci@systeme.lip6.fr/msg07133.html
Jaskaran Singh (32):
parsing_c: parser: Pass attribute list from type_name
parsing_cocci: ast0_cocci: Add cast attributes
parsing_cocci: parser: Parse cast attributes
parsing_cocci: visitor_ast0: Visit cast attributes
parsing_cocci: unparse_ast0: Reflect cast attributes
parsing_cocci: index: Reflect Cast attributes
parsing_cocci: iso_pattern: Reflect Cast attributes
parsing_cocci: type_infer: Reflect Cast attributes
parsing_cocci: arity: Reflect Cast attributes
parsing_cocci: check_meta: Reflect Cast attributes
parsing_cocci: compute_lines: Reflect Cast attributes
parsing_cocci: context_neg: Reflect Cast attributes
parsing_cocci: single_statement: Reflect Cast attributes
parsing_cocci: ast_cocci: Add cast attributes
parsing_cocci: visitor_ast: Visit cast attributes
parsing_cocci: pretty_print_cocci: Print cast attributes
parsing_cocci: ast0toast: Reflect Cast attributes
parsing_cocci: disjdistr: Reflect Cast attributes
parsing_cocci: unify_ast: Reflect Cast attributes
parsing_c: ast_c: Add Cast attributes
parsing_c: parser: Parse Cast attributes
parsing_c: pretty_print_c: Reflect Cast attributes
parsing_c: type_annoter_c: Reflect Cast attributes
parsing_c: unparse_cocci: Reflect Cast attributes
parsing_c: visitor_c: Visit Cast attributes
engine: check_exhaustive_pattern: Reflect Cast attributes
engine: cocci_vs_c: Match Cast attributes
ocaml: coccilib: Reflect Cast attributes
tools: spgen: Reflect Cast attrs
tests: Add test case to check cast attribute allminus
tests: Add test case to remove cast attributes
tests: Add test case to detect cast attributes
engine/check_exhaustive_pattern.ml | 2 +-
engine/cocci_vs_c.ml | 24 +++++++++++++++++-------
ocaml/coccilib.mli | 9 +++++----
parsing_c/ast_c.ml | 2 +-
parsing_c/ast_c.mli | 2 +-
parsing_c/parse_c.ml | 4 +++-
parsing_c/parser_c.mly | 19 ++++++++++---------
parsing_c/pretty_print_c.ml | 7 ++++---
parsing_c/type_annoter_c.ml | 4 ++--
parsing_c/unparse_cocci.ml | 6 ++++--
parsing_c/visitor_c.ml | 10 ++++++++--
parsing_cocci/arity.ml | 5 +++--
parsing_cocci/ast0_cocci.ml | 4 ++--
parsing_cocci/ast0_cocci.mli | 4 ++--
parsing_cocci/ast0toast.ml | 5 +++--
parsing_cocci/ast_cocci.ml | 4 ++--
parsing_cocci/ast_cocci.mli | 4 ++--
parsing_cocci/check_meta.ml | 3 ++-
parsing_cocci/compute_lines.ml | 5 +++--
parsing_cocci/context_neg.ml | 2 +-
parsing_cocci/disjdistr.ml | 5 +++--
parsing_cocci/index.ml | 2 +-
parsing_cocci/iso_pattern.ml | 12 +++++++++---
parsing_cocci/parser_cocci_menhir.mly | 9 +++++----
parsing_cocci/pretty_print_cocci.ml | 4 +++-
parsing_cocci/single_statement.ml | 2 +-
parsing_cocci/type_infer.ml | 2 +-
parsing_cocci/unify_ast.ml | 6 ++++--
parsing_cocci/unparse_ast0.ml | 4 +++-
parsing_cocci/visitor_ast.ml | 10 ++++++----
parsing_cocci/visitor_ast0.ml | 6 ++++--
tests/detect_cast_attr.c | 10 ++++++++++
tests/detect_cast_attr.cocci | 11 +++++++++++
tests/detect_cast_attr.res | 10 ++++++++++
tests/remove_cast_attr.c | 10 ++++++++++
tests/remove_cast_attr.cocci | 10 ++++++++++
tests/remove_cast_attr.res | 10 ++++++++++
tests/remove_cast_attr_allminus.c | 10 ++++++++++
tests/remove_cast_attr_allminus.cocci | 9 +++++++++
tests/remove_cast_attr_allminus.res | 10 ++++++++++
tools/spgen/source/position_generator.ml | 4 ++--
41 files changed, 208 insertions(+), 73 deletions(-)
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
WARNING: multiple messages have this Message-ID (diff)
From: Jaskaran Singh <jaskaransingh7654321@gmail.com>
To: cocci@systeme.lip6.fr
Cc: julia.lawall@inria.fr, jaskaransingh7654321@gmail.com,
linux-kernel-mentees@lists.linuxfoundation.org
Subject: [Linux-kernel-mentees] [PATCH 00/32] cocci: Add cast attributes to C and SmPL ASTs
Date: Tue, 28 Apr 2020 22:31:56 +0530 [thread overview]
Message-ID: <20200428170228.7002-1-jaskaransingh7654321@gmail.com> (raw)
This patch series aims to add cast attributes to the C and SmPL ASTs, and
match them in C source code. This is a continuation of the series "cocci:
Improve C parsing of attributes"[1].
Three test cases are included:
- detect_cast_attr: Test case to detect a parameter attribute.
- remove_cast_attr: Test case to remove a parameter attribute as per the
given SmPL.
- remove_cast_attr_allminus: Test case to replace a type in a cast and
checking if the attribute is removed as well.
[1]https://www.mail-archive.com/cocci@systeme.lip6.fr/msg07133.html
Jaskaran Singh (32):
parsing_c: parser: Pass attribute list from type_name
parsing_cocci: ast0_cocci: Add cast attributes
parsing_cocci: parser: Parse cast attributes
parsing_cocci: visitor_ast0: Visit cast attributes
parsing_cocci: unparse_ast0: Reflect cast attributes
parsing_cocci: index: Reflect Cast attributes
parsing_cocci: iso_pattern: Reflect Cast attributes
parsing_cocci: type_infer: Reflect Cast attributes
parsing_cocci: arity: Reflect Cast attributes
parsing_cocci: check_meta: Reflect Cast attributes
parsing_cocci: compute_lines: Reflect Cast attributes
parsing_cocci: context_neg: Reflect Cast attributes
parsing_cocci: single_statement: Reflect Cast attributes
parsing_cocci: ast_cocci: Add cast attributes
parsing_cocci: visitor_ast: Visit cast attributes
parsing_cocci: pretty_print_cocci: Print cast attributes
parsing_cocci: ast0toast: Reflect Cast attributes
parsing_cocci: disjdistr: Reflect Cast attributes
parsing_cocci: unify_ast: Reflect Cast attributes
parsing_c: ast_c: Add Cast attributes
parsing_c: parser: Parse Cast attributes
parsing_c: pretty_print_c: Reflect Cast attributes
parsing_c: type_annoter_c: Reflect Cast attributes
parsing_c: unparse_cocci: Reflect Cast attributes
parsing_c: visitor_c: Visit Cast attributes
engine: check_exhaustive_pattern: Reflect Cast attributes
engine: cocci_vs_c: Match Cast attributes
ocaml: coccilib: Reflect Cast attributes
tools: spgen: Reflect Cast attrs
tests: Add test case to check cast attribute allminus
tests: Add test case to remove cast attributes
tests: Add test case to detect cast attributes
engine/check_exhaustive_pattern.ml | 2 +-
engine/cocci_vs_c.ml | 24 +++++++++++++++++-------
ocaml/coccilib.mli | 9 +++++----
parsing_c/ast_c.ml | 2 +-
parsing_c/ast_c.mli | 2 +-
parsing_c/parse_c.ml | 4 +++-
parsing_c/parser_c.mly | 19 ++++++++++---------
parsing_c/pretty_print_c.ml | 7 ++++---
parsing_c/type_annoter_c.ml | 4 ++--
parsing_c/unparse_cocci.ml | 6 ++++--
parsing_c/visitor_c.ml | 10 ++++++++--
parsing_cocci/arity.ml | 5 +++--
parsing_cocci/ast0_cocci.ml | 4 ++--
parsing_cocci/ast0_cocci.mli | 4 ++--
parsing_cocci/ast0toast.ml | 5 +++--
parsing_cocci/ast_cocci.ml | 4 ++--
parsing_cocci/ast_cocci.mli | 4 ++--
parsing_cocci/check_meta.ml | 3 ++-
parsing_cocci/compute_lines.ml | 5 +++--
parsing_cocci/context_neg.ml | 2 +-
parsing_cocci/disjdistr.ml | 5 +++--
parsing_cocci/index.ml | 2 +-
parsing_cocci/iso_pattern.ml | 12 +++++++++---
parsing_cocci/parser_cocci_menhir.mly | 9 +++++----
parsing_cocci/pretty_print_cocci.ml | 4 +++-
parsing_cocci/single_statement.ml | 2 +-
parsing_cocci/type_infer.ml | 2 +-
parsing_cocci/unify_ast.ml | 6 ++++--
parsing_cocci/unparse_ast0.ml | 4 +++-
parsing_cocci/visitor_ast.ml | 10 ++++++----
parsing_cocci/visitor_ast0.ml | 6 ++++--
tests/detect_cast_attr.c | 10 ++++++++++
tests/detect_cast_attr.cocci | 11 +++++++++++
tests/detect_cast_attr.res | 10 ++++++++++
tests/remove_cast_attr.c | 10 ++++++++++
tests/remove_cast_attr.cocci | 10 ++++++++++
tests/remove_cast_attr.res | 10 ++++++++++
tests/remove_cast_attr_allminus.c | 10 ++++++++++
tests/remove_cast_attr_allminus.cocci | 9 +++++++++
tests/remove_cast_attr_allminus.res | 10 ++++++++++
tools/spgen/source/position_generator.ml | 4 ++--
41 files changed, 208 insertions(+), 73 deletions(-)
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
next reply other threads:[~2020-04-28 17:03 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 17:01 Jaskaran Singh [this message]
2020-04-28 17:01 ` [Linux-kernel-mentees] [PATCH 00/32] cocci: Add cast attributes to C and SmPL ASTs Jaskaran Singh
2020-04-28 17:01 ` [Cocci] [PATCH 01/32] parsing_c: parser: Pass attribute list from type_name Jaskaran Singh
2020-04-28 17:01 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-05-03 19:23 ` [Cocci] " Julia Lawall
2020-05-03 19:23 ` [Linux-kernel-mentees] " Julia Lawall
2020-05-04 9:06 ` [Cocci] " Jaskaran Singh
2020-05-04 9:06 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-05-04 9:17 ` [Cocci] " Julia Lawall
2020-05-04 9:17 ` [Linux-kernel-mentees] " Julia Lawall
2020-05-04 9:20 ` [Cocci] " Jaskaran Singh
2020-05-04 9:20 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-05-04 13:18 ` [Cocci] " Julia Lawall
2020-05-04 13:18 ` [Linux-kernel-mentees] " Julia Lawall
2020-04-28 17:01 ` [Cocci] [PATCH 02/32] parsing_cocci: ast0_cocci: Add cast attributes Jaskaran Singh
2020-04-28 17:01 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:01 ` [Cocci] [PATCH 03/32] parsing_cocci: parser: Parse " Jaskaran Singh
2020-04-28 17:01 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-05-03 19:26 ` [Cocci] " Julia Lawall
2020-05-03 19:26 ` [Linux-kernel-mentees] " Julia Lawall
2020-04-28 17:02 ` [Cocci] [PATCH 04/32] parsing_cocci: visitor_ast0: Visit " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 05/32] parsing_cocci: unparse_ast0: Reflect " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 06/32] parsing_cocci: index: Reflect Cast attributes Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 07/32] parsing_cocci: iso_pattern: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 08/32] parsing_cocci: type_infer: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 09/32] parsing_cocci: arity: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-05-03 19:28 ` [Cocci] " Julia Lawall
2020-05-03 19:28 ` [Linux-kernel-mentees] " Julia Lawall
2020-04-28 17:02 ` [Cocci] [PATCH 10/32] parsing_cocci: check_meta: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 11/32] parsing_cocci: compute_lines: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 12/32] parsing_cocci: context_neg: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 13/32] parsing_cocci: single_statement: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 14/32] parsing_cocci: ast_cocci: Add cast attributes Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 15/32] parsing_cocci: visitor_ast: Visit " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-05-03 19:29 ` [Cocci] " Julia Lawall
2020-05-03 19:29 ` [Linux-kernel-mentees] " Julia Lawall
2020-04-28 17:02 ` [Cocci] [PATCH 16/32] parsing_cocci: pretty_print_cocci: Print " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 17/32] parsing_cocci: ast0toast: Reflect Cast attributes Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 18/32] parsing_cocci: disjdistr: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 19/32] parsing_cocci: unify_ast: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 20/32] parsing_c: ast_c: Add " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-05-03 19:31 ` [Cocci] " Julia Lawall
2020-05-03 19:31 ` [Linux-kernel-mentees] " Julia Lawall
2020-04-28 17:02 ` [Cocci] [PATCH 21/32] parsing_c: parser: Parse " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 22/32] parsing_c: pretty_print_c: Reflect " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-05-03 19:32 ` [Cocci] " Julia Lawall
2020-05-03 19:32 ` [Linux-kernel-mentees] " Julia Lawall
2020-04-28 17:02 ` [Cocci] [PATCH 23/32] parsing_c: type_annoter_c: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 24/32] parsing_c: unparse_cocci: " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 25/32] parsing_c: visitor_c: Visit " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 26/32] engine: check_exhaustive_pattern: Reflect " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 27/32] engine: cocci_vs_c: Match " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 28/32] ocaml: coccilib: Reflect " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 29/32] tools: spgen: Reflect Cast attrs Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 30/32] tests: Add test case to check cast attribute allminus Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 31/32] tests: Add test case to remove cast attributes Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
2020-04-28 17:02 ` [Cocci] [PATCH 32/32] tests: Add test case to detect " Jaskaran Singh
2020-04-28 17:02 ` [Linux-kernel-mentees] " Jaskaran Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200428170228.7002-1-jaskaransingh7654321@gmail.com \
--to=jaskaransingh7654321@gmail.com \
--cc=cocci@systeme.lip6.fr \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.