version 1.0.0-rc24 released
Some changes:
* Previously, it was possible to declare a metavariable to match only a local variable, by saying "local idexpression x;". Now it is also possible to match a global variable, by saying "global expression x;".
* By default, when a semantic patch changes a function header, eg adding new parameter, Coccinelle generates a corresponding rule for changing the function prototype. It is now possible to disable this behavior, by putting disable prototypes in the rule header.
* Varargs. It is now possible to match and transform functions that have varargs in their parameter list. Because of the conflict with the ... notation of Coccinelle, the ... of C is written ...... (6 dots) in a semantc patch.
* Inline in function prototypes. These were not previously allowed in semantic patch code.
* #ifdef on kernel version. Previously these were always considered to be comments. Now they are treated like other #ifdefs. Specifically, if such an ifdef is around complete statements, the control flow will behave as for an if.
* Parallelism in Coccinelle. The following is an extract from the option documentation:
--jobs <int>: Run the specified number of jobs in parallel. Can be abbreviated as -j. This option is not compatible with the use of an initialize or finalize rule in the semantic patch. This option furthermore creates a temporary directory in the directory from which spatch is executed that has the name of the semantic patch (without its extension) and that contains stdout and stderr files generated by the various processes. When the semantic patch completes, the contents of these files are printed to standard output and standard error, respectively, and the directory is removed.
--chunksize <int>. The specified number of files are dispatched as a single unit of parallelism. This option is only interesting with the options --all-includes or --recursive-includes, when combined with the option --include-headers-for-types. In this case, parsed header files are cached. It is only the files that are treated within a single chunk that can benefit from this cache, due to the lack of shared memory in ocaml.
julia
[Cocci] Software evolution after Coccinelle 1.0.0-rc24?
Quoted 2 lines
Now it is also possible to match a global variable, by saying "global expression x;".
Would you like to refer to "idexpression" here?
Quoted 2 lines
It is now possible to disable this behavior,
by putting disable prototypes in the rule header.
Which software release will mention this functionality also in the manual?
Quoted 2 lines
Because of the conflict with the ... notation of Coccinelle, the ... of C is written ...... (6 dots) in a semantc patch.
How do you think about to support also two ellipsis characters (Unicode: 0x2026) there?
Quoted 1 line
--jobs <int>: Run the specified number of jobs in parallel.
This addition is nice.
Quoted 2 lines
This option is not compatible with the use of an initialize or finalize rule in the semantic patch.
I find that this limitation will need more explanations.
How do the calls to the script interpreters for OCaml and Python fit into the current architecture around process parallelism?
Quoted 4 lines
This option furthermore creates a temporary directory in the directory from which spatch is executed that has the name of the semantic patch (without its extension) and that contains stdout and stderr files generated by the various processes.
Will it become possible to specify alternative paths for such temporary work directories?
Further update suggestions:
* When will the parameter "parse-handler" be described also in the documentation source file "spatch_options.tex"?
* Would you like to fix another dangling link for the topic "Tips and Tricks"?
http://coccinelle.lip6.fr/docs/main_grammar015.html
Regards,
Markus
[Cocci] Software evolution after Coccinelle 1.0.0-rc24?
Quoted 4 lines · SF Markus Elfring
Quoted 2 lines
Now it is also possible to match a global variable, by saying "global expression x;".
Would you like to refer to "idexpression" here?
Yes, you are correct. It should have been idexpression.
Quoted 4 lines
Quoted 2 lines
It is now possible to disable this behavior,
by putting disable prototypes in the rule header.Which software release will mention this functionality also in the manual?
I guess the next one.
Quoted 5 lines
Quoted 2 lines
Because of the conflict with the ... notation of Coccinelle, the ... of C is written ...... (6 dots) in a semantc patch.
How do you think about to support also two ellipsis characters (Unicode:
0x2026) there?
It seems too confusing.
Quoted 9 lines
Quoted 1 line
--jobs <int>: Run the specified number of jobs in parallel.
This addition is nice.
Quoted 2 lines
This option is not compatible with the use of an initialize or finalize rule in the semantic patch.
I find that this limitation will need more explanations.
There is no shared memory in ocaml. Initialize is often used to create variables that are intended to be used in multiple script occurrences and finalize may accumulate their results. The result could be unexpected if the locations are not shared across all of the executions. So the safe thing is to simply disallow initialize and finalize.
Quoted 2 lines
How do the calls to the script interpreters for OCaml and Python fit into the current architecture around process parallelism?
No idea what the question means.
Quoted 7 lines
Quoted 4 lines
This option furthermore creates a temporary directory in the directory from which spatch is executed that has the name of the semantic patch (without its extension) and that contains stdout and stderr files generated by the various processes.
Will it become possible to specify alternative paths for such temporary work directories?
We already have around 100 options. Unless there is a big need for this, I don't want to add another one.
Quoted 6 lines
Further update suggestions:
* When will the parameter "parse-handler" be described also in the documentation source file "spatch_options.tex"?* Would you like to fix another dangling link for the topic "Tips and Tricks"?
http://coccinelle.lip6.fr/docs/main_grammar015.html
OK.
julia
[Cocci] Software evolution after Coccinelle 1.0.0-rc24?
Quoted 2 lines
Initialize is often used to create variables that are intended to be used in multiple script occurrences and finalize may accumulate their results.
I like this functionality.
Quoted 1 line
So the safe thing is to simply disallow initialize and finalize.
I guess that another safe design option is to achieve process parallelism by passing command-line parameters like "index" and "max" as before the current software release.
Regards,
Markus
[Cocci] Software evolution after Coccinelle 1.0.0-rc24?
Quoted 11 lines · SF Markus Elfring
Quoted 2 lines
Initialize is often used to create variables that are intended to be used in multiple script occurrences and finalize may accumulate their results.
I like this functionality.
Quoted 1 line
So the safe thing is to simply disallow initialize and finalize.
I guess that another safe design option is to achieve process parallelism by passing command-line parameters like "index" and "max" as before the current software release.
That's fine, but you get static parallelism. That is, you often end up with only a few cores that are doing something.
julia