<?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>13745</bug_id>
          
          <creation_ts>2011-08-10 09:57:19 +0000</creation_ts>
          <short_desc>[XQuery 3.0] &quot;deterministic&quot; and &quot;nondeterministic&quot;</short_desc>
          <delta_ts>2011-09-06 19:15:56 +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>XQuery 3.0</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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="Michael Kay">mike</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</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>54587</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-08-10 09:57:19 +0000</bug_when>
    <thetext>The XQuery specification often seems to use the phrase &quot;nondeterministic&quot; where &quot;implementation-dependent&quot; would be more appropriate. For example:

2.4.3: &quot;The effective boolean value of a sequence that contains at least one node and at least one atomic value may be nondeterministic in regions of a query where ordering mode is unordered.&quot;

3.2.1: &quot;In a region of a query where ordering mode is unordered, the result of a numeric predicate is nondeterministic, as explained in 3.10 Ordered and Unordered Expressions.&quot;

I note also that &quot;nondeterministic&quot; is sometimes hyphenated, sometimes not; and that we sometimes say &quot;is nondeterministic&quot;, sometimes &quot;may be nondeterministic&quot;, with no apparent difference in intended meaning.

I suspect our intent is that wherever the result of an expression is implementation-defined or implementation-dependent (i.e. varies from one implementation to another) then it is also implementation-defined or -dependent whether it is deterministic (i.e. varies from one execution to another).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56433</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2011-09-06 19:15:37 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; I suspect our intent is that wherever the result of an expression is
&gt; implementation-defined or implementation-dependent (i.e. varies from one
&gt; implementation to another) then it is also implementation-defined or -dependent
&gt; whether it is deterministic (i.e. varies from one execution to another).

This is not a general principle. For instance, documentation order is stable even when it is implementation-defined.

&gt; The XQuery specification often seems to use the phrase &quot;nondeterministic&quot; where
&gt; &quot;implementation-dependent&quot; would be more appropriate. For example:
&gt; 
&gt; 2.4.3: &quot;The effective boolean value of a sequence that contains at least one
&gt; node and at least one atomic value may be nondeterministic in regions of a
&gt; query where ordering mode is unordered.&quot;

We should either eliminate the term or define it. 

It looks like most users are in non-normative notes. The following use is normative:

&lt;quote&gt;
In addition to ordered and unordered expressions, XQuery provides a function named fn:unordered that operates on any sequence of items and returns the same sequence in a nondeterministic order.
&lt;/quote&gt;

The other uses all seem to refer to this one, directly or indirectly.

I would say that in this case the result should be implementation-defined, and is not required to be stable. In the non-normative notes, I would change &quot;nondeterministic&quot; to &quot;implementation-defined&quot;.

I do not believe this changes any requirements on processors, so it&apos;s probably an editorial change. I&apos;ll go ahead and make it, please reopen if I got this wrong.

&gt; I note also that &quot;nondeterministic&quot; is sometimes hyphenated, sometimes not; and
&gt; that we sometimes say &quot;is nondeterministic&quot;, sometimes &quot;may be
&gt; nondeterministic&quot;, with no apparent difference in intended meaning.

Yes, it looks like the hyphenated spelling is used only when discussing annotations. I just eliminated these hyphens.

And I changed &quot;may be nondeterministic&quot; to &quot;is implementation-dependent&quot; in the two places where I saw it.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>