Module Type
Types of terms
A type has to be hash-consed to be used in hash-consed terms.
- author
- Christoph Sticksel, Arjun Viswanathan
Types and hash-consing
Hashtables, maps and sets
val hash_type : t -> intHashing function on types
module TypeHashtbl : Stdlib.Hashtbl.S with type TypeHashtbl.key = tHash table over types
Constructor
val mk_bool : unit -> tReturn the boolean type
val mk_int : unit -> tReturn the integer type
val mk_real : unit -> tReturn the real decimal type
val mk_ubv : int -> tReturn the unsigned bitvector type
val mk_bv : int -> tReturn the bitvector type
val mk_abstr : string -> tReturn an abstract type
val mk_enum : string option -> string list -> tReturn an enumerated datatype type
val t_bool : tThe boolean type
val t_int : tThe integer type
val t_real : tThe real decimal type
val t_ubv : int -> tThe unsigned bitvector type
val t_bv : int -> tThe bitvector type
Type checking
Predicates
val is_bool : t -> boolReturn
trueif the type is the Boolean type
val is_int : t -> boolReturn
trueif the type is the integer type
val is_ubitvector : t -> boolReturn
trueif the type is an unsigned bitvector (integern) type
val is_bitvector : t -> boolReturn
trueif the type is a bitvector (integern) type
val bitvectorsize : t -> intReturn
trueif the type is a bitvector (integern) type
val is_uint8 : t -> boolReturn
trueif the type is the unsigned integer8 type
val is_uint16 : t -> boolReturn
trueif the type is the unsigned integer16 type
val is_uint32 : t -> boolReturn
trueif the type is the unsigned integer32 type
val is_uint64 : t -> boolReturn
trueif the type is the unsigned integer64 type
val is_int8 : t -> boolReturn
trueif the type is the integer8 type
val is_int16 : t -> boolReturn
trueif the type is the integer16 type
val is_int32 : t -> boolReturn
trueif the type is the integer32 type
val is_int64 : t -> boolReturn
trueif the type is the integer64 type
val is_int_range : t -> boolReturn
trueif the type is an integer range type
val is_enum : t -> boolReturn
trueif the type is an integer range type
val is_real : t -> boolReturn
trueif the type is the real type
val is_array : t -> boolReturn
trueif the type is an array type
val is_abstr : t -> boolReturn
trueif the type is abstract
Ranges
Arrays
Enumerated datatypes
val constructors_of_enum : t -> string listReturn constructors of an enumerated datatype
val name_of_enum : t -> string optionReturn the name of an enumerated datatype encoded as int ranges
val get_constr_of_num : Numeral.t -> stringReturn the constructor encoded by the numeral argument
val get_all_abstr_types : unit -> t listReturn abstract types that have been built
val get_num_of_constr : string -> Numeral.tReturn the numeral encoding of a construcor of an enumerated datatype
val enum_of_constr : string -> tReturn the enumerated dataype to which the constructor belongs
Pretty-printing
val pp_print_type_node : Stdlib.Format.formatter -> kindtype -> unitPretty-print a type
val pp_print_type : Stdlib.Format.formatter -> t -> unitPretty-print a type
val print_type : t -> unitPretty-print a type to the standard formatter
val string_of_type : t -> stringReturn a string representation of a type
Pretty-printing for debugging - differentiates UBV and BV
val pp_print_type_node_debug : Stdlib.Format.formatter -> kindtype -> unitPretty-print a type
val pp_print_type_debug : Stdlib.Format.formatter -> t -> unitPretty-print a type
val print_type_debug : t -> unitPretty-print a type to the standard formatter
val string_of_type_debug : t -> stringReturn a string representation of a type