§-Calculus
   HOME

TheInfoList



OR:

An adaptive grammar is a
formal grammar A formal grammar is a set of Terminal and nonterminal symbols, symbols and the Production (computer science), production rules for rewriting some of them into every possible string of a formal language over an Alphabet (formal languages), alphabe ...
that explicitly provides mechanisms within the formalism to allow its own production rules to be manipulated.


Overview

John N. Shutt defines adaptive grammar as a grammatical formalism that allows rule sets (aka sets of production rules) to be explicitly manipulated within a grammar. Types of manipulation include rule addition, deletion, and modification.


Early history

The first description of grammar adaptivity (though not under that name) in the literature is generallyChristiansen, Henning, "
Survey of Adaptable Grammars
" ''ACM SIGPLAN Notices'', Vol. 25 No. 11, pp. 35-44, Nov. 1990.
Shutt, John N.,
Recursive Adaptable Grammars
', Master’s Thesis, Worcester Polytechnic Institute, 1993. (16 December 2003 emended revision.)
Jackson, Quinn Tyler,
Adapting to Babel: Adaptivity and Context-Sensitivity in Parsing
', Ibis Publications, Plymouth, Massachusetts, March 2006.
taken to be in a paper by Alfonso Caracciolo di Forino published in 1963.Caracciolo di Forino, Alfonso,
Some Remarks on the Syntax of Symbolic Programming Languages
" ''Communications of the ACM'', Vol. 6, No. 8., pp. 456-460, August 1963.
The next generally accepted reference to an adaptive formalism (''extensible context-free grammars'') came from Wegbreit in 1970Wegbreit, Ben,
Studies in Extensible Programming Languages
', ESD-TR-70-297, Harvard University, Cambridge, Massachusetts, May 1970. In book form, Garland Publishing, Inc., New York, 1980.
in the study of extensible programming languages, followed by the ''dynamic syntax'' of Hanford and Jones in 1973.Hanford, K.V. & Jones, C.B.,
Dynamic Syntax: A Concept for the Definition of the Syntax of Programming Languages
" ''Annual Review in Automatic Programming 7'', Pergamon Press, Oxford, pp. 115-142, 1973.


Collaborative efforts

Until fairly recently, much of the research into the
formal Formal, formality, informal or informality imply the complying with, or not complying with, some set of requirements ( forms, in Ancient Greek). They may refer to: Dress code and events * Formal wear, attire for formal events * Semi-formal atti ...
properties of adaptive grammars was uncoordinated between researchers, only first being summarized by Henning Christiansen in 1990 in response to a paper in ''ACM
SIGPLAN SIGPLAN is the Association for Computing Machinery's Special Interest Group (SIG) on programming languages. This SIG explores programming language concepts and tools, focusing on design, implementation, practice, and theory. Its members are progra ...
Notices'' by Boris Burshteyn.Burshteyn, Boris.
On the Modification of the Formal Grammar at Parse Time
, ''ACM SIGPLAN Notices'', Vol. 25 No. 5, pp. 117-123, May 1990.
The Department of Engineering at the
University of São Paulo The Universidade de São Paulo (, USP) is a public research university in the Brazilian state of São Paulo, and the largest public university in Brazil. The university was founded on 25 January 1934, regrouping already existing schools in ...
has it
Adaptive Languages and Techniques Laboratory
specifically focusing on research and practice in adaptive technologies and theory. The LTA also maintains a page naming researchers in the field.


Terminology and taxonomy

While early efforts made reference to ''dynamic syntax'' and ''extensible'', ''modifiable'',Burshteyn, Boris,
Generation and Recognition of Formal Languages by Modifiable Grammars
" ''ACM SIGPLAN Notices'', Vol. 25 No. 12, pp. 45-53, December 1990.
''dynamic'',Boullier, Pierre,
Dynamic Grammars and Semantic Analysis
" INRIA Research Report No. 2322, August 1994.
and ''adaptable'' grammars, more recent usage has tended towards the use of the term ''adaptive'' (or some variant such as ''adaptativa'',Iwai, Margarete Keiko, ''Um formalismo gramatical adaptativo para linguagens dependentes de contexto'', Doctoral thesis, Department of Engineering, University of São Paulo, Brazil, January 2000.Bravo, César,
Grámmaticas Livres de Contexto Adaptativas com verificação de aparência
', Doctoral thesis, Department of Electrical Engineering, University of São Paulo, January 2004.
depending on the publication language of the literature). Iwai refers to her formalism as ''adaptive grammars'', but this specific use of simply ''adaptive grammars'' is not typically currently used in the literature without name qualification. Moreover, no standardization or categorization efforts have been undertaken between various researchers, although several have made efforts in this direction.


The Shutt classification (and extensions)

Shutt categorizes adaptive grammar models into two main categories:Shutt, John N., "Imperative Adaptive Grammars" Web page dated 28 March 2001, at the URL: http://web.cs.wpi.edu/~jshutt/adapt/imperative.html * '' Imperative adaptive grammars'' vary their rules based on a global
state State most commonly refers to: * State (polity), a centralized political organization that regulates law and society within a territory **Sovereign state, a sovereign polity in international law, commonly referred to as a country **Nation state, a ...
changing over the ''time'' of the
generation A generation is all of the people born and living at about the same time, regarded collectively. It also is "the average period, generally considered to be about 20–⁠30 years, during which children are born and grow up, become adults, and b ...
of a
language Language is a structured system of communication that consists of grammar and vocabulary. It is the primary means by which humans convey meaning, both in spoken and signed language, signed forms, and may also be conveyed through writing syste ...
. * '' Declarative adaptive grammars'' vary their rules only over the ''space'' of the generation of a language (i.e., position in the syntax tree of the generated string). Jackson refines Shutt's taxonomy, referring to changes over time as
global Global may refer to: General *Globe, a spherical model of celestial bodies *Earth, the third planet from the Sun Entertainment * ''Global'' (Paul van Dyk album), 2003 * ''Global'' (Bunji Garlin album), 2007 * ''Global'' (Humanoid album), 198 ...
and changes over space as
local Local may refer to: Geography and transportation * Local (train), a train serving local traffic demand * Local, Missouri, a community in the United States Arts, entertainment, and media * ''Local'' (comics), a limited series comic book by Bria ...
, and adding a hybrid ''time-space'' category: * ''Time-space adaptive grammars'' (''hybrids'') vary their rules over either the ''time'' or the ''space'' (or both) of the generation of a language (and local and global operations are explicitly differentiated by the notation for such changes).


Adaptive formalisms in the literature

Adaptive formalisms may be divided into two main categories: full grammar formalisms (adaptive grammars), and adaptive machines, upon which some grammar formalisms have been based.


Adaptive grammar formalisms

The following is a list (by no means complete) of grammar formalisms that, by Shutt's definition above, are considered to be (or have been classified by their own inventors as being) adaptive grammars. They are listed in their historical order of first mention in the literature.


Extensible context-free grammars (Wegbreit)

Described in Wegbreit's doctoral dissertation in 1970, an extensible context-free grammar consists of a
context-free grammar In formal language theory, a context-free grammar (CFG) is a formal grammar whose production rules can be applied to a nonterminal symbol regardless of its context. In particular, in a context-free grammar, each production rule is of the fo ...
whose rule set is modified according to instructions output by a
finite state transducer A finite-state transducer (FST) is a finite-state machine with two memory ''tapes'', following the terminology for Turing machines: an input tape and an output tape. This contrasts with an ordinary finite-state automaton, which has a single tape. ...
when reading the terminal prefix during a leftmost derivation. Thus, the rule set varies over position in the generated string, but this variation ignores the hierarchical structure of the syntax tree. Extensible context-free grammars were classified by Shutt as ''imperative''.


Christiansen grammars (Christiansen)

