This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Are deterministic and stable the same or different? Do we really need both concepts? Should F&O define the term 'deterministic', which is widely used in XQuery? See http://lists.w3.org/Archives/Member/w3c-xsl-query/2009Oct/0115.html Note: 'deterministic' and 'stable' each occur in our grammar. We should make sure that the concepts we use in our documents and keywords correspond.
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 "identical". (Section 1.6.3). This definition should be amended so that NaN is identical to NaN.
Here is the resolution from the Oxford face-to-face: DECISION - execution scope is the status quo (e.g. in F&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'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'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'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.