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 条
  • [21] PREDICTORS OF CONTEXT-FREE GRAMMARS
    TAI, KC
    SIAM JOURNAL ON COMPUTING, 1980, 9 (03) : 653 - 664
  • [22] CONTEXT-FREE GRAPH GRAMMARS
    DELLAVIGNA, P
    GHEZZI, C
    INFORMATION AND CONTROL, 1978, 37 (02): : 207 - 233
  • [23] On Muller Context-Free Grammars
    Esik, Zoltan
    Ivan, Szabolcs
    DEVELOPMENTS IN LANGUAGE THEORY, 2010, 6224 : 173 - 184
  • [24] On Muller context-free grammars
    Esik, Zoltan
    Ivan, Szabolcs
    THEORETICAL COMPUTER SCIENCE, 2012, 416 : 17 - 32
  • [25] On a construction of context-free grammars
    Martinek, Pavel
    Fundamenta Informaticae, 2000, 44 (03) : 245 - 264
  • [26] ON CONTEXT-FREE PROGRAMMED GRAMMARS
    SEBESTA, RW
    COMPUTER LANGUAGES, 1989, 14 (02): : 99 - 108
  • [27] MINIMIZATION OF CONTEXT-FREE GRAMMARS
    Ryazanov, Yu D.
    Nazina, S., V
    PRIKLADNAYA DISKRETNAYA MATEMATIKA, 2019, (45): : 90 - 96
  • [28] CONTEXT-FREE TEXT GRAMMARS
    EHRENFEUCHT, A
    TENPAS, P
    ROZENBERG, G
    ACTA INFORMATICA, 1994, 31 (02) : 161 - 206
  • [29] Binary Context-Free Grammars
    Turaev, Sherzod
    Abdulghafor, Rawad
    Alwan, Ali Amer
    Abd Almisreb, Ali
    Gulzar, Yonis
    SYMMETRY-BASEL, 2020, 12 (08):
  • [30] Evolving context-free grammars
    Cyre, W
    PROCEEDINGS OF THE 6TH JOINT CONFERENCE ON INFORMATION SCIENCES, 2002, : 643 - 646