compile + reduce problem size by a notch
authorblanchet
Sat, 21 Dec 2013 09:44:30 +0100
changeset 54845 10df188349b3
parent 54844 630ba4d8a206
child 54846 bf86b2002c96
compile + reduce problem size by a notch
src/HOL/Nitpick_Examples/Mini_Nits.thy
src/HOL/Nitpick_Examples/minipick.ML
--- a/src/HOL/Nitpick_Examples/Mini_Nits.thy	Sat Dec 21 09:44:30 2013 +0100
+++ b/src/HOL/Nitpick_Examples/Mini_Nits.thy	Sat Dec 21 09:44:30 2013 +0100
@@ -13,9 +13,8 @@
 
 ML_file "minipick.ML"
 
-nitpick_params [verbose, sat_solver = MiniSat_JNI, max_threads = 1]
-
-nitpick_params [total_consts = smart]
+nitpick_params [verbose, sat_solver = MiniSat_JNI, max_threads = 1,
+  total_consts = smart]
 
 ML {*
 val check = Minipick.minipick @{context}
@@ -34,8 +33,8 @@
 ML_val {* genuine 1 @{prop False} *}
 ML_val {* genuine 1 @{prop "True \<longleftrightarrow> False"} *}
 ML_val {* none 1 @{prop "True \<longleftrightarrow> \<not> False"} *}
-ML_val {* none 5 @{prop "\<forall>x. x = x"} *}
-ML_val {* none 5 @{prop "\<exists>x. x = x"} *}
+ML_val {* none 4 @{prop "\<forall>x. x = x"} *}
+ML_val {* none 4 @{prop "\<exists>x. x = x"} *}
 ML_val {* none 1 @{prop "\<forall>x. x = y"} *}
 ML_val {* genuine 2 @{prop "\<forall>x. x = y"} *}
 ML_val {* none 2 @{prop "\<exists>x. x = y"} *}
@@ -47,10 +46,10 @@
 ML_val {* genuine 2 @{prop "All = Ex"} *}
 ML_val {* none 1 @{prop "All P = Ex P"} *}
 ML_val {* genuine 2 @{prop "All P = Ex P"} *}
-ML_val {* none 5 @{prop "x = y \<longrightarrow> P x = P y"} *}
-ML_val {* none 5 @{prop "(x\<Colon>'a \<times> 'a) = y \<longrightarrow> P x = P y"} *}
+ML_val {* none 4 @{prop "x = y \<longrightarrow> P x = P y"} *}
+ML_val {* none 4 @{prop "(x\<Colon>'a \<times> 'a) = y \<longrightarrow> P x = P y"} *}
 ML_val {* none 2 @{prop "(x\<Colon>'a \<times> 'a) = y \<longrightarrow> P x y = P y x"} *}
-ML_val {* none 5 @{prop "\<exists>x\<Colon>'a \<times> 'a. x = y \<longrightarrow> P x = P y"} *}
+ML_val {* none 4 @{prop "\<exists>x\<Colon>'a \<times> 'a. x = y \<longrightarrow> P x = P y"} *}
 ML_val {* none 2 @{prop "(x\<Colon>'a \<Rightarrow> 'a) = y \<longrightarrow> P x = P y"} *}
 ML_val {* none 2 @{prop "\<exists>x\<Colon>'a \<Rightarrow> 'a. x = y \<longrightarrow> P x = P y"} *}
 ML_val {* genuine 1 @{prop "(op =) X = Ex"} *}
@@ -64,49 +63,49 @@
 ML_val {* none 1 @{prop "P \<or> Q \<longleftrightarrow> Q \<or> P"} *}
 ML_val {* genuine 1 @{prop "P \<or> Q \<longrightarrow> P"} *}
 ML_val {* none 1 @{prop "(P \<longrightarrow> Q) \<longleftrightarrow> (\<not> P \<or> Q)"} *}
-ML_val {* none 5 @{prop "{a} = {a, a}"} *}
+ML_val {* none 4 @{prop "{a} = {a, a}"} *}
 ML_val {* genuine 2 @{prop "{a} = {a, b}"} *}
 ML_val {* genuine 1 @{prop "{a} \<noteq> {a, b}"} *}
-ML_val {* none 5 @{prop "{}\<^sup>+ = {}"} *}
-ML_val {* none 5 @{prop "UNIV\<^sup>+ = UNIV"} *}
-ML_val {* none 5 @{prop "(UNIV \<Colon> ('a \<times> 'b) set) - {} = UNIV"} *}
-ML_val {* none 5 @{prop "{} - (UNIV \<Colon> ('a \<times> 'b) set) = {}"} *}
+ML_val {* none 4 @{prop "{}\<^sup>+ = {}"} *}
+ML_val {* none 4 @{prop "UNIV\<^sup>+ = UNIV"} *}
+ML_val {* none 4 @{prop "(UNIV \<Colon> ('a \<times> 'b) set) - {} = UNIV"} *}
+ML_val {* none 4 @{prop "{} - (UNIV \<Colon> ('a \<times> 'b) set) = {}"} *}
 ML_val {* none 1 @{prop "{(a, b), (b, c)}\<^sup>+ = {(a, b), (a, c), (b, c)}"} *}
 ML_val {* genuine 2 @{prop "{(a, b), (b, c)}\<^sup>+ = {(a, b), (a, c), (b, c)}"} *}
-ML_val {* none 5 @{prop "a \<noteq> c \<Longrightarrow> {(a, b), (b, c)}\<^sup>+ = {(a, b), (a, c), (b, c)}"} *}
-ML_val {* none 5 @{prop "A \<union> B = {x. x \<in> A \<or> x \<in> B}"} *}
-ML_val {* none 5 @{prop "A \<inter> B = {x. x \<in> A \<and> x \<in> B}"} *}
-ML_val {* none 5 @{prop "A - B = (\<lambda>x. A x \<and> \<not> B x)"} *}
-ML_val {* none 5 @{prop "\<exists>a b. (a, b) = (b, a)"} *}
+ML_val {* none 4 @{prop "a \<noteq> c \<Longrightarrow> {(a, b), (b, c)}\<^sup>+ = {(a, b), (a, c), (b, c)}"} *}
+ML_val {* none 4 @{prop "A \<union> B = {x. x \<in> A \<or> x \<in> B}"} *}
+ML_val {* none 4 @{prop "A \<inter> B = {x. x \<in> A \<and> x \<in> B}"} *}
+ML_val {* none 4 @{prop "A - B = (\<lambda>x. A x \<and> \<not> B x)"} *}
+ML_val {* none 4 @{prop "\<exists>a b. (a, b) = (b, a)"} *}
 ML_val {* genuine 2 @{prop "(a, b) = (b, a)"} *}
 ML_val {* genuine 2 @{prop "(a, b) \<noteq> (b, a)"} *}
-ML_val {* none 5 @{prop "\<exists>a b\<Colon>'a \<times> 'a. (a, b) = (b, a)"} *}
+ML_val {* none 4 @{prop "\<exists>a b\<Colon>'a \<times> 'a. (a, b) = (b, a)"} *}
 ML_val {* genuine 2 @{prop "(a\<Colon>'a \<times> 'a, b) = (b, a)"} *}
-ML_val {* none 5 @{prop "\<exists>a b\<Colon>'a \<times> 'a \<times> 'a. (a, b) = (b, a)"} *}
+ML_val {* none 4 @{prop "\<exists>a b\<Colon>'a \<times> 'a \<times> 'a. (a, b) = (b, a)"} *}
 ML_val {* genuine 2 @{prop "(a\<Colon>'a \<times> 'a \<times> 'a, b) \<noteq> (b, a)"} *}
-ML_val {* none 5 @{prop "\<exists>a b\<Colon>'a \<Rightarrow> 'a. (a, b) = (b, a)"} *}
+ML_val {* none 4 @{prop "\<exists>a b\<Colon>'a \<Rightarrow> 'a. (a, b) = (b, a)"} *}
 ML_val {* genuine 1 @{prop "(a\<Colon>'a \<Rightarrow> 'a, b) \<noteq> (b, a)"} *}
-ML_val {* none 5 @{prop "fst (a, b) = a"} *}
+ML_val {* none 4 @{prop "fst (a, b) = a"} *}
 ML_val {* none 1 @{prop "fst (a, b) = b"} *}
 ML_val {* genuine 2 @{prop "fst (a, b) = b"} *}
 ML_val {* genuine 2 @{prop "fst (a, b) \<noteq> b"} *}
 ML_val {* genuine 2 @{prop "f ((x, z), y) = (x, z)"} *}
 ML_val {* none 2 @{prop "(ALL x. f x = fst x) \<longrightarrow> f ((x, z), y) = (x, z)"} *}
-ML_val {* none 5 @{prop "snd (a, b) = b"} *}
+ML_val {* none 4 @{prop "snd (a, b) = b"} *}
 ML_val {* none 1 @{prop "snd (a, b) = a"} *}
 ML_val {* genuine 2 @{prop "snd (a, b) = a"} *}
 ML_val {* genuine 2 @{prop "snd (a, b) \<noteq> a"} *}
 ML_val {* genuine 1 @{prop P} *}
 ML_val {* genuine 1 @{prop "(\<lambda>x. P) a"} *}
 ML_val {* genuine 1 @{prop "(\<lambda>x y z. P y x z) a b c"} *}
-ML_val {* none 5 @{prop "\<exists>f. f = (\<lambda>x. x) \<and> f y = y"} *}
+ML_val {* none 4 @{prop "\<exists>f. f = (\<lambda>x. x) \<and> f y = y"} *}
 ML_val {* genuine 1 @{prop "\<exists>f. f p \<noteq> p \<and> (\<forall>a b. f (a, b) = (a, b))"} *}
 ML_val {* none 2 @{prop "\<exists>f. \<forall>a b. f (a, b) = (a, b)"} *}
 ML_val {* none 3 @{prop "f = (\<lambda>a b. (b, a)) \<longrightarrow> f x y = (y, x)"} *}
 ML_val {* genuine 2 @{prop "f = (\<lambda>a b. (b, a)) \<longrightarrow> f x y = (x, y)"} *}
-ML_val {* none 5 @{prop "f = (\<lambda>x. f x)"} *}
-ML_val {* none 5 @{prop "f = (\<lambda>x. f x\<Colon>'a \<Rightarrow> bool)"} *}
-ML_val {* none 5 @{prop "f = (\<lambda>x y. f x y)"} *}
-ML_val {* none 5 @{prop "f = (\<lambda>x y. f x y\<Colon>'a \<Rightarrow> bool)"} *}
+ML_val {* none 4 @{prop "f = (\<lambda>x. f x)"} *}
+ML_val {* none 4 @{prop "f = (\<lambda>x. f x\<Colon>'a \<Rightarrow> bool)"} *}
+ML_val {* none 4 @{prop "f = (\<lambda>x y. f x y)"} *}
+ML_val {* none 4 @{prop "f = (\<lambda>x y. f x y\<Colon>'a \<Rightarrow> bool)"} *}
 
 end
--- a/src/HOL/Nitpick_Examples/minipick.ML	Sat Dec 21 09:44:30 2013 +0100
+++ b/src/HOL/Nitpick_Examples/minipick.ML	Sat Dec 21 09:44:30 2013 +0100
@@ -429,11 +429,11 @@
 
 fun solve_any_kodkod_problem thy problems =
   let
-    val {debug, overlord, ...} = Nitpick_Isar.default_params thy []
+    val {debug, overlord, timeout, ...} = Nitpick_Isar.default_params thy []
     val max_threads = 1
     val max_solutions = 1
   in
-    case solve_any_problem debug overlord NONE max_threads max_solutions
+    case solve_any_problem debug overlord timeout max_threads max_solutions
                            problems of
       JavaNotFound => "unknown"
     | JavaTooOld => "unknown"