module Cc_core:Congruence-closure solver for EUF.sig
..end
type
solver
val new_solver : unit -> solver
let s = new_solver ()
Cc_core.decision_level
s = 0
not (
Cc_core.conflict_detected
s)
not (
Cc_core.get_literal_possible
s)
not (
Cc_core.inference_possible
s)
val fresh_variable : solver -> Cc_literal.Variable.t
val proxy_app : solver ->
Cc_literal.Variable.t -> Cc_literal.Variable.t -> Cc_literal.Variable.t
proxy_app s f x
returns a proxy y
for the application
of f
to x
.
not (
Cc_core.conflict_detected
s)
not (
Cc_core.conflict_detected
s)
val proxy_u : solver ->
Cc_literal.Variable.t ->
Cc_literal.Variable.t -> Cc_literal.Variable.t -> Cc_literal.Variable.t
proxy_u s a i x
returns a proxy b
for the update of a
at
i
with x
.
not (
Cc_core.conflict_detected
s)
not (
Cc_core.conflict_detected
s)
val proxy_k : solver -> Cc_literal.Variable.t -> Cc_literal.Variable.t
proxy_k s x
returns a proxy a
for the constant function
evaluating to x
.
not (
Cc_core.conflict_detected
s)
not (
Cc_core.conflict_detected
s)
val add_interface_literal : solver -> Cc_literal.Variable.t * Cc_literal.Variable.t -> unit
add_interface_literal s (x, y)
records an interest in the
literals x = y
and x != y
. Only interface literals are
available via Cc_core.get_literal
.
not (
Cc_core.conflict_detected
s)
not (
Cc_core.conflict_detected
s)
val decision_level : solver -> int
0 <= decision_level s
val inference_possible : solver -> bool
val conflict_detected : solver -> bool
val is_true : solver -> Cc_literal.literal -> bool
val is_inferred : solver -> Cc_literal.literal -> bool
val infer : solver -> unit
not (
Cc_core.conflict_detected
s)
Cc_core.inference_possible
s
val final_check : solver -> unit
not (
Cc_core.conflict_detected
s)
not (
Cc_core.inference_possible
s)
not (
Cc_core.get_literal_possible
s)
not (
Cc_core.get_lemma_possible
s)
val set_literal : solver -> Cc_literal.literal -> unit
val get_literal_possible : solver -> bool
val get_literal : solver -> Cc_literal.literal
Cc_core.get_literal_possible
s
Cc_core.is_true
s l
val get_lemma_possible : solver -> bool
val get_lemma : solver -> Cc_literal.lemma
val literal_explanation : solver -> Cc_literal.literal -> Cc_literal.literal list
let cls = literal_explanation l s in
Cc_core.is_inferred
s l
List.for_all
(fun m -> m = l ||
Cc_core.is_true
s (
Cc_literal.negation
m)) cls
List.mem l cls
List.length cls >= 2
val increment_level : solver -> unit
not (
Cc_core.conflict_detected
s)
not (
Cc_core.inference_possible
s)
not (
Cc_core.get_literal_possible
s)
not (
Cc_core.conflict_detected
s)
not (
Cc_core.inference_possible
s)
not (
Cc_core.get_literal_possible
s)
Cc_core.decision_level
s > 0
val backjump : solver -> int -> unit
For backjump s k
:
0 <= k && k <
Cc_core.decision_level
s
k =
Cc_core.decision_level
s
not (
Cc_core.conflict_detected
s)
not (
Cc_core.inference_possible
s)
val restart : solver -> unit
not (
Cc_core.conflict_detected
s)
not (
Cc_core.conflict_detected
s)
Cc_core.decision_level
s = 0
val conflict_clause : solver -> Cc_literal.literal list
let cls = conflict_clause s in
Cc_core.conflict_detected
s
List.for_all (fun l -> is_true s (Cc_literal.negation l)) cls
cls != []