Open robdockins opened 4 years ago
The newly released SBV 8.13 (https://hackage.haskell.org/package/sbv-8.13) has native support for SRational:
Prelude Data.SBV Data.SBV.Rational> allSat $ \x -> x .== 1 .% 2
Solution #1:
s0 = 1 % 2 :: Rational
This is the only solution.
If you move to 8.13; you can map Cryptol's rationals to SBV's, and automatically handle this problem without lifting a finger!
Neat!
Because the SBV multi-SAT procedure doesn't understand the semantics of a pair of integers as a rational number, it will enumerate different representatives of the same equivalence class of pairs of integers when asked a multi-SAT query involving rational numbers. These are normalized before being presented to the user, and it appears the solver is repeatedly returning the same assignment.
The What4 backend controls its own loop for finding multiple assignments and computes its own blocking predicates using the equivalence relation for rationals, and thus will avoid other representatives of the same class. We should do the same for SBV.