Fix extra function caused by additional summary entries for tensor generators #46
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the XML summaries so that the FQN imports (ex.
from tensorflow.python.ops.variables import Variable
) and traditional imports (ex.import tensorflow as tf
,import tensorflow
) when using the same API count as the same class. Therefore, there was a change in theexpectedNumberOfTensorVariables
because inML/com.ibm.wala.cast.python.test/data/tf2e2.py
Lines 1 to 8 in f52844f
4
to3
in test such as the one above.I also added a test that only included the FQN import to ensure we were processing that API. I added one test for the only level 2 API and one test for one of the level 1 API.
For example,
tf2b.cpy
andtf2c.py
are essentially the same except having different ways of importing the same thing:ML/com.ibm.wala.cast.python.test/data/tf2c.py
Lines 1 to 8 in 6657835
ML/com.ibm.wala.cast.python.test/data/tf2b.py
Lines 1 to 7 in 6657835
Yet, there are differences in the number of tensor variables identified (
3
and4
, respectively).:ML/com.ibm.wala.cast.python.ml.test/source/com/ibm/wala/cast/python/ml/test/TestTensorflowModel.java
Lines 67 to 68 in f52844f
Now, we have (in this PR)
3
and3
tensor variables, respectively (they are now the same despite the different ways of importing the same thing):https://github.com/ponder-lab/ML/pull/46/files#diff-5b16d15bb6e50c03555d3801c21e05c34697088581cfc1c721a3b999355b5ffdL68-L69
Now, the XML summaries are structured more hierarchically.