mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-06 11:15:43 -05:00
feat(cdsat): decide new variables
This commit is contained in:
parent
3412b272fb
commit
f2a7489d39
2 changed files with 15 additions and 9 deletions
|
|
@ -187,8 +187,21 @@ let pop_levels (self : t) n : unit =
|
|||
|
||||
let[@inline] get_term_to_var self = self.term_to_var
|
||||
|
||||
let[@inline] term_to_var self t : TVar.t =
|
||||
Term_to_var.convert self.term_to_var t
|
||||
let term_to_var self t : TVar.t =
|
||||
(* TODO: simplify [t] *)
|
||||
let v = Term_to_var.convert self.term_to_var t in
|
||||
|
||||
(* add new variables to vars_to_decide *)
|
||||
while
|
||||
match TVar.pop_new_var self.vst with
|
||||
| None -> false
|
||||
| Some v ->
|
||||
Vars_to_decide.add self.vars_to_decide v;
|
||||
true
|
||||
do
|
||||
()
|
||||
done;
|
||||
v
|
||||
|
||||
let add_term_to_var_hook self h = Term_to_var.add_hook self.term_to_var h
|
||||
|
||||
|
|
|
|||
|
|
@ -41,13 +41,6 @@ let[@inline] vst self = self.vst
|
|||
|
||||
let add_ty (_self : t) ~ty:_ : unit = ()
|
||||
|
||||
(* TODO:
|
||||
when asserting [t], we convert it into [v].
|
||||
At that point we need to add [v] and its sub-variables (recursively)
|
||||
to the [Core.t], so it can itself add them to [Vars_to_decide.t].
|
||||
|
||||
Sub-variables of asserted terms are what needs to be decided. *)
|
||||
|
||||
let assert_term_ (self : t) (t : Term.t) pr : unit =
|
||||
Log.debugf 50 (fun k -> k "(@[cdsat.core.assert@ %a@])" Term.pp t);
|
||||
let sign, t = Term.abs self.tst t in
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue