|
From: | Lindsey Spratt |
Subject: | Re: problems with not and unasserted facts |
Date: | Wed, 31 Aug 2005 09:23:07 -0400 |
Hello Vic. On Aug 31, 2005, at 7:12 AM, Vic Bancroft wrote:
Lindsey Spratt wrote:not/1 is not a built-in in gprolog. Instead, use \+ / 1.This seems to be the most common issue introduced by the ISO definitions !
The not/1 change seems to be a problem for people working from (poor) textbooks. I guess a lot of textbooks must use not/1, although I think the standards committee probably did the right thing by settling on \+/1 instead. Perhaps gprolog (and others) could have some advisory when not/1 is used: "use \+/1 instead, it's logically pure, or turn off this advisory by setting the i_like_not flag to true."
[I think the biggest failure of the ISO definitions was not including term_expansion and DCG. I consider these core features of a usable Prolog system.]
Hey Lindsey, don't you have a compatibility library of predicates around somewhere ?You could define a not/1 predicate as: not(Goal) :- \+ call(Goal).
mp32compatibility.pl is part of the XGP source:http://cvs.sourceforge.net/viewcvs.py/xgp/xgp/src/bridge/ mp32compatibility.pl http://cvs.sourceforge.net/viewcvs.py/xgp/xgp/src/bridge/ mp32compatibility_ops.pl
It does not include a not/1 predicate though, since MP32 didn't use that.
Cheers, Lindsey
[Prev in Thread] | Current Thread | [Next in Thread] |