First introduced in 1985 as ''Generative Grammars''Christiansen, Henning, "Syntax, Semantics, and Implementation Strategies for Programming Languages with Powerful Abstraction Mechanisms," ''Proceedings of the 18th Hawaii International Conference on System Sciences'', Vol. 2, pp. 57-66, 1985. and later more elaborated upon,Christiansen, Henning,
The Syntax and Semantics of Extensible Languages
" ''Datalogiske skrifter 14'', Roskilde University, 1988.
Christiansen grammars (apparently dubbed so by Shutt, possibly due to conflict with Chomsky generative grammars) are an adaptive extension of
attribute grammar An attribute grammar is a formal way to supplement a formal grammar with semantic information processing. Semantic information is stored in attributes associated with terminal and nonterminal symbols of the grammar. The values of attributes are t ...
s. Christiansen grammars were classified by Shutt as ''declarative''. The redoubling language L = \ is demonstrated as follows: where ''w-rule'' = → ''w'' > → <ε> → a


Bottom-up modifiable grammars, top-down modifiable grammars, and USSA (Burshteyn)

First introduced in May 1990 and later expanded upon in December 1990, ''modifiable grammars'' explicitly provide a mechanism for the addition and deletion of rules during a parse. In response to the ''ACM SIGPLAN Notices'' responses, Burshteyn later modified his formalism and introduced his adaptive ''Universal Syntax and Semantics Analyzer'' (USSA) in 1992.Burshteyn, Boris,
USSA–Universal Syntax and Semantics Analyzer
" ''ACM SIGPLAN Notices'', Vol. 27 No. 1, pp. 42-60, January 1992.
These formalisms were classified by Shutt as ''imperative''.


Recursive adaptive grammars (Shutt)

Introduced in 1993, Recursive Adaptive Grammars (RAGs) were an attempt to introduce a Turing powerful formalism that maintained much of the elegance of
context-free grammar In formal language theory, a context-free grammar (CFG) is a formal grammar whose production rules can be applied to a nonterminal symbol regardless of its context. In particular, in a context-free grammar, each production rule is of the fo ...
s. Shutt self-classifies RAGs as being a ''declarative'' formalism.


Dynamic grammars (Boullier)

Boullier's ''dynamic grammars'', introduced in 1994, appear to be the first adaptive grammar family of grammars to rigorously introduce the notion of a time continuum of a parse as part of the notation of the grammar formalism itself. Dynamic grammars are a sequence of grammars, with each grammar ''Gi'' differing in some way from other grammars in the sequence, over time. Boullier's main paper on dynamic grammars also defines a dynamic parser, the machine that effects a parse against these grammars, and shows examples of how his formalism can handle such things as
type checking In computer programming, a type system is a logical system comprising a set of rules that assigns a property called a ''type'' (for example, integer, floating point, string) to every '' term'' (a word, phrase, or other set of symbols). Usu ...
, extensible languages, polymorphism, and other constructs typically considered to be in the semantic domain of programming language translation.


Adaptive grammars (Iwai)

The work of Iwai in 2000 takes the adaptive automata of NetoNeto, João Jose, "Adaptive Automata for Context-Sensitive Languages," ''ACM SIGPLAN Notices'', Vol. 29 No. 9, pp. 115-124, September 1994. further by applying adaptive automata to
context-sensitive grammar A context-sensitive grammar (CSG) is a formal grammar in which the left-hand sides and right-hand sides of any Production (computer science), production rules may be surrounded by a context of terminal symbol, terminal and nonterminal symbols. Cont ...
s. Iwai's adaptive grammars (note the qualifier by name) allow for three operations during a parse: ? query (similar in some respects to a
syntactic predicate A syntactic predicate specifies the syntactic validity of applying a production in a formal grammar and is analogous to a semantic predicate that specifies the semantic validity of applying a production. It is a simple and effective means of dram ...
, but tied to inspection of rules from which modifications are chosen), + addition, and - deletion (which it shares with its predecessor adaptive automata).


§-calculus (Jackson)

