The Usability of Ambiguity Detection Methods for Context-Free Grammars

被引:5
|
作者
Basten, H. J. S. [1 ]
机构
[1] Ctr Wiskunde & Informat, POB 94079, NL-1090 GB Amsterdam, Netherlands
关键词
Ambiguity detection methods; context-free grammars; practical usability; LR(k) test; AMBER; Noncanonical Unambiguity test;
D O I
10.1016/j.entcs.2009.09.039
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
One way of verifying a grammar is the detection of ambiguities. Ambiguities are not always unwanted, but they can only be controlled if their sources are known. Unfortunately, the ambiguity problem for context-free grammars is undecidable in the general case. Various ambiguity detection methods (ADMs) exist, but they can never be perfect. In this paper we explore three ADMs to test whether they still can be of any practical value: the derivation generator AMBER, the LR(k) test and the Noncanonical Unambiguity test. We benchmarked their implementations on a collection of ambiguous and unambiguous grammars of different sizes and compared their practical usability. We measured the accuracy, termination and performance of the methods, and analyzed how their accuracy could be traded for performance.
引用
收藏
页码:35 / 46
页数:12
相关论文
共 50 条
  • [1] Conservative ambiguity detection in context-free grammars
    Schmitz, Sylvain
    Automata, Languages and Programming, Proceedings, 2007, 4596 : 692 - 703
  • [2] A NOTE ON AMBIGUITY IN CONTEXT-FREE GRAMMARS
    ALTMAN, T
    LOGOTHETIS, G
    INFORMATION PROCESSING LETTERS, 1990, 35 (03) : 111 - 114
  • [3] Analyzing ambiguity of context-free grammars
    Brabrand, Claus
    Giegerich, Robert
    Moller, Anders
    SCIENCE OF COMPUTER PROGRAMMING, 2010, 75 (03) : 176 - 191
  • [4] Analyzing ambiguity of context-free grammars
    Brabrand, Claus
    Giegerich, Robert
    Moller, Anders
    IMPLEMENTATION AND APPLICATION OF AUTOMATA, 2007, 4783 : 214 - +
  • [5] An Ambiguity Hierarchy of Weighted Context-Free Grammars
    Inoue, Yusuke
    Hashimoto, Kenji
    Seki, Hiroyuki
    IMPLEMENTATION AND APPLICATION OF AUTOMATA (CIAA 2022), 2022, 13266 : 238 - 250
  • [6] An ambiguity hierarchy of weighted context-free grammars
    Inoue, Yusuke
    Hashimoto, Kenji
    Seki, Hiroyuki
    THEORETICAL COMPUTER SCIENCE, 2023, 974
  • [8] Tracking Down the Origins of Ambiguity in Context-Free Grammars
    Basten, H. J. S.
    THEORETICAL ASPECTS OF COMPUTING, 2010, 6255 : 76 - 90
  • [9] Generalized context-free grammars and multiple context-free grammars
    Kasami, Tadao
    Seki, Hiroyuki
    Fujii, Mamoru
    Systems and Computers in Japan, 1989, 20 (07): : 43 - 52
  • [10] Context-Free Tree Grammars are as Powerful as Context-Free Jungle Grammars
    Drewes, Frank
    Engelfriett, Joost
    ACTA CYBERNETICA, 2015, 22 (02): : 373 - 392