[Cocci] [PATCH 05/24] parsing_cocci: iso_compile: Reflect attributefn in AST0 visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST0 visitor has a function for attributes. Reflect these changes in iso_compile.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/iso_compile.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsing_cocci/iso_compile.ml b/parsing_cocci/iso_compile.ml index

[Cocci] [PATCH 03/24] parsing_cocci: check_meta: Reflect attributefn in AST0 visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST0 visitor has a function for attributes. Reflect these changes in check_meta.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/check_meta.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parsing_cocci/check_meta.ml b/parsing_cocci/check_meta.ml index

[Cocci] [PATCH 02/24] parsing_cocci: ast0toast: Reflect attributefn in AST0 visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST0 visitor has a function for attributes. Reflect these changes in ast0toast.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/ast0toast.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parsing_cocci/ast0toast.ml b/parsing_cocci/ast0toast.ml index f0cad067

[Cocci] [PATCH 04/24] parsing_cocci: function_prototypes: Reflect attributefn in AST0 visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST0 visitor has a function for attributes. Reflect these changes in function_prototypes.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/function_prototypes.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parsing_cocci/function_prototypes.ml b

[Cocci] [PATCH 06/24] parsing_cocci: iso_pattern: Reflect attributefn in AST0 visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST0 visitor has a function for attributes. Reflect these changes in iso_pattern.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/iso_pattern.ml | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/parsing_cocci/iso_pattern.ml b/parsing_cocci

[Cocci] [PATCH 23/24] parsing_cocci: insert_plus: Reflect attributefn in AST0 visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST0 visitor has a function for attributes. Reflect these changes in insert_plus.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/insert_plus.ml | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/parsing_cocci/insert_plus.ml b/parsing_cocci/insert_plus.ml

[Cocci] [PATCH 17/24] parsing_cocci: pretty_print_cocci: Reflect AttributeTag in SmPL AST

2020-07-16 Thread Jaskaran Singh
AttributeTag is added to the SmPL AST. Reflect these changes in pretty_print_cocci.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/pretty_print_cocci.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/parsing_cocci/pretty_print_cocci.ml b/parsing_cocci/pretty_print_cocci.ml index

[Cocci] [PATCH 11/24] parsing_cocci: visitor_ast0: Reflect AttributeTag in SmPL AST0

2020-07-16 Thread Jaskaran Singh
AttributeTag is added to SmPL AST0. Reflect these changes in visitor_ast0.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/visitor_ast0.ml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/parsing_cocci/visitor_ast0.ml b/parsing_cocci/visitor_ast0.ml index 090fe625..e45f9241 100644

[Cocci] [PATCH 20/24] parsing_cocci: ast0toast: Reflect AttributeTag in the SmPL ASTs

2020-07-16 Thread Jaskaran Singh
AttributeTag is added to the SmPL ASTs. Reflect these changes in ast0toast.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/ast0toast.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/parsing_cocci/ast0toast.ml b/parsing_cocci/ast0toast.ml index 4ccc259b..b4b7600e 100644 --- a

[Cocci] [PATCH 12/24] parsing_cocci: iso_pattern: Reflect AttributeTag in SmPL AST0

2020-07-16 Thread Jaskaran Singh
AttributeTag is added to SmPL AST0. Reflect these changes in iso_pattern.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/iso_pattern.ml | 5 + 1 file changed, 5 insertions(+) diff --git a/parsing_cocci/iso_pattern.ml b/parsing_cocci/iso_pattern.ml index 5200a4c4..24c2927c 100644 --- a

[Cocci] [PATCH 24/24] tools: spgen: Reflect attributefn in AST0 visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST0 visitor has a function for attributes. Reflect these changes in spgen. Signed-off-by: Jaskaran Singh --- tools/spgen/source/detect_patch.ml | 3 ++- tools/spgen/source/meta_variable.ml | 3 ++- tools/spgen/source/rule_body.ml | 3 ++- 3 files changed, 6 insertions(+), 3

[Cocci] [PATCH 14/24] parsing_cocci: context_neg: Reflect AttributeTag in SmPL AST0

2020-07-16 Thread Jaskaran Singh
AttributeTag is added to SmPL AST0. Reflect these changes in context_neg.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/context_neg.ml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/parsing_cocci/context_neg.ml b/parsing_cocci/context_neg.ml index 6a04f49b..a0d52e9a 100644 --- a

[Cocci] [PATCH 19/24] parsing_cocci: visitor_ast: Reflect AttributeTag in SmPL AST

