mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-08 12:15:48 -05:00
37 lines
909 B
OCaml
37 lines
909 B
OCaml
(** Model Builder.
|
|
|
|
This contains a partial model, in construction. It is accessible to every
|
|
theory, so they can contribute partial values.
|
|
|
|
TODO: seen values?
|
|
*)
|
|
|
|
open Sidekick_core
|
|
open Sigs
|
|
|
|
type t
|
|
|
|
include Sidekick_sigs.PRINT with type t := t
|
|
|
|
val create : Term.store -> t
|
|
val mem : t -> Term.t -> bool
|
|
|
|
val require_eval : t -> Term.t -> unit
|
|
(** Require that this term gets a value. *)
|
|
|
|
val add : t -> ?subs:Term.t list -> Term.t -> value -> unit
|
|
(** Add a value to the model.
|
|
@param subs if provided, these terms will be passed to {!require_eval}
|
|
to ensure they map to a value. *)
|
|
|
|
val gensym : t -> pre:string -> ty:Term.t -> Term.t
|
|
(** New fresh constant *)
|
|
|
|
type eval_cache = Term.Internal_.cache
|
|
|
|
val eval : ?cache:eval_cache -> t -> Term.t -> value
|
|
|
|
val pop_required : t -> Term.t option
|
|
(** gives the next subterm that is required but has no value yet *)
|
|
|
|
val to_model : t -> Model.t
|