4.5 Verify Type of a Term

True if Term currently is a free variable.
True if Term currently is not a free variable.
True if Term is bound to an integer.
True if Term is bound to a floating point number.
True if Term is bound to a rational number. Rational numbers include integers.
rational(+Term, -Numerator, -Denominator)
True if Term is a rational number with given Numerator and Denominator. The Numerator and Denominator are in canonical form, which means Denominator is a positive integer and there are no common divisors between Numerator and Denominator.
True if Term is bound to an integer or floating point number.24As rational numbers are not atomic in the current implementation and we do not want to break the rule that number/1 implies atomic/1, number/1 fails on rational numbers. This will change if rational numbers become atomic.
True if Term is bound to an atom.
True if Term is bound to a string. Note that string here refers to the built-in atomic type string as described in section 4.23, Text in double quotes such as "hello" creates a list of character codes. We illustrate the issues in the example queries below.
?- write("hello").
[104, 101, 108, 108, 111]
?- string("hello").
?- is_list("hello").
True if Term is bound to an atom, string, integer or floating point number. Note that string refers to the built-in type. See string/1. Strings in the classical Prolog sense are lists and therefore compound.
True if Term is bound to a compound term. See also functor/3 and =../2.
True if Term is bound to an atom or a compound term, so it can be handed without type-error to call/1, functor/3 and =../2.
True if Term holds no free variables.
True if Term contains cycles, i.e. is an infinite term. See also acyclic_term/1 and section 2.16.25The predicates cyclic_term/1 and acyclic_term/1 are compatible to SICStus Prolog. Some Prolog systems supporting cyclic terms use is_cyclic/1 .
True if Term does not contain cycles, i.e. can be processed recursively in finite time. See also cyclic_term/1 and section 2.16.