Higher-order Linear Logic Programming 
of Categorial Deduction 
Glyn Morrill 
Secci6 d'Intel.lig~ncia Artificial 
Departament de Llenguatges i Sistemes Inform~ttics 
Universitat Polit~cnica de Catalunya 
Pau Gargallo, 5 
08028 Barcelona 
morrill@lsi.upc.es 
Abstract 
We show how categorial deduction can 
be implemented in higher-order (lin- 
ear) logic programming, thereby realis- 
ing parsing as deduction for the associa- 
tive and non-associative Lambek calculi. 
This provides a method of solution to 
the parsing problem of Lambek catego- 
rial grammar applicable to a variety of 
its extensions. 
The present work deals with the parsing prob- 
lem for Lambek calculus and its extensions as de- 
veloped in, for example, Moortgat (1988), van 
Benthem (1991), Moortgat and Morrill (1991), 
Moortgat and Oehrle (1993), Morrill (1994b) and 
Hepple (1995). Some previous approaches to pars- 
ing Lambek grammar such as KSnig (1989), Hep- 
pie (1990) and Hendriks (1993) have concentrated 
on the possibilities of sequent proof normalisa- 
tion. In P~oorda (1991), Moortgat (1992), Hea- 
driks (1993) and Oehrle (1994) a strategy of un- 
folding and labelling for proof net construction is 
considered. We aim to show here how such unfold- 
ing allows compilation into programs executable 
by a version of SLD resolution, implementing cat- 
egorial deduction in dynamic linear clauses. The 
linearity resides in the use exactly once per word 
token of each of the clauses compiled from lexi- 
cal categorisations. By dynamic, it is meant that 
clauses may be higher-order (they are hereditary 
Harrop Horn clauses) so that clausal resolution in- 
volves insertion in, as well as retraction from, the 
resolution database; see Miller et al. (1991), and 
Hodas and Miller (1994). 
It is shown how a range of calculi can be 
treated by dealing with the highest common fac- 
tor of connectives as linear logical validity. The 
prosodic (i.e. sublinear) aspects of word order 
and hierarchical structure are encoded in labels, 
in effect the term structure of quantified linear 
logic. Compiling labels according to interpreta- 
tions in groupoids provides a general method for 
calculi with various structural properties and also 
for multimodal hybrid formulations. Unification 
must be carried out according to the structural 
axioms but is limited to one-way matching, i.e. 
one term is always ground. Furthermore, for the 
particular case of associative Lambek calculus an 
additional perspective of binary relational inter- 
pretation allows an especially efficient coding in 
which the span of expressions is represented in 
such a way as to avoid the computation of unifiers 
under associativity, and this can also be exploited 
for non-associative calculus. 
Higher-order linear logic programming has al- 
ready been applied to natural language process- 
ing in, for example, Hodas (1992) and Hodas 
and Miller (1994), in work deriving from Pareschi 
(1989) and Pareschi and Miller (1990). What we 
show here is that such implementation can be re- 
alised systematically, indeed by a mechanical com- 
pilation, while grammars themselves are written 
in higher level categorial grammar formalism. 
Automated deduction for Lambek calculi is of 
interest in its own right but solution of the parsing 
problem for categorial logic allowing significant 
linguistic coverage demands automated deduction 
for more than just individual calculi. There is 
a need for methods applying to whole classes of 
systems in ways which are principled and power- 
ful enough to support the further generalisations 
that grammar development will demand. We aim 
to indicate here how higher-order logic program- 
ruing can provide for such a need. 
After reviewing the "standard" approach, via 
sequent proof normalisation, we outline the rel- 
evant features of (linear) logic programming and 
explain compilation and execution for associative 
and non-associative calculi in terms of groupoid 
and binary relational interpretations of categorial 
connectives. We go on to briefly mention multi- 
modal calculi for the binary connectives. 
The parsing problem is usually construed as 
the recovery of structural descriptions assigned 
to strings by a grammar. In practice the inter- 
est is in computing semantic forms implicit in the 
structural descriptions, which are themselves usu- 
ally implicit in the history of a derivation recog- 
nising well-formedness of a string. This is true 
in particular of compositional categorial architec- 
133 
tures and we shall focus on algorithms for showing 
well-formedness. The further step to computing 
semantics is unproblematic. 
For the non-associative Lambek calculus NL of 
Lambek (1961) we assume types freely generated 
from a set of primitive types by binary (infix) op- 
erators \, / and o. A sequent comprises a succe- 
dent type A and an antecedent configuration r 
which is a binary bracketed list of one or more 
types; we write F ::~ A. The notation F(A) here 
refers to a configuration I" with a distinguished 
subconfiguration A. 
a. A =~ a id F =~ A A(A) =,. B (1) ,Cut 
~(r) ~ B 
b. F =~ A A(B) =~ C \[A, r\] ~ B \L \R 
z~(\[r, A\B\]) ~ c r =~ A\B 
c. F =~ A A(B) ~ C \[r, A\] ~ B ./L ./R 
&(\[B/A, r\]) ~ c r =* B/A 
d. r(\[A, B\]) C r = A a B 
oL oR F(A.B) ~ C r, .A :, AoB 
For the associative Lambek calculus L of Lambek 
(1958) the types are the same. A sequent com- 
prises a succedent type A and an antecedent con- 
figuration F which is a list of one or more types; 
again we write F =~ A. 
a. A ~ A id r =~ A A(A) =~ B (2) .Cut 
~(r) ~ B 
b. r~ A A(B)~C A,F~ B .\L \R 
A(r,A\B) =~ C F =, A\B 
C, r =~ A &(B) =*. C F,A ~ B 
/L B/A/R A(B/A, r) ~ c r 
d. F(A,B)=*C r ~ A A~ B 
• oL oR F(AeB) 
~ C r, A ~ A*B 
Lambek showed Cut-elimination for both calculi, 
i.e. every theorem has a Cut-free proof. Of the 
remaining rules each instance of premises has ex- 
actly one connective occurrence less than the cor- 
responding conclusion so Cut-elimination shows 
decidability through finite space Cut-free sequent 
proof search from conclusions to premises. Lifting 
is derivable in NL as follows: 
A ~ A B =~ B (3) \L 
\[A, A\B\] =~ B 
A # B/(A\B)/rt 
It is also derivable in L; indeed all NL deriva- 
tions are converted to L derivations by simply 
erasing the brackets. But L-derivable composi- 
tion depends essentially on associativity and is not 
NL-derivable: 
B~B C~C \L 
A=~ A B,B\C=~ C \L 
A, A\B, B\C =~ C \R 
A\B, B\C =~ A\C 
(4) 
Even amongst the Cut-free proofs however there 
is still semantic equivalence under the Curry- 
Howard rendering (van Benthem, 1983; see Mor- 
rill, 1994b) and in this respect redundancy in 
parsing as exhaustive proof search since distinct 
lines of inference converge on common subprob- 
lems. This derivational equivalence (or: "spuri- 
ous ambiguity") betrays the permutability of cer- 
tain rule applications. Thus two left rules may be 
permutable: N/CN, CN, N\S :=~ S can be proved 
by choosing to work on either connective first. 
And left and right rules are permutable: N/CN, 
CN =:~ S/(N\S)) may be proved by applying a left 
rule first, or a right rule, (and the latter step then 
further admits the two options of the first exam- 
ple). Such non-determinism is not significant se- 
mantically: the variants ha:ve the same readings; 
the non-determinism in partitioning by the binary 
left rules in L is semantically significant, but still 
a source of inefficiency in its backward chaining 
"generate-and-test" incarnation. Another source 
of derivational equivalence is that a complex id ax- 
iom instance such as N\S =:~ N\S can be proved 
either by a direct matching against the axiom 
scheme, or by two rule applications. This is easily 
solved by restricting id to atomic formulas. More 
problematic are the permutability of rule applica- 
tions, the non-determinism of rules requiring split- 
ting of configurations in L, and the need in NL to 
hypothesise configuration structure a priori (such 
hierarchical structure is not given by the input 
to the parsing problem). It seems that only the 
first of these difficulties can be overcome from a 
Gentzen sequent perspective. 
The situation regarding equivalence and rule or- 
dering is solved, at least for L-{*L}, by sequent 
proof normalisation (KSnig, 1989; Hepple, 1990; 
Hendriks, 1993): 
a. \[-)-7 =*" A id* r,,\[-Y\],r~ ~ o (s) 
rl,A,r  \[-B-\] p" 
A(r,~-~)~c \L" r~\R 
c. r=~r ~ A(~-\])=~C r,A=~\[B\], R 
This involves firstly ordering right rules before 
left rules reading from endsequent to axiom leaves 
134 
(so left rules only apply to sequents with atomic 
succedents; this effects uniform proof; see Miller 
et al., 1991), and secondly further demanding 
successive unfolding of the same configuration 
type ("focusing"). In the *-ed rules the succe- 
dent is atomic. A necessary condition for suc- 
cess is that an antecedent type is only selected 
by P* if it yields the succedent atom as its even- 
tual range. Let us refer to (5) as \[-L-\]. \[~\] is 
free of spurious ambiguity, and I-r. F ::~ A iff 
I-\[-~ F ::~ I-A-\]. The focusing strategy breaks down 
t.....-I for .L: (VP/PP)/N, N.PP =~ VP requires switch- 
ing between configuration types. It happens that 
left occurrences of product are not motivated in 
grammar, but more critically sequent proof nor- 
malisation leaves the non-determinism of parti- 
tioning, and offers no general method for multi- 
modal extensions which may have complex and 
interacting structural properties. To eliminate 
the splitting problem we need some kind of repre- 
sentation of configurations such that the domain 
of functors need not be hypothesised and then 
checked, but rather discovered by constraint prop- 
agation. Such is the character of our trea.tment, 
whereby partitioning is explored by unification in 
the term structure of higher-order linear logic pio- 
gramming, to which we now turn. By way of ori- 
entation we review the (propositional) features of 
clausal programming. 
The first order case, naturally, corresponds to 
Prolog. Let us assume a set ATO./t4 of atomic 
formulas, 0-ary, 1-ary, etc., formula constructors 
{' A... A "}hE{O,1,.,,} and a binary (infix) formula 
constructor ,--. A sequent comprises an agenda 
forlnula A and a database F which is a bag of 
program clauses {B1,..., B,}m,n > 0 (subscript 
m for multiset); we write F =:~ A. In BNF, the 
set of agendas corresponding to the nonterminal 
AG£.AfT)A and the set of program clauses corre- 
sponding to the nonterminal T'C£S are defined by: 
AG£.N'I)A ::= GOA£ A ... A gOA£ 
PC£S ::= ATOM *-- AG£AfDA 
(6) 
For first order programlning the set CjO.A£ of 
goals is defined by: 
¢OA£ ::= ATOM (7) 
Then execution is guided by the following rules. 
F, A :0 A ax (8) 
I.e. the unit agenda is a consequence of any 
database containing its atomic clause. 
F,A ~ B1 A...ABn =¢" B1 A . . . A BnA (9) C~ A...A Cm .RES 
F,A ,--- B1 A...AB, ~ AAC1 A... ACre 
I.e. we can resolve the first goal on the agenda with 
the head of a program clause and then continue 
with the program as before and a new agenda 
given by prefixing the program clause subagenda 
to the rest of the original agenda (depth-first 
search). 
For the higher-order case agendas and program 
clauses are defined as above, but the notion of 
GOA£ on which they depend is generalised to in- 
clude implications: 
GOA£ ::= ATOM \[ ~OA£ ,- pc£s (lO) 
And a "deduction theorem" rule of inference is 
added: 
F,B ~ A F =v (71 A... A C,, (11) 
DT 
r ==~ (A *-- B) AC~ A...ACm 
I.e. we solve a higher-order goal first on the agenda 
by adding its precondition to the database and 
trying to prove its postcondition. 
In linear logic programming the rules become 
resource conscious; in this context we write ® for 
the conjunction and o- for the implication: 
A =¢. A ax (12) 
I.e. an atomic agenda is a consequence of its unit 
database: all program clauses must be "used up" 
by the resolution rule: 
F =v B1 ® ... ®B,®C1 ® ... ®C,,, (13) 
.RES 
F, Ao--B1 @ ... ®B,, =~ A®C1 ® ... ®Cm 
I.e. a program clause disappears from the database 
once it is resolved upon: each is used exactly 
once. The deduction theorem rule for higher-order 
clauses also becomes sensitised to the employment 
of antecedent contexts: 
F,B ~ A A ~ CI@...®Cm (14) 
DT 
F, A ~ (A o- B)®C~ ® ... NCm 
We shall motivate compilation into linear 
clauses directly from simple algebraic models for 
the calculi. In the case of L we have first inter- 
pretation in semigroups (L, +) (i.e. sets L closed 
under associative binary operations +; intuitively: 
strings under concatenation). Relative to a model 
each type A has an interpretation as a subset 
D(A) of L. Given that primitive types are in- 
terpreted as some such subsets, complex types re- 
ceive their denotations by residualion as follows 
(cf. e.g. Lambek, 1988): 
D(A.B) = {s~+s2\]sl E D(A) As2 E D(B)} (15) 
D(A\B) = {,IW'e D(A),s'+s E D(B)} 
D(B/A) = (slW' e D(A),s+s' E D(B)} 
For the non-associative calculus we drop the con- 
dition of associativity and interpret in arbitrary 
135 
groupoids (intuitively: trees under adjunctionl). 
Categorial type assignment statements com- 
prise a term ~ and a type A; we write a: A. Given 
a set of lexical assignments, a phrasal assignment 
is projected if and only if in every model satisfying 
the lexical assignments the phrasal assignment is 
also satisfied. A categorial sequent has a trans- 
lation given by \[ • I into a linear sequent of type 
assignments which can be safely read as predica- 
tions. For L we have the following (NL preserves 
input antecedent configuration in output succe- 
dent term structure): 
IB0,..., B. ~ A I = (16) 
k0:B0 + ..... k,: B~ + =~ k0+...+k,,: A- 
Categorial type assigmnent statements are trans- 
lated into linear logic according to the interpreta- 
tion of types. The polar translation functions are 
identity functions on atomic assignments; on com- 
plex category predicates they are defined mutu- 
ally as follows (for related unfolding, but for proof 
nets, see Roorda, 1991; Moortgat, 1992; Hendriks, 
1993; and Oehrle, 1994); ~ indicates the polarity 
complementary to p: 
a+7: B p o- o~: A "~ (17) a new variable/ 
~: AkB p constant as p -'1-/-- 
7+a: B p o- a: A ~ c~ new variable/ 
./: B/A p constant as p +/- 
Tile unfolding transformations have the same gen- 
eral form for the positive (configuration/database) 
and negative (succedent/agenda) occurrences; the 
polarity is used to indicate whether new symbols 
introduced for quantified variables in the inter- 
pretation clauses are metavariables (in italics) or 
Skolem constants (in boldface); we shall see ex- 
amples shortly. The program clauses and agenda 
are read directly off the unfoldings, with the only 
manipulation being a flattening of positive ilnpli- 
cations into uncurried forln: 
((x+ o-Y1-)o - ...)o-Y,7 ~> (18) 
X + o- Yl- ® ... ® Y£ 
(This means that matching against the head of a 
clause and assembly of subgoals does not require 
any recursion or restructuring at runtilne.) We 
shall also allow unit program clauses X o-- to be 
abbreviated X. 
Starting froln the initial database and agenda, 
a proof will be represented as a list of agendas, 
avoiding the context repetition of sequent proofs 
by indicating where the resolution rule retracts 
from the database (superscript coindexed over- 
line), and where the deduction theorem rule adds 
to it (subscript coindexation): 
1Though NL with product is incomplete with re- 
spect to finite trees as opposed to groupoids in general. 
database F, A o- B1 ® ... ® Bn "i (19) 
agenda 
i. A®C1 ® ... ®C,~ RES 
i+I. BI ® ... ® B,, ® Cx ® ... ® C,n 
database r, Bi (20) 
agenda 
i. (Ao- B)®CI ® ... ®C,,~ DT 
i+1. A®CI ® ... ®C,n 
The sharing of a Skolem constant between A and 
B in (20) ensures that B can and must be used to 
prove A so that a mechanism for the lazy splitting 
of contexts is effected. The termination condition 
is met by a unit agenda with its unit database. 
By way of illustration for L consider composi- 
tion given the sequent translation (21). 
IA\B, B\C ~ A\CI= (21) 
k: AkB +, l: B\C + ~ k+l: AkC- 
The a~ssignments are unfolded thus: 
a+k: B o- a: A b+l: C o- b: B(22) 
k: AkB + 1: BkC + 
m+(k+l): C o- m: A 
k+l: AkC- 
Then tile proof runs as follows. 
database a+k: B o- a: A ~, (23) 
b+l: Co-b: B ~, 
In: A14 
agenda 
1. m+(k+l): C o- m: A DT 
2. m+(k+l): C RES b = m+k 
3. re+k: B RES a = m 
4. m: A RES 
Tile unification at lille 2 relies on associativity. 
Note that unifications are all one-way, but even 
one-way associative (=string) unification has ex- 
pensive worst cases. 
For NL the term labelling provides a clausal 
implementation with unification being non- 
associative. Consider lifting: 
IA ~ B/(A\B)I = k: A ~ k: B/(A\B) 
a+l: B o- a: A 
k+l: B o-- 1: A\B + 
k: B/(AkB)- 
The proof is as follows. 
database 
(24) 
(25) 
k: A 3, (26) 
a+l: B o-- a: A1 ~ agenda 
1. k+l: B o- (a+l: B o- a: A) DT 
2. k+l: B RES a = k 
3. k: A RES 
136 
The simple one-way term unification is very fast 
but it is unnatural from the point of view of pars- 
ing that, as for the sequent approach, a hierarchi- 
cal binary structure on the input string needs to 
be posited before inference begins, and exhaustive 
search would require all possibilities to be tried. 
Later we shall see how hierarchical structure can 
be discovered rather than conjectured by factoring 
out horizontal structure. 
Let us note here the relation to --\[~. \[~\] applies 
(working back fl'om the target sequent) right rules 
before left rules. Here, when a higher-order goal 
is found on the agenda its precondition is added 
to the database by DT. This precedes applications 
of the RES rule (hence the uniformity character) 
which corresponds to the left sequent inferences. 
It applies when the agenda goal is atomic and 
picks out antecedent types which yields that atom 
(cf. the eventual range condition of \[~\]). Tile fo- 
cusing character is eml)odied by creating in one 
step the objective of seeking all the arguments of 
all uncurried functor. 
By way of further example consider the follow- 
ing in L, with terms and types as indicated. 
(a book from which) the references are missing (27) 
the references are missing (28) 
r: N m: ((S/(NkS))kS)/PP 
=> r+m: S/PP 
We have cornpilation for 'are missing' as in Fig- 
ure 1 yielding (29). 
I> (29) 
b+(m+a): So--(b+k: So-- (c+k: So--c: N))®a: PP 
And the succedent unfolds as follows: 
(r+m)+l: S o-- 1: PP (30) 
r+m: S/PP- 
I> (r+m)+l: S o- 1: PP 
Derivation is as in figure 2. The unification at line 
2 relies on associativity and as always atomic goals 
on the agenda are ground. But in general we have 
to try subproofs for different unifiers, that is, we 
effectively still have to guess partitioning for left 
rules. We shall see that this is not necessary, and 
that associative unification can be avoided. 
There is a further problem which will be solved 
in the same move. Unfolding of left products 
would create two positive subfonnulas and thus 
fall outside the scope of Horn clause programming. 
However, the term-labelled implementation as it 
has been given also fails for right products: 
a: A- ® fl: B- (31) 
7: A,B- 
I = c~+fl? 
The problem is that c~ and fl are not determin- 
istically given by 7 at the "compile time" of un- 
folding. The best we could manage seems to be to 
try different partitionings of 7 at execution time; 
but even if this could work it would still amount 
to trying different partitionings for *R as in the 
sequent calculus: a source of non-determinism we 
seek to reduce. This limitation combines with the 
other difficulties with groupoid labelling of worst 
case of (even) one-way associative unification for 
L, and the need for a priori hypothesis of non- 
associative structure for NL. 
The method of solution resides in looking at 
an alternative model: the associative calculus has 
relational algebraic models (van Benthem, 1991) 
which interpret types as relations on some set V, 
i.e. as sets of ordered pairs. Given denotations 
for primitive types, those of compound types are 
fixed as subsets of V x V by: 
D(AkB) = {(v2,v3)lV(vl,v2) E D(A), (32) 
(v,, v3) E D(B)} 
D(B/A) = {(vi,v:)lV(v2, v3) E D(A), 
(v,, v3) C D(B)} 
D(A.B) = {(v1,va)13v2,@1,v2) E D(A) & 
(v~, va) E D(B)} 
Points in V intuitively corresponds to string posi- 
tions (as in definite clause grammars, and charts) 
and ordered pairs to the vertices of substrings per- 
taining to the categories to which they are as- 
signed. This induces unfolding as follows: 
i - k: B p o-- i - j: A ~ i new variable/ (33) 
j - k: A\B p constant as p +/-- 
i- k: B p o-- j- k: A ~ k new variable/ 
i -.j: B/A p constant as p +/- 
Furthermore right product (though still not non- 
Horn left product) unfolding can be expressed: 
i - j: A- ® j - k: B- (34) .j new variable 
i - k: A,B- 
Composition is now treated as follows. Assume 
sequent translation thus: 
\]A\B, B\C ::v A\CI = (35) 
0- 1: A\B +, 1-2: BkC + => 0- 2: A\C- 
The assignments are compiled as shown in (36). 
i - 1: B o-- i - 0: A (36) 
0 - 1: A\B + 
j-2: C o- j- 1: B 3-2: C o- 3-0: A 
1 - 2: BkC + 0 - 2: AkC- 
The proof is thus: 
137 
b-t-(nl+a): S 
c+k: S o-- 
b+k: S o- k: N\S + 
o- b: S/(N\S)- 
c: N 
rata: (S/(N\S))\S + o- a: PP 
Figure 1: 
database 
agenda 
1. 
2. 
3. 
4. 
5. 
6. 
Figure 
m: ((S/(N\S))\S)/PP + 
Groupoid compilation of the assignment to 'are missing' 
r: --~5 
2 b+(m+a): S o-- (b+k: S o- (c+k: S o-- c: N)) ® a: PP 
1:PP1 ~, 
c+k: So-c: Na 4, 
(r+m)+l: S o- 1: PP DT 
(r+m)+l: S RES b=r, a=l 
(r+k: S o- (c+k: So-c: N))®I: PP DT 
r+k: S ® 1: PP RES c=r 
r:N®I:PP RES 
l: PP RES 
2: Groupoid execution for 'the references are missing' 
database i - 1: Bo-i - 0: A 3, (37) 
j- 2: Co-j- 1: B 2, 
3 - O: Al 4 agenda 
1. 3-2: Co-3-0: A DT 
2. 3-2: C RESj=3 
3. 3- 1: B RESi=3 
4. 3 - 0: A RES 
In this way associative unification is avoided; in- 
deed the only matching is trivial unification be- 
tween constants and variables. So for L the rela- 
tional compilation allows partitioning by the bi- 
nary rules to be discovered by simple constraint 
propagation rather than by the generate-and-test 
strategy of normalised sequent proof. 
Although the (one-way) term unification for 
groupoid compilation of the non-associative cal- 
culus is very fast we want to get round the fact 
that a hierarchical binary structure on the input 
string needs to be posited before inference begins. 
We can do this through observation of the follow- 
ing: 
• All non-associative theorelns are associative 
theorems (ignore brackets) 
• Interpret non-associative operators in the 
product algebra of NL groupoid algebra and 
L relational algebra, and perform labelled 
compilation accordingly 
• Use the (efficient) relational labelling to check 
associative validity 
• Use the groupoid labelling to check non- 
associative validity and compute the prosodic 
form induced 
I.e. the endsequent succedent groupoid term can 
be left as a variable and the groupoid unification 
performed on the return trip from axiom leaves af- 
ter associative validity has been assured, as will be 
seen in our final example. The groupoid unifica- 
tion will now be one-way in the opposite direction. 
The simultaneous compilation separates hori- 
zontal structure (word order) represented by inter- 
val segments, and horizontal-and-vertical struc- 
ture (linear and hierarchical organisation) repre- 
sented by groupoid terms, and uses the efficient 
segment labelling to compute L-validity, and then 
the term labelling both to check the stricter NL- 
validity, and to calculate the hierarchical struc- 
ture. In this way we use the fact that models for 
NL are given by intersection in the product of re- 
la.tional and groupoid models. Each type A has 
an interpretation D(A) as a subset of L x V x V: 
D(A\B) = {(s,v~,v3)lV(s',vl,V~) • D(A), (38) 
(s'+s, vl, v3) • D(B)} 
D(B/A) = {/s,vl,v2)lV(s',v2,v3) • D(A), 
(s+s', vl, v3) • D(B)} 
D(d.B) = {(s~+s2,v~,v3)lgv2,(s~,v~,v2) • D(A) 
& (s2, v~, v3) • D(B)} 
Unfolding is thus: 
~r+7-i-k: B p o- o~-i-j: A F 
7-j-k: A\B p 
(39) 
c~, i new variables/ 
constants as p 4-/-- 
7+a'-i-k: B p (>- c~-j-k: A "~ 
7-i-j: B/A p 
~, k new variables/ 
constants as p +/- 
ol-i-j: A- ® \[3-j-k: B- a, B, j new variables 
ot+B-i - k: AoB- 
138 
b+(m+a)-i-kl: S 
c+k-l-4: S o- c-l-l: N 
b+k-i-4: S o- k-l-4: NkS + 
O-- b-i-l: S/(N\S)- 
n!+a- l-k1: (S/(N\S))\S + o- a-2-kl : PP 
m-l-2: ((S/(N\S))\S)/PP + 
Figure 3: Groupoid-relational compilation of the assignment to 'are missing' 
database r-0-1: N 4, 
b+(m+a)-i-kl: S o-- (b+k-i-4: S o- (c+k-l-4: S o- c-l-l: N)) ® a-2-k~ : ppX, 
c+k-/-4: So-c-l-l: N2 3, 
f-2-3:pp5 
agenda 
1. d-0-3: S RES d = b+(m+a) 
2. (b-Fk-0-4: S a-- (c+k-/-4: So-c-l-l: N))®a-2-3: PP DT 
3. b+k-0-4: S ® a-2-3: PP RES b = c 
4. c-0-1: N®a-2-3: PP RES c=r 
5. a-2-3: PP RES a = f 
Figure 4: Groupoid-relational execution for 'the references are missing from this book' 
By way of example consider tile following: 
the references are missing 
r-O-l: N m-l-2: ((S/(N\S))\S)/PP 
~+,7: B p o- a: A F a new variable/ (40) 
7: A\iBP constant as p +/-- 
7+icr: B p o- o~: A F a new variable/ 
7:B/iA p constant as p +/-- from this book 
f-2-3: PP =v d-0-3: S 
Tile unfolding compilation yielding (41) for 'are 
missing' is given in Figure 3. 
I> (41) 
b+(m+a)-i-kl : S o- 
(b+k-i-4: S o- (c+k-l-4: So--c-l-l: N))®a-2-kl: PP 
Tile derivation is given in Figure 4. Note how 
the term unification computing the hierarchical 
structure can be carried out one-way in the re- 
verse order to the forward seglnent matchings: 
d = b+(m+a) = c+(m+a) = r+(m+a) = (42) 
r+(m+f) 
In the case of NL-invalidity tile term unification 
would fail. 
We lnention finally lnultimodal generalisations. 
In multimodal calculi families of connectives 
{/i, \i, *i}ie{1 ...... } are each defined by residua- 
tion with respect to their adjunction in a "poly- 
groupoid" (L, {+i}ie{\] ..... n}) (Moortgat and Mor- 
rill, 1991): 
D(AtiB) = {s,+is2\]s, E D(A)As2 E D(B)}(43) 
D(A\,B) = {sirs' ~ D(A),s'+,s E D(B)} 
D(B/,A) = {s\[Vs' E n(A),s+,s' E D(B)} 
Multimodal groupoid compilation for ilnplications 
is immediate: 
(44) 
This is entirely general. Any multimodal cal- 
culus can be implemented this way provided we 
have a (one-way) unification algorithm specialised 
according to the structural communication ax- 
ioms. For example Morrill (1993) deals with mul- 
timodality for discontinuity which involves vary- 
ing internal structural properties (associativity vs. 
non-associativity) as well as "split/wrap" interac- 
tion between modes. This is treated computa- 
tionally in tile current manner in Morrill (19941) 
which also considers head-oriented discontinuity 
and unary operators projecting bracketed string 
structure. Ill these cases also simultaneous com- 
pilation including binary relational labelling can 
provide additional advantages. 
Labelled unfolding of categorial formulas has 
been invoked ill the references cited as a way of 
checking well-formedness of proof nets for catego- 
rial calculi by unification of labels on linked for- 
mulas. This offers improvements over sequent for- 
mulations but raises alternative problems; for ex- 
ample associative unification in general can have 
infinite solutions and is undecidable. Taking lin- 
ear validity as the highest common factor of sub- 
linear categorial calculi we have been able to show 
a strategy based on resolution in which the flow of 
information is such that one term in unification is 
always ground. Furthermore binary relational la- 
belling propagates constraints in such a way that 
139 
computation of unifiers may be reduced to a sub- 
set of cases or avoided altogether. Higher-order 
coding allows emission of hypotheticals to be post- 
poned until they are germane. Simultaneous com- 
pilation allows a factoring out of horizontal struc- 
ture from vertical structure within the sublinear 
space in such a way that the partial information of 
word order can drive computation of hierarchical 
structure for the categorial parsing problem in the 
presence of non-associativity. The treatments for 
the calculi above and their multimodal generalisa- 
tions have been implemented in Prolog (Morrill, 
1994a). 
References 
van Benthem, Johan: 1983, 'The Semantics of 
Variety in Categorial Grammar', l~eport 83-29, 
Department of Mathenlatics, Simon Fraser Uni- 
versity, also in Buszkowski, W., W. Marciszewski, 
and J. van Benthem (eds.): 1988, Calegorial 
Grammar, Linguistic & Literary Studies in East- 
ern Europe Volume 25, John Benjamins, Amster- 
dam, 37-55. 
van Benthem, J.: 1991, Language in Action: 
Categories, Lambdas and Dynamic Logic, Studies 
in Logic and the Foundations of Mathematics Vol- 
ume 130, North-Holland, Amsterdam. 
Hendriks, Herman: 1993, Studied Flexibility: 
Categories and Types in Syntax and Semantics, 
Ph.D dissertat.ion, Institute for Logic, Language 
and Computation, Universiteit van Amsterdam. 
Hepple, Mark: 1990, The Grammar and Pro- 
cessing of Order and Dependency: A Categorial 
Approach, Ph.D. dissertation, University of Edin- 
burgh. 
Hepple, Mark: 1995, 'Mixing Modes of Linguis- 
tic Description in Categorial Grammar', this vol- 
ulne. 
Hodas, J.: 1992, 'Specifying Filler-Gap De- 
pendency Parsers in a Linear-Logic Programming 
Language', in Proceedings of the Joint I~lterna- 
tional Conference and Symposium on Logic Pro- 
gramming, 622-636. 
Hodas, Joshua and Dale Miller: 1994, 'Logic 
Progrannning in a Fragment of Intuitionistic Lin- 
ear Logic', to appear in Journal of IT~formation 
and Computation. 
Kgnig, E.: 1989, 'Parsing as natural deduction', 
in Proceedings of the Annual Meeting of the Asso- 
ciation for Computational Linguistics, Vancouver. 
Lambek, J.: 1958, 'The mathematics of sentence 
structure', American Mathematical Monthly 65, 
154-170, also in Buszkowski, W., W. Mar- 
ciszewski, and J. van Benthem (eds.): 1988, Cate- 
gorial Grammar, Linguistic & Literary Studies ill 
Eastern Europe Volume 25, John Benjamins, Am- 
sterdam, 153-172. 
Lambek, J.: 1961, 'On the calculus of syntactic 
types', in R. Jakobson (ed.) Structure of language 
and its mathematical aspects, Proceedings of the 
Symposia in Applied Mathematics XII, American 
Mathematical Society, 166-178. 
Lambek, J.: 1988, 'Categorial and Categorical 
Grammars', in Richard T. Oehrle, Emmon Bach, 
and Deidre Wheeler (eds.) Categorial Grammars 
and Natural Language Structures, Studies in Lin- 
guistics and Philosophy Volume 32, D. Reidel, 
Dordrecht, 297-317. 
Miller, D., G. Nadathur, F. Pfenning, and 
A. Scedrov: 1991, 'Uniform Proofs as a Founda- 
tion for Logic Programming', Annals of Pure and 
Applied Logic 51, 125-157. 
Moortgat, Michael: 1988, Categorial Investiga- 
tions: Logical and Linguistic Aspects of the Lam- 
bek Calculus, Forts, Dordrecht. 
Moortgat, Michael: 1992, 'Labelled Deductive 
Systems for categoriat theorem proving', OTS 
Working Paper OTS-WP-CL-92-003, Rijksuni- 
versiteit Utrecht, also in Proceedings of the Eighth 
Amsterdam Colloquium, Institute for Language, 
Logic and Information, Universiteit van Amster- 
dam. 
Moortgat, Michael and Glyn Morrill: 1991, 
'Ileads and Phrases: Type Calculus for Depen- 
dency and Constituent Structure', to appear in 
Journal of Language, Logic, and Information. 
Moortgat, Michael and Dick Oehrle: 1994, 'Ad- 
jacency, dependency and order', in Proceedings of 
the Ninth Amsterdam Colloquium, 447-466. 
Morrill, Glyn: 1993, Discontinuity and Pied- 
Piping in Categorial Grammar, Report de Re- 
cerca LSI-93-18-R, Departament de Llenguatges 
i Sistemes Inform~tics, Universitat Polit~cnica de 
Catalunya, to appear in Linguistics and Philoso- 
phy. 
Morrill, Glyn: 1994a, 'Higher-Order Linear 
Logic Programming of Categorial Deduction', Re- 
port de Recerca LSI-94-42-R, Departament de 
Llenguatges i Sistemes Inform£tics, Universitat 
Polit~cnica de Catalunya 
Morrill, Glyn: 1994b, Type Logical Grammar: 
Categorial Logic of Sig~s, Kluwer Academic Pub- 
lishers, Dordrecht. 
Oehrle, Dick: 1994, 'Term labelled categorial 
type systems', to appear in Linguistics and Phi- 
losophy. 
Pareschi, R.: 1989, Type-driven Natural Lan- 
guage Analysis, Ph.D. thesis, University of Edin- 
burgh. 
Pareschi, R. and D, Miller: 1990, 'Extend- 
ing Definite Clause Grammars with Scoping Con- 
structs', in D.H.D. Warren and P. Szeredi (eds.) 
1990 International Conference in Logic Program- 
ruing, MIT Press, 373-389. 
Roorda, Dirk: 1991, Resource Logics: proof- 
theoretical investigations, Ph.D. dissertation, Uni- 
versiteit van Amsterdam. 
140 
