This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Tlle centra! r~ oC our recent r~arch has beeu the Lnve!tigatioQ oi hl;hiy ;Jar311ei nOQ·VOQ :"IeumanQ
m~bin. ueltitee~ures aaapt..ed ':0 the icinds or operacioQ.3 that appear celltr:1.i ':0 ehe oper3tlon of 1 ~road
dasa of 1;u~e-5Qje knowled~e-baacd sys~!. Our 1pproaci1 is ba.sefi OQ ~ uchitee:u:e :Shaw. l a791 :n~ ,uppcrt.3 tile !li~hly erllcien~ evaluauon oi ebe mo" "'difficuit" set :heo~tlc :1lld relational ~ieor~c opentors.
T!le :na.clline compr~ a :~_structured Primary P~OCe511nc 5uo-Y5t.m (P PS). '.vrueh ',n are implementln~
2. ,-\J1 analysia 01 tile time compiexicy of the t!:Yentw p&l'~el hardwv. a..ltorithlnl to be executed on the NON· YON m~hine in the course of Latse-sc.ue. m~I·b&M<i dac.a manipWation.
3. The :.mplemenr..a.tion of an oper:ltion:u lalowllHige-bued informatioQ recrieval "Y~ ~m. demon.uratinl tbe 'J.Se of NON-VON (emulated in $OftwV1!) in support or a. very bien lc:Tel deseriptiYe formalism bued on the languace KRL iBobrow &Ad Win0cn4. 19TT1· '
Portioll.l of ehe :-lONe YON enadune are QO_ in the earli., s~es of pbysical itnplemesl~tioQ a.a part 01
a cooperative effort :nY'olvinl eh. a.w Computer Science D~&l'tmeut " Columbia &Ad the Knowledge Bue
~f&nl4ement Syst.ms P~oject at Stanford. Details of the NON·YON hardware ~ p ..... nt.eC eLM_here [Shaw,
et at •• 19S1l. and will not be de3Cnbed. here, Th. central COClD oC the present paper t.s the stroleture and function
o{ the demoQ.3tr~ion sys~ar ... bieh we tlave implemenr.ed a.a a vehicle Cor illuau,'inl the IJ.SI of ~ON· YON
:.n J. ,imple, but chata.c~r~tic lalle-scale Al application. Tb..i.J SY3t4!m demon!~aws :he ~.D..r :n which
~ON· YON might be utiliJed in support of ~he highly efficient remeval of recortU Cram very I~ da~b:l.MS
in applicatiOn! whent ehe alteria for descriptioo-mat.ehing ~uire deductiYe inference over 1 domalll·spec~e
4cnowledge bu.", Our demollltn£ion syst4m. wttich 'n! i.mpiement.d :.n M.\CLISP on ~he DEC PDp·tO a'
~h. S~ord ArtiEew Ulteili,euee Laboratory, emulate the primitive operatiOn! oi tile :-lO;-(·';ON ma.cltine
:n ~ it. "iftl'I.
Our demoQ.l~uion syswm UMI a restricted fint-order precicaw cakuha as J. ~n of ":nt41nneciiat41
Corm". bridling the ~p betwe'eQ the sem&ntiC! of our KRL·lilce descrIption l:1llguace and cert:l.in operators
01 a. rel.a~OQaJ :1lrebra having particular importllllee in the computational ta..1c of logicaJ sa"Lsfac,ion. These
relational algebraic operators are eval~tad in parallel by ~he :'iON·YON hardwate. yiel<ilng a sill1jfica~H
mproYement over the best :nethods knowu ror perfor~in, equivalent operatioQ.S OQ a cOllve:ltional compu~
syswm. [n thia paper, we will tr3.Ce the operatioQ of our lcnowiedge-bued retrieval syHem Crom the levet oC
KRL-like descriptiOn!, through tha.t of the predicaw logic-bued in~rmed~te form. l.Ild down to ~he level o(
Lhe prlmitive relationa.! .1l~cbr.Uc operal.Ol'S, witich are e'f:1lua~ in panilcl on the ~ON-YON bardw&l'e. We
~n with a. discu.ion of a gener~ and i01port.aM clau of problem.s which may be though~ o( il& cOQeep,u~
llIa,c11izl, tub. o( which ~he knowledge-baaed information ~trienl J.ppiication :, a p<leul:lr in!taJlce.
2. The General Conceptual ~atehiJl, Problem
M~y intorma,ioQ procesainl ta.slu ~r{ormed by men :lJld cnadunes alike involve ~hc process ai ."naccbillg,
by which a corraJ)Ondence i" auigned between illembers of CWo set3 ot' entities. The c:iterla :01' cert~n sorta
oj :n~ches ue qui~ ,impie to descrIbe. Letters ue routInely rnlltched with :n:l.llboxl!S, for ~:lJtlple, :.:td
Con!l:resamen With coaa,jtuenf.l. ~c:.ordinl to ,tnightforww al!l:omhms bued on 3imp!e, 5in&ie ;Hopereies
oj the eDuti .. in question. By contr»,. ou.: demoll3tl':"ion system illay be tllou~ht o( II concer~ed with a
:nore interestilll cia. of ~ wltich milht be eermed coacepcuai ma~lung problems. This :nore dem~ding
sort of wit, which ~ Dooetllelea a common put oj our cOl%titive e:tperlence. invoives the a.uir-uneot o( a
genersl spirit ol much of the reeent worle on bowled~e-bued systeaa, we miiht aalc (or the ~ility to describe
these ma"hinc criteria. alonl with the domaio-sp«illc: entities and reiatiol1lhipa on which they ll'e baaed,
in a very ~t. illodular, euily undcrstandable lI\:lnner, cnapping ,Alient Cacti, rules and reiatioa.si1ipa on~
independently I!Xptesaable auertioaa wiUlin the prosr:unmill, system.
?reviou. work: in t.he Seld of altUicia! intelli~enu orren a rich set of aowledge :eprese!l~tioQ a.Ad
Olatcillnc eeehoiques wltich mi~1i be employed i.n the pursuit of thi.t general appro&CQ to the prob~cm of
conceptual Ola~hinl. The lciQcU ot applic:l.tiol1l ',lfith · .. hieh _ an illc:.t concerned, though. ale tllOM i.n
which the quantity o( daLa to ·"hicl1 conceptual ma~iling :.eciu1iqul!S illust be applied :nay be quite la.rte.
More speeIiic:wy, OW' doctoral r~e.h at.ta.cb ti1e problem o( :natching 1 given pawutl descrip'ion J.g:Wl!,
:!\e :ne!'OOers o( , .. jaL rnay be a very 1a.tTW _ of e.uldldac.e ~riee d~cr.ptiol1.'l according to :ne3.nin;-baaed
c.~c.erU. The potentia! sUI ot the collect.ion ot t.ulet deseriiHioaa impoees SpecIal :o!Ut~t3 on the sorts oi
conce~ma.l makhinc tAcluuquei thar. rnicht be succ!!SIluily applied in pr:u:tiu.
3. Knawl.d, .. B&Md Informacion Retrieval
The PUtlcuW in.s~ce o( the eooceptulU illa~hinl ~Ic that _ have chOM:n Cor our deOlon.Hla,ion sY'tem
;" borrowed (rom t.be general paradigm ot i4formaeioQ :eerievai, ~nd ~ it.HiI []lost euily l!Xem pliaed by
the documeM re"ievai (more accur:1r.ely, reference retrieval) ~ppll~tion. In ~ ordinary documcM retrieTal
system, a collcetion o( targe' documenc.t-iUl tbe boob in 3. computer science libr:1ry, ror ex;unple-i5 fine
illdexed by 3.UOCia~i.n, 3. wiee description with ~h document in the collection. The end '.lMr o( the
sy5tem. wllo we will ea.l1 the Jearcner, then prepues ~ p.".rn description wbich embodies some of tile
2
salien' ch&l:w:~ria'ia oj ~he sort.a of documeQt.S ill which he is ior.erested. The sy~tem '-hell compara :he
p.tWfU dacriptioa with ~he c~didll.t.e tallet descrtptiona in :he coilectioa. rcturllUlg ail r.argct.S th~t ~CQa'~h~
a.c~rdinc to eertoain presPftluc<i ctitcri~
r~ iI the o:aUA of these erl~ria thu distinguahes the ~hll.vior oj .1 icnowiedg~blUed illi'orl':'l.ltion retr1ev~
sysr.em. ~nd :.lld~. of a system for conceptual :n:I.l.ciililg in ~ener.U. lt1 such appiication". It :" aot poaaible ill
geneni to dccide · .. iler-het a mar.cl1 should succeed ill a stricroly meeh&n!c:al, "'$yot.ctic' maoner; Lo.uea.d. :he
acc:ep~bi1ity o{ a m~h m.lY depend on doma!n·,~ac: eZHities &Ad retatiolUhipa, &Ad 00 deductive illfereaces
over these entities &Ad n!~tioJl.lhiPi. IJ1 tile CaM ot the compu~ selence Ubrvy, for aampie. :he sy1tem
:ni&h' be requir~ to "know about" such entities aa compu~, ~(Ontillzu. programmet3. ~d ltorage deVICes.
CertaUl eilara.cwitcic aHributa o( these entiti .. (the nOI'1(9 medium attribut.e. · .. hOM 'I"I.lues dilf'cr (or
diH~n' ltind.l 01 J~,....e devices, ror exampie) aticht We be included in this domaiJl·5pec~c lc:nawledge.
Amonl the cy-pica! lcin.u o( relAt.ioaahipa tllat. mipt. be embo<iied in the lalow/edre bue o( such a syswm ia
the ta.ct til» a t&pe drive ia a particular kind ot ,corace den'ic. ""hOM ,,'-Craft medium ia ~waYl magnetic e.apr,
oae simple deductive inIerenee involving tllis relatiooahip might es~bu..h the (act tllat a patwrt1 descriptioQ in
which the 5ubje1:t oC a documeJlt i.s described a.t illyolvine a. stool',,' device with mq,Detic t4pe .u it.S :nedium
"ROuld be '.Li.aOad by a ta.rpt description in wtUch a. e.ape drive appeared in the correspoading j)Oaition..
L" III aow brielly ~e the rn~ner in which such a. cowledge-bued. inJ"ormatioQ n!r.rieva1 ",tcm
:night be uaed in ;lr.ctice. In coat,na. 'llritll &A ordinary in.torm~ioQ r"rieva.i syswm, tbree diatinct dMNS ot
'J.Hrs would be inv~yed iQ the op.n.tion or a knowledge-bued n!ttieval sy1~. IJ1 addition to tile searchers
&Ad indexers. a tltird clau ot UHrs havillg aperti.le in the subje1:t &leU of the documellt.l to be illdexed
would be n:quired :.0 Cormulua alId encode the 50rta of dOma44·5peci1ic Itnowledce described .lOove (or use l.ll
illduing iIJld rer.rienl. Members o( tilia third daaI o( UMrS. which h.aa ao &AalOCUe wjtllill tlle eOQtG't o( the
coaventioo:ll inIortn.lt.ion recrieTal sy5t«m. might be ealled Imow/ed~ engilleet3. Our primary eoocern in :hia
;lapet. Ilow..,er, ...,U be wit.h t.he proceea or retriev&1 by ~ching end-lUetS, under the aasumpcioa that the
Icnowledge bue bu pnmou.c, bee!! eoQ.ltlUC~ and ~ docurnent.S in the eoileetion indextKi.
W1We SpK. do. IlOC permit a detailed d..i.scu3lioa ot :he wC1llc:nesaes o( exiltiog i-nformatioQ retrIeval
!y!~lD!. ~d ot ehe manner ill which our Icnowlecige-bued retrieval system addreue.s ~hese llmitatiolU, it i.s
'North mentioQinC tha& our approadl would oiIer the gruwsc adnll~ in :Ile :aM .,.,ttere hlghly sp~e
:.a~ W'8 to be ~nQ rrom amonl a l.ule clau of "conceptu:lily !1eterogeneous" doeument.1. PhrueG
dilTerenUy, kllowledge-baaed remen! methoca should prove moet critical in the eon~:n oi t.aau in · .. ducll ~he
sem&.Qc.ic criteria (or sati.ai:w:tioa o( a uaet's requCl' are meaningful (or only a comparatively sm2Jl sublet o(
ehe t.&rpC =Uectiol1. A ver"f ambitious e:umple o( such a taak mic1n be the seleetion o( a spedai.i2ed journAl
a.r~iele .hOM ~lt"f'&Ace ati&h' only be apparent :0. saT, a gnduate student worlWlc Ul tile field who had read
:Ile pap.!', rrom :unoal tile set of all documenr.a in a. luge uQivet3i~ eQUeetioa.
4.. A Synem fop ZUlowled, ... Bued Retrieval
lt1 order to demo!Utr~~ the wa.y in which a NON· YO N· like m:lChiae might be used in ~ ac~u~ AI ~pplicatioQ,
3
we n:l.ve implementcfi a ,impie knowiedge-bued information retrieval 'ystem havin; ~lle b:l.Sic "ructu~
outlli1ed &bon. In tne inc.erest or J.ppli~bility ~ problem! other tbu our sample documeQt ~ctrie~
applic.atioQ. Qow .... er. the sy3c.em we have Un piemented is in fa.ct ~mew hat :nore ~ener~j iLl one r~~eoet
than sugges~ by the J.bove <fucu.saioo. Specifically, the role;, deiiAln; ~he ;emantlC3 oi matc~iQg wIthin
~l1e document description lanl'l~e !l;lve aot been embedded inextri~bly within ~he eoae of ~he remeni
sys&em. !lue have ilUtea4 been explicitly iormulated aa u independclH. sc~ataole set of axiom! expresaed in
~estric:ed dnt--order predic:l.c.e wculus. Specmc:l.tioQ oC the match semantiC3 in tne torm of a sepal1,c.e Mt
of dedantive1y specified rules We contribute! t.o the dexibility oC our demolUCtacion system. ;Jl th~, tt\.
mateiling morns could be eaaily modi.£ied :.0 reflect changes in the descnption lancuqe or in ;he rules for
descriptioQ :naceitin; without ~ec~lLlg the behavior oC the syswm aa a wilole tllrougb mociiac:ac[otU at the
code ir.ae!!. More a.ecurac.e!y, tllen. the lcnowledge-bue<i retrieva! system wltich we aave impiemenced m~y
be thought oC Ja mWnI reference t.o three conceptually dilcinct "diLUbues": a tatllt coilection, a dom~.
sp«ille lcnowledce bue, and a lDol,cil 'pecmca,joa delinin' ~he matchiag Hm~tiC3 oC the ~O'oIIJled~bued
description iaAl'lace.
. .u will be seen shortly, the duible approach co the the specillcatioQ or mate.h sern&D.tiC3 til a' 'Me !uTe
ou~li.aed. ~'her with the capacity (or the ,~ oC domain-specific lenowledge in enlua,inl the succ .. ol
potentiai matches. supports a. very powerful:u1d llilhly genera.iMt oC capabilities aot ~vailable in a cOaTeJ\cioa.a.l
iJ:Irol'Tll~ion retrieval system. It is 00' clilB.cult t.o con.Jtruet a scenario in which thia sort. or pceralUed
lcnowledge-b~ ~etrieY&1 syswm might offer a number oC important pnctical a.dnac.,ges by compar~n wita
a coaventioQa.! :nIormlltion retriev&l system. Unfortunawly, ~here is a. (ul1damen~ res~t. in wll.ic~ our
preseady opentioQal demolUuation system, wh.ich runa on conyeMiooa.! computet budware, 'Rould 00' be
pt'&ttiea1 Cor IJ.M in u a.etual application involving a lMte W'get eoUectioa.
S~ificaily, ~he dernolUcrMioll system relies very heavily on ~he executioQ oi several oper:l.tiolU wll.icll.
Oll a. von :-ieuman.l1 alacwe, are quite aperuive 'Nhen the openod'S compr~ a. large amount of dat&. A.s
:t ~:1PPen.s, it ~ pr~i.sely in the caM oC a. '/ery large ~rget eoUection that our knowled~ba.sed approacil. :s oC tne greatest potentiai utility. rt tltia approach is ~ be rep.rded aa a candidate (or pt'&ttiea.l appii~tioQ,
co!Uide~tion mUll' thus be pven t.o any ~ternatives :.0 ~he '~on :-.re:.unall.ll :::aciliae uehi~tute ~hil.' :nll¢'
!u~port the more efficient axecu,ion oi these operation.s.
On the NON-VON madtine. ~hc mOlt expelUive 10_level operatioQs invoive<! in our ~pro&.l:h :.0 lenowledge
buee ~trirrai-in puticulat. the 1Il0ll~ compur..;,ionally expeIWve primitive ope!'3~rs of a. reiolt.iollOli aJgeot~
lIl~y be eora.lu~ in a highly efficient maruler. Baaed on ~ tlienrchy oC lnc.eiligect s~rac. dn-Ices. tltia u
chitectun iJ:I (act permit.a a.n O(log~) improYemen' (with very ravonole eOIUUJlt r<J.e~l'3) in time complexity
over ~he evaluatiOQ methods used for tllese opcra~t! on a conventional computer syst.cm. ;yithou~ the UM
oi ~cdundant storace. a.nd ~ing cutl'eMiy ~Y'llilablc J.lld po&entially ~ompetitive teehnoioc-. Altl10ugh it wu
oot our on!;in:1.l ~oal in pursuing thi3 research, tbese results have recently ~n ~ attt12.Ct attention within
'-he dat.abue m~agemcnt eommULll~y by virtue of the important role piaye<! by ~hcse'difR.:ult" rcl:l.tiona!
a.lgcbraic primitives within database man~ement sysc.ems ba.sed on the relational model of data ;Codd. lIJ70!.
4
Because oi thia coonee~ion 'Nlth Ute conceros oi re~tioQ:ll dOl.~bll.3e systems, ~gether 'Nlth ~he doae relation·
Ficure S.l SYQ~ or ~h. Kllowl~!e-a~ Description L.Yl!\alc
~imes.
Ul the COW"M of ex:~lIlIning a number or actual documeat.s chosen from :he ::om:ll:l of computer ,clence, we
were &Die t.o id.IHiCy 5ever~ ltinch of deductive Ulieren~ m~hani"ms ~hat :!ligh~ weU prove !.l.!Ciui i.n ~ woricing
knowledge-bued retrte~ ,ystem. III our :lGtuOlI demonS'ration sy!~m, however, ,01y 1 .liagie, ~e!atlve!y
simple torm 01' i.nference--oaM1l all an~edell'-coa.sequenc (or ,imply AC) ;Jair_~ chosen for ilurpoees
of demO!l.!l&ra'lng our 3.ppro&ch ~ meaning-bued mOl.tchillg. Each ao~cedeu&-eo~~ucIH l'Uie c.'cpres.M:S ~
~eiMio!l.!lilip ~fiW~n :wo descriiHiona-thc .uI~cedell' ~d che eOll3equen~which :nay be \nou~, of either
i.n :.eMn.1 or impiiea'loo or sp~ialllluioQ. Under the fint i.Atet1lre~tion. the i:l.ct ,ha' a pven .~a.1- WQrld"
elltity mOlY be appropria~i,. descnbed by the 3.nteee12ent description i" t.a.lten to loficaily imply ehat :he entity
i.n question may aJ.so be described by tile coaaequellt. From the (fotmally equivalent) ~~ttla&ive viewpoint,
:he antecedent is coo.sidered to be a jpeeiai ca.M or the coa.sequent.
Out system placa 110 restrietiollS 011 the (orm at ~h. an~ent and consequent descriptio!l.!l. !n ?ar~ic'.1lat,
it i.s ~ibl. to iormulata AC pain w!lieh e%l)rtsa jimpie genenJiucioll relatiooahipa (tile ra.e: thlU 01 Tape
drive i.s a ~p~i&l iWld of Starace deviee, (or example), and eabot'1.ted gene.raliu'ion! (e.g., :ha, a Tape drive
~ a SCQr~e device "'hoa.e aledium i.s alagIletic ~~), aIOQI with a Ilumber ot alote getle~ ~el;ltiooallipa. [~
should be !lo~d that che ~e1a'iol13h.ip !Xl)reued tn AC pain ia CrlllUicive. .~ it hap~, the ~ran.sitiYity ot implicat.ioll ~ one oC the eharac~ri.stic:.1 ",!lieh impoee certain ~p«w requirementa 011 ~he ~a4Ching procedures.
In 5eetioQ 7, 'Ne will lee how tb..ia SO~ of requirement i" aceom~t.ed by the LoSEC a!gotithm.
1. Locie. R.la,iolu a.nd R.tl'ieY&i
.~ noted earlier, ?reciica~ logic :llld the relatioQ~ a!gebra COIether provide a. ~ritica1 link benreen our
Suppose we wishe<l t.o produce a lis~ pairing each airline with each part which could be found in the
inventory or tha~ a.irline, independent or the iden~ity or the model (or model:s) of airplane which accounted (or ~
the presence or that put within the invent.ory or thaL airline. In relational terms. we should like ~he r~ult
or our query to be a new binary relation having two attributes--one ranging over the !ame primItive domain
M ~he CUSTOMER attribute of the. CUSTOMER.- -PRODUCT. relation, and one over that of the PART
attribute or the .PRODUCT--PART. relation-each of whose ~uples satisfies the relationship in question.
Such a query might be expressed in the following way uaing the Language or lirst.-order logic:
(z, z): 3y.
(.CUSTOMER--PRODUCT. (%, ~) "
.PRODUCT--PART. (y, z))
where the result variaoLe3 are specified in a pa.renthesiled lis~ which is pretix~ to the well-formed formula
and followed by a. colon. Here, we are a.saigning a correspondence between the predicate • CUSTOMER-
PRODUCT. and the relation having CUSTOMER and PRODUCT aa its attributes, a.nd similarly, between
the • PRODUCT --PART. predicate and the other relation. The re3ult or thia query is defined to be a new
relation, having two attributes (corr~ponding to the two rree variabLes % a.nd z specified in the result variable
list), whose tupl~ enumerate ail of the combinations of one instantiation ot % and one instantiation of z for
which the well-formed formula is true for -'Ome instan~iation oC the ~ten~iaily quantified variable V.
Let us now consider how the r~ult ot such a query might be computed. All possible combin:l.~ioos or ~uples. one of which is choeen from the .CUSrOMER--PRODUCT. relation, the other from ·PRODUCT
-PART '.' whose product a~tribut.ell share a common v:uue are identified. as illustra~d below by the lines
conneeting tuples of the two argument relationa:
CUSTOMER I PIWVUCT PRODUCT I P/\RT
American I DC-J DC-IO wheel
We;, tern I DC-IO DC-LO I engIne-mount
A.merican I DC-lO I
DC-3 oxygtm-ma..sk
DC-LO I oxygen-mask
DC-/O radio
For each such ma~chillg pair or tupl~, a new Luple i.:s created by concatenating the two and elimin3ting
one copy of the common PRODUCT :lttrib\l~, thus yielding the following ternary relation:
13
CUSTOMEH I ['[WDVCT }JI\i{T
A.mertcaa I DC-,J oxygen-masK
Wesc.rn DC-LO ''''nef!i
WesC4!Ml I DC· 10 eO(Inc-tnOWH
Wesc.rn I DC-LO oxygen-1ll6lx
WesC4!rn I DC-IO (:laio
Am en can I DC-IO I ''''beel
Am en CAn I DC-IO I eCgl.o.,..lllOU1H
,\mencal! I DC-IO oxygen-l1luJc
American , DC-LO I radio
The operuioll :hu 'Ne oave ju,n described proyides our firs, e:u.mple ot ~ relntional alliebraic opentioa.
~hich iJ called ~he join (more precisely. ~he a.:Hural join) ot ehe cwo artUmelH relatioll.S. The PRODUCT
Ol,'rioufAS of !3CQ of ~he ~ :ll'l'lme.lH relatioll.S ue :.o~ether referred eo u the join ~tuibut&l.
~. !lOWe"fef. :hat. our formulatioa at the query made ClO reference too the ptoeiuct by ·..,hlch the
C'.a~mer :uld .,ut ue rela~. To produce the desired result re~tioa. 'Ne lIlUon therefore ~emove the
PRODUCT OlU,llbuC4! irom our int.ermedlate result. ~oti~, howne!'. tha; the !int ~d eighth ;uples in the
int.ermediate reult are diatincw.hed only by the value ot their respectiTe produce attributa. Upon reraOT'a1 01
thia a.Ullbut.e. :hese two tuples would QO longer differ. introducing a. redWlda.llCT in the result rela~oa wtuch
:. proltibited by the fa.c:t that relationa ue 5et3. (Aa ..". ,hall see in the roUe,,"ng suOeeetion. our injU4ctioa
~aina' relatiolU with redWldant tuples does !lot reBeet a ,upentitiolU ~erel1ce too our formal deiinition ot
relations, but is in rut motiva~ '01 important practiea.l cOlUiderationa.)
The !ina! sc.ep ot our example thus inTolves Qot only rem0n4 o( the PRODUCT ~tnbutc. but a.Lto
e~tion oC tbe redunda.zH ~uples tila.' would otileMJiM resu1~ (rom the temOVlU of formerly dtscingui.silinr
Olt~lbuta V"&iues:
CUSTOMER I PART Amertca.o I oxyge.o-m6lic
Westero I waeeJ
Westenl ellf'.ne-lDouza
West.ern oryge!l-llla.tK
Western .~io
Am erlca.o I 'Nnef!i
Amerlc~ I e.o~e-tnOUl1'
.-\ll2erlca.o I radio
Thja combined opet'ation ~ an example of Olllother re~tioll&l .1lgl!br&1c operatioa, e.a.iled projcctioa. We
:et"er eo the CUSTOMER and PA.RT attributes, whicil a.re earried through too the result rciatloQ in our e:umple,
13 projected ~Ltributes. while ~he PRODUC'7' attllbut.e ~ described 13 .oro}e<:ced out 0.- :he .llJ1lment relation.
The very Sililpi. example that we b~ve j~t cOlUidered O:l.'S r~uireci only the illform.1l in~rodue:ion oi
the join .lad ?roJ~t o~a.to,.,. U1 the (ollo~ing subaectioa. WI! ... ill deiine a larger 5et o( relational algebraic
14
primi'ivcs, providing a more rigOrolU deHnltion (or e~h one. The importance oi ~he relatIon&'! ~~r3 t.o our
~ (:u1Q iJldeeii, toO 3 !;reat many knowlec~e-bued ~4lIiu) derives (:om the (act :hOl~ chll more :omplete se,
ot rei&tional alceb~c primitiTes bu ail ~he ·'descrl~"ive power" oi tho! logic,oMeQ query 100ilguage :ntroduced
aboor..
Perila.pe the best icnowu ana101Ue oi thi3 oblerra~ion l."l the rciation:1i da.c.abue litera~urc ~ ~he '~ed
:ompiete!lesJ resuit due t.o Codd ) Q721. !n essence, Codd pTe a COQJHuctive prooi tllOlt ~ny query formu
'.a.t.ed WI in " the calcwU3 ot' a-aprcssioa.t (oMn called the reJa,ionaJ C~CUiU3)-& descriptive languacc 'lUIe.
similar to Out own an~order .,Mtdicac. ~culu.l-b~ query ~ncuace. but where. amonl o,her datUlctiotU.
quanti/ica.Lion is oyer tuples ~d no' elcmc:nr.s of tile prunitive dom~ou1d 0. computed by ~plic:atlon 01
a 5ui:.abie ~enet of relatIonal aigebra.ic open'ioaa. [porine (or the moment the diB'erences o.tw~n "nct
5.rswrder locie: and relational calculus, C04d's result thua pro-rldes a sy1tematic (thoup ,enera1ly :.nefficient)
.... y ot compu~c the resul~ ol ~ arbit.rUT Iin~rder quary, aa de~ed above, WlillC only !.he relAtional
&.!pbr&ic opentioQ.l that will be dwed lJ1 tbe :lEn rubee1:tioQ.
One way of viewinc tbe roles of logic ~d relational &.!gebr1o in tltis ~rt o( reerieval eult thu 'q UTI! found
particulArly useful in our worit ~ bued on ~be :lo~ion of a (ormaJ tbeory. Within this theoretical r:~eworlc.
we 'riew the query aa plU'~ of 3 fine-order tbeory, and till retatioaa in the (e:rtellSional) dat.&bue a.a a. pa.tticWu
we. inCerprec.a,ioll o( that ~Ileory, !Jl particuw, uch primitive prtdi~e. in the query is ~iat.ed ...-ith one
~tioa lJ1 the ert.ellSional dat.abue, whicb is trea~ 1I ita i.ac.rpre~'ioa. Within thia (rameworlc, .... caD
-new the problem oi fincfulC !.he ~esult o( ttle query as that o( 5..o.din, all ~ible nlues o( ~lle (fre.) rewlc
.....nables such thu the query well·{orme1i formuta is logically ,aei.siied under th", lJ1c.rpretouion. For thia
reUOQ, we :IOmetUnes call refer t.o the taU ol computinl the result o( & lopeal querr a.a one oi u.loi!la.c:ion
oyer a. attic. (albeit generally lUle) domain.
7,4 The reacionaJ algebraic primitires
The re!a.tional al«ebr1o we haTe UMd in Out ~eh ~ baaed on a. ,mall set of &.!gebr-aic opera'O~ enumet:lt.ed
by Codd (19721 ·..,bich t.a.b 011. or more rela.tiona (alon, with eer~ "control" ~(ormation) M a.rgumenr.s.
!"etu.ruing a. 'incle new rel~ioll a.a tbm nlue. Tllia set oi primitiYes includes the orcfulary set opentioca
which, ·..,itb one rsU'icLioQ, are deaned (or relations in :nucll ~he u.me way aa tor o~her seta-a.long with 5otTen!
ewo moat import.\At ~'ructured operll'Ol'S, project and join, have 3.lre3dy beea iniorma.!ly dl!'5Cnbed In the
llnrYlOUI subMe~. Sovera1 otber ,tl"',lctured opentioQJ will ll.:IO be :.ncro<iuce1i in ;his 5ubMction which lIlay
in (au be denTed Crem project, join and "he uQStructure1i set opentioQJ, but · .... ilich serve cer~ .,&rticula.tly
imPOI'\a.nt (unctions lJ1 many prutical ~pl.i~tiollS of retational ~gebra.ic system.s.
Specifically, '..,. will be concerned in thi3 paper ...-ith ehc rollowi.Jl~ ~ela,ioaa.l aigebr"&ic ilrimitives:
1. Union
2. [nt.enee~ioQ
3. Set diB'erenca
15
,t Projection
5. Join
• Selection . , S. RC5triction
The tllr~ !linl1l)' set openl.<Jr5 unjon. Ul~rs~tjon lad ,ec dil1et'f!nce ll'e delin~ i.n ~ ~ei:.tioQ&.' llieor:1ie
system i.n tOe same way u tor seta :n ienc:ni .... Itll one exception: the r1!!atioaa! version ot" nch -' dec.a~
only '*hen ~he two relAtioM :hu serTe u it.! operandi ll'e 'JDjon-comp:uibJe. Two rel~tio!U ue said :.0 ~
'JIlioQ-eomp .. tible if lad oniy if \hey ll'e oi the same dqr~ 1\ ~d the '.ulderiyi!1g doma.uu oi the I.th ,impie
3.ttribut.ell oi the two relation. are the same for ail i, (1 SiS 1\).
We thua delio_ the union oC two union-compatible relation. RI a.nd R1 , denoted (Rl '-' R1 ), a.s 01. relation
con.ilting oC cx~tly thOM tuples that ate iUl element oC R l , oC R,. or bocb. The intersection (Rl Ii R, ) i"
denned aI that :-elation coaw.ning all tuples found in bot.h Rl and Rt. FinaJ.ly, the sec diiTerence (Ill - R, )
~ de4n~ :.0 COQJilc oC aa.c:tly chON tuples oC III that ue noC present in R2.
[n prep&lacion ror our forma! dec.aition of the projection opcr:l~r, ....... ill :lee<1 :.0 introduce some
3.ddhiow :lo~tion. ~inc. we J40pt the eonventrOQ that a lat or primitive domaUl ercmelt.! endoaed by :l.ngi_
bn.c:uta (~(" lad ")'" will desicnate a aew tnple contWil1C tile specUie<t ciemellta aI the T'&!uC3 oC ita simple
attribut.ell, in the order litted. Futhermore. it ,. iI a tupl_ oC some n-~ relation R. WI will define ,.(il to be the
value oi the j-th utribute of,., (1 SiS 1\). rt will be c.onvenient to exund thia Qo~tion :.0 4ilow erpreuiona
,ueh aI "(Al, where A iI a cOlTlpou.ad a,ttributa of R COMiot'LnC or the In (no, a~esu.tily cliscinct) ,impl.
3.ctnbut.ell oumbered il,;","', i ... , defined 3uch that (r(AI) represeuta the Qew tuple (,.(ilL ,.[j2i"", r[j ... ;),
We ~ay :lOW deline ~ile pro)ectioQ or a relation Rove!' the compound attribute A. Ja the seC
((,.(A!) : ,.e.R}
:'iota that 'n ~ave dec.ae<t the projection opera.c.or in such ~ way eha' ,imple ~,uibut.es 'oY1thin :ile compound
a"ributa .4 :nay be replicaud in the c.oune o{ projcction, Depending on cert:W1 detaib in the dennition oi the
join operation, elliot c.onvenr.ioa may have important theoretIC&! consequenCe5 a.i'ecting :he expressive power o{
the raultiz1c algebra.
The projection ~r may be thougilt of aa a sort oi "'vertieal subsetting" operation, ~ willCD
1. the ~oa-projecl.ed" ~'tribut.es of ea.ch tuple ~ the argumcQt rela.tion ;ore eli!DiQ~ted,
Z. the rem.&ininC attributes may be permu~ lad/or replic.::lted. ~d
3. any dupUc:.ar..t tupl. ehat result {rom the eiinunar.ion of V'&lues ehat rormerly dlati.aSUished diiJ'erent tuples ate tilen removed.
tn :no" implemen~tion' on 3. von :'ieu:nllJUl m~hin_thaL i.5, :l ·convention:!l" computer system baving
:l 'ingle cenH:ll processing unit ~tini on 3. 'ingic bank or r:lndolTl access memory-~ile ltLnbuc.c elimination
and permutoltioni replic:a.tioQ {unctions can both be implemented tUUlg a 5impHt lad computa.~ionally inc
penai.,e proee<iure whose com plexity i" llnev in the cardin:llity of the argument re~tion, The elimination or
15
redund~, tuples. on the other hand. ::nay be ,urpmlngly ~ime-eo!auming, particululy '.¥t\en ~he J.rg'JrIlent
re1a~oQ :. lafle. rn r~t, one commOQ convention L.o. 30me "Oll :-leumann lmpiement,Hlon3 i" toO ~ei:lx che re
quiremen, tbu rejation.s oe true ser.s, &iloWU1g the illtro<iuwon of dupllc:~tion duriQ~ 30me or all ;lroJec~ioQ.t.
TlW approach L.o.t.lo<iuces the following problem3, however:
1. ~he ::n&Ulr.en:ulCe oi duplicQr.e tuples may !elld t.o combinac.ori:illy !Xploaive growth L.o. the ~dinwty of tne i.Ilr.ermeciiat. resulr.s of a complex query, 3Jld
2. runctiotU sensitin t.o the repetition of identi~l tuplet-the e=ucul:1tiou of numenw COUOI:ol :uld ,~'i."leal :ne&3ures. (or exam ple--will ao, yield a.ecu~r.e result" J redWldlUl' tuples &re ao' in, climulac.ed.
One oC tbe capabilities oC ehe NON·VON :na.c:l:Wle i.s :he performaoce oC true ?rojeetioQ '..,ithout the t:u~
teet. oC redunwt tuple el.itlW1.a;ioQ.
Delil1itioll oC the join o!)4f&tion requires the delinitioQ ot olle a.ciciitional coQ.ttruct: the ct)oeawnacioll ot
!;WO ,upl .. It "I ia a tuple oc a. M!l.atioll R I , laving dep'ft "1, and "1 :. a tupl. ot relation R" llaYin~ d~
"'1, the eOD~c.eQacjOD (,.d",) of "1 and "1 i" delil1ed t.o be the new ("I ... "'1)-tuple
Several nriation.s oC the join opera40r are commonly discu.ued in the ll~&ture; we will ~ oy deiinin,
:l particularly lmportOUlt variant li:nowll aI the ~-joi.ll. The equi·join oC two M!l.ation.s Rl ~d R, over :he
compoWld a4t.ribur.es Al and .4" respectively (each J.SSumecl ~ be compoeeci ot ~he same aumber of 3imple
aHnour.es, wit.h corresponding simple aHl'ibur.es llaving Ullderlying dom&iJu th~ are comp&raoie under !.he
equality p~icar.e) i.s delined a.a
.41 <lnd A, ~e referred eo aa the (compound) joill <lUrloaces. which will have !pe(:ial 'l~ilicance in ~he
~gonthlJU introduced iD this paper. !Jl t.he ea.se where ...1,1 llld At are ~he degeller3~ compoulld J.ttribur.es
eont.ailling 00 simple a.ttributeS, equi·join rei1uces eo the ut4!nded Calceslan produc' o( the :upies oi III :lOci
R2-~ha, ;., t.o t.he _ of all po.ible coocat.ena,ion.s of oae tuple from Rl with olle (tom Il" 7he :nore gentnl
join oper~iOG may be intuitively thou;ht of .lI J. proccsa oi [iI~rinl; ~hc extended e:utC:Sl:1ll product oj Rl J.Llci
R, by M!movinc (rom the result :ill conjoined ~upies whose r1:!Ipec:tivc jOL.o. attribur.es ~ve dilferen, values.
(The ct)mpu~ioQal method 5Ugested by thia i.Ilr.el'1'M!tatioo, of eoun.e. would ill general ':)e lmpractically
ineffi cient. )
The join o~ion is in general quit.e e:cpen.sive on il conventional von ~eUmaJlll :n~hine. ,ince the :up!es
of R 1 and R, mu.s' be paired for equality with respect eo the join utributes beiore the exr.eoded ~rtesWl
prociuet oc each group of "m:ltchinc" tuples C&Il be computed. In ~he <lb~IlCe o( phYSlC:l! clu.stetiog 'Mitll
respe<t eo the joia &'tributes (WhOM identity may vary in dilI'eM!ot join.s aver the same pair oi relationl), or
the use or 'lUi 0 u.s C4cl1niques requiring :l large &mount of redund:lot s~r34e, joinin~ is .ypieaily ~complished
17
!DOl' emcienl.ly OQ a voa ~euml1nn .::~ltine by pre-sortin~ ~he two atTJ!Dent :clatioru with :espeet :<I the join
utllbu~ The order or the tupies [oilowing the sort;" 3A:tually r.atuitous iniormation from ~he VteWpoUlt o(
the join operMion. From a s,rictly formal perspective. the requirc!Dent.3 of .1 join-~hat the tupi~ ~e ~:1ired
in such a way tb~ the ~ues of tbe join attrlbute matcil-are significantly '~er than :lloee of a rore, "lfluch
require that tbe ~uiting set be Hquenced according ~o ~hOM vall.1es. The :i~tinction :., ::loot in :he C~
o( a von :'fewn~ aachine, where 110 aaymptotically superior ,ener~ soll.1tton t.o ttu3 ~&irtn" problem than
sorting :., preH1nly iu\owu. 0 ne at the design go&!. or the ~ 0 N-YO N :nachine. ~owever, -' t.o !Due .lH
of the -u:er coastramta Urroived in the dednition of this kiad of operation :.0 obyiate the Ilee<i (or either
pre-sorting or the e:xt:a~ant use oi redundant storace.
One common ~t of the equi-join operator :. ~he I2&CUra.i jom. introduced in tile example ot the
;mmoua section, in wltic:h one at the two join a.uribl.1tes. which are ~undantly representad Jl the resu1~
~lation ill the C3Ie or equi-join. :. elimiaate<i (aa it oy projection). Our uehi~ture supporo:.a both the aatur~
and equi-join ill a. tuchlY efficient :nanner. A alore pnetal form ot join o~n clixuse<l in the li~lUW'e :.,
the 9- join. whoee definition :. simil., to that or the equi- join, Ol.1t with the equality p~car.e replaced by a
:nore gener3i billary ~redica~ 9. (lA Codd's definitiOll, 9 :s defined eo be one or Ule uithmetic operuion.s
-, ,.. <, ~, > or ~.) Coa.id~ioa" (or the efficient enhation of the i!ne~ a. join open,<)t di6er in
~veral respect.3 from. ~hOM illvolnd ill evaJua.ting the equi-join. We will Qot dacus thia alore pnetal eaM in
:he presc~ paper.
Each of the ocher relatiollAl algebraic opentoMi t.o be desc:ri~ ill ttu3 subeeetioll all ill (act be derived
(roal ~h. s'ructl.1~ operUOMI projeet and join and the three unJ~ructured ~t operuors. and ;ve deB.ned here
rOt Olle :It ~ch of ~he roUowing reaaoa.:
1. The ope1'UOr embodies " special c.aae or one or more at" the previowy delilled primitives wiUeh :nigia admit the pouibility of either a iesa complex. or a. more efficient, hard ware impiemenr.atjoa
Z. The oper~r represent.'l ;ul important ~d fr~uentty encoWltered "J.5e of some eompa.ltlon oi the pl'imitiY. delined earlier
One derived O~icll that occurs freql.1ently ~ ":xlth pra.c:ica4 and ~heoretic.aj discU3Slons. and 'Milich
p~ys a. particul&:ly importaA5 role in oW' approach. i.s cailed s.leetioD. Most algomllms and arcilit.eetuzes
:or '~ive ~tlien1. implemlllt what is esaentiaily a. procesa of re!.atiolla.i ~leetioll, In :he :'fON- VON
mKhine. !eiecUoll requires only a small, rlXed 3..al0I.111t of time. :ndepelldel2t oi the me of :tle d:1r.ab,,": untilee
mOl' ~'i,.. pnxeuor designs, however. out uchitectuze explicitly a.ddres.5eS the problems o( eilicientiy
impicmentinc ocher ~latiDnaJ opetlUOn aa "nil. The seleet operuor retur.u a. subset 0" It.3 single argument
relation cOlllis,ing ot a.il tl.1ples that satiaiy a Ii.n of at,riol.1c.e/v3!l.1e pa.in. The seiect operator ala.y thua ~
~ep.rded aa a natural join of the ;vgumlnt re!.atioQ with a singietoc re!.ation (a. relation :ons~tin, at exactly
one expiic:itiy specined tl.1ple) over all aLttibutes or the singletoD. Mote preciseiy. ~he resuit oi ~ scleetjoQ (rorn
re~tiOQ R witlr compol.1ncl J.ttribute A a..ad vulue ~uple V i.s
{- : 1'!R 1\ 1'~AI ,.. V}
18
",he~ ~he correspoadinc A 6.Qd V dom~n.s are ~~n laSumed ~ be compatible with respect ~ equliiity.
Another import.llH denTed oper~Lioo loS known Oil resUicCloa. While :estr\(:~ion. lilte cbe ,010 o{)er~tQr. :.s
socneucnes d.fined in ter~ oj a. geoe~l 0, we willl(:l!o be coocerned only ·.vltb ~be ca.se woere a :.s ,he binary
equalicy predieat.4l. The ~tnctioa of a relntioo R over the cor .. pound :l,:ributes AI :lad A1 (both c.ompoeed
oj sicnple a.ttributes oi R) :.s defined aa
[Q. it.l :nc»t common lorm. ·..,oere che compoWld a.ttrlbutes AI :lod A.! ~ each comPOeed oj ~tr, ooe
slmpie :l,uibu~. the restriction operator :etuz11.t ~ tuples oj it.l UJ'.lrnent relat.:oo in wbich the values of
,ile t'We specmed 1Hl'lbutes U'e equal. A.lthouch restrictioo can be delined. solely in ~ertIl.1 of the join Yld.
project opetatQrs. an implement.atioo baaed in a. sttaightfotwa.rd ."...., 00 tltis derintioo .... ould be Cl:)ruid.en.bly
important eoouch oper:u.ion in practice tba; we nave tres~ the capacicy ror d.i.re1:t (and efficieat) e't"alu.atioa
of restrictive e:r;lresaioQ.S a.a a signwcata desiCU objecti ... e.
Finally, we rnU3t a.cicnowled,e a. derived operatioo that h .. coruiderable theoreticai ~d prac:tiu! impol"
~ce in many applie:ltiolU. ~ut to ·.willcn ·.we !lave devoW<i little specw at.t.ntioo in our eniuatioo of ~t.u.
na,in areiliteetures.. This opentioo, ealled divwoa. is used to a.ch.ieTe ehe e~eet.l oC UlUverW quantine.aUoIl
'Klthill Ule queries of a WlCUace bued 00 eh. relatiooal calculus (Codd [19121) and alay '~etl be worthy o{
'pecial uwntion in coune oi designiag a gelle~ly.&pplicabl. relational dacabue cnac:iline. Since it wu 00'
Ilecesary that tllia lUnd of operatioo be implecnen~ efficiently in ir.s (uil generality (or ~urpoMS o( out Al
applicatioo, bowever, th. reiational divUioa opfl'atQr wlil no' be given the sam. !Ott of 'peciai coa.side~tioa
~ this ~aper aa the other :".-..0 derived opef1>Or"3 described ~.
The aample query formulated in SubMct~n 7.3 1Il000e '.l:Ie o( ~ \o~cal pred.ie:ltes. esc:h l.SaCXz.a:.ed ·..,,,h Yl explicitly defilled. reia'ioo that aUtlbt be nored in Yl "exteruiooal datao:J,M' of the sort U3ed in our
decnoa.stratioa SY3t.em. W. refer to a. predieat.e of this lUnd. wbose rnealllng derives irom ir.s usoci;ltioo ... itll
J. rela,ioa WbON cOlUti'UeJH tuples are tXi'tieitly enumer~t.4Id. 3.1 a ,orimJtive p~djca~ .~ 'lie shaH see ~
prooi lCoda. 191'2! may !lOLlCe that OUt :nlWltellaJlct of a IOCIc:al vuabie nacit Hrres wh., may be rep.l'cieci
a.1 a dynamic ~&locue of the proceu of eOQvenioQ to prena: :lorma! (orm, but ~&Pted r.o the e.:lH where ~tle
requireci rena.minc operatiolU c.:uulot. be determined Jt&tic.ally OQ a Pllte!y luic~ buia.
.-\A i.n the caM ot the exUtential ronnu\.a., procesai.ng oC unn-lnally q\aQeiJil1'l Cormw. ~ ;rith the ~ea~oll
o( !l"" utribuc.-icis to idenwy esch o( the ne.ly·introciuced UlIiversally qTJueiBed nriable.. ~d a a. ... sc.a.cjc
rrame is created to nt=rd the ~ ("u,nbuc..-id.nlul1'l") ~d Y"alue (the I1lwly PI1I~ted '.uUque a.r.tribuc.-id
name) of nell such vuiable. The subetantive portion of the proc_ing oC univers&ll1IlUan~ed (ormula ""~
LSEC, QOWen1, is coruidenoly more el)alpiex than the correpond.inl part of the p~edure ror proc_ing
aist.entiaily qu:l.4tified Cormw.. ~ noted in Subeei:tion 7.7, :loll suell formula u. of I.he (orm
1:.Q(:) ~ 8(:}
where the quaillie.:a'-ioa cl~ Q(:) iJ restricted to coown ao djsjunction or '.Ulivenal quaneifi~tion'. Thia
qUaUA~ion clauH iJ UMd r.o rettiet the range o( the '.Ulivers&tly quantiAed variaoie : i.a each oC the po.lbie
eoa~ dec.ned by a!t.eru&c.ive join\ ina~ti~io[U of the vlLrious quantIfied variables thac are "'visib!e" ~it!Un
~he cunene scope. We QOW colUidu in some detail the manner Ul '4'iueh LSEC corutraUu the currellt AD E
by 1 universally quantiBed formula.
Ree.all fine that. the ADE ia Lo "eneral a. see of HveNli relatioQS, <:ailed the ~rms of ~hat ADE. LSEC
eOl\5u'a£na eac.h ~rm by the univer3ai rormuiOl. tbcn takes ~b(! unIon oi the resuit..s ~ (orm J, :lew ADE. r.n order to el)na~ a liven exteruiOQ ~rm by J, uJ\lvcrw [ormuiOl. LSEC mu." fmt Identity a. crucial se' of
~l. called the concen variables of ~W COflDuia. The eon~t vvia.bies are p~i.se!y ~hOM &:.Cribut.e-id
vlUuad vari.ables tW appear '4'it!Un the qualiacatioa clause, bue wbose ~nermOit scope ~ 'lot locaL ~ the
,ubimtuteci (or tb.&' .... nable , IQd ~ 00 ror e~ ot tbe ~Ibl. V'Ilua withUl ebe eiJ'ec:ive (coot.u't.-Oo\'\.o.d)
fan Ie ot" the uQlyenally qU &nc.Uitd Y';lM&ble. ne result cor!'!' tspood ing to tb is coot.crt. :uple ~ now eOI:Qblned
W'ltb thOM derIVed (rom u.eh ot til.. ocbe" to ob t.:I..LD. J. 'I' el'3loa o( tb e on;:in&l exWI1310tl t.erm eO lUtr.u.!!.ed ':Iy
tbe UlIJ.vtrsaliy qU&.atifitd formula. AI QOWld ;U)ay., tbe ana.! result :s ob t.a..il1ed by eakin; ~he unloa ot ~b.
~esu lt.s due to cseh exwo.sioll slie. i.!!. the ori(illal A.o£,
.\oJ 1I1 :h. CMt 0( CClt.en.tW qua~Htac.&.ioa. til.. UD.lve:rully qU &.l1t loed. vl.t1abl., ~ ?~Jec:ed ou t ot :b.
result upoa l.&Y1.ll1 to.. xo~ ot lb. \I.I1innaJ.ly qu&.l1tliied ~ormuja fo t :cuooa o( eiiidencT.
8." COQjUDcUoa
It i. in ,h. CMt of a cooJU.D.cloiTe fo rm.ula tb.a' tbe proclSl o( prott",I'" co~tt ;l,jl1t "ilicil. uad,di. ~h.
op.r~tion or cbl LSEC al loriti:un lJ mOlt avid.n,. Upo n e:ncounwn.ne 1 MC or eonJoioe<i 7Ilblormw..
PI:) A QI: ) A R(:) A . •.
t!'te old ADE: i, lint CO ",Lr:Line<i by P(Z)i \ne result is tb ea fu rther coo.str&.lned by Q(.z: ), \hcll by R(: ), Uld
50 00 UD.tll eitber th. atenslon h.a.t bHn cot1Strained by tb. !a51 cOl1joined SUbro(a'! ul~ or l (aiJt!..ut.ltUlon '.s returned by on. sueb constl'1inil1l ,tep , iQ which e.a.M comput.ldOD terminates with ~he value iabe-e.xcel"..3loo .
30
3.5 DiljuJlctioa
La. th. course ot e003trsiAinc :he ADE by <l disjullctive iormul:1, the "width' oi the .-1.0 t!:-rnore prec~iy,
~he nwnber of relations witich it com priMt-i.s , in the general ~. iacre:ued ~ redect :l l:ltger cumber oi
~terU&Liv • .,qys in wtuch the query mishc be ~isdeti. To eOl13trw ~Ile eUlreo, ADE by :l disjunctiol1
rot e:umple. cwo copi. ot the ADE are made; oae is eOQ.l\rsiAeti by P(:), ~he o~ller by Q(:), a.ad the resulta
combineti ~ (orm .. Ile new ADE.
The proe_inc at ~ defined predic~ witlJ..i.n the L3EC ~corithm i.I ~&lOCOUl ~ the bindinc oC }..vvi<:UIl ..
within LISP. A aew 5t.ack Cr&me :., crea'«i :.0 lSaOCiac.e with the Corm&! p&r&metarS :ll1 ~eiennt inIorm~ioa
inheric.ed {rom the ldual panmeters. At :he time oC billdin" e&en {onual panmec.er :., des~~ :loS either ~
COIUUlIt--VaJued V'Viable, it the eorrespoocililg ~tual panmeter i.s either & coaat~t or laa it.NIC wady been
claaified u & coaa~c.-valued variable. Of &11 &"ribuc,e..id-vaJaed vviable, in the eUI ..,here the eotNlll>OQciiq
lCtU:l.i. par&mawr is itacil' &ttribuc.id-nlued (by virtue ol baving bftn bound" some leni to & quan~ed
vvlAble).
FoUawiJlc creation ot the aew .stack Cr&me, the curnnt ADE is (recuniTely) eoaatraineti by the body ot the
ddined pred1cac.e. ""th ita ~Qt bin~. For syntactic simplicity. the body of ~ defined predicl1c.e !Day be
l list oC conjoined subCormul •• and aeed Qot be 3D explicit e.onjunctioo. TypiaUy, then. & defined pmicac.e
is proceeaea by e~blishiJlI oew bindings and then e"f&!ua~ing the [U, oC eOQjoioed subtormut. wb.iell :nue
up ita body.
8.7 Primjtjve pndicau.
[t ~ in the proc:c.illl ot primi,ive pred.iaws tW :n0l~ of chc computation&! ettort oi :he L5EC &l~oritlun
;" expended. For a simple illuatrauoll oC the eompu~ioa&ilr dem~dlng iUpe1:~ of ~ll.i.s proeea. cOl13ider ~ile
ProccsLDI oC tile simple quer"f
where P &I1d Q u. both primitive predicaw..
Sin~ the body oC the quuy is a eonjunction. the initial AD E (cru"u~ll310a) i.s lint eoo."ra111eti by che
primitin prwdicaw P(::, z). COl13tra.i.n, oC the true-cxUll3iOQ by l prunitive predicar.a is tre:1teU &a ~ !l)eci~
caM by the LSEC ~lOrithm. Th. resultiag ADE coa~w ~ siogle reiatioQ, the indepcoderH cxeen.sion of the
primitive prediCAtA in question. The independe", ext.coaion of a. primitive pre<1ica~e ~ defined J.3 the ~uit oC
seiectiJJr the cornspondinc primitive relation in the exunaioaal da~b<l.M 00 the v:1lues of a.ay co~~~",v:llueti
&/'IUlnenta that. mllY be specUied. then projeccinl out the &t.tributa corresponding to <lil such e.olU~t--nlUeti
31
argumen". rn our a6mple. P ha.s ao constan~valued ugumenr.a: ~he result i3 ~hus :he dCiener3.te C3:Ie oi :1Q
illdependen' ~.enJioQ: a aew ADE coruisting of tile Single ~lrlmltive relatioa :orres-p<JaciiDg to p,
This ADE ia !text CQaatr:lined by the ~colld conjoined factor. the ;lrimltive predic:J."-' Q(z, 1)' In ~h~
Clore typical CMe, where the :\D(l; i3 not equal to crUe-e.'t""c"IOD. :.he ~dcpencie!lt exuruion of Q(:.l/) is Grst
compllteo by ~i~tion J.Qd projectioa of the primitive relatioa corresponoing :.0 Q, loS de5Crtbed ~ove. J.Q11
then joined with the current Al)E over all commoll :J.l.ttlbl.lr.c:s. In ollr exampie, the Uldl!pencient eneaaioll o{
Q(z, l/) would be joined with the old Al)E (the Uldependent extellaioa of P(:, :J) over tile commoll er.stenti~y
qul\Atiiied variable :. III our knowledge-baaed retrieva! taaic. ~Ili.s join oper:ltion, 'Rtlich wOl.lld :.n i:ener~ be
'rerr apeaaive Oll an ordinary :Iladtine in the C~ where the relations i.nvoived ue of !.arge eard.i!1aiity, occurs
quite irequently i.n the eoune of ex~uting the L5EC algontllm, ~d would problLbly .ccount for Clost or the
execution time i.n a realistic :1ppliea.t.ion. It j., the need to perform such joUu (or similar opera-tions) i.n a hlghly
efficient manner whicl1 thus proYldes ·"hat :.s proba.bly the mo., importa.D.t justiScatioll (or the \lM o( p~r&Uei
!la:dware i.n the ~ds ot lulowledge-bued 3.pplicatioaa with which .... are concerned.
3.3 T11e result formuia
Up to thll point, we have CQnsidere<i oaJy the treatment ot ~tentially ~d univet'3&ily qU&Dtiaed TViabl.
by the LSEC algoritlun. r~ will be recalled, aawenr, thaG tile "top-level" query rormula mia' ~""ay. COI1c.&iA
be returned aa the result of the query. Duri.llg the bulle ot Wle LSEC algorithm, (lee variables are treat.ed Ul
exactly the same maruler aa aiat.entiaily qua.ntiSed variables: dacinct iUtribut.e-ids 3le erea~d Cot eacil, ~ci
tbe lSIOCi.a~ ~iormatioll stored ou ~he logical variable stacx without ;],oy indicatioll o( ~heir '~ial ,t~'us.
A.fter the initial ADE (true-ut.en.sioo) hu been coa.stnined by the (ull ... eil-Cormed (ormula., QOwe¥et,
euh of ~he re!atioll3 i.n the resultinC ,\.DE i3 proj~,ed over tile result varla.bles, aad ~he 'Ulioo. oi the
(necesaarily union.compatible-5ee SubMctioD 7.4) resulting rebtions i3 taken to yield the query result. rn our demonstration syst.em, (or example, esc.h relation i.n the anal AD E i3 ?roj~teci over the :1ttribut.e-id
corresponding to :he top-Icvel target document descriptions. and the union of ~he resulting unary rel"tioQ5--a
:lew ~:3tioQ Usting euh of the matching tal'1et.!-~ duplayed to the! u.ser.
8.9 00 'be compjuj~ of LSEC
A.s .... hAn aJ.res,dy QO~. the :'-ION-VON machiac ;., designed to e.'Cet:u,,-, the primitive opera.tions ot ~he
LSEC algonchm in 3. lUghly efficient CllUlaer. (The reader i3 referred to Shaw [l~i9! ror the algorithau
them.lves, and to Shaw, et ai. :1981l for de~~il.t or the NON· VON archit~tU1e.) Siace a number of these
rela.tioaai algebraic oper~ioQs will ill i:cner:ll be required i.n the cour,. ot an .ctual retrienl ~k. however.
it is re3.50nable at th~ poine ~ cOll3iuer the complexity of tile LSEC :1igorichm in :4fm-' ot'tllese reiation:u
algcbraic primi~ivcs. [i'irst, it should be aot.ed tll:1t the individual who eonstructs the ~t of defined prt:1lic:ucs
(which, in our demonstr:l.tion ,ysccm, implement the match ~rnOUlti~) may exercise a considerable dqree of
expiicit control oYer the sequence of operaLions th~ WIll ultimately be pcrforme<i in the COUMe or executing tile
32
LSr::C aJcori~hm. [n p!'1.Ctic:e. i, hal betn our e.."q)erienc:c chu predicate defini,ion :" :u\ 4Ctlvlty :note :latty
lilte onUl1&tY (~bei~ very ~&i1.lcvei) procnmmUlg ~lla.n. say. ~ile ~&iOlOWI ~jc coo.irootlllil ~:"e ~tc!lit«t ot
a ~lu'ion theorem pl'OYUlg JYsr.em. In pa.niculat, It ~ ~Ible ~ deane ".WO "wealdy equlV;l.ICnt" 5Ir.s ol
predi~tha, :". C'\ItO 5Ir.a 'Nttic:.Il ut illcWtingu~habje on :he bu~ oi theU' illPUtl output ~eilaviot under