Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!tektronix!ogcvax!omsvax!icalqa!hplabs!sri-unix!pereira From: pereira@sri-unix.UUCP Newsgroups: net.sources Subject: Prolog library: not.hlp Message-ID: <110@sri-unix.UUCP> Date: Mon, 15-Aug-83 01:57:09 EDT Article-I.D.: sri-unix.110 Posted: Mon Aug 15 01:57:09 1983 Date-Received: Thu, 11-Aug-83 13:15:11 EDT Lines: 28 File: Util:Not.Hlp Author: R.A.O'Keefe Updated: 21 May 1983 #source. The simple-minded not/1 lives in Util:Imisce.Pl. Whenever you could use it, you aree strongly recommended to use \+ . The suspicious not/1 lives in Util:Not.Pl. #purpose. The simple-minded not/1 was for compatibility with a long-dead version of Dec-10 Prolog. It has been retained because some other Prologs use it. However, it is always better to use \+ in Dec-10 Prolog, and it is no worse in C Prolog. There are problems with negated goals containing universally quantified variables. For example, if you write bachelor(X) :- \+married(X), male(X). you will not be able to enumerate bachelors. To help you detect such errors, there is a suspicious version of not/1 which will report any negated goals containing universally quantified variables. #commands. The source only defines one public predicate: not/1. If it detects an error, not/1 will switch on tracing and enter a break. not/1 understands the existential quantifier ^ . See the description of bagof and setof in the Prolog manual to find out what that means.