Discussion:
[Cocci] High level restriction of function calls with SmPL
SF Markus Elfring
2018-06-10 06:34:01 UTC
Permalink
Hello,

I would like to try another source code transformation out with the help of
the semantic patch language.
The following approach can express a bit of information I became interested in.

{
... when any
when != action(..., input, ...)
}


Now I am looking for ways to restrict (or filter) such function calls further.
The passed parameter should correspond to a specific data type property.
Can it be determined here together with a scripted constraint?

Regards,
Markus
Julia Lawall
2018-06-10 06:39:07 UTC
Permalink
Post by SF Markus Elfring
Hello,
I would like to try another source code transformation out with the help of
the semantic patch language.
The following approach can express a bit of information I became interested in.
{
... when any
when != action(..., input, ...)
}
Now I am looking for ways to restrict (or filter) such function calls further.
The passed parameter should correspond to a specific data type property.
Can it be determined here together with a scripted constraint?
"restrict ... further" and "correspond" are not precise. I have no idea
what you want to do. Please provide and exmaple.

julia
Post by SF Markus Elfring
Regards,
Markus
_______________________________________________
Cocci mailing list
https://systeme.lip6.fr/mailman/listinfo/cocci
Julia Lawall
2018-06-10 07:43:37 UTC
Permalink
Post by Julia Lawall
Post by SF Markus Elfring
when != action(..., input, ...)


Post by Julia Lawall
Post by SF Markus Elfring
Now I am looking for ways to restrict (or filter) such function calls further.


Post by Julia Lawall
"restrict ... further" and "correspond" are not precise.
The “imprecision” happens because I find SmPL expression possibilities unclear
once more here.
Post by Julia Lawall
I have no idea what you want to do.
I guess that we have got a common understanding that something should be
performed for function calls.
The input data type is known for a single parameter in a generic way
(for this SmPL example).
Now it is interesting if one of its properties like the changeability
(usage of “const”) will be acceptable for selected function calls.
Do you get more ideas for the desired software clarification?
I still have no idea what you want to do. Please provide an example. If
you don't know concretely what you want to do, please figure it out and
then ask afterwards.

julia

Loading...