src/HOL/Tools/Quickcheck/find_unused_assms.ML
changeset 70116 3d580b5c4aee
parent 67149 e61557884799
child 70117 5ae2f266885f
equal deleted inserted replaced
70115:c59af027a2e5 70116:3d580b5c4aee
    38     val thy = Proof_Context.theory_of ctxt
    38     val thy = Proof_Context.theory_of ctxt
    39     val ctxt' = ctxt
    39     val ctxt' = ctxt
    40        |> Config.put Quickcheck.abort_potential true
    40        |> Config.put Quickcheck.abort_potential true
    41        |> Config.put Quickcheck.quiet true
    41        |> Config.put Quickcheck.quiet true
    42     val all_thms =
    42     val all_thms =
    43       filter (fn (s, _) => length (Long_Name.explode s) = 2)  (* FIXME !? *)
    43       thms_of thy thy_name
    44         (thms_of thy thy_name)
    44       |> filter (fn (s, _) => length (Long_Name.explode s) = 2)  (* FIXME !? *)
       
    45       |> sort_by #1
    45     fun check_single conjecture =
    46     fun check_single conjecture =
    46       (case try (Quickcheck.test_terms ctxt' (true, true) []) [(conjecture, [])] of
    47       (case try (Quickcheck.test_terms ctxt' (true, true) []) [(conjecture, [])] of
    47         SOME (SOME _) => false
    48         SOME (SOME _) => false
    48       | SOME NONE => true
    49       | SOME NONE => true
    49       | NONE => false)
    50       | NONE => false)