From: Julia Lawall <julia.lawall@inria.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Coccinelle <cocci@systeme.lip6.fr>,
Gilles Muller <Gilles.Muller@lip6.fr>,
Julia Lawall <Julia.Lawall@lip6.fr>,
Masahiro Yamada <masahiroy@kernel.org>,
Michal Marek <michal.lkml@markovi.net>,
Nicolas Palix <nicolas.palix@imag.fr>,
Sumera Priyadarsini <sylphrenadin@gmail.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Denis Efremov <efremov@linux.com>
Subject: Re: Coccinelle: Checking the influence of “Grep query”
Date: Thu, 22 Oct 2020 14:35:03 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2010221434210.5113@hadrien> (raw)
In-Reply-To: <acaed49b9195d47e252a0b67551f87e96324d004.camel@web.de>
[-- Attachment #1: Type: text/plain, Size: 1751 bytes --]
On Thu, 22 Oct 2020, Markus Elfring wrote:
> > A disjunction is applied by this script for the semantic patch language.
> > This construct uses short-circuit evaluation. It has got the consequence
> > that the last element of the specified condition will only be checked
> > if all previous parts did not match. Such a technical detail leads to
> > a recommended ordering of condition parts if you would like to care for
> > optimal run time characteristics of SmPL code.
>
> I imagine that such information can trigger further software evolution
> at more places.
>
>
> > +++ b/scripts/coccinelle/iterators/for_each_child.cocci
>
> The software “Coccinelle 1.0.8-00177-g28737419” displays the following data.
>
> elfring@Sonne:~/Projekte/Linux/next-patched> spatch -D patch --parse-cocci
> scripts/coccinelle/iterators/for_each_child.cocci
> …
> Grep query
> for_each_node_with_property || for_each_node_by_type || for_each_node_by_name ||
> for_each_matching_node_and_match || for_each_matching_node ||
> for_each_compatible_node || for_each_child_of_node ||
> for_each_available_child_of_node
>
>
> I suggest to take another closer look at the presented ordering for
> these identifiers.
> It deviates from the proposed listing for the SmPL disjunction.
> Now I am curious if this difference can be meaningful.
>
> If the exact “grep” is performed, it might happen that short-circuit evaluation
> would be applied also by the corresponding software component (or known tool).
> Will any adjustments become relevant then accordingly?
It doesn't matter. The purpose is just to select files that are relevent
for consideration. If a file is selected for two reasons instead of one
reason, it doesn't matter; it's still selected.
julia
next parent reply other threads:[~2020-10-22 12:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <78f8b08754dde286adf7e11e1eeb3bb8ad500d8b.camel@web.de>
[not found] ` <acaed49b9195d47e252a0b67551f87e96324d004.camel@web.de>
2020-10-22 12:35 ` Julia Lawall [this message]
[not found] ` <6fe4c63d-1b7e-b947-139c-423edc519d2f@web.de>
2020-10-28 6:50 ` Julia Lawall
[not found] ` <45310257-201a-40ea-348f-b8e909c3775c@web.de>
2020-10-27 10:55 ` [Cocci] Coccinelle: Checking the relevance of parentheses in “git grep” Julia Lawall
[not found] ` <bfb3e786-a64f-ecaf-eb37-8bd6b53cf38a@web.de>
2020-10-27 12:03 ` Julia Lawall
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=alpine.DEB.2.22.394.2010221434210.5113@hadrien \
--to=julia.lawall@inria.fr \
--cc=Gilles.Muller@lip6.fr \
--cc=Julia.Lawall@lip6.fr \
--cc=Markus.Elfring@web.de \
--cc=cocci@systeme.lip6.fr \
--cc=efremov@linux.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=nicolas.palix@imag.fr \
--cc=sylphrenadin@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®