scispace - formally typeset
Search or ask a question

Showing papers on "Context-sensitive 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: 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


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


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

15 citations


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.

13 citations


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.

9 citations


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

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.

Proceedings ArticleDOI
28 Jan 1980
TL;DR: Related complexity results are presented for several problems for the regular grammars, program schemes, and monadic program schemes.
Abstract: Efficient algorithms are presented for several grammar problems relevant to compiler construction. These problems include(i) testing, for a reduced context-free grammar G and an LL(k), uniquely invertible, or BRC(m,n) grammar H, if G is structurally contained by H, and(ii) testing, for a reduced context-free grammar G and a structurally unambiguous grammar H, if G is Reynolds covered by H or if there is an on to homomorphisem from G to H.Related complexity results are presented for several problems for the regular grammars, program schemes, and monadic program schemes.

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.


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.

Proceedings ArticleDOI
30 Sep 1980
TL;DR: It is illustrated that an attribute grammar for the translation of natural language sentences into expressions of the predicate calculus language can be done in a straightforward way and further improvements of the resulting attribute grammar are outlined.
Abstract: Summary Starting from an ATN-grammar and translation rules assigning expressions of a predicate calculus language to the symbols of the grammar one can produce an attribute grammar for the translation of natural language sentences (here German) into expressions of the predicate calculus language. The paper illustrates that this can be done in a straightforward way and outlines further improvements of the resulting attribute grammar.


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

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.

Proceedings ArticleDOI
30 Sep 1980
TL;DR: A modification of Prolog has been implemented which allows "floating terminals" to be included in a metamorphosis grammar together with some information enabling to control the search for such a terminal in the unprocessed part of the input.
Abstract: The Prolog programming language allows the user to write powerful parsers in the form of metamorphosis grammars. However, the metamorhosis grammars, as defined by Colmerauer2, have to specify strictly the order of terminal and nonterminal symbols. A modification of Prolog has been implemented which allows "floating terminals" to be included in a metamorphosis grammar together with some information enabling to control the search for such a terminal in the unprocessed part of the input. The modification is illustrated by several examples from the Polish language and some open questions are discussed.


Journal ArticleDOI
TL;DR: It is shown that several natural, undecidable properties of grammars are such that the size of the smallest Turing machine which correctly answers questions of length n grows at a nearly maximal rate as n grows.
Abstract: It is shown that several natural, undecidable properties of grammars are such that the size of the smallest Turing machine which correctly answers questions of length n grows at a nearly maximal rate as n grows. Thus, in a certain sense, even the finite initial segments of these properties are very complex. In fact, there are natural recursively enumerable properties of grammars such that if it is required that programs run in any fixed recursive time, then the same results hold. The present techniques also enable specific Boolean functionsfn to be exhibited, such that computingfn by a combinational circuit requires a number of gates exponential in the number of inputs tof,.

Book ChapterDOI
14 Jul 1980
TL;DR: Restricting the size of attribute values, relative to the length of the string under consideration, leads to a model of attribute Grammars in which grammars with both inherited and synthesized attributes can be significantly more economical than grammar with synthesized attribute only.
Abstract: Restricting the size of attribute values, relative to the length of the string under consideration, leads to a model of attribute grammars in which grammars with both inherited and synthesized attributes can be significantly more economical than grammars with synthesized attributes only.

Journal ArticleDOI
TL;DR: The graph of a set grammar is introduced in such a way that each set rule of the grammar is represented by a cartesian subgraph of it, and the equivalence between homogeneous parallel permit grammars and set Grammars (and Petri nets) is proved.
Abstract: The graph of a set grammar is introduced in such a way that each set rule of the grammar is represented by a cartesian subgraph of it. The correspondence between cartesian subgraphs and transitions of Petri nets (which satisfy the axiom of extensionality) is established. The set grammars with input (initial) and output (terminal) elements are studied in an analogy to Chomsky's string grammars and their strong equivalence. Permit rules and parallel permit rules are introduced in such a way that parallel permit grammars are more general tools than Petri nets themselves, because the equivalence between homogeneous parallel permit grammars and set grammars (and Petri nets) is proved.