let add (problem_literals: problem_literals)
(context_element: Context.element) (candidate_type: Context_unifier.candidate_type) : unit =
match candidate_type with
| Context_unifier.Assert
| Context_unifier.Split ->
failwith "Problem_literals.add"
| Context_unifier.Close
| Context_unifier.CloseAssert
| Context_unifier.All ->
subsume problem_literals context_element;
let unifying_candidates =
let index =
problem_literals.index#find (Term.request_negated_literal ~insert_db:false context_element.Context.el_literal)
in
index#find_all_unifiable_subst ~p_preserving:false context_element.Context.el_literal.Term.atom
in
ignore (
List.fold_left
(fun close_found (problem_literal, subst) ->
add_to_problem_literal
problem_literals
problem_literal
context_element
candidate_type
close_found
subst
)
false
unifying_candidates
: bool)