Introduced in 2000Jackson, Quinn Tyler,
Adaptive Predicates in Natural Language Parsing
" ''Perfection'', Vol. 1 No. 4, April 2000.
and most fully discussed in 2006, the §-Calculus (§ here pronounced ''meta-ess'') allows for the explicit addition, deletion, and modification of productions within a grammar, as well as providing for
syntactic predicate A syntactic predicate specifies the syntactic validity of applying a production in a formal grammar and is analogous to a semantic predicate that specifies the semantic validity of applying a production. It is a simple and effective means of dram ...
s. This formalism is self-classified by its creator as both ''imperative'' and ''adaptive'', or, more specifically, as a ''time-space'' adaptive grammar formalism, and was further classified by others as being an analytic formalism.Okhotin, Alexander, ''Boolean Grammars: Expressive Power and Algorithms'', Doctoral thesis, School of Computing, Queens University, Kingston, Ontario, August 2004. The redoubling language L = \ is demonstrated as follows: grammar ww ; (Note on notation: In the above example, the statements identify the points in the production ''R'' that modify the grammar explicitly. represents a ''global'' modification (over time) and the statement identifies a ''local'' modification (over space). The statement in the ''S'' production effectively declares a global production called ''A.X'' by placing the
empty string In formal language theory, the empty string, or empty word, is the unique String (computer science), string of length zero. Formal theory Formally, a string is a finite, ordered sequence of character (symbol), characters such as letters, digits ...
into that production before its reference by ''R''.)


Adaptive devices (Neto & Pistori)

First described by Neto in 2001,Neto, João Jose, "[ftp://nozdr.ru/biblio/kolxo3/Cs/CsLn/Implementation%20and%20Application%20of%20Automata,%206%20conf.,%20CIAA%202001(LNCS2494,%20Springer,%202002)(ISBN%203540004009)(298s).pdf#page=243 Adaptive Rule-Driven Devices: General Formulation and Case Study]," B. W. Watson, D. Wood (Eds.): Conference on Implementation and Application of Automata, ''Implementation and Application of Automata 6th International Conference'', CIAA 2001, ''Lecture Notes in Computer Science'', Vol. 2494, Pretoria, South Africa, Springer-Verlag, pp. 234–250, 23–25 July 2001. adaptive devices were later enhanced and expanded upon by Pistori in 2003.Pistori, Hemerson,
Tecnologia Adaptativa em Engenharia de Computação: Estado da Arte e Aplicações
', Doctoral thesis, Department of Electrical Engineering, University of São Paulo, 2003.


Adapser (Carmi)

In 2002,Carmi, Adam,
Adapser: An LALR(1) Adaptive Parser
" ''The Israeli Workshop on Programming Languages & Development Environments,'' Haifa, Israel, 1 July 2002.
Adam Carmi introduced an LALR(1)-based adaptive grammar formalism known as ''Adapser''. Specifics of the formalism do not appear to have been released.


Adaptive CFGs with appearance checking (Bravo)

In 2004, César Bravo introduced the notion of merging the concept of ''appearance checking''Salomaa, Arto, ''Formal Languages'', Academic Press, 1973. with ''adaptive context-free grammars'', a restricted form of Iwai's adaptive grammars, showing these new grammars, called ''Adaptive CFGs with Appearance Checking'' to be Turing powerful.


Adaptive machine formalisms

The formalisms listed below, while not grammar formalisms, either serve as the basis of full grammar formalisms, or are included here because they are adaptive in nature. They are listed in their historical order of first mention in the literature. ;Self-modifying finite state automata (Shutt & Rubinstein) :Introduced in 1994 by Shutt and Rubinstein,Shutt, John & Rubinstein, Roy,
Self-Modifying Finite Automata
" in B. Pehrson and I. Simon, editors, ''Technology and Foundations: Information Processing '94 Vol. I: Proceedings of 13th IFIP World Computer Congress'', Amsterdam: North-Holland, pp. 493-498, 1994.
archive
Self-Modifying Finite State Automata (SMFAs) are shown to be, in a restricted form, Turing powerful. ;Adaptive automata (Neto) :In 1994, Neto introduced the machine he called a ''structured pushdown automaton'', the core of adaptive automata theory as pursued by Iwai, Pistori, Bravo and others. This formalism allows for the operations of ''inspection'' (similar to
syntactic predicate A syntactic predicate specifies the syntactic validity of applying a production in a formal grammar and is analogous to a semantic predicate that specifies the semantic validity of applying a production. It is a simple and effective means of dram ...
s, as noted above relating to Iwai's adaptive grammars), ''addition'', and ''deletion'' of rules.


See also

* Adaptive algorithm * Artificial grammar learning * Grammar induction * :Extensible syntax programming languages


References

{{DEFAULTSORT:Adaptive Grammar Formal languages