File Information

File: 05-lr/acl_arc_1_sum/cleansed_text/xml_by_section/metho/95/p95-1029_metho.xml

Size: 14,397 bytes

Last Modified: 2025-10-06 14:14:07

<?xml version="1.0" standalone="yes"?>
<Paper uid="P95-1029">
  <Title>Using Higher-Order Logic Programming for Semantic Interpretation of Coordinate Constructs</Title>
  <Section position="5" start_page="214" end_page="214" type="metho">
    <SectionTitle>
3 ~PROLOG and Abstract Syntax
</SectionTitle>
    <Paragraph position="0"> AProlog is a logic programming language based on higher-order hereditary Harrop formulae (Miller et al., 1991). It differs from Prolog in that first-order terms and unification are replaced with simply-typed A-terms and higher-order unification 7, respectively.</Paragraph>
    <Paragraph position="1"> It also permits universal quantification and implication in the goals of clauses. The crucial aspect for this paper is that together these features permits the usage of abstract syntax to express the logical forms terms computed by CCG. The built-in A-term manipulation is used as a &amp;quot;meta-language&amp;quot; in which the &amp;quot;object-language&amp;quot; of CCG logical forms is expressed, and variables in the object-language are mapped to variables in the meta-language.</Paragraph>
    <Paragraph position="2"> The AProlog code fragment shown in Figure 3 declares how the CCG logical forms are represented.</Paragraph>
    <Paragraph position="3"> Each CCG LF is represented as an untyped A-term, namely type t=. abe represents object-level abstraction Az.M by the meta-level expression (abe I), sit is not established if this schema should actually produce an unbounded family of rules. See (Weir, 1988) and (Weir and Joshi, 1988) for a discussion of the implications for automata-theoretic power of generalized coordination and composition, and (Gazda~, 1988) for linguistic axguments that languages like Dutch may require this power, and (Steedman, 1990) for some further discussion of the issue. In this paper we use the generalized rule to illustrate the elegance of the representation, but it is an easy change to implement a bounded coordination rule.</Paragraph>
    <Paragraph position="4"> eThe ,I~ notation is used because of the combinatory logic background of CCG. See (Steedman, 1990) for details.</Paragraph>
    <Paragraph position="5">  modulo ~,/conversion.</Paragraph>
    <Paragraph position="6"> kind tat type.</Paragraph>
    <Paragraph position="7"> type abe (tat -&gt; tat) -&gt; tat.</Paragraph>
    <Paragraph position="8"> type app tat -&gt; tat -&gt; tat.</Paragraph>
    <Paragraph position="9"> type forall (tat -&gt; tat) -&gt; tat.</Paragraph>
    <Paragraph position="10"> type exists (tat -&gt; tat) -&gt; tat.</Paragraph>
    <Paragraph position="11"> type &gt;&gt; tat -&gt; tm -&gt; tat.</Paragraph>
    <Paragraph position="12"> type ,t tat -&gt; ta -&gt; tat.</Paragraph>
  </Section>
  <Section position="6" start_page="214" end_page="215" type="metho">
    <SectionTitle>
