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

Fix SMTLib2 syntax for floating-point conversions #190

Merged
merged 8 commits into from
Apr 11, 2019
Next Next commit
Fix the syntax of the parameterized SMTLib2 functions
`fp.to_sbv` and `fp.to_ubv`.
  • Loading branch information
robdockins committed Apr 9, 2019
commit 6ee9bcb062d1d3ab77c4796326aecc312e9f9028
4 changes: 2 additions & 2 deletions what4/src/What4/Protocol/SMTLib2.hs
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,9 @@ instance SupportTermOps Term where
realToFloat fpp r = un_app $ mkRoundingOp (mkFloatSymbol "to_fp" (asSMTFloatPrecision fpp)) r

floatToBV w r =
un_app $ mkRoundingOp ("(fp.to_ubv " <> fromString (show w) <> ")") r
un_app $ mkRoundingOp ("(_ fp.to_ubv " <> fromString (show w) <> ")") r
floatToSBV w r =
un_app $ mkRoundingOp ("(fp.to_sbv " <> fromString (show w) <> ")") r
un_app $ mkRoundingOp ("(_ fp.to_sbv " <> fromString (show w) <> ")") r

floatToReal = un_app "fp.to_real"

Expand Down