scispace - formally typeset
Search or ask a question

Showing papers on "Context-free grammar published in 1980"


Journal ArticleDOI
TL;DR: Ordered attributed grammars are defined as a large subclass of semantically well-defined attributed Grammar proposed by Knuth, which describe the control flow of an algorithm for attribute evaluation which can be part of an automatically generated compiler.
Abstract: Ordered attributed grammars are defined as a large subclass of semantically well-defined attributed grammars proposed by Knuth. An attributed grammar is ordered if for each symbol a partial order over the associated attributes can be given, such that in any context of the symbol the attributes are evaluable in an order which includes that partial order. The definition does not refer to a predefined strategy for attribute evaluation, e.g. several passes from left to right. For each attributed grammar evaluable by any predefined evaluation strategy such an order exists. The ordering property can be checked by an algorithm, which depends polynomially in time on the size of the input grammar. "Visit-sequences" are computed from the attribute dependencies given by an ordered attributed grammar. They describe the control flow of an algorithm for attribute evaluation which can be part of an automatically generated compiler.

255 citations


Journal ArticleDOI
TL;DR: Surprisingly close connections between the Cocke-Kasami-Younger and Earley algorithms are established which reveal that the two algorithms are “almost” identical.
Abstract: A new algorithm for recognizing and parsing arbitrary context-free languages is presented, and several new results are given on the computational complexity of these problems. The new algorithm is of both practical and theoretical interest. It is conceptually simple and allows a variety of efficient implementations, which are worked out in detail. Two versions are given which run in faster than cubic time. Surprisingly close connections between the Cocke-Kasami-Younger and Earley algorithms are established which reveal that the two algorithms are “almost” identical.

240 citations


Journal ArticleDOI
TL;DR: The main theorem is a result on the combinatorial structure of graph languages generated by NLC grammars; it resembles the pumping theorem for context-free string languages.

163 citations


Journal ArticleDOI
TL;DR: An approach to the syntactic analysis of biopolymers is developed using context-free and context-sensitive grammars applied to the description of polypeptides and polynucleotides and it is shown that the derivational length has a tendency to increase along phylogenetic pathways.
Abstract: Based on Chomsky's hierarchy of phrase structure grammars and on the complexity concept of Kolmogorov and Chaitin, an approach to the syntactic analysis of biopolymers is developed. Context-free and context-sensitive grammars are applied to the description of polypeptides and polynucleotides. The length of the minimal grammar program generating the sequence is used as a measure of its complexity, and the number of rules (derivational length) as a measure of the grammar structure. 25 DNA, RNA, and protein sequences are analyzed. It is shown that the derivational length has a tendency to increase along phylogenetic pathways. A proposal is made to connect the replication rates in the Eigen-Schuster theory with the concepts developed here.

95 citations


Journal ArticleDOI
TL;DR: Three topics are investigated quite thoroughly: (1) the role of the connection relation in an NLC grammar, (2) “context-freeness” of NLC grammars, and (3) the ability of N LC grammARS to generate string languages.

85 citations


Book
01 Sep 1980
TL;DR: This monograph develops a theory of grammatical covers, normal forms and parsing by introducing algorithms that describe a transformation of an input grammar into an output grammar which satisfies the requirements.
Abstract: This monograph develops a theory of grammatical covers, normal forms and parsing. Covers, formally defined in 1969, describe a relation between the sets of parses of two context-free grammars. If this relation exists then in a formal model of parsing it is possible to have, except for the output, for both grammars the same parser. Questions concerning the possibility to cover a certain grammar with grammars that conform to some requirements on the productions or the derivations will be raised and answered. Answers to these cover problems will be obtained by introducing algorithms that describe a transformation of an input grammar into an output grammar which satisfies the requirements. The main emphasis in this monograph is on transformations of context-free grammars to context-free grammars in some normal form. However, not only transformations of this kind will be discussed, but also transformations which yield grammars which have useful parsing properties.

67 citations


Journal ArticleDOI
TL;DR: An algorithm is given which computes an explicit solution using a shuffle opération on words which can be proven equal to the previous one so that the structure of the frontier s of infinité trees is completely analyzed for those context-free grammars which contain exactly one production rule for each syntactic variable.
Abstract: — The solutions offixed-point équations for generalized (infinité) mords have previously been obtained asfrontiers of infinité trees. An algorithm is given which computes an explicit solution using a shuffle opération on words. This solution can be proven equal to the previous one so that the structure of the frontier s of infinité trees is completely analyzedfor those context-free grammars which contain exactly one production rulefor each syntactic variable. Résumé. — On sait que les solutions d'équations au point fixe pour les mots généralisés [infinis) peuvent être obtenues comme frontières d'arbres infinis. Dans cet article, on donne un algorithme qui calcule une solution explicite grâce à une opération de mélange (shuffle) sur les mots. On peut montrer que cette solution est égale à la précédente, de sorte que la structure des frontières d'arbres infinis est complètement élucidée dans le cas des grammaires algébriques ayant exactement une règle de réécriture pour chaque variable syntactique.

55 citations


Book ChapterDOI
Ole Madsen1
14 Jan 1980
TL;DR: An efficient evaluator that works for all attribute grammars (including some circular ones) is described and it is shown how an attribute grammar may be reformulated as a tree rewriting system.
Abstract: The possibilities for defining predicate transformers, denotational semantics, and operational semantics by means of extended attribute grammars are treated. The approach to operational semantics consists of a set of attribute grammar rules that specifies the possible transformations upon a given program. A proposal for defining the domains of an attribute grammar within the formalism is given. It is also shown how an attribute grammar may be reformulated as a tree rewriting system. Finally an efficient evaluator that works for all attribute grammars (including some circular ones) is described. This evaluator constructs during a left-to-right scan of a linear representation of the parse tree (a right-parse) a directed (acyclic) graph that represents the values of the attributes at the root of the parse tree. The parse tree itself need not be constructed. During a (recursive) scan of this graph the attribute values may be evaluated.

35 citations


Book
01 Jan 1980

28 citations


Journal ArticleDOI
TL;DR: Under very natural restrictions it can be shown that for two-level grammars pairs (G, G′) there exists a 1 — 1 correspondence between leftmost derivations in G and left most derivation in G′.
Abstract: Making use of the fact that two-level grammars (TLGs) may be thought of as finite specification of context-free grammars (CFGs) with "infinite" sets of productions, known techniques for parsing CFGs are applied to TLGs by first specifying a canonical CFG G? -- called skeleton grammar -- obtained from the "cross-reference" of the TLG G. Under very natural restrictions it can be shown that for these grammar pairs (G, G?) there exists a 1 -- 1 correspondence between leftmost derivations in G and leftmost derivations in G?. With these results a straightforward parsing algorithm for restricted TLGs is given.

16 citations


