Skip to content
New issue

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

Python ModRef analysis says that a constant is modified #103

Closed
khatchad opened this issue Nov 7, 2023 · 0 comments · Fixed by #104
Closed

Python ModRef analysis says that a constant is modified #103

khatchad opened this issue Nov 7, 2023 · 0 comments · Fixed by #104
Assignees
Labels
bug Something isn't working

Comments

@khatchad
Copy link
Collaborator

khatchad commented Nov 7, 2023

Consider the following code:

def g(p1, p2):
    assert p1 == 5 and p2 == 2


def f():
    g(5, p2=2)


f()

The ModRef analysis for Python (com.ibm.wala.cast.python.modref.PythonModRef) is returning that the following locations are "modified" by f():

[[ConstantKey:p2:<PythonLoader,Lstring>]; [Core[Root]]]
[[ConstantKey:p2:<PythonLoader,Lstring>],<field 0>]

But, according to the docs, a ConstantKey is "an instance key which represents a unique, constant object." It would thus seem that instances represented by ConstantKey instance keys can't be returned as modified by the ModRef analysis.

@khatchad khatchad added the bug Something isn't working label Nov 7, 2023
@khatchad khatchad self-assigned this Nov 7, 2023
khatchad added a commit to ponder-lab/ML that referenced this issue Nov 7, 2023
khatchad added a commit that referenced this issue Nov 7, 2023
khatchad added a commit to ponder-lab/Hybridize-Functions-Refactoring that referenced this issue Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant