Closed chansey97 closed 2 years ago
Thank you for reporting this issue!
Rosette follows Racket conventions, so this isn't a bug in the sense that 2 is both a real?
and an integer?
.
But I agree that it's preferable to pass on the literals returned by the solver. I've pushed a fix that has the preferred behavior.
For example,
I defined a real?
a
and=
with an inexact number2.0
, the expected result should also be inexact2.0
instead of exact2
. So the current rosette's result is not very natural.Also, SMT-LIB return
2.0
instead of2
.It is better to keep the SMT result type.
This patch fix the problem.
I also tried
a
withinteger?
, it is no problem.P.s. The current dec code of rosette seems to ignore SMT type. It is better to infer values' type based on symbol definition, but that is another story.