src/HOL/Mirabelle/Tools/mirabelle_quickcheck.ML
changeset 67399 eab6ce8368fa
parent 62519 a564458f94db
child 67405 e9ab4ad7bd15
equal deleted inserted replaced
67398:5eb932e604a2 67399:eab6ce8368fa
    10 fun init _ = I
    10 fun init _ = I
    11 fun done _ _ = ()
    11 fun done _ _ = ()
    12 
    12 
    13 fun run args id ({pre, timeout, log, ...}: Mirabelle.run_args) =
    13 fun run args id ({pre, timeout, log, ...}: Mirabelle.run_args) =
    14   let
    14   let
    15     val has_valid_key = member (op =) ["iterations", "size", "generator"] o fst
    15     val has_valid_key = member (=) ["iterations", "size", "generator"] o fst
    16     val quickcheck = Quickcheck.quickcheck (map (apsnd single) (filter has_valid_key args)) 1
    16     val quickcheck = Quickcheck.quickcheck (map (apsnd single) (filter has_valid_key args)) 1
    17   in
    17   in
    18     (case Timeout.apply timeout quickcheck pre of
    18     (case Timeout.apply timeout quickcheck pre of
    19       NONE => log (qc_tag id ^ "no counterexample")
    19       NONE => log (qc_tag id ^ "no counterexample")
    20     | SOME _ => log (qc_tag id ^ "counterexample found"))
    20     | SOME _ => log (qc_tag id ^ "counterexample found"))