W3C home > Mailing lists > Public > public-qt-comments@w3.org > December 2010

[Bug 11352] %nondeterministic and independent compilations of modules

From: <bugzilla@jessica.w3.org>
Date: Tue, 07 Dec 2010 15:29:42 +0000
To: public-qt-comments@w3.org
Message-Id: <E1PPzU6-0002Vb-Ex@jessica.w3.org>

--- Comment #7 from Daniela Florescu <dflorescu@mac.com> 2010-12-07 15:29:41 UTC ---
There are two questions about the semantics of %(non)deterministic annotations.

1. What is the required semantics in case the user's declaration is
with what is automatically inferred by the compiler, and
2. What is the default annotation

My understanding of the current status quo is that:
1. Non defined
2. Deterministic

My own answers to each question is bellow:

1. About the inconsistency: there are two cases:
a. The user specifies  (explicitly or using the default behavior) that a
is non-deterministic, while the compiler infers that it is deterministic.
This is not a semantic problem, it is just an optimization problem. A
deterministic function 
can be used anywhere a non-deterministic function can be used (but not the
way around), but better optimization can be done in case of deterministic

The standard should allow  an XQuery implementation to use
the most restrictive annotation (aka deterministic) that is inferred by the
in the same way we allow XQuery implementations to use a more precise type
inference (as opposed to the standard one) to improve optimization.

b. The user specifies  (explicitly or using the default behavior) that a
is deterministic, while the compiler infers that it is non-deterministic.

This is a semantic error: user had wrong expectations about the XQuery code
she/he has written.

The standard should require XQuery implementations to raise an error in this

2. In order to be backwards compatible with the semantics of XQuery 1.0
functions that does
allow non-determinism (as Andrew pointed out), I do not see any other solution
then to make the
default  non-deterministic.

( I do not think that making the default different in XQuery 1.0 vs. XQuery 3.0 
is an acceptable solution.)

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Tuesday, 7 December 2010 15:29:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:33 UTC