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

View: New views
2 Messages — Rating Filter:   Alert me  

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

by Bugzilla from bugzilla@wiggum.w3.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
        ReportedBy: jim.melton@...
         QAContact: public-qt-comments@...


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.


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

by Bugzilla from bugzilla@wiggum.w3.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://www.w3.org/Bugs/Public/show_bug.cgi?id=7863


Jonathan Robie <jonathan.robie@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #1 from Jonathan Robie <jonathan.robie@...>  2009-10-27 16:58:04 ---
In today's telcon, we agreed to add a rule to 4.17 - if a function is marked
deterministic or nondeterministic, the function must be external; otherise,  it
is a static error.


--
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.