33 destroy_constrs: bool, |
33 destroy_constrs: bool, |
34 specialize: bool, |
34 specialize: bool, |
35 star_linear_preds: bool, |
35 star_linear_preds: bool, |
36 fast_descrs: bool, |
36 fast_descrs: bool, |
37 peephole_optim: bool, |
37 peephole_optim: bool, |
|
38 datatype_sym_break: int, |
|
39 kodkod_sym_break: int, |
38 timeout: Time.time option, |
40 timeout: Time.time option, |
39 tac_timeout: Time.time option, |
41 tac_timeout: Time.time option, |
40 max_threads: int, |
42 max_threads: int, |
41 show_datatypes: bool, |
43 show_datatypes: bool, |
42 show_consts: bool, |
44 show_consts: bool, |
104 destroy_constrs: bool, |
106 destroy_constrs: bool, |
105 specialize: bool, |
107 specialize: bool, |
106 star_linear_preds: bool, |
108 star_linear_preds: bool, |
107 fast_descrs: bool, |
109 fast_descrs: bool, |
108 peephole_optim: bool, |
110 peephole_optim: bool, |
|
111 datatype_sym_break: int, |
|
112 kodkod_sym_break: int, |
109 timeout: Time.time option, |
113 timeout: Time.time option, |
110 tac_timeout: Time.time option, |
114 tac_timeout: Time.time option, |
111 max_threads: int, |
115 max_threads: int, |
112 show_datatypes: bool, |
116 show_datatypes: bool, |
113 show_consts: bool, |
117 show_consts: bool, |
189 *) |
193 *) |
190 val {cards_assigns, maxes_assigns, iters_assigns, bitss, bisim_depths, |
194 val {cards_assigns, maxes_assigns, iters_assigns, bitss, bisim_depths, |
191 boxes, finitizes, monos, stds, wfs, sat_solver, falsify, debug, |
195 boxes, finitizes, monos, stds, wfs, sat_solver, falsify, debug, |
192 verbose, overlord, user_axioms, assms, merge_type_vars, binary_ints, |
196 verbose, overlord, user_axioms, assms, merge_type_vars, binary_ints, |
193 destroy_constrs, specialize, star_linear_preds, fast_descrs, |
197 destroy_constrs, specialize, star_linear_preds, fast_descrs, |
194 peephole_optim, tac_timeout, max_threads, show_datatypes, show_consts, |
198 peephole_optim, datatype_sym_break, kodkod_sym_break, tac_timeout, |
195 evals, formats, atomss, max_potential, max_genuine, check_potential, |
199 max_threads, show_datatypes, show_consts, evals, formats, atomss, |
196 check_genuine, batch_size, ...} = params |
200 max_potential, max_genuine, check_potential, check_genuine, batch_size, |
|
201 ...} = params |
197 val state_ref = Unsynchronized.ref state |
202 val state_ref = Unsynchronized.ref state |
198 val pprint = |
203 val pprint = |
199 if auto then |
204 if auto then |
200 Unsynchronized.change state_ref o Proof.goal_message o K |
205 Unsynchronized.change state_ref o Proof.goal_message o K |
201 o Pretty.chunks o cons (Pretty.str "") o single |
206 o Pretty.chunks o cons (Pretty.str "") o single |
491 |> unsound_delay_for_timeout |
496 |> unsound_delay_for_timeout |
492 else |
497 else |
493 0 |
498 0 |
494 val settings = [("solver", commas_quote kodkod_sat_solver), |
499 val settings = [("solver", commas_quote kodkod_sat_solver), |
495 ("bit_width", string_of_int bit_width), |
500 ("bit_width", string_of_int bit_width), |
496 ("symmetry_breaking", "20"), |
501 ("symmetry_breaking", string_of_int kodkod_sym_break), |
497 ("sharing", "3"), |
502 ("sharing", "3"), |
498 ("flatten", "false"), |
503 ("flatten", "false"), |
499 ("delay", signed_string_of_int delay)] |
504 ("delay", signed_string_of_int delay)] |
500 val plain_rels = free_rels @ other_rels |
505 val plain_rels = free_rels @ other_rels |
501 val plain_bounds = map (bound_for_plain_rel ctxt debug) plain_rels |
506 val plain_bounds = map (bound_for_plain_rel ctxt debug) plain_rels |
506 rel_table datatypes |
511 rel_table datatypes |
507 val declarative_axioms = plain_axioms @ dtype_axioms |
512 val declarative_axioms = plain_axioms @ dtype_axioms |
508 val univ_card = Int.max (univ_card nat_card int_card main_j0 |
513 val univ_card = Int.max (univ_card nat_card int_card main_j0 |
509 (plain_bounds @ sel_bounds) formula, |
514 (plain_bounds @ sel_bounds) formula, |
510 main_j0 |> bits > 0 ? Integer.add (bits + 1)) |
515 main_j0 |> bits > 0 ? Integer.add (bits + 1)) |
511 val built_in_bounds = bounds_for_built_in_rels_in_formula debug |
516 val built_in_bounds = bounds_for_built_in_rels_in_formula debug ofs |
512 univ_card nat_card int_card main_j0 formula |
517 univ_card nat_card int_card main_j0 formula |
513 val bounds = built_in_bounds @ plain_bounds @ sel_bounds |
518 val bounds = built_in_bounds @ plain_bounds @ sel_bounds |
514 |> not debug ? merge_bounds |
519 |> not debug ? merge_bounds |
515 val highest_arity = |
520 val highest_arity = |
516 fold Integer.max (map (fst o fst) (maps fst bounds)) 0 |
521 fold Integer.max (map (fst o fst) (maps fst bounds)) 0 |