<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>3669</bug_id>
          
          <creation_ts>2006-09-07 15:46:07 +0000</creation_ts>
          <short_desc>Type checking of () GeneralOp [value]</short_desc>
          <delta_ts>2006-10-19 19:48:30 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Formal Semantics 1.0</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Mills">tim</reporter>
          <assigned_to name="Jerome Simeon">simeon</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>11492</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2006-09-07 15:46:07 +0000</bug_when>
    <thetext>The formal semantics expansion of:

() eq 1

is

some $v1 in fn:data(()) satisfies
some $v2 in fn:data(1) satisfies
let $u1 := fs:convert-operand($v1, $v2) return
let $u2 := fs:convert-operand($v2, $v1) return
fs:eq ($u1, $u2)

Because:

statEnv |-  data on empty : empty

fn:data(()) is of type empty.

Therefore $u1 must be of type empty.  This is bad news for convert-operand, since $expected is of type xs:anyAtomicType.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12039</commentid>
    <comment_count>1</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2006-09-26 14:31:12 +0000</bug_when>
    <thetext>Tim,

Since the title of your comment is on General comparisons, I believe you meant to say &apos;() = 1&apos; ?

I am not sure I understand what the problem you are trying to point out is.

The normalization should be indeed what you suggest:

some $v1 in fn:data(()) satisfies
some $v2 in fn:data(1) satisfies
let $u1 := fs:convert-operand($v1, $v2) return
let $u2 := fs:convert-operand($v2, $v1) return
fs:eq ($u1, $u2)

The inference should go as follows:

() has type empty
fn:data(()) has type empty
the some expression is typed through a prime type. so $v1 will
be of type &apos;none&apos; which should make sure the rest of the
type checking succeeds. This is because in fact &apos;some&apos; does
not iterate at all over the empty sequence, the rest of the
expression will not even be evaluated.
the final type for the expression should be xs:boolean.

- Jerome
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12046</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2006-09-26 15:07:34 +0000</bug_when>
    <thetext>&gt; Since the title of your comment is on General comparisons, I believe you meant
&gt; to say &apos;() = 1&apos; ?

Yes, my mistake.

In another posting you made the point that, effectively, type empty is equivalent to none?, and also that none is a subtype of all other types.

At the time of posting, I&apos;d missed out the rule that prime(empty) = none. I had prime(empty) = empty, which was the root cause of my typechecking problem.

Therefore this report can be ignored.  Thanks for your help.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12053</commentid>
    <comment_count>3</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2006-09-26 15:58:01 +0000</bug_when>
    <thetext>Sorry reopened this bug by mistake ^_^.
Thanks for your quick response on this.
- Jerome
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>