Re: [eclipse-clp-users] testing NOT existence

From: Matthew Skala <mskala_at_cs.toronto.edu>
Date: Mon, 26 Apr 2010 13:36:09 -0400 (EDT)
On Mon, 26 Apr 2010, Alexandre Saidi wrote:
> Hi all,
> another way is to test :
> 	not (not (foo(X)).
>
> since "not not P = P" and that WITHOUT variable binding.
>
> Please adapt  not  (eg. use  \+" if necessary).

That brings us back to where we started.  "david" asked specifically about
a test that would check asserted facts like foo(bar). without succeeding
on clauses with more general heads like foo(X) that could be unified with
foo(bar).  Using "not not" doesn't work for his purpose; it succeeds when
foo(X) exists.  The question of whether or not to bind X when such a thing
does succeed, is a different question.

As I said:

> > depending on just what you want to query for.  Note that all of these
> > break the logic programming model and you probably should think hard about
> > whether what you're attempting to do is *really* a good idea.
-- 
Matthew Skala, postdoctoral researcher, Universities of Toronto and Waterloo
mskala_at_cs.toronto.edu    mskala_at_cs.uwaterloo.ca    mskala_at_ansuz.sooke.bc.ca
Received on Mon Apr 26 2010 - 17:37:15 CEST

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET