changing Quickcheck_Narrowing's main function to enumerate the depth instead upto the depth
authorbulwahn
Wed, 23 Mar 2011 08:50:39 +0100
changeset 42090 ef566ce50170
parent 42089 904897d0c5bd
child 42091 6fe4abb9437b
changing Quickcheck_Narrowing's main function to enumerate the depth instead upto the depth
src/HOL/Tools/Quickcheck/Narrowing_Engine.hs
src/HOL/Tools/Quickcheck/narrowing_generators.ML
--- a/src/HOL/Tools/Quickcheck/Narrowing_Engine.hs	Wed Mar 23 08:50:32 2011 +0100
+++ b/src/HOL/Tools/Quickcheck/Narrowing_Engine.hs	Wed Mar 23 08:50:39 2011 +0100
@@ -101,10 +101,10 @@
 
 depthCheck :: Testable a => Int -> a -> IO ();
 depthCheck d p =
-  (refute $ run (const p) 0 d) >>= (\n -> putStrLn $ "OK, required " ++ show n ++ " tests at depth " ++ show d);
+  (refute $ run (const p) 0 d) >> putStrLn ("NONE") >> hFlush stdout;
 
 smallCheck :: Testable a => Int -> a -> IO ();
-smallCheck d p = mapM_ (`depthCheck` p) [0..d] >> putStrLn ("NONE");
+smallCheck d p = mapM_ (`depthCheck` p) [0..d] >> putStrLn ("NONE") >> hFlush stdout;
 
 }
 
--- a/src/HOL/Tools/Quickcheck/narrowing_generators.ML	Wed Mar 23 08:50:32 2011 +0100
+++ b/src/HOL/Tools/Quickcheck/narrowing_generators.ML	Wed Mar 23 08:50:39 2011 +0100
@@ -136,7 +136,7 @@
         val main = "module Main where {\n\n" ^
           "import Narrowing_Engine;\n" ^
           "import Code;\n\n" ^
-          "main = Narrowing_Engine.smallCheck " ^ string_of_int size ^ " (Code.value ())\n\n" ^
+          "main = Narrowing_Engine.depthCheck " ^ string_of_int size ^ " (Code.value ())\n\n" ^
           "}\n"
         val code' = prefix "module Code where {\n\ndata Typerep = Typerep String [Typerep];\n"
           (unprefix "module Code where {" code)