Documentation
smtml lib
Smtml
. Ty
Module
Type Module. This module defines types and operations for working with SMT types, including unary, binary, relational, ternary, conversion, and n-ary operations. It also provides utilities for type comparison, pretty-printing, and parsing.
type _ cast =
| C8 : int cast
Cast to an 8-bit integer.
| C32 : int32 cast
Cast to a 32-bit integer.
| C64 : int64 cast
Cast to a 64-bit integer.
The type _ cast
represents type casts for integers of different bit widths.
Type Definitionstype t =
| Ty_app
| Ty_bitv of int
Bitvector type with a specified bit width.
| Ty_bool
| Ty_fp of int
Floating-point type with a specified bit width.
| Ty_int
| Ty_list
| Ty_none
| Ty_real
| Ty_str
| Ty_unit
| Ty_regexp
The type t
represents smtml types.
Type Comparisonval compare : t -> t -> int
compare t1 t2
performs a total order comparison of types t1
and t2
.
val equal : t -> t -> bool
equal t1 t2
checks if types t1
and t2
are equal.
Pretty Printingpp fmt t
pretty-prints the type t
using the formatter fmt
.
String Conversionval string_of_type : t -> string
string_of_type t
converts the type t
to a string representation.
of_string s
attempts to parse the string s
into a type. Returns Ok t
if successful, or an error message otherwise.
Type Sizesize t
returns the size (in bits) of the type t
, if applicable.
Unary Operationsmodule Unop : sig ... end
Binary Operationsmodule Binop : sig ... end
Relational Operationsmodule Relop : sig ... end
Ternary Operationsmodule Triop : sig ... end
Conversion Operationsmodule Cvtop : sig ... end
N-ary Operations