Sidekick_base.Tyinclude module type of struct include Types_.Term endinclude module type of struct include Sidekick_core_logic.Term endtype store = Sidekick_core.Term.storeThe store for terms.
The store is responsible for allocating unique IDs to terms, and enforcing their hashconsing (so that syntactic equality is just a pointer comparison).
View.
A view is the shape of the root node of a term.
include Sidekick_sigs.EQ_ORD_HASH
with type t := Sidekick_core_logic__Types_.terminclude Sidekick_sigs.EQ with type t := Sidekick_core_logic__Types_.terminclude Sidekick_sigs.ORD with type t := Sidekick_core_logic__Types_.terminclude Sidekick_sigs.HASH with type t := Sidekick_core_logic__Types_.terminclude Sidekick_sigs.WITH_SET_MAP_TBL
with type t := Sidekick_core_logic__Types_.termmodule Set = Sidekick_core.Term.Setmodule Map = Sidekick_core.Term.Mapmodule Tbl = Sidekick_core.Term.Tblval view : Sidekick_core_logic__Types_.term -> viewval iter_dag :
?seen:unit Tbl.t ->
iter_ty:bool ->
f:( Sidekick_core_logic__Types_.term -> unit ) ->
Sidekick_core_logic__Types_.term ->
unititer_dag t ~f calls f once on each subterm of t, t included. It must not traverse t as a tree, but rather as a perfectly shared DAG.
For example, in:
let x = 2 in
let y = f x x in
let z = g y x in
z = zthe DAG has the following nodes:
n1: 2
n2: f n1 n1
n3: g n2 n1
n4: = n3 n3val iter_shallow :
f:( bool -> Sidekick_core_logic__Types_.term -> unit ) ->
Sidekick_core_logic__Types_.term ->
unititer_shallow f e iterates on immediate subterms of e, calling f trdb e' for each subterm e', with trdb = true iff e' is directly under a binder.
val map_shallow :
store ->
f:
( bool ->
Sidekick_core_logic__Types_.term ->
Sidekick_core_logic__Types_.term ) ->
Sidekick_core_logic__Types_.term ->
Sidekick_core_logic__Types_.termval free_vars_iter : Sidekick_core_logic__Types_.term -> var Iter.tIs the term closed (all bound variables are paired with a binder)? time: O(1)
Does the term contain free variables? time: O(1)
Return the type of this term.
module Store = Sidekick_core.Term.Storeval type_ : store -> Sidekick_core_logic__Types_.termval type_of_univ : store -> int -> Sidekick_core_logic__Types_.termval var_str :
store ->
string ->
ty:Sidekick_core_logic__Types_.term ->
Sidekick_core_logic__Types_.termval bvar_i :
store ->
int ->
ty:Sidekick_core_logic__Types_.term ->
Sidekick_core_logic__Types_.termval const :
store ->
Sidekick_core_logic__Types_.const ->
Sidekick_core_logic__Types_.termval app :
store ->
Sidekick_core_logic__Types_.term ->
Sidekick_core_logic__Types_.term ->
Sidekick_core_logic__Types_.termval app_l :
store ->
Sidekick_core_logic__Types_.term ->
Sidekick_core_logic__Types_.term list ->
Sidekick_core_logic__Types_.termval app_fold :
store ->
f:Sidekick_core_logic__Types_.term ->
acc0:Sidekick_core_logic__Types_.term ->
Sidekick_core_logic__Types_.term list ->
Sidekick_core_logic__Types_.termval arrow :
store ->
Sidekick_core_logic__Types_.term ->
Sidekick_core_logic__Types_.term ->
Sidekick_core_logic__Types_.termval arrow_l :
store ->
Sidekick_core_logic__Types_.term list ->
Sidekick_core_logic__Types_.term ->
Sidekick_core_logic__Types_.termmodule DB = Sidekick_core.Term.DBDe bruijn indices
include module type of struct include Sidekick_core_logic.T_builtins endval c_not : Sidekick_core_logic.Term.store -> Sidekick_core_logic.Term.tval c_eq : Sidekick_core_logic.Term.store -> Sidekick_core_logic.Term.tval c_ite : Sidekick_core_logic.Term.store -> Sidekick_core_logic.Term.tval true_ : Sidekick_core_logic.Term.store -> Sidekick_core_logic.Term.tval false_ : Sidekick_core_logic.Term.store -> Sidekick_core_logic.Term.tval bool_val :
Sidekick_core_logic.Term.store ->
bool ->
Sidekick_core_logic.Term.tval eq :
Sidekick_core_logic.Term.store ->
Sidekick_core_logic.Term.t ->
Sidekick_core_logic.Term.t ->
Sidekick_core_logic.Term.teq a b is a = b
val ite :
Sidekick_core_logic.Term.store ->
Sidekick_core_logic.Term.t ->
Sidekick_core_logic.Term.t ->
Sidekick_core_logic.Term.t ->
Sidekick_core_logic.Term.tite a b c is if a then b else c
val is_eq : Sidekick_core_logic.Term.t -> boolval is_bool : Sidekick_core_logic.Term.t -> boolval abs :
Sidekick_core_logic.Term.store ->
Sidekick_core_logic.Term.t ->
bool * Sidekick_core_logic.Term.tabs t returns an "absolute value" for the term, along with the sign of t.
The idea is that we want to turn not a into (false, a), or (a != b) into (false, a=b). For terms without a negation this should return (true, t).
val as_bool_val : Sidekick_core_logic.Term.t -> bool optiontype term = Sidekick_core_logic.Term.tPrinting hook, responsible for printing certain subterms
module Hooks = Sidekick_core.Term.Hooksval default_hooks : Hooks.t Stdlib.reftype t = Types_.tytype data = Types_.datainclude Sidekick_sigs.EQ_ORD_HASH_PRINT with type t := tinclude Sidekick_sigs.EQ with type t := tinclude Sidekick_sigs.ORD with type t := tinclude Sidekick_sigs.HASH with type t := tval hash : t -> intinclude Sidekick_sigs.PRINT with type t := tval pp : t Sidekick_sigs.printerval is_uninterpreted : t -> boolval is_real : t -> boolval is_int : t -> bool