2020-07-16 Thread Jaskaran Singh
AttributeTag is added to the SmPL AST. Reflect these changes in visitor_ast.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/visitor_ast.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/parsing_cocci/visitor_ast.ml b/parsing_cocci/visitor_ast.ml index d5819acf..5288c6f2 100644 --- a

[Cocci] [PATCH 01/24] parsing_cocci: visitor_ast0: Add attributefn to SmPL AST0 visitor

2020-07-16 Thread Jaskaran Singh
Add a public function for visiting attributes to the SmPL AST0 visitor. Signed-off-by: Jaskaran Singh --- parsing_cocci/visitor_ast0.ml| 21 + parsing_cocci/visitor_ast0.mli | 2 ++ parsing_cocci/visitor_ast0_types.ml | 6 ++ parsing_cocci

[Cocci] [PATCH 21/24] ocaml: coccilib: Reflect AttributeTag in the SmPL ASTs

2020-07-16 Thread Jaskaran Singh
AttributeTag is added to the SmPL ASTs. Reflect these changes in coccilib.mli. Signed-off-by: Jaskaran Singh --- ocaml/coccilib.mli | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ocaml/coccilib.mli b/ocaml/coccilib.mli index 010b8aab..19f1512c 100644 --- a/ocaml/coccilib.mli +++ b/ocaml

[Cocci] [PATCH 00/24] parsing_cocci: Add attributefn to the SmPL AST0 visitor

