File tree 1 file changed +11
-4
lines changed
src/org/sosy_lab/java_smt/test
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 39
39
import org .sosy_lab .java_smt .api .FloatingPointFormulaManager ;
40
40
import org .sosy_lab .java_smt .api .Formula ;
41
41
import org .sosy_lab .java_smt .api .FormulaManager ;
42
+ import org .sosy_lab .java_smt .api .FormulaType .FloatingPointType ;
42
43
import org .sosy_lab .java_smt .api .IntegerFormulaManager ;
43
44
import org .sosy_lab .java_smt .api .Model ;
44
45
import org .sosy_lab .java_smt .api .NumeralFormula .IntegerFormula ;
@@ -241,10 +242,16 @@ protected final void requireBitvectorToInt() {
241
242
}
242
243
243
244
protected final void requireFPToBitvector () {
244
- assume ()
245
- .withMessage ("Solver %s does not yet support FP-to-BV conversion" , solverToUse ())
246
- .that (solverToUse ())
247
- .isNoneOf (Solvers .CVC4 , Solvers .CVC5 );
245
+ requireFloats ();
246
+ try {
247
+ fpmgr .toIeeeBitvector (
248
+ fpmgr .makeNumber (0 , FloatingPointType .getSinglePrecisionFloatingPointType ()));
249
+ } catch (UnsupportedOperationException e ) {
250
+ assume ()
251
+ .withMessage ("Solver %s does not yet support FP-to-BV conversion" , solverToUse ())
252
+ .that (solverToUse ())
253
+ .isNull ();
254
+ }
248
255
}
249
256
250
257
/** Skip test if the solver does not support quantifiers. */
You can’t perform that action at this time.
0 commit comments