Send Close Add comments: (status displays here)
Got it!  This site uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.nbsp; Note: This appears on each machine/browser from which this site is accessed.
Prolog: Terms


1. Prolog: Terms

2. Prolog terms
Prolog has a powerful term (tree) structure that can be used to make facts and rules more clear.

This term structure was intended, in part, to support natural language processing. Here is the Prolog code.

Here is the output of the Prolog code.


3. Notes
The run predicate is used to separate the running of the test case from the main evaluation (in the go predicate).

The cut operator "!" is used in the run predicate to avoid spurious backtracking (and output) since the test case running is intended to be deterministic without backtracking (except to the next test case).

4. End of page