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 条
  • [41] The Context-Free Grammars of Artificial Languages
    Gribova, V. V.
    Kleschev, A. S.
    Krylov, D. A.
    AUTOMATIC DOCUMENTATION AND MATHEMATICAL LINGUISTICS, 2013, 47 (02) : 59 - 67
  • [42] Context-free valence grammars - Revisited
    Hoogeboom, HJ
    DEVELOPMENTS IN LANGUAGE THEORY, 2002, 2295 : 293 - 303
  • [43] Context-free grammars with linked nonterminals
    Klein, Andreas
    Kutrib, Martin
    INTERNATIONAL JOURNAL OF FOUNDATIONS OF COMPUTER SCIENCE, 2007, 18 (06) : 1271 - 1282
  • [44] LINEAR AND CONTEXT-FREE GRAPH GRAMMARS
    PAVLIDIS, T
    JOURNAL OF THE ACM, 1972, 19 (01) : 11 - &
  • [45] DERIVATIONAL COMPLEXITY OF CONTEXT-FREE GRAMMARS
    SIPPU, S
    INFORMATION AND CONTROL, 1982, 53 (1-2): : 52 - 65
  • [46] Context-free Grammars for Triangular Arrays
    Robert X.J.HAO
    Larry X.W.WANG
    Harold R.L.YANG
    Acta Mathematica Sinica, 2015, 31 (03) : 445 - 455
  • [47] MAP ESTIMATION OF CONTEXT-FREE GRAMMARS
    BANERJEE, S
    ROSENFELD, A
    PATTERN RECOGNITION LETTERS, 1992, 13 (02) : 95 - 101
  • [48] Weighted Multiple Context-Free Grammars
    Inoue, Yusuke
    Hashimoto, Kenji
    Seki, Hiroyuki
    IEICE TRANSACTIONS ON INFORMATION AND SYSTEMS, 2023, E106D (03) : 309 - 318
  • [49] XML validation for context-free grammars
    Minamide, Yasuhiko
    Tozawa, Akihiko
    PROGRAMMING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2006, 4279 : 357 - +
  • [50] Certified Normalization of Context-Free Grammars
    Firsov, Denis
    Uustalu, Tarmo
    CPP'15: PROCEEDINGS OF THE 2015 ACM CONFERENCE ON CERTIFIED PROGRAMS AND PROOFS, 2015, : 167 - 174