65 open Hints_declaration
83 (** val divmodZ : Z.z -> Z.z -> (Z.z, Z.z) Types.prod **)
86 | Z.OZ -> { Types.fst = Z.OZ; Types.snd = Z.OZ }
89 | Z.OZ -> { Types.fst = Z.OZ; Types.snd = Z.OZ }
91 let { Types.fst = q; Types.snd = r } = Division.divide n m in
92 { Types.fst = (Division.natp_to_Z q); Types.snd =
93 (Division.natp_to_Z r) }
95 let { Types.fst = q; Types.snd = r } = Division.divide n m in
98 { Types.fst = (Division.natp_to_negZ q); Types.snd = Z.OZ }
100 { Types.fst = (Z.zpred (Division.natp_to_negZ q)); Types.snd =
101 (Z.zplus y (Division.natp_to_Z r)) }))
104 | Z.OZ -> { Types.fst = Z.OZ; Types.snd = Z.OZ }
106 let { Types.fst = q; Types.snd = r } = Division.divide n m in
109 { Types.fst = (Division.natp_to_negZ q); Types.snd = Z.OZ }
110 | Division.Ppos x0 ->
111 { Types.fst = (Z.zpred (Division.natp_to_negZ q)); Types.snd =
112 (Z.zminus y (Division.natp_to_Z r)) })
114 let { Types.fst = q; Types.snd = r } = Division.divide n m in
115 { Types.fst = (Division.natp_to_Z q); Types.snd =
116 (Division.natp_to_Z r) })
122 (** val opAccs_rect_Type4 : 'a1 -> 'a1 -> opAccs -> 'a1 **)
123 let rec opAccs_rect_Type4 h_Mul h_DivuModu = function
125 | DivuModu -> h_DivuModu
127 (** val opAccs_rect_Type5 : 'a1 -> 'a1 -> opAccs -> 'a1 **)
128 let rec opAccs_rect_Type5 h_Mul h_DivuModu = function
130 | DivuModu -> h_DivuModu
132 (** val opAccs_rect_Type3 : 'a1 -> 'a1 -> opAccs -> 'a1 **)
133 let rec opAccs_rect_Type3 h_Mul h_DivuModu = function
135 | DivuModu -> h_DivuModu
137 (** val opAccs_rect_Type2 : 'a1 -> 'a1 -> opAccs -> 'a1 **)
138 let rec opAccs_rect_Type2 h_Mul h_DivuModu = function
140 | DivuModu -> h_DivuModu
142 (** val opAccs_rect_Type1 : 'a1 -> 'a1 -> opAccs -> 'a1 **)
143 let rec opAccs_rect_Type1 h_Mul h_DivuModu = function
145 | DivuModu -> h_DivuModu
147 (** val opAccs_rect_Type0 : 'a1 -> 'a1 -> opAccs -> 'a1 **)
148 let rec opAccs_rect_Type0 h_Mul h_DivuModu = function
150 | DivuModu -> h_DivuModu
152 (** val opAccs_inv_rect_Type4 :
153 opAccs -> (__ -> 'a1) -> (__ -> 'a1) -> 'a1 **)
154 let opAccs_inv_rect_Type4 hterm h1 h2 =
155 let hcut = opAccs_rect_Type4 h1 h2 hterm in hcut __
157 (** val opAccs_inv_rect_Type3 :
158 opAccs -> (__ -> 'a1) -> (__ -> 'a1) -> 'a1 **)
159 let opAccs_inv_rect_Type3 hterm h1 h2 =
160 let hcut = opAccs_rect_Type3 h1 h2 hterm in hcut __
162 (** val opAccs_inv_rect_Type2 :
163 opAccs -> (__ -> 'a1) -> (__ -> 'a1) -> 'a1 **)
164 let opAccs_inv_rect_Type2 hterm h1 h2 =
165 let hcut = opAccs_rect_Type2 h1 h2 hterm in hcut __
167 (** val opAccs_inv_rect_Type1 :
168 opAccs -> (__ -> 'a1) -> (__ -> 'a1) -> 'a1 **)
169 let opAccs_inv_rect_Type1 hterm h1 h2 =
170 let hcut = opAccs_rect_Type1 h1 h2 hterm in hcut __
172 (** val opAccs_inv_rect_Type0 :
173 opAccs -> (__ -> 'a1) -> (__ -> 'a1) -> 'a1 **)
174 let opAccs_inv_rect_Type0 hterm h1 h2 =
175 let hcut = opAccs_rect_Type0 h1 h2 hterm in hcut __
177 (** val opAccs_discr : opAccs -> opAccs -> __ **)
178 let opAccs_discr x y =
179 Logic.eq_rect_Type2 x
181 | Mul -> Obj.magic (fun _ dH -> dH)
182 | DivuModu -> Obj.magic (fun _ dH -> dH)) y
184 (** val opAccs_jmdiscr : opAccs -> opAccs -> __ **)
185 let opAccs_jmdiscr x y =
186 Logic.eq_rect_Type2 x
188 | Mul -> Obj.magic (fun _ dH -> dH)
189 | DivuModu -> Obj.magic (fun _ dH -> dH)) y
196 (** val op1_rect_Type4 : 'a1 -> 'a1 -> 'a1 -> op1 -> 'a1 **)
197 let rec op1_rect_Type4 h_Cmpl h_Inc h_Rl = function
202 (** val op1_rect_Type5 : 'a1 -> 'a1 -> 'a1 -> op1 -> 'a1 **)
203 let rec op1_rect_Type5 h_Cmpl h_Inc h_Rl = function
208 (** val op1_rect_Type3 : 'a1 -> 'a1 -> 'a1 -> op1 -> 'a1 **)
209 let rec op1_rect_Type3 h_Cmpl h_Inc h_Rl = function
214 (** val op1_rect_Type2 : 'a1 -> 'a1 -> 'a1 -> op1 -> 'a1 **)
215 let rec op1_rect_Type2 h_Cmpl h_Inc h_Rl = function
220 (** val op1_rect_Type1 : 'a1 -> 'a1 -> 'a1 -> op1 -> 'a1 **)
221 let rec op1_rect_Type1 h_Cmpl h_Inc h_Rl = function
226 (** val op1_rect_Type0 : 'a1 -> 'a1 -> 'a1 -> op1 -> 'a1 **)
227 let rec op1_rect_Type0 h_Cmpl h_Inc h_Rl = function
232 (** val op1_inv_rect_Type4 :
233 op1 -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> 'a1 **)
234 let op1_inv_rect_Type4 hterm h1 h2 h3 =
235 let hcut = op1_rect_Type4 h1 h2 h3 hterm in hcut __
237 (** val op1_inv_rect_Type3 :
238 op1 -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> 'a1 **)
239 let op1_inv_rect_Type3 hterm h1 h2 h3 =
240 let hcut = op1_rect_Type3 h1 h2 h3 hterm in hcut __
242 (** val op1_inv_rect_Type2 :
243 op1 -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> 'a1 **)
244 let op1_inv_rect_Type2 hterm h1 h2 h3 =
245 let hcut = op1_rect_Type2 h1 h2 h3 hterm in hcut __
247 (** val op1_inv_rect_Type1 :
248 op1 -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> 'a1 **)
249 let op1_inv_rect_Type1 hterm h1 h2 h3 =
250 let hcut = op1_rect_Type1 h1 h2 h3 hterm in hcut __
252 (** val op1_inv_rect_Type0 :
253 op1 -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> 'a1 **)
254 let op1_inv_rect_Type0 hterm h1 h2 h3 =
255 let hcut = op1_rect_Type0 h1 h2 h3 hterm in hcut __
257 (** val op1_discr : op1 -> op1 -> __ **)
259 Logic.eq_rect_Type2 x
261 | Cmpl -> Obj.magic (fun _ dH -> dH)
262 | Inc -> Obj.magic (fun _ dH -> dH)
263 | Rl -> Obj.magic (fun _ dH -> dH)) y
265 (** val op1_jmdiscr : op1 -> op1 -> __ **)
266 let op1_jmdiscr x y =
267 Logic.eq_rect_Type2 x
269 | Cmpl -> Obj.magic (fun _ dH -> dH)
270 | Inc -> Obj.magic (fun _ dH -> dH)
271 | Rl -> Obj.magic (fun _ dH -> dH)) y
281 (** val op2_rect_Type4 :
282 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> op2 -> 'a1 **)
283 let rec op2_rect_Type4 h_Add h_Addc h_Sub h_And h_Or h_Xor = function
291 (** val op2_rect_Type5 :
292 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> op2 -> 'a1 **)
293 let rec op2_rect_Type5 h_Add h_Addc h_Sub h_And h_Or h_Xor = function
301 (** val op2_rect_Type3 :
302 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> op2 -> 'a1 **)
303 let rec op2_rect_Type3 h_Add h_Addc h_Sub h_And h_Or h_Xor = function
311 (** val op2_rect_Type2 :
312 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> op2 -> 'a1 **)
313 let rec op2_rect_Type2 h_Add h_Addc h_Sub h_And h_Or h_Xor = function
321 (** val op2_rect_Type1 :
322 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> op2 -> 'a1 **)
323 let rec op2_rect_Type1 h_Add h_Addc h_Sub h_And h_Or h_Xor = function
331 (** val op2_rect_Type0 :
332 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> 'a1 -> op2 -> 'a1 **)
333 let rec op2_rect_Type0 h_Add h_Addc h_Sub h_And h_Or h_Xor = function
341 (** val op2_inv_rect_Type4 :
342 op2 -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> (__ ->
343 'a1) -> (__ -> 'a1) -> 'a1 **)
344 let op2_inv_rect_Type4 hterm h1 h2 h3 h4 h5 h6 =
345 let hcut = op2_rect_Type4 h1 h2 h3 h4 h5 h6 hterm in hcut __
347 (** val op2_inv_rect_Type3 :
348 op2 -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> (__ ->
349 'a1) -> (__ -> 'a1) -> 'a1 **)
350 let op2_inv_rect_Type3 hterm h1 h2 h3 h4 h5 h6 =
351 let hcut = op2_rect_Type3 h1 h2 h3 h4 h5 h6 hterm in hcut __
353 (** val op2_inv_rect_Type2 :
354 op2 -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> (__ ->
355 'a1) -> (__ -> 'a1) -> 'a1 **)
356 let op2_inv_rect_Type2 hterm h1 h2 h3 h4 h5 h6 =
357 let hcut = op2_rect_Type2 h1 h2 h3 h4 h5 h6 hterm in hcut __
359 (** val op2_inv_rect_Type1 :
360 op2 -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> (__ ->
361 'a1) -> (__ -> 'a1) -> 'a1 **)
362 let op2_inv_rect_Type1 hterm h1 h2 h3 h4 h5 h6 =
363 let hcut = op2_rect_Type1 h1 h2 h3 h4 h5 h6 hterm in hcut __
365 (** val op2_inv_rect_Type0 :
366 op2 -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> (__ -> 'a1) -> (__ ->
367 'a1) -> (__ -> 'a1) -> 'a1 **)
368 let op2_inv_rect_Type0 hterm h1 h2 h3 h4 h5 h6 =
369 let hcut = op2_rect_Type0 h1 h2 h3 h4 h5 h6 hterm in hcut __
371 (** val op2_discr : op2 -> op2 -> __ **)
373 Logic.eq_rect_Type2 x
375 | Add -> Obj.magic (fun _ dH -> dH)
376 | Addc -> Obj.magic (fun _ dH -> dH)
377 | Sub -> Obj.magic (fun _ dH -> dH)
378 | And -> Obj.magic (fun _ dH -> dH)
379 | Or -> Obj.magic (fun _ dH -> dH)
380 | Xor -> Obj.magic (fun _ dH -> dH)) y
382 (** val op2_jmdiscr : op2 -> op2 -> __ **)
383 let op2_jmdiscr x y =
384 Logic.eq_rect_Type2 x
386 | Add -> Obj.magic (fun _ dH -> dH)
387 | Addc -> Obj.magic (fun _ dH -> dH)
388 | Sub -> Obj.magic (fun _ dH -> dH)
389 | And -> Obj.magic (fun _ dH -> dH)
390 | Or -> Obj.magic (fun _ dH -> dH)
391 | Xor -> Obj.magic (fun _ dH -> dH)) y
393 type eval = { opaccs : (opAccs -> BitVector.byte -> BitVector.byte ->
394 (BitVector.byte, BitVector.byte) Types.prod);
395 op0 : (op1 -> BitVector.byte -> BitVector.byte);
396 op3 : (BitVector.bit -> op2 -> BitVector.byte -> BitVector.byte
397 -> (BitVector.byte, BitVector.bit) Types.prod) }
399 (** val eval_rect_Type4 :
400 ((opAccs -> BitVector.byte -> BitVector.byte -> (BitVector.byte,
401 BitVector.byte) Types.prod) -> (op1 -> BitVector.byte -> BitVector.byte)
402 -> (BitVector.bit -> op2 -> BitVector.byte -> BitVector.byte ->
403 (BitVector.byte, BitVector.bit) Types.prod) -> 'a1) -> eval -> 'a1 **)
404 let rec eval_rect_Type4 h_mk_Eval x_16308 =
405 let { opaccs = opaccs0; op0 = op4; op3 = op5 } = x_16308 in
406 h_mk_Eval opaccs0 op4 op5
408 (** val eval_rect_Type5 :
409 ((opAccs -> BitVector.byte -> BitVector.byte -> (BitVector.byte,
410 BitVector.byte) Types.prod) -> (op1 -> BitVector.byte -> BitVector.byte)
411 -> (BitVector.bit -> op2 -> BitVector.byte -> BitVector.byte ->
412 (BitVector.byte, BitVector.bit) Types.prod) -> 'a1) -> eval -> 'a1 **)
413 let rec eval_rect_Type5 h_mk_Eval x_16310 =
414 let { opaccs = opaccs0; op0 = op4; op3 = op5 } = x_16310 in
415 h_mk_Eval opaccs0 op4 op5
417 (** val eval_rect_Type3 :
418 ((opAccs -> BitVector.byte -> BitVector.byte -> (BitVector.byte,
419 BitVector.byte) Types.prod) -> (op1 -> BitVector.byte -> BitVector.byte)
420 -> (BitVector.bit -> op2 -> BitVector.byte -> BitVector.byte ->
421 (BitVector.byte, BitVector.bit) Types.prod) -> 'a1) -> eval -> 'a1 **)
422 let rec eval_rect_Type3 h_mk_Eval x_16312 =
423 let { opaccs = opaccs0; op0 = op4; op3 = op5 } = x_16312 in
424 h_mk_Eval opaccs0 op4 op5
426 (** val eval_rect_Type2 :
427 ((opAccs -> BitVector.byte -> BitVector.byte -> (BitVector.byte,
428 BitVector.byte) Types.prod) -> (op1 -> BitVector.byte -> BitVector.byte)
429 -> (BitVector.bit -> op2 -> BitVector.byte -> BitVector.byte ->
430 (BitVector.byte, BitVector.bit) Types.prod) -> 'a1) -> eval -> 'a1 **)
431 let rec eval_rect_Type2 h_mk_Eval x_16314 =
432 let { opaccs = opaccs0; op0 = op4; op3 = op5 } = x_16314 in
433 h_mk_Eval opaccs0 op4 op5
435 (** val eval_rect_Type1 :
436 ((opAccs -> BitVector.byte -> BitVector.byte -> (BitVector.byte,
437 BitVector.byte) Types.prod) -> (op1 -> BitVector.byte -> BitVector.byte)
438 -> (BitVector.bit -> op2 -> BitVector.byte -> BitVector.byte ->
439 (BitVector.byte, BitVector.bit) Types.prod) -> 'a1) -> eval -> 'a1 **)
440 let rec eval_rect_Type1 h_mk_Eval x_16316 =
441 let { opaccs = opaccs0; op0 = op4; op3 = op5 } = x_16316 in
442 h_mk_Eval opaccs0 op4 op5
444 (** val eval_rect_Type0 :
445 ((opAccs -> BitVector.byte -> BitVector.byte -> (BitVector.byte,
446 BitVector.byte) Types.prod) -> (op1 -> BitVector.byte -> BitVector.byte)
447 -> (BitVector.bit -> op2 -> BitVector.byte -> BitVector.byte ->
448 (BitVector.byte, BitVector.bit) Types.prod) -> 'a1) -> eval -> 'a1 **)
449 let rec eval_rect_Type0 h_mk_Eval x_16318 =
450 let { opaccs = opaccs0; op0 = op4; op3 = op5 } = x_16318 in
451 h_mk_Eval opaccs0 op4 op5
454 eval -> opAccs -> BitVector.byte -> BitVector.byte -> (BitVector.byte,
455 BitVector.byte) Types.prod **)
459 (** val op0 : eval -> op1 -> BitVector.byte -> BitVector.byte **)
464 eval -> BitVector.bit -> op2 -> BitVector.byte -> BitVector.byte ->
465 (BitVector.byte, BitVector.bit) Types.prod **)
469 (** val eval_inv_rect_Type4 :
470 eval -> ((opAccs -> BitVector.byte -> BitVector.byte -> (BitVector.byte,
471 BitVector.byte) Types.prod) -> (op1 -> BitVector.byte -> BitVector.byte)
472 -> (BitVector.bit -> op2 -> BitVector.byte -> BitVector.byte ->
473 (BitVector.byte, BitVector.bit) Types.prod) -> __ -> 'a1) -> 'a1 **)
474 let eval_inv_rect_Type4 hterm h1 =
475 let hcut = eval_rect_Type4 h1 hterm in hcut __
477 (** val eval_inv_rect_Type3 :
478 eval -> ((opAccs -> BitVector.byte -> BitVector.byte -> (BitVector.byte,
479 BitVector.byte) Types.prod) -> (op1 -> BitVector.byte -> BitVector.byte)
480 -> (BitVector.bit -> op2 -> BitVector.byte -> BitVector.byte ->
481 (BitVector.byte, BitVector.bit) Types.prod) -> __ -> 'a1) -> 'a1 **)
482 let eval_inv_rect_Type3 hterm h1 =
483 let hcut = eval_rect_Type3 h1 hterm in hcut __
485 (** val eval_inv_rect_Type2 :
486 eval -> ((opAccs -> BitVector.byte -> BitVector.byte -> (BitVector.byte,
487 BitVector.byte) Types.prod) -> (op1 -> BitVector.byte -> BitVector.byte)
488 -> (BitVector.bit -> op2 -> BitVector.byte -> BitVector.byte ->
489 (BitVector.byte, BitVector.bit) Types.prod) -> __ -> 'a1) -> 'a1 **)
490 let eval_inv_rect_Type2 hterm h1 =
491 let hcut = eval_rect_Type2 h1 hterm in hcut __
493 (** val eval_inv_rect_Type1 :
494 eval -> ((opAccs -> BitVector.byte -> BitVector.byte -> (BitVector.byte,
495 BitVector.byte) Types.prod) -> (op1 -> BitVector.byte -> BitVector.byte)
496 -> (BitVector.bit -> op2 -> BitVector.byte -> BitVector.byte ->
497 (BitVector.byte, BitVector.bit) Types.prod) -> __ -> 'a1) -> 'a1 **)
498 let eval_inv_rect_Type1 hterm h1 =
499 let hcut = eval_rect_Type1 h1 hterm in hcut __
501 (** val eval_inv_rect_Type0 :
502 eval -> ((opAccs -> BitVector.byte -> BitVector.byte -> (BitVector.byte,
503 BitVector.byte) Types.prod) -> (op1 -> BitVector.byte -> BitVector.byte)
504 -> (BitVector.bit -> op2 -> BitVector.byte -> BitVector.byte ->
505 (BitVector.byte, BitVector.bit) Types.prod) -> __ -> 'a1) -> 'a1 **)
506 let eval_inv_rect_Type0 hterm h1 =
507 let hcut = eval_rect_Type0 h1 hterm in hcut __
509 (** val eval_discr : eval -> eval -> __ **)
511 Logic.eq_rect_Type2 x
512 (let { opaccs = a0; op0 = a1; op3 = a2 } = x in
513 Obj.magic (fun _ dH -> dH __ __ __)) y
515 (** val eval_jmdiscr : eval -> eval -> __ **)
516 let eval_jmdiscr x y =
517 Logic.eq_rect_Type2 x
518 (let { opaccs = a0; op0 = a1; op3 = a2 } = x in
519 Obj.magic (fun _ dH -> dH __ __ __)) y
521 (** val opaccs_implementation :
522 opAccs -> BitVector.byte -> BitVector.byte -> (BitVector.byte,
523 BitVector.byte) Types.prod **)
524 let opaccs_implementation op by1 by2 =
526 BitVectorZ.z_of_unsigned_bitvector (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
527 (Nat.S (Nat.S (Nat.S Nat.O)))))))) by1
530 BitVectorZ.z_of_unsigned_bitvector (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
531 (Nat.S (Nat.S (Nat.S Nat.O)))))))) by2
536 Vector.vsplit (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
537 Nat.O)))))))) (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
539 (BitVectorZ.bitvector_of_Z
540 (Nat.plus (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
541 Nat.O)))))))) (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
542 (Nat.S Nat.O))))))))) (Z.z_times n1 n2))
544 { Types.fst = prod.Types.snd; Types.snd = prod.Types.fst }
546 (match Z.eqZb n2 Z.OZ with
547 | Bool.True -> { Types.fst = by1; Types.snd = by2 }
549 let { Types.fst = q; Types.snd = r } = divmodZ n1 n2 in
551 (BitVectorZ.bitvector_of_Z (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
552 (Nat.S (Nat.S Nat.O)))))))) q); Types.snd =
553 (BitVectorZ.bitvector_of_Z (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
554 (Nat.S (Nat.S Nat.O)))))))) r) }))
556 (** val op1_implementation : op1 -> BitVector.byte -> BitVector.byte **)
557 let op1_implementation op by =
560 BitVector.negation_bv (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
561 (Nat.S Nat.O)))))))) by
563 Arithmetic.add (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
565 (Arithmetic.bitvector_of_nat (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
566 (Nat.S (Nat.S Nat.O)))))))) (Nat.S Nat.O))
568 Vector.rotate_left (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
569 (Nat.S Nat.O)))))))) (Nat.S Nat.O) by
571 (** val op2_implementation :
572 BitVector.bit -> op2 -> BitVector.byte -> BitVector.byte ->
573 (BitVector.byte, BitVector.bit) Types.prod **)
574 let op2_implementation carry op by1 by2 =
577 let { Types.fst = res; Types.snd = flags } =
578 Arithmetic.add_8_with_carry by1 by2 Bool.False
580 { Types.fst = res; Types.snd =
581 (Vector.get_index' Nat.O (Nat.S (Nat.S Nat.O)) flags) }
583 let { Types.fst = res; Types.snd = flags } =
584 Arithmetic.add_8_with_carry by1 by2 carry
586 { Types.fst = res; Types.snd =
587 (Vector.get_index' Nat.O (Nat.S (Nat.S Nat.O)) flags) }
589 let { Types.fst = res; Types.snd = flags } =
590 Arithmetic.sub_8_with_carry by1 by2 carry
592 { Types.fst = res; Types.snd =
593 (Vector.get_index' Nat.O (Nat.S (Nat.S Nat.O)) flags) }
596 (BitVector.conjunction_bv (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
597 (Nat.S (Nat.S Nat.O)))))))) by1 by2); Types.snd = carry }
600 (BitVector.inclusive_disjunction_bv (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
601 (Nat.S (Nat.S (Nat.S Nat.O)))))))) by1 by2); Types.snd = carry }
604 (BitVector.exclusive_disjunction_bv (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
605 (Nat.S (Nat.S (Nat.S Nat.O)))))))) by1 by2); Types.snd = carry }
607 (** val eval0 : eval **)
609 { opaccs = opaccs_implementation; op0 = op1_implementation; op3 =
613 opAccs -> ByteValues.beval -> ByteValues.beval -> (ByteValues.beval,
614 ByteValues.beval) Types.prod Errors.res **)
615 let be_opaccs op a b =
617 (Monad.m_bind0 (Monad.max_def Errors.res0)
618 (Obj.magic (ByteValues.byte_of_val ErrorMessages.UnsupportedOp a))
620 Monad.m_bind0 (Monad.max_def Errors.res0)
621 (Obj.magic (ByteValues.byte_of_val ErrorMessages.UnsupportedOp b))
623 let { Types.fst = a''; Types.snd = b'' } = eval0.opaccs op a' b' in
624 Monad.m_return0 (Monad.max_def Errors.res0) { Types.fst =
625 (ByteValues.BVByte a''); Types.snd = (ByteValues.BVByte b'') })))
627 (** val be_op1 : op1 -> ByteValues.beval -> ByteValues.beval Errors.res **)
630 (Monad.m_bind0 (Monad.max_def Errors.res0)
631 (Obj.magic (ByteValues.byte_of_val ErrorMessages.UnsupportedOp a))
633 Monad.m_return0 (Monad.max_def Errors.res0) (ByteValues.BVByte
637 op2 -> Nat.nat -> BitVector.bit -> BitVector.byte Vector.vector ->
638 BitVector.byte Vector.vector -> (BitVector.byte Vector.vector,
639 BitVector.bit) Types.prod **)
640 let op2_bytes op n carry =
641 let f = fun n0 b1 b2 pr ->
642 let { Types.fst = res_tl; Types.snd = carry0 } = pr in
643 let { Types.fst = res_hd; Types.snd = carry' } =
644 eval0.op3 carry0 op b1 b2
646 { Types.fst = (Vector.VCons (n0, res_hd, res_tl)); Types.snd = carry' }
648 Vector.fold_right2_i f { Types.fst = Vector.VEmpty; Types.snd = carry } n
650 (** val op_of_add_or_sub : ByteValues.add_or_sub -> op2 **)
651 let op_of_add_or_sub = function
652 | ByteValues.Do_add -> Addc
653 | ByteValues.Do_sub -> Sub
655 (** val be_add_sub_byte :
656 ByteValues.add_or_sub -> ByteValues.bebit -> ByteValues.beval ->
657 BitVector.byte -> (ByteValues.beval, ByteValues.bebit) Types.prod
659 let be_add_sub_byte is_add carry a1 b2 =
660 let op = op_of_add_or_sub is_add in
662 | ByteValues.BVundef ->
663 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
665 | ByteValues.BVnonzero ->
666 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
668 | ByteValues.BVXor (x, x0, x1) ->
669 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
671 | ByteValues.BVByte b1 ->
673 (Monad.m_bind0 (Monad.max_def Errors.res0)
675 (ByteValues.bit_of_val ErrorMessages.UnsupportedOp carry))
677 let { Types.fst = rslt; Types.snd = carry'' } =
678 eval0.op3 carry' op b1 b2
680 Monad.m_return0 (Monad.max_def Errors.res0) { Types.fst =
681 (ByteValues.BVByte rslt); Types.snd = (ByteValues.BBbit carry'') }))
682 | ByteValues.BVnull x ->
683 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
685 | ByteValues.BVptr (ptr, p) ->
686 (match Pointers.ptype ptr with
688 (match ByteValues.part_no p with
691 (Monad.m_bind0 (Monad.max_def Errors.res0)
693 (ByteValues.bit_of_val ErrorMessages.UnsupportedOp carry))
697 Obj.magic (Errors.Error (List.Cons ((Errors.MSG
698 ErrorMessages.UnsupportedOp), List.Nil)))
701 Vector.vsplit (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
702 (Nat.S (Nat.S Nat.O)))))))) (Nat.S (Nat.S (Nat.S (Nat.S
703 (Nat.S (Nat.S (Nat.S (Nat.S Nat.O))))))))
704 (Pointers.offv ptr.Pointers.poff)
706 let { Types.fst = rslt; Types.snd = carry0 } =
707 eval0.op3 Bool.False op o1o0.Types.snd b2
710 let ptr' = { Pointers.pblock = ptr.Pointers.pblock;
712 (Vector.append (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
713 (Nat.S (Nat.S Nat.O)))))))) (Nat.S (Nat.S (Nat.S (Nat.S
714 (Nat.S (Nat.S (Nat.S (Nat.S Nat.O)))))))) o1o0.Types.fst
717 Monad.m_return0 (Monad.max_def Errors.res0) { Types.fst =
718 (ByteValues.BVptr (ptr', p)); Types.snd =
719 (ByteValues.BBptrcarry (is_add, ptr, p0, b2)) }))
722 | ByteValues.BBbit x0 ->
723 Errors.Error (List.Cons ((Errors.MSG
724 ErrorMessages.UnsupportedOp), List.Nil))
725 | ByteValues.BBundef ->
726 Errors.Error (List.Cons ((Errors.MSG
727 ErrorMessages.UnsupportedOp), List.Nil))
728 | ByteValues.BBptrcarry (is_add', ptr', p', by') ->
730 (Bool.andb (ByteValues.eq_add_or_sub is_add is_add')
731 (Pointers.eq_block ptr.Pointers.pblock
732 ptr'.Pointers.pblock))
733 (ByteValues.eq_bv_suffix (Nat.S (Nat.S (Nat.S (Nat.S
734 (Nat.S (Nat.S (Nat.S (Nat.S Nat.O)))))))) (Nat.S
735 (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
736 Nat.O)))))))) (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
737 (Nat.S (Nat.S (Nat.S Nat.O))))))))
738 (Pointers.offv ptr.Pointers.poff)
739 (Pointers.offv ptr'.Pointers.poff)) with
741 Util.if_then_else_safe
742 (Nat.eqb (ByteValues.part_no p') Nat.O) (fun _ ->
743 let by'0 = (fun _ _ -> by') __ __ in
745 Vector.vsplit (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
746 (Nat.S (Nat.S Nat.O)))))))) (Nat.S (Nat.S (Nat.S
747 (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S Nat.O))))))))
748 (Pointers.offv ptr.Pointers.poff)
750 let o1o1 = Vector.VCons ((Nat.S Nat.O), o1o0.Types.fst,
751 (Vector.VCons (Nat.O, o1o0.Types.snd, Vector.VEmpty)))
753 let { Types.fst = rslt; Types.snd = ignore } =
754 op2_bytes op (Nat.S (Nat.S Nat.O)) Bool.False o1o1
755 (Vector.VCons ((Nat.S Nat.O), b2, (Vector.VCons
756 (Nat.O, by'0, Vector.VEmpty))))
758 let part1 = Nat.S Nat.O in
759 let ptr'' = { Pointers.pblock = ptr.Pointers.pblock;
761 (Vector.vflatten (Nat.S (Nat.S Nat.O)) (Nat.S (Nat.S
762 (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
763 Nat.O)))))))) rslt) }
765 Errors.OK { Types.fst = (ByteValues.BVptr (ptr'', part1));
766 Types.snd = (ByteValues.BBptrcarry (is_add, ptr', part1,
767 (Vector.append (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
768 (Nat.S (Nat.S Nat.O)))))))) (Nat.S (Nat.S (Nat.S (Nat.S
769 (Nat.S (Nat.S (Nat.S (Nat.S Nat.O)))))))) b2 by'0))) })
770 (fun _ -> Errors.Error (List.Cons ((Errors.MSG
771 ErrorMessages.UnsupportedOp), List.Nil)))
773 Errors.Error (List.Cons ((Errors.MSG
774 ErrorMessages.UnsupportedOp), List.Nil)))))
776 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
778 | ByteValues.BVpc (x, x0) ->
779 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
783 Nat.nat -> BitVector.bitVector -> Nat.nat -> BitVector.byte **)
787 (Nat.times (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
788 Nat.O)))))))) (Nat.minus n (Nat.S p)))
789 (Nat.plus (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
791 (Nat.times (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
792 Nat.O)))))))) p)) v).Types.snd
794 (Vector.vsplit (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
796 (Nat.times (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
797 Nat.O)))))))) p) suffix).Types.fst
800 ('a1 -> 'a1 -> Bool.bool) -> 'a1 Types.option -> 'a1 Types.option ->
806 | Types.None -> Bool.True
807 | Types.Some x -> Bool.False)
810 | Types.None -> Bool.False
811 | Types.Some b -> eq a b)
814 ByteValues.bebit -> op2 -> ByteValues.beval -> ByteValues.beval ->
815 (ByteValues.beval, ByteValues.bebit) Types.prod Errors.res **)
816 let be_op2 carry op a1 a2 =
820 | ByteValues.BVundef ->
821 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
823 | ByteValues.BVnonzero ->
824 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
826 | ByteValues.BVXor (x, x0, x1) ->
827 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
829 | ByteValues.BVByte b1 ->
830 be_add_sub_byte ByteValues.Do_add (ByteValues.BBbit Bool.False) a2 b1
831 | ByteValues.BVnull x ->
832 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
834 | ByteValues.BVptr (ptr1, p1) ->
836 | ByteValues.BVundef ->
837 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
839 | ByteValues.BVnonzero ->
840 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
842 | ByteValues.BVXor (x, x0, x1) ->
843 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
845 | ByteValues.BVByte b2 ->
846 be_add_sub_byte ByteValues.Do_add (ByteValues.BBbit Bool.False) a1
848 | ByteValues.BVnull x ->
849 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
851 | ByteValues.BVptr (x, x0) ->
852 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
854 | ByteValues.BVpc (x, x0) ->
855 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
857 | ByteValues.BVpc (x, x0) ->
858 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
862 | ByteValues.BVundef ->
863 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
865 | ByteValues.BVnonzero ->
866 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
868 | ByteValues.BVXor (x, x0, x1) ->
869 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
871 | ByteValues.BVByte b1 -> be_add_sub_byte ByteValues.Do_add carry a2 b1
872 | ByteValues.BVnull x ->
873 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
875 | ByteValues.BVptr (ptr1, p1) ->
877 | ByteValues.BVundef ->
878 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
880 | ByteValues.BVnonzero ->
881 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
883 | ByteValues.BVXor (x, x0, x1) ->
884 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
886 | ByteValues.BVByte b2 ->
887 be_add_sub_byte ByteValues.Do_add carry a1 b2
888 | ByteValues.BVnull x ->
889 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
891 | ByteValues.BVptr (x, x0) ->
892 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
894 | ByteValues.BVpc (x, x0) ->
895 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
897 | ByteValues.BVpc (x, x0) ->
898 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
902 | ByteValues.BVundef ->
903 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
905 | ByteValues.BVnonzero ->
906 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
908 | ByteValues.BVXor (x, x0, x1) ->
909 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
911 | ByteValues.BVByte b1 ->
913 (Monad.m_bind0 (Monad.max_def Errors.res0)
915 (ByteValues.byte_of_val ErrorMessages.UnsupportedOp a2))
917 Obj.magic (be_add_sub_byte ByteValues.Do_sub carry a1 b2)))
918 | ByteValues.BVnull x ->
919 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
921 | ByteValues.BVptr (ptr1, p1) ->
923 | ByteValues.BVundef ->
924 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
926 | ByteValues.BVnonzero ->
927 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
929 | ByteValues.BVXor (x, x0, x1) ->
930 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
932 | ByteValues.BVByte b2 ->
933 be_add_sub_byte ByteValues.Do_sub carry a1 b2
934 | ByteValues.BVnull x ->
935 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
937 | ByteValues.BVptr (ptr2, p2) ->
938 (match Pointers.ptype ptr1 with
941 (Pointers.eq_block ptr1.Pointers.pblock
942 ptr2.Pointers.pblock)
943 (Nat.eqb (ByteValues.part_no p1)
944 (ByteValues.part_no p2)) with
947 (Monad.m_bind0 (Monad.max_def Errors.res0)
949 (ByteValues.bit_of_val ErrorMessages.UnsupportedOp
950 carry)) (fun carry0 ->
952 byte_at AST.size_pointer
953 (Pointers.offv ptr1.Pointers.poff)
954 (ByteValues.part_no p1)
957 byte_at AST.size_pointer
958 (Pointers.offv ptr2.Pointers.poff)
959 (ByteValues.part_no p1)
961 let { Types.fst = result; Types.snd = carry1 } =
962 eval0.op3 carry0 Sub by1 by2
964 Monad.m_return0 (Monad.max_def Errors.res0) { Types.fst =
965 (ByteValues.BVByte result); Types.snd =
966 (ByteValues.BBbit carry1) }))
968 Errors.Error (List.Cons ((Errors.MSG
969 ErrorMessages.UnsupportedOp), List.Nil)))
971 Errors.Error (List.Cons ((Errors.MSG
972 ErrorMessages.UnsupportedOp), List.Nil)))
973 | ByteValues.BVpc (x, x0) ->
974 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
976 | ByteValues.BVpc (x, x0) ->
977 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
981 (Monad.m_bind0 (Monad.max_def Errors.res0)
982 (Obj.magic (ByteValues.byte_of_val ErrorMessages.UnsupportedOp a1))
984 Monad.m_bind0 (Monad.max_def Errors.res0)
985 (Obj.magic (ByteValues.byte_of_val ErrorMessages.UnsupportedOp a2))
987 let res = (eval0.op3 Bool.False And b1 b2).Types.fst in
988 Monad.m_return0 (Monad.max_def Errors.res0) { Types.fst =
989 (ByteValues.BVByte res); Types.snd = carry })))
992 | ByteValues.BVundef ->
993 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
995 | ByteValues.BVnonzero ->
997 | ByteValues.BVundef ->
998 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1000 | ByteValues.BVnonzero ->
1002 (Monad.m_return0 (Monad.max_def Errors.res0) { Types.fst =
1003 ByteValues.BVnonzero; Types.snd = carry })
1004 | ByteValues.BVXor (x, x0, x1) ->
1006 (Monad.m_return0 (Monad.max_def Errors.res0) { Types.fst =
1007 ByteValues.BVnonzero; Types.snd = carry })
1008 | ByteValues.BVByte x ->
1010 (Monad.m_return0 (Monad.max_def Errors.res0) { Types.fst =
1011 ByteValues.BVnonzero; Types.snd = carry })
1012 | ByteValues.BVnull x ->
1013 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1015 | ByteValues.BVptr (x, x0) ->
1016 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1018 | ByteValues.BVpc (x, x0) ->
1019 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1021 | ByteValues.BVXor (ptr1_opt, ptr1_opt', p1) ->
1023 | ByteValues.BVundef ->
1024 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1026 | ByteValues.BVnonzero ->
1028 (Monad.m_return0 (Monad.max_def Errors.res0) { Types.fst =
1029 ByteValues.BVnonzero; Types.snd = carry })
1030 | ByteValues.BVXor (ptr2_opt, ptr2_opt', p2) ->
1032 (Bool.andb (Nat.eqb (ByteValues.part_no p1) Nat.O)
1033 (Nat.eqb (ByteValues.part_no p2) (Nat.S Nat.O)))
1034 (Bool.andb (Nat.eqb (ByteValues.part_no p1) (Nat.S Nat.O))
1035 (Nat.eqb (ByteValues.part_no p2) Nat.O)) with
1037 let eq_at = fun p ptr1 ptr2 ->
1039 (Pointers.eq_block ptr1.Pointers.pblock
1040 ptr2.Pointers.pblock)
1041 (BitVector.eq_bv (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
1042 (Nat.S (Nat.S Nat.O))))))))
1043 (byte_at AST.size_pointer
1044 (Pointers.offv ptr1.Pointers.poff)
1045 (ByteValues.part_no p))
1046 (byte_at AST.size_pointer
1047 (Pointers.offv ptr2.Pointers.poff)
1048 (ByteValues.part_no p)))
1050 (match Bool.andb (eq_opt (eq_at p1) ptr1_opt ptr1_opt')
1051 (eq_opt (eq_at p2) ptr2_opt ptr2_opt') with
1054 (Monad.m_return0 (Monad.max_def Errors.res0) { Types.fst =
1056 (BitVector.zero (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S (Nat.S
1057 (Nat.S (Nat.S Nat.O)))))))))); Types.snd = carry })
1060 (Monad.m_return0 (Monad.max_def Errors.res0) { Types.fst =
1061 ByteValues.BVnonzero; Types.snd = carry }))
1063 Errors.Error (List.Cons ((Errors.MSG
1064 ErrorMessages.UnsupportedOp), List.Nil)))
1065 | ByteValues.BVByte x ->
1066 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1068 | ByteValues.BVnull x ->
1069 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1071 | ByteValues.BVptr (x, x0) ->
1072 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1074 | ByteValues.BVpc (x, x0) ->
1075 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1077 | ByteValues.BVByte b1 ->
1079 | ByteValues.BVundef ->
1080 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1082 | ByteValues.BVnonzero ->
1084 (Monad.m_return0 (Monad.max_def Errors.res0) { Types.fst =
1085 ByteValues.BVnonzero; Types.snd = carry })
1086 | ByteValues.BVXor (x, x0, x1) ->
1087 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1089 | ByteValues.BVByte b2 ->
1090 let res = (eval0.op3 Bool.False Or b1 b2).Types.fst in
1092 (Monad.m_return0 (Monad.max_def Errors.res0) { Types.fst =
1093 (ByteValues.BVByte res); Types.snd = carry })
1094 | ByteValues.BVnull x ->
1095 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1097 | ByteValues.BVptr (x, x0) ->
1098 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1100 | ByteValues.BVpc (x, x0) ->
1101 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1103 | ByteValues.BVnull x ->
1104 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1106 | ByteValues.BVptr (x, x0) ->
1107 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1109 | ByteValues.BVpc (x, x0) ->
1110 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1114 | ByteValues.BVundef ->
1115 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1117 | ByteValues.BVnonzero ->
1118 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1120 | ByteValues.BVXor (x, x0, x1) ->
1121 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1123 | ByteValues.BVByte b1 ->
1125 | ByteValues.BVundef ->
1126 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1128 | ByteValues.BVnonzero ->
1129 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1131 | ByteValues.BVXor (x, x0, x1) ->
1132 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1134 | ByteValues.BVByte b2 ->
1135 let res = (eval0.op3 Bool.False Xor b1 b2).Types.fst in
1137 (Monad.m_return0 (Monad.max_def Errors.res0) { Types.fst =
1138 (ByteValues.BVByte res); Types.snd = carry })
1139 | ByteValues.BVnull x ->
1140 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1142 | ByteValues.BVptr (x, x0) ->
1143 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1145 | ByteValues.BVpc (x, x0) ->
1146 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1148 | ByteValues.BVnull p1 ->
1150 | ByteValues.BVundef ->
1151 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1153 | ByteValues.BVnonzero ->
1154 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1156 | ByteValues.BVXor (x, x0, x1) ->
1157 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1159 | ByteValues.BVByte x ->
1160 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1162 | ByteValues.BVnull p2 ->
1163 (match Nat.eqb (ByteValues.part_no p1) (ByteValues.part_no p2) with
1166 (Monad.m_return0 (Monad.max_def Errors.res0) { Types.fst =
1167 (ByteValues.BVXor (Types.None, Types.None, p1)); Types.snd =
1170 Errors.Error (List.Cons ((Errors.MSG
1171 ErrorMessages.UnsupportedOp), List.Nil)))
1172 | ByteValues.BVptr (ptr2, p2) ->
1173 (match Nat.eqb (ByteValues.part_no p1) (ByteValues.part_no p2) with
1176 (Monad.m_return0 (Monad.max_def Errors.res0) { Types.fst =
1177 (ByteValues.BVXor (Types.None, (Types.Some ptr2), p1));
1178 Types.snd = carry })
1180 Errors.Error (List.Cons ((Errors.MSG
1181 ErrorMessages.UnsupportedOp), List.Nil)))
1182 | ByteValues.BVpc (x, x0) ->
1183 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1185 | ByteValues.BVptr (ptr1, p1) ->
1187 | ByteValues.BVundef ->
1188 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1190 | ByteValues.BVnonzero ->
1191 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1193 | ByteValues.BVXor (x, x0, x1) ->
1194 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1196 | ByteValues.BVByte x ->
1197 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1199 | ByteValues.BVnull p2 ->
1200 (match Nat.eqb (ByteValues.part_no p1) (ByteValues.part_no p2) with
1203 (Monad.m_return0 (Monad.max_def Errors.res0) { Types.fst =
1204 (ByteValues.BVXor ((Types.Some ptr1), Types.None, p1));
1205 Types.snd = carry })
1207 Errors.Error (List.Cons ((Errors.MSG
1208 ErrorMessages.UnsupportedOp), List.Nil)))
1209 | ByteValues.BVptr (ptr2, p2) ->
1210 (match Nat.eqb (ByteValues.part_no p1) (ByteValues.part_no p2) with
1213 (Monad.m_return0 (Monad.max_def Errors.res0) { Types.fst =
1214 (ByteValues.BVXor ((Types.Some ptr1), (Types.Some ptr2),
1215 p1)); Types.snd = carry })
1217 Errors.Error (List.Cons ((Errors.MSG
1218 ErrorMessages.UnsupportedOp), List.Nil)))
1219 | ByteValues.BVpc (x, x0) ->
1220 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),
1222 | ByteValues.BVpc (x, x0) ->
1223 Errors.Error (List.Cons ((Errors.MSG ErrorMessages.UnsupportedOp),