All Manuals > KnowledgeWorks and Prolog User Guide

NextPrevTopContentsIndex

3 Rules

KnowledgeWorks rules are defined as follows:

<rule> ::=
    (defrule <rule-name> <direction> [<doc-string>] <body>)
<direction> ::= {:forward | :backward}

Every rule must have a unique name which must also be distinct from any KnowledgeWorks object class name and from any context (rule-group) name. The expressions which form the body of a rule have the same syntax and meaning regardless of whether they occur on the left or right hand side of a forward or backward chaining rule. If doc-string is given, then it should be a string. The value can be retrieved by calling the function documentation with doc-type rule.

3.1 Forward chaining

3.2 Backward Chaining

3.3 Common Lisp Interface


KnowledgeWorks and Prolog User Guide (Unix version) - 26 Feb 2015

NextPrevTopContentsIndex