CCG logical forms
</SectionTitle>
    <Paragraph position="0"> where N is a meta-level function of type ta ---* tat.</Paragraph>
    <Paragraph position="1"> A meta-level A-abstraction Ay.P is written y\p.S Thus, if waZked' has type tat --* tat, then y\(walked' y) is a AProlog (meta, level) function with type ta -* tat, and (abe y\(walked' y)) is the object-level representation, with type tat. The LF for found shown in (5) would be represented as Cabs obj\(abs sub\(found' sub obj))), app encodes application, and so in the derivation of harry found, the type-raised harry has the AProlog value (abe p\(app p harry')). 9 The second part of Figure 3 shows declares how quantifiers are represented, which are required since the sentences to be processed may have determiners.</Paragraph>
    <Paragraph position="2"> forall and exists are encoded similarly to abstraction, in that they take a functional argument and so object-level binding of variables by quantifiers is handled by meta-hvel A-abstraction. &gt;&gt; and tt are simple constructors for implication and conjunction, to be used with forall and exists respectively, in the typical manner (Pereira and Shieber, 1987). For example, the sentence every man found a bone has as a possible LF (8a), with the AProlog representation (8b)10: SThis is the same syntax for ~-abstraction as in (3). (Moore, 1989) in fact borrows the notation for A-abstraction from AProlog. The difference, of course, is that here the abstraction is a meta-level, built-in construct, while in (3) the interpretation is dependent on an extra layer of programming. Bound variables in AProlog can be either upper or lower case, since they axe not logic vaxlables, and will be written in lower case in this paper. 9It is possible to represent the logical forms at the object-level without using abs and app, so that harry could be simply p\(p harry'). The original implementation of this system was in fact done in this manner. Space prohibits a full explanation, but essentially the fact that AProlog is a typed language leads to a good deal of formal clutter if this method is used.</Paragraph>
    <Paragraph position="3">  tagovian generalized quantifier, giving rise to one fully scoped logical form for the sentence. It should be stressed that this particular kind of LF is assumed here purely for the sake of illustration, to make the point that composition at the level of derivation and LF are oneto-one. Section 4 contains an example for which such a  type apply tm -&gt; tm -&gt; tm -&gt; o.</Paragraph>
    <Paragraph position="4"> type compose tm -&gt; tm -&gt; tm -&gt; o.</Paragraph>
    <Paragraph position="5"> type raise tm -&gt; tm -&gt; o.</Paragraph>
    <Paragraph position="6"> apply (abs R) S (R S).</Paragraph>
    <Paragraph position="7"> compose (abs F) (abs G) (abs x\(F (G x))).</Paragraph>
    <Paragraph position="8"> raise Tn (abe P\(app P Tm)).</Paragraph>
    <Paragraph position="10"> Figure 4 illustrates how directly the CCG operations can be encoded 11. o is the type of a meta-level proposition, and so the intended usage of apply is to take three arguments of type tm, where the first should be an object-level )~-abstraction, and set the third equal to the application of the first to the second. Thus, for the query ?- apply (abe sub\(walked' sub)) harry' N.</Paragraph>
    <Paragraph position="11"> It unifies with the ta -~ ta function sub\(walked ~ sub), S with harry' and M with (It S), the recta-level application of R to S, which by the built-in fi-reduction is (walked' harry' ). In other words, object-level function application is handled simply by the meta-level function application.</Paragraph>
    <Paragraph position="12"> Function composition is similar. Consider again the derivation of harry found by type-raising and forward composition, harry would get type-raised by the raise clause to produce (abe p\(app p haxry~)), and then composed with found, with the result shown in the following query: ?- compose (abe p\(app p harry'))</Paragraph>
    <Paragraph position="14"> derivation fails to yield all available quantifier scopings.</Paragraph>
    <Paragraph position="15"> We do not address here the further question of how the remaining scoped readings axe derived. Alternatives that appear compatible with the present approach are quantitier movement (Hobbs &amp; Shieber, 1987), type-ralsing at LF (Paxtee &amp; Rooth, 1983), or the use of disambiguated quantifers in the derivation itself (Park, 1995).</Paragraph>
    <Paragraph position="16"> 11There are other clauses, not shown here, that determine the direction of the CCG rule. For either direction, however, the semantics axe the same and both directiona.I rules call these clauses for the semantic computation.</Paragraph>
    <Paragraph position="17">  At this point a further/~-reduction is needed. Note however this is not at all the same problem of writing a /~-reducer in Prolog. Instead it is a simple matter of using the meta-level ~-reduction to eliminate ~-redexes to produce the final result (abe x\(found I harry x)). We won't show the complete declaration of the/~-reducer, but the key clause is simply: red (app (abe N) N) (N N).</Paragraph>
    <Paragraph position="18"> Thus, using the abstract syntax capabilities of ~Prolog, we can have a direct implementation of the underlying linguistic formalism, in stark contrast to the first-order simulation shown in Figure 2.</Paragraph>
  </Section>
  <Section position="7" start_page="215" end_page="217" type="metho">
    <SectionTitle>
4 Implementation of Coordination
</SectionTitle>
    <Paragraph position="0"> A primary goal of abstract-syntax is to support recursion through abstractions with bound variables.</Paragraph>
    <Paragraph position="1"> This leads to the interpretation of a bound variable as a &amp;quot;scoped constant&amp;quot; - it acts like a constant that is not visible from the top of the term, but which becomes visible during the descent through the abstraction. See (Miller, 1991) for a discussion of how this may be used for evaluation of functional programs by &amp;quot;pushing&amp;quot; the evaluation through abstractions to reduce redexes that are not at the top-level. This technique is also used in the fl-reducer briefly mentioned at the end of the previous section, and a similar technique will be used here to implement coordination by recursively descending through the two arguments to be coordinated.</Paragraph>
    <Paragraph position="2"> Before describing the implementation of coordination, it is first necessary to mention how CCG categories are represented in the ~Prolog code. As shown in Figure 5, cat is declared to be a primitive type, and np, s, conj, noun are the categories used in this implementation, fs and bs are declared  type coord cat -&gt; tm -&gt; tm -&gt; tm -&gt; o.</Paragraph>
    <Paragraph position="3"> coord (fs * B) (abs It) (abs S) (abs T) &amp;quot;pi x\ (coord B (~ x) (S x) (T x)).</Paragraph>
    <Paragraph position="4"> cooed (be i B) (abe R) (abe S) (abe T) &amp;quot;pi x\ (coord B (R x) (S x) (T x)).</Paragraph>
    <Paragraph position="5"> coord B R S (and' E S) :- atomic-type B.</Paragraph>
    <Paragraph position="6">  to be constructors for forward and backward slash. For example, the CCG category for a transitive verb (s\np)/np would be represented as (fs np (bs np s)). Also, the predicate atomic-type is declared to be true for the four atomic categories. This will be used in the implementation of coordination as a test for termination of the recursion.</Paragraph>
    <Paragraph position="7"> The implementation of coordination crucially uses the capability of AProlog for universal quantification in the goal of a clause, pi is the meta-level operator for V, and Vz.M is written as pi x\l|. The operational semantics for AProlog state that pi x\G is provable if and only if \[c/z\]G is provable, where c is a new variable of the same type as z that does not otherwise occur in the current signature. In other words, c is a scoped constant and the current signature gets expanded with c for the proof of \[c/z\]G. Since e is meant to be treated as a generic place-holder for any arbitrary z of the proper type, c must not appear in any terms instantiated for logic variables during the proof of \[c/z\]G. The significance of this restriction will be illustrated shortly.</Paragraph>
    <Paragraph position="8"> The code for coordination is shown in Figure 6. The four arguments to cooed are a category and three terms that are the object-level LF representations of constituents of that category. The last argument will result from the coordination of the second and third arguments. Consider again the earlier problematic example (la) of coordination. Recall that after john is type-raised, its LF will be (abs p\(app p john')) and similarly for bill. They will both have the category (fs (bs np s) s). Thus, to obtain the LF for John and Bill, the following query would be made: ?- coord (fs (bs np s) s) (abs p\(app p john')) Cabs pkCapp p bill')) M.</Paragraph>
    <Paragraph position="9"> This will match with the first clause for coord, with  * t instantiated to (be np s) * Btos * It to (p\(app p john')) * S to (p\(app p bill')) * and T a logic variable waiting instantiation.</Paragraph>
    <Paragraph position="10">  Then, after the meta-level/~-reduction using the new scoped constant c, the following goal is called: ?- coord s (app C/ john') (app c bill') II.</Paragraph>
    <Paragraph position="11"> where II = (T c). Since s is an atomic type, the third coord clause matches with * B instantiated to s * R to (app c john') * S to (app c bill') * II to (and' (app c john') (app c bill')) Since I = (T c), higher-order unification is used by AProlog to instantiate T by extracting c from II with the result T = x\(and' (app x john') (app x bill')) and so H from the original query is (abe x\(and' (app * john') (app * bill'))) Note that since c is a scoped constant arising from the proof of an universal quantification, the instantiation null T = x\(and' (app C/ john') (app * bill')) is prohibited, along with the other extractions that do not remove c from the body of the abstraction. This use of universal quantification to extract out c from a term containing c in this case gives the same result as a direct implementation of the rule for cooordination of unary functions (7a) would. However, this same process of recursive descent via scoped constants will work for any member of the conj rule family. For example, the following query  (hate' xl x)))).</Paragraph>
    <Paragraph position="12"> corresponds to rule (7b). Note also that the use of the same bound variable names obj and sub causes no difficulty since the use of scoped-constants, meta-level H-reduction, and higher-order unification is used to access and manipulate the inner terms. Also, whereas (Park, 1992) requires careful consideration of handling of determiners with coordination, here such sentences are handled just like any others. For example, the sentence Mary gave every dog a bone and some policeman a flower results in the LF 12. 12This is a case in which the paxticulax LF assumed here fails to yield another available scoping. See footnote 10.</Paragraph>
    <Paragraph position="14"> Thus, &amp;quot;generalized coordination&amp;quot;, instead of being a family of separate rules, can be expressed as a single rule on recursive descent through logical forms.</Paragraph>
    <Paragraph position="15"> (Steedman, 1990) also discusses &amp;quot;generalized composition&amp;quot;, and it may well be that a similar implementation is possible for that family of rules as well.</Paragraph>
  </Section>
class="xml-element"></Paper>
Download Original XML