Skip to contentSkip to conversation

Searching for longer conjunctions (with SmPL)?

cocci Markus Elfring 2 participants 5 messages Jun 29, 2025 – Jun 30, 2025

lore
Share & tools
lore
#0 lore raw

Hello,

Is there a need to refine a source code search pattern (like the following)?

@display@
expression a, b, c, d;
@@
(
*a && b && c && d && ...
|
*a && b && c && d
)

Would you be looking for more powerful data processing systems for further static code analysis attempts (also according to Linux source files)?

Regards,
Markus

#1 lore raw
Quoted 5 lines · Markus Elfring

Hello,

Is there a need to refine a source code search pattern (like the following)?

Quoted 8 lines

@display@
expression a, b, c, d;
@@
(
*a && b && c && d && ...
|
*a && b && c && d
)

I don't see the point having both cases.

julia

Quoted 8 lines

Would you be looking for more powerful data processing systems for further static code analysis attempts (also according to Linux source files)?

Regards,
Markus

#2 lore raw
Quoted 1 line

I don't see the point having both cases.

Do you expect that the following source code search pattern should present a bit of diff output?

@display2@
expression a, b, c, d;
@@
return
*a && b && c && d && ...
;

Markus_Elfring@Sonne:…/Projekte/Linux/next-analyses> time /usr/bin/spatch --no-loops …/Projekte/Coccinelle/janitor/show_return_with_four_conjunction_items_at_least2.cocci include/uapi/linux/cec.h …

real    0m0,149s
user    0m0,116s
sys     0m0,033s

Regards,
Markus

#3 lore raw
Quoted 6 lines · Markus Elfring
Quoted 1 line

I don't see the point having both cases.

Do you expect that the following source code search pattern should present a bit of diff output?

Quoted 6 lines

@display2@
expression a, b, c, d;
@@
return
*a && b && c && d && ...
;

OK, there is an isomorphism for &&, but it only works when the && is in a test expression. That is not the case here. the ... just matches any expression.

julia

#4 lore raw

Re: [cocci] Data processing requirements by expressions

In reply to Markus Elfring

Hello,

Expressions tend to be used in a lot of source files.
There are source code bases (like Linux) with amazing sizes.
Which computation system resources would you use if you do not like to wait days or some hours on corresponding data processing results from static code analysis attempts?

Regards,
Markus