W3C home > Mailing lists > Public > public-cwm-talk@w3.org > October to December 2004

Negations and Negated Conjuctions in Formulae.

From: Raymond Racine <rracine@adelphia.net>
Date: Mon, 18 Oct 2004 22:38:20 -0400
To: public-cwm-talk@w3.org
Message-Id: <1098153499.2178.35.camel@aragon>

I have a SML based N3 parser that does most of the core stuff and simple
formulae.  I am marrying up the Parser with a Rete implementation and
started to write simple N3 tests for the Rete and hit a couple of N3
notation issues.

I am assuming a simple block world.

:b1 :on :b2;
     :color :blue .

1. Negated Conjunctions

{?x :on ?y . ?y :leftof ?z . ~ ( ?z :color :red . ?z :on ?w.) } => ...

This production matches if there is a stack of (at least) two blocks
designated by ?x and ?y to the left of some block, ?z, which is not both
red and on some other block.

With negated conjunctions the following works as well.
A production that checks whether every red block has a blue block on top
of it can be re-written as there is no red block that does not have a
blue block on top of it, i.e.

Using SOAR-like notation, not N3.

~{ (?x color red) ~{ (?y on ?x) (?y color blue) } } => ....

2. Simple Negated Condition

(?x on ?y) (?y leftof ?z) ~(?z color red) => ....

Matches if there is a stack of (at least) two blocks to the left of some
block which is "not" known to be red.

Does N3 have a notation to create these kind of Rules/Formulae?

Received on Tuesday, 19 October 2004 02:52:00 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:01:04 UTC