Prolog/Glossary

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

This is (or will be) a glossary of common Prolog terms.

Argument

Arity: The number of arguments that a predicate take. E.g. member(X,List) has arity 2. In documentation, the arity of a predicate is written as predicate/arity. E.g. member/2.

Backtracking: If a sub-goal fails, the built-in Prolog search mechanism will go back to the parent-goal. Any variables that were instantiated in the sub-goal will be un-instantiated. Prolog will then search for a new way of satisfying the sub-goal. This process is called backtracking.

Fact

Functor

Goal: See query.

Ground Term

Predicate

Query

Recursion/Recursive

Rule

Term

Unification

Singleton Variable

Personal tools