VarVariables in terms
A variable is an instance of a state variable (see StateVar) in a state relative to an initial state. A variable can also be a free variable that is to be bound in a let expression.
val hash_var : t -> intHashing function on variables
val mk_const_state_var : StateVar.t -> tReturn a constant state variable.
The state variable must be constant.
val mk_state_var_instance : StateVar.t -> Numeral.t -> tReturn an instance of a state variable.
The state variable may also be constant, in which case a variable created by mk_const_state_var is returned.
mk_binder_var t d is the variable standing for the variable of type t of a binder at binding depth d, used to open that binder. Memoized: the same t and d always give the same variable.
val is_binder_var : t -> boolReturn true if the variable was made by mk_binder_var, and so stands for the variable of an opened binder rather than for a variable of the term that binder occurs in.
val state_var_of_state_var_instance : t -> StateVar.tReturn the state variable of a state variable instance
val is_state_var_instance : t -> boolReturn true if the variable is an instance of a state variable
val is_const_state_var : t -> boolReturn true if the variable is a constant state variable
val is_free_var : t -> boolReturn true if the variable is a free variable
Return a new variable with the offset of the state variable instance incremented by the given value
bump_offset_of_state_var_instance v i returns a new variable, where the value i is added to the offset of the v if it is a state variable instance. The value i may be negative.
If v is a constant state variable or a free variable, it is returned unchanged.
Return a new variable with the offset of the state variable instance set to the given value
set_offset_of_state_var_instance v i returns a new variable, where the offset of the state variable v is set to i, if v is a state variable instance.
If v is a constant state variable or a free variable, it is returned unchanged.
val map_state_var : (StateVar.t -> StateVar.t) -> t -> tReturn a new variable with the state variable replaced
map_state_var v f returns a new variable where the state variable s is replaced by the result of the evaluation f s if v is a state variable instance or a constant state variable.
If v is a free variable, it is returned unchanged.
val pp_print_var : Stdlib.Format.formatter -> t -> unitPretty-print a hashconsed variable
val print_var : t -> unitPretty-print a hashconsed variable to the standard formatter
val string_of_var : t -> stringReturn a string representation of a hashconsed variable
Gets the state var instance associated with a constant unrolled uf. Throws Not_found if the uf is unknown.
val state_var_instance_of_uf_symbol : UfSymbol.t -> tGets the state var instance associated with a constant unrolled uf. Throws Not_found if the uf is unknown.
val unrolled_uf_of_state_var_instance : t -> UfSymbol.tval declare_constant_vars : (UfSymbol.t -> unit) -> t list -> unitDeclares constant variables as constant ufsymbols using the provided function.
val declare_vars : (UfSymbol.t -> unit) -> t list -> unitDeclares non constant variables as constant ufsymbols using the provided function.
val encode_select : t -> UfSymbol.tencode array select operation