> @@
> expression x;
> constant c1,c2;
> @@
>
> x = c1;

The SmPL manual contains the promising wording “As metavariables are bound
and inherited across rules, …”.
https://github.com/coccinelle/coccinelle/blob/c6d7554edf7c4654aeae4d33c3f040e300682f23/docs/manual/cocci_syntax.tex#L179

The mentioned binding and inheritance can still become clearer.
I guess that the Coccinelle software constructs corresponding internal
data structures. The application experience shows that specific matched values
can be directly reused in subsequent SmPL rules already.


> (
> x = c1;

Can it make sense then to support the direct access to a matched item also
as a constraint within the same SmPL rule?
How do you think about to work with backreferences to known data for further
checking (or exclusion) of such source code?


> |
> *x = c2;
> )

Will any SmPL constraint extensions result in the consequence to construct
a special metavariable type?

Will the software situation evolve further around the usage of such SmPL 
disjunctions?

Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to