From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <julia.lawall@inria.fr>, cocci@inria.fr
Subject: Re: [cocci] Searching for function calls with known parameters (by SmPL)?
Date: Thu, 26 Mar 2026 09:30:48 +0100 [thread overview]
Message-ID: <7182887f-b0d1-407b-8b3d-e5d075d8b197@web.de> (raw)
In-Reply-To: <73d88351-640-62a8-189-4e9f8a8a24db@inria.fr>
>> Can function calls be restricted to known parameters accordingly?
>
> I still have no idea what you are asking about.
I hope that communication difficulties can be adjusted also with help of
further (software) users.
> What is the connection
> between a function call being placed at the beginning of a function and
> the number of parameters that that function call requires?
I hope also that another description approach can influence evolution
in more desirable directions.
Various functions were designed in the way that they handle parameters.
https://cppreference.com/w/c/language/function_definition.html
The Coccinelle software supports the metavariable type “parameter list”
to some degree.
https://gitlab.inria.fr/coccinelle/coccinelle/-/blob/233b5ceb1d5a701fb270ebdf0a9bd6be0a6ce53b/docs/manual/cocci_syntax.tex#L233
Such lists support “special cases” accordingly.
* They can be empty.
Would you like to exclude this case occasionally?
* More than one entry would be provided.
The list length can become more interesting then.
It can occasionally be nice that parameters would explicitly be restricted to
a fixed number of items by the means of the semantic patch language.
Data would be assigned to multiple parameters.
But it is not directly known by this programming interface
in which order they get passed to a function call.
The passed data can be handled by the metavariable type “expression list”.
There are some development challenges remaining for the mapping of contents
with the mentioned metavariable types.
Which expressions would refer to identifiers from a specified parameter list?
Regards,
Markus
prev parent reply other threads:[~2026-03-26 8:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 8:48 [cocci] Searching for function calls with known parameters (by SmPL)? Markus Elfring
2026-03-25 8:52 ` Julia Lawall
2026-03-25 9:15 ` Markus Elfring
2026-03-25 12:24 ` Markus Elfring
2026-03-26 8:30 ` 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=7182887f-b0d1-407b-8b3d-e5d075d8b197@web.de \
--to=markus.elfring@web.de \
--cc=cocci@inria.fr \
--cc=julia.lawall@inria.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox