scholarly journals Equivalent Transformations and Regularization in Context-Free Grammars

2015 ◽  
Vol 14 (4) ◽  
pp. 29-44 ◽  
Author(s):  
Ludmila Fedorchenko ◽  
Sergey Baranov

Abstract Regularization of translational context-free grammar via equivalent transformations is a mandatory step in developing a reliable processor of a formal language defined by this grammar. In the 1970-ies, the multi-component oriented graphs with basic equivalent transformations were proposed to represent a formal grammar of ALGOL-68 in a compiler for IBM/360 compatibles. This paper describes a method of grammar regularization with the help of an algorithm of eliminating the left/right-hand side recursion of nonterminals which ultimately converts a context-free grammar into a regular one. The algorithm is based on special equivalent transformations of the grammar syntactic graph: elimination of recursions and insertion of iterations. When implemented in the system SynGT, it has demonstrated over 25% reduction of the memory size required to store the respective intermediate control tables, compared to the algorithm used in Flex/Bison parsers.

Author(s):  
Wan Heng Fong ◽  
Aqilahfarhana Abdul Rahman ◽  
Nor Haniza Sarmin ◽  
Sherzod Turaev

Sticker systems and Watson-Crick automata are two modellings of DNA molecules in DNA computing. A sticker system is a computational model which is coded with single and double-stranded DNA molecules; while Watson-Crick automata is the automata counterpart of sticker system which represents the biological properties of DNA. Both of these models use the feature of Watson-Crick complementarity in DNA computing. Previously, the grammar counterpart of the Watson-Crick automata have been introduced, known as Watson-Crick grammars which are classified into three classes: Watson-Crick regular grammars, Watson-Crick linear grammars and Watson-Crick context-free grammars. In this research, a new variant of Watson-Crick grammar called a static Watson-Crick context-free grammar, which is a grammar counterpart of sticker systems that generates the double-stranded strings and uses rule as in context-free grammar, is introduced. The static Watson-Crick context-free grammar differs from a dynamic Watson-Crick context-free grammar in generating double-stranded strings, as well as for regular and linear grammars. The main result of the paper is to determine the generative powers of static Watson-Crick context-free grammars. Besides, the relationship of the families of languages generated by Chomsky grammars, sticker systems and Watson-Crick grammars are presented in terms of their hierarchy.


2008 ◽  
Vol 19 (04) ◽  
pp. 845-857
Author(s):  
BEATRICE PALANO

We define a complexity measure on context-free grammars called end. Roughly speaking, for a context-free grammar G, endG(n) measures the distance of variables from the ends of sentential forms along the derivations of words in L(G) of length n. We prove in a constructive way the regularity of L(G)wheneverendG(n)is constant. Yet, we improve on this by showing that ifL(G)is nonregular thenendG(n) = Ω∞( log n). We establish the optimality of such bound. Finally, we show that, in case of unambiguous context-free grammars, the end lower bound for generating nonregular languages turns out to be linear.


Triangle ◽  
2018 ◽  
pp. 101
Author(s):  
Benedek Nagy

In this paper we discuss parallel derivations for context-free, contextsensitive and phrase-structure grammars. For regular and linear grammars only sequential derivation can be applied, but a kind of parallelism is present in linear grammars. We show that nite languages can be generated by a recursion-free rule-set. It is well-known that in context-free grammars the derivation can be in maximal (independent) parallel way. We show that in cases of context-sensitive and recursively enumerable languages the parallel branches of the derivation have some synchronization points. In the case of context-sensitive grammars this synchronization can only be local, but in a derivation of an arbitrary grammar we cannot make this restriction. We present a framework to show how the concept of parallelism can be t to the derivations in formal language theory using tokens.


2019 ◽  
Vol 53 (2) ◽  
pp. 125-137
Author(s):  
Juan Triana ◽  
Rodrigo De Castro

In this paper some properties, examples and counterexamples about the formal derivative operator defined with respect to context-free grammars are presented. In addition, we show a connection between the context-free grammar G = { a → abr; b → br+1 } and multifactorial numbers. Some identities involving multifactorial numbers will be obtained by grammatical methods.


Author(s):  
Carlos Martín-Vide

This article introduces the preliminaries of classical formal language theory. It outlines the main classes of grammars as language-generating devices and automata as language-recognizing devices. It offers a number of definitions and examples and presents the basic results. It classifies grammar according to several criteria. The most widespread one is the form of their productions. This article presents a systematic study of the common properties of language families has led to the theory of abstract families of languages. It shows that a context-free grammar generates not only a set of strings, but a set of trees too: each one of the trees is associated with a string and illustrates the way this string is derived in the grammar.


1975 ◽  
Vol 4 (43) ◽  
Author(s):  
Grzegorz Rozenberg ◽  
Arto Salomaa

It is shown that every context-sensitive language can be generated by a context-free grammar with graph control over sets of productions. This can be done in two different ways, corresponding to unconditional transfer programmed grammars and programmed grammars with empty failure fields. Also some results concerning ordinary programmed grammars are established.


2014 ◽  
Vol 22 (2) ◽  
pp. 141-154
Author(s):  
Dusan Repel ◽  
Ingo Stengel

Purpose – This research aims to propose an attack that de-obfuscates codes by exploiting the properties of context-free grammars since it is important to understand the strength of obfuscation provided by context-free grammar-based obfuscators. In addition, the possibility of automatically generated transformations is explored. Design/methodology/approach – As part of our empirical investigation, a development environment for obfuscating transformations is built. The tool is used to simulate a context-free obfuscator and to devise ways of reversing such transformations. Furthermore, a theoretical investigation of subset grammars and subset languages is carried out. Findings – It is concluded that context-free grammar-based obfuscators provide limited levels of protection. Nevertheless, their application is appropriate when combined with other obfuscating techniques. Research limitations/implications – The algorithms behave as expected on a limited number of test samples. Further work is required to increase their practicality and to establish their average reliability. Originality/value – This research shows how a frequency analysis attack can threaten the security of code scrambled by context-free grammar-based obfuscators.


2012 ◽  
Vol 367 (1598) ◽  
pp. 1956-1970 ◽  
Author(s):  
Gerhard Jäger ◽  
James Rogers

The first part of this article gives a brief overview of the four levels of the Chomsky hierarchy, with a special emphasis on context-free and regular languages. It then recapitulates the arguments why neither regular nor context-free grammar is sufficiently expressive to capture all phenomena in the natural language syntax. In the second part, two refinements of the Chomsky hierarchy are reviewed, which are both relevant to the extant research in cognitive science: the mildly context-sensitive languages (which are located between context-free and context-sensitive languages), and the sub-regular hierarchy (which distinguishes several levels of complexity within the class of regular languages).


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.


Author(s):  
M. NIVAT ◽  
A. SAOUDI

We investigate the complexity of the recognition of images generated by a class of context-free image grammars. We show that the sequential time complexity of the recognition of an n × n image as generated by a context-free grammar is O(nM(n)), where M(n) is the time to multiply two boolean n × n matrices. The space complexity of this recognition is O(n3). Using a parallel random access machine (i.e. PRAM), the recognition can be done in O( log 2(n)) time with n7 processors or in O(n log 2(n)) time with n6 processors. We also introduce high dimensional context-free grammars and prove that their recognition problem is polylogarithmic.


Sign in / Sign up

Export Citation Format

Share Document