src/HOL/Tools/Nitpick/kodkod.ML
changeset 34121 5e831d805118
parent 33982 1ae222745c4a
child 34124 c4628a1dcf75
equal deleted inserted replaced
34120:f9920a3ddf50 34121:5e831d805118
   994 val fudge_ms = 250
   994 val fudge_ms = 250
   995 
   995 
   996 (* bool -> Time.time option -> int -> int -> problem list -> outcome *)
   996 (* bool -> Time.time option -> int -> int -> problem list -> outcome *)
   997 fun solve_any_problem overlord deadline max_threads max_solutions problems =
   997 fun solve_any_problem overlord deadline max_threads max_solutions problems =
   998   let
   998   let
   999     val j = find_index (equal True o #formula) problems
   999     val j = find_index (curry (op =) True o #formula) problems
  1000     val indexed_problems = if j >= 0 then
  1000     val indexed_problems = if j >= 0 then
  1001                              [(j, nth problems j)]
  1001                              [(j, nth problems j)]
  1002                            else
  1002                            else
  1003                              filter (not_equal False o #formula o snd)
  1003                              filter (not_equal False o #formula o snd)
  1004                                     (0 upto length problems - 1 ~~ problems)
  1004                                     (0 upto length problems - 1 ~~ problems)