-
Notifications
You must be signed in to change notification settings - Fork 3
Two Fixes to constant prop, IList
and try_eval_const_pure
#524
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
base: main
Are you sure you want to change the base?
Conversation
…he method is not pure
… missing runtime implementation
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only have one comment, the main fix that enables purity check is good.
try: | ||
value = method(self._interp, _frame, stmt) | ||
except NotImplementedError: | ||
# the concrete interpreter doesn't have the implementation so we cannot evaluate it | ||
return tuple(Unknown() for _ in stmt.results) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is redundant? if the method
is not None
that indicates there is an implementation for the concrete interpretation.
changes in this PR:
ilist
dialect that gaurd against non-pure execution ofmap
for_each
foldl
, etc.try_eval_const_pure
in cases where the concrete interpreter is missing an implementation of a statement that is pure, falling back to returningUnknown
for all results.