src/HOL/Tools/SMT/smt_solver.ML
changeset 46736 4dc7ddb47350
parent 46497 89ccf66aa73d
child 46743 8e365bc843e9
equal deleted inserted replaced
46735:c8ec1958f822 46736:4dc7ddb47350
   235 fun gen_preprocess ctxt iwthms = SMT_Normalize.normalize iwthms ctxt
   235 fun gen_preprocess ctxt iwthms = SMT_Normalize.normalize iwthms ctxt
   236 
   236 
   237 fun gen_apply (ithms, ctxt) =
   237 fun gen_apply (ithms, ctxt) =
   238   let val (name, {command, reconstruct, ...}) = name_and_info_of ctxt
   238   let val (name, {command, reconstruct, ...}) = name_and_info_of ctxt
   239   in
   239   in
   240     (ithms, ctxt)
   240     if not (SMT_Config.is_available ctxt name) then
   241     |-> invoke name command
   241       error ("The SMT solver " ^ quote name ^ " is not installed.")
   242     |> reconstruct ctxt
   242     else
   243     |>> distinct (op =)
   243       (ithms, ctxt)
       
   244       |-> invoke name command
       
   245       |> reconstruct ctxt
       
   246       |>> distinct (op =)
   244   end
   247   end
   245 
   248 
   246 fun apply_solver ctxt = gen_apply o gen_preprocess ctxt
   249 fun apply_solver ctxt = gen_apply o gen_preprocess ctxt
   247 
   250 
   248 val default_max_relevant = #default_max_relevant oo get_info
   251 val default_max_relevant = #default_max_relevant oo get_info