equal
deleted
inserted
replaced
40 (*CVC4 does not support "_bvk T" when k does not fit in the BV of size T, so remove the bits that |
40 (*CVC4 does not support "_bvk T" when k does not fit in the BV of size T, so remove the bits that |
41 will be ignored according to the SMT-LIB*) |
41 will be ignored according to the SMT-LIB*) |
42 fun word_num (Type (\<^type_name>\<open>word\<close>, [T])) k = |
42 fun word_num (Type (\<^type_name>\<open>word\<close>, [T])) k = |
43 let |
43 let |
44 val size = try dest_binT T |
44 val size = try dest_binT T |
45 fun max_int size = IntInf.pow (2, size) |
45 fun max_int size = Integer.pow size 2 |
46 in |
46 in |
47 (case size of |
47 (case size of |
48 NONE => NONE |
48 NONE => NONE |
49 | SOME size => SOME (index1 ("bv" ^ string_of_int (Int.rem(k, max_int size))) size)) |
49 | SOME size => SOME (index1 ("bv" ^ string_of_int (Int.rem(k, max_int size))) size)) |
50 end |
50 end |