Regulated rewriting

Regulated rewriting

Regulated rewriting is a specific area of formal languages studying grammatical systems which are able to take some kind of control over the production applied in a derivation step. For this reason, the grammatical systems studied in Regulated Rewriting theory are also called "Grammars with Controlled Derivations". Among such grammars can be noticed:

Matrix Grammars

Basic concepts

Definition
A Matrix Grammar, MG, is a four-tuple G = (N, T, M, S) where
1.- N is an alphabet of non-terminal symbols
2.- T is an alphabet of terminal symbols disjoint with T
3.- M = {m_1, m_2,..., m_n} is a finite set of matrices, which are non-empty sequences m_{i} = [p_{i},...,p_{i_{k(i)] , with k(i)geq 1, and1 leq i leq n, where each p_{i_{j 1leq jleq k(i), is an ordered pairp_{i_{j = (L, R)beingL in (N cup T)^*N(Ncup T)^*, R in (Ncup T)^*these pairs are called "productions", and are denotedL ightarrow R. In these conditions the matrices can be written down asm_i = [L_{i_{1 ightarrow R_{i_{1,...,L_{i_{k(i) ightarrow R_{i_{k(i)]
4.- S is the start symbol

Definition
Let MG = (N, T, M, S) be a matrix grammar and let Pthe collection of all productions on matrices of MG.We said that MG is of type i according to Chomsky's hierarchy with i=0,1,2,3, or "increasing length" or "linear" or "without lambda-productions" if and only if the grammar G=(N, T, P, S) has the corresponding property.

The classical example (taked from [5] with change of nonterminals names)

The context-sensitive language L(G) = { a^nb^nc^n : ngeq 1}is generated by the CFMGG =(N, T, M, S) whereN = {S, A, B, C} is the non-terminal set, T = {a, b, c} is the terminal set,and the set of matrices is defined asM :left [S ightarrow abc ight] ,left [S ightarrow aAbBcC ight] ,left [A ightarrow aA,B ightarrow bB,C ightarrow cC ight] ,left [A ightarrow a,B ightarrow b,C ightarrow c ight] .

Time Variant Grammars

Basic concepts
Definition
A Time Variant Grammar is a pair (G, v) where G = (N, T, P, S) is a grammar and v: mathbb{N} ightarrow 2^{P} is a function from the set of naturalnumbers to the class of subsets of the set the productions.

Programmed Grammars

Basic concepts

Definition

A Programmed Grammar is a pair (G, s) where G = (N, T, P, S) is a grammar and s, f: P ightarrow 2^{P} are the "success" and "fail" functions from the set of productionsto the class of subsets of the set the productions.

Grammars with regular control language

Basic concepts

Definition
A Grammar With Regular Control Language, GWRCL, is a pair (G, e) where G = (N, T, P, S) is a grammar and e is a regular expression over the alphabet of the set the productions.

A naive example

Consider the CFGG = (N, T, P, S) whereN = {S, A, B, C} is the non-terminal set, T = {a, b, c} is the terminal set,and the productions set is defined asP = {p_0, p_1, p_2, p_3, p_4, p_5, p_6}being p_0 = S ightarrow ABCp_1 = A ightarrow aA,p_2 = B ightarrow bB,p_3 = C ightarrow cCp_4 = A ightarrow a,p_5 = B ightarrow b, andp_6 = C ightarrow c.Clearly,L(G) = { a^*b^*c^*}. Now, considering the productions set P as an alphabet (since it is a finite set),define the regular expression over P:e=p_0(p_1p_2p_3)^*(p_4p_5p_6).

Combining the CFG grammar G and the regular expressione, we obtain the CFGWRCL (G,e)=(G,p_0(p_1p_2p_3)^*(p_4p_5p_6))which generates the languageL(G) = { a^nb^nc^n : ngeq 1}.

Besides there are other grammars with regulated rewriting, the four cited above are good examples of how to extend context-free grammars with some kind of control mechanism to obtain a Turing machine powerful grammatical device.

Sources

[1] Salomaa, Arto Formal languagesAcademic Press, 1973 ACM monograph series

[2] G. Rozenberg, A. Salomaa, (eds.)Handbook of formal languagesBerlin; New York : Springer, 1997 ISBN 3540614869 (set) (3540604200 : v. 1; 3540606483 : v. 2; 3540606491: v. 3)

[3] Regulated Rewriting in Formal Language TheoryJurgen Dassow; G. PaunPages: 308. Medium: Hardcover. Year of Publication: 1990 ISBN:0387514147. Springer-Verlag New York, Inc. Secaucus, NJ, USA

[4] Grammars with Regulated RewritingJurgen Dassow Otto-von-GuerickeAvailable at: [http://citeseer.ist.psu.edu/700926.html] and [http://theo.cs.uni-magdeburg.de/dassow_eng.html] ( [http://theo.cs.uni-magdeburg.de/dassow/tarraphd.pdf] )

[5] Some questions of language theory S. Abrahamin Proceedings of the 1965 International Conference On Computational Linguisticspp 1 - 11, Bonn, Germany Year of Publication: 1965Available at: [http://acl.ldc.upenn.edu/C/C65/C65-1001.pdf]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Rewriting — In mathematics, computer science and logic, rewriting covers a wide range of potentially non deterministic methods of replacing subterms of a formula with other terms. What is considered are rewrite systems (also rewriting systems, or term… …   Wikipedia

  • Mobile Membranes — Membrane systems have been inspired from the structure and the functioning of the living cells. They were introduced and studied by Gh.Paun under the name of P systems [24]; some applications of the membrane systems are presented in [15].… …   Wikipedia

  • Europe, history of — Introduction       history of European peoples and cultures from prehistoric times to the present. Europe is a more ambiguous term than most geographic expressions. Its etymology is doubtful, as is the physical extent of the area it designates.… …   Universalium

  • Gun laws in the United States (by state) — U.S. Firearms Legal Topics Assault weapons ban ATF Bureau Brady Handgun Violence Prevention Act Concealed carry in the U.S. Domestic Violence Offender Gun Ban …   Wikipedia

  • Gun politics — A pyre of confiscated smuggled weapons about to be set ablaze in Nairobi, Kenya …   Wikipedia

  • Screenwriting — is the art and craft of writing scripts for film, television or video games.Writing for film is potentially one of the most high profile and best paying careers available to a writer and, as such, is also perhaps the most sought after. While it… …   Wikipedia

  • Social Protection — ▪ 2006 Introduction With medical costs skyrocketing and government programs scaled back, citizens bore more responsibility for their health care costs; irregular migration, human trafficking, and migrant smuggling posed challenges for… …   Universalium

  • Opium — For other uses, see Opium (disambiguation). Opium Opium poppy fruit exuding latex from a cut Botanical Opium Source plant(s) Papaver somnifer …   Wikipedia

  • Artificial gene synthesis — is the process of synthesizing a gene in vitro without the need for initial template DNA samples. The main method is currently by oligonucleotide synthesis (also used for other applications) from digital genetic sequences and subsequent annealing …   Wikipedia

  • Arguments for and against drug prohibition — Arguments about the prohibition of drugs, and over drug policy reform, are subjects of considerable controversy. The following is a presentation of major drug policy arguments, including those for drug law enforcement on one side of the debate,… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”