This commit is contained in:
Suzanne Dupéron 2019-10-23 10:45:48 -04:00
parent 10362426aa
commit 535c291b3f

View File

@ -688,12 +688,9 @@ let propagator_break_ctor : output_break_ctor propagator =
(* TODO : with our selectors, the selection depends on the order in which the constraints are added :-( :-( :-( :-( (* TODO : with our selectors, the selection depends on the order in which the constraints are added :-( :-( :-( :-(
We need to return a lazy stream of constraints. *) We need to return a lazy stream of constraints. *)
module type BLABLA = Set.OrderedType (* Set.S *)
type output_specialize1 = { poly : c_poly_simpl ; a_k_var : c_constructor_simpl } type output_specialize1 = { poly : c_poly_simpl ; a_k_var : c_constructor_simpl }
module Comparators = struct
module Int = struct module Int = struct
(* Restrict use of Pervasives.compare to just `int`, because we (* Restrict use of Pervasives.compare to just `int`, because we
don't want to risk the type of a field changing from int to don't want to risk the type of a field changing from int to
@ -866,17 +863,16 @@ module Comparators = struct
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
end
module OutputSpecialize1 : BLABLA = struct module OutputSpecialize1 : Set.OrderedType = struct
type t = output_specialize1 type t = output_specialize1
let compare = Comparators.compare_output_specialize1 let compare = compare_output_specialize1
end end
module BreakCtor : BLABLA = struct module BreakCtor : Set.OrderedType = struct
type t = output_break_ctor type t = output_break_ctor
let compare = Comparators.compare_output_break_ctor let compare = compare_output_break_ctor
end end
let selector_specialize1 : (type_constraint_simpl, output_specialize1) selector = let selector_specialize1 : (type_constraint_simpl, output_specialize1) selector =
@ -918,7 +914,7 @@ let propagator_specialize1 : output_specialize1 propagator =
let eqs = eq1 :: new_constraints in let eqs = eq1 :: new_constraints in
(eqs, []) (* no new assignments *) (eqs, []) (* no new assignments *)
module M (BlaBla : BLABLA) = 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 =