Generation as Structure Driven 
Derivation 
Jiirgen Wedekind 
Institute for Natural Language Processing 
University of Stuttgart 
FRG 
Abstract 
This paper describes two algorithms which construct two differ- 
ent types of generators for lexical functional grammars (LFGs). The 
first type generates sentences from functional structures and the sec- 
ond from semantic structures. The latter works on the basis of ex- 
tended LFGs, which contain a mapping from f-structures into seman- 
tic structures. Both algorithms can be used on all grammars within 
the respective class of LFG-grammars. Thus sentences can be gener- 
ated from input structures by means of LFG-grammars and the same 
grammar formalism, although not necessarily the same grammar, can 
be used for both analysis and synthesis. 
1 Introduction 
Using the same grammar formalism, or even the same grammar, for both 
analysis and synthesis is usually regarded as an elegant, efficient and some- 
times even as the psychologically most plausible approach to natural lan- 
guage parsing and generation. In this paper we want to show that this 
approach can be realized within the LFG-framework by defining two gener- 
ation algorithms. 1 The first permits the construction of generators for LFGs 
which generate sentences from fimetional structures. The second constructs 
generators which generate sentences from semantic structures. 
Both algorithms are based on concepts of derivation for LFGs which 
can he strengthened in such a way that the derivation can be driven by a 
given input structure. The principles which underlie the control mechanisms 
for the derivation arc sufilciently general to also be applicable to other 
unification based formalisms which allow the derivation of functional and/or 
semantic structures in parallel to constituent structures (e.g. PATI~ (of. e.g. 
\[Shieber 831, \[Karttunen 861) ). 
For the generation from semantic structures, a derivation concept of 
this type can be defined, if, following a proposal by Halvorsen and Kaplan 
(cf. \[Halvorseu 87\], \[Kaplan 87\]), projector equations are used to describe 
(co-describe) the semantic structure of a sentence. Since the projector mech- 
anism is independent of the specific type of semantic theory, the algorithm 
works as long as this mechanism is used to build up semantic representa- 
tions. 
In addition, the derivation driven by the semantic structure can be di- 
rected by constraints over the f-structure. Usually, semantic information 
by itself is regarded as providing a basis for generation which is too weak 
to capture relevant distinctions in the surface form. This additional mech- 
anism could contribute to make the generation more sensitive to syntactic 
and pragmatic information. Thus, additional fimctional information can 
enforce a specific syntactic realization, such as passivization, topicalization, 
extraposition or discontinuous realization of constituents. 
It should be clear that the specific constraints which have to be or can 
be imposed on this kind of generation are subject to empirical studies on 
questions of syntax, discourse and dialogue. 2 Similarly, for machine trans- 
lation, one will need interlingual comparative research on these subjects to 
establish what relevant functional information can be drawn directly from 
the f-structures of the source text, in order to guarantee a coherent target 
text. These important empirical questions will not be addressed directly in 
this paper. We consider it an essential requirement for an adequate gen- 
eration algorithm, however, that it provides the respective possibilities of 
control. 
2 Generation from functional structures 
In this section we describe an algorithm which constructs a generator for 
an arbitrary given LFG 3 which generates terminal strings from functional 
structures. 4 Such an algorithm has to define for every LFG a relation 
F¢(~,s) (s is generable from (I)) between directed acyclic graphs (DAGs) 
and terminal strings. 
VCeDAG VseV,~ (r,/,(##, s) /fie(... { ..... )) 
Depending on what the adequacy condition C(... 4~, s...) for this relation 
is, one will get different adequacy criteria for possible explications of what 
'generation' can mean within the LFG-framework. We started from the 
- perhaps too idealized - condition that is normally used for the relation 
between strings and f-structures At, specified by an adequate parsing algo- 
rithm for LFG. s 
V~,eDAG VseV~,(A¢(s, ~) iffs is derivable from the start symbol S and 
s has f-structure (I)) 
If we use this condition and insert it into the schema C(... q~, s...), 
(*) V(~eDAG VseV~(F¢(¢, s) iffs is derivable from the start symbol S and 
s has f-structure ~) 
then the relation ~X~ is simply defined inversely by an adequate generation 
algorithm (F~ 1 = At and also A~ 1 = F¢). This means that a generator 
for an LFG G must accept an input structure (I) by building up a string 
s, iff s is derivable with f-structure (P in G. Thus, the generator for an 
LFG constructed bythc algorithm which satisfies this condition is simply a 
parser or transducer for the set of well-formed f-structures, which constructs 
for an input structure the set of all sentences which have this structure as 
their f-structure. This implies that the generator produces no output, if the 
input structure is not a well-formed f-structure. 
2.1 Derivational background 
The algorithm can he based on derivation concepts for LFGs which can be 
strengthened in such a way that the derivation can be driven by an input 
structure (structure driven derivation), tIowever, the derivability conditions 
formulated in \[Kaplan/Bresnan 82\] cannot he used directly. According to 
\[Kaplan/Bresnan 82\] a terminal string s is regarded as well-formed iff it 
satisfies the following conditions: 
(WFF) 
1. There is a c-structure c for s that can be derived by the context-free 
base of the grammar. 
2. There is an f-structure ~ and a mapping ¢ from the c-structure nodes 
to the nodes of ¢ such that q' is the unique minimal f-structure that 
satisfies the annotations associated with the e-structure nodes. (The 
f-description solution algorithm (fds-algorithm) constructs both ¢ and ~.)~ 
3. All constraints in the f-description are satisfied by ¢. 
4. (~ is complete and coherent. 
These conditions are tested in the following order: 1. -< 2. -< 3.,4.. Thus, 
if the f-structure is built'up after the derivation of the e-structure, ~ it is im- 
possible to use the functional information contained in an input structure for 
the control of the derivation of the c-structure. A decidable generation pro- 
cedure presupposes the possibility of comparing the input structure with 
the partial f-structure of a derived partial e-structure. Thus, in order to 
drive the c-structure derivation by a given input structure it is necessary to 
derive the partial f-structure in parallel to a partial c-structure. This means 
that one can use only those derivation concepts which make f-description 
solutions for partial c-structures available in each step of the derivation. 
The concept on which the following algorithm is based is described in more 
detail in \[Wedekind 86\]. According to this concept, a derivation is a se- 
quence of quadruples (e, (I), ¢, C% Each quadruple consists of 
c a partial c-structure, 
q~ a partial f-structure, 
¢ a mapping from the c-structure nodes into the set of nodes of (~, and 
C ¢ a constraint set. 
(¢ and ¢ would be the result of the fds-algorithm if it were applied to 
the corresponding annotated c-structure. C ~ corresponds to. tile set of in- 
stantiated constraining equations contained in the f-description of c. See 
the example in fig. 1.) I follow the usual convention of identifying the c- 
structure nodes with sequences of integers. The linear order of the edges 
of a tree is normally encoded by numbering the arcs, and every node is 
identified with the sequence of integers numbering the arcs along the path 
from the root to that node. 
732 
c 4 4) C+ 
Fig. 1 
The corresponding annotated c-structure is derivable by the follow- 
ing rules: 
S --~ NP VP VP -* V VP' 
(1 SUBff) = I ~ = I t = I (t VCOMP) = 1 
The initial quadruple consists of an S-labeled root node cs, an f-structure 
root node 4)s, to which the S node is mapped by ~s and an empty con- 
straint set C~. 
(es, 4)s,¢~,c::~) cs Cs 4)s c.$ 
#o ---*. 
A grammar rule also introduces a quadruple. 
v -- (~,, 4),.,,V, c,.*) 
The time(tonal part (4)r,qF) is obtained by applying the fds-algorithm to 
the annotated local tree represented by the rule, and by instantiating the 
metavariables in the constraining equations with the node indices of the 
local tree introduced by the rule. (The constraint set of a rule contains the 
constraints of the f-description of the local tree.) Fig. 2 gives an example. 
{(¢ NUM)=¢ (0 $UBJ NUM)} PRED 
Vo -~-~- -- O O 
This quadruple corresponds to the rule: 
v ~ tries (1 PRED) = try(SUBJ,VCOMP) 
(l suBJ) = (T veorcw suBJ) 
(i" NUM) =¢ (~" SUBJ NUM) 
Suppose that we have derived from the initial quadruple the quadruple given 
in fig. 1; then we can apply the V-rule, since the leaf 2.1 is labeled with 
V. The derived quadruple (d, 4)', ~b ~, C ~) consists of a e-structure which is 
the result of expanding 2.1 by or. The partial f-structure 4)~ is the minimal 
extension of 4) which results from 4) by unifying the DAG (I) r introduced 
by the rule with the substructure rooted by qt2A. Since the new DAG 4)J 
is a homomorphie extension of 4), the values of ~b * for the old nodes (of c) 
are given by 5 and the homomorphism. The values of ~J for the new nodes 
result from ~b ~ and from the value of ~b for 2.1 (of. the definition below)• 
C ¢~ contains besides C ~ (which is empty) the constraint (2.1 NUM)=~(2.1 
SUBJ NUM) which is con.structed from (O NUM) =c (0 SUBJ NUM) by 
attaching 2.1 ;Is a prefix to each node index within that constraint. The 
result is the constraint set of the f-description of the derived tree. Fig. 3 
illustrates the result of the rule application. 
c' ¢, ~b' C¢' 
(2.! 
tries2.1A Pig. 3 
If we reconstruct directed labeled connected rooted aeyelic graphs (DAGs) 
as transition graphs of connected rooted acyelic finite state automata, whose 
leaves (states without leaving transitions) are labeled by a partial function 
rrt with atoms of a set A (4) = (Q,L,6, qo,A,m)), s then we can state the 
definition of the derivability relation A~ as follows. 
DEFINITION 2.1 A terminal string s is derivable with f-structure 4)1 
(A¢(s, 4)I)) i~there is a sequence wo... wn such that 
- coo = (cs, 4)s, ~s, C~) and 
- for all wi = (c, 4), ~b, C*), wi+l = (c', 4)', ~b', C ~') (0 < i < n) there is a 
rule V -~ {e~, 4). ~, Ct) and 
- Visalabelofaleafpofc 
- d is the result of expanding # in c by er 
- 4)~ is the minimal extension of 4) which results from 4) by unifying 
4)r with the substructure rooted by ¢~ 
- ifv is anode oft, whose c-value is ~*(qo,P) in 4), then its ¢Cvalne 
in ~' is ~*(q'o,P) 
if/~.J is a node of c', not contained in c, the value of q~ is 6~* (q~, q) 
and the value of q~ for p is 6*(qo,P), then the value of qV for ,~.j 
is 6'*(qto,p.q) in 4)' 
- C ¢' contains besides C ¢ the constaints (#.j p) =c (#.i q) etc) 
for all (j p) =~ (i q) etc. in C~ 
- s is the terminal string of the c-structure ofw,~ 
- 4)1 is equal to the DAG ofw, (q~,) 
- 4),~ satisfies all constraints in C,~ 
- 4), is complete and coherent, t° 
2.2 Generation as f-structure driven derivation 
Ill principle we could use this derivation concept for generation if we substi- 
tuted the DAG in the initial quadruple by an input structure and mapped 
the S node to the root of the input structure. IIowever, such a concept 
of generation would not satisfy the adequacy condition mentioned above. 
The derivation would not be adequately controlled by tbe input structure 
because it is not guaranteed that 
i) the information contained in the input structure is completely derived 
and 
it) no additional information is introduced during the derivation. 
It is possible, for example, to derive additional adjuncts or not to derive all 
adjuncts represented in the input structure. Due to tbe unification part of 
the derivation process, it is only guaranteed that the f-structure of the gen- 
erated sentence is compatible with the input structure. The requirements 
i) and it), which will be referred to as completeness and coherence, n show 
that the input structure is in fact a complex constraint with a positive and a 
negative part. The positive part (compleleness), which requires that the in- 
put structure (4)in) is subsumed by the derived structure (4),) (4)i,, E 4),), 
can be made explicit by two kinds of constraints: existential constraints, 
which demand that 
COMPa: all paths of the input structure are derived, 
and reentrancy constraints, whicb demand that 
COMPb: all reentraueies of the input strneture are derived) 2 
Tim negative part (coherence) which demands that 
COH: the derived structure is subsumed by the input structure (4),, L (bl,) 
ensures that the f-structure of the generated string is the unique minimal 
structure that satisfies the completeness constraints expressed by the input 
structure. 
• The central problem of generation designed o.s structure driven deriwv 
tion is the control of the fidfillment of these conditions. Since this problem 
also occurs within other formalisms which build up DAG-strnctures during 
the derivation process, the solutions proposed here for LFG can also be 
applied in more or less the same way within the other formalisms. 
i.) COMPb. This condition is controllable if the input structure (I)i~ 
is unfolded. The functional structure of the initial tuple is then an un- 
ordered tree 4)t. Since the input structure is a (homomorphic) extension 
of the unordered tree (4)t ~ chin) and both structures have the same path 
set, the relating homomorphism is an 'onto'-mapping and therefore called 
epimorphism. Part B of fig. 4 gives an example. 13 
Now, since coherence has to be ensured during generation, the derived 
structure will never become an extension of the input structure and each 
generation step induces a new epimorphism frmn the derived structure to 
the input structure. The coherence condition guarantees that the epimor- 
phisms induced in the generation steps always approximate an isomorphism. 
When the derived structure and the input structure are isomorphic, all rcen- 
trancies are derived. 
it.) COMPs. The fnlfillment of this condition can be controlled, if, apart 
from the root, all nodes of the DAG introduced by a rule are labeled by a 
'+'-marker. This additional labeling distinguishes the generator rules from 
the grammar rules. Fig. 5 shows the generator rule corresponding to the 
grammar rule of fig. 2. If the root of the unordered tree 4)~ is also T-labeled 
and all nodes of the strncture that is derived from 4)( are +-labeled, then 
all paths of the input structure are derived) 4 The condition that all leaves 
of a well-formed f-structure are labeled by atomic values ensures that all 
atomic values of the input structure are derived. 
733 
h ~: 
C ~ ~ r / John / ~- ~ John \ 
So 
try{S,V) 
AI S 
Fig. 4 
Fig. 5 ' 
iii.) COIt It is possible to check this condition in each step of the deriva- 
tion since the input structure is accessible by the epimorphism induced in 
each particular step. It is guaranteed that no additional information is in- 
troduced by the rule application, if the substructure to which the expanded 
c-structure node is mapped by ¢ and the epimorphism h ~ is (asid e from the 
+-labels) an extension of the DAG introduced by the rule. 1~ 
If, for example, the constellation shown in fig. 4 (A and B) is generated 
and the rule in fig. 6 were to be applied to node 2.2, condition COtI will be 
violated, since the substructure rooted by h~(~b~.2) is not an extension of 
the (unlabeled) structure introduced by that rule. On the other hand, the 
substructure rooted by h ¢ (¢2.~) is an extension of the (unlabeled) structure 
introduced by the V-rule of fig. 5 and fulfills COH with respect to node 2.1. 
vm~~o 
Fig. 6 i 
Since the (functional) structure which is to be derived from &~ is equal 
(or isomorphic) to the input structure itself, it is possible to check 
- the f-completeness and f-coherence of the input structure before the 
generation starts, and 
- the constraints expressed by the rules simultaneously during the gen- 
eration. 
Although the V-rule would satisfy the coherence condition with respect 
to node 2.1, its application is ruled out, since the substructure rooted by 
h¢(¢2.1) does not satisfy the constraint expressed by the rule. is Thus, the 
sequence of tuples which constitute the generation of a terminal string need 
not contain a constraint set. 
The start entity of a generation is then a quintuple 
/c~, ~,, ¢~, ~,., h~). 
~in is an f-complete and f-coherent input structure, ¢~ is the unfolded input 
structure and h~ is the relating epimorphism. The fleaerabillty relation F~ 
is then defined as follows./~ 
DEFINITION 2.2 A terminal string s is gencn~ble from an input structure 
~n (r¢(~b~n, s)) iffthere is a sequence We...wn such that 
o Wo = (cs,~,¢S,¢~,h~s) and 
o for allw~ = (c,~,~,~,h~), w~+~ = {d,~b',~',~n,h ~') (0 <_ i < n) 
there is a generator rule V --* (cr, ~r, ~r, C~) and 
- V is the label of a leaf/~ of c 
o the substructure rooted by h#(~b~)is (aside from the +-labels) 
an extension of ~ 
o for all (j p) =~ (i q) etc. in C~, 6~,, (h4'(~bp.j), p) = $~(h~(¢,.i), q) 
etc. 
,734 
- c p is the result of expanding p in e by cr 
- ~' is the minimal extension of @ which results from ~ by unifying 
• r with the substructure rooted by. ~bp 
- if ~ is a node of c, whose e-value is ,5*(qo,p) in ¢, then its ~.bt-value 
in q,' is ~'*(qto,p ). 
if p.j is a node of c I, not contained in c, the value of ¢~ is ~* (q~, q) 
and the value of¢ for p is 6*(qo,P), then the value of ~t tbr #.j 
is t~'*(qto,p.q) in @'. 
o VpeL*((q~o,p)eDom(~ I*) ~ h~'J(61*(q~,p)) = 6*n(q~On,p)) 
O each node of the functional structure ~n of w. is +-labeled 
o ¢. is isomorphic to ~{n (h~ is an isomorphism) 
- s is the terminal string of the c-structure ofwn. 
Lemma 1 follows from the above. 
LEMMA 1 V~'eDAG Vsev~(r~(~, s) ~ A~(s, ~)) 
This lemma can easily be proved, since in each step of the generation of 
a sentence the applied rule can be applied exactly in the same way in the 
corresponding derivation step of a derivation of that sentence (and vice 
versa). So the substructure which includes all +-labeled nodes of a gen- 
erated functional structure corresponds exactly to that partial f-structure 
which is derived up to that step (and vice versa). Thus, the derived c- 
structure is identical to the generated c-stmcture, the derived f-structure 
is equal to the generated f-structure and thus identical (isomorphic) to the 
input structure. Since the constraints in the constraint set of a derivation 
must in fact be the (instantiated) constraints of all rules applied during 
the generation, the input structure satisfies all constraints iff the derived 
structure does. 
3 Generation from semantic structures 
In this section we use the ideas described in section 2 to develop an algorithm 
that constructs generators which generate terminal strings from semantic 
structures. These ideas are applicable if we can ensure, that 
a) the semantic structures are representable as DAGe, 
b) the only operation which is used to construct the semantic structures 
is the unification operation, and 
c) the semantic structure of a sentence can be built up simultaneously 
with the derivation of the c- and f-structure of that sentence. 
That a) and b) can be ensured for most of the current semantic theories, 
like Montague Semantics ~MS), Discourse Representation Theory (D1Tr) 
and Situation Semantics (as), is illustrated, for example, in \[Reyle 88\] (MS, 
Dffr), \[Halvorsen 87\] (SS) and in works concerning eategorial grammars 
which are augmented by a unification component. Is 
C0ndltion c) is satisfiable if we follow a proposal by Halvorsen who de- 
scribes a possible extension of LFGs such that the semantic representation of 
a sentence can he "simultaneously described (co-described) with the func- 
tional structure" (\[Halvorsen 87\], p.9). Halvorsen extends the formalism 
to include a new type of equation, which is used to build up a semantic 
representation and establishes an additional (partial) mapping from the f- 
structure nodes into the node set of the semantic structure. 
Since the semantic structures are represented as DAGs, we can use for 
the generation from semantic structures, a condition llke (*) as an adequacy 
condition, which refers'to a semantic (a-) structure instead of an f-structure. 
(**) VI?,eDAG VseV~ (r~ (~, s) iff s is derivable from the start symbol S and 
s has a-structure ~) 
Since this condition implicitly assmnes that F~ -1 is determined by an ad- 
equate parsing algorithm, this extension of the formalism is neutral with 
respect to the problem of the creativity 19 of the extension. This neutrality 
is desirable, since the algorithm should be definable independent of a specific 
semantic theory. The question whether a semantic component is (or should 
be) a creative or a conservative extension oftbe syntactic theory (LFG), on 
the other hand, depends crucially on the specific semantic theory and on 
the format of the rules which prescribe how the compositionality principles 
of the chosen theory are to he translated into this new .type of equation. 
According to condition (**), the generator constructed by the algorithm 
for an (extended) LFG is a parser or transducer for well-formed semantic 
structures which, in principle, constructs for an input structure all sen- 
tences which have this structure as its semantic structure, analogously to 
section 2. A semantic structure alone, however, is usually regarded as too 
poor with respect to the syntactic information relevant for 'adequate gen- 
eration results' within a natural language system. We therefore integrate 
the additional possibility of driving the derivation by syntactic (functional) 
information. This is possible because the f-structure of a sentence is built 
up in parallel to the a-structure driven derivation of that sentence. If we as- 
sume that sentences % and f-structures @i are related to an input structure 
according to the following schema: 
~)1~ % 
~h /. \ 
\ 
/ 
/ 
/ 
gnk 
v~e can enm~re by additional constraints on the f-structures that only those 
sentences are generable whose f-structures satisfy these constraints. Thus, 
we can drive the derivation in a way which is more sensitive to syntactic 
information. We can ensure, for example, that only a pusive realization or 
a realization with a specific topic/focus structure is generable. Since not 
every input structure has a surface realization with an f-structure that fulfills 
these additional constraints, these constraints can be highly creative from a 
formal point of view. Therefore, a generator which drives the derivation by 
a semantic structure with additional constraints and also satisfies condition 
(**), must be capable to loosen the f-structure constraints if no output 
sentence can be derived wh~e f-structure satisfies the constraints, i.e., to 
drop constraints successively until an output sentence can be derived. The 
control of such a dropping procedure is again dependent on the application 
domain us and can be determined only by empirical investigations. 
3oi The derivation of semantic structures 
According to I\[alvorsen's proposal, the semantic structures are con- 
sh'uctable by means of additional equations which are formulated with a 
projector a which "can be prefixed to any expression denoting a functional 
structure" (\[Halvorsen 87\], p.8). Fig. 7 A gives a slightly simplified example 
of a lexical entry from \[Halvorsen 87\], written as the expansion of a lexical 
category symbol. 
v ~ kicks ~~tr ~-~ (1 PRED) = kick' Vo 
((~, 1) Aam) = (,, <t SUBJ)) ',. . , : , 
((# i.) ARG2) = (c, 0" OBJ)) ki.~ ki~k,° ~~ 
A ~a Tit. 7 
In Part A tim two equations at the hottom are called inter-modular 
equations. 
We will first give the syntax of this new type of equation. Let us assume a 
distinction between functional attributes (L~) and values (A~) and semantic 
attributes (L~) and values (Ao) (with all four sets pairwise disjoint). Then 
the set of semantic (a-) designators contains the simple a-designators Aa 
and the complex a-designators. A complex a-designator is a term a(t# q) 
consisting of a complex f-designator (a metavariable (\]" or l) followed by 
a possibly empty sequence of functional attributes), and a possibly empty 
~equence q of semantic attributes. The a-equations, then, are those equa- 
tions which have a complex ~r-designator in the first argument position and 
complex or simple ~-designator in the second. 
ff we assume that 
i. the fds-algotithm is used to solve the projector equations and to con- 
struet th(' semantic structure, and 
it. const, rain~s are expressable, s! 
then we can add the following two conditions to the WFF-condition: 
(W~'F~) 
(WFF) ~uld 
5. There is a ~-structure i\] and a partial mapping a from the f-structure 
nodes to the nodes of E, such that ~, is the only minimal a-structure 
that satisfies the projector equations a~ociated with the c-structure 
nodes. (The fds-algorithm constructs also a and ~.) 
6. All w conl~traints are satisfied by ~, a and ~.=~ 
These addition~d couditions must be tested in the order 3.4 5. -~ 6.. 
Since the description-solution algorithm is also used for solving the projector 
equations, it is easy to simulate the projector-mechanism by using an addi- 
tional singular ~ttribute. The solution algorithm enforces and preserves the 
fanc.ti0n proper~y (uuiqu~ness) of the projector, i.e., if (q~ p) and (~, p') 
a~'e terms designating some nodes in the f-structure which are \[napped by 
to some nodes in the a-structure (a(~b~ p), a(~bv f)), then the identity 
of (~b~ p) and (~ f), which might be established by some other equations, 
will also enforce the identity of (u(~b~ p) and a(~bv f)). Thus, we can sim- 
ulate the projector by using a singular attribute a (not contained in L¢, 
At, La, and A~) that is inserted between the f-designator and the seman- 
tic attributes of a semantic designator according to the following rewrite 
schemata. 
(a(T p) q) ~ (t p a q) 
(a(t p) q) ~ (1 p a q) 
The identity of (~b~ p) and (q~ p') will then also enforce the identity of the 
values of (~ p o') and (~v ff o') .93 
If we simulate the projector mechanism in this way, the derivation of a 
tr-strueture in parallel to a c- and f-structure closely resembles the derivation 
process described in section 2.1. A rule introduces a quadruple, where ~r 
is replaced by the DAG ~r which is obtained by solving the functional and 
a-annotations of the local tree introduced by the rule. The constraint set 
C~r contains the instantiated f- and a-constraints expressed by that rule. 
Fig. 7 shows in part B the solution of the equation system for the local tree 
introduced by the rule of part A. The initial quadruple consists of a DAG 
~s which has one a transition. 
(~.~,~,~s,~) ~ ~ ~ c~ 
5'0 ---,.~ 
The only additional condition that has to be satisfied by the derived 
DAG-structures results from the fact that tbe semantic substructures of a 
derived DAG are not necessarily connected, i.e. that not every substructure 
which is a value of a a-attribute must necessarily be a substructure of the 
topmost a-attribute of 9. On the one hand, the syntax for the a-equations 
permits us to formulate rules which introduce unconnected semantic struc- 
tures (fig. 8.1 gives an example). On the other hand, rules can introduce 
grammatical functions without a a-attribute (eL fig. 8.2 and 8.3). This can 
lead to unconnected semantic structures, if the expansion of a c-structure 
node which is associated with such a grammatical function introduces a se- 
mantic structure. The motivation for not excluding these two sources for 
the unconneetedness is that the semantic function of a constituent or gram- 
matieal function can be uncertain within the local context given by a rule 
and has to be determined by another constituent not introduced in that 
rule. ~4 In traditional LFG it is usually assumed that the semantic function 
of subeategorized constituents such as SUBJ and OBJ is determined by the 
governing verb (PRED) and that the assignment of grammatical functions 
to semantic functions may be aflhcted by lexical rules. These assignments 
can be established by inter-modular equations in the lexical entry for the 
verb, as illustrated in fig. 7, while at the same time leaving open the as- 
signments of semantic functions to the NPs in the rules of fig. 8.2 and 8.3 
by not annotating them with a-equations. 
1. V 
aeemlml ~eem' 
8eema seem 
(t SUBJ a) = (1 VCOMP SUBJ a) (1 VCOMP ~) = (~ a ARG) 
(I a REL) = seem 
2. S 
vPQ 
Fig. 8 
Thus, unconnected semantic structures can become connected through 
inter-modular equations which take into account the semantic structure of 
those constituents whose semantic function is not determined by the context 
represented by the local tree of a rule. 
Since the DAG of a derived sentence has to contain a connected semantic 
structure, we have to add to the well-formeduess conditions of that DAG, 
that the value of each or-transition must be accessible from the e-value of the 
735 
root of that DAG. The derived semantic structure is the substructure of the 
derived DAG which is rooted by the value of the uppermost a-transition. 
This leads immediately to the definition of the derivability relation. 
DEFINITION 3.1 A terminal string s is derivable with a-structure ~C 
(A~(s, ~.)) i~there is a sequence To...wn such that 
o Wo = (cs,~s,¢S,Ces) and 
o for all ¢0~ = (c,~,¢,c+), ~+~ = (e',~',¢',c"') (0 < i < ~) there i~ 
arule V --+ (c,,%,¢LCg) and 
- V is a label of a leaf it of c 
- c' is the result of expanding it in e by cr 
- ~/~ is the minimal extension of • which results from • by unifying 
@,. with the substructure rooted by Ct, 
- if v is a node of c, whose C-value is 5" (qo, P) in q', then its ¢'-value 
in ~' is 6~*(q~,p) 
if #.j is a node of d, not contained in e, the value of ¢~ is ~f~ (qD, q) 
and the value of ¢ for it is 8*(qo,p), then the value of ¢~ for p.j 
is ~'*(q~o,P.q) in ~' 
- C '/'' contains besides C ¢ the constraints (it.j p) =~ (it.i q) etc. 
for all (j p) =~ (i q) etc. in C~ 
- ~,~ satisfies all constraints in C~ 
- ~,, is f-complete and f-coherent 
o VpeL*c((q~,p.a)eDom(g*) -4 ~qeL*(g*(q~,a.q) = g*n(q~,p.a))) 
( conncctedness) 
o E is the substructure of ~n rooted by ~n(q~', a) 
- s is the terminal string of the c-structure ofwn. 
3.2 Generation as semantic structure driven and con- 
strained derivation 
The mechanisms for controlling completeness and coherence, which have 
been developed in section 2, together with the defining conditions of the 
different types of derivation concepts can now be used to design an adequate 
algorithm for the generation from semantic structures, which in addition can 
be directe d by functional constraints. 
The process of generating from a semantic input structure ~in has to 
start with a complex entity 
(e~, ,~,, ¢~, s,,,, h~, c$) 
where ~t is an unordered tree consisting of only one a-transition, whose 
value is +-labeled and dominates the unfolded input structure ~'in. Fig. 9 
shows the start entity for the generation from a simplified semantic input 
structure, h~ is the induced epimorphism from the substructure rooted 
by the a-value of k~t onto I;~,. The start entity contains an empty set 
of constraints, since not all constraints expressed by the applied rules can 
be checked immediately (e.g. pure functional constraints) and have to be 
added to this set until they can be checked. 
So 
Fig. 9 
The derivation can be constrained by a set C ~°~ of pure functional 
and/or inter-modular constraints of the form 
(g p) =, (0 f) et .... d (~ a q) =, (0 p a) 
which enforce the derivation of those sentences, whose f- and a-structures 
fulfill these constraints. (These constraints must eventually be retracted if 
no sentence is generable.) E.g. the set 
C:e. { (,SUBJa)=~(OaARG2) } 
-- (0 BYOBJ a) ---¢ (~ a ARGI) 
will enforce a passive realization of the input structure given in fig. 9 
('Peter is kicked by John'), while the set 
(0 SUBJ a) =c (0 a ARG2) 
C~ °" = (0 BYOB\] a) =¢ (O a ARG1) 
(0 BYOBJ )--e (O TOPIC)" 
enforces a passive realization with the BYOBJ in the TOPIC-position 
('By John, Peter is kicked'). 
The generator rules are constructed analogously to section 2 by an ad- 
ditional +-labeling of all nodes which are values of semantic attributes (not 
of the a-attribute !) within the DAG-structure introduced by the rule. Fig. 
10 gives an example. 
¢ tr 
Fig. 10 
Again a crucial restriction follows from the fact that these rules permit 
the derivation of structures with an unconnected semantic substructure, 
which becomes connected in later steps of the derivation by means of inter- 
modular equations. If a constellation is derived by means of these rules, as 
it is given schematically in fig. 11, 
Fig. 11 
the generation by expansion of V proceeds without control by the input 
structure as long as the semantic structure introduced by V remains un- 
accessible. The coherence-condition is undermined and sentences can be 
generated whose semantic structure is not subsumed by the input struc- 
ture. 
The coherence-condition can be checked, however, if only those rules are 
applied which preserve the connectedness of the semantic structure derived 
so far. This restriction on the order-freeness of the rule application does 
not affect the adequacy condition (**), because in each derivation step of 
a sentence with a connected semantic structure there must he at least one 
node of the partial c-structure which is expandable in such a way that the 
expansion preserves the connectedness of the partial semantic structure. If 
the expansion of every terminal node violated this connectedness condition, 
the semantic structure of that sentence could not be connected. Hence, at 
least one rule must be applicable in such a way. 
Since it is possible that pure semantic constraints of the rule's constraint 
set refer to semantic substructures whose semantic function is uncertain 
up to that generation step, not all pure semantic constraints expressed by 
the rules can be tested immediately. This applies to pure semantic con- 
straints which are constructable from inter-modular constraints by conver- 
sion. These constraints contain terms of the form (i a p) (which correspond 
to (~ a p) annotations) and they are not testable immediately if i is the 
value for (~ q) (q n ..... pty) (which corresponds to a (T q) --~ annotation) 
and ¢I*(q) has no a- attribute. Hence, the pure semantic constraints which 
cannot be tested in a particular step, the pure functional constraints, and 
the inter-modular constraints of the rule's constraint set have to be collected 
in C ¢ . The (constraint-driven) generability relation has to then be defined 
as follows. 
DEFINITION 3.2 A terminal string s is generable from an input structure 
~C~n under a constraint set C eel' (F~(Z~,, s, C~e~')) iff there is a sequence 
wQ ...w. such that 
o w0 = (as, ~t, cs, ~,,, h~, C$) and 
° for all wi = (c,@,dp, Ein,ha,C¢), w,+l = (d,q2',~b',~in,ha~,C ¢') 
(0 < i < u) there is a generator rule V ~ (er,qlr,¢",Ch and 
- V is a label of a leaf p of c 
o the substructure rooted by h~(~(¢t~,o')) is (apart from the +- 
labels) an extension of li\]r (the substructure of @, rooted by ~,(q~, a)) 
o for all pure semantic constraints (j a p) =c (i a q) etc. in C~r for 
which ~f(~b,4, a) and 6 (¢v.i, a) is defined, 8", (h a (~ (5,4, a)), p) 
~t.(h~(~(¢~.,, a)), q) etc. 
736 
- e' is the result of expanding p in e by cr 
- ~' is the minimal extension of • which results from ~ by unifying 
¢2. with the substructure rooted by eu 
o VpeL*~((q~o,p.a)eDom(6 '*) -, :qqeL*(tV*(q~o,o'.q) = 8'*(q~,p.o'))) 
- if v is a node of e, whose ~value is/f* (q0, P) in ~/, then its ¢~-value 
in @' is tf~*(q~,p). 
if/~.j is a node of d, not contained in c, the value of qt~ is 6 r (qD, q) 
aud the valse of ~b for ~ is *5*(qo,p), then the value of ~# for p.j 
is 5'*(q~o,p.q) in ~2'. 
o C ¢* containes besides C ¢ the pure semantic constraints which 
cau.ot be tested in this step, the pure functional and the inter- 
modular constraints of C~ with p attached as a prefix to the 
node indices of the constraints 
o Vp~((q'0, .v)~Do.,(~") -~ h~'(~'*(q'o, ~p)) = ~'. (#, p)) 
o each node of the substructure of ~. rooted by 8.(q~, a) (the semantic 
structurt 0 is +-labeled 
o the substructure of ¢2n rooted hy 6~(q~,a) is isomorphic to ~i. (h~ 
is an isomorphism) 
- ~. is f-complete and f-coherent 
- q~n satisfies all constraints in C. ¢ 
o ~. satislies all constraints in C ¢$~ 
s is the terminal string of the c-structure of wn. 
If we define the (unconstrained) generability relation ra as 
we Call prove 
I,EMMA 2 V~eDAG Vs*VT~(P.(~ , s) *-* A~(s, E)) 
The proof from left to right is carried out in analogy to Lemma 1. The 
right-to-left half follows from the fact that the order of the rule application 
during the derivation of a sentence with a connected semantic structure 
can always be rearrauged in such a way that in each step of the derivation 
the partial semantic structure is commcted. Otherwise the derived sentence 
would not haw. ~ a connected semantic structure. 
4 Acknowledgements 
The research reported in this paper was partially supported by the 
EUROTKA-I) accompanying research (BMFT grant No. 101 3207 0) and 
the ESPRIT project ACORD (project P393). The author would like to 
thank Mark Johnson, Bob Kasper, Stefan Mamma, Klaus Netter, Klaus 
Reinhardt and the members of the working group on Unification at the 
University of Stuttgart (Inge Bethke, Jochen DSrre, Andreas Eisele and 
ttenk Zeevat) who read carefully through earlier versions of this paper and 
helped a lot iu improving both the algorithm and its presentation. All 
remaining errors are of course my own. 
Footnotes 
1Fbr parsing ct. e.g. \[Eisele/DSrre 86\]. 
• ~For the description of dialogue structures within LFO el. \[Netter 88\]. 
3The algorithms described here o~dy works for those grammars which do not have 
regular expteesiox~s in the annotations (cf. \[Kaplan/Maxwefi/Zae~mn 86\]). 
4'the alg~itlnn has been implemented by Jocben DSrre and Stefan Mamma, el. ~Mom~/V~r~e 8r\]. 
5This condition can be weakened in different ways (cf. fn.15). However, since it 
depends on the domain of application how this ia done in a particular case, and since 
we want to demarche the algez-ithm independently of specific applications, we submit it to 
thi~ strong condition. 
SDetalled \[dormation on solution algorithms cent be found in \[Johnson 66\] and 
\[Johnson ST\]. 
rI wa~ reminded by an anr~ymou~ reviewer to relate thi~ paper to a paper by Block 
(\[Block 80\]), who must have had this procedta.e In mind, when he claimed that there is 
no way to derive c-~tructures from f-structures. 
"On the other hand, an LFG grammar, which does not allow traamfonna~ 
tiers Is forced to generate on tv~ differ~tt level~ f-structure and c-structure 
and then to compa~ the two, \]ooklng for a rnatch~ This is tim case because 
the theory specifically forbids carrying out any operations on either f- or 
e-stzzlcttu~s (cf. Kaplan and Bresnan 1982:180). Thus, there is no way to 
derive c-structures from f~etructure~." (\[Block 86\], p.3) 
I will attempt to clarify this issue in thla paper by 'unf~rbidden' means. 
Sin fact, functional structures are comtonly regarded as equivalence classes ofisomor- 
phlc transition graphs. We can use representatives of these classes wltldn the definitions 
without lc~s of generality. Furthermove~ all leaves have to labeled by m, if a fmwtional 
structure is well-formed. 
SThis preflxi~ procedure rune analogously for all other types of constraints, in LFG 
there are constrMats of the form (v p) =c (P q), (v p), (v p) :c z and their negations 
(~ mid ~, are node indices, q and p are sequences of attellmtea and z is an atomic value). 
The safi~factlon relatio~ between DAGs and these types of constraints is usually defined 
as: 
¢ ~ (. p) =~ (~ q) ~ 6"(¢.,p) = ~.(¢~,,q) 
~ (v p) ~ 8" is defined for (~bv,p) 
For the negative constraints tim satisfaction relation is defined by the negated condi- 
tions. For the sake of brevity, I will refer to only one type in the following, whenever 
constraints are invdved. 
1°The relation that is specified by the Wrg-condition between terminal strings and 
DAGs is equal to A¢. Both procedures are equivalent, since the order which is given by 
the respective sequence of applications of rules is imposed onto the fds-algorithin, which 
otherwise is orderfroe. 
lllt should be noted that these conditions are different from the conditions that an 
f-structure must be complete and coherent. To avoid confusion the latter ones are called 
f.eomplete and \]-coher~nt in the following. 
lathe completeness constraints can be nmde explicit by the path set (COMPs:, exis- 
tential constraints} and the elements of the irrefiezlve subset of the Nerode relation over 
the path set (COMPb., reentrancy constraints), cf. \[Hesper/Rounds 86\] and \[Kasper 87\]. 
13 The purpose of the +-labels will be explained below. 
14 Tills presupposes that the unification operation preserves labels, but this was already 
the case for the atomic values. 
15 Within the actual implementation the eohe~nce condition can be weakened. Atomic- 
valued features can be selected which are excluded from the coherence check and tlnm 
can be added during the generation process. Again, it has to be determined in a language 
specific way which features are entirely predictable either front grarmnatical rules (e.g. 
strllctural case in German, which under a speclfc analysis could be covered by a structural 
rule associating nolninative with SUBJ and accusative with 0B J) or front the lexical entries 
associated with certain predicates (e.g. grammatical gender in German which has to be 
specified for every noun). 
1aBut that is only because tile input stnmture is slimmed down for reasons of clarity. 
17Defining conditions whidt did not occur in previous definitions are itemlzcd by o. 
18Fbr categorial unification granmtm.s (CUG) cf. \[Uszkoreit 86\] and for unification 
categorial grammars (UCG) cf. \[Zeevat/Klein/Calder 87\]. 
lOThe extension of a syntactic theory by a semantic theol T is called creative iff there 
are grammars where not all grammatically well-formed sentences are also semautically 
well-formed; otherwise the exteamion is called conservativv. 
20 Within a machine translation system this dropping of constraints could be controlled 
in such a way that a maximal similarity with respect to the stylistic feahtres of the f- 
structure of the source language sentence has to he ensured. What 'maximal similarity 
with respect to the stylistic features' mezms again presupposes some empirical work. 
al One possible additional condition would be to require that each c-structure con- 
stituent must be interpreted within the semantic structure, i.e. each c-structure node 
must be mapped by ~o a (the product) into the semantic structure. Since we wanted to 
fornminte the algorithm as general as possible, we dispense with this conditiou. 
22Since it is possible to express constraints refering to the mapping a between • and 
)~ (inter-modular constraints, for exaanple), the refere~ce to &, ~ and ~ is necessary.~ 
23"1"o separate the f- and a-st~atcture from eadx other wc only have to eliminate the 
a-transitions. 
alThe semantic fimction of a gramnmtical function is identified with the semantic 
attribute, whose value COlTesponds to the a-value of that grannnatical fnnction. 

References 

\[Block 86\] Block, R.: Gau a "Parsing Grammar" Be Used for Natural Lmlguage Gener- 
.,tion? The Negative Example of LFG. Ms. Hamburg 1986 

\[Eisele/DBrre 86\] Eisele, A., DSrre, J.: A I~xlcal FUnctional Grammar System in Prolog. 
In: Procredlng8 o\] COL\[NG 86, Bonn 1986 

\[Halvorsen 87\] Halvorsen~ P.-K.: Situation Semantics and Semantic Interpretntlon in 
Constraint-Based Grammaa~s. CSLI Report No. CSLl-8%lO1, Stanford 1987 

\[Johnson 86\] Johnson, M.: Computing with Regular Path Formula. Ms. Stanford 1986 

\[J()hnson 67\] Johnson, M.: Attribute-Value Logic enid the Theory of Grammar. Ph.D. 
thesis, Stanford University, Stanford 1987 

\[Kaplan/Bresnan 82\] Kaplan, R., Bresnaah J.: Lexioal FUnctional Grammar: A Formal 
System for Grammatical Representation. In: J. Bresnan (ed.): The MentalRepresen- 
fallen o\] Grammatical Rehtior~. Cambridge, Mass. 1982 

\[Kaplan/Maxwefi/gaenen 86\] Kaplan, R., Maxwell, J., Zaenen, A.: Functional Uncer- 
tainty. CSLI monthly voL 2, no. 4, Stanford 1986 

\[Kaplan 87\] Kaplan, R.: Three Seductions of Computational Psycholingnistles. in: 
Whitelock, P. el. at. (eds.): Lingalslic "Theory and Computer Apples/ionia, New York 
1987 

\[Karttunen 86\] Karttun~a, L.: D-PATR: A Development Environment for Unification- 
Based Grarmnars. In: Proceedings o\] COLING 86, Bonn 1986 

\[gasper 87\] Kasper, R.T.: Feature Structures: A Logical Theory with Application to 
Language Analysis. Ph.D. thesis. University of Michigan, Arm Arbor 1987 

\[Kasper/Reunds 86\] Kasper, R.T., Rounds, W.: A Logical Semantics for Feature Stntc- 
tures. In: Precedings o\] the ~h Annual Meeting o\] ihe A CL, New York 1986 

\[Monuna/DSrre 87\] Monmm, S., DSrre, J.: Generation from F-Structures. In: Klein, 
E., van Benthem, J. (eds.): Categories, Po~norphisra and Unific~6on, Edinburgh, 
Amsterdam 1987 

\[Netter 88\] Netter, K.: Syntactic Aspects of LFG-Based Dialogue Parsing. ESPRIT 
ACORD Project 393, Deliverable T2.7'(a), Stuttgart 1988 

\[Reyle 88\] Reyle, U.: Compositional Semaaltics for LFG. In: Reyle, U., Bohrcr, C. (eds.): 
Nabaral Language Parding and Linguistle Theories. Dordrecht 1988 

\[Shieber 83\] Shieber, S. et at.: The Formalism and \]hnplementation of PATR-IL In: 
Orosz, B., Stickel, IV\[. (eds.): Re*ea~.A on Inte~etlv¢ Acquisilion and U~e of Knowledg~ 
SHI Intentati~al, Menlo Park 1983 

\[Uazkoreit 86\] Uszkoreit, H.: Categorial Unification Grmmnars. In: Proceedings o\] COI, 
ING 86, Bonn 1986 

\[Wedeldnd 88\] Wedekind, J.: A Concept of Derivation for LFG. In: Pnzeeedlngs o\] CO\[, 
ING 86, Bonn 1986 

\[Zeevat/Kleln/Caider 87\] Zeevat, H., Klein, E., Calder, J.: An haroduetlon to Unifica- 
tion Categorial Grammar. In: Haddock, Y. at at. (ede.): Edinburgh WorBnO Pa~ 
in CognBive Science, Edinburgh 1987 
