>> @find_…@
>> expression ex1, ex2, value;
>> identifier action =~ …;
>> @@
>> *ex1 = action(...);
>>  ex2 = value;
>>
>>
>> I am unsure if such a source code search approach should eventually be split
>> into more SmPL processing steps.
> 
> (
> ex1 = action(...);
> ex2 = <+...ex1...+>;
> |
> *ex1 = action(...);
>  ex2 = value;
> )
> 
> is perhaps what you are looking for.

We discussed further possibilities around advanced usage of SmPL constraints a 
bit.
The software evolution is unclear in this direction and might be too limited
at the moment.

But the shown SmPL disjunction could also work with the Coccinelle software
for a while. It has got run time characteristics where I got a few concerns.

The asterisk functionality is used there so that source code places
can be marked as update candidates. Unfortunately, it seems that the software
development challenge can be too big for the specification of a generic
change approach.

Is such a small source code search pattern good enough in principle to be
integrated into the evolving script collection for checking of various source 
files
(including from Linux)?

Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to