55 (** val comparison_rect_Type4 :
56 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> comparison -> 'a1 **)
57 let rec comparison_rect_Type4 h_Ceq h_Cne h_Clt h_Cle h_Cgt h_Cge = function
65 (** val comparison_rect_Type5 :
66 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> comparison -> 'a1 **)
67 let rec comparison_rect_Type5 h_Ceq h_Cne h_Clt h_Cle h_Cgt h_Cge = function
75 (** val comparison_rect_Type3 :
76 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> comparison -> 'a1 **)
77 let rec comparison_rect_Type3 h_Ceq h_Cne h_Clt h_Cle h_Cgt h_Cge = function
85 (** val comparison_rect_Type2 :
86 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> comparison -> 'a1 **)
87 let rec comparison_rect_Type2 h_Ceq h_Cne h_Clt h_Cle h_Cgt h_Cge = function
95 (** val comparison_rect_Type1 :
96 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> comparison -> 'a1 **)
97 let rec comparison_rect_Type1 h_Ceq h_Cne h_Clt h_Cle h_Cgt h_Cge = function
105 (** val comparison_rect_Type0 :
106 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> comparison -> 'a1 **)
107 let rec comparison_rect_Type0 h_Ceq h_Cne h_Clt h_Cle h_Cgt h_Cge = function
115 (** val comparison_inv_rect_Type4 :
116 comparison -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) ->
117 (__ -> 'a1) -> (__ -> 'a1) -> 'a1 **)
118 let comparison_inv_rect_Type4 hterm h1 h2 h3 h4 h5 h6 =
119 let hcut = comparison_rect_Type4 h1 h2 h3 h4 h5 h6 hterm in hcut __
121 (** val comparison_inv_rect_Type3 :
122 comparison -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) ->
123 (__ -> 'a1) -> (__ -> 'a1) -> 'a1 **)
124 let comparison_inv_rect_Type3 hterm h1 h2 h3 h4 h5 h6 =
125 let hcut = comparison_rect_Type3 h1 h2 h3 h4 h5 h6 hterm in hcut __
127 (** val comparison_inv_rect_Type2 :
128 comparison -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) ->
129 (__ -> 'a1) -> (__ -> 'a1) -> 'a1 **)
130 let comparison_inv_rect_Type2 hterm h1 h2 h3 h4 h5 h6 =
131 let hcut = comparison_rect_Type2 h1 h2 h3 h4 h5 h6 hterm in hcut __
133 (** val comparison_inv_rect_Type1 :
134 comparison -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) ->
135 (__ -> 'a1) -> (__ -> 'a1) -> 'a1 **)
136 let comparison_inv_rect_Type1 hterm h1 h2 h3 h4 h5 h6 =
137 let hcut = comparison_rect_Type1 h1 h2 h3 h4 h5 h6 hterm in hcut __
139 (** val comparison_inv_rect_Type0 :
140 comparison -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) ->
141 (__ -> 'a1) -> (__ -> 'a1) -> 'a1 **)
142 let comparison_inv_rect_Type0 hterm h1 h2 h3 h4 h5 h6 =
143 let hcut = comparison_rect_Type0 h1 h2 h3 h4 h5 h6 hterm in hcut __
145 (** val comparison_discr : comparison -> comparison -> __ **)
146 let comparison_discr x y =
147 Logic.eq_rect_Type2 x
149 | Ceq -> Obj.magic (fun _ dH -> dH)
150 | Cne -> Obj.magic (fun _ dH -> dH)
151 | Clt -> Obj.magic (fun _ dH -> dH)
152 | Cle -> Obj.magic (fun _ dH -> dH)
153 | Cgt -> Obj.magic (fun _ dH -> dH)
154 | Cge -> Obj.magic (fun _ dH -> dH)) y
156 (** val comparison_jmdiscr : comparison -> comparison -> __ **)
157 let comparison_jmdiscr x y =
158 Logic.eq_rect_Type2 x
160 | Ceq -> Obj.magic (fun _ dH -> dH)
161 | Cne -> Obj.magic (fun _ dH -> dH)
162 | Clt -> Obj.magic (fun _ dH -> dH)
163 | Cle -> Obj.magic (fun _ dH -> dH)
164 | Cgt -> Obj.magic (fun _ dH -> dH)
165 | Cge -> Obj.magic (fun _ dH -> dH)) y
167 (** val negate_comparison : comparison -> comparison **)
168 let negate_comparison = function
176 (** val swap_comparison : comparison -> comparison **)
177 let swap_comparison = function
185 (** val wordsize : Nat.nat **)
187 Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
188 (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
189 (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
190 (Nat.S Nat.O)))))))))))))))))))))))))))))))
192 type int = BitVector.bitVector
194 (** val repr : Nat.nat -> int **)
196 Arithmetic.bitvector_of_nat wordsize n
198 (** val zero : int **)
202 (** val one : int **)
206 (** val mone : BitVector.bitVector **)
208 Arithmetic.subtraction wordsize zero one
210 (** val iwordsize : int **)
214 (** val eq_dec : int -> int -> (__, __) Types.sum **)
216 (match BitVector.eq_bv wordsize x y with
217 | Bool.True -> (fun _ -> Types.Inl __)
218 | Bool.False -> (fun _ -> Types.Inr __)) __
220 (** val eq : int -> int -> Bool.bool **)
222 BitVector.eq_bv wordsize
224 (** val lt : int -> int -> Bool.bool **)
226 Arithmetic.lt_s wordsize
228 (** val ltu : int -> int -> Bool.bool **)
230 Arithmetic.lt_u wordsize
232 (** val neg : int -> int **)
234 Arithmetic.two_complement_negation wordsize
237 BitVector.bitVector -> BitVector.bitVector -> Bool.bool Vector.vector **)
239 (Vector.vsplit wordsize wordsize (Arithmetic.multiplication wordsize x y)).Types.snd
242 Nat.nat -> Nat.nat -> BitVector.bitVector -> BitVector.bitVector **)
244 match Extranat.nat_compare n w with
245 | Extranat.Nat_lt (n', w') ->
247 let { Types.fst = h; Types.snd = l } =
248 Vector.vsplit (Nat.S w') n' (Vector.switch_bv_plus n' (Nat.S w') i)
250 Vector.switch_bv_plus (Nat.S w') n' (BitVector.pad (Nat.S w') n' l))
251 | Extranat.Nat_eq x -> (fun i -> i)
252 | Extranat.Nat_gt (x, x0) -> (fun i -> i)
254 (** val zero_ext : Nat.nat -> int -> int **)
259 Nat.nat -> Nat.nat -> BitVector.bitVector -> BitVector.bitVector **)
261 match Extranat.nat_compare n w with
262 | Extranat.Nat_lt (n', w') ->
264 let { Types.fst = h; Types.snd = l } =
265 Vector.vsplit (Nat.S w') n' (Vector.switch_bv_plus n' (Nat.S w') i)
267 Vector.switch_bv_plus (Nat.S w') n'
270 | Vector.VEmpty -> Bool.False
271 | Vector.VCons (x, h0, x0) -> h0) (Nat.S w') n' l))
272 | Extranat.Nat_eq x -> (fun i -> i)
273 | Extranat.Nat_gt (x, x0) -> (fun i -> i)
275 (** val sign_ext : Nat.nat -> int -> int **)
279 (** val i_and : int -> int -> int **)
281 BitVector.conjunction_bv wordsize
283 (** val or0 : int -> int -> int **)
285 BitVector.inclusive_disjunction_bv wordsize
287 (** val xor : int -> int -> int **)
289 BitVector.exclusive_disjunction_bv wordsize
291 (** val not : int -> int **)
293 BitVector.negation_bv wordsize
295 (** val shl : int -> int -> int **)
297 Vector.shift_left wordsize (Arithmetic.nat_of_bitvector wordsize y) x
300 (** val shru : int -> int -> int **)
302 Vector.shift_right (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
303 (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
304 (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
305 (Nat.S (Nat.S (Nat.S Nat.O)))))))))))))))))))))))))))))))
306 (Arithmetic.nat_of_bitvector wordsize y) x Bool.False
308 (** val shr : int -> int -> int **)
310 Vector.shift_right (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
311 (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
312 (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
313 (Nat.S (Nat.S (Nat.S Nat.O)))))))))))))))))))))))))))))))
314 (Arithmetic.nat_of_bitvector wordsize y) x
315 (Vector.head' (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
316 (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
317 (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
318 (Nat.S (Nat.S (Nat.S Nat.O))))))))))))))))))))))))))))))) x)
320 (** val shrx : int -> int -> int **)
322 match Arithmetic.division_s wordsize x (shl one y) with
326 (** val shr_carry : int -> int -> BitVector.bitVector **)
328 Arithmetic.subtraction wordsize (shrx x y) (shr x y)
330 (** val rol : int -> int -> int **)
332 Vector.rotate_left wordsize (Arithmetic.nat_of_bitvector wordsize y) x
334 (** val ror : int -> int -> int **)
336 Vector.rotate_right wordsize (Arithmetic.nat_of_bitvector wordsize y) x
338 (** val rolm : int -> int -> int -> int **)
342 (** val cmp : comparison -> int -> int -> Bool.bool **)
346 | Cne -> Bool.notb (eq x y)
348 | Cle -> Bool.notb (lt y x)
350 | Cge -> Bool.notb (lt x y)
352 (** val cmpu : comparison -> int -> int -> Bool.bool **)
356 | Cne -> Bool.notb (eq x y)
358 | Cle -> Bool.notb (ltu y x)
360 | Cge -> Bool.notb (ltu x y)
362 (** val notbool : int -> int **)