refactor: renaming `Eq{uiv,}_class

This commit is contained in:
Simon Cruanes 2019-02-08 19:45:20 -06:00
parent 0326c07c16
commit 40186a6c76
7 changed files with 9 additions and 9 deletions

View file

@ -1,7 +1,7 @@
open Solver_types open Solver_types
module N = Equiv_class module N = Eq_class
type node = N.t type node = N.t
type repr = N.t type repr = N.t

View file

@ -5,10 +5,10 @@ open Solver_types
type t type t
(** Global state of the congruence closure *) (** Global state of the congruence closure *)
type node = Equiv_class.t type node = Eq_class.t
(** Node in the congruence closure *) (** Node in the congruence closure *)
type repr = Equiv_class.t type repr = Eq_class.t
(** Node that is currently a representative *) (** Node that is currently a representative *)
type conflict = Theory.conflict type conflict = Theory.conflict

View file

@ -9,7 +9,7 @@ module Term = Term
module Value = Value module Value = Value
module Term_cell = Term_cell module Term_cell = Term_cell
module Ty = Ty module Ty = Ty
module Equiv_class = Equiv_class module Eq_class = Eq_class
module Lit = Lit module Lit = Lit
module Explanation = Explanation module Explanation = Explanation
module Congruence_closure = Congruence_closure module Congruence_closure = Congruence_closure

View file

@ -41,10 +41,10 @@ module type ACTIONS = sig
(** Add toplevel clause to the SAT solver. This clause will (** Add toplevel clause to the SAT solver. This clause will
not be backtracked. *) not be backtracked. *)
val find: Term.t -> Equiv_class.t val find: Term.t -> Eq_class.t
(** Find representative of this term *) (** Find representative of this term *)
val all_classes: Equiv_class.t Sequence.t val all_classes: Eq_class.t Sequence.t
(** All current equivalence classes (** All current equivalence classes
(caution: linear in the number of terms existing in the solver) *) (caution: linear in the number of terms existing in the solver) *)
end end
@ -60,7 +60,7 @@ module type S = sig
val create : Term.state -> t val create : Term.state -> t
(** Instantiate the theory's state *) (** Instantiate the theory's state *)
val on_merge: t -> actions -> Equiv_class.t -> Equiv_class.t -> Explanation.t -> unit val on_merge: t -> actions -> Eq_class.t -> Eq_class.t -> Explanation.t -> unit
(** Called when two classes are merged *) (** Called when two classes are merged *)
val partial_check : t -> actions -> Lit.t Sequence.t -> unit val partial_check : t -> actions -> Lit.t Sequence.t -> unit

View file

@ -28,7 +28,7 @@ type t = {
(** congruence closure *) (** congruence closure *)
mutable theories : theory_state list; mutable theories : theory_state list;
(** Set of theories *) (** Set of theories *)
new_merges: (Equiv_class.t * Equiv_class.t * explanation) Vec.t; new_merges: (Eq_class.t * Eq_class.t * explanation) Vec.t;
} }
let[@inline] cc (t:t) = Lazy.force t.cc let[@inline] cc (t:t) = Lazy.force t.cc
@ -86,7 +86,7 @@ let add_formula (self:t) (lit:Lit.t) =
let t = Lit.view lit in let t = Lit.view lit in
let lazy cc = self.cc in let lazy cc = self.cc in
let n = C_clos.add cc t in let n = C_clos.add cc t in
Equiv_class.set_field Equiv_class.field_is_literal true n; Eq_class.set_field Eq_class.field_is_literal true n;
() ()
(* propagation from the bool solver *) (* propagation from the bool solver *)