Jump to content

Boolean grammar

From Wikipedia, the free encyclopedia

Boolean grammars, introduced by Okhotin [Wikidata], are a class of formal grammars studied in formal language theory. They extend the basic type of grammars, the context-free grammars, with conjunction and negation operations. Besides these explicit operations, Boolean grammars allow implicit disjunction represented by multiple rules for a single nonterminal symbol, which is the only logical connective expressible in context-free grammars. Conjunction and negation can be used, in particular, to specify intersection and complement of languages. An intermediate class of grammars known as conjunctive grammars allows conjunction and disjunction, but not negation.

The rules of a Boolean grammar are of the form

where is a nonterminal, and , ..., , , ..., are strings formed of symbols in and . Informally, such a rule asserts that every string over that satisfies each of the syntactical conditions represented by , ..., and none of the syntactical conditions represented by , ..., therefore satisfies the condition defined by .

There exist several formal definitions of the language generated by a Boolean grammar. They have one thing in common: if the grammar is represented as a system of language equations with union, intersection, complementation and concatenation, the languages generated by the grammar must be the solution of this system. The semantics differ in details, some define the languages using language equations, some draw upon ideas from the field of logic programming. However, these nontrivial issues of formal definition are mostly irrelevant for practical considerations, and one can construct grammars according to the given informal semantics. The practical properties of the model are similar to those of conjunctive grammars, while the descriptional capabilities are further improved. In particular, some practically useful properties inherited from context-free grammars, such as efficient parsing algorithms, are retained, see Okhotin (2010).

References

[edit]
  • Okhotin, Alexander (2004-10-10). "Boolean Grammars". Information and Computation. 194 (1): 19–48. doi:10.1016/j.ic.2004.03.006.
  • Okhotin, Alexander (2006). Nine Open Problems on Conjunctive and Boolean Grammars (PDF) (Technical report). TUCS. 794.
  • Kountouriotis, Vassilis; Nomikos, Christos; Rondogiannis, Panos (2009). "Well-founded semantics for Boolean grammars" (PDF). Information and Computation. 207 (9): 945–967. doi:10.1016/j.ic.2009.05.002.
  • Okhotin, Alexander (2010). "Fast parsing for Boolean grammars: a generalization of Valiant's algorithm". In Gao, Y.; Lu, H.; Seki, S.; Yu, S. (eds.). Developments in Language Theory. 14th International Conference, DLT 2010, London, ON, Canada, August 17–20, 2010, Proceedings. Lecture Notes in Computer Science. Vol. 6224. pp. 340–351. Preprint available online, Archived 3 March 2016 at the Wayback Machine.
[edit]