New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How is ambiguity defined? What obligations do processors have in cases of ambiguity? #26
Comments
The draft of 29 March says, in the section on conformance of processors:
I do not believe the last sentence is correct, because when applied to context-free grammars, ambiguity is not at all dependent on the parsing algorithm. The variation we have encountered is due to variations in ixml processors, not in parsing algorithms. The place to mention it is in the section headed "Parsing", after the paragraph reading:
I would propose to add a note:
I also note that the main text classes the reporting of ambiguity as a should (which is what I think we agreed on, in the call of 22 March), but the conformance section continues to list it as a must. |
From the 12 April meeting, some discussion of where the text on ambiguity should go. "In the section on parsing" is proposed. |
The minutes of 12 April are a little sketchy on the discussion of this issue and the nature of my concerns. For the record, I will try to record them more precisely here. The current (2022-04-15) conformance section follows the references to the Earley, Unger, CYK, GLL, and GLR algorithms with the sentence
This suggests incorrectly that the definition of ambiguity is somehow tied up with the algorithm used by a parser, which is false, and that Earley, Unger, CYK, GLL, and GLR do not all use the same definition, which is not even false because they don't rely on or use any definition of ambiguity at all. Conventional treatments of automata theory define ambiguity for BNF grammars, and while the form of words may vary the various formal definitions are all provably equivalent. Our difficulties with ambiguity result from the fact that ixml is an EBNF notation, for which the conventional definitions do not apply directly, and we have imposed a conformance requirement (weakened in some places in the spec to a recommendation) for the identification of ambiguity without having any definition of what we mean by "ambiguity". So the inaccuracy of the current text is exacerbated by its attempt to pin the responsibility for the problem on other people instead of admitting that it's our own responsibility. |
At the 10 May 2022 CG meeting, Steven asserted this was completed. If it isn't, I propose that a new issue be raised (or reopen this one). |
Not only the information about variable results in the detection of ambiguity, but also the mention of general parsing algorithms, has moved from the section on processor conformance to the section "Parsing". Personally, I thought the mention of the algorithms worked slightly better where it was, but its location is an editorial issue and I defer to the editor's judgement. But the statement about the definition of ambiguity continues to be erroneous and misleading. The current text of the Parsing section reads in part:
The section on processor conformance reads in part:
There are problems here:
I propose two changes. In the section on parsing, in the text quoted above insert "by default" after "should" (to agree with the section on conformance), change "including" to "include" (to make the sentence grammatical), delete the erroneous statement about parsing algorithms, and insert an explicit statement that different processors may vary in flagging a given sentence as ambiguous, so that the text quoted above is replaced by:
In the passage quoted above from the section on parser conformance, replace the word "must" with the word "should", so the text reads
Because the current text does not resolve the problem identified by this issue report, I am reopening the issue. |
Thank you, Michael. FWIW, your proposed changes look fine to me. |
An even simpler solution for the first change (to the section on parsing) is to say less and make the passage quoted read just:
An analogous change would then be necessary in the conformance section, to make the passage quoted there read:
|
Agreed resolved at the 31 May 2022 CG meeting. |
See https://lists.w3.org/Archives/Public/public-ixml/2022Jan/0030.html and ensuing thread.
In the current spec, two passages are relevant:
and
Several questions arise which appear to need answers:
The text was updated successfully, but these errors were encountered: