next up previous
Next: Sample Program Up: prolog Previous: SWI-Prolog

Structure of Prolog Programs

Every entry into the interpreter is a goal that Prolog tries to satisfy.

Every goal in Prolog ends with ``.''.

A Prolog program consists of a database of facts, rules, and queries. This program is, in essence, a knowledge base.