equal
deleted
inserted
replaced
980 |
980 |
981 fun pretty_counterex ctxt NONE = Pretty.str "No counterexamples found." |
981 fun pretty_counterex ctxt NONE = Pretty.str "No counterexamples found." |
982 | pretty_counterex ctxt (SOME cex) = |
982 | pretty_counterex ctxt (SOME cex) = |
983 Pretty.chunks (Pretty.str "Counterexample found:\n" :: |
983 Pretty.chunks (Pretty.str "Counterexample found:\n" :: |
984 map (fn (s, t) => |
984 map (fn (s, t) => |
985 Pretty.block [Pretty.str (s ^ " ="), Pretty.brk 1, |
985 Pretty.block [Pretty.str (s ^ " ="), Pretty.brk 1, Syntax.pretty_term ctxt t]) cex); |
986 ProofContext.pretty_term ctxt t]) cex); |
|
987 |
986 |
988 val auto_quickcheck = ref true; |
987 val auto_quickcheck = ref true; |
989 val auto_quickcheck_time_limit = ref 5000; |
988 val auto_quickcheck_time_limit = ref 5000; |
990 |
989 |
991 fun test_goal' int state = |
990 fun test_goal' int state = |
1041 val thy = ProofContext.theory_of ctxt; |
1040 val thy = ProofContext.theory_of ctxt; |
1042 val t = eval_term thy (Syntax.read_term ctxt s); |
1041 val t = eval_term thy (Syntax.read_term ctxt s); |
1043 val T = Term.type_of t; |
1042 val T = Term.type_of t; |
1044 in |
1043 in |
1045 Pretty.writeln |
1044 Pretty.writeln |
1046 (Pretty.block [Pretty.quote (ProofContext.pretty_term ctxt t), Pretty.fbrk, |
1045 (Pretty.block [Pretty.quote (Syntax.pretty_term ctxt t), Pretty.fbrk, |
1047 Pretty.str "::", Pretty.brk 1, Pretty.quote (ProofContext.pretty_typ ctxt T)]) |
1046 Pretty.str "::", Pretty.brk 1, Pretty.quote (Syntax.pretty_typ ctxt T)]) |
1048 end); |
1047 end); |
1049 |
1048 |
1050 exception Evaluation of term; |
1049 exception Evaluation of term; |
1051 |
1050 |
1052 fun evaluation_oracle (thy, Evaluation t) = |
1051 fun evaluation_oracle (thy, Evaluation t) = |