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 24
24
import org .sosy_lab .java_smt .api .FloatingPointRoundingMode ;
25
25
import org .sosy_lab .java_smt .api .Formula ;
26
26
import org .sosy_lab .java_smt .api .FormulaType ;
27
+ import org .sosy_lab .java_smt .api .FormulaType .BitvectorType ;
27
28
import org .sosy_lab .java_smt .api .FormulaType .FloatingPointType ;
28
29
29
30
/**
@@ -245,6 +246,11 @@ protected abstract TFormulaInfo castFromImpl(
245
246
@ Override
246
247
public FloatingPointFormula fromIeeeBitvector (
247
248
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" );
248
254
return wrap (fromIeeeBitvectorImpl (extractInfo (pNumber ), pTargetType ));
249
255
}
250
256
You can’t perform that action at this time.
0 commit comments