Skip to contentSkip to conversation

Choosing “semantics” better for SmPL script parts?

RFC Markus Elfring 2 participants 5 messages Aug 24, 2025 – Aug 26, 2025 Kernel janitors

lore
Share & tools
lore
#0 lore raw

Hello,

A bit of information is provided about special “semantics” (also in the manual for the semantic patch language).
https://gitlab.inria.fr/coccinelle/coccinelle/-/blob/face14907c0791b93397d5788d2a94c7c6a4b886/docs/manual/cocci_syntax.tex#L1007-1014

Usage possibilities are indicated for the key words “exists” and “forall”.

* Would any more software users like to discuss and clarify safer applications of these system configuration parameters?

* Would you be looking for better “connections” according to computation tree logic (or linear temporal logic) variations?

Regards,
Markus

#1 lore raw
Quoted 2 lines

A bit of information is provided about special “semantics” (also in the manual for the semantic patch language).

The usage of the semantic match functionality influences which default semantics should be applied for the evaluation of an SmPL rule.
I imagine that the corresponding data processing can become more interesting when the needed semantics would actually be the opposite setting.

* Do you tend to look for the existence of selected implementation details more than that source code variants can occur on all executions paths according to evolving control flows?

* Would you expect to use the source code search parameter “exists” more often then “forall”?

Regards,
Markus

#2 lore raw
Quoted 8 lines · Markus Elfring
Quoted 2 lines

A bit of information is provided about special “semantics” (also in the manual for the semantic patch language).

The usage of the semantic match functionality influences which default semantics should be applied for the evaluation of an SmPL rule.
I imagine that the corresponding data processing can become more interesting when the needed semantics would actually be the opposite setting.

Quoted 6 lines

* Do you tend to look for the existence of selected implementation details more than that source code variants can occur on all executions paths according to evolving control flows?

* Would you expect to use the source code search parameter “exists” more often then “forall”?

The default is exists for use with * and forall with transformation, with the reasoning for the latter being that when transformation occurs the trasformed code should be consistent. But there are cases where something else is desired, so this is controlled by the user.

julia

Quoted 5 lines

Regards,
Markus

#3 lore raw
Quoted 4 lines

The default is exists for use with * and forall with transformation, with the reasoning for the latter being that when transformation occurs the trasformed code should be consistent. But there are cases where something else is desired, so this is controlled by the user.

Can SmPL script developers occasionally get any indications that they would expect an opposite system setting?

Will the usage incidence become more interesting for the mentioned source code search parameter?

Regards,
Markus

#4 lore raw
In reply to Julia Lawall
Quoted 3 lines

The default is exists for use with * and forall with transformation, with the reasoning for the latter being that when transformation occurs the trasformed code should be consistent.

Will corresponding development concerns be reconsidered in more detail?

Would you understand the source code search parameter “forall” in the way that it expresses a stronger data processing requirement (than the setting alternative “exists”)?
https://en.wikipedia.org/wiki/Universal_quantification

Is it known if such a quantification difference would influence software run time characteristics in significant ways?

Regards,
Markus