2020-07-16 Thread Jaskaran Singh
This patch series aims to add a public function for visiting attributes to the SmPL AST0 visitor. This is needed to support meta attributes. An AttributeTag constructor is also added due to dependencies, as well as to maintain consistency with the codebase. Jaskaran Singh (24

[Cocci] [PATCH 22/24] parsing_cocci: context_neg: Reflect attributefn in AST0 visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST0 visitor has a function for attributes. Reflect these changes in context_neg.ml. Also add a few general fixes w/r/t the usage of the for_all2 function for comparing attributes. Signed-off-by: Jaskaran Singh --- parsing_cocci/ast0_cocci.mli | 1 + parsing_cocci/context_neg.ml | 20

[Cocci] [PATCH 15/24] parsing_cocci: insert_plus: Reflect AttributeTag in SmPL AST0

2020-07-16 Thread Jaskaran Singh
AttributeTag is added to SmPL AST0. Reflect these changes in insert_plus.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/ast0toast.mli | 1 + parsing_cocci/insert_plus.ml | 8 2 files changed, 9 insertions(+) diff --git a/parsing_cocci/ast0toast.mli b/parsing_cocci/ast0toast.mli

[Cocci] [PATCH 08/24] parsing_cocci: single_statement: Reflect attributefn in AST0 visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST0 visitor has a function for attributes. Reflect these changes in single_statement.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/single_statement.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsing_cocci/single_statement.ml b/parsing_cocci

[Cocci] [PATCH 16/24] parsing_cocci: ast_cocci: Add AttributeTag to the SmPL AST

2020-07-16 Thread Jaskaran Singh
Add the AttributeTag constructor to the SmPL AST. Signed-off-by: Jaskaran Singh --- parsing_cocci/ast_cocci.ml | 2 ++ parsing_cocci/ast_cocci.mli | 1 + 2 files changed, 3 insertions(+) diff --git a/parsing_cocci/ast_cocci.ml b/parsing_cocci/ast_cocci.ml index be6731ab..29c5 100644 --- a

[Cocci] [PATCH 07/24] parsing_cocci: parse_cocci: Reflect attributefn in AST0 visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST0 visitor has a function for attributes. Reflect these changes in parse_cocci.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/parse_cocci.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsing_cocci/parse_cocci.ml b/parsing_cocci/parse_cocci.ml index

[Cocci] [PATCH 18/24] parsing_c: unparse_cocci: Reflect AttributeTag in SmPL AST

2020-07-16 Thread Jaskaran Singh
AttributeTag is added to the SmPL AST. Reflect these changes in unparse_cocci.ml. Signed-off-by: Jaskaran Singh --- parsing_c/unparse_cocci.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/parsing_c/unparse_cocci.ml b/parsing_c/unparse_cocci.ml index 6d437971..e544336d 100644 --- a

[Cocci] [PATCH 03/17] parsing_cocci: cleanup_rules: Reflect attributefn in AST visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST visitor has a function for attributes. Reflect these changes in cleanup_rules.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/cleanup_rules.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsing_cocci/cleanup_rules.ml b/parsing_cocci/cleanup_rules.ml

[Cocci] [PATCH 17/17] popl09: popltoctl: Reflect attributefn in AST visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST visitor has a function for attributes. Reflect these changes in popltoctl.ml. Signed-off-by: Jaskaran Singh --- popl09/popltoctl.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/popl09/popltoctl.ml b/popl09/popltoctl.ml index 1b05a762..da278168 100644 --- a

[Cocci] [PATCH 04/17] parsing_cocci: disjdistr: Reflect attributefn in AST visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST visitor has a function for attributes. Reflect these changes in disjdistr.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/disjdistr.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parsing_cocci/disjdistr.ml b/parsing_cocci/disjdistr.ml index ba2b8c02

[Cocci] [PATCH 06/17] parsing_cocci: get_constants2: Reflect attributefn in AST visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST visitor has a function for attributes. Reflect these changes in get_constants2.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/get_constants2.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/parsing_cocci/get_constants2.ml b/parsing_cocci/get_constants2

[Cocci] [PATCH 15/17] engine: cocci_vs_c: Reflect attributefn in AST visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST visitor has a function for attributes. Reflect these changes in cocci_vs_c.ml. Signed-off-by: Jaskaran Singh --- engine/cocci_vs_c.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/cocci_vs_c.ml b/engine/cocci_vs_c.ml index 9439cdb3..cba6c8d0 100644

[Cocci] [PATCH 01/17] parsing_cocci: visitor_ast: Add attributefn to SmPL AST visitor

2020-07-16 Thread Jaskaran Singh
Add a public function to visit attributes in the SmPL AST visitor. Signed-off-by: Jaskaran Singh --- parsing_cocci/visitor_ast.ml | 12 parsing_cocci/visitor_ast.mli | 4 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/parsing_cocci/visitor_ast.ml b

[Cocci] [PATCH 07/17] parsing_cocci: re_constraints: Reflect attributefn in AST visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST visitor has a function for attributes. Reflect these changes in re_constraints.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/re_constraints.ml | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/parsing_cocci/re_constraints.ml b/parsing_cocci

[Cocci] [PATCH 10/17] parsing_cocci: unify_ast: Reflect attributefn in AST visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST visitor has a function for attributes. Reflect these changes in unify_ast.ml. Also add a few fixes w/r/t the usage of for_all2 for comparing attributes. Signed-off-by: Jaskaran Singh --- parsing_cocci/unify_ast.ml | 20 +--- 1 file changed, 13 insertions(+), 7

[Cocci] [PATCH 14/17] engine: asttomember: Reflect attributefn in AST visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST visitor has a function for attributes. Reflect these changes in asttomember.ml. Signed-off-by: Jaskaran Singh --- engine/asttomember.ml | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/asttomember.ml b/engine/asttomember.ml index a893a833..05896443

[Cocci] [PATCH 08/17] parsing_cocci: safe_for_multi_decls: Reflect attributefn in AST visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST visitor has a function for attributes. Reflect these changes in safe_for_multi_decls.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/safe_for_multi_decls.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parsing_cocci/safe_for_multi_decls.ml b

[Cocci] [PATCH 09/17] parsing_cocci: stmtlist: Reflect attributefn in AST visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST visitor has a function for attributes. Reflect these changes in stmtlist.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/stmtlist.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsing_cocci/stmtlist.ml b/parsing_cocci/stmtlist.ml index 4e7a0b5a

[Cocci] [PATCH 02/17] parsing_cocci: parse_cocci: Reflect attributefn in AST visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST visitor has a function for attributes. Reflect these changes in parse_cocci.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/parse_cocci.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsing_cocci/parse_cocci.ml b/parsing_cocci/parse_cocci.ml index

[Cocci] [PATCH 16/17] engine: transformation_c: Reflect attributefn in AST visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST visitor has a function for attributes. Reflect these changes in transformation_c.ml. Signed-off-by: Jaskaran Singh --- engine/transformation_c.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/transformation_c.ml b/engine/transformation_c.ml index

[Cocci] [PATCH 12/17] cocci: Reflect attributefn in AST visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST visitor has a function for attributes. Reflect these changes in cocci.ml. Signed-off-by: Jaskaran Singh --- cocci.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocci.ml b/cocci.ml index 3f315d4c..858c6672 100644 --- a/cocci.ml +++ b/cocci.ml @@ -600,7

[Cocci] [PATCH 11/17] parsing_c: unparse_hrule: Reflect attributefn in AST visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST visitor has a function for attributes. Reflect these changes in unparse_hrule.ml. Signed-off-by: Jaskaran Singh --- parsing_c/unparse_hrule.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsing_c/unparse_hrule.ml b/parsing_c/unparse_hrule.ml index fca985ca

[Cocci] [PATCH 05/17] parsing_cocci: free_vars: Reflect attributefn in AST visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST visitor has a function for attributes. Reflect these changes in free_vars.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/free_vars.ml | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/parsing_cocci/free_vars.ml b/parsing_cocci/free_vars.ml

[Cocci] [PATCH 13/17] engine: asttoctl2: Reflect attributefn in AST visitor

2020-07-16 Thread Jaskaran Singh
The SmPL AST visitor has a function for attributes. Reflect these changes in asttoctl2.ml. Signed-off-by: Jaskaran Singh --- engine/asttoctl2.ml | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/engine/asttoctl2.ml b/engine/asttoctl2.ml index 51d574fa..6f415c1c

[Cocci] [PATCH 00/17] parsing_cocci: Add attributefn to the SmPL AST visitor

2020-07-16 Thread Jaskaran Singh
This patch series aims to add a public function for visiting attributes to the SmPL AST visitor. This is needed to support meta attributes. Jaskaran Singh (17): parsing_cocci: visitor_ast: Add attributefn to SmPL AST visitor parsing_cocci: parse_cocci: Reflect attributefn in AST

[Cocci] [PATCH 20/43] parsing_cocci: check_meta: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in check_meta.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/check_meta.ml | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/parsing_cocci/check_meta.ml b/parsing_cocci

[Cocci] [PATCH 17/43] ocaml: run_ocamlcocci: Reflect MetaAttributeVal

2020-07-26 Thread Jaskaran Singh
MetaAttributeVal is added to the C AST. Reflect these changes in run_ocamlcocci.ml. Signed-off-by: Jaskaran Singh --- ocaml/run_ocamlcocci.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/ocaml/run_ocamlcocci.ml b/ocaml/run_ocamlcocci.ml index 065428391..14decf886 100644 --- a/ocaml

[Cocci] [PATCH 15/43] ocaml: coccilib: Reflect MetaAttributeVal

2020-07-26 Thread Jaskaran Singh
MetaAttributeVal is added to the C AST. Reflect these changes in coccilib.ml and coccilib.mli. Signed-off-by: Jaskaran Singh --- ocaml/coccilib.ml | 1 + ocaml/coccilib.mli | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ocaml/coccilib.ml b/ocaml/coccilib.ml index 0a7e0eb98..459f4c6be

[Cocci] [PATCH 24/43] parsing_cocci: iso_pattern: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in iso_pattern.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/iso_pattern.ml | 44 +++- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/parsing_cocci/iso_pattern.ml b/parsing_cocci

[Cocci] [PATCH 03/43] parsing_cocci: parse_cocci: Reflect MetaAttribute & MetaAttributeDecl

2020-07-26 Thread Jaskaran Singh
MetaAttribute and MetaAttributeDecl are added to the SmPL AST. Reflect these changes in parse_cocci.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/parse_cocci.ml | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/parsing_cocci/parse_cocci.ml b/parsing_cocci

[Cocci] [PATCH 25/43] parsing_cocci: function_prototypes: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in function_prototypes.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/function_prototypes.ml | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/parsing_cocci/function_prototypes.ml b/parsing_cocci

[Cocci] [PATCH 01/43] parsing_cocci: ast0_cocci: Add MetaAttribute & MetaAttributeDecl

2020-07-26 Thread Jaskaran Singh
Add the MetaAttribute and MetaAttributeDecl variants to AST0 of SmPL. Signed-off-by: Jaskaran Singh --- parsing_cocci/ast0_cocci.ml | 1 + parsing_cocci/ast0_cocci.mli | 1 + 2 files changed, 2 insertions(+) diff --git a/parsing_cocci/ast0_cocci.ml b/parsing_cocci/ast0_cocci.ml index

[Cocci] [PATCH 00/43] cocci: Add support for meta attributes to SmPL

2020-07-26 Thread Jaskaran Singh
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 & MetaAttri

[Cocci] [PATCH 02/43] parsing_cocci: parser: Parse meta attributes and metaattr decls

2020-07-26 Thread Jaskaran Singh
Introduce changes to parse meta attributes and meta attribute declarations in SmPL rules. Currently, meta attributes are only parsed in context and minus code. Signed-off-by: Jaskaran Singh --- parsing_cocci/data.ml | 1 + parsing_cocci/data.mli| 1

[Cocci] [PATCH 11/43] parsing_c: unparse_hrule: Reflect MetaAttributeVal

2020-07-26 Thread Jaskaran Singh
MetaAttributeVal is added to the C AST. Reflect these changes in unparse_hrule.ml. Signed-off-by: Jaskaran Singh --- parsing_c/unparse_hrule.ml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/parsing_c/unparse_hrule.ml b/parsing_c/unparse_hrule.ml index 4d7ba93cc..9d6421f31 100644 --- a

[Cocci] [PATCH 21/43] parsing_cocci: adjust_pragmas: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in adjust_pragmas.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/adjust_pragmas.ml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/parsing_cocci/adjust_pragmas.ml b/parsing_cocci/adjust_pragmas.ml index 8f24fa718

[Cocci] [PATCH 19/43] parsing_cocci: visitor_ast0: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Visit meta attributes in the SmPL AST0 visitor. Signed-off-by: Jaskaran Singh --- parsing_cocci/visitor_ast0.ml | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/parsing_cocci/visitor_ast0.ml b/parsing_cocci/visitor_ast0.ml index

[Cocci] [PATCH 18/43] python: pycocci_aux: Reflect MetaAttributeVal

2020-07-26 Thread Jaskaran Singh
MetaAttributeVal is added to the C AST. Reflect these changes in pycocci_aux.ml. Signed-off-by: Jaskaran Singh --- python/pycocci_aux.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/pycocci_aux.ml b/python/pycocci_aux.ml index d83059455..85a8eefe3 100644 --- a/python

[Cocci] [PATCH 12/43] engine: cocci_vs_c: Reflect MetaAttributeVal

2020-07-26 Thread Jaskaran Singh
MetaAttributeVal is added to the C AST. Reflect these changes in cocci_vs_c.ml. Signed-off-by: Jaskaran Singh --- engine/cocci_vs_c.ml| 8 ++-- parsing_c/lib_parsing_c.ml | 3 +++ parsing_c/lib_parsing_c.mli | 3 +++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a

[Cocci] [PATCH 27/43] parsing_cocci: unitary_ast0: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in unitary_ast0.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/unitary_ast0.ml | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/parsing_cocci/unitary_ast0.ml b/parsing_cocci/unitary_ast0.ml index

[Cocci] [PATCH 04/43] parsing_cocci: ast_cocci: Add MetaAttribute & MetaAttributeDecl

2020-07-26 Thread Jaskaran Singh
Add the MetaAttribute and MetaAttributeDecl consturctors the SmPL AST. Signed-off-by: Jaskaran Singh --- parsing_cocci/ast_cocci.ml | 3 +++ parsing_cocci/ast_cocci.mli | 2 ++ 2 files changed, 5 insertions(+) diff --git a/parsing_cocci/ast_cocci.ml b/parsing_cocci/ast_cocci.ml index

[Cocci] [PATCH 22/43] parsing_cocci: context_neg: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in context_neg.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/context_neg.ml | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/parsing_cocci/context_neg.ml b/parsing_cocci/context_neg.ml

[Cocci] [PATCH 09/43] ocaml: yes_prepare_ocamlcocci: Reflect MetaAttribute & MetaAttributeDecl

2020-07-26 Thread Jaskaran Singh
MetaAttribute and MetaAttributeDecl are added to the SmPL AST. Reflect these changes in yes_prepare_ocamlcocci.ml. Signed-off-by: Jaskaran Singh --- ocaml/yes_prepare_ocamlcocci.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/ocaml/yes_prepare_ocamlcocci.ml b/ocaml

[Cocci] [PATCH 13/43] engine: pattern_c: Reflect MetaAttributeVal

2020-07-26 Thread Jaskaran Singh
MetaAttributeVal is added to the C AST. Reflect these changes in pattern_c.ml. Signed-off-by: Jaskaran Singh --- engine/pattern_c.ml | 6 ++ 1 file changed, 6 insertions(+) diff --git a/engine/pattern_c.ml b/engine/pattern_c.ml index 821a5900e..7d9a2dcc1 100644 --- a/engine/pattern_c.ml

[Cocci] [PATCH 14/43] engine: pretty_print_engine: Add MetaAttributeVal

2020-07-26 Thread Jaskaran Singh
MetaAttributeVal is added to the C AST. Reflect these changes in pretty_print_engine.ml. Signed-off-by: Jaskaran Singh --- engine/pretty_print_engine.ml | 1 + parsing_c/pretty_print_c.ml | 12 parsing_c/pretty_print_c.mli | 5 + 3 files changed, 18 insertions(+) diff

[Cocci] [PATCH 28/43] parsing_cocci: unparse_ast0: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in unparse_ast0.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/unparse_ast0.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/parsing_cocci/unparse_ast0.ml b/parsing_cocci/unparse_ast0.ml index 875282fb0..e2556cb80 100644

[Cocci] [PATCH 33/43] parsing_cocci: get_constants: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in get_constants.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/get_constants.ml | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/parsing_cocci/get_constants.ml b/parsing_cocci/get_constants.ml index

[Cocci] [PATCH 16/43] ocaml: ocamlcocci_aux: Reflect MetaAttributeVal

2020-07-26 Thread Jaskaran Singh
MetaAttributeVal is added to the C AST. Reflect these changes in ocamlcocci_aux.ml. Signed-off-by: Jaskaran Singh --- ocaml/ocamlcocci_aux.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ocaml/ocamlcocci_aux.ml b/ocaml/ocamlcocci_aux.ml index 7ec3a964f..ccbf6858e 100644 --- a/ocaml

[Cocci] [PATCH 08/43] ocaml: coccilib: Reflect MetaAttribute & MetaAttributeDecl

2020-07-26 Thread Jaskaran Singh
MetaAttribute and MetaAttributeDecl are added to the SmPL AST. Reflect these changes in coccilib.mli. Signed-off-by: Jaskaran Singh --- ocaml/coccilib.mli | 4 1 file changed, 4 insertions(+) diff --git a/ocaml/coccilib.mli b/ocaml/coccilib.mli index 19f1512cd..3960d1046 100644 --- a

[Cocci] [PATCH 29/43] parsing_cocci: ast0toast: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in ast0toast.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/ast0toast.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/parsing_cocci/ast0toast.ml b/parsing_cocci/ast0toast.ml index b4b7600ed..16a2ffd30

[Cocci] [PATCH 26/43] parsing_cocci: arity: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in arity.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/arity.ml | 29 +++-- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/parsing_cocci/arity.ml b/parsing_cocci/arity.ml index 23eb32f9a

[Cocci] [PATCH 10/43] parsing_c: ast_c: Add MetaAttributeVal

2020-07-26 Thread Jaskaran Singh
Add the MetaAttributeVal constructor to the C AST. Signed-off-by: Jaskaran Singh --- parsing_c/ast_c.ml | 1 + parsing_c/ast_c.mli | 1 + 2 files changed, 2 insertions(+) diff --git a/parsing_c/ast_c.ml b/parsing_c/ast_c.ml index 645f9e183..2c682fe21 100644 --- a/parsing_c/ast_c.ml +++ b

[Cocci] [PATCH 07/43] parsing_cocci: pretty_print_cocci: Reflect MetaAttribute & MetaAttributeDecl

2020-07-26 Thread Jaskaran Singh
MetaAttribute and MetaAttributeDecl are added to the SmPL AST. Reflect these changes in pretty_print_cocci.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/pretty_print_cocci.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/parsing_cocci/pretty_print_cocci.ml b/parsing_cocci

[Cocci] [PATCH 05/43] parsing_cocci: iso_pattern: Reflect MetaAttribute & MetaAttributeDecl

2020-07-26 Thread Jaskaran Singh
MetaAttribute and MetaAttributeDecl are added to the SmPL AST. Reflect these changes in iso_pattern.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/iso_pattern.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/parsing_cocci/iso_pattern.ml b/parsing_cocci/iso_pattern.ml index

[Cocci] [PATCH 06/43] parsing_c: unparse_hrule: Reflect MetaAttribute & MetaAttributeDecl

2020-07-26 Thread Jaskaran Singh
MetaAttribute and MetaAttributeDecl are added to the SmPL AST. Reflect these changes in unparse_hrule.ml. Signed-off-by: Jaskaran Singh --- parsing_c/unparse_hrule.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/parsing_c/unparse_hrule.ml b/parsing_c/unparse_hrule.ml index 3078dde41

[Cocci] [PATCH 35/43] parsing_cocci: index: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in index.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/index.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/parsing_cocci/index.ml b/parsing_cocci/index.ml index cb3ac7ecd..ca54bc85d 100644 --- a

[Cocci] [PATCH 32/43] parsing_cocci: free_vars: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in free_vars.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/free_vars.ml | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/parsing_cocci/free_vars.ml b/parsing_cocci/free_vars.ml

[Cocci] [PATCH 34/43] parsing_cocci: get_constants2: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in get_constants2.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/get_constants2.ml | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/parsing_cocci/get_constants2.ml b/parsing_cocci/get_constants2.ml

[Cocci] [PATCH 31/43] parsing_cocci: cleanup_rules: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in cleanup_rules.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/cleanup_rules.ml | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/parsing_cocci/cleanup_rules.ml b/parsing_cocci/cleanup_rules.ml index

[Cocci] [PATCH 41/43] tools: spgen: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in spgen. Signed-off-by: Jaskaran Singh --- tools/spgen/source/meta_variable.ml | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/spgen/source/meta_variable.ml b/tools/spgen/source/meta_variable.ml

[Cocci] [PATCH 37/43] parsing_cocci: safe_for_multi_decls: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in safe_for_multi_decls.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/safe_for_multi_decls.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/parsing_cocci/safe_for_multi_decls.ml b/parsing_cocci/safe_for_multi_decls.ml

[Cocci] [PATCH 39/43] parsing_c: unparse_cocci: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in unparse_cocci.ml. Signed-off-by: Jaskaran Singh --- parsing_c/unparse_cocci.ml | 6 ++ 1 file changed, 6 insertions(+) diff --git a/parsing_c/unparse_cocci.ml b/parsing_c/unparse_cocci.ml index e544336d0..7be18bf1c 100644

[Cocci] [PATCH 42/43] tests: Add test case to match meta attribute

2020-07-26 Thread Jaskaran Singh
Meta attributes are added to SmPL. Add test case to match and detect a meta attribute in C code. Signed-off-by: Jaskaran Singh --- tests/metaattr.c | 5 + tests/metaattr.cocci | 9 + tests/metaattr.res | 5 + 3 files changed, 19 insertions(+) create mode 100644 tests

[Cocci] [PATCH 40/43] engine: cocci_vs_c: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in cocci_vs_c.ml. Signed-off-by: Jaskaran Singh --- engine/cocci_vs_c.ml | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/engine/cocci_vs_c.ml b/engine/cocci_vs_c.ml index ed91a4785..0b698287d

[Cocci] [PATCH 43/43] tests: Add test case to remove a meta attribute

2020-07-26 Thread Jaskaran Singh
Meta attributes are added to SmPL. Add a test case to match and remove a meta attribute from C code. Signed-off-by: Jaskaran Singh --- tests/remove_metaattr.c | 5 + tests/remove_metaattr.cocci | 9 + tests/remove_metaattr.res | 5 + 3 files changed, 19 insertions

[Cocci] [PATCH 38/43] parsing_cocci: unify_ast: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in unify_ast.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/unify_ast.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/parsing_cocci/unify_ast.ml b/parsing_cocci/unify_ast.ml index 98e2ab1dd..811c91f30 100644 --- a

[Cocci] [PATCH 36/43] parsing_cocci: pretty_print_cocci: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in pretty_print_cocci.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/pretty_print_cocci.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/parsing_cocci/pretty_print_cocci.ml b/parsing_cocci/pretty_print_cocci.ml index

[Cocci] [PATCH 23/43] parsing_cocci: compute_lines: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Reflect these changes in compute_lines.ml. Signed-off-by: Jaskaran Singh --- parsing_cocci/compute_lines.ml | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/parsing_cocci/compute_lines.ml b/parsing_cocci/compute_lines.ml

[Cocci] [PATCH 30/43] parsing_cocci: visitor_ast: Reflect MetaAttribute

2020-07-26 Thread Jaskaran Singh
MetaAttribute is added to the SmPL AST. Visit it in the SmPL AST visitor. Signed-off-by: Jaskaran Singh --- parsing_cocci/visitor_ast.ml | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/parsing_cocci/visitor_ast.ml b/parsing_cocci/visitor_ast.ml index 17afc5183

Re: [Cocci] [PATCH 00/43] cocci: Add support for meta attributes to SmPL

2020-08-02 Thread Jaskaran Singh
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. > >

Re: [Cocci] [00/43] cocci: Add support for meta attributes to SmPL

2020-08-03 Thread Jaskaran Singh
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” > > > )? > > > >

