@@ -385,7 +385,7 @@ struct
385385 assert_bool " join leq widen" (I. leq (I. join ik b1 b2) (I. widen ik b1 b2))
386386
387387 let assert_of_interval lb ub =
388- let intvl = (of_int lb, of_int ub) in
388+ let intvl = (of_int lb, of_int ub) in
389389 let bf = I. of_interval ik intvl in
390390 let print_err_message i = " Missing value: " ^ string_of_int i ^ " in [" ^ string_of_int lb ^ " , " ^ string_of_int ub ^ " ]" in
391391 for i = lb to ub do
@@ -485,7 +485,7 @@ struct
485485 let over_precision ik = Int. succ @@ precision ik
486486 let under_precision ik = Int. pred @@ precision ik
487487
488- let assert_shift ?(rev_cond =false ) ?(expected_ov_info =None ) shift ik a b expected =
488+ let assert_shift ?(rev_cond =false ) ?(expected_ov_info =None ) shift ik a b expected =
489489 let module I = I_ in
490490 let symb, shift_op_bf, shift_op_int = match shift with
491491 | `L -> " <<" , I. shift_left ik, Int. shift_left
@@ -519,7 +519,7 @@ struct
519519 let assert_shift_left ?(rev_cond =false ) ?(ov_info =None ) = assert_shift ~rev_cond: rev_cond ~expected_ov_info: ov_info `L
520520 let assert_shift_right ?(rev_cond =false ) ?(ov_info =None ) = assert_shift ~rev_cond: rev_cond ~expected_ov_info: ov_info `R
521521
522- let gen_sized_set size_gen gen =
522+ let gen_sized_set size_gen gen =
523523 let open QCheck2.Gen in
524524 map (List. sort_uniq Int. compare) (list_size size_gen gen)
525525
@@ -650,7 +650,7 @@ struct
650650
651651 (* Arith *)
652652
653- let print_err_message bf1 bf2 bfr =
653+ let print_err_message bf1 bf2 bfr =
654654 I. show bfr ^ " on input " ^ I. show bf1 ^ " and " ^ I. show bf2
655655
656656 let ik_arithu = Cil. IUChar
@@ -659,12 +659,12 @@ struct
659659
660660 let result_list op is1 is2 = List. concat (List. map (fun x -> List. map (op x) is2) is1)
661661
662- let generate_test ?(debug =false ) opc opa ik is1 is2 =
663- let zs1 = List. map Z. of_int is1 in
664- let zs2 = List. map Z. of_int is2 in
665- let res = of_list ik (result_list opc zs1 zs2) in
666- let bs1 = of_list ik zs1 in
667- let bs2 = of_list ik zs2 in
662+ let generate_test ?(debug =false ) opc opa ik is1 is2 =
663+ let zs1 = List. map Z. of_int is1 in
664+ let zs2 = List. map Z. of_int is2 in
665+ let res = of_list ik (result_list opc zs1 zs2) in
666+ let bs1 = of_list ik zs1 in
667+ let bs2 = of_list ik zs2 in
668668 let bsr = opa ik bs1 bs2 in
669669 OUnit2. assert_equal ~cmp: I. leq ~printer: (print_err_message bs1 bs2) res bsr
670670
@@ -682,50 +682,50 @@ struct
682682 let testsuite = [c1;c2;c3;c4;is1;is2;is3;is4]
683683 let testsuite_unsigned = [c1;c2;is1;is2]
684684
685- let arith_testsuite ?(debug =false ) opc opa ts ik =
685+ let arith_testsuite ?(debug =false ) opc opa ts ik =
686686 List. iter (fun x -> List. iter (generate_test opc opa ik x) ts) ts
687687
688- let test_add _ =
688+ let test_add _ =
689689 let _ = arith_testsuite Z. add I. add testsuite ik_arithu in
690- let _ = arith_testsuite Z. add I. add testsuite ik_ariths in
690+ let _ = arith_testsuite Z. add I. add testsuite ik_ariths in
691691 ()
692692
693- let test_sub _ =
693+ let test_sub _ =
694694 let _ = arith_testsuite Z. sub I. sub testsuite ik_arithu in
695- let _ = arith_testsuite Z. sub I. sub testsuite ik_ariths in
695+ let _ = arith_testsuite Z. sub I. sub testsuite ik_ariths in
696696 ()
697697
698- let test_mul _ =
698+ let test_mul _ =
699699 let _ = arith_testsuite Z. mul I. mul testsuite ik_arithu in
700- let _ = arith_testsuite Z. mul I. mul testsuite ik_ariths in
700+ let _ = arith_testsuite Z. mul I. mul testsuite ik_ariths in
701701 ()
702702
703- let test_div _ =
703+ let test_div _ =
704704 let _ = arith_testsuite Z. div I. div testsuite_unsigned ik_arithu in
705- let _ = arith_testsuite Z. div I. div testsuite IShort in
705+ let _ = arith_testsuite Z. div I. div testsuite IShort in
706706 ()
707707
708- let test_rem _ =
708+ let test_rem _ =
709709 let _ = arith_testsuite Z. rem I. rem testsuite_unsigned ik_arithu in
710- let _ = arith_testsuite Z. rem I. rem testsuite IShort in
710+ let _ = arith_testsuite Z. rem I. rem testsuite IShort in
711711 ()
712712
713- let test_neg _ =
714- let print_neg_err_message bfi bfr =
713+ let test_neg _ =
714+ let print_neg_err_message bfi bfr =
715715 I. show bfr ^ " on input " ^ I. show bfi
716716 in
717- let generate_test_neg opc opa ik is =
718- let zs = List. map Z. of_int is in
719- let res = of_list ik (List. map opc zs) in
720- let bs = of_list ik zs in
717+ let generate_test_neg opc opa ik is =
718+ let zs = List. map Z. of_int is in
719+ let res = of_list ik (List. map opc zs) in
720+ let bs = of_list ik zs in
721721 OUnit2. assert_equal ~cmp: I. leq ~printer: (print_neg_err_message bs) res (opa ik bs)
722- in
723- let neg_testsuite opc opa ik =
722+ in
723+ let neg_testsuite opc opa ik =
724724 let testsuite = [c1;c2;c3;c4;is1;is2;is3;is4] in
725725 List. map (generate_test_neg opc opa ik) testsuite
726726 in
727727 let _ = neg_testsuite Z. neg I. neg ik_arithu in
728- let _ = neg_testsuite Z. neg I. neg ik_ariths in
728+ let _ = neg_testsuite Z. neg I. neg ik_ariths in
729729 ()
730730
731731 (* Comparisons *)
@@ -924,7 +924,7 @@ struct
924924 " test_ending" > :: test_ending;
925925
926926 " test_refine_with_congruence" > :: test_refine_with_congruence;
927- " test_refine_with_inclusion_list" > :: test_refine_with_inclusion_list;
927+ " test_refine_with_inclusion_list" > :: test_refine_with_inclusion_list;
928928 ]
929929
930930end
0 commit comments