We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider the following example input program:
# A.py def f(x): print("Traced with: " + str(x)) f(1)
This is the IR of f():
f()
Node: <Code body of function Lscript A.py/f> Context: CallStringContext: [ script A.py.do()LRoot;@97 ] <Code body of function Lscript A.py/f> CFG: BB0[-1..-2] -> BB1 BB1[0..2] -> BB2 -> BB3 BB2[3..4] -> BB3 BB3[-1..-2] Instructions: BB0 BB1 0 v5 = lexical:print@Lscript A.py A.py [2:2] -> [2:7] 1 v10 = lexical:str@Lscript A.py A.py [2:26] -> [2:29] 2 v8 = invokeFunction < PythonLoader, LCodeBody, do()LRoot; > v10,v2 @2 exception:v11A.py [2:26] -> [2:32] [2=[x]] BB2 3 v6 = binaryop(add) v7:#Traced with: , v8A.py [2:8] -> [2:32] 4 v3 = invokeFunction < PythonLoader, LCodeBody, do()LRoot; > v5,v6 @4 exception:v12A.py [2:2] -> [2:33] BB3
Above, v5 is the print() function, while v10 is the str() function. However, in the pointer analysis, I am seeing the following:
v5
print()
v10
str()
[Node: <Code body of function Lscript A.py/f> Context: CallStringContext: [ script A.py.do()LRoot;@97 ], v5] -> [Node: <Code body of function Lscript A.py/f> Context: CallStringContext: [ script A.py.do()LRoot;@97 ], v10] -> [com.ibm.wala.cast.python.ipa.summaries.BuiltinFunctions$BuiltinFunction@1724e9f5]
The points-to set for v5 in f() of A.py is empty, while the points-to set of v10 contains the built-in.
A.py
I believe that the print() function needs to be added here:
ML/com.ibm.wala.cast.python/source/com/ibm/wala/cast/python/ipa/summaries/BuiltinFunctions.java
Lines 274 to 289 in 1b1ffac
The text was updated successfully, but these errors were encountered:
Use built-in function.
cbff639
Exercise wala/ML#93.
Add the print function built-in (#54)
038eeb4
Add print() built-in. Partially addresses wala#93.
Add the print function built-in,
f632d4b
Fixes wala#93.
Add the print function built-in (#95)
7c3c349
Fixes #93.
khatchad
Successfully merging a pull request may close this issue.
Description
Consider the following example input program:
This is the IR of
f()
:Above,
v5
is theprint()
function, whilev10
is thestr()
function. However, in the pointer analysis, I am seeing the following:The points-to set for
v5
inf()
ofA.py
is empty, while the points-to set ofv10
contains the built-in.Regression
I believe that the
print()
function needs to be added here:ML/com.ibm.wala.cast.python/source/com/ibm/wala/cast/python/ipa/summaries/BuiltinFunctions.java
Lines 274 to 289 in 1b1ffac
The text was updated successfully, but these errors were encountered: