Skip to content

Add SMT-LIB theory of floating point numbers: Part I #83

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Fe-r-oz
Copy link
Contributor

@Fe-r-oz Fe-r-oz commented Dec 28, 2024

This PR introduces an initial implementation of FloatingPointExpr based on the SMT-LIB FloatingPoint theory. While I’ve reviewed the SMT-LIB documentation, I’m still familiarizing myself with SMT-LIB format, so the implementation would need refinement. I plan to add more correctness checks and implement any the essential features (based on SMT-LIB) in future updates.

I would appreciate feedback to better understand the current state of this PR and identify the next steps to align it with the rest of the API. Additionally, I anticipate needing another PR to focus on interoperability between FloatingPointExpr, IntExpr, BitVectorExpr, and RealExpr as that is not done in this PR (although there is basic conversion from IntExpr to FPExpr and RealExpr to FPExpr , which will also require unit testing.

Please help review this PR, thank you!

Edit:

After re-reading the SMT specification, it seems that conversion to/from other sorts needs to be further polished. I have not used BitVectorExpr as some specification also uses this type as well

Copy link

codecov bot commented Dec 28, 2024

Codecov Report

Attention: Patch coverage is 67.41573% with 29 lines in your changes missing coverage. Please review.

Project coverage is 88.49%. Comparing base (dfb5585) to head (c36c702).

Files with missing lines Patch % Lines
src/FloatingPointExpr.jl 67.41% 29 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #83      +/-   ##
==========================================
- Coverage   90.34%   88.49%   -1.85%     
==========================================
  Files          12       13       +1     
  Lines        1015     1104      +89     
==========================================
+ Hits          917      977      +60     
- Misses         98      127      +29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Fe-r-oz Fe-r-oz marked this pull request as ready for review April 8, 2025 10:18
@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Apr 8, 2025

Hi, Emi! Please let me know your thoughts and perspective on this! I’ve added some basic tests—they’re pretty basic for now, but it's a start! My main concern is to make sure its interoperable with the existing theories and more correctness checks, which I hope would be part two!

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.

1 participant