Skip to contentSkip to conversation

High level restriction of function calls with SmPL

Cocci SF Markus Elfring 2 participants 3 messages Jun 10, 2018 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 8 lines · 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

Quoted 7 lines
     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

Quoted 8 lines

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 12 lines · SF Markus Elfring
Quoted 1 line
Quoted 1 line
     when != action(..., input, ...)

?

Quoted 1 line
Quoted 1 line

Now I am looking for ways to restrict (or filter) such function calls further.

?

Quoted 1 line

"restrict ... further" and "correspond" are not precise.

The ?imprecision? happens because I find SmPL expression possibilities unclear once more here.

Quoted 1 line

I have no idea what you want to do.

Quoted 7 lines

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