Re: [Cocci] [00/43] cocci: Add support for meta attributes to SmPL

2020-08-08 Thread Jaskaran Singh
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 Co

[Cocci] [RFC PATCH 2/3] parsing_c: parse_c: Build name cache and includes dependency graph

2020-09-09 Thread Jaskaran Singh
Build the includes dependency graph and name cache while parsing header files. Every header file is parsed only once for name caching and, while parsing these files, an includes dependency graph is built to determine reachability of one header file from another file. Signed-off-by: Jaskaran Singh

[Cocci] [RFC PATCH 1/3] parsing_c: includes_cache: Implement a name cache

2020-09-09 Thread Jaskaran Singh
lia Lawall Signed-off-by: Jaskaran Singh --- Makefile | 2 +- parsing_c/includes_cache.ml | 286 +++ parsing_c/includes_cache.mli | 47 ++ 3 files changed, 334 insertions(+), 1 deletion(-) create mode 100644 parsing_c/includes_cache.ml c

[Cocci] [RFC PATCH 3/3] parsing_c: type_annoter_c: Use name cache for type annotation

2020-09-09 Thread Jaskaran Singh
- enumeration constant Signed-off-by: Jaskaran Singh --- parsing_c/type_annoter_c.ml | 130 ++-- 1 file changed, 111 insertions(+), 19 deletions(-) diff --git a/parsing_c/type_annoter_c.ml b/parsing_c/type_annoter_c.ml index 25cb6c0ee..497332544 100644 --- a

