W3C home > Mailing lists > Public > public-qt-comments@w3.org > October 2009

[Bug 7863] New: [XQuery 1.1] BNF of FunctionDecl allows user-defined functions to be nondeterministic

From: <bugzilla@wiggum.w3.org>
Date: Fri, 09 Oct 2009 21:28:20 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-7863-523@http.www.w3.org/Bugs/Public/>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=7863

           Summary: [XQuery 1.1] BNF of FunctionDecl allows user-defined
                    functions to be nondeterministic
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 1.1
        AssignedTo: jonathan.robie@redhat.com
        ReportedBy: jim.melton@acm.org
         QAContact: public-qt-comments@w3.org


In the WD of XQuery 1.1 currently being prepared for internal WG review, EBNF
production [31] reads:

FunctionDecl       ::=          "declare" ("deterministic" |
"nondeterministic")? ("private" | "public")? "function" QName "(" ParamList?
")" ("as" SequenceType)? (FunctionBody | "external")

That syntax clearly allows: declare nondeterministic function X() external

However, the 6th paragraph of Section 4.17, Function Declaration, says: 

An XQuery processor can use static analysis to determine whether a user-defined
function is deterministic (the syntax of function declarations does not allow a
user-defined function to be declared deterministic or nondterministic).

(Note the typo: nondterministic.)

The parenthesized statement is clearly incorrect. It states (what my memory
suggests is) the intent of the WG, but it is not on its face a correct
observation. 

Assuming that is the WG's intent, then a way must be found to make the
limitation normative. Two approaches come to mind: One would rewrite the EBNF
to have two alternatives, one for user-defined functions and the other for
external functions.  The other would have to define the limitation as a
constraint, either by some sort of extra-grammatical constraint or by natural
language in section 4.17.


-- 
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 Friday, 9 October 2009 21:28:24 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:41 UTC