In linguistics and theoretical computer science, literal movement grammars (LMGs) are a grammar formalism intended to characterize certain extraposition phenomena of natural language such as topicalization and cross-serial dependency. LMGs extend the class of context free grammars (CFGs) by adding introducing pattern-matched function-like rewrite semantics, as well as the operations of variable binding and slash deletion. LMGs were introduced by A.V. Groenink in 1995.[1]
The basic rewrite operation of an LMG is very similar to that of a CFG, with the addition of arguments to the non-terminal symbols. Where a context-free rewrite rule obeys the general schema [math]\displaystyle{ S \to \alpha }[/math] for some non-terminal [math]\displaystyle{ S }[/math] and some string of terminals and/or non-terminals [math]\displaystyle{ \alpha }[/math], an LMG rewrite rule obeys the general schema [math]\displaystyle{ X(x_1, ..., x_n) \to \alpha }[/math], where X is a non-terminal with arity n (called a predicate in LMG terminology), and [math]\displaystyle{ \alpha }[/math] is a string of "items", as defined below. The arguments [math]\displaystyle{ x_i }[/math] are strings of terminal symbols and/or variable symbols defining an argument pattern. In the case where an argument pattern has multiple adjacent variable symbols, the argument pattern will match any and all partitions of the actual value that unify. Thus, if the predicate is [math]\displaystyle{ f(xy) }[/math] and the actual pattern is [math]\displaystyle{ f(ab) }[/math], there are three valid matches: [math]\displaystyle{ x = \epsilon,\ y = ab;\ x = a,\ y = b;\ x = ab,\ y = \epsilon }[/math]. In this way, a single rule is actually a family of alternatives.
An "item" in a literal movement grammar is one of
In a rule like [math]\displaystyle{ f(x_1, ..., x_m) \to \alpha\ y \text{:} g(z_1, ... z_n)\ \beta }[/math], the variable y is bound to whatever terminal string the g predicate produces, and in [math]\displaystyle{ \alpha }[/math] and [math]\displaystyle{ \beta }[/math], all occurrences of y are replaced by that string, and [math]\displaystyle{ \alpha }[/math] and [math]\displaystyle{ \beta }[/math] are produced as if terminal string had always been there.
An item [math]\displaystyle{ x/y }[/math], where x is something that produces a terminal string (either a terminal string itself or some predicate), and y is a string of terminals and/or variables, is rewritten as the empty string ([math]\displaystyle{ \epsilon }[/math]) if and only if [math]\displaystyle{ g(y_1, ..., y_n) = z }[/math], and otherwise cannot be rewritten at all.
LMGs can characterize the non-CF language [math]\displaystyle{ \{ a^n b^n c^n : n \geq 1 \} }[/math] as follows:
The derivation for aabbcc, using parentheses also for grouping, is therefore
[math]\displaystyle{ S() \to x\text{:}A()\ B(x) \to x\text{:}(a\ A())\ B(x) \to x\text{:}(aa\ A())\ B(x) \to x\text{:}aa\ B(x) \to aa\ B(aa) }[/math]
Languages generated by LMGs contain the context-free languages as a proper subset, as every CFG is an LMG where all predicates have arity 0 and no production rule contains variable bindings or slash deletions.
Original source: https://en.wikipedia.org/wiki/Literal movement grammar.
Read more |