types(9)

NAME
Specifying type information in Progol.

DESCRIPTION
Types have to be specified for every argument of all predicates to be used in constructing a hypothesis. This specification is done by a mode declaration. Type definitions can either be built-in to Prolog (for example, int/1 or float/1 or unary predicates in background knowledge. In addition to most standard Prolog built-in definitions Progol provides the following that could be of use in defining types:

any(X)
    any/1 is true for any term X.

float(X)
    float/1 is true if X is a floating point number.

int(X)
    int/1 is true if X is an integer.

nat(X)
    nat/1 succeeds when X is a natural number.

constant(X)
    constant/1 succeeds when X is a constant.

EXAMPLES
Here is a type definition for a list of integers: list([]). list([H|T]):-
    int(H),
    list(T).

SEE ALSO
mode/2