wala / ML

Eclipse Public License 2.0
25 stars 17 forks source link

Decorated functions specifying a PYTHONPATH don't show up in the call graph #198

Open khatchad opened 3 months ago

khatchad commented 3 months ago

Decorated functions that are part of a PYTHONPATH, i.e., it's name is qualified with a directory path, don't show up in the call graph.

For example, suppose we have the following:

https://github.com/ponder-lab/ML/blob/6974735c51fd827cdfef4d7a58fa7442a2a615c4/com.ibm.wala.cast.python.test/data/proj49/src/test_module10.py#L3-L9

Further suppose that the above file is under the src directory. The name of the about function is then Lscript src/test_module10.py/test_dummy. Somehow, when functions have names under directories like src, they are not getting captured in the closure provided by the decorator summary:

https://github.com/wala/ML/blob/b813bde5f9f9a5df87426192aecb8f0b64b1dcc5/com.ibm.wala.cast.python/data/pytest.xml#L6-L35

khatchad commented 3 months ago

Merged https://github.com/ponder-lab/ML/pull/107 into the master branch of https://github.com/ponder-lab/ML, but we still have the issue:

https://github.com/ponder-lab/ML/blob/749aad276d4b37f1745f7d15b7c7f4e726d22fc3/com.ibm.wala.cast.python.ml.test/source/com/ibm/wala/cast/python/ml/test/TestTensorflow2Model.java#L2811-L2833