Journal ArticleDOI
TL;DR: The notion of a universal grammar is investigated in this framework, demonstrating the existence of selection universal grammars under weak conditions on the selection family.
Abstract: Selective substitution grammars first introduced by Rozenberg are further investigated In particular we study `context-free grammars' with selection, since the original model is too general in its generative power It is shown how the families of context-free, EOL and ETOL languages can be characterized by selective context-free grammars Further the effect of linguistic restrictions on the family of selection languages is investigated Finally, the notion of a universal grammar is investigated in this framework, demonstrating the existence of selection universal grammars under weak conditions on the selection family

Journal ArticleDOI
TL;DR: A practical method is presented for the automatic generation of a non-recursive context-free grammar (cfg) from a set of strings that the cfg is required to be capable of producing.
Abstract: A practical method is presented for the automatic generation of a non-recursive context-free grammar (cfg) from a set of strings that the cfg is required to be capable of producing. The method is efficient in computing time by comparison with enumerative methods.

Journal ArticleDOI
TL;DR: This work defines tree grammars without left (or on the top) recursivity and shows they generate exactly the class of Greibach's tree languages, and proves the closure of that class under linear inverse homomorphism.
Abstract: Rounds has defined the class of context-free tree languages and proved its closure properties under linear homomorphism and intersection with regular sets of trees The open problem of closure under linear inverse homomorphism has just been solved negatively As for context-free grammars we can define Greibach's forms for context-free grammars of tree languages Unfortunately there are context-free tree languages without Greibach's grammar We define tree grammars without left (or on the top) recursivity and show they generate exactly the class of Greibach's tree languages Then we prove the closure of that class under linear inverse homomorphism This result proves that Greibach's tree languages are strictly contained in context-free tree languages

Journal ArticleDOI
01 Mar 1980
TL;DR: It is shown that there are translations specified by 1-visit anribute grammars that cannot be specified by any k left-to-right pass attribute grammar (when some conditions are satisfied), and it turns out that any well-defined attribute grammar is k-visIT for some k.
Abstract: This thesis is a contribution to the development of a formal theory for attribute grammars, their languages and their translations. There are given precise definitions of an attribute grammar, the language recognized by the attribute grammar and the translation specified by the attribute grammar. The various definitions are compared with some alternative ones. Based on properties of the translation specified by an attribute grammar two new subclasses of attribute grammars are introduced: the determinate and the unambiguous attribute grammars. Furthermore the concept of an evaluator is considered. Based on properties of an evaluator for an attribute grammar some new subclasses of attribute grammars are introduced: the k-visit attribute grammars and the k left-to-right pass attribute grammars (k is an integer). It turns out that the k-visit as well as the k left-to-right pass attribute grammars define proper hierarchies of translations when some conditions are satisfied. It is also shown that there are translations specified by 1-visit anribute grammars that cannot be specified by any k left-to-right pass attribute grammar (when some conditions are satisfied). On the other hand it turns out that any well-defined attribute grammar is k-visit for some k.

Journal ArticleDOI
TL;DR: A new type of grammar called a DOS system is introduced and investigated, which formalizes the notion of a context free grammar without variables that is generatively deterministic.
Abstract: A new type of grammar called a DOS system is introduced and investigated. Essentially it formalizes the notion of a context free grammar without variables that is generatively deterministic.

Journal ArticleDOI
TL;DR: In this paper, Mouton adopts the L-view and investigates the generative power of various rule ordering theories, including total ordering, partial ordering, semi ordering, and random ordering.
Abstract: One way of 'restricting linguistic theory' is the L-view: place sufficient restrictions on the allowable rules of grammars so as to reduce their generative power. Another way is the G-view: disallow certain grammars, regardless of whether this results in a reduction of generative capacity. The present paper adopts the L-view and, consequently, investigates the generative power of various theories. One area in linguistics where restrictions on linguistic theory have been advocated is in the ordering (within the cycle) of the application of the rules which generate the language. We consider eight proposals: Total Ordering; Partial Ordering (= Total Ordering plus iterative application); Semi Ordering ( = Anderson's 'local ordering' without iterative application); Semi Partial Ordering ( = Semi Ordering plus iterative application); Unorder ings ( = Ringen 'Condition VI, unmodified'); Quasi Orderings ( = Ringen 'Condition VI, modified'); Random Orderings; and Simultaneous Application. If, for any grammar obeying rule ordering conditions A there is a grammar obeying rule ordering conditions B which contains exactly the same class of derivations, then rule ordering theory B is at least as powerful in strong generative capacity as rule ordering theory A. Similar considerations are used to define the notions of equivalent, more powerful, and noncomparable in strong generative capacity. A series of theorems are proved showing the relative strength of the eight rule ordering theories. Some linguists who advocate 'random ordering' actually have in mind random ordering plus some 'universal principles'. We investigate the effect of four of these principles from the standpoint of the L-view, showing that two of them are strongly equivalent to total orderings and that two of them are intermediate between total and partial orderings. We close with an indication of what the role of mathematical linguistics should be for the ordinary working linguist. Linguistics 18 (1980), 017-072. 0024-3949/80/0018-0017 $2.00 © Mouton Publishers, The Hague Brought to you by | University of Alberta Library

Journal ArticleDOI
TL;DR: A predictor of a context-free grammar G is a substring of a sentence in $L(G)$ which determines unambiguously the contents of the parse stack immediately before (in top-down parsing) or after (in bottom-up parsing) symbols of the predictor are processed.
Abstract: A predictor of a context-free grammar G is a substring of a sentence in $L(G)$ which determines unambiguously the contents of the parse stack immediately before (in top-down parsing) or after (in bottom-up parsing) symbols of the predictor are processed. Two types of predictors are defined, one for bottom-up parsers and the other for top-down parsers. Algorithms for finding predictors are given and the possible applications of predictors are discussed.

Proceedings Article
14 Jul 1980
TL;DR: In this article, the formal power of attribute-grammars (AGs) is studied and a partial characterization of the power of arbitrary AGs is given. And the results on deciding whether an AG is (left-to-right) multi-pass are given.
Abstract: The purpose of this paper is to study the formal power of certain classes of attribute-grammars (AG). We first consider the class of 1S-AG and extend a result of [DPSS]. Then we compare the formal power of "one-visit" AG with that of related types of AG. Finally, using a partial characterization of the formal power of arbitrary AG we prove some results on deciding whether an AG is (left-to-right) multi-pass.

Journal ArticleDOI
TL;DR: This paper considers an analogous extension of the LL(k) grammars called the LL-regular Grammars, an extension ofThe LR(k), and the relation of this class of grammARS to other classes of gramMars will be shown.
Abstract: Culik II and Cogen introduced the class of LR-regular grammars, an extension of the LR(k) grammars. In this paper we consider an analogous extension of the LL(k) grammars called the LL-regular grammars. The relation of this class of grammars to other classes of grammars will be shown. Any LL-regular grammar is an LR-regular grammar. Properties of LL(k) grammars can be generalized to properties of LL-regular grammars.

Journal ArticleDOI
TL;DR: It is shown that the family of all linear grammars with a fixed ratio between the sizes of the terminal strings on both sides of the nonterminal in a right-hand side of production has a decidable equivalence problem.
Abstract: It is shown that the family of all linear grammars with a fixed ratio between the sizes of the terminal strings on both sides of the nonterminal in a right-hand side of production (which we call uniform linear grammars) has a decidable equivalence problem. The corresponding language family is properly contained in the linear unambiguous context-free languages and contains some nondeterministic languages.


Book ChapterDOI
15 Jun 1980
TL;DR: This paper applies the formalism of hypergraphs and hypergraph context free grammars to characterize and investigate various aspects of logical data base design.
Abstract: In this paper we apply the formalism of hypergraphs and hypergraph context free grammars to characterize and investigate various aspects of logical data base design.


Journal ArticleDOI
TL;DR: It is proved that any ɛ-free context- free grammar can be right covered with a context-free grammar in Greibach normal form.
Abstract: An overview is given of cover results for normal forms of context-free grammars. The emphasis in this paper is on the possibility of constructing ?-free grammars, non-left-recursive grammars and grammars in Greibach normal form. Among others it is proved that any ?-free context-free grammar can be right covered with a context-free grammar in Greibach normal form. All the cover results concerning the ?-free grammars, the non-left-recursive grammars and the grammars in Greibach normal form are listed, with respect to several types of covers, in a cover-table.

Book ChapterDOI
14 Jul 1980
TL;DR: This paper considers the class of 1S-AG and extends a result of [DPSS], and compares the formal power of "one-visit" AG with that of related types of AG.
Abstract: The purpose of this paper is to study the formal power of certain classes of attribute-grammars (AG). We first consider the class of 1S-AG and extend a result of [DPSS]. Then we compare the formal power of "one-visit" AG with that of related types of AG. Finally, using a partial characterization of the formal power of arbitrary AG we prove some results on deciding whether an AG is (left-to-right) multi-pass.

Journal ArticleDOI
TL;DR: The parsing algorithm developed for left context precedence languages works with linear time and has the viable prefix property which is a stronger property than the correct prefix property.
Abstract: Left context precendence grammars which are defined in this paper are a proper subclass of the precedence grammars and contain properly the simple precedence grammars. Left context precedence grammars need not be uniquely invertible. The parsing algorithm developed for left context precedence languages works with linear time and has the viable prefix property which is a stronger property than the correct prefix property.

Journal ArticleDOI
01 Jun 1980
TL;DR: It is shown using a pumping argument, that given a well-defined grammar G and an integer k it is decidable whether G is k-visit, and that the k-Visit attribute grammars specify a proper hierarchy with respect to translations.
Abstract: An attribute grammar G is k-visit if for any derivation tree t of G it is possible to evaluate all the attributes associated with t by walking through t in such a way that no node in t is visited more than k times. We show in this paper that any well-defined attribute grammar G is k-visit for some k. Furthermore it is shown using a pumping argument, that given a well-defined grammar G and an integer k it is decidable whether G is k-visit. Thus we can effectively for any well-defined attribute grammar G find the minimal k such that G is k-visit. Finally we show that the k-visit attribute grammars specify a proper hierarchy with respect to translations.

Journal ArticleDOI
TL;DR: It is shown that an e -free language is regular iff it is a column language of a depth increasing SR2DM3 grammar which is length consistent, and the existence of a hierarchy between the regular and context-sensitive languages which are column languages of non-length consistent depth increase grammars is derived by formulating a machine characterization of these languages.
Abstract: The shape regulated 2-dimensional matrix grammars of type 3 (SR2DM3 grammars), and a subclass of them, the depth increasing SR2DM3 grammars, are introduced For each grammar in the latter class, we associate a 1-dimensional language, called its column language It is shown that an e -free language is regular iff it is a column language of a depth increasing SR2DM3 grammar which is length consistent The existence of a hierarchy between the regular and context-sensitive languages which are column languages of non-length consistent depth increasing SR2DM3 grammars is derived by formulating a machine characterization of these languages Results concerning the structure of SR2DM3 grammars are also exhibited

Journal ArticleDOI
TL;DR: It is shown that if an E0L language has the negative prefix property and is E OL-unambiguous, then K+ is also EOL- unambiguous and several conjectures concerning ambiguity of EOL languages are disproved.

Book ChapterDOI
14 Jan 1980
TL;DR: A Recursive Backup Parsing Algorithm, suitable for any context-free grammar which is not left-recursive is presented, together with a heuristic scheme which is particularly effective at the lexical level.
Abstract: Intermediate results and current problems in an ongoing implemention of minimally restricted, possibly ambiguous Affix Grammars are described. Affix Grammars are informally introduced. A Recursive Backup Parsing Algorithm, suitable for any context-free grammar which is not left-recursive is presented, together with a heuristic scheme which is particularly effective at the lexical level. The main intermediate result is a transcription for affixes which allows affixes to be referenced before they are defined. The implementation of context sensitivity, which is the main current problem, is discussed. Other remaining problems are listed.