W3C home > Mailing lists > Public > www-rdf-interest@w3.org > January 2002

Re: Expressing "not" in RDF rules

From: Sean B. Palmer <sean@mysterylights.com>
Date: Sun, 27 Jan 2002 00:03:19 -0000
Message-ID: <00a101c1a6c6$097543e0$0a560150@localhost>
To: "Norman Walsh" <Norman.Walsh@Sun.COM>
Cc: <www-rdf-interest@w3.org>
Hi Norm,

> If    :p :pointsTo :s
> and   :p :pointsTo :t
> and   not(s :pointsTo :t)
> then  :p :hasEdge :t

What you want is to say that there is no triple in the current store
that fits the profile "_:s :pointsTo _:t". You can do that using
log:notIncludes:-

   { this log:notIncludes { [] :pointsTo [] } }
     log:implies { :Test a :Success } .

A small test file and its output using --think is attached, for your
reference.

The other form of "not" is converse property pairs, cf. log:converse.
When a property is declared a converse of another property, the two
can't co-exist in the same store with the same subject and object,
otherwise there is a schema inconsistency. For example, the following
is clearly inconsistent:-

   :x :name :y .
   :x :doesNotHaveName :y .
   :name log:converse :doesNotHaveName .

I doubt that this helps you in your case, since the converse will not
have been declared.

Cheers,

--
Kindest Regards,
Sean B. Palmer
@prefix : <http://purl.org/net/swn#> .
:Sean :homepage <http://purl.org/net/sbp/> .


Received on Saturday, 26 January 2002 19:04:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:52 GMT