Coccinelle Archive on
 help / color / Atom feed
From: Julia Lawall <>
To: Markus Elfring <>
Cc: Nicolas Palix <>,
	Michal Marek <>,
	Coccinelle <>,
	Gilles Muller <>
Subject: Re: [Cocci] [PATCH v2] coccinelle: iterators: Add for_each_child.cocci script
Date: Tue, 13 Oct 2020 18:53:23 +0200 (CEST)
Message-ID: <alpine.DEB.2.22.394.2010131851300.18876@hadrien> (raw)
In-Reply-To: <trinity-add9d6f9-2889-4bf6-97b3-83add07516ff-1602607555446@3c-app-webde-bs30>

On Tue, 13 Oct 2020, Markus Elfring wrote:

> > > Would you care a bit more for the clarification of the ordering for the shown macro names?
> >
> > Why does the ordering matter, since they are all distinct?
> * It might look promising to reorder macro calls according to name criteria
>   and passed parameters.
> * But I imagine that the functionality of disjunctions by the semantic patch language
>   can trigger further development considerations more in another direction.
>   Later source code search patterns will only be checked in such SmPL disjunctions
>   if previous parts did not match.
>   Thus often used code variants should probably be specified at the beginning
>   while special selections should be moved to the end.
>   The sorting of macro calls according to an estimated or actual usage frequency
>   can influence the evaluation characteristics of affected SmPL code,
>   can't it?

No.  As I already pointed out, the different macros are disjoint.  The
order doens't matter.  Only one of the patterns will match any given loop.
If there are nested loops, the pattern will match multiple times.

Cocci mailing list

  parent reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <trinity-d2989d61-4401-4280-9989-055536630329-1602595815473@3c-app-webde-bs30>
2020-10-13 13:35 ` Julia Lawall
     [not found]   ` <trinity-75bb5607-ae06-450d-95a6-fa9cb0aaf732-1602599807925@3c-app-webde-bs30>
2020-10-13 14:48     ` Julia Lawall
     [not found]       ` <trinity-add9d6f9-2889-4bf6-97b3-83add07516ff-1602607555446@3c-app-webde-bs30>
2020-10-13 16:53         ` Julia Lawall [this message]
     [not found]           ` <trinity-a1f3e64f-e955-45f2-8ee7-0a26c2974e38-1602614175986@3c-app-webde-bs30>
2020-10-13 19:01             ` Julia Lawall
     [not found]               ` <trinity-991d9da6-7a4f-4f30-a645-5f4d54b80c53-1602620539556@3c-app-webde-bs30>
2020-10-13 20:24                 ` Julia Lawall
     [not found]                   ` <trinity-ceb5e170-ec1a-496c-94bf-eec0c6c4b715-1602654627679@3c-app-webde-bs05>
2020-10-14  6:18                     ` Julia Lawall
2020-10-12 17:19 [Cocci] [PATCH V2] " Sumera Priyadarsini
2020-10-13 10:30 ` 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:

* 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.2010131851300.18876@hadrien \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Coccinelle Archive on

Archives are clonable:
	git clone --mirror cocci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 cocci cocci/ \
	public-inbox-index cocci

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone