File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/org/sosy_lab/java_smt/basicimpl Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 2424import org .sosy_lab .java_smt .api .FloatingPointRoundingMode ;
2525import org .sosy_lab .java_smt .api .Formula ;
2626import org .sosy_lab .java_smt .api .FormulaType ;
27+ import org .sosy_lab .java_smt .api .FormulaType .BitvectorType ;
2728import org .sosy_lab .java_smt .api .FormulaType .FloatingPointType ;
2829
2930/**
@@ -245,6 +246,11 @@ protected abstract TFormulaInfo castFromImpl(
245246 @ Override
246247 public FloatingPointFormula fromIeeeBitvector (
247248 BitvectorFormula pNumber , FloatingPointType pTargetType ) {
249+ BitvectorType bvType = (BitvectorType ) formulaCreator .getFormulaType (pNumber );
250+ Preconditions .checkArgument (
251+ bvType .getSize () == pTargetType .getTotalSize (),
252+ "The total size of the used FloatingPointType has to match the size of the bitvector"
253+ + " given" );
248254 return wrap (fromIeeeBitvectorImpl (extractInfo (pNumber ), pTargetType ));
249255 }
250256
You can’t perform that action at this time.
0 commit comments