Module SMT.Model

type term := t

Model is represented as mapping from variables to constants.

include Datatype_sig.MONO_MAP with type key := Variable.t and type data := Constant.t
type t
include Datatype_sig.PRINTABLE with type t := t
include Datatype_sig.SHOW with type t := t

Lists of printable values

Copy-pasted signature of classic polymorphic map

val empty : t
val is_empty : t -> bool
val add : Variable.t -> Constant.t -> t -> t
val mem : Variable.t -> t -> bool
val find : Variable.t -> t -> Constant.t
val iter : (Variable.t -> Constant.t -> unit) -> t -> unit
val fold : (Variable.t -> Constant.t -> 'acc -> 'acc) -> t -> 'acc -> 'acc
val union : (Variable.t -> Constant.t -> Constant.t -> Constant.t option) -> t -> t -> t
val bindings : t -> (Variable.t * Constant.t) list
val cardinal : t -> int
val choose : t -> Variable.t * Constant.t
val filter : (Variable.t -> Constant.t -> bool) -> t -> t

Additional functions

val keys : t -> Variable.t list
val values : t -> Constant.t list
val of_list : (Variable.t * Constant.t) list -> t
val find_pred : (Variable.t -> bool) -> t -> Variable.t
val show_custom : (Variable.t -> string) -> (Constant.t -> string) -> t -> string
include Datatype_sig.PRINTABLE with type t := t
include Datatype_sig.SHOW with type t := t
val show : t -> string

String representation of type t

val pp : Stdlib.Format.formatter -> t -> unit

Output to formatter

val print : ?prefix:string -> t -> unit

Output to stdout.

val show_option : t option -> string
val print_option : ?prefix:string -> t option -> unit
val dump : string -> t -> unit

Dump to file given by filename

Lists of printable values

val show_list : ?separator:string -> t list -> string
val pp_list : Stdlib.Format.formatter -> t list -> unit
val print_list : ?separator:string -> ?prefix:string -> t list -> unit
val eval : t -> term -> Constant.t

Evaluation of term in model.

val check : t -> term -> bool

Check whether boolean term holds in model.

val show_with_sorts : t -> string