scholarly journals Analyzing Ambiguity of Context-Free Grammars

2007 ◽  
Vol 14 (10) ◽  
Author(s):  
Claus Brabrand ◽  
Robert Giegerich ◽  
Anders Møller

It has been known since 1962 that the ambiguity problem for context-free grammars is undecidable. Ambiguity in context-free grammars is a recurring problem in language design and parser generation, as well as in applications where grammars are used as models of real-world physical structures.<br /> <br />We observe that there is a simple linguistic characterization of the grammar ambiguity problem, and we show how to exploit this to conservatively approximate the problem based on local regular approximations and grammar unfoldings. As an application, we consider grammars that occur in RNA analysis in bioinformatics, and we demonstrate that our static analysis of context-free grammars is sufficiently precise and efficient to be practically useful.

2006 ◽  
Vol 13 (9) ◽  
Author(s):  
Claus Brabrand ◽  
Robert Giegerich ◽  
Anders Møller

<p>It has been known since 1962 that the ambiguity problem for context-free grammars is undecidable. Ambiguity in context-free grammars is a recurring problem in language design and parser generation, as well as in applications where grammars are used as models of real-world physical structures. However, the fact that the problem is undecidable does not mean that there are no useful <em>approximations</em> to the problem.<br /> <br />We observe that there is a simple linguistic characterization of the grammar ambiguity problem, and we show how to exploit this to conservatively approximate the problem based on local regular approximations and grammar unfoldings. As an application, we consider grammars that occur in RNA analysis in bioinformatics, and we demonstrate that our static analysis of context-free grammars is sufficiently precise and efficient to be practically useful.</p><p> </p><p>Full text: <a href="http://dx.doi.org/10.1016/j.scico.2009.11.002" target="_self">http://dx.doi.org/10.1016/j.scico.2009.11.002</a></p>


1996 ◽  
Vol 2 (1) ◽  
pp. 1-13 ◽  
Author(s):  
MARK-JAN NEDERHOF

We discuss the random generation of strings using the grammatical formalism AGFL. This formalism consists of context-free grammars extended with a parameter mechanism, where the parameters range over a finite domain. Our approach consists in static analysis of the combinations of parameter values with which derivations can be constructed. After this analysis, generation of sentences can be performed without backtracking.


2006 ◽  
Vol 13 (10) ◽  
Author(s):  
Christian Kirkegaard ◽  
Anders Møller

We present an approach for statically reasoning about the behavior of Web applications that are developed using Java Servlets and JSP. Specifically, we attack the problems of guaranteeing that all output is well-formed and valid XML and ensuring consistency of XHTML form fields and session state. Our approach builds on a collection of program analysis techniques developed earlier in the JWIG and X<small>ACT</small> projects, combined with work on balanced context-free grammars. Together, this provides the necessary foundation concerning reasoning about output streams and application control flow.


2020 ◽  
Vol 23 (6) ◽  
pp. 1301-1323
Author(s):  
Oleg Konstantinovich Osipov

Analysis of various presentations for context free grammars provided with parser generators. A new description format of context free grammars is proposed. Given a representation of context free grammar in JSON format. The concept of a new parser generator based on JSON data format of describing context free grammars is presented. Described a parser generation scheme based on that concept.


1999 ◽  
Vol 10 (01) ◽  
pp. 61-79 ◽  
Author(s):  
JÜRGEN DASSOW ◽  
HENNING FERNAU ◽  
GHEORGHE PĂUN

Matrix grammars are one of the classical topics of formal languages, more specifically, regulated rewriting. Although this type of control on the work of context-free grammars is one of the earliest, matrix grammars still raise interesting questions (not to speak about old open problems in this area). One such class of problems concerns the leftmost derivation (in grammars without appearance checking). The main point of this paper is the systematic study of all possibilities of defining leftmost derivation in matrix grammars. Twelve types of such a restriction are defined, only four of which being discussed in literature. For seven of them, we find a proof of a characterization of recursively enumerable languages (by matrix grammars with arbitrary context-free rules but without appearance checking). Other three cases characterize the recursively enumerable languages modulo a morphism and an intersection with a regular language. In this way, we solve nearly all problems listed as open on page 67 of the monograph [7], which can be seen as the main contribution of this paper. Moreover, we find a characterization of the recursively enumerable languages for matrix grammars with the leftmost restriction defined on classes of a given partition of the nonterminal alphabet.


2006 ◽  
Vol 13 (8) ◽  
Author(s):  
Christian Kirkegaard ◽  
Anders Møller

We present an approach for statically reasoning about the behavior of Web applications that are developed using Java Servlets and JSP. Specifically, we attack the problems of guaranteeing that all output is well-formed and valid XML and ensuring consistency of XHTML form fields and session state. Our approach builds on a collection of program analysis techniques developed earlier in the JWIG and X<small>ACT</small> projects, combined with work on balanced context-free grammars. Together, this provides the necessary foundation concerning reasoning about output streams and application control flow.


10.37236/4413 ◽  
2015 ◽  
Vol 22 (2) ◽  
Author(s):  
David Callan ◽  
Shi-Mei Ma ◽  
Toufik Mansour

The purpose of this paper is to investigate several context-free grammars suggested by the Lotka-Volterra system. Some combinatorial arrays, involving the Stirling numbers of the second kind and Eulerian numbers, are generated by these context-free grammars. In particular, we present grammatical characterization of some statistics on cyclically ordered partitions.


2020 ◽  
Author(s):  
Stephen Charles Van Hedger ◽  
Ingrid Johnsrude ◽  
Laura Batterink

Listeners are adept at extracting regularities from the environment, a process known as statistical learning (SL). SL has been generally assumed to be a form of “context-free” learning that occurs independently of prior knowledge, and SL experiments typically involve exposing participants to presumed novel regularities, such as repeating nonsense words. However, recent work has called this assumption into question, demonstrating that learners’ previous language experience can considerably influence SL performance. In the present experiment, we tested whether previous knowledge also shapes SL in a non-linguistic domain, using a paradigm that involves extracting regularities over tone sequences. Participants learned novel tone sequences, which consisted of pitch intervals not typically found in Western music. For one group of participants, the tone sequences used artificial, computerized instrument sounds. For the other group, the same tone sequences used familiar instrument sounds (piano or violin). Knowledge of the statistical regularities was assessed using both trained sounds (measuring specific learning) and sounds that differed in pitch range and/or instrument (measuring transfer learning). In a follow-up experiment, two additional testing sessions were administered to gauge retention of learning (one day and approximately one-week post-training). Compared to artificial instruments, training on sequences played by familiar instruments resulted in reduced correlations among test items, reflecting more idiosyncratic performance. Across all three testing sessions, learning of novel regularities presented with familiar instruments was worse compared to unfamiliar instruments, suggesting that prior exposure to music produced by familiar instruments interfered with new sequence learning. Overall, these results demonstrate that real-world experience influences SL in a non-linguistic domain, supporting the view that SL involves the continuous updating of existing representations, rather than the establishment of entirely novel ones.


Sign in / Sign up

Export Citation Format

Share Document