W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > October 2005

[CLOSED] Re: Bug: "A value disjunction that encounters a type error on only one branch will return the result of evaluating the other branch."

From: Tim Berners-Lee <timbl@w3.org>
Date: Tue, 18 Oct 2005 09:31:09 -0400
Message-Id: <8CD3CD07-F891-43AF-8975-0E5B8DE34B0D@w3.org>
Cc: public-rdf-dawg-comments@w3.org, Yosi Scharf <syosi@mit.edu>, Dan Connolly <connolly@w3.org>
To: Eric Prud'hommeaux <eric@w3.org>

Looks right to me.
Thank you.
Tim
On Oct 18, 2005, at 8:59, Eric Prud'hommeaux wrote:

> On Tue, Aug 02, 2005 at 11:27:24AM -0400, Tim Berners-Lee wrote:
>
>>
>> The current last call draft states,
>>
>> "A value disjunction that encounters a type error on only one branch
>> will return the result of evaluating the other branch."
>>
>> This seems to be a bug: inconsistent with the logic one would expect.
>>  It is inconsistent with the general rule that the disjunction of
>> false with x is x for all x. The disjunction of false with a type
>> error is therefore a type error.  If not, the type error is masked.
>>
>> Example in english:  An alarm should fire if either ?smokeDetected or
>> the ?temperature is above 40.  Suppose the ?smokeDetected is false
>> and the temperature is (because of a bug) bound to something which
>> can't be compared to 40 without a type error.  The result should be
>> that the alarm is a type error.  Instead, with the wording above, the
>> alarm is suppressed.
>>
>> Yosi Scharf found also that this rule for union means that de
>> Morgan's laws don't hold properly, making the  compilation and
>> optimization of queries more difficult or impossible.
>>
>
> Per the above text, and a hallway conversation with you, we've
> re-arranged the truth table as follows:
>
>   A  B | A && B   A || B
>   ----------------------
>   E  E |    E        E
>   E  T |    E        T
>   E  F |    F        E*
>   T  E |    E        T
>   T  T |    T        T
>   T  F |    F        T
>   F  E |    F        E*
>   F  T |    F        T
>   F  F |    F        F
>
>   * changed to give priority to F || X => X
>
> This is specified with the words:
> [[
> # Any expression other than logical or (||) or logical and (&&) that
> encounters a type error will produce a type error.
> # A logical or that encounters a type error on only one branch will
> return will return TRUE if the other branch is TRUE and an error if
> the other branch is FALSE.
> # A logical and that encounters a type error on only one branch will
> return will return an error if the other branch is TRUE and FALSE if
> the other branch is FALSE.
> # A logical or or logical and that encounters type errors on both
> branches will produce a type error.
> ]]
> and clarified with the above truth table.
>
> If this text meets your requirements, please respond with [CLOSED] in
> the subject to allow the issue tracking scripts to close this issue.
> --  
> -eric
>
> office: +81.466.49.1170 W3C, Keio Research Institute at SFC,
>                         Shonan Fujisawa Campus, Keio University,
>                         5322 Endo, Fujisawa, Kanagawa 252-8520
>                         JAPAN
>         +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA
> cell:   +81.90.6533.3882
>
> (eric@w3.org)
> Feel free to forward this message to any list for any purpose other  
> than
> email address distribution.
>
Received on Tuesday, 18 October 2005 13:31:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:49 GMT