Hello, The semantic patch language supports metavariables. It can occur then that a source code search should be performed for items which should be different while they belong still to the same data type. (If these items would be identical, the software situation would provide opportunities to simplify corresponding source code.)
The expected difference can trigger the need to express this detail by the usage of two identifiers based on the same metavariable type. SmPL script example: @display@ constant c1, c2; identifier x; @@ x = * c1 ; x = * c2 ; Source file example: int main(void) { int x; x = 1; x = 0; return x; } The used constants are integers and additional properties can be expressed for such numbers. These properties can eventually handled with scripted SmPL constraints. But I have got the impression that other metavariable types provide even more software development challenges for safe distinction of relevant items. I would like to point the detail out once more that also these metavariables can be of the same kind then with the consequence that it is not guaranteed that such metavariables will only match different source code. The support for the introduction of additional subtypes on demand might be too limited by the evolving software. How do you think about this use case? Regards, Markus _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci