LFG Generation Produces Context-free Languages 
Ronald M. Kaplan 
Xerox Pale Alto Research Center 
3333 Coyote Hill Road 
Pale Alto, California 94304 USA 
kaplan(@parc.xerox.com 
J/irgen Wedekind 
Center for Language Technology 
Njalsgade 80 
2300 Copenhagen S, Deninark 
juergell~cst.ku.dk 
Abstract 
This pat}er examines the generation prol}lem for a 
ce\]:tain linguisti{:ally relevant sul0class of LFG gram- 
mars. Our main result; is that the set of strings that 
such a grammar relates to a particular f-structure 
is a context-free . This result obviously ex- 
l;en{ls to other {:ontext-free base{l grammatical f(}r- 
malisIns, such its PATll,, and also to formalisms {,hal; 
1)ermit a context-free skeleton to 1}e extracted (1)er- 
haps some variants {}f HPSG). The l)\]:(}{)f is c{mstru{:- 
l;ive: from the given f-sl;ru{:ture a l)art;i{:ular c{}ntext- 
free grannnar is create, d whose, yM{l is the (lesire, d 
sel; Of S|;l'illgS. ~4aily existing generation sl;ral;e, gies 
(top-{lown, l}ottom-ul} , head-driven) can be under- 
stood as all:ernative ways of avoiding the creation of 
useless context-Dee productions. Our result can t}e 
estat)lished for the m{}re general {:lass of LFG gram- 
mars, but that is beyond the scope of the present 
paper. 
1 Introduction and Preliminaries 
This 1}al)er exat\]liltes the generation t)\]'{}t)leln for 
a {:erl;ain linguistically mol;ivate, d subclass {}f LFG 
grammars. Our luaill result is thai; the se, l. (}f 
st;rings thai; su{:h a grammar relates to a 1)articular 
f-stru{:l;ure is a context-fl'ee . This result ex- 
tends easily to other context-fl:ee t)ased gramnmtical 
formalisms, su{-h as PATR (Shiel}er et; al. 1988), al)xt 
I)erhal)s also to tbrinalisms that 1}ermit a {:onl;exl;- 
fi'ee skeleton to l)e e.xtracted from richer ret)resenl;a- 
tions. 
We begin with some ba{:kgroun{1 and formal de- 
filfitions s{} that we can make the 1}roblem and its 
solution explicit. An LFG granmmr G assigns to ev- 
ery string in its  at least one c-structure/f 
structure pair that are set in correst}ondence, by a 
piecewise flmetion (~ (Kaplan 1995). The situation 
can be characterized in terms of a derivation relation 
A(;, defined as follows: 
(1) Aa(s, c, (/), f) ill" G assigns to the string s a 
{:-structure c that pie(:ewise,-corresponds to 
fstru{:ture f via the function (). 
The 'lfiecewise-{:orrest}onds' notion means thai, (/; 
maps individual nodes of a {:-structure tree to m\]il;s 
of the f-structure. The arrangement of tile four com- 
i)onents of an LFG rel)resentation is illustrated in 
the diagram of Figure 1. This representation be- 
hmgs to the Aa relation for a grammar that includes 
the almotated (nonterminal) rules in (2) and lexical 
rules in (3). 
(2) a. S -+ NP VP 
(1" suB,\]) =$ ¢=$ 
(4. (:AS~,:) ---- NOM (¢ 'PI,:NS,,:) 
b. NP -+ I)ET N 
t-=4 I-=4 
{:. VP --~ V 
¢=4 
(3) a. DET -+ a 
(1" sPEc) = ,N,},,:v 
(1" NUM) = sG 
t). N --+ st;u{lent; 
(¢ Pm,;D) = 'STUm,:Nq" 
(1" Nt:M) = s(~ 
(I" sl,l.:c) 
(:. V -~ M1 
(J" PlIFI))~-'I"ALL((SUB.\]))" 
(1" 'H.:NSt.:) = PAS'I' 
The (:-stru(:ture, in Figure 1 is derived by applying 
a sequence of rules from (2) to rewt'ite the symbol 
S, the grmnmar's start symbol, and then rewriting 
the preterminal categories according to the lexical 
rules. I~exical rules are just notational variants of 
traditional LFG lexical entries. 
The () correspondence and the f-structure in Fig- 
ure 1 are ass{}ciated with thai; c-structure 1)e{:ause 
the f-slru{:ture satisfies the (/Mnstautiated descrip- 
tion cousl;rucl;ed fl'oIn I;11o a,motated c-structure 
derivatiolq and fllrthermore, it is a minimal model 
for the set of instantiated descriptions collected from 
all the nodes of the ani\]otated c-structure. The ()- 
instmd;iated descril}tio,l for a local mother-daughters 
configuration justified by a rule is created in the fol- 
lowing way. First, all o(:currences of the symbol J" in 
the functional mmotations of the daughters are re- 
placed t)y a variable standing fl)r the f-structure unit 
that r/) assigns t{} the moth{n" node,. Then for each of 
the daughter categories, all occurrences of the sym- 
1}ol $ in its annotations are replaced 1}y a variat)le 
425 
DET j N -~ V ---1 
a student fell 
~t~ \[PRED ISTUDENTr 
NUM SG 
SUB.I /SF'EC IN1)I'3F 
LCASE NOM 
em~D 'rALI,< (SUl~.0 >' 
TENSE PAST 
Figure 1: Piecewise c- and f-structure correspondence. 
standing for the ¢ assignment of the daughter node. 
Observe that all variables denote f-structure units in 
the range of 4), and that the $ on a category and the ? 
on the daughters that fllrther expand that category 
are always instantiated with the same variable. 
We now turn to the generation problem. A gener- 
ator for G provides for any given fstructure F the 
set; of strings that are related to it; by the grmn- 
111 ar: 
(4) Gcna(F) = {s \[~c,¢ s.t. (s,c,¢,F) E At,,}. 
Our main result is that for a certain subclass of LFG 
grmnmars the set: Gcna(F) is a context-free lan- 
guage. In the next section we prove that this is the 
case by constructing a context-free grammar that ac- 
cepts exactly this set of strings. Our proof dei)ends 
on the fact that the int)ut F--and hence the range 
of q5-is fully specified; Dymetman (1991), van No- 
ord (1993), and Wedekind (1.999) have shown that 
the general probleln of generating froln an under- 
specified input is unsolvable. We return to this issue 
at the end of the I)aper and observe that tbr cer- 
tain linfited tbrms of underspecification the context- 
fl'ee result can still be established. Our proof also 
det)ends on the fact that, with minor except;ions, 
the instantiated descriptions are ideml)otent: if p 
is a particular instantiated proposition, then a de- 
scription containing two occurrences of 1) is logically 
equivalent to one containing just a single occurrence. 
This means that descriptions can be collected by 
the union oi)erator for ordinary sets rather than by 
multi-set ration. 
The standard LFG tbrmalism includes a number 
of notational conveniences that make it easy to ex- 
press linguistic generalizations but which would add 
comI)lexity to our mathematical analysis. We make 
a number of siml)lifying transformations, without 
loss of generality. The LFG c-structure notation 
allows the right-hand sides of rules to denote arbi- 
trary regular s, expressed by Boolean com- 
binations of regular predicates (Kaplan 1995, Ka- 
plan and Maxwell 1996). We assume that these 
s are normalized to standard regular ex- 
pressions involving only concatenation, disjunction, 
and Kleene-star, and then transform the grmnmar so 
that the right sides of the productions denote only 
finite sequences of aImotated categories. First, the 
effects of any Kleene-stars are removed in the usual 
way by the introduction of additional nonterminal 
categories and the rules necessary to expand them 
at)propriately. Second, every category X with dis- 
junctive annotations is replaced by a disjunction of 
X's each associated with one of the alternatives of 
the original disjunction. Finally, rules with disjunc- 
tive right sides are replaced by sets of rules each 
of which expands to one of the alternative right- 
side category sequences. The result of these trans- 
formations is a set of productions all of which are 
in conventional context-free format and have no in- 
ternal disjunctions and which together define the 
stone string/f structure nmpping as a grammar en- 
coded in the original, linguistically more expressive, 
notation. The Kleene-star conversions produce c- 
structures from which the original ones can be sys- 
tematically recovered. 
The full LFG fommlism allows for grammars that 
assign cyclic and otherwise linguistically unmoti- 
vated structures to sentences. The context-free re- 
sult can be established for these granmmrs, but the 
argument would require a longer and more techni- 
cal presentatiou than we can provide in this pal)er. 
Thus, without loss of linguistic relevance, we concen- 
trate here on a restricted class of LFG grammars, 
those that assign acyclic f-structures to sentences. 
For our tmrposes, then, ml LFG grammar G is a 
4-tuple (N, T, S, R} where N is the set of nontermi- 
nal categories, T is the set of terminal symbols (the 
lexical items), S E N is the root category, and 1~, is 
the set; of annotated productions. The context-fl'ee 
skeletons of the rules are of the form X0 -+ X1 ..Xn 
or X-+a, with X1..Xn EN* and aET. If thean- 
notations of a nonterminal daughter establish a rela- 
tionship between $ and T, then $ is either identified 
with j', the value of an attrilmte in $ ((~ or) =$), or 
the member of a set in 1" ($E (T a)), where a is a 
possibly empty sequence of attributes. 
2 A Context-free Grammar 
for Gena(F) 
An inl)ut structure F for generation is t)resented as 
a hierarchical attribute-value matrix such as the oue 
in Figul"e 1, repeated here in (5). 
426 
\[ l)l{ 1~',1) t STUI)I,\]NTt- NUM SG SUIL\] SI)EC INI)EI" 
\[CASI.: NOM 
PR.,.:,) ' VA,,I,<(SU,/.0 >' 
TENSE PAST 
An fstructure is an attrilmte-valut sl;ructure where 
the values a.re either subsidiary atl;rilxlte-vahm rim- 
trices, symliols, semantic forms, or sei;s of subsidiary 
structures (not shown in this example). 
(6) A structure 9 is contained in a structm'e J' if 
and only if: 
.q= f, 
f is a set and g is eonl;aintd in an dement of 
f, or 
f is an f-structm'e and 9 is contained in (fa) 
for some attribute a. 
in tssence, 9 is conl;ained in f if 9 can 11o located 
ill f by ignoring sonm enclosing SUl)erstructure. For 
any f-structure f, the sel; of all units contained in f 
is then defined as in (7). 
(7) Units(f) - {glo is contained in f} 
Note t;hat Units(f) is a tinit;e set for any f, and 
U'nits(f) is the range of any ¢ that A(; associai;es 
with a parl;icular intmC F. 
The. (:-strucl;m'es and (/) corresliondences tbr F are 
the unknowns i;hai; nmsI; be discovered in the process 
of generation so l;hat the 1)rol)er instantiatcd descrip- 
Lions can \])e constructed and cvahtal;e(l, llowever, 
since thtre ix only a tinite mlml)er of l)ossible terms 
thai: can be used i;o designate the ltnil;s of t ?, we can 
produce a (Iinite) SUl)Cxsct of the, 1)r(/t)er instantiaW, d 
descriptions without knowing in advance the details 
of either the (;-sl;rucl;ure or ;4 1)articular (/). 
Let l;' be an f-structure tlmt has m (m > 0) set 
elements. We introduce m + 1 distinct variables 
v0,..,v,~, which denote biuniquely the root refit of 
F (v0) and each net element of F (vi, i > 0). 1 We 
consider the set of all designators of the tbrm (vi c,) 
which art defined in F, where a is a (possibly empty) 
sequence of attributes. The set of designators for a 
particular unit corresponds, of course, to the set of 
all possible fstrueture paths fl'om one of the vi roots 
to that unit. Thus, the set of designa.t;ors for all units 
of F in finitt, since the number of units of F is tinite 
and there art no cycles in F. 
The set of variables that we will use to construct 
the instantiated descriptions is the set 1/- consisl;ing 
of all vt where t in a designator of the set just de- 
fined. If l is the maximal arity of the rules in G, 
we will conskltr for the instantiation the set Z con- 
sisting of all sequences <vto, vt,,.., vt; ) of variables of 
V of length 1., ..,n + 1, not containing any set tit;- 
1 Multi-rooted sl, ructures would require ~ whole set of reel 
wu'iables, similm" I,o set elements. 
merit w~rial)le v,,~ (i = O, .., m) more dlan once. On 
the basis of this (finite) set of sequences, we define 
a (partial) fmwtion 1D which assigns to eat:h rule 
7' E 1{ and each sequence I E 27 that is apl)ropriate 
for r an instantiated description. 
Let r be an n-ary LFG rule 
X0 -~ Xj ..X~ 
,5% S,, 
with annotated flmctional schemata SI...S,z. A se- 
quence of variables I G 27 is appr'opr'iatc for r if 
I = @t0,vt,,.-,vl.) is of length n + 1 and 
('Oi O-t(7) if ~,(1 ~--- (V i (Y') all(l (j" (7) =,Le Sj 
tj = a set element varial)lt vj if SE (j" o-) E Sj 
for all j = 1, .., n ((7' and ¢ are (possibly tlnpty) se- 
quences of attributes). (Note that (? (7) =$ reduces 
to J'=$ if a is empty.) If I is al)prot)riatt for r, then 
ID(r, I), the instantiated description for r and l, is 
defined as follows: 
N 
(s) m(,., n = U l ,<sj, V,o, %), 
j=l 
where l:nsl.(,gj, vto, vtj) in the instantiated descrip- 
tion produced by substituting vt0 for all occurrences 
of 1" in ,5'j and substituting vtq for all occurences of 
$ in Sj. 
If r is a lexical rule with a context-free skeleton of 
the fl)rm X ~ a every sequence I = (v,0> of length \] 
is ~@propriate for r mMID is detined by: 
(9) m(,., \]) - I',,..~.(S,, ',,,,,). 
The instantiation using a.pprotn'iate sequences of 
variables, all;hough tinite, permits an elfectivt dis- 
crinfinal;ion of l;he fst, ructure variables, since it pro- 
rides diflbXeld; varial)les for the $% associated with 
diti'erent daughters i;hat have different flmction as- 
sigmnents (i.e., mmotations of the form (1" c,) =$ 
and (t (7') =$ with (7 ¢ J), but identifies variables 
where fstructure variables are identified explicitly 
(j'=$) or where the identity tbllows by ratification, 
as in cases where the annotations of two diflbrent 
(laughters contain the same function-assigning equa- 
l;loll (J" (7) =$. Hence, we in fact have enough vari- 
ables to make all the distinctions that could arise 
from any c-si;rueturt and ¢ correspondence for the 
given f-structurt. 
The set of all possible instantiated descriptions is 
large but finite, since R. and Y are finite. Thus, the 
set IP(F) of all possible instantiated propositions 
for G and F is also large but finite. 
(10) re(F) = U Ra'~w(*rD) 
For the construction of the eonttxt-fi'ee grmmnar we 
have to consider those subsets of IP(F) which have 
F as their minimal model. This is the set D(F), 
again finite. 
427 
(11) D(F) is tim set of all D C_ IP(F) such that 
F is a minimal model for D. 
We are now prepared to establish the main result of 
tiffs paper: 
(12) Lct G be an LFG grammar conforming to thc 
restrictions we have described. Then for" any 
f-structure F, the set GenG(F) is a context- 
free languaf\]e. 
Pro@ If F is incomt)lete or incoherent, tlseu 
Genc(F) is the empty context-free . Let 
G = (N, T, S, R) be an LFG grammar. If D(F) is 
empty, then Gena(F) is again the empty context- 
free . If D(F) is not empty, we construct a 
context-free grammar Gr = (ARE, Tr, SF, RE} its the 
following way. 
The collection of nonterlninals ~rj,, is the (finite) 
set {SF} U N x V x I)ow(IP(F)), wtsere SF is a new 
root; category. Categories in NI; other than SF are 
written X:v:D, where X is a category in N, v is con- 
tained in 17, and D is an instantiated description in 
Pow(IP(F)). 2),, is the set T x {(/)} x {0}. The rules 
RF are constructed from the annotated rules R of 
G. We include all rules of the form: 
(i) S,,, ~ S:v~o:D, for every D d D(F) 
(ii) X0:vto:D0--+ Xl:Vtl:Dl..Xn:vt:Dn s.t. 
(a) there is an r E R expanding X0 to X1..X,~, 
(b) Do = m(,., ..,v,o))u UD,, 
i=1 
(c) if vv~ 6 (vtj c~) belongs to Dj then 
v,,, ¢ vt,, (k = 1, .., v,) and 
(1,, ¢ j) s.t. v,,, c (v,,,, o-') c 
(iii) X:vl:D -~ a:(/):~ s.t. 
(a) there is an r E R expanding X to a, 
(b) D = ZD(r, (vt)). 
We define the projection Cat(a::?\]:z)= a: for ev- 
ery category in NF U Tl,, and extend this function in 
the natural way to strings of categories and sets of 
strings of categories. Note that the set 
Cat(L(G~)) = {s I Bw E L(GF) s.t. Cat(w) = s} 
is context-free, since the set of context-free s 
is closed under homolnorphisms such as Cat. We 
show that the  Cat(L(GF)) = Gena(F). 
We prove first that Gcna(F) C Cat(L(aA). Let 
c be an annotated c-structure of a string s with f- 
structure F in G. On the basis of c and F we con- 
struct a derivation tree of a string s' in G j,, with 
Cat(s') = s in two steps. In the first step we rela- 
bel each terminal node with label a by a:(~, the rook 
by S:vv0, each node introducing a set element with 
label X biuniquely by X:v~, and each other node 
~This condition captures LFG's special interpretation of 
membership statements. The proper treatment of LFG's se- 
mantic forms requires a similar condition. 
labelled X by X:vt where * is a designator that is 
constructal)le from the function-assigning equations 
of the mmotations along the path from the unique 
root or set element to that node. On the basis of 
this relabelled c-structure we construct a derivation 
tree of s' in Gt,' bottom-up. We relabel each ter- 
urinal node with label a:(/) by a:(/):~) and each preter- 
minal node with label X:vt by X:vt:D where D is 
defined as in (iiib) with r expanding X in c to a. Sup- 
pose we have constructed the subtrees dominated by 
X1 :Vtl:D1..X,z:vt.:D,, the corresponding subtrees in 
c are derived with r expanding X0 to X1..X m and 
the nlother node is relabelled by X0:vt0. We then 
relabel this mother node by Xo:vto:Do where Do is 
determined according to (iib). By induction on the 
depth of the subtrees it is then easy to verify that 
the instantiated description D of a subtree donfi- 
nated by X:vt:D is equivalent to the f-description of 
the corresponding annotated subtree its c. Thus, F 
must be a minimal model of the instantiated descrip- 
tion of the root label S:v~0:D~, ~, Sl,. derives S:v~o:DF 
in GI, ~ and Cat(J) = s. 
We now show that Cat(L(GI~)) C Geno(F). Let 
c" be a derivation tree of s' in Gr with Uat(s') = s 
and supl)ose that the root (with label SF) expands 
to S:vv0:DF. We construct a new derivation tree c' 
that results from c" by eliminating the root. We 
then define a fimction ¢' such that for each nonter- 
minal node /t of c': ¢'(IL) = vt if # is labelled by 
X:vt:D in c'. According to our rule construction it 
can easily be seen by induction on the depth of the 
subtrees that the, re nmst be an annotated c-structure 
c of G with the same underlying tree structure as c' 
such that for each node tt labelled by z:~/:D in c': 
(i) t* is labelled by a: in c, 
(ii) D is identical with the description that results 
from Dr, , the f-description of the sub-c-structure 
dominated by tt in c, by replacing each occurrence 
of an f-structure variable 'qS0/)' (usually abbreviated 
by f,) in D,~ by 4/(,,). Since (/'(It) = qS(,,) follows for 
two f-structure designators if (b'(#) = 4/(u), tim f 
description of the whole c-structure must be equiva- 
lent to DE mid thus Ac,,(s, c, ¢, F) where ~ = ~b' o Ov 
and Cv is the unique flmction ttmt maps each ut to 
the unit of F that is denoted by t. QEI) 
3 An Example 
As a simple illustration, we produce the context- 
fl'ee gramnmr GF for the input (5) and the grmnmar 
in (2,3) above. The only designator variables that 
will yield useful rules are v~ 0 mid v(~ o sui33), in tim 
tbllowing abbreviated by v aim Vs. Consider first the 
context-fl'ee rules that correspond to the rules that 
generate NP's. If we choose the sequence I = (vs), 
the instantiated description for the determiner rule 
in (33)is (13). 
(13) {(v, spp~c) = IN1)EF, (Vs NUM) = so} 
428 
Rule (14) is tlms a production of GI,'. 
;('Os S')EC) : INI)I'H'~ (14) DET:,,.:/. i". NUM)=S ; j 
-+ 
Rule (15) is obtained from the N rule using the same 
seqnence. 
(15) N:'vs:{t?'s I'ILE,)) = 'S'FUI)ENT') (v~ NUM) = s(~ ~ ~ student:~:0 
(l's SPEC) ) 
For the NP rule and the sequence {vs,vs,vs}, both 
daughter annotatiolls instantiate to the trivial de- 
scription vs = vs, and this can combine, with many 
daughter descriptions. Two of these are the basis for 
the rules (16) and (17). The (laughter categories of 
rule (1.6) match the mother categories of rules (14) 
a,nd (15), all(1 the tlll"ee rllles together can derive the 
stting a:(~:0 student:(/}:{~. Rule (17), Oll the other 
hand, is a legi(;iinate rule but does not combine with 
any others to l)roduce a terminal string. 1\]; is a use- 
less, albeit harmless, production; if desired, it tan 
be removed froln the set of productions 1) 3, standard 
algorithnts tbr COll(;exl;-\['l.ee gramnmrs. 
llf we contimm along in this rammer, we find that 
the rules in (18,1.9,20) are the only other useful rules 
that belong to G1,'. 
The grammar GI~' also includes (;he following sl;arl;- 
ing rule: 
0, s...))- ,,,, "1 = NOM / 
1) ~- '/) | 
(.,, ',',.:Ns,.:) \[ 
s,,,.:(,) l ('V I'll.H))= 'FAIA,((SUB,I)}" / 
(',, r,:Ns\].:) = l,as'r ) 
This grammar provides one derivation for a sin- 
gle string, a:(/):(/) student:(/):(/) Dll:(/):{/}. Applying Cat 
to this string gives 'a stlldent Dll', tim only sen- 
tence that this grammar associates with the inlmt 
f'd;ructure. 
4 Consequences and Observations 
Our main result oflb.rs a new way to con(:et)tualize 
the problenl of generation lbr HPG and other lfigher- 
order context-free-based grainmatical tbr, nalisms. 
The proof of the theorem is constructive: it indicates 
precisely how to lmild 1;111.' grmnmar GI; whose lan- 
guage is the desired set; of strings. Thus, the 1)rol~lem 
of LFG generation is divided into two phases, con- 
structing the context-Dee grammar G/,,, an(t then 
using a standard context-free generation algorithm 
to produce strings fl'om it. 
\Ve can regard the first t)hase of LFG generation 
as specializing the original LFG gl'allilllal to Oi11~ that 
only produces the given input fstructure. This spe- 
cialization refines the context-fiee backbone of 1;11(; 
original grannnar, but our theoreln indica.tes that 
the inl)ut t'-si;ru(:ture l)rovides enough infornmtion so 
tlmt, in effect, tlm metaw~riables in the functional 
annotations can all be replaced by variables con- 
tained in a tixed tinite set. Thus, in the LFG gen- 
eration case the st)e(:ialized grammar turns out to 
be in a less l)owerful tbrmal class than the original. 
\Ve (:an mlderstand different aspects of generation 
as I)ertaining either to the way the grammar is con- 
strutted or to well-known properties of (;Oll(;exl;-free 
grammars and (~olltoxl;-\]'l'ee generation. 
It follows as an immediate corollary, tbr exam- 
pie, that it is (lecidalfle whether the set GcnG,(F) is 
emt)ty , contains a tinite mmfl)er of strings, or con- 
tains all infinite number of strings. This C}lll lie de- 
ternfined by inspecting GF with standard context- 
free tools, once it has l)een constructed. If the lan- 
guage is infinite, we (:an make use of tim context-Dee 
pumping lemma to identify a tlnite number of short 
strings Dora which all other strings ('an be produced 
1)y rel)el,ition of sul)(lcrivations. Wedekin(1 (19{)5) 
tirs( estal)lished the de(:idability of I,FG generation 
and t)roved a lmmping lemma ti)1 the generated 
string set; our tlwx)r(nn l)rovides alternative ;ul(l very 
direct 1)root's of the.st previously known results. 
\¥e also \]lave gtll exl)lanation for another ob- 
servation of Wedekind (1995). Kaplan and Bre.s- 
nan (1982) showed that the Nonbranclfing I)omi- 
nance Condition (sometinms called ()flline Parsabil- 
ity) is a sufficient (:on(liti(m to guarantee (le(:idal)il- 
ity of lhe meml)ership l)rol)lenL Wedekind noted, 
how(~ver, (;bat (;hi~ condition is not nex:essary to de- 
lermine \v\]mlht~r a given tkstrlletlll'e corresponds 1;o 
any strings. We now see more clearly why this is the 
case: if there is a (:olltext-Dee derivation for a given 
string that involves a nonl)ranching dominance cy- 
(:le, we know (fronl the pumi)ing hmnna) that there 
is another derivation for tlmt saint string that has 
no such cycle. Thus, the generated  is the 
same whether or not derivations with nonbranching 
dominance (:y(:h;s are allowed. 
There is a practical consequence to the two phases 
of LFG generation. Tim gralllllHtl' GI,' eaIt t)e pro- 
vided to a client as a finite representation of the set 
of 1)crhal)s infinitely many strings that corresl)ond 
to the given fstrueture, and the client can then ('o11- 
trol the process of enumerating individual strings. 
The client ntay choose simply to produce the short- 
est ones jllst 1) 3, avoiding recursive category expan- 
sions. O1 the client may apply the technology of 
stochastic context-free grammars to choose the most 
probable, senI;ence, f1'o111 the set of possibilities. The 
client may also be ilW;erested in strings that meet 
further conditions that the shortest or most proba- 
ble strings fail to satist~y; in this case the client may 
429 
Us ~ Us ~ 
/ (v,, SI'EC) = INI)EF } f(vs SPEC) = INDEF'~ (16) NP:,,~:~ (,,~ ~M)= s~; -. D\]n':,,~: ~ 
(v~ NUM) ( SO J I(v~ PR,,~,,)= 's~u,.,:~'r' 
t, (,,~ sPl~C) , 
(17) NP:v~:{v~ = v~, (v~ NUIVl) = SG} -+ DET:v~:{(v~ NUM) = SO} N:v~:(a 
(18) W:v: {(V F'IIED) = 'FALL((SUP, J))"'~ (v Tt,:NSI,:) = PAST J --> fell:{,'}:0 
(191 
(20) 
V----I) 
vP:~: (~ Hum) = 'I,al,r,((suB.O)'? 
(,, T~s~) = \[}AS',' J 
i" (,, s,,,,.,) = ,,,~ / 
(,,~ casl.:) = NOM 
| V ~ V 
/ (,~ TI,:NSI~) 
l)s ~ Us 
S:v:~ ('Os SPEC) = INI)EF / 
(Vs NUM) = SG 
/ ("~ Pro,:.)= 's'PuI.~NT' 
/ ' (Vs SPEC) 
I(v PRED) = q~aLL((SUBa))' 
\[, (1) TENSE) = PAST 
---} M:'U'~(V I}REI)) = tFALL((SUBJ))t~ 
• \[ (~ TI~NSE) = PAST J 
= l( 'Os ~ 
'Us 
(Us SPEC) = INDEF 
-+ NP:v~: (v~ NUM) = SC 
Us PLIED) --~ ISTUDENTI 
(Us SI'EC) 
N:vs: 
VP:v: 
{ ('Os I'IIH))= 'STUDI,:NT'~ 
(~ TE~S~) = PAS~r J 
apply the pumt)ing lemma to systematically produce 
longer strings for exmnination. 
Our recipe tbr constructing GF may produce 
many categories and expansion rules that ca.ili, ot 
play a role in any derivation, either because they 
are inaccessible from the root symbol, they do not 
lead to a terminal string, or because they involve in- 
dividual descriptions that F does not sat, is\[y. Hav- 
ing constructed the grammar, we ea.n again api)ly 
standard context-free methods, this time to trot the 
grammar in a more ot)timal forln by reinoving use- 
less categories and productions. We can view sev- 
eral difl!erent generation algorithms as strategies tbr 
avoiding the creation of useless categories in the first 
place. 
The most obvious optimization, of course, is to in- 
cretnentally evaluate all the instantiated descriptions 
and remove froin consideration categories and rules 
involving descriptions for which F is not a model. 
A second strategy is to construct the grammar in 
bottom-up fashion. We begin by comparing the ter- 
minal rules of the LFG grannnar with the features 
of the input f-structure, and construct only the cor- 
responding categories and rules that meet the crite- 
ria in (iii) above. We then construct rules that can 
derive the mother categories of those rules, and so 
oil. With this strategy we insure that every cate- 
gory we construct can derive a terminal string, but 
we have no guarantee that every bottom-up sequence 
will reach the root symbol. 
It is also at)pealing to construct the grmnmar by 
means of a top-down process. If we start with an 
agenda containiug the root symbol, create rules only 
to expand categories on the agenda, and place cate- 
gories on the agenda whenever they appear for the 
first time oi1 the right side of a new rule, we get the 
effect of a top-dowu exploration of the gratnmar. We 
will only create categories and rules that are acces- 
sible fronl the root symbol, but we may still 1)roduce 
categories that derive no terminal string. 
The toi)-down strategy may not provide ett'ective 
gui(tance, however, if the set D(F) contains many 
alternative descriptions of F. But suppose we can 
associate with every instantiated description D a 
unique canonical description that has the stone f- 
structure as its minimal model, and suppose that we 
then reformulate tlm grammar construction in terms 
of such canonical descriptions. This can shari)ly re- 
duce the size of the grammar we produce according 
to any enumeration strategy, since it avoids rules 
and categories that express only uuinforlnative vari- 
ation. It can particularly benefit a top-down era> 
meration because the set D(F) will have at most 
one canonical member. Presumably any practical 
generation scheme will define and operate on canon- 
ical descriptions of some sort, but our context-Dee 
result does not depend on whether or how such de- 
scriptions inight be specified and maifipulated. 
Just as for context-free parsing, there are a num- 
ber of mixed strategies that take top-down and 
bottom-up inibrmation into account at the stone 
time. We can use a precomputed reachability ta- 
ble to guide the process of top-down exploration, 
for iilstance. Or we can simulate a left-corner enu- 
meration of tile sem'ch space, considering categories 
that are reachable froin a current goal category and 
430 
nmtch the left; corner of a possible rule. In general, 
ahnost any of the traditional algorithms tbr process- 
\[llg (;()iltext-frec gt'atillllars call be reforllllllatctl as 
a strategy tbr tn,oiding the creation of useless cat- 
egories and rules. Other enmneration strategies fo- 
cus on the characteristics of the input f-structure. A 
head-driven strategy (e.g. van Noord 1993) identi- 
ties the lexical heads first, finds the rules that ex- 
l)and them, and then uses information associated 
with those heads, such as their grmmnatical flmetion 
assigmnents, to pick other categories to exlmnd. 
Our proof depends on the assmnl~tion that the in- 
put \],' is flllly specified so that the set of i)ossible 
instantiations ix finite, l)ymetman (1991), van No- 
ord (1993), and Wedekind (1999) have shown that 
it ix ill generM undecidable whether or not there are 
any strings associated with an f-structure that has 
units ill addition to those in the input. Indeed, our 
proof of context-freeness does not go through if we 
allow new units to be hypothesized arbitrarily, l/e- 
yond the ones that appear in F; if this ix permitted, 
we cannot establish a finite. 1)ound on the munbcr of 
l/ossil)le categories. This is unfortmmte, since there 
may be interesting practical situations ill which it is 
convenient to leave UnSlmCified tile value of a liar- 
titular feature. However, if there can be, only a ii- 
nil, e nlunb(',i' of possible wflues for an underspecitied 
feature, the (:ontext-free resull: can still be esi;al)- 
lished. We create from F a set of alternative struc- 
tures F~..F, by filling ill all possible values of the 
UllSl)eeified features, a.ml we l)roduce the context- 
Dee grammar corresponding to o, ach of thcln. Since 
a finite ration of eontext-flee s is context- 
Dee, the set of strings generated fl'om any of t, hese 
structures renmins ill that class. 
A tinal COilllllellt a\])ollt t;he generation l/rolflem for 
other high-order granmmtical t'ornmlisnis. ()llr proof 
dcl)ends on se, veral tb, aturcs of LFG: the (:Oll\[:exl;-ti'(?e 
1)ase, the pieeewise correspondence of 1)hrase struc- 
ture, and f-structure units, and the ideml)Otency of 
the flumtional description . PATR shares 
these properties, although the correspondence is iln- 
plicit in the mechanisnl and not reified as a linglfisti- 
cally significant concept. So, our proof can be used 
to establish the context-free result for PATR. On 
the other hand, it is not clear whether the string 
set corresponding to an underlying I{PSG structure 
is context-flee. HPSG (Pollard and Sag 1994) does 
trot Iltake direct use of a context-free skeleton, and 
olmrations other than concatenation may be used 
to assenfl)le a collection of substrings into an entire 
Selltetlce. \~e canllot extend ore" proof to ttPSG m> 
less the etli~ct of these mechanisms can be reduced 
to an equivalent characterization with a context-free 
base. However, grammars written for the ALE sys- 
tem's logic of typed feature structures (Carl)enter 
and Penn 1.994) do have a context-free COlll\])Ollelll; 
and therefore' are, ainell~fl)\]e to the, treatnlent we have 
outlined. 
Acknowledgments 
We arc imlcbted to John Maxwell, tladar Slmmtov, 
Martin Kay, and Paula Newman for many fl'uit- 
fill and insightflfl discussions of the LFG genera- 
tion 1)roblem, and for criticisms and suggestions that 
have, helped to clarit~y many of tile mathenlatieal and 
conllmtatiolml issues. 

