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

fail Backward Chaining Goal

Summary

The standard prolog predicate that always fails.

Package

kw

Signature

fail

Description

The backward chaining goal fail always fails. It is sometimes used with cut.

Examples
(defrule nice :backward
  ((nice ?x)
   <--
   (rottweiler ?x)
   (cut)
   (fail))
  ((nice ?x) <--))

implements "everything is nice unless it is a rottweiler".

See also

cut


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