Fixed module issue, thanks Christian

This commit is contained in:
Suzanne Dupéron 2019-10-23 12:17:18 -04:00
parent 535c291b3f
commit c4e996d5aa

View File

@ -864,13 +864,13 @@ let compare_output_specialize1 { poly = a1; a_k_var = a2 } { poly = b1; a_k_var
let compare_output_break_ctor { a_k_var=a1; a_k'_var'=a2 } { a_k_var=b1; a_k'_var'=b2 } = let compare_output_break_ctor { a_k_var=a1; a_k'_var'=a2 } { a_k_var=b1; a_k'_var'=b2 } =
compare_c_constructor_simpl a1 b1 <? fun () -> compare_c_constructor_simpl a2 b2 compare_c_constructor_simpl a1 b1 <? fun () -> compare_c_constructor_simpl a2 b2
module OutputSpecialize1 : Set.OrderedType = struct module OutputSpecialize1 : (Set.OrderedType with type t = output_specialize1) = struct
type t = output_specialize1 type t = output_specialize1
let compare = compare_output_specialize1 let compare = compare_output_specialize1
end end
module BreakCtor : Set.OrderedType = struct module BreakCtor : (Set.OrderedType with type t = output_break_ctor) = struct
type t = output_break_ctor type t = output_break_ctor
let compare = compare_output_break_ctor let compare = compare_output_break_ctor
end end
@ -917,24 +917,24 @@ let propagator_specialize1 : output_specialize1 propagator =
module M (BlaBla : Set.OrderedType) = struct module M (BlaBla : Set.OrderedType) = struct
module AlreadySelected = Set.Make(BlaBla) module AlreadySelected = Set.Make(BlaBla)
let select_and_propagate : ('old_input, 'selector_output) selector -> BlaBla.t propagator -> 'a -> structured_dbs -> new_constraints * new_assignments = let select_and_propagate : ('old_input, 'selector_output) selector -> BlaBla.t propagator -> 'a -> structured_dbs -> new_constraints * new_assignments =
fun selector propagator -> fun selector propagator ->
fun old_type_constraint dbs -> fun old_type_constraint dbs ->
(* TODO: thread some state to know which selector outputs were already seen *) (* TODO: thread some state to know which selector outputs were already seen *)
let already_selected = failwith "(?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? TODO)" in let already_selected = failwith "(?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? TODO)" in
match selector old_type_constraint dbs with match selector old_type_constraint dbs with
WasSelected selected_outputs -> WasSelected selected_outputs ->
(* TODO: fold instead. *) (* TODO: fold instead. *)
let selected_outputs = List.filter (fun elt -> AlreadySelected.mem elt already_selected) selected_outputs in let selected_outputs = List.filter (fun elt -> AlreadySelected.mem elt already_selected) selected_outputs in
let blahblah = List.fold_left (fun acc elt -> AlreadySelected.add elt acc) already_selected selected_outputs in let blahblah = List.fold_left (fun acc elt -> AlreadySelected.add elt acc) already_selected selected_outputs in
let _______________________________________________________________________________________________________________________________________TODO = blahblah in let _______________________________________________________________________________________________________________________________________TODO = blahblah in
(* Call the propagation rule *) (* Call the propagation rule *)
let new_contraints_and_assignments = List.map (fun s -> propagator s dbs) selected_outputs in let new_contraints_and_assignments = List.map (fun s -> propagator s dbs) selected_outputs in
let (new_constraints , new_assignments) = List.split new_contraints_and_assignments in let (new_constraints , new_assignments) = List.split new_contraints_and_assignments in
(* return so that the new constraints are pushed to some kind of work queue and the new assignments stored *) (* return so that the new constraints are pushed to some kind of work queue and the new assignments stored *)
(List.flatten new_constraints , List.flatten new_assignments) (List.flatten new_constraints , List.flatten new_assignments)
| WasNotSelected -> | WasNotSelected ->
([] , []) ([] , [])
end end
module M_break_ctor = M(BreakCtor) module M_break_ctor = M(BreakCtor)