Re: [cocci] Logical consequences for applications of SmPL conjunctions

Markus Elfring <[email protected]> Mon, 30 Mar 2026 17:15:39 +0200
Newsgroups fr.inria.cocci
Message-ID <[email protected]>
> Will clarifications and development ideas evolve further also according to another
> SmPL script variant?

Conjunctions have got properties which can be well-known.
https://en.wikipedia.org/wiki/Logical_conjunction

An usual goal would be for a source code search
that all conjuncts would become true.


A) SmPL code can be constructed which can never succeed.

@my_test@
declaration d;
statement s;
@@
(d
&s
)

Would it be nice if the Coccinelle software could point out
that the mentioned code contains a specification mistake?


B) The conjuncts need to match entities according to common categories.
Some entities are even supported as key words for metavariable types.
Bigger entities can be constructed by a combination of smaller parts.
Will it become helpful to reduce code repetition for this use case?


Regards,
Markus