[Cocci] [RFC PATCH 0/3] parsing_c: Optimize recursive header file parsing

2020-09-09 Thread Jaskaran Singh
This patch series aims to optimize performance for recursively parsing header files in Coccinelle. Coccinelle's C parsing subsystem has an option called --recursive-includes to recursively parse header files. This is used for type inference/annotation. Previously, using --recursive-includes on th

Re: [Cocci] [RFC PATCH 2/3] parsing_c: parse_c: Build name cache and includes dependency graph

2020-09-09 Thread Jaskaran Singh
On Wed, 2020-09-09 at 21:41 +0200, Julia Lawall wrote: > > On Wed, 9 Sep 2020, Jaskaran Singh wrote: > > > Build the includes dependency graph and name cache while parsing > > header > > files. Every header file is parsed only once for name caching and, > >

Re: [Cocci] [RFC PATCH 1/3] parsing_c: includes_cache: Implement a name cache

2020-09-09 Thread Jaskaran Singh
On Wed, 2020-09-09 at 22:05 +0200, Markus Elfring wrote: > > Implement a name cache and includes dependency graph to optimize > > performance for recursive parsing of header files. > > Can such information trigger any more evolution besides the > contributed > OCaml source code? > > > > The na

[Cocci] [PATCH v2 3/3] parsing_c: type_annoter_c: Use name cache for type annotation

2020-09-09 Thread Jaskaran Singh
- enumeration constant Signed-off-by: Jaskaran Singh --- parsing_c/type_annoter_c.ml | 134 +++- 1 file changed, 115 insertions(+), 19 deletions(-) diff --git a/parsing_c/type_annoter_c.ml b/parsing_c/type_annoter_c.ml index 25cb6c0ee..49fd060be 100644 --- a

[Cocci] [PATCH v2 0/3] parsing_c: Optimize recursive header file parsing

2020-09-09 Thread Jaskaran Singh
This patch series aims to optimize performance for recursively parsing header files in Coccinelle. Coccinelle's C parsing subsystem has an option called --recursive-includes to recursively parse header files. This is used for type inference/annotation. Previously, using --recursive-includes on th

[Cocci] [PATCH v2 2/3] parsing_c: parse_c: Build name cache and includes dependency graph

2020-09-09 Thread Jaskaran Singh
Build the includes dependency graph and name cache while parsing header files. Every header file is parsed only once for name caching and, while parsing these files, an includes dependency graph is built to determine reachability of one header file from another file. Signed-off-by: Jaskaran Singh

[Cocci] [PATCH v2 1/3] parsing_c: includes_cache: Implement a name cache

2020-09-09 Thread Jaskaran Singh
lia Lawall Signed-off-by: Jaskaran Singh --- Makefile | 2 +- parsing_c/includes_cache.ml | 290 +++ parsing_c/includes_cache.mli | 47 ++ 3 files changed, 338 insertions(+), 1 deletion(-) create mode 100644 parsing_c/includes_cache.ml c

Re: [Cocci] [PATCH v2 0/3] parsing_c: Optimize recursive header file parsing

2020-09-09 Thread Jaskaran Singh
On Thu, 2020-09-10 at 11:47 +0530, Jaskaran Singh wrote: > This patch series aims to optimize performance for recursively > parsing > header files in Coccinelle. > > Coccinelle's C parsing subsystem has an option called --recursive- > includes > to recursively parse head

<    1   2   3   4   5   6