StateVarState variables
Every state variable is associated with an uninterpreted function symbol that is substituted for the state variable when creating expressions for the SMT solvers.
State variables do not occur directly in terms, but as instances in a particular state, see Var.
State variable
A state state variable is a pair of its identifier and its scope, which is a list of identifiers.
val hash_state_var : t -> intHashing function on state variables
module StateVarSet : sig ... endSet over state variables
val mk_state_var :
?is_input:bool ->
?is_const:bool ->
?for_inv_gen:bool ->
string ->
string list ->
Type.t ->
tmk_state_var n s t declares a state variable of name n with scope s, and type t. The optional labeled arguments ?is_input, ?is_const and ?for_inv_gen flag the variable as an input, as constant and as usable as a candidate for invariant generation, respectively. Their defaults are false, false and true.
Declaring a state variable again with the same signature is harmless and will simply return the previously declared state variable. However, re-declaring a state variable with a different signature will raise an Invalid_argument exception.
val modify_state_var :
?is_input:bool ->
?is_const:bool ->
?for_inv_gen:bool ->
?state_var_name:string ->
?state_var_scope:string list ->
?state_var_type:Type.t ->
t ->
tmodify_state_var s creates a copy of the state variable s, with the specified changes applied. The optional labeled arguments ?is_input, ?is_const, ?for_inv_gen, ?state_var_name, ?state_var_scope, and ?state_var_type specify the changes to be made. If left un-specified the previous value will be copied.
Re-declaring a state variable with a different signature will raise an Invalid_argument exception.
val mk_init_flag : string list -> tCreates a scoped init flag.
val mk_depth_input : string list -> tCreates a scoped depth input.
val mk_max_depth_input : string list -> tCreates a scoped depth input.
val uid : t -> intReturn a unique numerical identifier
val state_var_of_string : (string * string list) -> tReturn a previously declared state variable
val state_var_of_long_string : string -> tReturn a previously declared state variable from a string consisting of the concatenation of all scopes and the state variable. Raises Not_found if it was not previously declared.
val name_of_state_var : t -> stringReturn the name of the state variable
val scope_of_state_var : t -> string listReturn the scope of the state variable
val uf_symbol_of_state_var : t -> UfSymbol.tReturn the uninterpreted function symbol of the variable
val state_var_of_uf_symbol : UfSymbol.t -> tReturn the state variable corresponding to an uninterpreted function symbol
val is_input : t -> boolReturn true if the state variable is an input
val is_const : t -> boolReturn true if the state variable is constant
val set_const : bool -> t -> unitSet or unset flag that determines the state variable is constant
val for_inv_gen : t -> boolReturn true if state variable is to be used in invariant generation
val set_for_inv_gen : bool -> t -> unitSet or unset flag to use state variable in invariant generation
val fold : (t -> 'a -> 'a) -> 'a -> 'afold f a computes (f sN tN uN ... (f s2 t2 u2 (f s1 t1 u1 a))...), where sI, tI and uI, respectively are the name of the state variable, its types and its associated uninterpreted function symbol.
val iter : (t -> unit) -> unititer f calls f s t u for every state variable with s being the name of the variable, t its type and u its associated uninterpreted function symbol.
val encode_select : t -> UfSymbol.tencode array select operation. Encoding select funtion is done byt type (i.e. one select by array type). The select function performs all projections if the array is multidimensional. This means you should have something like (select_1 m 0 3) in case m is a matrix
val get_select_ufs : unit -> UfSymbol.t listReturn select function that were created
val pp_print_state_var : Stdlib.Format.formatter -> t -> unitPretty-print a state variable
val pp_print_state_var_debug : Stdlib.Format.formatter -> t -> unitval string_of_state_var : t -> stringReturn a string representation of a symbol