9.4.5 Unifying and Comparing Terms

int SP_unify(SP_term_ref x, SP_term_ref y)
Unifies two terms, returning zero on failure and nonzero on success.
int SP_compare(SP_term_ref x, SP_term_ref y)
Returns -1 if x @< y, 0 if x == y and 1 if x @> y