In this chapter we introduce some of the built-in predicates that a Prolog system might provide. What do we mean when we say that a predicate is built-in? We mean that the predicate’s definition is provided in advance by the Prolog system, instead of by your own clauses. Built-in predicates may provide facilities that cannot be obtained by definitions in pure Prolog. Or they may provide convenient facilities just to save each programmer from having to define them himself. We have already encountered some built-in predicates: the predicates for reading and writing discussed in Chapter 5. Also, the “cut” could be regarded as a built-in predicate.
Unable to display preview. Download preview PDF.