let dispatch models =
try
let model = List.find
(fun m ->
List.for_all
(fun (opt,f) ->
match f with
| NA -> true
| Yes -> opt ()
| No -> not (opt ()) )
[
(fun () -> false) , m.wp_qed ;
Wp_parameters.LogicVar.get , m.wp_logicvar ;
]
) models in
let computer = model.wp_computer () in
match model.wp_method () , model.wp_altmodel with
| Mcfg.NoAssigns , None -> NonAssigns computer
| Mcfg.NoAssigns , Some alt -> OneforEach( computer , alt () )
| _ -> OneforBoth computer
with Not_found ->
Wp_parameters.abort "No model found with provided criteria"