From: elfring@users.sourceforge.net (SF Markus Elfring)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Clarification for scripted SmPL constraints
Date: Sat, 17 Feb 2018 15:54:16 +0100 [thread overview]
Message-ID: <0fcc795e-4d45-d92e-b2c2-149a8485dfd5@users.sourceforge.net> (raw)
In-Reply-To: <alpine.DEB.2.20.1802171531330.2205@hadrien>
>> Which parameters should be passed to the selected function?
>
> You can always pass the declared metavariable.
I have got special imaginations for convenient parameter passing
in such an use case.
> You can put a comma-separated list of inherited metavariables
Do you suggest that a dependency on metavariable inheritance is required?
> (r.a, r.b, ...) between the parentheses, and then use a, b, etc in the script code.
I would appreciate if the needed data would be directly available for
the predicate function (without repeating variable names).
> If there are no disjunctions in the rule and if the declared metavariable
> is no seprated by ... from a metavariable previously declared in the same rule,
> then the latter variable can be included in the () as well, with no rule
> name, and then used in the script code.
I find this condition hard to understand at the moment.
Regards,
Markus
prev parent reply other threads:[~2018-02-17 14:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-17 13:34 [Cocci] Avoiding code duplication for SmPL constraints SF Markus Elfring
2018-02-17 13:39 ` Julia Lawall
[not found] ` <388d5af8-d3e4-ee18-7481-3675e2b52024@users.sourceforge.net>
2018-02-17 14:11 ` Julia Lawall
[not found] ` <9d550db4-cad4-f625-32da-173078fdde54@users.sourceforge.net>
2018-02-17 14:34 ` [Cocci] Clarification for scripted " Julia Lawall
2018-02-17 14:54 ` SF Markus Elfring [this message]
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=0fcc795e-4d45-d92e-b2c2-149a8485dfd5@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.