fix(th-data): need to propagate from is-a eagerly

the final check is too late: we need the info from `is_a c t` to be
fully propagated in the CC before we can run the acyclicity check.
This commit is contained in:
Simon Cruanes 2022-08-19 21:31:27 -04:00
parent 177cd70fac
commit 5fa5fb5bd7
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -715,14 +715,17 @@ end = struct
SI.add_clause_permanent solver acts [ Lit.neg l1; Lit.neg l2 ] pr) SI.add_clause_permanent solver acts [ Lit.neg l1; Lit.neg l2 ] pr)
) )
let on_partial_check self solver acts trail =
Profile.with_ "data.partial-check" @@ fun () ->
check_is_a self solver acts trail;
()
(* on final check, check acyclicity, (* on final check, check acyclicity,
then make sure we have done case split on all terms that then make sure we have done case split on all terms that
need it. *) need it. *)
let on_final_check (self : t) (solver : SI.t) (acts : SI.theory_actions) trail let on_final_check (self : t) (solver : SI.t) (acts : SI.theory_actions)
= _trail =
Profile.with_ "data.final-check" @@ fun () -> Profile.with_ "data.final-check" @@ fun () ->
check_is_a self solver acts trail;
(* acyclicity check first *) (* acyclicity check first *)
Acyclicity_.check self solver acts; Acyclicity_.check self solver acts;
@ -798,6 +801,7 @@ end = struct
SI.on_cc_new_term solver (on_new_term self); SI.on_cc_new_term solver (on_new_term self);
(* note: this needs to happen before we modify the plugin data *) (* note: this needs to happen before we modify the plugin data *)
SI.on_cc_pre_merge solver (on_pre_merge self); SI.on_cc_pre_merge solver (on_pre_merge self);
SI.on_partial_check solver (on_partial_check self);
SI.on_final_check solver (on_final_check self); SI.on_final_check solver (on_final_check self);
SI.on_model solver ~ask:(on_model_gen self); SI.on_model solver ~ask:(on_model_gen self);
self self