All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] version 1.0.0-rc24 released
@ 2015-02-03 22:12 Julia Lawall
  2015-02-04  8:29 ` [Cocci] Software evolution after Coccinelle 1.0.0-rc24? SF Markus Elfring
  0 siblings, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2015-02-03 22:12 UTC (permalink / raw)
  To: cocci

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

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

* [Cocci] Software evolution after Coccinelle 1.0.0-rc24?
  2015-02-03 22:12 [Cocci] version 1.0.0-rc24 released Julia Lawall
@ 2015-02-04  8:29 ` SF Markus Elfring
  2015-02-04  8:39   ` Julia Lawall
  0 siblings, 1 reply; 5+ messages in thread
From: SF Markus Elfring @ 2015-02-04  8:29 UTC (permalink / raw)
  To: cocci

> Now it is also possible to match a global variable,
> by saying "global expression x;".

Would you like to refer to "idexpression" here?


> 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?


> 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?


> --jobs <int>: Run the specified number of jobs in parallel.

This addition is nice.


> 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?


> 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

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

* [Cocci] Software evolution after Coccinelle 1.0.0-rc24?
  2015-02-04  8:29 ` [Cocci] Software evolution after Coccinelle 1.0.0-rc24? SF Markus Elfring
@ 2015-02-04  8:39   ` Julia Lawall
  2015-02-04  9:11     ` SF Markus Elfring
  0 siblings, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2015-02-04  8:39 UTC (permalink / raw)
  To: cocci

On Wed, 4 Feb 2015, SF Markus Elfring wrote:

> > 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.

> > 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.

> > 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.

> > --jobs <int>: Run the specified number of jobs in parallel.
>
> This addition is nice.
>
>
> > 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.

> 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.

> > 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.

> 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

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

* [Cocci] Software evolution after Coccinelle 1.0.0-rc24?
  2015-02-04  8:39   ` Julia Lawall
@ 2015-02-04  9:11     ` SF Markus Elfring
  2015-02-04 12:31       ` Julia Lawall
  0 siblings, 1 reply; 5+ messages in thread
From: SF Markus Elfring @ 2015-02-04  9:11 UTC (permalink / raw)
  To: cocci

> 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.

 
> 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

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

* [Cocci] Software evolution after Coccinelle 1.0.0-rc24?
  2015-02-04  9:11     ` SF Markus Elfring
@ 2015-02-04 12:31       ` Julia Lawall
  0 siblings, 0 replies; 5+ messages in thread
From: Julia Lawall @ 2015-02-04 12:31 UTC (permalink / raw)
  To: cocci

On Wed, 4 Feb 2015, SF Markus Elfring wrote:

> > 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.
>
>
> > 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

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

end of thread, other threads:[~2015-02-04 12:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-03 22:12 [Cocci] version 1.0.0-rc24 released Julia Lawall
2015-02-04  8:29 ` [Cocci] Software evolution after Coccinelle 1.0.0-rc24? SF Markus Elfring
2015-02-04  8:39   ` Julia Lawall
2015-02-04  9:11     ` SF Markus Elfring
2015-02-04 12:31       ` Julia Lawall

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.