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 条
  • [31] ON MULTIPLE CONTEXT-FREE GRAMMARS
    SEKI, H
    MATSUMURA, T
    FUJII, M
    KASAMI, T
    THEORETICAL COMPUTER SCIENCE, 1991, 88 (02) : 191 - 229
  • [32] Pullback Grammars Are Context-Free
    Bauderon, Michel
    Chen, Rui
    Ly, Olivier
    GRAPH TRANSFORMATIONS, ICGT 2008, 2008, 5214 : 366 - +
  • [33] Cooperation in context-free grammars
    Dassow, J
    Mitrana, V
    THEORETICAL COMPUTER SCIENCE, 1997, 180 (1-2) : 353 - 361
  • [34] INDEXED GRAMMARS - AN EXTENSION OF CONTEXT-FREE GRAMMARS
    AHO, AV
    JOURNAL OF THE ACM, 1968, 15 (04) : 647 - &
  • [35] On translating context-free grammars into Lambek grammars
    Kuznetsov, S. L.
    PROCEEDINGS OF THE STEKLOV INSTITUTE OF MATHEMATICS, 2015, 290 (01) : 63 - 69
  • [37] From context-free grammars to OPR-Grammars
    Elferchichi, Anis
    Essalmi, Fathi
    Ferchichi, Ahmed
    3rd International Conference on Education and Information Systems: Technologies and Applications, Vol 1, Proceedings, 2005, : 161 - 166
  • [38] Modelling dynamics with context-free grammars
    Garcia-Huerta, Juan-M.
    Jimenez-Hernandez, Hugo
    Herrera-Navarro, Ana-M.
    Hernandez-Diaz, Teresa
    Terol-Villalobos, Ivan
    VIDEO SURVEILLANCE AND TRANSPORTATION IMAGING APPLICATIONS 2014, 2014, 9026
  • [39] Context-free grammars and XML languages
    Bertoni, Alberto
    Choffrut, Christian
    Palano, Beatrice
    DEVELOPMENTS IN LANGUAGE THEORY, PROCEEDINGS, 2006, 4036 : 108 - 119
  • [40] Estimation of probabilistic context-free grammars
    Chi, ZY
    Geman, S
    COMPUTATIONAL LINGUISTICS, 1998, 24 (02) : 299 - 305