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

Encode floating point operations as uninterpreted functions #1095

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

can-leh-emmtrix
Copy link
Contributor

@can-leh-emmtrix can-leh-emmtrix commented Oct 9, 2024

Approach based on modifying expr.cpp. Please let me know what you think.

Previous PR: #1057

@nunoplopes
Copy link
Member

(not forgotten, but review delayed for a few weeks, sorry. PLDI deadline approaching)

Comment on lines +260 to +261
if (get_uf_float())
doesApproximation("uf-float");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what the best way to handle doesApproximation is with this approach. One option would be to call it in fm_poison in instr.cpp, however we don't have direct access to the UFs anymore. From what I can tell from the source code, the second argument to doesApproximation needs to be the APP node of the UF. However we do not have access to that anymore at this point. It may be possible to obtain the UFs by traversing the AST though. Another option might be to register a callback function with expr.h which is called for each created UF.

@can-leh-emmtrix
Copy link
Contributor Author

Thanks for letting me know and no worries about the delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants