Skip to content

Commit fb2552c

Browse files
committed
Rebase artefacts
1 parent 0d4d98e commit fb2552c

2 files changed

Lines changed: 107 additions & 109 deletions

File tree

src/lib/reasoners/sat_solver_util.ml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ let get_value (type a) (module SAT : S with type t = a) env l =
153153
If we don't find the model term for an expression of [l], we assert a
154154
new equation to force the solver to produce a model term for this
155155
expression. *)
156-
let res =
157-
List.partition_map
156+
let l =
157+
List.map
158158
(fun e ->
159159
match get_value_in_model (module SAT) env mdl e with
160160
| Some v -> Either.Left v
@@ -186,22 +186,18 @@ let get_value (type a) (module SAT : S with type t = a) env l =
186186
let* mdl = SAT.get_model env in
187187
let values =
188188
List.map
189-
(fun (v, name) ->
190-
match v, name with
191-
| Some v, None -> v
192-
| None, Some name ->
193-
begin match get_value_in_model (module SAT) env mdl name with
194-
| Some v -> v
195-
| None ->
196-
(* The model generation has to produce a value for each
197-
declared names. If some declared names are missing in the
198-
model, it's a bug. *)
199-
assert false
200-
end
201-
| _ ->
202-
(* This case is excluded by the construction of the list [res]. *)
203-
assert false
204-
) res
189+
(fun v ->
190+
match v with
191+
| Either.Left v -> v
192+
| Either.Right name ->
193+
match get_value_in_model (module SAT) env mdl name with
194+
| Some v -> v
195+
| None ->
196+
(* The model generation has to produce a value for each
197+
declared names. If some declared names are missing in the
198+
model, it's a bug. *)
199+
assert false
200+
) l
205201
in
206202
Some values
207203
with Unsat ex -> raise_notrace (Wrong_model ex)

0 commit comments

Comments
 (0)