Commits

Matthew Hammer committed 8c8c0ed

resolved conflict; found a new bug to study

Comments (0)

Files changed (3)

Source/AdaptonZoo/Adapton.ml

         raise exn
       in
       IFDEF ADAPTON_LOG THEN (
-        Log.usr_hooks.Log.output_graph () ;
+        (*Log.usr_hooks.Log.output_graph () ;*)
         Log.log `EvalRet (fun _ -> Log.more (R.string value) ) ;
       ) END ;
       lazy_stack := List.tl !lazy_stack;

Test/TestAdapton/TestAKList.ml

 let make_correctness_testsuite (module L : AdaptonUtil.Signatures.AKListType) =
   let module I = L.Make (AdaptonUtil.Types.Int) in
 
-  let test_aklist_op_with_test ?(count=100) ?size ?incl op a_op ~test =
+  let test_aklist_op_with_test ?(count=120) ?size ?incl op a_op ~test =
     Gc.compact (); (* try to make GC effects consistent across tests *)
     QC.forall ~count ?size ?incl (QC.triple QC.int (QC.list QC.int) (QC.list (QC.list (QC.triple QC.bool QC.int QC.int)))) begin fun ( label, xs, kss ) ->
       Random.init label;
       let reduce_fn = I.memo_reduce kfn in
       test_aklist_op_with_test
         ~test:(fun ~msg expected actual -> assert_int_equal ~msg expected (I.AData.force actual))
-        ~count:10000 ~size:(fun _ -> 6)
+        ~count:10000 ~size:(fun _ -> 10)
         (List.fold_left fn 0)
         (fun nondet xs' -> reduce_fn (nondet ())
            (* prepend 0 to avoid empty lists *)

Test/nominaladaptontest.ml

 
   module I = AKLi
 
-  module Test_case = struct
+  module Test_case_passes = struct
     (* The data in this module specifies the failing test case, as
        printed by the failing unit test. *)
     (* TODO: To use delta debugging, we need to read this out of a file;
       ]
   end
 
+  module Test_case = struct
+    let error_message = "\n  update\n    expected: -12 but got: -16\n  on input: (2, [4; -8; -3; -2; -7; -4],\n            [[(true, -9, -1)];\n             [(true, 8, -2); (false, 6, -4); (true, 0, -2); (true, -8, 0);\n              (false, -5, -3); (true, 9, 8); (true, -3, -6); (false, -4, -7)\n             ];\n             [(false, -10, -9); (true, 3, 2); (false, 6, -9); (true, -1, -6);\n              (false, 7, 8); (true, 0, -3)\n             ];\n             [(false, -10, -7); (true, 4, 2); (false, -7, 0);\n              (false, -1, -1); (false, -10, -7); (false, -6, -3);\n              (true, -7, -4)\n             ]; [(false, 2, -3)];\n             [(true, -9, 6); (false, 2, 4); (true, -2, -8); (false, 2, 8);\n              (true, -4, 3); (true, 8, 7); (true, 8, -3); (false, -10, -8);\n              (true, 2, 2)\n             ];\n             [(false, -6, 4); (false, -8, -7); (false, 3, -9); (true, -6, 6)];\n             [(false, -6, 1); (true, -4, 2); (true, 3, -10); (false, -3, -1);\n              (true, 6, -3); (true, 1, -6)\n             ]; []\n            ])"
+
+    let label = 2
+    let list = [4; -8; -3; -2; -7; -4]
+    let edits = 
+      [[(true, -9, -1)];
+       [(true, 8, -2); (false, 6, -4); (true, 0, -2); (true, -8, 0);
+        (false, -5, -3); (true, 9, 8); (true, -3, -6); (false, -4, -7)
+       ];
+       [(false, -10, -9); (true, 3, 2); (false, 6, -9); (true, -1, -6);
+        (false, 7, 8); (true, 0, -3)
+       ];
+       [(false, -10, -7); (true, 4, 2); (false, -7, 0);
+        (false, -1, -1); (false, -10, -7); (false, -6, -3);
+        (true, -7, -4)
+       ]; 
+       [(false, 2, -3)];
+       [(true, -9, 6); (false, 2, 4); (true, -2, -8); (false, 2, 8);
+        (true, -4, 3); (true, 8, 7); (true, 8, -3); (false, -10, -8);
+        (true, 2, 2)
+       ];
+       [(false, -6, 4); (false, -8, -7); (false, 3, -9); (true, -6, 6)];
+       [(false, -6, 1); (true, -4, 2); (true, 3, -10); (false, -3, -1);
+        (true, 6, -3); (true, 1, -6)
+       ]; 
+       []
+      ]
+  end
+
   (* - - - - begin boilerplate - - - - - - *)
   module Apparatus = struct