mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-10 05:03:59 -05:00
refactor: change signature of CC.Theory.on_new_term
This commit is contained in:
parent
314bd7f8b2
commit
cb0b5cbcbd
3 changed files with 4 additions and 4 deletions
|
|
@ -305,7 +305,7 @@ module Make(A: ARG) = struct
|
||||||
val key_id : int
|
val key_id : int
|
||||||
val key : (term,lit,data) Key.t
|
val key : (term,lit,data) Key.t
|
||||||
val on_merge : cc -> N.t -> data -> N.t -> data -> Expl.t -> unit
|
val on_merge : cc -> N.t -> data -> N.t -> data -> Expl.t -> unit
|
||||||
val on_new_term: cc -> term -> data option
|
val on_new_term: cc -> N.t -> term -> data option
|
||||||
end
|
end
|
||||||
|
|
||||||
type t = {
|
type t = {
|
||||||
|
|
@ -600,7 +600,7 @@ module Make(A: ARG) = struct
|
||||||
let th_map =
|
let th_map =
|
||||||
IM.fold
|
IM.fold
|
||||||
(fun _ (module Th: THEORY with type cc=cc) th_map ->
|
(fun _ (module Th: THEORY with type cc=cc) th_map ->
|
||||||
match Th.on_new_term cc t with
|
match Th.on_new_term cc n t with
|
||||||
| None -> th_map
|
| None -> th_map
|
||||||
| Some v -> K_map.add Th.key v th_map)
|
| Some v -> K_map.add Th.key v th_map)
|
||||||
cc.theories K_map.empty
|
cc.theories K_map.empty
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ module type S = sig
|
||||||
val make :
|
val make :
|
||||||
key:'a key ->
|
key:'a key ->
|
||||||
on_merge:(cc -> N.t -> 'a -> N.t -> 'a -> Expl.t -> unit) ->
|
on_merge:(cc -> N.t -> 'a -> N.t -> 'a -> Expl.t -> unit) ->
|
||||||
on_new_term:(cc -> term -> 'a option) ->
|
on_new_term:(cc -> N.t -> term -> 'a option) ->
|
||||||
unit ->
|
unit ->
|
||||||
t
|
t
|
||||||
(** Build a micro theory. It can use the callbacks above. *)
|
(** Build a micro theory. It can use the callbacks above. *)
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ module Make(A : ARG with type Lit.t = Sidekick_smt.Lit.t
|
||||||
()
|
()
|
||||||
with E_exit -> ()
|
with E_exit -> ()
|
||||||
|
|
||||||
let on_new_term _ _ = None
|
let on_new_term _ _ _ = None
|
||||||
|
|
||||||
let th =
|
let th =
|
||||||
CC.Theory.make ~key ~on_merge ~on_new_term ()
|
CC.Theory.make ~key ~on_merge ~on_new_term ()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue