All Manuals > KnowledgeWorks and Prolog User Guide > 7 Reference Guide

test Backward Chaining Goal

Summary

Evaluates a Lisp form as a backward chaining goal.

Package

kw

Signature

test lisp-form

Arguments
lisp-form
A single Lisp form.
Description

The backward chaining goal test succeeds if and only if lisp-form returns a non-nil value. Any currently bound variables may be used in the lisp form.

test can also be used as a forward chaining pre-condition, as described in 3.1.2 Forward Chaining Syntax.

Examples
(test (> ?c 10))
(test (not (and  (eq ?a ?b) (member ?b ?c))))

KnowledgeWorks and Prolog User Guide (Macintosh version) - 01 Dec 2021 19:35:35