左角变换的探索
An Exploration of Left-Corner Transformations
AI总结:
本文提出广义左角变换(GLCT),统一左角变换与推测变换以支持半环加权规则并细粒度控制左角移动,同时给出形式关系分析并在九种语言文法上验证其消除左递归的效率。
摘要:
左角变换(Rosenkrantz 和 Lewis,1970)用于从上下文无关文法中消除左递归,这是使文法能够通过简单技术进行自顶向下解析的重要一步。本文对先前的左角变换进行了推广,以支持半环加权的产生式规则,并对哪些左角可以被移动提供更细粒度的控制。我们的广义左角变换(GLCT)源于将左角变换与推测变换(Eisner 和 Blatz,2007)统一起来,最初用于逻辑编程。我们的新变换与推测定义了等价的加权语言。然而,它们的推导树在结构上有一个重要区别:GLCT 用右递归替换左递归,而推测不会。我们还提供了关于 GLCT、推测和原始文法输出之间形式关系的若干技术结果。最后,我们实证研究了 GLCT 在九种语言的文法中消除左递归的效率。
英文摘要:
The left-corner transformation (Rosenkrantz and Lewis, 1970) is used to remove left recursion from context-free grammars, which is an important step towards making the grammar parsable top-down with simple techniques. This paper generalizes prior left-corner transformations to support semiring-weighted production rules and to provide finer-grained control over which left corners may be moved. Our generalized left-corner transformation (GLCT) arose from unifying the left-corner transformation and speculation transformation (Eisner and Blatz, 2007), originally for logic programming. Our new transformation and speculation define equivalent weighted languages. Yet, their derivation trees are structurally different in an important way: GLCT replaces left recursion with right recursion, and speculation does not. We also provide several technical results regarding the formal relationships between the outputs of GLCT, speculation, and the original grammar. Lastly, we empirically investigate the efficiency of GLCT for left-recursion elimination from grammars of nine languages.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。