All Manuals > KnowledgeWorks and Prolog User Guide > 3 Rules > 3.2 Backward Chaining


3.2.2 Backward Chaining Syntax

Backward chaining rule bodies are defined as:

<body> ::= <clause>+
<clause> ::= (<goal> <-- <expression>*)
<goal> ::= (<rule-name> <term>*)

In each sub-clause of the rule, the goal must have the same arity (number of arguments). Within each <term> destructuring is allowed and variables are introduced by ? (and ? on its own denotes the anonymous variable which always matches). <expression> is as defined in Forward Chaining Syntax. Example

KnowledgeWorks and Prolog User Guide (Windows version) - 6 Dec 2011