, . , • , 
SERGE BOISVERT - ANDI~ DUGAS - DENISE BI'LANGER 
OBLING: A TESTER. 
FOIL TR`ANSFORMATIONAL' GKAMMAKS 
~. INTRODUCTION 
Transformational grammars have developed with recent research 
in linguistics. They appear to be a powerful and explicit device for 
characterizing the description of sentences; they also meet conditions 
of adequacy that can be applied to check that a sentence, or a set of 
rules, is well-formed. 
A transformational grammar tester is part of a strategy for the 
selection of a well-formed grammar matching the data base. To put 
it more explicitly, a tester of this sort should provide the linguist a 
class of the possible grammars which concerns precisely the linguistic 
theory. These grammars have the form given by CUOMSKY in Aspects 
(see bibliograIShy). 
2. GENERAL DESCRIPTION OF THE SYSTEM 
O~UNO is a .program for dealing with the structures of the French 
language: it performs the verification of phrase structure rules, the 
derivation of sentences according to the transformational component 
and the graphic illustration of the intermediate or final structures. 
In the program, UNG is the routine that controls all the subroutines 
and the matching of the input structures with those allowed by the 
phrase structure rules. If the matching is impossible, a comment is 
Acknowledgments. This work was supported in part by Canada Council of Arts grants 
@69-0404 and @71-0819. 
We are also indebted to the staff of the Computer Center of the Universit4 du Qu4- 
bec ~ Montr4al for providing computing facilities, and giving this project high priority. 
David Sankoff, of the Universit4 de Montr6al, is also responsible for the first ver- 
sion of the tree editing program, l~inaUy, Jossdyne G4rard helped debugging linguistic 
rules. 
122 SERGE BOISVERT- ANDIL~ DUGAS- DENISE BI~,/ANGER 
ieeIIIItiIeletlIillllllelIlIlIllll~ 
: o 
:. -*:- : 
Iieeee~ 
...........................~> 
...........................9= 
~z °*,0,°~o 
: ..... ~Z ................... ~g 
o 
D~O 
o 
aO OUd 
3N1 
z o..~ ~ 3z O. ~ Z o k9 b- O. ~3J 
ATd 
o:r =:~ o 0~3 
qD_~ • :: u. 0. tk NNN 
IOH 
U~ ~ Uj~ (~ ~ZD~-Z NUd 
~dO 
NWZDU~ 
Fig. 1. Tree for an input sentence 
OBLING: A TESTER FOR TRANSFORMATIONAL GRAMMARS 123 
made. Otherwise, the output gives the graphic illustration of the tree 
for this sentence, or the input structures are immediately processed 
using transformational rules. For example, 
General transformational rules are operated by a number of subrou- 
tines of which the main are explained hereafter. 
3. GENERAL CAPACITIES OF THE SYSTEM 
The system OBLING is divided into four parts: a main program LING, 
the service subroutines, the phrase structure grammar tester and the 
transformational grammar testers. LING and the service subroutines are 
stored in the central memory while the two grammars testers operate 
on disks. 
The main program invokes the various linguistic rules and controls 
the application of these rules to the data base structure(s) or the derived 
structure(s). The service subroutines are called by the routines concern- 
ing the application of the transformational rules and work in paral- 
lel with LING during the processing. 
Phrase 
structure 
grammar tester 
" LING 
Service I Subroutines 
(processing memories) 
4--1~ ' grammar testers 
Fig. 2. The OBLING system 
4. SPECIFIC CAPABILITIES OF THE PROGRAM LING 
The program LING will first initialize the working areas. Then, it 
loads and operates the program V~rlCATEU~ which, after the reading 
and the verification of the input data, returns control to LINe. 
124 SERGE BOISVERT- ANDI~ DUGAS- DENISE BELANGER 
ZING will then load and execute, using an overlay technique, the 
small control programs cYcH Q1, CYCLI Q2 .... , cYcLI Qi. Each of these 
handles, in conjunction with HNG, the mapping on the input structure 
of a fixed number of transformation rules. In the current version of the 
program, cYctI Q1 deals with the linguistic transformational rules T1 
to Ts included, cYcrI Q2 the rules To to T10 included, etc. The total 
number of these control programs cYcrI Q depends on the memory 
space allowed; processing is most efficient if the number of these control 
programs is as small as possible. 
5. INFORMATION PATTERN BETWEEN LING AND VERIFICATEUR 
When VERI~CATEUR (the phrase structure grammar tester) is in 
memory, the structure to be analysed is read from the standard input 
unit (punched cards) and is processed by the subroutine Cr~RB~ to 
LING 
v 
V~ICATBD~ 
c'zcLi qO 
• T 
CKARBRE ARBRE 
verification printing 
of syntagmatic of the tree 
rules 
Fig. 3. The Vm~L~CAWSUa program (see figure 1 for updated tree and structure) 
OBLING: A TESTER FOR TRANSFORMATIONAL GRAMMARS 125 
be validated. This subroutine first checks if the phrase structure is con- 
sistent, then calls up eke which tests the names of the constituents 
describing the structure; finally, it compares this structure with those 
allowed by the phrase structure rules. 
When errors are discovered during the processing, various sorts 
of comments are printed and followed if possible by a partial or full 
tree of the sentence. When updating is done, the tree is printed and the 
program VERrFACATEUR passes control to LING. The following illustrations 
concern first, the program VERIHCATEUR and second, an example of an 
updated tree and structure. 
6. INFORMATION PATTERN BETWEEN LING AND THE TRANSFORMATIONAL 
GRAMMAR TESTERS 
Each time LING receives the control from VERIFICATEUR, that is, 
when no further errors have been detected, it loops in order to call 
successively the monitors CYCLI ql .... , CYCLI Q9 which contain up 
45 different rules; we suppose that we are working now with a specif- 
ic version of a grammar. 
The first of these monitors has the following structure. 
Transformational rule # 1 
Transformational rule # 2 
Transformational rule # 3 
Transformational rule # 4 
Transformational rule # 5 
Fig. 4. The cYcLI Q1 program 
When CYCLI Q1 gets control, it is botmd to the application of 7'1, 
• .., Ts which correspond to the first five transformational rules; then 
control is switched to LING which calls cYCLI Q2. The programs CYCLI qn 
process cyclic rules and the output structure is the input structure for 
the following rule. When all the cyclic rules have been applied to the 
input structure, LING starts over again at CYCLI Q1. If no modifications 
126 SERGE BOISVERT- ANDR~ DUGAS- DENISE BI~LANGER 
to the already processed structures occur, or if new errors are discovered, 
control returns to LING. 
After all the cyclic rules have been applied, the post-cyclic rules 
are processed in a similar manner: cYcu qA comprises the first five 
post-cyclic rules CYCLI Q~, the five following, and so on. 
This chart illustrates the general interaction between the programs 
for the processing of cyclic or post-cyclic rules. 
I_ 
cYcI.t Q1 
cYcu Q2 
CYCI, I Q9 
CYCLI QA 
I 
CYCLI QB 
cYC~i Qi I 
End 
Fig. 5. Flow of Control between control programs under the direction of LInG 
7. SERVICE SUBROUTINES 
They are implemented within the main monitor ZING. All but a 
few of these subroutines are called during the execution of the routines 
corresponding to the 88 rules, that is during the phrase structure anal- 
ysis or the mapping of n structures. 
A short description of the main subroutines follows: ^R~ (tree). 
This subroutine is responsible for printing the tree. At the input, we 
find a vector D of ND elements which represents the tree. The hori- 
zontal distance for printing is calculated along with the total number 
and the relative position of these nodes; the vertical one is fixed. 
OBLING: A TESTER FOR TRANSFORMATIONAL GRAMMARS 
For example, 
fACHE~ 2 # 
NOMRRE DE NOEUDS 
NOMBRE DE NOEUDS 
CHA/NE 
1 = $ O(. I) 
2 = LE D( 21 
3 = N D(3) 
4 = V O( ~) 
5 = $ D( 5\] 
6 = $ D( 6) 
7 = PRP D( 7) 
8 = OIJE O( 8) 
g : LE O( 91 
I0 = N D(IO) 
11 = V O(ll 
12 = $ D(12) 
13 : DET D(13) 
14 : DET 0(14) 
15 : GN D(iS) 
16 = GV D(16) 
17 = C D(17) 
18 = GN O(18) 19 
= GV D(lg) 
~0 = P O(~O) 
~I = P D(21 
21 
TERMINAUX 
= 2'0 
= 13 
= 15 
= 16 
= 20 
= 21 
= 17 
= 17 
= 16 
= 18 
) = Ig 
= 21 
= 15 
= 18 
= 20 
= 20 
= 21 
= 21 
= -I 
) = -I 
12 
ARBQRESCENCE NON PRODUITE SUR DEMANDE : AUCU~E 
REGLES IGNORFES SUR DENANDE t AIJCUNES 
Fig. 6a. Representation of the tree in memory 
127 
FIW~ f~ 
7.1. OT~ (Remove). 
This subroutine is needed when nodes are erased; another subroutine, 
NEWTgF_~ will erase the nodes. In the example below, oxv sets D(6), 
D(7), 9(13) to zero, and NEWTREE erases nodes numbered 6, 7 and 13. 
If node 12 was also erased, OT~ and NEWT~E would have erased node 
28 automatically. The same holds for the node 32, where all the nodes 
between 6 and 13 would have been erased. 
7.2. DFER, DFERX, GFER, GFERX. 
Except for a few details, these four subroutines do the same work. 
For example, Dr~RX \[I, J\] is applied to a structure J that has to be mov- 
ed to the right under a dominating node L As illustrated below, Dr~Rx 
\[31, 30\] moves the structure headed by 30 to the right under the node 
128 SERGE BOISVERT- ANDRE DUGAS- DENISE B~LANGER 
....................~. 
0":> °~ 
IJ-- 
: ..... ~g 
............. 9~ : 
: ............ ~ 
m 
: ..... ~g ............ ~ 
~ ........... ..~z 
°°°°°°~ 
: ..... ~ ~w 
....................~. 
~Z~ ZU wz 
mz~wz 
~ ~z~z 
m 
Fig. 6b. Corresponding printed tree 
OBLING: A TESTER FOR TRANSFORMATIONAL GRAMMARS 129 
.......,.......,..,.....~........,.....~.~, 
° ° ° • • ,cu~ W~ud 
~ : ." 
........º...o...............~ 
....................~. 
=> .~> 
g~ 
.............~z 
~z ow 
..... '.~ : ~J 
...... ~ : ..... ~ 
............. 9~ 
• o 
....~......,..................,...~> 
Fig. 7a. Sample tree before OTE and NEwra~ apply 
~z~wz 
~z~wz 
wz 
wz~o 
~ w O~d 
3NI 
II 
O~Do H~N ~ZD~ 
ION 
N~d 
dOD 
HN ° 
NH" 
JI ° 
+ 
o=~Do 06d 
II 
~NN 
' I0~ 
O~DO 3~d 
dO0 
~AV 
~I" 
~ ~zz~ dN" 
c~o 
130 SERGE BOISVERT- ANDP~ DUGAS- DENISE BELANGER 
,........,......,.......,................~, 
8~ 
U- 
• oo.o o~ .oo*o°--~ 
: ............ ~ 
...........................~ 
elost$   eset0 t  eQ   
o o • " " • " o • • o • • "Z 
• • • • • oJo 
: ° ° ° ° oz ° • • • ° .~ 
: ..... h~o :e 
...... go ............ ~ 
o 
°°°.° °~ °°°° °--~ °°o.°°,°°°°'°° 
....... °°°.°°°, ........... • .... °.°°> 
m 
..... °0°° .... • ....... ,°°.°°°°.°*0o°2 
~z 
**°°.°~°°°°°°°,°°..°°,°°°°o°°°°o,° 
°o,,o°-°,o,~°°o.,°,..°°,..°..o.°...,.oo.,~ ~ 
¢q~L0 
tn>uz NgCW 
{gh.w 
DX~ 
02 ~uu 
08d 
JNr 
a.=~..=oc :~ o=- II 
cz 
Frld 
0~3 
u~ .J m snN 
ION 
ado 
0. ~--u o. 3Z :~- d03 
~ 0. N , u- ~- ,x~..~h.Z NO" ~cxo..~ -~wl • • • • oliN" 
÷ ~NI 
cc~ x'°W-Jcc II 
B- o. o_ 
ngd 
~D~>O_:E0C GND 
r-o.J ~ :g uJ o_ HnN :£ o. i.-- .~ ~ u. x: 
|ON 
H~d 
,o 3~d 
~dO 
:g :~ ~ 0 dO3 ° ~ uJ .J~c 
EZZo. ~zzo--I 
+ 
O~D 
¢W W Z D bJ .J O: _J ,Xb.C~O. 
Fig. 7b. Sample tree where oT\]~ and N~WTREB have applied 
OBLING: A TESTER FOR TRANSFORMATIONAL GRAMMARS 131 
31. (Node 31 was created by rule T2 and DF~R was applied on the re- 
suiting tree) 
\[I,/\] 
DFERX \[;r, j\] 
GF R \[1, J\] 
G RX \[I, j\] 
makes node J the next younger brother of node I 
makes node J the youngest son of node I 
makes node J the next older brother of node I 
makes node J the oldest son in node I 
The general technique for these four subroutines is the following. 
Before modification, the tree is copied in another area of memory. 
All the terminal nodes identified with the structure J take the place 
of the terminal nodes identified with the structure L Then, the terminal 
nodes of I are requested in the copied structure and parsed with their 
dominating nonterminal nodes at the right place. Gr~R ,permits the 
new numbering of the sequence and, if necessary, prunes the tree. 
In the example illustrated below (Fig. 9a and 9b), Gr~R \[14, 13\] is 
applied and node CPL (13) has been attached to node 16, the father 
of node 14. If GF~RX \[14, 13\] had been specified, node CPL would 
have been attached directly to node 14, rather than the father of node 14. 
7.3. INTERV, 
This subroutine is used for the permutation of 2 structures. For 
example, INT~RV. \[I, J\] where I = 24 andJ = 28 gives rise to the struc- 
tural change illustrated below. 
7.4. INSERT. 
This subroutine is used for the insertion of a new terminal node; 
for example, INSERT \[4, 1HE, 1HT, 1HR, 9\] introduces node with 
name ETR which becomes a new son of node 9. 
7.5. Other subroutines. 
There is a number of other subroutines concerning conditions spec- 
ified within a rule, such as the presence or absence of a node or of 
a feature in the whole structure, the logical restrictions of loose equality 
or strict equality. 
132 SERGE BOISVERT- ANDR~ DUGAS- DENISE B\]~LAlqGER 
..................................S. 
.°°o*~°*°~o°i~°°°°*°°~°°*°°~Z 
°,°°°•~°°,°°°.°°°°°°°°.~°°~ 
~W ~°,°°•°°°*.°°°°..°°°*°°°*°•~ 
° 
~W :°°~°°°°°•.°°°°°°°°°°°**°°•~ 
..................................~. 
..................................~ 
°°°°.°°°-°°°°~z 
: ................... ~.~ 
oi 
............ 
...°.~.°,.,.,..°°~.....°....> 
° ° . • ...... ° ° • ° ° • ° ° • ° ° ° ° • ° • * .z 
...... ~_~ 
~ : 
~>~ 
~Z~W 
0~td O~ ~ g ~ 3NI 
II 
177d 
N~N 
IOH 
H~d 
=l~d 
~ldO 
÷ 
~wz~w~ 
o 
.-INI 
• o- 0- N33 
flTd 
IOH 
un bJ z ~ h2 .-J ~ N~d ~o.o_ 
Od0 
4" c3~ a~ zza-~x :~zo~co dO3 
~..~-a:Q.~ .-e~ • • j • • ...- aAV 
m~w~2w 
O- 
Fig. 8a. Sample tree before GFER applied 
OBLING~ A TESTER FOR TRANSFORMATIONAL GRAMMARS 
.........................................~. 
d8 
...... ~ 
*~ 
...... g~> ............ "~> 
: ............. ~z 
...... ~g 
• 
:.,.,.~..,. o,~ .~ 
: --z 
• ° • • • °m( 
• o 
° • • • • °~o 
; .,-w . ° • ° • . • , • • . • ° °,.j 
....................~ 
,~: .~ ............ ~.~ 
......................0...........~. 
.,°.°.,,~.,~,,,°,~,~,°..,,,~...,.°.~ 
...... ~g 
~ ° °°,°°~°° 0 ° ,° °°. ,° °°,°°°° .°,°°°.,° 
m 
m °°°,°°°,°,°,°°°,°,°,°°°,°°°°°°°,°°°°,,,°,~ 
133 
=>~ 
~z 
~z~z 
~- z~z~o 
r- 
OBd 
• 4NI 
,o II 
H3.-I 
+ HAN 
oz~o lOW 
3~d 
~ 0. o o. (~ < P..~ o(J =0 z dOO 
. ~IAV 
30" 
eU NO" 
HN ~ 
* 3NI 
o~x~o II 0~ Ld z ~ W,J ~' 
.J • :~ h. (l. ~ 1~3_4 
fVld 
~AN 
ION 
O~Z~O H~d hJ Z ~ ~J.Ja: 
~"~ • ~ h. a.o. 3~d ~dO 
dO3 
,O ~AV 
30"+ 
o~-~o NO'* 
.-I • ~ u. 0. 0. HN" 
NH" 
Fig. 8b. Sample tree where Grsa has applied 
134 SERGE BOISVERT- ANDRI~ DUGAS- DENISE B~LANGER 
.....................,°,......,..........9~ 
:...................9~ 
• ~ ~ 
m 
~Z 
o O~ld 
JNI 
II 
nqd 
¢c k~RN 
e... ozc,~,~.~ zw~g 3aa 
~dO 
0=~ dO3 
. ~ t,. cL cL ~AV 
30" 
Q. t-.- (.,.~ O. ~2 --)-- Z NO" 
O. C30. ¢J ~ v- .J 0 ¢J ~ ~ HN* 
NH" 
~O_ N • U..~ .:~o- AI" 
e3 oz~ ha~ zh4 ha 
Fig. 9a. Input structure 
OBLING: A TESTER FOR TRANSFORMATIONAL GRAMMARS 135 
~i. i le~eee ee$ lse eee eeeee~ 
e,e,eee,ee,,°,~°,,,le,e,°°~Z 
~z 
...........-.~z 
II 
• -g ....... ~ ~ ...... 
~ °, ~° °°,1° °° ,,° ° ,.. • ~ ~,° °°, °., ° ° °,. °1~ 
ozJ~z 
2 
08d 
II 
~z~ W33 
~z~wz ~Id 
WnN 
8~d 
3~d 
HdO 
dO3- 
~AV 
30 ° 
NO" 
Fig. 9b. Output structure after cFm~ has applied 
136 SERGE BOISVERT- ANDI~ DUGAS- DENISE BIILANGER 
...................,.....................~, 
Ii 
J 
.~ : .... ~ ....... o~ • ~~ ........... ~ 
°~ 
: 
...... ~ • ~: ..... ~ 
: .~ ~ • ..°. .,~.0,~°..°.° 
mz 
°°~°°°,~°,°°,,°°,,,'°,,~,~,°°°.,,,°,°,,,°.~ 
Fig. lOa. Input structure 
O~d 
4N\] 
TT 
nqd 
HnN 
zoH 
HHd 
* dOC) 
0~:~0 ~IAV 
NO" 
_~I. 
'-)~_ N • b- .~- o:~ no" 
O~d 
JNI 
II 
N3J 
Flqd 
HnN 
IOH 
~d 
3~d 
~dO 
OBLING: A TESTER POR TRANSFORMATIONAL GRAMMARS 
 @ @ i@ Ii  @@I@ @@@ @Ii@ I@ i oII  iI @ iI i@I @Ii@   
kU 
II~leo~$e~Ioo$oi@$~ 
...... g ............. o,.~ 
...... ~g ..... ~ ............ R~ 
~d 
I 
M- ! ~ed 
.,,°...°.,.,,.°.,,,°~z 
o~ ...~..No 
.,°.,~.,....°°.,.°...°°.°.,,. 
..................................~> 
,°°°°°°°~°.°°°°°°°°°.°°,,°.°°°°°°°~z 
. "-~ "'' -° • • " • "'''' • "°" "" " "" " • ''~ 
.....,..,,°..,...........,°...,.-,, .... ..~ 
137 
~ ~z~o 
÷ 
m2~Nz 
m 
+ 
O~DO 
÷ 
m oz~w zww~ 
08d 
..4NI 
II 
F mqd 
083 
k(nN 
IOn 
k4~d 
38d 
8dO 
dO:) 
SAY 
30" 
NO" 
8N ° 
NH" 
4I- 
FIO" 
dN" 
08d 
3NI 
II 
H3../ 
f)ld 
083 
HNN 
ION 
HSd 
38,:t 
tldO 
dO3 
dAY 
:)0"4. 
NO°., 
NN" 
NH" 
AI" 
NO-~- 
dN" 
Fig. lob. Output structure after ~¢r~v has applied 
138 SERGE BOISVERT - ANDl~ DUGAS - DENISE B\]~LANGER 
:...................~ 
u_ 
°°,,*,°0,°,o$1,$1,,, 
....°........~z 
>. 
m 
~Z .°,-,,, 
: ~ 
"... • . . .............~, 
+ 
oxx~O 
D. 
Fig. 11a. Insertion of a node (before) 
OBLING" A TESTER FOR TRANSFORMATIONAL GRAMMARS 139 
. • • . . .. • • ,,.........~.,, 
,...... ,.....~.=. 
***eeeoeo$ooe~ 
o 
e~ 
x 
tn 
mo~ o~ 
~Z~WZ 
~S~W 
m 
÷¢ • 
Fig. 1lb. Insertion of a node (after) 
140 SERGE BOISVERT- ANDRI~ DUGAS- DENISE BELANGER 
8. CONCLUSIONS 
OBJ-mC is a system which has been implemented in low-level tOR- 
TeN IV for the CDC 6400. It occupies 55,000s 60-bit words of memory. 
It has about 7000 lines of comments and instructions. 

REFERENCES 

N. CHOMSKY, Aspects of the Theory of syntax, 
Cambridge (Mass.), 1965. 

A. Ducas, et al., Description syntaxique 
~l/mentaire du franfais inspir~ des th/ories 
transformationnelles, Montr6al, 1969. 

J. FIUEDM~, A Computer Model of Trans- 
formational Grammar, New York, 1971. 

D. LIEBERMAN, (ed), Specification and 
Utilization of a Transformational Gram- 
mar, Yorktown Heights (N.Y.), 1966. 

D. L. LotrD~, W. J. SCHO~N~, TOT: 
A Transformational Grammar Tester, 
in Proc. Spring Joint Computer Confer- 
ence, Part I, 1968, pp. 385-393. 

R. PETRICK, A Recognition Procedure for 
Transformational Grammars, Ph.-D. 
Dissertation, Cambridge (Mass.), 1965. 

J. R. Ross, A proposed rule of tree-pruning, 
NSF-17, Computation Laboratory, 
Harvard University, IV (1966), pp. 
1-18. 

A. M. 7.WICKY, J. FRIEDMAN, \]3. HALL, 
D. E. W.~a.g.F.R, The MrrRE Syntactic 
Analysis Procedure for Transformational 
Grammars, in Proc. Fall Joint Computer 
Conference, Vol. 27, Pt. 1, 1965, pp. 
317-326. 
