Backchaining

Backchaining is used to query a Knowledge Base (Prolog) by computing new queries based on given queries.

It replaces variables by suitable terms.

The ProLog interpreter backchains from top to bottom until the query either succeeds (returns true) or fails (returns false).