<?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>8221</bug_id>
          
          <creation_ts>2009-11-06 19:00:53 +0000</creation_ts>
          <short_desc>deterministic / stable</short_desc>
          <delta_ts>2010-09-03 21:46:50 +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>Functions and Operators 3.0</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</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="Jonathan Robie">jonathan.robie</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          <cc>jim.melton</cc>
          
          <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>29406</commentid>
    <comment_count>0</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2009-11-06 19:00:53 +0000</bug_when>
    <thetext>Are deterministic and stable the same or different? Do we really need both concepts?

Should F&amp;O define the term &apos;deterministic&apos;, which is widely used in XQuery?

See
http://lists.w3.org/Archives/Member/w3c-xsl-query/2009Oct/0115.html

Note: &apos;deterministic&apos; and &apos;stable&apos; each occur in our grammar. We should make sure that the concepts we use in our documents and keywords correspond.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31016</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-01-13 13:28:16 +0000</bug_when>
    <thetext>Allow me to add a side-issue to this bug: in defining what it means for a function to be stable, the F+O spec defines a notion of two values being &quot;identical&quot;. (Section 1.6.3). This definition should be amended so that NaN is identical to NaN.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38458</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2010-09-03 21:46:50 +0000</bug_when>
    <thetext>Here is the resolution from the Oxford face-to-face:

DECISION - execution scope is the status quo (e.g. in F&amp;O) and is adopted
e.g. for top-level evaluation of a query or transformation.

[long discussion of terms]

DECISION - deterministic and nondeterministic [[
    A fn is deterministic if all calls within an execution scope
    and with identical arguments return an identical result.
    That result may be implementation defined/depedent
    (e.g. in the order of items in a sequence)

    If the function is dependent on the dynamic context, we
    regard it as deterministic treating that part of the context
    as an implicit argument, so if the context and arguments are
    the same the result must be the same.

    All other functions is non-deterministic.

    Side-effecting and determinism are orthogonal
]]


focus-dependent/independent or
      problem - focus has a defined meaning that&apos;s more specific

context-dependent/independent not also needed

DECISION [[
      A function is focus-dependent if it needs access to the
      current focus, otherwise it&apos;s focus-independent

      A function is context-dependent if it needs access to
      the dynamic context - e.g. doc(), current-dateTime().
      This is a superset of focus-dependent functions.
      Otherwise it&apos;s context-independent.

      All focus-dependent functions are also context-dependent.
]]


ACTION A-444-03: editors to use these terms (execution scope,
deterministic/non-deterministic, focus-dependent/focus-independent,
context-dependent, context-independent) to classify the existing
functions and to express stable/deterministic in terms of them.

Note - updating functions are not inherently non-deterministic,
but have an implicit extra return value.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>