Sorts

stp_sort stp_mk_bool_sort(stp_tm)

Names supplied to stp_tm_declare_sort, stp_declare and stp_tm_bind_symbol, and prefixes supplied to stp_mk_fresh_sort and stp_mk_fresh, must be representable as SMT-LIB quoted symbols: no ‘|’, backslash, DEL, or ASCII control characters other than tab, newline and carriage return. Spaces and non-ASCII bytes (including UTF-8) are allowed; printing quotes where needed. Leading ‘@’ and ‘.’ are reserved for solver use. Violations are INVALID_ARGUMENT before any name is recorded. Names must be nonempty; fresh-name prefixes may be empty. As with all C strings, the first NUL terminates the name or prefix.

stp_sort stp_mk_bv_sort(stp_tm, uint32_t width)

INVALID_ARGUMENT if width == 0

stp_sort stp_mk_fp_sort(stp_tm, uint32_t exp_size, uint32_t sig_size)

each >= 2

stp_sort stp_mk_fp16_sort(stp_tm)
stp_sort stp_mk_fp32_sort(stp_tm)
stp_sort stp_mk_fp64_sort(stp_tm)
stp_sort stp_mk_fp128_sort(stp_tm)
stp_sort stp_mk_rm_sort(stp_tm)
stp_sort stp_mk_real_sort(stp_tm)
stp_sort stp_mk_array_sort(stp_tm, stp_sort index, stp_sort element)

UNSUPPORTED for combinations the engine lacks

stp_sort stp_mk_fun_sort(stp_tm, size_t arity, const stp_sort *domain, stp_sort codomain)
stp_sort stp_tm_declare_sort(stp_tm, const char *name)

a named uninterpreted sort, keyed by name; INVALID_ARGUMENT for a sort SMT-LIB predefines (Bool, Real, …)

stp_sort stp_mk_fresh_sort(stp_tm, const char *prefix)

anonymous; printed as prefix!k; NULL prefix means “”

stp_sort stp_sort_copy(stp_sort)

the same handle

void stp_sort_release(stp_sort)

a no-op: sorts are pooled by the manager

stp_status stp_sort_get_kind(stp_sort, stp_sort_kind *out)
stp_status stp_sort_bv_size(stp_sort, uint32_t *out)

INVALID_ARGUMENT unless a BV sort

stp_status stp_sort_fp_exp_size(stp_sort, uint32_t *out)

INVALID_ARGUMENT unless an FP sort

stp_status stp_sort_fp_sig_size(stp_sort, uint32_t *out)

includes the hidden bit

stp_sort stp_sort_array_index(stp_sort)
stp_sort stp_sort_array_element(stp_sort)
stp_status stp_sort_fun_arity(stp_sort, uint32_t *out)
stp_sort stp_sort_fun_domain(stp_sort, uint32_t i)
stp_sort stp_sort_fun_codomain(stp_sort)
char *stp_sort_name(stp_sort)

uninterpreted sorts only

uint64_t stp_sort_id(stp_sort)

manager-unique; 0 for NULL

char *stp_sort_str(stp_sort)

SMT-LIB 2

stp_tm stp_sort_manager(stp_sort)

+1 handle