References 

Carpenter, B. aim G. Petal. 1994. ALE 2.0 User's 
Guide. Technical report, Carnegie Mellon Univer- 
sity, l~ittslmrgh, PA. 

Dymetman, M. 1991. Inherently Reversible Gram- 
mars, Logic Programming and Computability. In 
P~vcecdings of th, c ACL Workshop: Reversible 
Gram, mar i'n Natural Language PTwccssing. Berke- 
ley, CA, pages 20 -30. 

Kat)lan, I{. M. 1995. The Fornml Architecture of 
Lexical-IPunctio\]ml Grannnar. In M. Dahyml)le , 
11. M. Kaplan, .1. Maxwell, and A. Zaen('al, edi- 
tors, \]?orbital \]s.s"ltcs i'n Lczical-l,;uu, cl, ional Gram- 
mar. CSLI l?ublications, Stanford, CA, pages 7- 
27. 

Kapbm, \]7/. M. and J. Bresnan. 1982. Lexical- 
Functional Grammar: A li'orntal System for 
(~ranunatical lq.epreseill;ation. In J. Bresnan, (!(l- 
iter, The Mental l~,cprc,s'c'ntat{o~t of G~'(t'llt~rtitti- 
cal Rclatio'ns. MIT Press, Carol)ridge, MA, 1)ages 
173 281. 

Kaplan, l/. M. mM J. Maxwell. 1996. LIeG 
Crwm,'mar Writer's Workbe,nch,. Technical re- 
port, Xerox Pale Alto Research Center. At 
http: / /ftp.par,:.xero:~.co~n/p,,1, /lfg/ltk,tlai,,~l.ps. 

Pollard, C. mM 1. Sag. 1994. \]toad-Driven IW, rasc 
Str'uct'urc, Gra'm'mar. The University of Chicago 
Press, Chicago, IL. 

Shieber, S., It. Uszkoreit, F. Pereira, .1. llol)inson, 
and M. Tyson. 1983. The Formalistn and hnl)le- 
mentation of PATR-II. In B. Grosz and M. Stickel, 
editors, I~cscarch on Interactive Acquisition and 
Use of K'nowlcdgc. SRI Final Report 1894. SRI 
hlternational, Menlo Park, CA, pages 39--79. 

wm Noord, G. 1993. ll,eversibility in Natural Lan- 
guage Processing. Ph.D. thesis, Rijksuniversiteit 
Utrecht. 

Wedekind, J. 1995. Sonm Remarks on the l)ecidalfil- 
ity of the Generation Problem ill LFG- mM PATI{- 
style Unification Grmmnars. lit Procccdings of th, c 
71,h Co'nferc,nc(: of tit(, E'uropcan Chapter of th, c As- 
sociation for Comp~ttational Linq'uistics. l)ublin, 
pages 45- 52. 

Wedekind, J. 1999. Semantic-drivell Generation 
with LFG- and PATR-style Grammars. Cornp,u- 
rational Ling,uistics , 25(2): 277 281. 
