Terms¶
-
stp_status stp_term_release(stp_term)¶
STATE for a scoped handle (rule 3)
-
stp_status stp_term_get_kind(stp_term, stp_kind *out)¶
the public view; guaranteed under simplify = false only
-
stp_status stp_term_num_children(stp_term, size_t *out)¶
-
stp_status stp_term_num_indices(stp_term, size_t *out)¶
-
stp_status stp_term_index(stp_term, size_t i, uint32_t *out)¶
-
char *stp_term_to_string(stp_term, stp_format, bool share_subterms)¶
-
stp_term stp_tm_simplify(stp_tm, stp_term)¶
local rewrites only; touches no solver; an unspecified floating-point case (fp.min of +0 and -0, fp.to_ubv of NaN, …) stays as it is
-
stp_status stp_term_to_bool(stp_term, bool *out)¶
readers: NOT_A_VALUE unless the term is a value; SORT_MISMATCH on the wrong sort; DOES_NOT_FIT where stated
-
stp_status stp_term_to_uint64(stp_term, uint64_t *out)¶
-
stp_status stp_term_to_int64(stp_term, int64_t *out)¶
two’s complement of the width
-
stp_status stp_term_bv_num_limbs(stp_term, size_t *out)¶
ceil(width/64)
-
stp_status stp_term_to_bv_limbs(stp_term, size_t n, uint64_t *out_lsb_first)¶
caller buffer of n >= num_limbs
-
stp_status stp_term_to_bv_bytes(stp_term, size_t n, uint8_t *out, bool little_endian)¶
n >= ceil(width/8)
-
stp_status stp_term_to_fp(stp_term, stp_float_value *out)¶
-
stp_status stp_term_fp_significand_limbs(stp_term, size_t n, uint64_t *out_lsb_first)¶
the sig_size-1 trailing bits
-
stp_status stp_term_fp_to_double(stp_term, double *out)¶
DOES_NOT_FIT for formats wider than binary64
-
stp_status stp_term_fp_to_rational(stp_term, char **numerator, char **denominator)¶
finite values only (INVALID_ARGUMENT otherwise); two caller-owned strings
-
stp_status stp_term_to_rm(stp_term, stp_rm *out)¶
-
stp_status stp_term_real_to_int64(stp_term, int64_t *num, int64_t *den)¶
DOES_NOT_FIT
-
stp_status stp_term_real_to_double(stp_term, double *out)¶
nearest double
-
stp_status stp_term_to_uninterpreted_index(stp_term, uint64_t *out)¶