wala / ML

Eclipse Public License 2.0
25 stars 17 forks source link

Trampolines not created for Python summarized methods #127

Open khatchad opened 9 months ago

khatchad commented 9 months ago

Referring to self in a Python summarized function, as far as I can tell, doesn't quite work, because there is no way to refer to the implicit parameter when there's no trampoline for the function. AFAIK, trampolines aren't created for summarized methods, and that's the only way in the IR implicit parameters can be referenced.

In the XML summaries, e.g., in tensorflow.xml, it is my feeling that self actually refers to the function object and not the object for which the function is invoked.

khatchad commented 9 months ago

Maybe we need a new XML tag; something like create_trampoline=true. That tag could be attached to the class or the ctor?

khatchad commented 4 months ago

I wonder if this creates a trampoline:

https://github.com/wala/ML/blob/ddba21e7881f2a9cc825f1857aea5a5ea89f1bc3/com.ibm.wala.cast.python.ml/data/tensorflow.xml#L492-L493