Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Hichem R. A. <[email protected]>
  • Loading branch information
bclement-ocp and hra687261 committed Nov 30, 2023
1 parent 40f489b commit c9aa00f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/lib/reasoners/bitlist.mli
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ val num_unknown : t -> int
(** [num_unknown b] returns the number of bits unknown in [b]. *)

val is_fully_known : t -> bool
(** [is_fully_known b] determines there are unknown bits in [b] or not.
(** [is_fully_known b] determines if there are unknown bits in [b] or not.
[is_fully_known b] is [true] iff [num_unknown b] is [0]. *)

val value : t -> Z.t
Expand Down
4 changes: 2 additions & 2 deletions src/lib/reasoners/bitv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,13 @@ let extract_st i j { bv; sz } =
| Ext (r, sz, k, _) ->
[{ bv = Ext (r, sz, i + k, j + k) ; sz = j - i + 1 }]

(* extract i..j from a composition of size size
(* extract [i..j] from a composition of size [size]
an element of size [sz] at the head of the composition contains the bits
[size - 1 .. size - sz] inclusive *)
let rec extract size i j = function
| [] ->
(* We can't extract a bv of length 0! *)
(* We can't extract from a bv of length 0! *)
assert false
| [ st ] ->
assert (st.sz = size);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/reasoners/bitv.mli
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type 'a simple_term = ('a simple_term_aux) alpha_term

type 'a abstract = 'a simple_term list

(** [extract size i j x] extracts [i..=j] from a composition of size [size].
(** [extract size i j x] extracts [i..j] from a composition of size [size].
An element of size [sz] at the head of the composition contains the bits
[size - 1 .. size - sz] inclusive. *)
Expand Down
16 changes: 8 additions & 8 deletions src/lib/reasoners/bitv_rel.ml
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ module MX = Shostak.MXH

module Domains : sig
type t
(** The type of domain maps. A domain map maps each representatives (semantic
values, of type [X.r]) to their associated domains.
(** The type of domain maps. A domain map maps each representative (semantic
value, of type [X.r]) to its associated domain.
The keys of the domain maps are expected to be current *class
representatives*, i.e. normal forms wrt the `Uf` module, in which case we
say the domain map is *normalized*. Use `subst` to ensure that domain maps
stay normalized. *)
representatives*, i.e. normal forms wrt to the `Uf` module, in which
case we say the domain map is *normalized*. Use `subst` to ensure that
domain maps stay normalized. *)

val pp : t Fmt.t
(** Pretty-printer for domain maps. *)
Expand Down Expand Up @@ -495,7 +495,7 @@ end = struct

type t = {
cs_set : CS.t ;
(*** All the contraints currently active *)
(*** All the constraints currently active *)
cs_map : CS.t MX.t ;
(*** Mapping from semantic values to the constraints that involves them *)
fresh : CS.t ;
Expand Down Expand Up @@ -663,7 +663,7 @@ let add_eqs =
- The constraints that were never propagated since they were added (this
includes constraints that changed due to substitutions)
- The contraints involving variables whose domain changed since the last
- The constraints involving variables whose domain changed since the last
propagation *)
let propagate =
let rec propagate changed bcs dom =
Expand Down Expand Up @@ -748,7 +748,7 @@ let assume env uf la =
"bitlist domain: @[%a@]" Domains.pp domain;
Printer.print_dbg
~module_name:"Bitv_rel" ~function_name:"assume"
"bitlist contraints: @[%a@]" Constraints.pp constraints;
"bitlist constraints: @[%a@]" Constraints.pp constraints;
);
(congruence, domain, constraints, eqs, size_splits)
with Bitlist.Inconsistent ex ->
Expand Down
2 changes: 1 addition & 1 deletion src/lib/reasoners/rel_utils.ml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ module Congruence : sig
semantic value prior to calling [remove], or [Invalid_argument] will be
raised.
Raised [Invalid_argument] if [r] is not a registered semantic value. *)
@raise [Invalid_argument] if [r] is not a registered semantic value. *)

val subst : X.r -> X.r -> t -> (X.r -> X.r -> 'a -> 'a) -> 'a -> t * 'a
(** [subst p v t f x] performs a local congruence closure of the
Expand Down

0 comments on commit c9aa00f

Please sign in to comment.