rpms/clips/devel DR0873.txt, NONE, 1.1 FunctionContext.zip, NONE, 1.1 objrtmch.c, NONE, 1.1 .cvsignore, 1.4, 1.5 clips.spec, 1.11, 1.12 sources, 1.6, 1.7 xclips.desktop, 1.1, 1.2
Rick L. Vinyard, Jr.
rvinyard at fedoraproject.org
Tue Mar 3 16:44:14 UTC 2009
- Previous message (by thread): rpms/phonon/devel phonon-4.3.2-gstreamer-utf8-url.patch, NONE, 1.1 phonon-4.3.2-gstreamer-volumefader.patch, NONE, 1.1 phonon.spec, 1.29, 1.30
- Next message (by thread): rpms/gcalctool/devel .cvsignore, 1.56, 1.57 gcalctool.spec, 1.86, 1.87 sources, 1.57, 1.58
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: rvinyard
Update of /cvs/pkgs/rpms/clips/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5775
Modified Files:
.cvsignore clips.spec sources xclips.desktop
Added Files:
DR0873.txt FunctionContext.zip objrtmch.c
Log Message:
--- NEW FILE DR0873.txt ---
CLIPS DISCREPANCY REPORT
DR # : 0873
DATE : 06/22/06
STATUS : OPEN
REPORTED BY : CLIPS User
ORGANIZATION :
PHONE # :
ADDRESS :
CLIPS VERSION : CLIPS 6.24
HOST : All
OS : All
********************
PROBLEM DESCRIPTION:
********************
Use of the object-pattern-match-delay function could cause a NULL
pointer exception.
*****************
COMMAND SEQUENCE:
*****************
1) Load this program:
(defclass A
(is-a USER)
(slot x))
(defclass B
(is-a USER)
(slot y))
(definstances initialization
(ob1 of A (x 1))
(ob2 of B (y 1)))
(defrule one
(object (is-a A)
(x ~0))
(object (is-a B)
(y ?val))
(test (> ?val 0))
=>)
(defrule trigger
=>
(object-pattern-match-delay
(modify-instance [ob1] (x 2))
(make-instance [ob2] of B (y 2))))
2) Issue a (reset) command followed by a (run) command.
***********
RESOLUTION:
***********
Modified the QueueObjectMatchAction function in objrtmch.c
so that instance retract actions always occur before instance
assert and modify actions. This prevents the pattern matching
process from attempting the evaluation of a join expression
that accesses the slots of a retracted instance.
*******
STATUS:
*******
FIXED BY : Gary Riley
DATE : 06/22/06
IMPLEMENTED BY : Gary Riley
IN VERSION : 6.25
DATE :
DOCUMENTED BY :
DATE :
TESTED BY :
DATE :
APPROVED BY :
DATE :
--- NEW FILE FunctionContext.zip ---
PK
`À¾°Ø]²»µÜ³»AðgóxtýxûCJNãS?£9O ïgaËGѱn/ø8»§çä'2ëÇý¿²÷ãîÞþîÞ3Wο¯:½£.ysÝ;¾:=ë÷g'×ÝxYjo,ªÀºÏót0z at .<cÊÈ Ia<$1Ñ@Ì
è
ö.dY>ÎAøµÎÏTî eÒ>Ú~P%$¥ãä4·³pLÉDзfþ~2
FçYÚ&[1ìæÍ;ø«4*\x¸Áu²PIS±²ñ¤ÀÅ1!h%/srÛ¯ºàu
Tã«à'-á¤wÝír» wðaÛ¯°åPö¦Y|#V¬´ºð¶
{Úþ/p%$ùüGÉ¿^>Ü)ü~2F¬j£Vuÿv5:½N/Îzï;½«£óÓ³^÷g|÷9êvÏ>ÜÝo»g¯ºêDB{coXä§`Mü1g:s£jimMøISý^[Ãùý,÷£@khÅC%VâOÁ·4;ÎáægÆáÖò3·ìEþ d¯Ñ^\ÝÓ«öãã¹& b/mÔÍö ]ÿêI\Ý¥1$¶ôg ãäqËpuØÝOÈör²Ìk¶ÅDFIAÕW×6§ Y©ÐäCÅí´Ù½6Óçfö궦±Æ&Çm]Þèé
õøî:dö¿ b¯!ÊðçÌþ:¢-¥àTÂý¿:~ÌÕCëÕ~ÿÅĵÉTí?½jÄ%#êiÿ
¨'çü=¥ªBðgWU*JgØúO°Î$`¨kÊsÒðæ6qâ[4ËüþH¬±©)v*&
`ØH0ðè鼩"Îïíb[~¤¸æàoþ6I"
;F.L-àÕ=M3± ö8¾M"¯¾ð(YÀû¹ ËðÀI:2Ii_$Qâ»ã¼øÀcBÅo/FLâáCwï;Jâ¡ê*ï¡ÿ
àóø.N¦1i
·14Kjϳ~ë9
yn£O *¹}$|M1Jç¿«ÎÏS»|sÀG
°ÁÂÙëO8ÿL-¶~ò#µÀSÀçÆú¿øº|É<ðS\¿`ûRð&ý³k;ËÇÌtìk°f¬ÿh
F¹þlÇtªu ´Uctõÿo+Úß.wß6w÷»æîAswØÜý[s÷]swÔÜ=nîE7ÞÏ^ÿ³s|usùóåUç}-@"ÔÄ=5Ï7wß/º¨¹5
Q¥DAkÏÃ\6R÷Æ7aèÈá«(;
5¾&bbÒlfÖDÇð
ÐíW}?ÒñxT;@Öºüùýë³îÍ»ÆÔÙQ\rÓU],Á¤s?¥¨bÌqÃ%¸q÷J0 .Õª
3L*? @ÊIñ,
¡ßE9ù®6UôtÿØ(/Uð÷'?Ê)
Vñì{ä/äÀ1´Zßá0Ì,_ö>òPN¹«ÅÖ3ÀøÇf¤¢Ísç¯ÈoYûÛ49Vâ5Öü³Jè2ÎÒêNÀë'ÙAN¢ê F?åNi¸É$wµ£Ê%)ð¥ÜUÎYr_»NU´ôR/Y!©çË'¹;r5©Yôå÷5åÀÅ;H1¿qE ¬$ñK¸,R^]½20MrÛX®ã3|H¢G>mÁÒ8*va1ßõ ØF#Àó`Ù|<F¸Ôúÿ¶×a(DgõxYìËt>¡#AíÑÓL0;jXIbìå,8®iáó¢ ÎóãC#FmÄrZ}nÕ
_ÔjrÍtWÍ̯£5kå|jN±ÚÀ9wÈcI?äeu>aÚÅ¡? z Ã1^OÃldë5é£xÅ¡hÂþL}¦+§sfÄx6;ò°C>hØCV`ß¹÷´ù´æzÕ"+ÑäiEF
GÁ¨ 2CÅÅÑ#±~_ÓÐn
Rü{÷¢J;Må» ;p)xª°Ûã$«"WØÔ$Öe5wØòf¸k¹Ï_36J#Ùjm
xM`©Xt¶o7RÒ
Ã弯*ηxAÕ)3PøÆLvÁKݳö¦¾Ì+àmvËã}(P¼ÜSáØίñ¦¶(EàÁ¸Éc¤îÒ$»õÕÓÑì)Ýz¸r^(Ö$%Q6I
#1Ã¥µ½
3ABæ9<
ÚYô[rïÚßW¿Ëa è¾°»$µ¸f_¹ðà~.駳ûèMäÙyïß é¦^K¥" ?`ÛR
?æ¶D{
«´ìSYi«9«SÍÊ$,´l>6ÂÛQ6ËLL©
ß³j¹ê£P¬Få,Ô.¡R*Û¼C`ù</uòkÍÔÜ$ÿwüÔÊ*#óе\²9)Á^ÖÏ5M¢´_c,N5©Ãu0¹·³$U$!ìM-Aø $."e>ÓÄLS¨ÅÙ
"ãdÛYÝNÌc«Ø±Ã`Ì01Cm©«[Ö|/üýjiMY¯/þXOÙ×X=2¢« íÚö¢LúNçÒw¥*gèúÎ#꿬©¡î3¹(ÂÑbÙÏÁqóãDM_
«óÔç·æ<áRÄ-ë¸2áx_Ií|©COsíÔGøjÇ×:ª`Ç.²;â®^!H¥½UW·´¢-DåSr1Wn"»NqàÂet<i,®[É.7i~gj|ûA½Cc´®#FZ´Îê»-,ï3V V·á+ÕÜÉ
ÛUu+]ßôóñQyóÞ8$ÎÇ·"³º¦>LÄ÷Jo1Vyç|Õ˦Pk?<õ»2Ðq?Ùÿض_
SVUOíµÝýHÙÙ~®Hκ÷±ôδãg¿î=+TO½ÝQàP¯n¨ÓøYª~u:c1¦
Èè¹E Ëæ«,>2f6n,ýÙ-UþCT¯Bª5þu¤Ê1Pq¤g |þÕKàÿ
ÛôÐÕÿ~°{òoWr-ÔíÅõxx5êô®á(påSòcùA|xûFC'ÝþðºÑ\u{Ýk6n°QJjnMQ®°H=Mi¶ZÞ>5˦ñbBXlFiæE]J£»$ZäKtá
a<µKQKÓ$Wÿ!gvé2ú çZ]
Y0}»tæM³E4Oò-D(¸0ß/Ó,ÂÙc¾xPHSJzÍH·wvvuÑAyÝ^'£«ÎÄ
Ìç6C¡²ì²Y2vÚÒ¿ôFð("ß¿èã¿ã:ó$&PLÉ]ø®ùÖhéÍA@.¨Å=h2lñ'[¹lPý(È/þA
Ò]ÊT
,ôé £20|
#õÞÖPOÜ ð
hàzNXC0Ð=ÿ®þ#(hÐVc,6K{"Z QVhfh1Ùx/ö÷üpÑ$È84®»g^]rÉ
=3%½¥açïn&(veP¢e5vKBÅË+pW%@Ú´f"
ñ8)Jä½ú/Ê´2Y¹æý
>bC`&zÒ¸/åã뻯Éq:¨0xcemß{Ýo47ù¦°ýÍ&áõ¥w&¦ISéçv;ôHÆËv4êg£wÃ~÷d`5õ&1ç½)v³ÝEáÆêH:´5ØRl{
môz»4¤»TjTY#O_(5JÒ«&y³µgÑtµD;ëG©:Jfo³'×é®íÙTc«ðxþ
f®_×]ä:!ÅÈÄôªÃøD<Uã9[í|&ïÆ«í¹7|öOY{_ç+çIÿÅK
D(Ù|ªL-FàMM÷Wî,á´Y[g-ÖwKÇa(6ßòrÂ?¸îâÈ]¼*ÊàîRåØoåD«e<÷+fvѪãOgÞ*ÌçÉ¢,)ÿT&ý<m½,ö½ ±D¹ÿ¹?¹>k÷W£^%qûX{¢{ò×
Áq©JA9Æ30Ê»]cIúÛ«Á¤Öï
ºëã¡nC0´Q#nÌÍBüÒjéΨrKº¤%`Aåv
`¦r±æ-æÑflvô»ùñmW·`X5{üwo4ZO%²äiZ<¶YÆ\°5z'AJVÑ
Rí¢-ѶvDs`,Øn!Z̲©TXYpGÓvx¿ZÙïsi!EίWß^C)vû`^ÁòqË\ÒÔȼ(ãniJC·ïip"[Jå)ìȯW{â×ÎÛå=l´Û&<Û?ë³LödÒ8Øì(ÇÎã·.MM]d¯^Â\ö)C¾ÔoÝ"^2¥ÈWM3/WeIJ<aQª$Y*ÓCà
ÐJEa3_³ÌÞ¦Ðп6÷ Ó7r¬ÏêÚ)QýÜAu¸ü)KC.ö_þÉ5E î0ÚüØ
"1´Þ,dæÅË ÙEl¤Èä(c
ÌþsPµä©*(V#;ùMM51<ÑêÃ4#ñÌÌWÛx<Æ,]=K(%ºGóTƾT³KÎò þs/¹ñæô2Kó }È.1K_µÀ(°®VbÔD%O
úüM$OÀÃpìÒ[liÏ|$`E×ÈWÇÿ\ðn¯5òÂ2n-êhm¦ó Só8HtÌxL½àñÊÂQÀ-eÁª.Y`;ÝèľK6¼dnÊ
È»æ¥ågXÆñ¦#
êQV<ÉPvÊ·s}DáuûBìèLõç4 £~Üåvn5sé!ëâ-;OÐÐÏu$Ï0,
íë)4aù=n¿É{Á
»"½qOà £§½ÂØqoo^þx}âûàYsb"#»6£PYå4êiÄÔÛIžß}Ü=÷Vgå=Q{#`{¯tî cZXÇÌtÄÎ;ZE0¾¶&¤Ñ<»%ÿ I̲õ÷Íô±ömýÛc[Å·q^¬{)Ûäæä)jåf±²|[|Å£&/v\Ç°ÆÄvîºLûGÜY÷Ë$^&àK¦ñÊ8(Ü
ìwòlæWBg4¡ÑT{øg ½xP3êÍÎÃmt¢ÍSPKvØ°Õ»»¢çN¥ÇËtyÄ`x
N·¾
Â
ä¬íü>Õö*}d-[k>ny¦ª±àîè¥)Sn"¶S:µ-BQñ¬µ*Õ£(nª9IlÚúH5mè#Ù2ÜpAG©¦-%à_¯¹jí?îRt6u$Ãiò¶}é¦ò¶
ͧ{VhÝ
mç TA·¹×E/8MãiÀ.µôéVÜÙå0½·ãÕ:àºÁýÐÙ÷Y³Âsl/Ê ¥G2¥IææI)i¤+Ð\®Aef&Ho6Ív¼²ká ¥ÕRm÷'ô.W©èhó6¦ SçؽÑÃòkY#Àqð:lÖËHû Igäʽnk\Ó8aèPÉcÛ oùCP.RÞbÅ!àED)Þt7Kâ
Þ´$5Ò¼ÖF_:é!0ÄÚí~±{cÛQk²Ò`±]xÜõ9ÁËF8|ñ®æä,x·:´>¦s§! ôK'OÔ]DÆRè+k)$¬¡óR±
>Muî±4©?ãªÒåR·¦®j%ðÍÆý+hÝTl±ÁÂfÍ6qyêþ?ÃâTA£Úhl
äGZcÀv²
týµôPòϺ¯gÓeÌAÇ`[¼ò>çOyUxÉ¢5£ªG¥¢WÞº^ÒKé*pÑ\
D^2ÇM$U·k×ÂݼVÑCy8= ·ü`¦`.RTÄõÎz£>Ú«\ís£vtðºÚ£®OG4¦lðÜÇ©!-gxàP]^½ué×SñS¸J;ÉðÌES¹;"ǤæKTkVi1â b1kZÕ5¤fò
NT^Ènøda,åí·ðÇcK_MÎkÓ4ú/ÇÄä æ2/<0ybõ¡°³ATug:ùÔdW)7myimYªä"&XRz at qb`Cç_Ö¶ñ¼êpZ»õ
ew¾{ËeLååÉ[M;CWnü¸6n^½hgÏHã+Ò¬(wbl4Ä˽£¡
åÑzÔʦ|þ
MLµ&Uãn½ U©PèoL!&+l÷WB¼v%1
3G3M(J:à×}ÀݳŮ nÚ¥\+xùBýqX6 FEÙS"V.8뤽Ytì¾½ãitì¼[ã×zB6ñBö¥
Î0¢®XtYùs×Vë6« r®
¿«tv'9kÕ
YþtnLå²y ÞáìEèq_jþC&Âë~Iµ¼U»aâß}²{KÎY¨oq*j«ï¼"lú%HI_[%o9²ÉLÜ!µÕô-Þ¹ Å(
¤3\_¤ÄqãAÌåL2Èß9êr`4ñ
yù·fs¸²ö.ÕÚÎô?ÔÁVÓàY#*Å%²Ô
0X8ã¨j³-_|¸b%ñÚ½vU[ìµ¥üÓ¶ù-÷íò ·ï°ëB\~ZȺsÕÈèþªàóÏg©°ñK[uöÊV÷[:ýüN)uo²¹¤©Úq¦âÀZb°=V_|áIÚÜAX-
ú~4ÆK+HÕlæÏ/¯±é̦c7Ü2®|Ùn`[PTÌÝjÐÓ)Lô8ìJÎsFNÖÍÖô¬GA
«®MÊyâ$M=LéÄ·Æ\N_m*qGr¦nk®«ÁOÊcH$Ì,ÌéeUÕTÐÕôòbjïîñÊ,ºBØÇÀ6v}QÑæ¬ ²PÕÌaÑ
jC%äzXBq£
Fqý³µ·nįC;¼9}bSòó²¨ö¶¹^`òmó@~_½
»$Áo~ûÖu{¾xiÅ ÕF3«ÃäÐ*zYLò³²D\m¼^qDxãäÇwè¸ÅÙѹdbÄÒÛÊö`tÙ¦ÑìT{ nÎýòvä1Ôt(ùÕwFýKöÍ{b~®<
ãì9ÝFÄGï¾éÃ=,Ô$b>:¹ ÿNf<
úW±Âyzxϲ§0B23ÂR)ñáßí/'2þõ\ã]üa1uò«ýÊW¹Ô+
̲D)βDUx
Îo¶g¾ù<þ<c
0Ϋþ¸¯b²¢0ä®$Ñt)ñ\3ÁaºQ©yÙù£Ò¹ï'SøJ¥2±n;?ÿн½é~¾éÞt>+2güÕÆÏðäØÇ¡ëÔ:íÆ©®[
Â8Ð,
(Pþʤà!åZuRö'&-?½/³F(0¤²©ZwÇú'ãÈ
:à³n>ÿôúûô%{bJ¹9øEã'Ãorâ»÷<ױǹ 7-q}/DÐù?â§Ã^,0z_R|ç~Ì5©³Ó,c<ûNÿeâgÒMd<Xw¾k<;ÎB¿×áþS0O²&ëP Ì °"½¦ûþiÁ)¢´kfVØiu.}ÿï*Υ̮ÊúÃH7VxÄ]b%Xä7¦:Uñ/só
Xã-9Ò
ÙÓÓ+yÈuã:å_Z+ªMøM¸ÂçA¼ p.tÖWkÊlXc×ëÛ®Ó¸yqV¶mKýlê½ø}gÇÏíEß,Þ|í¾Lß
&b¼+¶23gýó;øÔ+Õ\
ÁbR¬yùª¡#`{ðÙr¡,æ5@I9¦ áÕؾUOïµç2<û½(©vÊ>ML.µñçÀù4Í:ø¤Ö~Ë2ûçÖï¯Vdz0Hû1=9ü
)@Ã$:{YS¬«Pv96·ÌÒ»ouÛ.i´é&Iªã¢(y'."aåÛu½ßKeàÑõîmwZÄ®ò~,Mk*Ä)éú8¾8÷äm6Ki)¡¾ÏÎ*«îp5-¡+ÍÞ(J)å ËùÑÒÒ»tBØÿkmHÚØZ6:ËjgË@]\oÔG9vdÐæ´¢²"è7¦G$*l|ìQ اTü!9µ5zûªÓ¶¸÷Û}º~³6SÅù
d;{¤Á#(E
$e[Móß÷Íɹx»»ÚØäï¾æB/:ÍLFôy:xF^t»ön1:2|xöÑ$ö׳,#t¹I3¼dÃõÉ[>ÎÉÑùKô')ÙëçÞ?!tøËÃ/_UNÞigxãçÓÉøb8¾BÓëÑ°drSj4*
1ÂÑ]ÄÑGYÚcÐ7$ÄìÑ,Xy!å'´}Tw>}ÞyÉöÐ4ñf»ý?lþßTÀÞi'ïuúá>B}ßýÅ>FY }æL#/ç Æ
û{!Lñ7ðoϨ®ú^æ¡`â£x²FKúÕ9@|¼ ìýÉø³ç"öy
ò§ À
Ä-Csþ§)1Vp¡{/EëÈûRj
À %pyò¯<SyK
ûc õ,Q¶YQ
Æìuùað¥·x«¿bó(÷-y¿|âl½ê-ªï@©>×ùÛUeàCýmn'ú;ÝÌú»túx¥¿#«ÙÆØÄ(QÆ^sü/Ïÿ=¼Q÷ýË÷½üñe}/OÙ9ú#t>¾NÇðÃÙõxpu>£ÓáÙùøüx¹
ãÀöG£É?4øÞ&'ýÑ% `Ò$rîâÀw õ{/]`_1&-àªJQÝi++
:"m±u·DàÃ8ºÕVàFÓi
Vü7«Ñó(È/~WÍ&Ùãxë|#pS5c0*K
BìEëÕÐê íXñÁiÜØ-n_â@?&E§ÓåæaìeêûzÖÂõð%a¾Åc³/AváÚNúð±?=ï@4þøú I¥÷¹BùóÈÇè
:¬!üÀ¹K¼`úøz4ªµ0¦ºw1ËgcÓN©^É©ægi)Ýñ|ÄA§+<c56Á³8ñµH¤)´·aLÈ',Eä- +դΦ|$â/9MbKȦ¢Ú*)X®X§ÕéêÜn±õÛmò!vë¥ä:À¾bsAÉ;ßÔd;4Y1󢿢Ò!Ï-Ðï8{2»ÝzòèXнµh3ó[ÃÏ[O>¨áåg0Áô½¯¤4÷
~9érTã
/\P£Â «GÇ7uéøSgñ:ôQS[¹1ÉÃ@jS@÷°£\C%3.³8aàJ)
G]ÜvKÙ#i+ :
Ðkw¶=3ìhEj®øýSðùXͤIOð?mùó×ülf*¡,ÿDìáà
5±I
Å?Ö>ª;ñ]0ra·Éø+ËïÐzuÇõ$÷È´ÐÓ|Ö]@*å/¢uhvÌì[ËÄ)Xhä=£(?
$TíêÿÛ!)j4)'±Rú´ÞÆ»Umoo¢²T»ù0óLþn²OIùs uh
/Þ%Ï5ù®Â©@£í¨.»S g
Ï#ÊÄYt¹qjþ?Ä®!ËKÍÒms ©%íãÚT¨®¤~VþJÍÊYKð½ºKŵ$<÷&ÒÍptõ
]B,BS$+;SE' ÿ[Ò sÉeRòKpÊe=§ò#²U"ÖÌA좴6_läí-{ ÈÐ!´eU[A~Ì)¨
T$tés
(.
(Mæ² Ú
u`·å©Æ[]§j«k
Kn%ÂëÀú(£åóÔ'§óe¥&5'r
ªT-òj¥Í°ÕKû¬*ÙÔ(4çQ#
3«6&&å³¾7UA)ºhéõ!]E§¡*î )
ûQÒ¨5WK§bZßjî)c(´sl5¨Jzf,wáZ#Eµ«¦6Neuh /¼gÜìÎ=ïRC\I4IWy<§Çbâ/ìPæíÛVóðAÁ½9qËÍJW]¸,÷7¸ä}¨|.CBf x)
pz[÷£\«CJCà®éM}Ú¾nÉHàV Néq÷ÌZERC<M¯GÃÁd|
®ä®ôfº{Çá?ñr;]vè*»)Ó @Ii;#çåÕ)n¥dYS}þ²+ÈX³½µ´îìê¯w5X·Kó6E¸Õ©1±]Ò{ÂØ
NÌÅDEC¢K´£¦òè*ïÍQÖ±úv´=ò_ô~ü**ýDm2¼úNzQ©¶XTõXZ;çGi¹Z¶rY~þr¯YÓÓaýñrпlCGT8ÿÕq\ûbWò;8>oç+©÷(ÄN13`p'£Éàï7ÃÉô_VD«ûax{þæàJ#M<÷üäÇùþe§jDFÈL=¨©³Úé]µ 4]'ª_ÝÇRÝÞ*!+½ôÂjT#Ͼ﫲hñ·Ã}^UÙ¨Z7íkùe ZA :geò;÷°tòP|¦÷ NlSRá¶Âß =×¼(Ì~ ½4c6WùeáF0Cq l[÷,ÆêncJ;¿+6ª
r À·
z-"² Ðe.8Ô
Ýh&½Áh#$
ñ}å«T¹ÙëFðJ¹P¾oî¸{¼½{¸½{<ª|gû±=t¬´_æ¸ÛwFб=v·g(ÊvãTÕÌ
úÃ0£æ!âº[
2Éaèßé_ÀÿÃX®ÞE´Z
\Æe°"B¨{á%Ñ7p7 qóB}(
qíÍÂ
Ig2
7
;I± ¦¡;læG.
«dãfyÕ¸¦ÌõæûfW
ÁrâÙVN!wª(t$ê´!$ÇÇÚ)-ÌSÿaçüªºg* è±tB4bÌïgJfÕ³- ÌdDr*#Î^Ñ1æ]|Ýå ÄoÊumz®þ ¢C3VL
írKRá²`¼Ôß=¹l&£Âÿ«y¸ÿï@W3}ø}ä?]n5Öô÷Ù ñw×v¨gçês.ÌæºUcyÔCà|^¼5egD?÷×~Û'Qroø·gððK¨¯~v¤&²Fx´³
sV̪9°Æ¶ÇÜò.[:ÔËáîgTÕúÆØßÁ¥h´ø"RúAÄEGð½0·â=©é'$Ä$*§ñVÉÛwZÝ>ÐÆ¿PK
̲DUx
--- NEW FILE objrtmch.c ---
/*******************************************************/
/* "C" Language Integrated Production System */
/* */
/* CLIPS Version 6.25 06/22/06 */
/* */
/* OBJECT PATTERN MATCHER MODULE */
/*******************************************************/
/**************************************************************/
/* Purpose: RETE Network Interface for Objects */
/* */
/* Principal Programmer(s): */
/* Brian L. Donnell */
/* */
/* Contributing Programmer(s): */
/* */
/* Revision History: */
/* 6.23: Correction for FalseSymbol/TrueSymbol. DR0859 */
/* */
/* 6.24: Removed INCREMENTAL_RESET and */
/* LOGICAL_DEPENDENCIES compilation flags. */
/* */
/* Converted INSTANCE_PATTERN_MATCHING to */
/* DEFRULE_CONSTRUCT. */
/* */
/* Renamed BOOLEAN macro type to intBool. */
/* */
/* 6.25: Modified the QueueObjectMatchAction function */
/* so that instance retract actions always occur */
/* before instance assert and modify actions. */
/* This prevents the pattern matching process */
/* from attempting the evaluation of a join */
/* expression that accesses the slots of a */
/* retracted instance. */
/* */
/**************************************************************/
/* =========================================
*****************************************
EXTERNAL DEFINITIONS
=========================================
***************************************** */
#include "setup.h"
#if DEFRULE_CONSTRUCT && OBJECT_SYSTEM
#include "classfun.h"
#include "memalloc.h"
#include "drive.h"
#include "engine.h"
#include "envrnmnt.h"
#include "lgcldpnd.h"
#include "multifld.h"
#if (! RUN_TIME) && (! BLOAD_ONLY)
#include "incrrset.h"
#endif
#include "reteutil.h"
#include "ruledlt.h"
#include "reorder.h"
#include "retract.h"
#include "router.h"
#include "objrtfnx.h"
#define _OBJRTMCH_SOURCE_
#include "objrtmch.h"
#include "insmngr.h"
/* =========================================
*****************************************
INTERNALLY VISIBLE FUNCTION HEADERS
=========================================
***************************************** */
static void QueueObjectMatchAction(void *,int,INSTANCE_TYPE *,int);
static SLOT_BITMAP *QueueModifySlotMap(void *,SLOT_BITMAP *,int);
static void ReturnObjectMatchAction(void *,OBJECT_MATCH_ACTION *);
static void ProcessObjectMatchQueue(void *);
static void MarkObjectPatternNetwork(void *,SLOT_BITMAP *);
static intBool CompareSlotBitMaps(SLOT_BITMAP *,SLOT_BITMAP *);
static void ObjectPatternMatch(void *,int,OBJECT_PATTERN_NODE *,struct multifieldMarker *);
static void ProcessPatternNode(void *,int,OBJECT_PATTERN_NODE *,struct multifieldMarker *);
static void CreateObjectAlphaMatch(void *,OBJECT_ALPHA_NODE *);
static intBool EvaluateObjectPatternTest(void *,int,struct multifieldMarker *,EXPRESSION *,
OBJECT_PATTERN_NODE *);
static void ObjectAssertAction(void *,INSTANCE_TYPE *);
static void ObjectModifyAction(void *,INSTANCE_TYPE *,SLOT_BITMAP *);
static void ObjectRetractAction(void *,INSTANCE_TYPE *,SLOT_BITMAP *);
static void ObjectPatternNetErrorMessage(void *,OBJECT_PATTERN_NODE *);
static void TraceErrorToObjectPattern(void *,int,OBJECT_PATTERN_NODE *);
/* =========================================
*****************************************
EXTERNALLY VISIBLE FUNCTIONS
=========================================
***************************************** */
/***************************************************************************
NAME : ObjectMatchDelay
DESCRIPTION : H/L interface for SetDelayObjectPatternMatching
INPUTS : None
RETURNS : Nothing useful
SIDE EFFECTS : DelayObjectPatternMatching set and Rete network updates
delayed until pattern-matching is completed
NOTES : H/L Syntax: (object-pattern-match-delay <action>*)
***************************************************************************/
globle void ObjectMatchDelay(
void *theEnv,
DATA_OBJECT *result)
{
register int ov;
ov = SetDelayObjectPatternMatching(theEnv,TRUE);
EvaluateExpression(theEnv,GetFirstArgument(),result);
if (EvaluationData(theEnv)->EvaluationError)
{
SetHaltExecution(theEnv,FALSE);
SetEvaluationError(theEnv,FALSE);
SetDelayObjectPatternMatching(theEnv,ov);
SetEvaluationError(theEnv,TRUE);
}
else
SetDelayObjectPatternMatching(theEnv,ov);
}
/***************************************************
NAME : SetDelayObjectPatternMatching
DESCRIPTION : Sets the flag determining if Rete
network activity is to be delayed
for objects or not
INPUTS : The value of the flag
RETURNS : The old value of the flag
SIDE EFFECTS : DelayObjectPatternMatching set
NOTES : When the delay is set to FALSE,
all pending Rete network updates
are performed
***************************************************/
globle intBool SetDelayObjectPatternMatching(
void *theEnv,
int value)
{
intBool oldval;
oldval = ObjectReteData(theEnv)->DelayObjectPatternMatching;
if (value)
ObjectReteData(theEnv)->DelayObjectPatternMatching = TRUE;
else
{
ObjectReteData(theEnv)->DelayObjectPatternMatching = FALSE;
ObjectNetworkAction(theEnv,0,NULL,-1);
}
return(oldval);
}
/***************************************************
NAME : GetDelayObjectPatternMatching
DESCRIPTION : Gets the flag determining if Rete
network activity is to be delayed
for objects or not
INPUTS : None
RETURNS : The flag
SIDE EFFECTS : None
NOTES : None
***************************************************/
globle intBool GetDelayObjectPatternMatching(
void *theEnv)
{
return(ObjectReteData(theEnv)->DelayObjectPatternMatching);
}
/********************************************************
NAME : ObjectNetworkPointer
DESCRIPTION : Returns the first object network
pattern node
INPUTS : None
RETURNS : The top of the object pattern network
SIDE EFFECTS : None
NOTES : None
********************************************************/
globle OBJECT_PATTERN_NODE *ObjectNetworkPointer(
void *theEnv)
{
return(ObjectReteData(theEnv)->ObjectPatternNetworkPointer);
}
/********************************************************
NAME : ObjectNetworkTerminalPointer
DESCRIPTION : Returns the first terminal pattern node
INPUTS : None
RETURNS : The last node of a pattern
SIDE EFFECTS : None
NOTES : None
********************************************************/
globle OBJECT_ALPHA_NODE *ObjectNetworkTerminalPointer(
void *theEnv)
{
return(ObjectReteData(theEnv)->ObjectPatternNetworkTerminalPointer);
}
/***************************************************
NAME : SetObjectNetworkPointer
DESCRIPTION : Sets the object pattern network to
the given network
INPUTS : Top of the new pattern network
RETURNS : Nothing useful
SIDE EFFECTS : ObjectPatternNetworkPointer set
NOTES : None
***************************************************/
globle void SetObjectNetworkPointer(
void *theEnv,
OBJECT_PATTERN_NODE *value)
{
ObjectReteData(theEnv)->ObjectPatternNetworkPointer = value;
}
/*******************************************************
NAME : SetObjectNetworkTerminalPointer
DESCRIPTION : Sets the global list of terminal
pattern nodes (the ones containing
the bitmaps) to the given node
INPUTS : The last node of a pattern
RETURNS : Nothing useful
SIDE EFFECTS : ObjectPatternNetworkTerminalPointer set
NOTES : None
*******************************************************/
globle void SetObjectNetworkTerminalPointer(
void *theEnv,
OBJECT_ALPHA_NODE *value)
{
ObjectReteData(theEnv)->ObjectPatternNetworkTerminalPointer = value;
}
/************************************************************************
NAME : ObjectNetworkAction
DESCRIPTION : Main driver for pattern-matching on objects
If the pattern-matching is current delayed or another
object is currently being pattern-matched, the requested
match action is queued for later processing.
Otherwise, the match action is performed and the
Rete network is updated.
INPUTS : 1) The match action type
OBJECT_ASSERT (1)
OBJECT_RETRACT (2)
OBJECT_MODIFY (3)
2) The instance to be matched (can be NULL if only
want pending actions to be performed)
3) The name id of the slot being updated (can be -1)
If this argument is -1, it is assumed that any
pattern which could match this instance must be
checked. Otherwise, only the patterns which
explicitly match on the named slot will be checked.
RETURNS : Nothing useful
SIDE EFFECTS : Action queued or Rete network updated
NOTES : None
************************************************************************/
globle void ObjectNetworkAction(
void *theEnv,
int type,
INSTANCE_TYPE *ins,
int slotNameID)
{
SLOT_BITMAP *tmpMap;
if (EngineData(theEnv)->JoinOperationInProgress)
return;
EngineData(theEnv)->JoinOperationInProgress = TRUE;
/* ================================================
For purposes of conflict resolution, all objects
which have had pattern-matching delayed will
have the same relative timestamp, i.e., the
inference engine thinks they all just appeared
simultaneously
When delay is off, however, each object gets the
new and current timestamp as expected.
================================================ */
ObjectReteData(theEnv)->UseEntityTimeTag = DefruleData(theEnv)->CurrentEntityTimeTag++;
/* ==================================================
If pattern-matching is delayed (by use of the
set-object-pattern-match-delay function), then
the instance should be marked for later processing
(when the delay is turned off).
================================================== */
if (ins != NULL)
{
/* 6.05 Bug Fix */
ins->reteSynchronized = FALSE;
if (ObjectReteData(theEnv)->DelayObjectPatternMatching == FALSE)
switch (type)
{
case OBJECT_ASSERT :
ObjectAssertAction(theEnv,ins);
break;
case OBJECT_RETRACT :
ObjectRetractAction(theEnv,ins,NULL);
break;
default :
tmpMap = QueueModifySlotMap(theEnv,NULL,slotNameID);
ObjectModifyAction(theEnv,ins,tmpMap);
rm(theEnv,(void *) tmpMap,SlotBitMapSize(tmpMap));
}
else
QueueObjectMatchAction(theEnv,type,ins,slotNameID);
}
/* ========================================
Process all pending actions in the queue
All updates will use the same timestamp
======================================== */
ProcessObjectMatchQueue(theEnv);
EngineData(theEnv)->JoinOperationInProgress = FALSE;
ForceLogicalRetractions(theEnv);
/*=========================================*/
/* Free partial matches that were released */
/* by the assertion of the fact. */
/*=========================================*/
if (EngineData(theEnv)->ExecutingRule == NULL) FlushGarbagePartialMatches(theEnv);
}
/* =========================================
*****************************************
INTERNALLY VISIBLE FUNCTIONS
=========================================
***************************************** */
/***************************************************
NAME : ResetObjectMatchTimeTags
DESCRIPTION : If CurrentObjectMatchTimeTag + 1
would cause an overflow,
CurrentObjectMatchTimeTag
is reset to 0L and all time tags
in object pattern nodes are reset.
INPUTS : None
RETURNS : Nothing useful
SIDE EFFECTS : CurrentObjectMatchTimeTag reset to
0, and all match time tags reset
These tags are used to recognize
valid pattern nodes on a match
NOTES : None
***************************************************/
globle void ResetObjectMatchTimeTags(
void *theEnv)
{
OBJECT_ALPHA_NODE *alphaPtr;
OBJECT_PATTERN_NODE *lastLevel;
/* ============================================
If the current tag incremented by one would
not cause an overflow, then we can leave
things alone.
============================================ */
if ((ObjectReteData(theEnv)->CurrentObjectMatchTimeTag + 1L) > ObjectReteData(theEnv)->CurrentObjectMatchTimeTag)
return;
ObjectReteData(theEnv)->CurrentObjectMatchTimeTag = 0L;
alphaPtr = ObjectNetworkTerminalPointer(theEnv);
while (alphaPtr != NULL)
{
alphaPtr->matchTimeTag = 0L;
lastLevel = alphaPtr->patternNode;
while (lastLevel != NULL)
{
if (lastLevel->matchTimeTag == 0L)
break;
lastLevel->matchTimeTag = 0L;
lastLevel = lastLevel->lastLevel;
}
alphaPtr = alphaPtr->nxtTerminal;
}
}
/***************************************************
NAME : QueueObjectMatchAction
DESCRIPTION : Posts a Rete network match event
for later processing
INPUTS : 1) The match action type
OBJECT_ASSERT (1)
OBJECT_RETRACT (2)
OBJECT_MODIFY (3)
2) The instance to be matched
3) The name id of the slot being
updated (can be -1)
RETURNS : Nothing useful
SIDE EFFECTS : Queue updated
NOTES : None
***************************************************/
static void QueueObjectMatchAction(
void *theEnv,
int type,
INSTANCE_TYPE *ins,
int slotNameID)
{
OBJECT_MATCH_ACTION *prv,*cur,*newMatch;
OBJECT_MATCH_ACTION *prvRetract = NULL; /* DR0873 */
prv = NULL;
cur = ObjectReteData(theEnv)->ObjectMatchActionQueue;
while (cur != NULL)
{
/* ===========================================================
Here are the possibilities for the first Rete event already
on the queue as compared with the new event for an object:
Assert/Retract --> Delete assert event
Ignore retract event
Assert/Modify --> Ignore modify event
Modify/Modify --> Merge new modify event
Modify/Retract --> Delete modify event
Queue the retract event
=========================================================== */
if (cur->ins == ins)
{
/* ===================================================
An action for initially asserting the newly created
object to all applicable patterns
=================================================== */
if (cur->type == OBJECT_ASSERT)
{
if (type == OBJECT_RETRACT)
{
/* ===================================================
If we are retracting the entire object, then we can
remove the assert action (and all modifies as well)
and ignore the retract action
(basically the object came and went before the Rete
network had a chance to see it)
=================================================== */
if (prv == NULL)
ObjectReteData(theEnv)->ObjectMatchActionQueue = cur->nxt;
else
prv->nxt = cur->nxt;
cur->ins->busy--;
ReturnObjectMatchAction(theEnv,cur);
}
/* =================================================
If this is a modify action, then we can ignore it
since the assert action will encompass it
================================================= */
}
/* ===================================================
If the object is being deleted after a slot modify,
drop the modify event and replace with the retract
=================================================== */
else if (type == OBJECT_RETRACT)
{
cur->type = OBJECT_RETRACT;
if (cur->slotNameIDs != NULL)
{
rm(theEnv,(void *) cur->slotNameIDs,SlotBitMapSize(cur->slotNameIDs));
cur->slotNameIDs = NULL;
}
}
/* ====================================================
If a modify event for this slot is already on the
queue, ignore this one. Otherwise, merge the slot id
==================================================== */
else
cur->slotNameIDs = QueueModifySlotMap(theEnv,cur->slotNameIDs,slotNameID);
return;
}
if (cur->type == OBJECT_RETRACT) /* DR0873 */
{ prvRetract = cur; } /* DR0873 */
prv = cur;
cur = cur->nxt;
}
/* ================================================
If there are no actions for the instance already
on the queue, the new action is simply appended.
================================================ */
newMatch = get_struct(theEnv,objectMatchAction);
newMatch->type = type;
newMatch->nxt = NULL; /* If we get here, cur should be NULL */
newMatch->slotNameIDs = (type != OBJECT_MODIFY) ? NULL :
QueueModifySlotMap(theEnv,NULL,slotNameID);
newMatch->ins = ins;
newMatch->ins->busy++;
/* DR0873 Begin */
/* Retract operations must be processed before assert and */
/* modify actions, otherwise the pattern matching process */
/* might attempt to access the slots of a retract instance. */
if (type == OBJECT_RETRACT)
{
if (prvRetract == NULL)
{
newMatch->nxt = ObjectReteData(theEnv)->ObjectMatchActionQueue;
ObjectReteData(theEnv)->ObjectMatchActionQueue = newMatch;
}
else
{
newMatch->nxt = prvRetract->nxt;
prvRetract->nxt = newMatch;
}
}
else
/* DR0873 End */
if (prv == NULL)
ObjectReteData(theEnv)->ObjectMatchActionQueue = newMatch;
else
prv->nxt = newMatch;
}
/****************************************************
NAME : QueueModifySlotMap
DESCRIPTION : Sets the bitmap for a queued
object modify Rete network action
INPUTS : 1) The old bitmap (can be NULL)
2) The canonical slot id to set
RETURNS : The (new) bitmap
SIDE EFFECTS : Bitmap allocated/reallocated if
necessary, and slot id bit set
NOTES : If the bitmap must be (re)allocated,
this routine allocates twice the
room necessary for the current id
to allow for growth.
****************************************************/
static SLOT_BITMAP *QueueModifySlotMap(
void *theEnv,
SLOT_BITMAP *oldMap,
int slotNameID)
{
SLOT_BITMAP *newMap;
unsigned short newmaxid;
unsigned oldsz,newsz;
if ((oldMap == NULL) ? TRUE : (slotNameID > oldMap->maxid))
{
newmaxid = (unsigned short) (slotNameID * 2);
newsz = sizeof(SLOT_BITMAP) +
(sizeof(char) * (newmaxid / BITS_PER_BYTE));
newMap = (SLOT_BITMAP *) gm2(theEnv,newsz);
ClearBitString((void *) newMap,newsz);
if (oldMap != NULL)
{
oldsz = SlotBitMapSize(oldMap);
GenCopyMemory(char,oldsz,newMap,oldMap);
rm(theEnv,(void *) oldMap,oldsz);
}
newMap->maxid = newmaxid;
}
else
newMap = oldMap;
SetBitMap(newMap->map,slotNameID);
return(newMap);
}
/***************************************************
NAME : ReturnObjectMatchAction
DESCRIPTION : Deallocates and object match action
structure and associated slot
bitmap (if any)
INPUTS : The queued match action item
RETURNS : Nothing useful
SIDE EFFECTS : Object match action item deleted
NOTES : None
***************************************************/
static void ReturnObjectMatchAction(
void *theEnv,
OBJECT_MATCH_ACTION *omaPtr)
{
if (omaPtr->slotNameIDs != NULL)
rm(theEnv,(void *) omaPtr->slotNameIDs,SlotBitMapSize(omaPtr->slotNameIDs));
rtn_struct(theEnv,objectMatchAction,omaPtr);
}
/***************************************************
NAME : ProcessObjectMatchQueue
DESCRIPTION : Processes all outstanding object
Rete network update events
INPUTS : None
RETURNS : Nothing useful
SIDE EFFECTS : Pattern-matching on objects
NOTES : None
***************************************************/
static void ProcessObjectMatchQueue(
void *theEnv)
{
OBJECT_MATCH_ACTION *cur;
while ((ObjectReteData(theEnv)->ObjectMatchActionQueue != NULL) &&
(ObjectReteData(theEnv)->DelayObjectPatternMatching == FALSE))
{
cur = ObjectReteData(theEnv)->ObjectMatchActionQueue;
ObjectReteData(theEnv)->ObjectMatchActionQueue = cur->nxt;
switch(cur->type)
{
case OBJECT_ASSERT :
ObjectAssertAction(theEnv,cur->ins);
break;
case OBJECT_RETRACT :
ObjectRetractAction(theEnv,cur->ins,cur->slotNameIDs);
break;
default :
ObjectModifyAction(theEnv,cur->ins,cur->slotNameIDs);
}
cur->ins->busy--;
ReturnObjectMatchAction(theEnv,cur);
}
}
/******************************************************
NAME : MarkObjectPatternNetwork
DESCRIPTION : Iterates through all terminal
pattern nodes checking class and
slot bitmaps. If a pattern is
applicable to the object/slot change,
then all the nodes belonging to
the pattern are marked as needing
to be examined by the pattern matcher.
INPUTS : The bitmap of ids of the slots being
changed (NULL if this is an assert for the
for the entire object)
RETURNS : Nothing useful
SIDE EFFECTS : Applicable pattern nodes marked
NOTES : Incremental reset status is also
checked here
******************************************************/
static void MarkObjectPatternNetwork(
void *theEnv,
SLOT_BITMAP *slotNameIDs)
{
OBJECT_ALPHA_NODE *alphaPtr;
OBJECT_PATTERN_NODE *upper;
CLASS_BITMAP *clsset;
unsigned id;
ResetObjectMatchTimeTags(theEnv);
ObjectReteData(theEnv)->CurrentObjectMatchTimeTag++;
alphaPtr = ObjectNetworkTerminalPointer(theEnv);
id = ObjectReteData(theEnv)->CurrentPatternObject->cls->id;
while (alphaPtr != NULL)
{
/* =============================================================
If an incremental reset is in progress, make sure that the
pattern has been marked for initialization before proceeding.
============================================================= */
#if (! RUN_TIME) && (! BLOAD_ONLY)
if (EngineData(theEnv)->IncrementalResetInProgress &&
(alphaPtr->header.initialize == FALSE))
{
alphaPtr = alphaPtr->nxtTerminal;
continue;
}
#endif
/* ============================================
Check the class bitmap to see if the pattern
pattern is applicable to the object at all
============================================ */
clsset = (CLASS_BITMAP *) ValueToBitMap(alphaPtr->classbmp);
if ((id > (unsigned) clsset->maxid) ? FALSE : TestBitMap(clsset->map,id))
{
/* ===================================================
If we are doing an assert, then we need to
check all patterns which satsify the class bitmap
(The retraction has already been done in this case)
=================================================== */
if (slotNameIDs == NULL)
{
alphaPtr->matchTimeTag = ObjectReteData(theEnv)->CurrentObjectMatchTimeTag;
for (upper = alphaPtr->patternNode ; upper != NULL ; upper = upper->lastLevel)
{
if (upper->matchTimeTag == ObjectReteData(theEnv)->CurrentObjectMatchTimeTag)
break;
else
upper->matchTimeTag = ObjectReteData(theEnv)->CurrentObjectMatchTimeTag;
}
}
/* ===================================================
If we are doing a slot modify, then we need to
check only the subset of patterns which satisfy the
class bitmap AND actually match on the slot in
question.
=================================================== */
else if (alphaPtr->slotbmp != NULL)
{
if (CompareSlotBitMaps(slotNameIDs,
(SLOT_BITMAP *) ValueToBitMap(alphaPtr->slotbmp)))
{
alphaPtr->matchTimeTag = ObjectReteData(theEnv)->CurrentObjectMatchTimeTag;
for (upper = alphaPtr->patternNode ; upper != NULL ; upper = upper->lastLevel)
{
if (upper->matchTimeTag == ObjectReteData(theEnv)->CurrentObjectMatchTimeTag)
break;
else
upper->matchTimeTag = ObjectReteData(theEnv)->CurrentObjectMatchTimeTag;
}
}
}
}
alphaPtr = alphaPtr->nxtTerminal;
}
}
/***************************************************
NAME : CompareSlotBitMaps
DESCRIPTION : Compares two slot bitmaps by
bitwising and'ing byte per byte up
to the length of the smaller map.
INPUTS : The two slot bitmaps
RETURNS : TRUE if any common bits
are set in both maps, FALSE
otherwise
SIDE EFFECTS : None
NOTES : None
***************************************************/
static intBool CompareSlotBitMaps(
SLOT_BITMAP *smap1,
SLOT_BITMAP *smap2)
{
unsigned short i,maxByte;
maxByte = (unsigned short)
(((smap1->maxid < smap2->maxid) ?
smap1->maxid : smap2->maxid) / BITS_PER_BYTE);
for (i = 0 ; i <= maxByte ; i++)
if (smap1->map[i] & smap2->map[i])
return(TRUE);
return(FALSE);
}
/**********************************************************************************
NAME : ObjectPatternMatch
DESCRIPTION : Iterates through all the pattern nodes on one level
in the pattern network. A node is only processed
if it can lead to a terminating class bitmap node
which applies to the object being matched. This
allows for a significant reduction in the number of
patterns considered.
INPUTS : 1) The offset of the slot position from the pattern index
2) The pattern node being examined
3) The end of the list of multifield markers for the pattern
RETURNS : Nothing useful
SIDE EFFECTS : The pattern tests are evaluated and the child nodes may
be processed (which may cause a whole series of Rete network
updates).
NOTES : Several globals are used to keep track of the current
slot being examined:
CurrentPatternMarks - the series of multifield markers
CurrentPatternObject - the object being pattern-matched
CurrentPatternObjectSlot - the current slot being examined
CurrentObjectSlotLength - the cardinality of the slot value
An optimization is performed when evaluating
constant tests on a slot value field. All
pattern nodes on a level which restrict the same slot
are grouped together. Those which are constant
tests are placed at the far right. Thus, as soon
as one of these constant tests succeeds, the remaining
nodes for that slot on this level can be skipped
**********************************************************************************/
static void ObjectPatternMatch(
void *theEnv,
int offset,
OBJECT_PATTERN_NODE *patternTop,
struct multifieldMarker *endMark)
{
register unsigned saveSlotLength;
register INSTANCE_SLOT *saveSlot;
OBJECT_PATTERN_NODE *blockedNode;
while (patternTop != NULL)
{
/* ===========================================================
MarkObjectPatternNetwork() has already marked pattern nodes
which need processing according to the class bitmaps,
slot updates and incremental reset status
=========================================================== */
if (patternTop->matchTimeTag == ObjectReteData(theEnv)->CurrentObjectMatchTimeTag)
{
/* ========================================
Make sure we are examining the correct
slot of the object for this pattern node
======================================== */
if ((patternTop->slotNameID == ISA_ID) ||
(patternTop->slotNameID == NAME_ID))
{
ObjectReteData(theEnv)->CurrentPatternObjectSlot = NULL;
ObjectReteData(theEnv)->CurrentObjectSlotLength = 1;
offset = 0;
}
else if ((ObjectReteData(theEnv)->CurrentPatternObjectSlot == NULL) ? TRUE :
(ObjectReteData(theEnv)->CurrentPatternObjectSlot->desc->slotName->id != patternTop->slotNameID))
{
/* ====================================================
Need to reset the indices for the multifield
markers now that we have moved onto a different slot
==================================================== */
ObjectReteData(theEnv)->CurrentPatternObjectSlot =
ObjectReteData(theEnv)->CurrentPatternObject->slotAddresses[ObjectReteData(theEnv)->CurrentPatternObject->cls->slotNameMap
[patternTop->slotNameID] - 1];
offset = 0;
if (ObjectReteData(theEnv)->CurrentPatternObjectSlot->desc->multiple)
ObjectReteData(theEnv)->CurrentObjectSlotLength =
GetInstanceSlotLength(ObjectReteData(theEnv)->CurrentPatternObjectSlot);
else
ObjectReteData(theEnv)->CurrentObjectSlotLength = 1;
}
/* ========================================================
Process the pattern node. If it is satisfied by the
the instance, ProcessPatternNode() will recursively pass
all of its children nodes through ObjectPatternMatch()
======================================================== */
saveSlotLength = ObjectReteData(theEnv)->CurrentObjectSlotLength;
saveSlot = ObjectReteData(theEnv)->CurrentPatternObjectSlot;
ProcessPatternNode(theEnv,offset,patternTop,endMark);
ObjectReteData(theEnv)->CurrentObjectSlotLength = saveSlotLength;
ObjectReteData(theEnv)->CurrentPatternObjectSlot = saveSlot;
}
/* ==============================================================
Move on to the siblings of this node - if the current node was
a constant test that succeeded, skip further sibling nodes
(which test on the same field in the pattern)
which match on the same slot since they are all constant tests
as well and will, of course fail.
============================================================== */
if (patternTop->blocked == TRUE)
{
patternTop->blocked = FALSE;
blockedNode = patternTop;
patternTop = patternTop->rightNode;
while (patternTop != NULL)
{
if ((patternTop->slotNameID != blockedNode->slotNameID) ||
(patternTop->whichField != blockedNode->whichField))
break;
patternTop = patternTop->rightNode;
}
}
else
patternTop = patternTop->rightNode;
}
}
/**********************************************************************************
NAME : ProcessPatternNode
DESCRIPTION : Determines if a pattern node satsifies the corresponding
slot value field(s) in an object. If it does,
ObjectPatternMatch() is recursively called to process
the child nodes of this node. In this mutual recursion
between ObjectPatternMatch() and ProcessPatternNode(),
the nodes of all applicable patterns are processed
to completion. ObjectPatternMatch() enters an object
into a pattern's aplha memory when the traversal reaches
a terminal class bitmap node.
INPUTS : 1) The offset of the slot index from the pattern index
2) The pattern node being examined
3) The end of the list of multifield markers for the pattern
RETURNS : Nothing useful
SIDE EFFECTS : The pattern tests are evaluated and the child nodes may
be processed (which may cause a whole series of Rete network
updates).
NOTES : Several globals are used to keep track of the current
slot being examined:
CurrentPatternMarks - the series of multifield markers
CurrentPatternObject - the object being pattern-matched
CurrentPatternObjectSlot - the current slot being examined
CurrentObjectSlotLength - the cardinality of the slot value
**********************************************************************************/
static void ProcessPatternNode(
void *theEnv,
int offset,
OBJECT_PATTERN_NODE *patternNode,
struct multifieldMarker *endMark)
{
int patternSlotField,objectSlotField;
unsigned objectSlotLength;
int repeatCount;
INSTANCE_SLOT *objectSlot;
struct multifieldMarker *newMark;
patternSlotField = patternNode->whichField;
objectSlotField = patternSlotField + offset;
/* ==========================================
If this is a test on the class or the name
of the object, process it separately.
========================================== */
if (ObjectReteData(theEnv)->CurrentPatternObjectSlot == NULL)
{
if ((patternNode->networkTest == NULL) ? TRUE :
(EvaluateObjectPatternTest(theEnv,objectSlotField,NULL,
(EXPRESSION *) patternNode->networkTest,patternNode)))
{
if (patternNode->alphaNode != NULL)
CreateObjectAlphaMatch(theEnv,patternNode->alphaNode);
ObjectPatternMatch(theEnv,offset,patternNode->nextLevel,endMark);
}
return;
}
/* ================================
Check a single-field restriction
================================ */
if (patternNode->multifieldNode == 0)
{
if ((patternNode->networkTest == NULL) ? TRUE :
EvaluateObjectPatternTest(theEnv,objectSlotField,NULL,
(EXPRESSION *) patternNode->networkTest,patternNode))
{
if (patternNode->alphaNode != NULL)
CreateObjectAlphaMatch(theEnv,patternNode->alphaNode);
ObjectPatternMatch(theEnv,offset,patternNode->nextLevel,endMark);
}
return;
}
/* ==================================================================
Check a multifield restriction. Add a marker for this field which
has indices indicating to which values in the object slot the
multifield pattern node is bound
================================================================== */
newMark = get_struct(theEnv,multifieldMarker);
newMark->whichField = patternSlotField;
newMark->where.whichSlot = (void *) ObjectReteData(theEnv)->CurrentPatternObjectSlot->desc->slotName->name;
newMark->startPosition = objectSlotField;
newMark->next = NULL;
if (ObjectReteData(theEnv)->CurrentPatternObjectMarks == NULL)
ObjectReteData(theEnv)->CurrentPatternObjectMarks = newMark;
else
endMark->next = newMark;
/* ==========================================================
If there are further pattern restrictions on this slot,
try pattern-matching for all possible bound values of the
multifield pattern node: from no values to all values from
the starting position of the multifield to the end of the
object slot. Otherwise, bind the multifield to all the
remaining fields in the slot value and continue with
pattern-matching
========================================================== */
if (patternNode->endSlot == FALSE)
{
objectSlotLength = ObjectReteData(theEnv)->CurrentObjectSlotLength;
objectSlot = ObjectReteData(theEnv)->CurrentPatternObjectSlot;
newMark->endPosition = newMark->startPosition - 1;
repeatCount = (int) (objectSlotLength - newMark->startPosition
- patternNode->leaveFields + 2);
while (repeatCount > 0)
{
if ((patternNode->networkTest == NULL) ? TRUE :
EvaluateObjectPatternTest(theEnv,objectSlotField,newMark,
(EXPRESSION *) patternNode->networkTest,patternNode))
{
if (patternNode->alphaNode != NULL)
CreateObjectAlphaMatch(theEnv,patternNode->alphaNode);
ObjectPatternMatch(theEnv,(int) (offset + (newMark->endPosition - objectSlotField)),
patternNode->nextLevel,newMark);
ObjectReteData(theEnv)->CurrentObjectSlotLength = objectSlotLength;
ObjectReteData(theEnv)->CurrentPatternObjectSlot = objectSlot;
}
newMark->endPosition++;
repeatCount--;
}
}
else
{
newMark->endPosition = (long) ObjectReteData(theEnv)->CurrentObjectSlotLength;
if ((patternNode->networkTest == NULL) ? TRUE :
EvaluateObjectPatternTest(theEnv,objectSlotField,newMark,
(EXPRESSION *) patternNode->networkTest,patternNode))
{
if (patternNode->alphaNode != NULL)
CreateObjectAlphaMatch(theEnv,patternNode->alphaNode);
ObjectPatternMatch(theEnv,0,patternNode->nextLevel,newMark);
}
}
/* ======================================
Delete the temporary multifield marker
====================================== */
if (ObjectReteData(theEnv)->CurrentPatternObjectMarks == newMark)
ObjectReteData(theEnv)->CurrentPatternObjectMarks = NULL;
else
endMark->next = NULL;
rtn_struct(theEnv,multifieldMarker,newMark);
}
/***************************************************
NAME : CreateObjectAlphaMatch
DESCRIPTION : Places an instance in the alpha
memory of a pattern and drives the
partial match through the join
network
INPUTS : The alpha memory node
RETURNS : Nothing useful
SIDE EFFECTS : Join network updated
NOTES : None
***************************************************/
static void CreateObjectAlphaMatch(
void *theEnv,
OBJECT_ALPHA_NODE *alphaPtr)
{
struct joinNode *listOfJoins;
struct partialMatch *theMatch;
struct patternMatch *newMatch;
while (alphaPtr != NULL)
{
if (alphaPtr->matchTimeTag == ObjectReteData(theEnv)->CurrentObjectMatchTimeTag)
{
/* ===================================================
If we have reached the class bitmap of the pattern,
place the object in the alpha memory of each of
the terminal nodes underneath and drive
the partial matches through the join network.
Insert the instance into the alpha memory
of this pattern and mark it as busy
=================================================== */
ObjectReteData(theEnv)->CurrentPatternObject->busy++;
theMatch = CreateAlphaMatch(theEnv,(void *) ObjectReteData(theEnv)->CurrentPatternObject,
ObjectReteData(theEnv)->CurrentPatternObjectMarks,
(struct patternNodeHeader *) alphaPtr);
/* ======================================
Attach the partial match to the object
to ease later retraction
====================================== */
newMatch = get_struct(theEnv,patternMatch);
newMatch->next = (struct patternMatch *) ObjectReteData(theEnv)->CurrentPatternObject->partialMatchList;
newMatch->matchingPattern = (struct patternNodeHeader *) alphaPtr;
newMatch->theMatch = theMatch;
ObjectReteData(theEnv)->CurrentPatternObject->partialMatchList = (void *) newMatch;
/* ================================================
Drive the partial match through the join network
================================================ */
listOfJoins = alphaPtr->header.entryJoin;
while (listOfJoins != NULL)
{
NetworkAssert(theEnv,theMatch,listOfJoins,RHS);
listOfJoins = listOfJoins->rightMatchNode;
}
}
alphaPtr = alphaPtr->nxtInGroup;
}
}
/******************************************************
NAME : EvaluateObjectPatternTest
DESCRIPTION : Evaluates the pattern network test
expression for a node
INPUTS : 1) The actual index of the slot value
field currently being examined
2) The multifield marker (if any)
for the pattern node being exmained
3) The pattern network test expression
4) The pattern node being examined
RETURNS : TRUE if the node passes the
test, FALSE otherwise
SIDE EFFECTS : Evaluation of the test
EvaluationError and HaltExecution
are always set to FALSE
NOTES : Assumes networkTest != NULL
******************************************************/
static intBool EvaluateObjectPatternTest(
void *theEnv,
int objectSlotField,
struct multifieldMarker *selfSlotMarker,
EXPRESSION *networkTest,
OBJECT_PATTERN_NODE *patternNode)
{
DATA_OBJECT vresult;
int rv;
if (networkTest->type == OBJ_PN_CONSTANT)
{
struct expr *oldArgument;
oldArgument = EvaluationData(theEnv)->CurrentExpression;
EvaluationData(theEnv)->CurrentExpression = networkTest;
rv = ObjectCmpConstantFunction(theEnv,networkTest->value,&vresult);
EvaluationData(theEnv)->CurrentExpression = oldArgument;
if (rv)
{
if (((struct ObjectCmpPNConstant *)
ValueToBitMap(networkTest->value))->pass)
patternNode->blocked = TRUE;
return(TRUE);
}
return(FALSE);
}
/* =========================================================
Evaluate or expressions expressed in the format:
(or <expression 1> <expression 2> ... <expression n>)
Returns TRUE (1.0) if any of the expression are TRUE,
otherwise returns false (0.0).
========================================================= */
if (networkTest->value == ExpressionData(theEnv)->PTR_OR)
{
networkTest = networkTest->argList;
while (networkTest != NULL)
{
if (EvaluateObjectPatternTest(theEnv,objectSlotField,selfSlotMarker,networkTest,patternNode))
{
/* ============================================
A node can be blocked ONLY if there were one
positive constant test on that node
============================================ */
patternNode->blocked = FALSE;
return(TRUE);
}
patternNode->blocked = FALSE;
networkTest = networkTest->nextArg;
}
return(FALSE);
}
/* ==========================================================
Evaluate and expressions expressed in the format:
(and <expression 1> <expression 2> ... <expression n>)
Returns false (0.0) if any of the expression are false,
otherwise returns TRUE (1.0).
========================================================== */
else if (networkTest->value == ExpressionData(theEnv)->PTR_AND)
{
networkTest = networkTest->argList;
while (networkTest != NULL)
{
if (EvaluateObjectPatternTest(theEnv,objectSlotField,selfSlotMarker,networkTest,patternNode)
== FALSE)
{
patternNode->blocked = FALSE;
return(FALSE);
}
patternNode->blocked = FALSE;
networkTest = networkTest->nextArg;
}
return(TRUE);
}
/* =======================================================
Evaluate all other expressions using EvaluateExpression
======================================================= */
else
{
EvaluationData(theEnv)->HaltExecution = FALSE;
if (EvaluateExpression(theEnv,networkTest,&vresult))
{
ObjectPatternNetErrorMessage(theEnv,patternNode);
EvaluationData(theEnv)->EvaluationError = FALSE;
EvaluationData(theEnv)->HaltExecution = FALSE;
return(FALSE);
}
if ((vresult.value != EnvFalseSymbol(theEnv)) || (vresult.type != SYMBOL))
return(TRUE);
}
return(FALSE);
}
/***************************************************
NAME : ObjectAssertAction
DESCRIPTION : Filters an instance through the
object pattern network
INPUTS : The instance
RETURNS : Nothing useful
SIDE EFFECTS : Instance matched
NOTES : None
***************************************************/
static void ObjectAssertAction(
void *theEnv,
INSTANCE_TYPE *ins)
{
ins->header.timeTag = ObjectReteData(theEnv)->UseEntityTimeTag;
ObjectReteData(theEnv)->CurrentPatternObject = ins;
ObjectReteData(theEnv)->CurrentPatternObjectSlot = NULL;
MarkObjectPatternNetwork(theEnv,NULL);
ObjectPatternMatch(theEnv,0,ObjectNetworkPointer(theEnv),NULL);
ins->reteSynchronized = TRUE;
}
/**********************************************************************
NAME : ObjectModifyAction
DESCRIPTION : Removes an instance from patterns (and attached joins)
applicable to specified slot(s), and then filters
same instance through object pattern network
(only against patterns which explicitly match on
named slot(s))
INPUTS : 1) The instance
2) The bitmap of slot ids
RETURNS : Nothing useful
SIDE EFFECTS : Instance retracted/asserted
NOTES : None
**********************************************************************/
static void ObjectModifyAction(
void *theEnv,
INSTANCE_TYPE *ins,
SLOT_BITMAP *slotNameIDs)
{
ins->header.timeTag = ObjectReteData(theEnv)->UseEntityTimeTag;
ObjectRetractAction(theEnv,ins,slotNameIDs);
ObjectReteData(theEnv)->CurrentPatternObject = ins;
ObjectReteData(theEnv)->CurrentPatternObjectSlot = NULL;
MarkObjectPatternNetwork(theEnv,slotNameIDs);
ObjectPatternMatch(theEnv,0,ObjectNetworkPointer(theEnv),NULL);
ins->reteSynchronized = TRUE;
}
/****************************************************
NAME : ObjectRetractAction
DESCRIPTION : Retracts the instance from the
applicable patterns for the object
(if the slotNameID != -1, then the
instance is only retracted from
the alpha memories of the patterns
which actually match on that slot)
INPUTS : 1) The instance
2) The slot bitmap for a modify
(NULL if the instance is actually
being removed)
RETURNS : Nothing useful
SIDE EFFECTS : Retractions performed
NOTES : None
****************************************************/
static void ObjectRetractAction(
void *theEnv,
INSTANCE_TYPE *ins,
SLOT_BITMAP *slotNameIDs)
{
struct patternMatch *prvMatch,*tmpMatch,
*deleteMatch,*lastDeleteMatch;
OBJECT_ALPHA_NODE *alphaPtr;
void *saveDependents;
if (slotNameIDs == NULL)
{
if (ins->partialMatchList != NULL)
{
tmpMatch = (struct patternMatch *) ins->partialMatchList;
while (tmpMatch != NULL)
{
ins->busy--;
tmpMatch = tmpMatch->next;
}
NetworkRetract(theEnv,(struct patternMatch *) ins->partialMatchList);
ins->partialMatchList = NULL;
}
}
else
{
deleteMatch = NULL;
lastDeleteMatch = NULL;
prvMatch = NULL;
tmpMatch = (struct patternMatch *) ins->partialMatchList;
while (tmpMatch != NULL)
{
alphaPtr = (OBJECT_ALPHA_NODE *) tmpMatch->matchingPattern;
if (alphaPtr->slotbmp != NULL)
{
if (CompareSlotBitMaps(slotNameIDs,
(SLOT_BITMAP *) ValueToBitMap(alphaPtr->slotbmp)))
{
ins->busy--;
if (prvMatch == NULL)
ins->partialMatchList = (void *) tmpMatch->next;
else
prvMatch->next = tmpMatch->next;
if (!deleteMatch)
deleteMatch = tmpMatch;
else
lastDeleteMatch->next = tmpMatch;
lastDeleteMatch = tmpMatch;
tmpMatch = tmpMatch->next;
lastDeleteMatch->next = NULL;
}
else
{
prvMatch = tmpMatch;
tmpMatch = tmpMatch->next;
}
}
else
{
prvMatch = tmpMatch;
tmpMatch = tmpMatch->next;
}
}
/* =============================================
We need to preserve any logical dependencies
of this object and reattach them after doing
the retract. Otherwise, the Rete network
will believe the object is gone and remove
the links from the partial matches upon which
this object is logically dependent.
============================================= */
if (deleteMatch != NULL)
{
saveDependents = ins->header.dependents;
ins->header.dependents = NULL;
NetworkRetract(theEnv,deleteMatch);
ins->header.dependents = saveDependents;
}
}
ins->reteSynchronized = TRUE;
}
/*****************************************************
NAME : ObjectPatternNetErrorMessage
DESCRIPTION : Prints out a locational error message
when an evaluation error occurs
during object pattern-matching
INPUTS : The pattern node
RETURNS : Nothing useful
SIDE EFFECTS : Error message displayed
NOTES : None
*****************************************************/
static void ObjectPatternNetErrorMessage(
void *theEnv,
OBJECT_PATTERN_NODE *patternPtr)
{
PrintErrorID(theEnv,"OBJRTMCH",1,TRUE);
EnvPrintRouter(theEnv,WERROR,"This error occurred in the object pattern network\n");
EnvPrintRouter(theEnv,WERROR," Currently active instance: [");
EnvPrintRouter(theEnv,WERROR,ValueToString(ObjectReteData(theEnv)->CurrentPatternObject->name));
EnvPrintRouter(theEnv,WERROR,"]\n");
EnvPrintRouter(theEnv,WERROR," Problem resides in slot ");
EnvPrintRouter(theEnv,WERROR,ValueToString(FindIDSlotName(theEnv,patternPtr->slotNameID)));
EnvPrintRouter(theEnv,WERROR," field #");
PrintLongInteger(theEnv,WERROR,(long) patternPtr->whichField);
EnvPrintRouter(theEnv,WERROR,"\n");
TraceErrorToObjectPattern(theEnv,TRUE,patternPtr);
EnvPrintRouter(theEnv,WERROR,"\n");
}
/*********************************************************
NAME : TraceErrorToObjectPattern
DESCRIPTION : Used by ObjectPatternNetErrorMessage() to
print the rule(s) which contain an object
pattern.
INPUTS : 1) A flag indicating if this is the
node in which the error actually
occurred or not
2) The pattern node
RETURNS : Nothing useful
SIDE EFFECTS : Error message displayed
NOTES : None
*********************************************************/
static void TraceErrorToObjectPattern(
void *theEnv,
int errorNode,
OBJECT_PATTERN_NODE *patternPtr)
{
struct joinNode *joinPtr;
while (patternPtr != NULL)
{
if (patternPtr->alphaNode != NULL)
{
joinPtr = patternPtr->alphaNode->header.entryJoin;
while (joinPtr != NULL)
{
EnvPrintRouter(theEnv,WERROR," Of pattern #");
PrintLongInteger(theEnv,WERROR,(long) joinPtr->depth);
EnvPrintRouter(theEnv,WERROR," in rule(s):\n");
TraceErrorToRule(theEnv,joinPtr," ");
joinPtr = joinPtr->rightMatchNode;
}
}
TraceErrorToObjectPattern(theEnv,FALSE,patternPtr->nextLevel);
if (errorNode)
break;
patternPtr = patternPtr->rightNode;
}
}
#endif
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/clips/devel/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- .cvsignore 2 Feb 2007 19:04:04 -0000 1.4
+++ .cvsignore 3 Mar 2009 16:43:44 -0000 1.5
@@ -1,14 +1,12 @@
-3CCP.pdf
-AllExamples.tar.Z
abstract.pdf
+clips_core_source_624.tar.Z
+x_windows_ide_source_624.tar.Z
+examples_624.tar.Z
apg.pdf
arch5-1.pdf
bpg.pdf
-clipssrc.tar.Z
ig.pdf
-usrguide.pdf
-x-prjct.tar.Z
-FunctionContext.zip
-objrtmch.c
-DR0873.txt
-clips-6.24-linux.patch.bz2
+ug.pdf
+3CCP.pdf
+clips-doc-html.tar.bz2
+clips-6.24-linux.patch
Index: clips.spec
===================================================================
RCS file: /cvs/pkgs/rpms/clips/devel/clips.spec,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- clips.spec 24 Feb 2009 07:51:15 -0000 1.11
+++ clips.spec 3 Mar 2009 16:43:44 -0000 1.12
@@ -1,33 +1,48 @@
Summary: CLIPS language for developing expert systems
Name: clips
Version: 6.24
-Release: 26%{?dist}
-Url: http://www.ghg.net/clips/download/source/
+Release: 27%{?dist}
+Url: http://clipsrules.sourceforge.net
License: GPLv2
Group: Development/Tools
-Source0: http://www.ghg.net/clips/download/source/clipssrc.tar.Z
-Source1: http://www.ghg.net/clips/download/source/x-prjct.tar.Z
-Source2: http://www.ghg.net/clips/download/executables/examples/AllExamples.tar.Z
-Source3: http://www.ghg.net/clips/download/documentation/abstract.pdf
-Source4: http://www.ghg.net/clips/download/documentation/apg.pdf
-Source5: http://www.ghg.net/clips/download/documentation/arch5-1.pdf
-Source6: http://www.ghg.net/clips/download/documentation/bpg.pdf
-Source7: http://www.ghg.net/clips/download/documentation/ig.pdf
-Source8: http://www.ghg.net/clips/download/documentation/usrguide.pdf
-Source9: http://www.ghg.net/clips/download/documentation/3CCP.pdf
+Source0: http://downloads.sourceforge.net/clipsrules/clips_core_source_624.tar.Z
+Source1: http://downloads.sourceforge.net/clipsrules/x_windows_ide_source_624.tar.Z
+Source2: http://downloads.sourceforge.net/clipsrules/examples_624.tar.Z
+Source3: abstract.pdf
+Source4: http://clipsrules.sourceforge.net/documentation/v624/apg.pdf
+Source5: http://clipsrules.sourceforge.net/documentation/other/arch5-1.pdf
+Source6: http://clipsrules.sourceforge.net/documentation/v624/bpg.pdf
+Source7: http://clipsrules.sourceforge.net/documentation/v624/ig.pdf
+Source8: http://clipsrules.sourceforge.net/documentation/v624/ug.pdf
+Source9: http://clipsrules.sourceforge.net/documentation/other/3CCP.pdf
Source10: xclips.png
Source11: clips-init.el
Source12: clips-mode.el
Source13: inf-clips.el
-Source14: http://www.ghg.net/clips/download/other/Bug_Fixes/objrtmch.c
-Source15: http://www.ghg.net/clips/download/other/FunctionContext.zip
-Source16: http://www.ghg.net/clips/download/other/Bug_Fixes/DR0873.txt
+Source14: objrtmch.c
+Source15: FunctionContext.zip
+Source16: DR0873.txt
Source17: xclips.desktop
+# The following source was generated with the following commands:
+# mkdir html
+# cd html
+# for i in apg.htm bpg.htm ig.htm ug.htm; do
+# wget -p -nH --cut-dirs=2 --convert-links http://clipsrules.sourceforge.net/documentation/v624/$i
+# dos2unix $i
+# done
+# cd ..
+# tar -cjf clips-doc-html.tar.bz2 html
+Source18: clips-doc-html.tar.bz2
Patch0: clips-6.24-linux.patch
Patch1: clips-6.24-time-sysdep.c.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: ncurses-devel libXt-devel libXext-devel libXmu-devel libXaw-devel xorg-x11-server-Xorg xorg-x11-proto-devel xorg-x11-xbitmaps desktop-file-utils
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: ncurses-devel
+BuildRequires: libXt-devel libXext-devel libXmu-devel libXaw-devel
+BuildRequires: xorg-x11-server-Xorg xorg-x11-proto-devel xorg-x11-xbitmaps
+BuildRequires: desktop-file-utils
BuildRequires: automake autoconf libtool
+BuildRequires: pkgconfig
+BuildRequires: ImageMagick
%description
CLIPS is a productive development and delivery expert system tool which
@@ -46,7 +61,7 @@
This package contains the run-time libraries needed for CLIPS applications.
%package devel
-Summary: Headers for developing programs that will embed CLIPS
+Summary: C headers for developing programs that will embed CLIPS
Group: Development/Libraries
Requires: clips-libs = %{version}-%{release}
Requires: ncurses-devel pkgconfig
@@ -58,6 +73,8 @@
%package xclips
Summary: X interface to CLIPS
Group: Development/Tools
+Requires: %{name} = %{version}-%{release}
+Requires: hicolor-icon-theme
%description xclips
X interface to CLIPS.
@@ -73,15 +90,15 @@
The following are some of the documents in this package:
- Proceedings of the Third Conference on CLIPS, 1994 (3CCP.pdf)
- Application abstracts (abstract.pdf)
-- CLIPS Reference Manual, Volume II, Advanced Programming Guide (apg.pdf)
+- CLIPS Reference Manual, Volume I, Basic Programming Guide (bpg.pdf,bpg.htm)
+- CLIPS Reference Manual, Volume II, Adv. Programming Guide (apg.pdf, apg.htm)
+- CLIPS Reference Manual, Volume III, Interfaces Guide (ig.pdf,ig.htm)
- CLIPS Architecture Manual (arch5-1.pdf)
-- CLIPS Reference Manual, Volume I, Basic Programming Guide (bpg.pdf)
-- CLIPS Reference Manual, Volume III, Interfaces Guide (ig.pdf)
-- CLIPS Users Guide (usrguide.pdf)
+- CLIPS Users Guide (ug.pdf,ug.htm)
%prep
-%setup -q -a 1 -a 2 -a 15 -c
+%setup -q -a 1 -a 2 -a 15 -a 18 -c
mv x-prjct/xinterface clipssrc/
mv x-prjct/color clipssrc/
mv clipssrc/clipssrc clipssrc/clips
@@ -110,18 +127,27 @@
%{__make} %{?_smp_mflags}
%install
-%{__rm} -rf %{buildroot}
-%{__install} -D %{SOURCE10} %{buildroot}%{_datadir}/pixmaps/xclips.png
-%{__install} -m 644 -D %{SOURCE11} %{buildroot}%{_datadir}/emacs/site-lisp/site-start.d/clips-init.el
-%{__install} -m 644 -D %{SOURCE12} %{buildroot}%{_datadir}/emacs/site-lisp/clips-mode.el
-%{__install} -m 644 -D %{SOURCE13} %{buildroot}%{_datadir}/emacs/site-lisp/inf-clips.el
cd clipssrc
+%{__rm} -rf %{buildroot}
+%{__make} install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
+find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
+%{__install} -p --mode=0644 -D %{SOURCE11} %{buildroot}%{_datadir}/emacs/site-lisp/site-start.d/clips-init.el
+%{__install} -p --mode=0644 -D %{SOURCE12} %{buildroot}%{_datadir}/emacs/site-lisp/clips-mode.el
+%{__install} -p --mode=0644 -D %{SOURCE13} %{buildroot}%{_datadir}/emacs/site-lisp/inf-clips.el
+
+# create icons
+# create 16x16, 32x32, 64x64, 128x128 icons
+for s in 16 32 64 128 ; do
+ %{__mkdir_p} %{buildroot}/%{_datadir}/icons/hicolor/${s}x${s}/apps/
+ convert -scale ${s}x${s} \
+ %{SOURCE10} \
+ %{buildroot}/%{_datadir}/icons/hicolor/${s}x${s}/apps/xclips.png
+done
+
desktop-file-install --vendor fedora \
--dir %{buildroot}%{_datadir}/applications \
--add-category X-Fedora \
%{SOURCE17}
-%{__make} install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
-find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
%clean
%{__rm} -rf %{buildroot}
@@ -130,6 +156,19 @@
%postun libs -p /sbin/ldconfig
+%post xclips
+touch --no-create %{_datadir}/icons/hicolor
+if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
+ %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+fi
+
+%postun xclips
+touch --no-create %{_datadir}/icons/hicolor
+if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
+ %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+fi
+
+
%files
%defattr(-,root,root,-)
%{_bindir}/clips
@@ -156,17 +195,31 @@
%defattr(-,root,root,-)
%{_bindir}/xclips
%{_bindir}/xclips-color
-%{_datadir}/pixmaps/xclips.png
+%{_datadir}/icons/hicolor/*x*/apps/xclips.png
%{_datadir}/applications/*xclips.desktop
%files doc
%defattr(-,root,root,-)
%doc Examples/
-%doc abstract.pdf arch5-1.pdf bpg.pdf usrguide.pdf 3CCP.pdf
+%doc abstract.pdf arch5-1.pdf bpg.pdf ug.pdf 3CCP.pdf
%doc apg.pdf
%doc ig.pdf
+%doc html/
%changelog
+* Tue Mar 03 2009 Rick L Vinyard Jr <rvinyard at cs.nmsu.edu> 6.24-27
+- Updated desktop entry file to add categories and remove deprecated items
+- Added hicolor-icon-theme requires to xclips
+- Install xclips icons to hicolor directory
+- Added validation to desktop file
+- Added icon cache rebuild to pre and post sections for xclips
+- Added preserve to file installs
+- Made install modes explicit
+- Added pkgconfig and ImageMagick to build requires
+- Updated URL
+- Updated source URL's
+- Added html docs
+
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 6.24-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/clips/devel/sources,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- sources 2 Feb 2007 19:19:53 -0000 1.6
+++ sources 3 Mar 2009 16:43:44 -0000 1.7
@@ -1,14 +1,12 @@
-a6a60733af08f9e9e6d0928272ad4dd9 3CCP.pdf
-f5c02b997199f3ede779b8502af2ba09 AllExamples.tar.Z
cd3ecddc4e538b8af0e5cf08ab7fd89c abstract.pdf
+ccba9d912375e57a1b7d9eba12da4198 clips_core_source_624.tar.Z
+1bb0d0e684742188b8c14912c26f12cb x_windows_ide_source_624.tar.Z
+f5c02b997199f3ede779b8502af2ba09 examples_624.tar.Z
fae2267d96fb95603345e91c9990caaa apg.pdf
9a13d2ed18fe6ab67902d5bce29957cb arch5-1.pdf
63891971aa782dc67c2de0579647247e bpg.pdf
-ccba9d912375e57a1b7d9eba12da4198 clipssrc.tar.Z
89beca5caa08b30d8285cca7f1df1d26 ig.pdf
-44e54697a8acf3509bc4ca51d88b65bd usrguide.pdf
-1bb0d0e684742188b8c14912c26f12cb x-prjct.tar.Z
-ac0d7c465a909158ae908fe39d68478c FunctionContext.zip
-da5ad2328e4d8dd7680d8bb28005e90d objrtmch.c
-f80256270a8a93504e37644ab9bc16b4 DR0873.txt
-cbf0382ca4153adc0446b0bf5c123559 clips-6.24-linux.patch.bz2
+44e54697a8acf3509bc4ca51d88b65bd ug.pdf
+a6a60733af08f9e9e6d0928272ad4dd9 3CCP.pdf
+99f463e8a2536198da37e9dc73304322 clips-doc-html.tar.bz2
+0cb3238a5be85211658ba7ca47257bf8 clips-6.24-linux.patch
Index: xclips.desktop
===================================================================
RCS file: /cvs/pkgs/rpms/clips/devel/xclips.desktop,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- xclips.desktop 26 Aug 2007 06:16:44 -0000 1.1
+++ xclips.desktop 3 Mar 2009 16:43:44 -0000 1.2
@@ -1,10 +1,9 @@
[Desktop Entry]
-Encoding=UTF-8
Name=XCLIPS
GenericName=XCLIPS Expert System
Exec=xclips
-Icon=xclips.png
+Icon=xclips
Terminal=false
Type=Application
-Categories=Application;Development;
+Categories=Development;Building;IDE;Education;Science;ArtificialIntelligence;ComputerScience;Robotics;
Version=1.0
- Previous message (by thread): rpms/phonon/devel phonon-4.3.2-gstreamer-utf8-url.patch, NONE, 1.1 phonon-4.3.2-gstreamer-volumefader.patch, NONE, 1.1 phonon.spec, 1.29, 1.30
- Next message (by thread): rpms/gcalctool/devel .cvsignore, 1.56, 1.57 gcalctool.spec, 1.86, 1.87 sources, 1.57, 1.58
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list