Hubbry Logo
search
logo

Conjunctive grammar

logo
Community Hub0 Subscribers
Write something...
Be the first to start a discussion here.
Be the first to start a discussion here.
See all
Conjunctive grammar

Conjunctive grammars are a class of formal grammars studied in formal language theory. They extend the basic type of grammars, the context-free grammars, with a conjunction operation. Besides explicit conjunction, conjunctive 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 can be used, in particular, to specify intersection of languages. A further extension of conjunctive grammars known as Boolean grammars additionally allows explicit negation.

The rules of a conjunctive grammar are of the form

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

A conjunctive grammar is defined by the 4-tuple where

It is common to list all right-hand sides for the same left-hand side on the same line, using | (the pipe symbol) to separate them. Rules and can hence be written as .

Two equivalent formal definitions of the language specified by a conjunctive grammar exist. One definition is based upon representing the grammar as a system of language equations with union, intersection and concatenation and considering its least solution. The other definition generalizes Chomsky's generative definition of the context-free grammars using rewriting of terms over conjunction and concatenation.

For any strings , we say u directly yields v, written as , if

For any string we say G generates w, written as , if such that .

See all
User Avatar
No comments yet.