XSB includes a capapbility to process programs which have complex terms in predicate of functor position. This allows programmers to program in a higher-order syntax, and so this extension of Prolog is called HiLog. Programmers can think of programming with parameterized predicates or with predicate variables. HiLog also supports a new way of programming with sets. We will explore these issues in this chapter.

HiLog is actually a very simple extension to Prolog. The definition of a basic term in Prolog is as follows:

- A term is a atomic symbol or a variable, or
- A term is of the form:
*s*(*t*_{1},*t*_{2},...,*t*_{n}) where*s*is an atomic symbol and the*t*_{i}are terms.

- A term is a atomic symbol or a variable, or
- A term is of the form:
*t*_{0}(*t*_{1},*t*_{2},...,*t*_{n}) where the*t*_{i}are terms.

Computationally these terms are matched just as Prolog terms, so intuitively HiLog programs work very similarly to Prolog programs. However, they encourage different ways of thinking about programs and support different programming paradigms.