All of lore.kernel.org
 help / color / mirror / Atom feed
From: elfring@users.sourceforge.net (SF Markus Elfring)
To: cocci@systeme.lip6.fr
Subject: [Cocci] script code on metavariables
Date: Mon, 18 Jan 2016 13:00:31 +0100	[thread overview]
Message-ID: <569CD3DF.2010600@users.sourceforge.net> (raw)
In-Reply-To: <alpine.DEB.2.10.1601181138430.2520@hadrien>

> It is not possible to write an OCaml function definition that has the form
> of a C expression.  In practice, it is likely that one would only make a
> function call, like I showed in my example.

Are method calls are also supported there depending on the reused
programming language?


>> Does the described SmPL extension correspond to predicate functionality?
> 
> I guess.  The script code should return true or false.  If the script
> returns true, the match succeeds.

http://c2.com/cgi/wiki?PredicateFunction
http://stackoverflow.com/questions/5921609/what-is-predicate-in-c
https://en.wikipedia.org/wiki/Filter_%28higher-order_function%29

Will this kind of information matter for the outline in the evolving
documentation of the semantic patch language?



>> Will this aspect need further considerations because of the evolving
>> parallelisation support?
>> https://github.com/coccinelle/coccinelle/issues/50
> 
> I believe that parallelism with -j only fails if there is a finalize.

Would you like to clarify such an implementation detail a bit more?


> An initialize by itself should be OK.

How often will you need a corresponding finalisation action
(or destructor)?

Can the predicate function be eventually executed in parallel
(by a dedicated thread or another background process)?

Regards,
Markus

  reply	other threads:[~2016-01-18 12:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-17  8:47 [Cocci] script code on metavariables Julia Lawall
2016-01-18 10:11 ` SF Markus Elfring
2016-01-18 10:15   ` Julia Lawall
2016-01-18 10:30     ` SF Markus Elfring
2016-01-18 10:43       ` Julia Lawall
2016-01-18 12:00         ` SF Markus Elfring [this message]
2016-01-18 12:05           ` Julia Lawall
2016-01-18 12:28             ` SF Markus Elfring
2016-01-18 20:25         ` [Cocci] Documentation check for parallelisation support? SF Markus Elfring

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=569CD3DF.2010600@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=cocci@systeme.lip6.fr \
    /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.