car color defaults: a story about Scoped Negation As Failure/log:notIncludes

Here's a sort of story we've written to explain and motivate
log:notIncludes, aka Scoped Negation As Failure[1].

[[
Because a formula is a finite size, you can test for what it does not
say, with log:notIncludes. Here, we have a rule that is the
specification for a car doesn't say what color it is then it is black.

this log:forAll :car.
{ :car.auto:specification log:notIncludes {:car auto:color []}}
    => {:car auto:color auto:black}.

Note the use of [] here in the nested formula as a blank node. If the
spec said that a car had color green, then that would mean that the car
had color something, so we would say that the formula included :car
auto:color [] . A statement with a [] in it you can think of as weaker
version of one with a value for the color.

This is a way to do defaults. Notation3 as it is doesn't have defaults,
because on the web, you can't say "if nothing says it is another color".
You can never know in the whole web whether anyone has given a color.
Also, if we start to just loosely talk about defaults in the sense of if
you don't already know a color, then different agents will end up
drawing different conclusions from the same data, which is not a good
foundation for a scalable web. So, you handle defaults by first running
rules to work out everything which is specified, and then on the result
of that do a notIncludes rule like that above to implement the default
values.

]]
 -- section "Implementing defaults and log:notIncludes" 
  of part "Reaching out onto the Web"
  of the Semantic Web Tutorial Using N3
  http://www.w3.org/2000/10/swap/doc/Reach#Implementi



[1] "The term Scoped Negation As Failure (SNAF) was proposed to indicate
NAF where the scope of the search failure is well defined."
http://www.w3.org/2004/12/rules-ws/report/#negation-as-failure

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E

Received on Thursday, 7 July 2005 17:51:35 UTC