Defines | |
#define | cuex_opr(index, arity) |
#define | cuex_opr_with_ctor(index, arity) (cuex_opr(index, arity) | CUEX_OPRFLAG_CTOR) |
#define | cuex_opr_index(opr) (((opr) & CUEX_OPR_SELECT_MASK) >> CUEX_OPR_SELECT_SHIFT) |
#define | cuex_opr_sans_arity(opr) ((opr) & ~CUEX_OPR_ARITY_MASK) |
#define | cuex_opr_flags(opr) ((opr) & CUEX_OPR_FLAGS_MASK) |
#define | cuex_opr_sans_flags(opr) ((opr) & ~CUEX_OPR_FLAGS_MASK) |
#define | cuex_opr_has_ctor(opr) ((opr) & CUEX_OPRFLAG_CTOR) |
#define | cuex_opr_null cuex_opr(0, 0) |
#define | cuex_opn_to_ex(opn) ((cuex_t)(opn)) |
#define | cuex_opn_from_ex(ex) ((cuex_opn_t)(ex)) |
Functions | |
cu_bool_t | cuex_is_opn (cuex_t ex) |
cu_bool_t | cuex_is_obj (cuex_t ex) |
cu_rank_t | cuex_opn_r (cuex_opn_t opn) |
cuex_t | cuex_null () |
cu_bool_t | cuex_is_null (cuex_t ex) |
cuex_t | cuex_unknown () |
cu_bool_t | cuex_is_unknown (cuex_t ex) |
cu_bool_t | cuex_eq (cuex_t ex0, cuex_t ex1) |
int | cuex_cmp (cuex_t lhs, cuex_t rhs) |
cu_bool_t | cuex_leq (cuex_t lhs, cuex_t rhs) |
cu_bool_t | cuex_lt (cuex_t lhs, cuex_t rhs) |
cu_bool_t | cuex_geq (cuex_t lhs, cuex_t rhs) |
cu_bool_t | cuex_gt (cuex_t lhs, cuex_t rhs) |
cuex_t | cuex_min (cuex_t lhs, cuex_t rhs) |
cuex_t | cuex_max (cuex_t lhs, cuex_t rhs) |
cuex_t | cuex_uniq (cuex_t ex) |
Variables | |
cuex_t | cuexP_null |
cuex_t | cuexP_unknown |
#define cuex_opr | ( | index, | |||
arity | ) |
(((cuex_meta_t)(index) << CUEX_OPR_SELECT_SHIFT) | \ ((cuex_meta_t)(arity) << CUEX_OPR_ARITY_SHIFT) | 1)
Create an operator for cuex_opn_t
with arity arity and identified by (index, arity).
#define cuex_opr_null cuex_opr(0, 0) |
Placement for unspecified operator, e.g. as return value. The unique cuex_opn_t
expression of this operator can be used as a placement expression. As opposed to NULL
, this null-expression can be handled gracefully by expression-traversing functions without special attention, and shall therefore be used instead of NULL
in sub-expressions.
An ordering classification for expressions used as keys e.g. in ACI expressons, which returns negative for ‘<’, 0 for ‘=’ and positive for ‘>’. Note that the range may not by constrained to {-1, 0, 1}. The ordering is not persistent accross processes. In the future, persistent ordering may be implemented for identifiers.
True iff ex0 and ex1 are structurally equal. This is trivial for hash-consed expressions. (Non-hash-consed expressions are not implemented.)
cuex_t cuex_null | ( | ) |
Returns the designated null expression.
cu_rank_t cuex_opn_r | ( | cuex_opn_t | opn | ) |
The arity of opn.
Turns ex into a hash-consed representation. This is trivial for already hash-consed expressions. (Non-hash-consed expressions are not implemented.)
cuex_t cuex_unknown | ( | ) |
Returns the designated placement for unknown expressions.