mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-07 11:45:41 -05:00
feat(smt): ability for a theory to declare we're in incomplete fragment
This commit is contained in:
parent
af8ab338e6
commit
f7195bf980
2 changed files with 13 additions and 0 deletions
|
|
@ -990,6 +990,11 @@ module type SOLVER_INTERNAL = sig
|
|||
is given the whole trail.
|
||||
*)
|
||||
|
||||
val declare_pb_is_incomplete : t -> unit
|
||||
(** Declare that, in some theory, the problem is outside the logic fragment
|
||||
that is decidable (e.g. if we meet proper NIA formulas).
|
||||
The solver will not reply "SAT" from now on. *)
|
||||
|
||||
(** {3 Model production} *)
|
||||
|
||||
type model_hook =
|
||||
|
|
|
|||
|
|
@ -262,6 +262,7 @@ module Make(A : ARG)
|
|||
mutable on_partial_check: (t -> theory_actions -> lit Iter.t -> unit) list;
|
||||
mutable on_final_check: (t -> theory_actions -> lit Iter.t -> unit) list;
|
||||
mutable level: int;
|
||||
mutable complete: bool;
|
||||
}
|
||||
|
||||
and preprocess_hook =
|
||||
|
|
@ -633,6 +634,12 @@ module Make(A : ARG)
|
|||
let[@inline] final_check (self:t) (acts:_ Sidekick_sat.acts) : unit =
|
||||
check_ ~final:true self acts
|
||||
|
||||
let declare_pb_is_incomplete self =
|
||||
if self.complete then (
|
||||
Log.debug 1 "(solver.declare-pb-is-incomplete)";
|
||||
);
|
||||
self.complete <- false
|
||||
|
||||
let create ~stat ~proof (tst:Term.store) (ty_st:Ty.store) () : t =
|
||||
let rec self = {
|
||||
tst;
|
||||
|
|
@ -658,6 +665,7 @@ module Make(A : ARG)
|
|||
on_partial_check=[];
|
||||
on_final_check=[];
|
||||
level=0;
|
||||
complete=true;
|
||||
} in
|
||||
ignore (Lazy.force @@ self.cc : CC.t);
|
||||
self
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue