Currently, we are using jython2 in com.ibm.wala.cast.python.ml.test, where we don't encounter decorator problems when running the tests. But when we use jython3, we do encounter problems with decorator tf.function. Therefore we are adding initial support for the decorator tf.function in tensorflow.xml. Initial support for tf.function because after this change, in jython3, can now process the decorator that has parenthesis e.g. tf.function() or tf.function(...).
Currently, we are using jython2 in
com.ibm.wala.cast.python.ml.test
, where we don't encounter decorator problems when running the tests. But when we use jython3, we do encounter problems with decoratortf.function
. Therefore we are adding initial support for the decoratortf.function
intensorflow.xml
. Initial support fortf.function
because after this change, in jython3, can now process the decorator that has parenthesis e.g.tf.function()
ortf.function(...)
.Refer to https://github.com/wala/ML/issues/33 for the issue with inconsistent jython versions.
After this change we see: Test code with parenthesis:
The analysis of the test with parenthesis:
Test code with parenthesis:
The analysis of the test without parenthesis:
We see that with the decorator,
expr
is classified as aCALL
, and without it is classified as anAttribute
.