Merge branch 'makefiles'
[prop.git] / docs / refman.ps
blob2493a6b66659b4a444a9afcc9bd2d258208316d9
1 %!PS-Adobe-2.0
2 %%Creator: dvipsk 5.58f Copyright 1986, 1994 Radical Eye Software
3 %%Title: refman.dvi
4 %%Pages: 74
5 %%PageOrder: Ascend
6 %%BoundingBox: 0 0 612 792
7 %%EndComments
8 %DVIPSCommandLine: dvips refman.dvi -o refman.ps
9 %DVIPSParameters: dpi=300, compressed, comments removed
10 %DVIPSSource:  TeX output 1997.04.07:1348
11 %%BeginProcSet: texc.pro
12 /TeXDict 250 dict def TeXDict begin /N{def}def /B{bind def}N /S{exch}N
13 /X{S N}B /TR{translate}N /isls false N /vsize 11 72 mul N /hsize 8.5 72
14 mul N /landplus90{false}def /@rigin{isls{[0 landplus90{1 -1}{-1 1}
15 ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale
16 isls{landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div
17 hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul
18 TR[matrix currentmatrix{dup dup round sub abs 0.00001 lt{round}if}
19 forall round exch round exch]setmatrix}N /@landscape{/isls true N}B
20 /@manualfeed{statusdict /manualfeed true put}B /@copies{/#copies X}B
21 /FMat[1 0 0 -1 0 0]N /FBB[0 0 0 0]N /nn 0 N /IE 0 N /ctr 0 N /df-tail{
22 /nn 8 dict N nn begin /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N
23 string /base X array /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N
24 end dup{/foo setfont}2 array copy cvx N load 0 nn put /ctr 0 N[}B /df{
25 /sf 1 N /fntrx FMat N df-tail}B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0]
26 N df-tail}B /E{pop nn dup definefont setfont}B /ch-width{ch-data dup
27 length 5 sub get}B /ch-height{ch-data dup length 4 sub get}B /ch-xoff{
28 128 ch-data dup length 3 sub get sub}B /ch-yoff{ch-data dup length 2 sub
29 get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B /ch-image{ch-data
30 dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0 N /rw 0 N
31 /rc 0 N /gp 0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S dup
32 /base get 2 index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx
33 0 ch-xoff ch-yoff ch-height sub ch-xoff ch-width add ch-yoff
34 setcachedevice ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff
35 .1 sub]/id ch-image N /rw ch-width 7 add 8 idiv string N /rc 0 N /gp 0 N
36 /cp 0 N{rc 0 ne{rc 1 sub /rc X rw}{G}ifelse}imagemask restore}B /G{{id
37 gp get /gp gp 1 add N dup 18 mod S 18 idiv pl S get exec}loop}B /adv{cp
38 add /cp X}B /chg{rw cp id gp 4 index getinterval putinterval dup gp add
39 /gp X adv}B /nd{/cp 0 N rw exit}B /lsh{rw cp 2 copy get dup 0 eq{pop 1}{
40 dup 255 eq{pop 254}{dup dup add 255 and S 1 and or}ifelse}ifelse put 1
41 adv}B /rsh{rw cp 2 copy get dup 0 eq{pop 128}{dup 255 eq{pop 127}{dup 2
42 idiv S 128 and or}ifelse}ifelse put 1 adv}B /clr{rw cp 2 index string
43 putinterval adv}B /set{rw cp fillstr 0 4 index getinterval putinterval
44 adv}B /fillstr 18 string 0 1 17{2 copy 255 put pop}for N /pl[{adv 1 chg}
45 {adv 1 chg nd}{1 add chg}{1 add chg nd}{adv lsh}{adv lsh nd}{adv rsh}{
46 adv rsh nd}{1 add adv}{/rc X nd}{1 add set}{1 add clr}{adv 2 chg}{adv 2
47 chg nd}{pop nd}]dup{bind pop}forall N /D{/cc X dup type /stringtype ne{]
48 }if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup
49 length 1 sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{
50 cc 1 add D}B /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin
51 0 0 moveto /V matrix currentmatrix dup 1 get dup mul exch 0 get dup mul
52 add .99 lt{/QV}{/RV}ifelse load def pop pop}N /eop{SI restore userdict
53 /eop-hook known{eop-hook}if showpage}N /@start{userdict /start-hook
54 known{start-hook}if pop /VResolution X /Resolution X 1000 div /DVImag X
55 /IE 256 array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for
56 65781.76 div /vsize X 65781.76 div /hsize X}N /p{show}N /RMat[1 0 0 -1 0
57 0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X /rulex X V}B /V
58 {}B /RV statusdict begin /product where{pop product dup length 7 ge{0 7
59 getinterval dup(Display)eq exch 0 4 getinterval(NeXT)eq or}{pop false}
60 ifelse}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale rulex ruley false
61 RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR rulex ruley scale 1 1
62 false RMat{BDot}imagemask grestore}}ifelse B /QV{gsave newpath transform
63 round exch round exch itransform moveto rulex 0 rlineto 0 ruley neg
64 rlineto rulex neg 0 rlineto fill grestore}B /a{moveto}B /delta 0 N /tail
65 {dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{S p tail}B /c{-4 M}
66 B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{1 M}B /i{2 M}B /j{3 M}B /k{
67 4 M}B /w{0 rmoveto}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p -1 w}B /q{
68 p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /x{0 S rmoveto}B /y{3 2 roll p
69 a}B /bos{/SS save N}B /eos{SS restore}B end
70 %%EndProcSet
71 TeXDict begin 40258431 52099146 1000 300 300 (refman.dvi)
72 @start /Fa 4 115 df<B512C014F814FE38F8007FEC1F80EC07C0A2EC03E0140115F0A6
73 15E01403140715C0EC1F80EC7F00B512FE5C14F000F8C8FCB21C2A7BA925>80
74 D<137E3803FFC04813E04813F0381F81F8383F00FC003E137C48133EA248131FA76C133F
75 007C133EA26C137C003F13FC381FC3F8380FFFF06C13E06C13C038007E00181A7E991D>
76 111 D<EAF83F38F9FF80B512C014E0EB07F0EAFC0338F801F81300A2147CA714FC14F8A2
77 130138FC03F038FF0FE013FF14C000F91300EAF87C90C7FCAC16267C991D>I<EAF83C13
78 FC12F912FBEAFFE0138013005A5AA25AB00E1A7C9914>114 D E
79 /Fb 4 115 df<EAFFFEEBFF8014C038F003E0EB00F01478A2143CA61478A214F0EB03E0
80 B512C01480EBFE0000F0C7FCAF16237BA21F>80 D<EA01FCEA07FF481380381F07C0383C
81 01E0387800F0A20070137000F01378A6007813F0A2EA7C01383E03E0381F07C0380FFF80
82 6C1300EA01FC15167F9518>111 D<EAF0F8EAF3FEB5FC38FE1F80EAF80738F003C0A214
83 E01301A6130314C0130700F81380EAFE1F38F7FF00EAF3FCEAF1F800F0C7FCAA13207D95
84 19>I<EAF0E012F312F7EAFF005A5A5AA25AAE0B167C9511>114 D
85 E /Fc 24 122 df<EB3E18EBFFB84813F83803E1F0EA0780EA0E0048137048136014005A
86 A25AA61303148038F00700EA700EEA7C1EEA3FFCEA1FF0EA07C015197B9816>67
87 D<0003B5128015C0A23900E00380A315004848C7FCA214C08048B45AA313813807018090
88 C8FCA3120EA3EA7FC012FF127F1A197F9816>70 D<387FFFF014F8A238E07070A300C013
89 603800E000A4485AA4485AA448C7FCA3EA7FE0A315197A9816>84
90 D<EA03C8EA07FC120FEA1C7CEA387813381270A2EAE070A313F313E712E112E3EA7FFEEA
91 3F7CEA1C3810127A9116>97 D<12FC7EA2121CA4EA39E0EA3FF013F8EA3E1C127CEA781E
92 EA700EA2EAE01CA31338A21370EA71E0EA7FC0EA3F80EA1E000F197A9816>I<13F8EA03
93 FCEA07FEEA0F0EEA1C1EEA380EEA7000A25AA5EAF002EA700FEA3FFEEA1FFCEA0FF01012
94 7A9116>I<133E137F133F130EA4EA03DCEA07FC120FEA1C7CEA387813381270A2EAE070
95 A313F313E712E112E3EA7FFEEA3F7CEA1C3810197A9816>I<13F8EA03FCEA07FEEA0F0E
96 121C1238EA701EEA7FFCEAFFF813E0EAE000A3EAF002EA780FEA3FFEEA1FFCEA0FF01012
97 7A9116>I<EB01F0EB07F8EB0FFCEB0E78143014005B3801FFE05A7E38001C005BA65BA6
98 5BA4485AA21231EA7B8012FF6CC7FC123C16227E9816>I<EB1E20EB7F70EBFFF0EA01E1
99 3803C1E01381EA0700A2380E01C0A3130314801307EA071F13FF6C1300EA01E7EA0007A2
100 130EA21230EA783CEAFFF86C5AEA3FC0141B7E9116>I<121F487E121F0007C7FCA4EA0E
101 78EA0FFC7F138EEA1F0E121EA2121CEA3C1C1238A2EB38C0EA7039A2EB7380133F00E013
102 00EA601C12197C9816>I<136013F0A213601300A4120FEA1F80123FEA71C0EA738012E3
103 A2EA0700A3120E1330EA1C70A213E0121FEA0FC0EA07000C1A799916>I<127FEAFF8012
104 7FEA0700A4120EA45AA45AA31360EA70E0A3EA7FC0EA3F80EA0F000B19789816>108
105 D<3806F0F0380FF9F8EBFFFCEB9F9C381F1F1CEA1E1EEA1C1CA2383C3C38EA3838A21470
106 EA7070A214601470EAE0E03860603016127E9116>I<EA1C3CEA3EFEEA7FFF13C7EAEF87
107 1307A2120EEA1E0E121CA2EB1CC0EA381DA21339EB1F8000701300EA300E12127C9116>
108 I<EA01E0EA07F0EA0FF8EA1E1C123CEA381EEA700EA2EAE01CA31338A21370EA71E0EA7F
109 C0EA3F80EA1E000F127A9116>I<380387803807CFC0380FFFE0EA0EF8381CF0F0147013
110 E012003801C0E0A3EBC1C01203EBC38013C7EBFF00EA077E133890C7FCA2120EA4EA7F80
111 487E6C5A141B7F9116>I<EA1C1F383E7F80387FFFC03877E1E0EAE7C01381A2380700C0
112 481300120EA35AA45A121813127B9116>114 D<13FC487E487E38070780000E13001306
113 90C7FCEA07F0EA03FCC67E1307A2127012F0EAE01EEAFFFC6C5AEA1FE011127C9116>I<
114 134013E0A2EA01C0A4EA7FFC12FF127FEA0380EA0700A4120EA3130CEA1C1CA21338EA1F
115 F0EA0FE0EA07C00E197A9816>I<EA1C01383E0380127F127738E7070012EEA2120EEA1C
116 0EA3EB1EC0131D133D137DEA1FFF380FEF803807870012127C9116>I<000E1380381F01
117 C0EA3F811273126312E3EAE7011207380E0380A3EB0700A2130E131EEA07FC5BEA01E012
118 127C9116>I<EA078F381FDF80383FFFC0EA78F1EA70E1EAE0E3A23800E1803801C000A2
119 1231007913C0EAF38112E3EBC380387FFF00EA7EFEEA3C7C12127C9116>120
120 D<000E1380381F01C0EA3F811273EB838012E3EAE7031207380E0700A35B130E131E133E
121 EA0FFE6C5AEA03DCEA001CA25BEA3878EA7870EA71E0EA7FC06C5A001EC7FC121B7C9116
122 >I E /Fd 1 49 df<1204120EA2121CA31238A212301270A21260A212C0A2070F7F8F0A>
123 48 D E /Fe 4 115 df<EAFFF013FCEAE01E1307EB0380A5EB0700131EEAFFFC13F000E0
124 C7FCAA11177D9617>80 D<EA07C0EA1FF0EA3838EA701CA2EAE00EA5EA701CA2EA3C78EA
125 1FF0EA07C00F0F7F8E12>111 D<EAE7C0EAFFE0EAF870EAE038A2131CA51338A2EAF0F0
126 EAFFE0EAE780EAE000A60E157E8E12>I<EAE38012EFEAFC005A5AA25AA9090F7E8E0C>
127 114 D E /Ff 3 117 df<EA3078EA498CEA4E04124CEA9C0C1218A3EA301813191331A2
128 EA6012131C100E7D8D14>110 D<EA0780EA18C0EA3040EA6060A212C0A3EA80C0A2EA81
129 80EAC1001246123C0B0E7B8D12>I<1206A25AA4EAFF80EA1800A35AA45A1261A2126212
130 64123809147D930C>116 D E /Fg 1 110 df<EA73C7389C6880389830C0383861801230
131 A2EB63103860C320EBC1C014097D8819>109 D E /Fh 2 51 df<121812F81218AA12FF
132 080D7D8C0E>49 D<123EEA4180EA80C012C01200A2EA0180EA03001204EA08401230EA7F
133 8012FF0A0D7E8C0E>I E /Fi 9 107 df<0040132000C01360006013C038300180381803
134 00EA0C066C5A6C5AEA01B0EA00E0A2EA01B0EA0318EA060C487E487E38300180386000C0
135 4813600040132013147A9320>2 D<1203A4EAC30CEAE31CEA7338EA1FE0EA0780A2EA1F
136 E0EA7338EAE31CEAC30CEA0300A40E127D9215>I<EA03C0EA0FF0EA1FF8EA3FFCEA7FFE
137 A2B5FCA4EA7FFEA2EA3FFCEA1FF8EA0FF0EA03C010107E9115>15
138 D<12C012F0123C120FEA03C0EA00F0133C130FEB03C0EB00F0143C140FEC0380EC0F0014
139 3C14F0EB03C0010FC7FC133C13F0EA03C0000FC8FC123C127012C0C9FCA7007FB5FCB612
140 8019227D9920>21 D<EB7FF8EA01FF38078000000EC7FC12185AA25AA25AA3B512F8A200
141 C0C7FCA31260A27EA27E120E6C7E3801FFF8EA007F151A7D961C>50
142 D<B512C0A2C7FCABEA3FFF5AC7FCACB5FCA2121D7E9C17>57 D<133C13E0EA01C0138012
143 03AD13005A121C12F0121C12077E1380AD120113C0EA00E0133C0E297D9E15>102
144 D<12F0121C12077E1380AD120113C0EA00E0133C13E0EA01C013801203AD13005A121C12
145 F00E297D9E15>I<12C0B3B3A502297B9E0C>106 D E /Fj 4 111
146 df<1206120712061200A41238124CA2128C12981218A212301232A21264A2123808147F
147 930C>105 D<1330133813301300A4EA01C0EA0260EA0430136012081200A213C0A4EA01
148 80A4EA630012E312C612780D1A81930E>I<3830F87C38590C86384E0D06EA9C0EEA980C
149 1218A248485A15801418A23960301900140E190D7F8C1D>109 D<EA30F8EA590C124E12
150 9C12981218A2EA301813191331A2EA6032131C100D7F8C15>I E
151 /Fk 16 120 df<126012F0A212600404798312>46 D<EA03E6EA0FFEEA1C3EEA381EEA70
152 0EA21260EAE000A6EA600E1270A2EA381CEA1C38EA0FF0EA03E00F147F9312>67
153 D<EAFC7EA2EA7C7CEA745CEA76DCA61277EA739CA2EA701CA5EAF83EA20F147F9312>77
154 D<EA1FC0EA3FF0EA3838EA101C1200EA07FC123FEA781C12E0A3EA703C383FFF80EA1FCF
155 110E7F8D12>97 D<12F8A21238A4EA3BE0EA3FF0EA3C38EA381C130C130EA4130C131CEA
156 3C38EA3FF0EA1BC00F147F9312>I<EA07F0EA1FF8EA3838EA7010EA600012E0A41260EA
157 70381238EA1FF0EA07E00D0E7E8D12>I<EA0780EA1FE0EA38701270EA603812E0EAFFF8
158 A2EAE0001260EA70381238EA1FF0EA07C00D0E7E8D12>101 D<1206120FA21206C7FCA3
159 127FA21207AAEAFFF0A20C157D9412>105 D<B4FCA21207B0EAFFF8A20D147E9312>108
160 D<EAF71CEAFFBEEA79E7A2EA71C7A838F9E780EAF8E3110E808D12>I<EA0F80EA3FE012
161 38EA7070EAE038A5EAF078EA7070EA38E0123FEA0F800D0E7E8D12>111
162 D<EAFBE0EAFFF0EA3C38EA381C130C130EA4130C131CEA3C38EA3FF0EA3BC0EA3800A512
163 FEA20F157F8D12>I<EAFC78EAFDFCEA1F9CEA1E081300121CA7EAFFC0A20E0E7E8D12>
164 114 D<1206120EA3EA7FF812FFEA0E00A7131CA3EA07F8EA01E00E127F9112>116
165 D<EAF8F8A2EA3838A91378EA1FFEEA0FBE0F0E7F8D12>I<EAFEFEA2EA701CA3EA3018EA
166 3BB8EA3FF8A2EA3AB81238EA1CF0A30F0E7F8D12>119 D E /Fl
167 42 123 df<EBFCF83807839CEA0E07001C13081400A5B512E0381C0700AC387F1FE01617
168 809615>11 D<EBFC7E380703C1390E078380001C1303EC010091C7FCA4B61280381C0703
169 AC397F1FCFE01B1780961D>14 D<126012F0A212701210A21220A21240A2040A7D960A>
170 39 D<126012F0A212701210A21220A21240A2040A7D830A>44 D<126012F0A212600404
171 7D830A>46 D<EA0FE0EA3030EA6018EA701CA21200131813381360EA07E0EA0030131813
172 0C130EA212E0A2EAC00CEA4018EA3030EA0FE00F157F9412>51 D<1330A2137013F01201
173 1370120212041208121812101220124012C0EAFFFEEA0070A5EA03FE0F157F9412>I<13
174 101338A3135CA3138EA3EA0107A238020380A33807FFC0EA0401A2380800E0A2001813F0
175 123838FE03FE17177F961A>65 D<B5FC381C01C0EB00E0143014381418141C140C140EA7
176 140C141CA2143814301460EB01C0B5120017177F961B>68 D<B512E0EA1C001460142014
177 10A3EB0400A3130CEA1FFCEA1C0C1304A390C7FCA6EAFFC014177F9617>70
178 D<38FF83FE381C0070AA381FFFF0381C0070AA38FF83FE17177F961A>72
179 D<EAFFE0EA0E00B3A3EAFFE00B177F960D>I<EAFFC0001CC7FCAD1420A31460A2144014
180 C01303B5FC13177F9616>76 D<13FCEA0303380E01C0381C00E048137000301330007013
181 380060131800E0131CA700701338A200301330003813706C13E0380E01C038030300EA00
182 FC16177E961B>79 D<EAFFFE381C0380EB00C014601470A4146014C0EB0380381FFE0000
183 1CC7FCAAB47E14177F9618>I<EAFFFC381C0380EB00C014E01470A414E014C0EB038038
184 1FFE00381C0780EB01C0EB00E0A514E1A2147238FF803C18177F961A>82
185 D<EA0FC4EA302CEA601CEA400CEAC004A3EAE0001270127FEA3FE0EA0FF8EA01FCEA001C
186 130E13061280A3EAC004EAE008EAD810EA87E00F177E9614>I<387FFFF8386038180040
187 1308A200801304A300001300AF3803FF8016177F9619>I<EA3FC0EA70601330EA203812
188 00EA03F8EA1E3812301270EAE039A21379EA70FFEA1F1E100E7F8D12>97
189 D<12F81238A8EA39F0EA3E0CEA380613077F1480A414005B1306EA361CEA21F011177F96
190 14>I<EA07F0EA18381230EA7010EA600012E0A41260EA70081230EA1830EA07C00D0E7F
191 8D10>I<133E130EA8EA07CEEA1C3EEA300E1270126012E0A412601270EA301EEA182E38
192 07CF8011177F9614>I<EA0FC0EA1860EA3030EA7038EAE018EAFFF8EAE000A31260EA70
193 08EA3010EA1830EA07C00D0E7F8D10>I<EA03E0EA0670120EEA1C201300A5EAFF80EA1C
194 00ACEA7F800C1780960B>I<EA0F9EEA18E3EA3060EA7070A3EA3060EA18C0EA2F80EA20
195 001260EA3FE013F813FCEA600EEAC006A3EA600CEA3838EA0FE010157F8D12>I<12F812
196 38A813F8EA3B1CEA3C0E1238AA38FE3F8011177F9614>I<12301278A212301200A512F8
197 1238AC12FE07177F960A>I<12F81238A8133E13381330134013801239EA3FC0EA39E012
198 3813F01378133CA2EAFE7F10177F9613>107 D<12F81238B3A312FE07177F960A>I<38F8
199 F83E383B1CC7393C0F0380EA380EAA39FE3F8FE01B0E7F8D1E>I<EAF8F8EA3B1CEA3C0E
200 1238AA38FE3F80110E7F8D14>I<EA07C0EA1830EA3018EA600CA2EAE00EA5EA701CEA30
201 18EA1830EA07C00F0E7F8D12>I<EAF9F0EA3E1CEA380613077F1480A414005B130EEA3E
202 1CEA39F00038C7FCA512FE11147F8D14>I<EAF9E0EA3A70123CEA38201300A9B4FC0C0E
203 7F8D0E>114 D<EA1F40EA60C0EAC040A2EAE000B4FCEA7F80EA1FC0EA01E0EA8060A212
204 C0EAE0C0EA9F000B0E7F8D0E>I<1208A31218A21238EAFFC0EA3800A71340A4EA1C80EA
205 0F000A147F930E>I<EAF83EEA380EAA131EEA1C2E3807CF80110E7F8D14>I<EAFE1FEA38
206 0EEA3C0CEA1C08A2EA0E10A2EA0720A213E0EA03C0A2EA0180A2100E7F8D13>I<38FEFE
207 7C383838381410133C001C1320134C381E4E60380ECE401387000713801303A200031300
208 EA0201160E7F8D19>I<EAFE3FEA3C1CEA1C10EA0E20EA074013C0EA0380EA01C0EA02E0
209 EA04F0EA0870EA1838EA383CEAFC7F100E7F8D13>I<EAFE1FEA380EEA3C0CEA1C08A2EA
210 0E10A2EA0720A213E0EA03C0A2EA0180A21300A212E2A212A4127810147F8D13>I<EAFF
211 F0EAC0E01280EA81C0EA83801287EA0700120EEA1E08121CEA3818EA70101330EAFFF00D
212 0E7F8D10>I E /Fm 10 58 df<121FEA3180EA60C0EA4040EAC060A8EA4040EA60C0EA31
213 80EA1F000B107F8F0F>48 D<1218127812981218AC12FF08107D8F0F>I<121FEA6180EA
214 40C0EA806012C01200A213C0EA0180EA030012065AEA10201220EA7FC012FF0B107F8F0F
215 >I<121FEA2180EA60C0A212001380EA0100121FEA00801340136012C0A2EA8040EA6080
216 EA1F000B107F8F0F>I<EA0180A212031205120D121912111221124112C1EAFFE0EA0180
217 A4EA0FE00B107F8F0F>I<EA20C0EA3F80EA2E001220A3122FEA3080EA2040EA0060A312
218 C0EA80C0EA6180EA1F000B107F8F0F>I<EA0780EA1840EA30C0126013005A12CFEAF080
219 EAE040EAC060A31240EA60C0EA3080EA1F000B107F8F0F>I<1240EA7FF013E0EA8040A2
220 EA0080EA01001202A212061204A2120CA50C117F900F>I<121FEA3180EA60C0A3EA3180
221 EA3F00120EEA3380EA61C0EAC060A31340EA60C0EA1F000B107F8F0F>I<121FEA3180EA
222 60C0EAC0401360A3EA40E01221EA1E6012001340EA60C01380EA6300121E0B107F8F0F>
223 I E /Fn 11 58 df<1360AAB512F0A238006000AA14167E9119>43
224 D<120FEA30C0EA6060A2EA4020EAC030A9EA4020EA6060A2EA30C0EA0F000C137E9211>
225 48 D<120C121C12EC120CAFEAFFC00A137D9211>I<121FEA60C01360EAF07013301260EA
226 0070A2136013C012011380EA02005AEA08101210EA2020EA7FE012FF0C137E9211>I<EA
227 0FC0EA3070EA7038A31200133013E0EA0FC0EA007013381318131C126012F01318EAE038
228 EA6070EA1FC00E137F9211>I<136013E0A2EA016012021206120C120812101220126012
229 C0EAFFFCEA0060A5EA03FC0E137F9211>I<EA6060EA7FC01380EA44001240A3124FEA70
230 C0EA40E0EA00601370A212E0A21360EA40E0EA21C0EA1F000C137E9211>I<EA07C0EA0C
231 20EA10701220EA6000A25A12CFEAD0C0EAE060EAC0201330A31240EA6020EA2060EA10C0
232 EA0F000C137E9211>I<1240EA7FFC13F8EA4010EA80301320EA00401380EA0100A25A12
233 021206A2120EA512040E147E9311>I<EA0FC0EA1070EA20181260A21270EA3C30EA3F60
234 EA0F8013E0EA31F0EA6078EAC01C130CA3EA6018EA3030EA0FC00E137F9211>I<120FEA
235 3080EA6040EA4060EAC0201330A31240EA6070EA30B0EA0F30120013201360EAE0401380
236 EA4100123E0C137E9211>I E /Fo 65 123 df<14FE90380301801306EB0C03EB1C0191
237 C7FC13181338A43803FFFE3800700EA35CA213E0A25CA3EA01C01472A438038034141891
238 C7FC90C8FCA25A12C612E65A12781925819C17>12 D<903801FEE0EB0707130E010C13C0
239 EB1C01A213189038380380A40003B5120038007007A3140EA213E0A25CA3EA01C01439A4
240 3803801A140C91C7FC90C8FCA25A12C612E65A12781B25819C18>I<1303130613081318
241 1330136013C0A2EA0180EA0300A21206A25AA2121C1218A212381230A21270A21260A412
242 E0A51260A51220123012107EA2102A7B9E11>40 D<1310A21308130C13041306A51307A5
243 1306A4130EA2130CA2131C1318A213381330A21360A213C0A2EA0180EA0300A212065A5A
244 121012605A102A809E11>I<136013C0A3EA3086EA388EEA1DB8EA0F60EA0380A2EA0DE0
245 EA3B70EAE238EAC218EA0600A35A0F12789E15>I<5B5BA41306A45BA3B6FCA238001800
246 A35BA45BA41340181A7A9620>I<12181238127812381208A21210A212201240A2128005
247 0C7D830D>I<EAFFC0A30A037D890F>I<1230127812F0126005047C830D>I<133EEBE180
248 380181C0EA03005A1206000E13E0120C001C13C0A2EA18011238A338700380A438600700
249 12E01306130EA2130C5BEA60385BEA30C0001FC7FC131D7C9B15>48
250 D<1304130C131813381378EA07B8EA0070A413E0A4EA01C0A4EA0380A4EA0700A45AEAFF
251 F00E1C7B9B15>I<133EEB4180EB80C0EA0100000213E0EA0440A21208A3381081C0A238
252 110380000E1300EA00065B5B136013800003C7FC12044813404813805AEB0100EA7F07EA
253 43FEEA81FCEA8078131D7D9B15>I<131FEB60C013803801006012021340000413E0A3EB
254 81C0EA030138000380EB070013FC131C1306A21307A41270EAE00E12805BEA40185BEA20
255 E0EA1F80131D7D9B15>I<3809C040380FE080EA1FE1381C6100EA3026EA201AEA6004EA
256 400CEA80081318485AA25BA25BA212015B120390C7FC5AA3120EA35AA21218121D799B15
257 >55 D<1206120FA212061200AA1230127812F0126008127C910D>58
258 D<000FB512E04814F0C9FCA8B612806C14001C0C7C8F20>61 D<1418A21438A21478A214
259 B8EB0138A2EB023C141C1304130C13081310A21320A2EB7FFCEBC01C1380EA0100141E00
260 02130EA25A120C001C131EB4EBFFC01A1D7E9C1F>65 D<48B5FC39003C038090383801C0
261 EC00E0A35B1401A2EC03C001E01380EC0F00141EEBFFFC3801C00E801580A2EA0380A439
262 07000F00140E141E5C000E13F0B512C01B1C7E9B1D>I<903803F02090381E0C60903830
263 02E09038E003C03801C001EA038048C7FC000E1480121E121C123C15005AA35AA41404A3
264 5C12705C6C5B00185B6C485AD80706C7FCEA01F81B1E7A9C1E>I<48B5FC39003C03C090
265 383800E0A21570A24913781538A215785BA4484813F0A315E03803800115C01403158039
266 07000700140E5C5C000E13E0B512801D1C7E9B1F>I<48B512F038003C00013813301520
267 A35BA214081500495AA21430EBFFF03801C020A439038040801400A2EC0100EA07005C14
268 021406000E133CB512FC1C1C7E9B1C>I<48B512F038003C00013813301520A35BA21408
269 1500495AA21430EBFFF03801C020A448485A91C7FCA348C8FCA45AEAFFF01C1C7E9B1B>
270 I<903803F02090381E0C6090383002E09038E003C03801C001EA038048C7FC000E148012
271 1E121C123C15005AA35AA2903801FF809038001E00141CA400705BA27E001813786C1390
272 38070710D801F8C7FC1B1E7A9C20>I<EA03FFEA00781370A413E0A4EA01C0A4EA0380A4
273 EA0700A4120EA4121EEAFFC0101C7D9B10>73 D<EB3FF8EB03C01480A4EB0700A4130EA4
274 5BA45BA4EA607012E0EAC060EA80E0EA81C0EA4380003EC7FC151D7C9B16>I<3A01FFC0
275 7F803A003C001E000138131815205D5DD97002C7FC5C5C5CEBE04014C013E1EBE2E0EA01
276 C4EBD07013E013C048487EA21418141CEA070080A348130F39FFE07FC0211C7E9B20>I<
277 3801FFC038003C001338A45BA45BA4485AA438038002A31404EA0700140C14181438000E
278 13F0B5FC171C7E9B1A>I<D801FEEB01FED8003E14E0012EEB03C01505A21509014EEB0B
279 801513152313470187EB4700A21587EC0107D80107130E14021404A20002495AEB038814
280 9014A000045C14C0A2000C1380001CEB007839FF8307FF271C7E9B25>I<D801FCEBFF80
281 D8001CEB1C00012E13181510A2132701475B13431480A2903881C040A3EB80E0D801005B
282 1470A300020139C7FCA3141D48131E140EA2120C001C1304EAFF80211C7E9B1F>I<EB07
283 F0EB1C1CEB700E497E3901C00380EA0380EA0700000E14C0121E121C123CA25AA348EB07
284 80A3EC0F00A2140E141E5C007013385C00785B383801C06C485AD80E0EC7FCEA03F81A1E
285 7A9C20>I<3801FFFE39003C038090383801C0EC00E0A3EB7001A315C0EBE0031580EC07
286 00141C3801FFF001C0C7FCA3485AA448C8FCA45AEAFFE01B1C7E9B1C>I<EB07F0EB1C1C
287 EB700E497ED801C0138038038003EA0700000E14C0121E121C123CA25AA348EB0780A3EC
288 0F00A2140E141E141C38707838EB8070387104E0383905C0381D0780380F0E04EA03FC38
289 00040CEB0608EB0E18EB0FF013075CEB03801A257A9C20>I<3801FFFE39003C07809038
290 3801C015E01400A2EB7001A3EC03C001E01380EC0700141CEBFFE03801C03080141CA2EA
291 0380A43807003C1520A348144039FFE01E80C7EA0F001B1D7E9B1E>I<EB0F84EB304CEB
292 403CEB8018EA01005AA200061310A214001207A2EA03E013FC6CB4FC38007F80EB07C013
293 01A21300A21220A238600180A2EB03001302EAF004EACC18EA83E0161E7D9C17>I<001F
294 B512C0381C070138300E0000201480126012405B1280A2000014005BA45BA45BA4485AA4
295 1203EA7FFE1A1C799B1E>I<39FF801FC0393C000700001C1304A25C5CA25CA25C5CA26C
296 48C7FCA213025BA25BA25B5B120F6C5AA25B90C8FCA21206A21A1D779B1F>86
297 D<3AFF83FF07F03A3C007001C00038158002F01300A290380170025D13025D13045D1308
298 5D131001305B1320D81C405BA2D98071C7FCA2381D0072A2001E1374A2001C1338A20018
299 133014201210241D779B29>I<EB3F80EB7F001360A35BA4485AA448C7FCA41206A45AA4
300 5AA45AA45AA45AA212FEA211297E9E0D>91 D<EB3F80EB7F001303A31306A45BA45BA45B
301 A45BA45BA4485AA448C7FCA41206A212FEA21129819E0D>93 D<EA01E3EA0717EA0C0F12
302 18EA380E12301270A2EAE01CA41339A3EA6079EA319AEA1E0C10127C9115>97
303 D<123F1207A2120EA45AA4EA39E0EA3A18EA3C0C12381270130EA3EAE01CA31318133813
304 301360EA60C0EA3180EA1E000F1D7C9C13>I<13F8EA0304120EEA1C0EEA181CEA300012
305 70A25AA51304EA60081310EA3060EA0F800F127C9113>I<EB07E01300A2EB01C0A4EB03
306 80A43801E700EA0717EA0C0F1218EA380E12301270A2485AA41339A3EA6079EA319AEA1E
307 0C131D7C9C15>I<13F8EA0704120CEA1802EA38041230EA7008EA7FF0EAE000A5EA6004
308 1308EA30101360EA0F800F127C9113>I<EB03C0EB0670130CEB1C601400A25BA53803FF
309 8038007000A55BA5485AA5485AA390C7FCA25A12C612E65A12781425819C0D>I<EB78C0
310 EA01C5EA03031206000E1380120C121CA238380700A4130EA3EA181EEA0C7CEA079CEA00
311 1CA25BA2EAC030EAE070EAC1C0007FC7FC121A7E9113>I<EA0FC01201A2485AA448C7FC
312 A4EA0E3E13C3380F0380120E121E121CA338380700A3130E00701340A2131C1480EAE00C
313 38600700121D7E9C15>I<EA01801203EA0100C7FCA7121C12261247A2128EA2120E5AA3
314 5AA21271A31272A2123C091C7C9B0D>I<1303130713031300A71378138CEA010C120213
315 1C12041200A21338A41370A413E0A4EA01C0A2EAC180EAE30012C612781024819B0D>I<
316 EA0FC01201A2485AA448C7FCA4380E07801308EB11C01321381C4180EB8000001DC7FC12
317 1EEA3FC0EA38E01370A2EA7071A31372EAE032EA601C121D7E9C13>I<EA1F801203A2EA
318 0700A4120EA45AA45AA45AA412E2A312E412641238091D7D9C0B>I<391C1E0780392663
319 18C0394683A0E0384703C0008E1380A2120EA2391C0701C0A3EC0380D8380E1388A2EC07
320 08151039701C032039300C01C01D127C9122>I<EA383EEA4CC3384D0380124E129E129C
321 121CA238380700A3130E00701340A2131C1480EAE00C3860070012127C9117>I<13F8EA
322 030CEA0E06487E1218123000701380A238E00700A3130EA25BEA60185BEA30E0EA0F8011
323 127C9115>I<380387803804C860EBD03013E0EA09C014381201A238038070A314603807
324 00E014C0EB0180EB8300EA0E86137890C7FCA25AA45AB4FC151A809115>I<EA01E1EA07
325 13EA0C0F1218EA380E12301270A2EAE01CA41338A3EA6078EA31F0EA1E701200A213E0A4
326 EA01C0EA0FF8101A7C9113>I<EA1C3CEA2642EA4687EA4707EA8E061300120EA25AA45A
327 A45A123010127C9112>I<EA01F0EA0608120C131CEA1818EA1C00121F13C0EA0FF01207
328 EA00781338EA603012E012C0EA8060EA60C0EA1F000E127D9111>I<12035AA3120EA4EA
329 FFE0EA1C00A35AA45AA4EAE080A2EAE100A2126612380B1A7C990E>I<381C0180EA2E03
330 124EA2388E0700A2121CA2EA380EA438301C80A3EA383C38184D00EA0F8611127C9116>
331 I<EA1C06EA2E0EEA4E06A2EA8E02A2121CA2EA3804A313081230A21310EA3820EA1840EA
332 0F800F127C9113>I<381E0183382703871247148338870701A2120EA2381C0E02A31404
333 EA180C131C1408EA1C1E380C26303807C3C018127C911C>I<38038780380CC840380870
334 E012103820E0C014001200A2485AA4EA03811263EAE38212C5EA8584EA787813127E9113
335 >I<381C0180EA2E03124EA2388E0700A2121CA2EA380EA4EA301CA3EA383CEA1878EA0F
336 B8EA003813301370EAE0605BEA81800043C7FC123C111A7C9114>I<EA01C1EA07E1EA0F
337 F6EA081CEA1008EA0010132013401380EA010012025AEA08041210EA2C0CEA73F8EA41F0
338 EA80E010127E9111>I E /Fp 33 122 df<127012F8A312701200AB127012F8A3127005
339 157A9410>58 D<14C0A3497EA2497E1302A2EB0478A2EB0C7CEB083CA2497EA3497EA201
340 407F1407A2496C7E90B5FC39018003E0EB0001A200026D7EA3481478A2000C147C153C00
341 3E147E3AFF8003FFC022237DA228>65 D<903807F80490381C060CEB70013901C0009C48
342 48137C48C7123C48141C121E150C5AA2007C14041278A200F81400A812781504127C123C
343 A26C1408A26C14107E6C6C13206C6C1340390070018090381C0600EB07F81E247CA226>
344 67 D<B512FC390F8007800007EB01E06E7E15788181A281A216801507A216C0A91680A2
345 150F1600150E151E5D153815F04A5A000FEB0780B500FCC7FC22227DA129>I<903803F8
346 0290381E070690387000864848134ED80380133E0007141E48C7120E121E15065AA2007C
347 14021278A200F891C7FCA7913807FFE000789038003E00151E127C123CA27EA27E6C7E00
348 03142EEA01E0D8007013C690381E0302D903FCC7FC23247CA22A>71
349 D<EAFFFCEA0FC0EA0780B3ACEA0FC0EAFFFC0E227DA114>73 D<EAFFFEEA0FC06C5AB3A2
350 1520A41560A2154015C014011403000F130FB6FC1B227DA121>76
351 D<D8FFC0ECFFC0000FEDFC0000075DD805E0EB0178A2D804F01302A301781304A26D1308
352 A36D1310A26D1320A39038078040A2903803C080A3903801E100A2EB00F2A3147CA21438
353 120E001F15FC3BFFE0100FFFC02A227DA130>I<B512F8380F800F0007EB0380EC01E0A2
354 EC00F015F8A615F0EC01E0A2EC0380EC0F00EBFFF80180C7FCAE487EEAFFFC1D227DA124
355 >80 D<B512F0380F801E0007EB07806E7E6E7E6E7E81A55D4A5A4A5A4A5A021EC7FCEBFF
356 F0EB8038140E8081140381A481A3162015F01401260FC0001340D8FFFCEB7880C8EA1F00
357 23237DA127>82 D<007FB512FE397803C01E00601406A200401402A200C0140300801401
358 A400001400B3A3497E90B5128020227DA126>84 D<3AFFFC01FFC03A0FC0003E006C4813
359 1C1508B3A500035C7F12015D6C6C5B01705B6D48C7FCEB0E06EB03F822237DA128>I<D8
360 FFF0EB1FF0D81F80EB07C0000FEC030000071402A27F00035CA26C6C5BA26D1318000014
361 10A201785BA2017C1360013C1340A26D5BA26D48C7FCA21481EB0782A2EB03C4A214E4EB
362 01E8A2EB00F0A31460A224237EA128>I<130CA2131EA3133F132FA2EB4780A2EB87C013
363 83A2380101E0A200037FEA0200EA03FF38040078A3487FA20018133E123C00FEEBFFC01A
364 1A7F991E>97 D<B51280381E01E0EB00701478143CA5147814F0EB01E0381FFFC0381E00
365 F01478143C141C141EA4141C143C147814F0B512C0171A7E991D>I<EB3F023801C0C638
366 03002E000E131E48130E14065A007813021270A200F01300A600701302A2127800381304
367 7E14087E000313303801C0C038003F00171A7E991D>I<B57E381E01E0EB0070808080A2
368 80A21580A81500A25C140E5C5C5C495AB51280191A7E991F>I<B512F0381E0070143014
369 1014181408A3EB0200A31306EA1FFEEA1E061302A3EB0004A3140C1408A214181478B512
370 F8161A7E991B>I<B512F0381E00701430141014181408A3EB0200A31306EA1FFEEA1E06
371 1302A390C7FCA8EAFFE0151A7E991A>I<EB3F813801E063380380173806000F487F001C
372 7F5A00787FA2127000F090C7FCA5903801FFE03970001F0000787FA212387E120C7E3803
373 80173801E06338003F811B1A7E9920>I<38FFC3FF381E0078AB381FFFF8381E0078AC38
374 FFC3FF181A7E991E>I<EAFFC0EA1E00B3A6EAFFC00A1A7E990F>I<EAFFE0001EC7FCB014
375 10A314301420146014E01301B5FC141A7E9919>108 D<00FE137F001F131CEB80081217
376 EA13C013E01211EA10F013F81378133C133E131E130FEB0788A2EB03C8EB01E8A2EB00F8
377 1478A214381418123800FE1308181A7E991E>110 D<137F3801C1C038070070000E7F48
378 7F003C131E0038130E0078130F00707F00F01480A80078EB0F00A20038130E003C131E00
379 1C131C6C5B6C5B3801C1C0D8007FC7FC191A7E991F>I<B5FC381E03C0EB00E014F01470
380 1478A4147014F014E0EB03C0381FFF00001EC7FCABEAFFC0151A7E991B>I<EAFFFE381E
381 03C0EB00E0801478A55C5CEB03C0D81FFEC7FC381E0380EB01E0130080A615401470EC38
382 8039FFC01F001A1A7E991E>114 D<EA07E1EA181BEA2007EA60031240EAC001A36CC7FC
383 1278EA7F80EA3FF0EA1FFCEA07FEEA007F130FEB0380A2EA8001A300C013005BEAE002EA
384 DC0CEA83F0111A7E9917>I<007FB5FC38701E0700601301124000C0148000801300A300
385 001400B0133F3801FFE0191A7F991D>I<38FFC07F381E001C1408B2000E1310120F6C13
386 20380380403801C18038003E00181A7E991E>I<3AFF83FF01F83A3E007C00F0001E0178
387 1360027C1340143C6C1580147E145ED80780EB0100148FA2D803C013029038C10782A2D8
388 01E113849038E203C413F2000014C89038F401E801FC13F8017C5BEB7800A201385B0130
389 136001101340251A7F9929>119 D<39FFC07F80391F803C00000F133800071330EBC020
390 00035B6C6C5A13F0D800F9C7FC137A137E133E131E131F801327EB47C0EBC3E013813801
391 01F0486C7E0002137848137C000C7F123EB4EBFFC01A1A7F991E>I<39FFC007E0391F80
392 03C0D80F0013003807800213C000035BEBE00C3801F00800005B13F8EB7820EB7C40133E
393 EB1E80131F6DC7FCAAEB7FE01B1A80991E>I E /Fq 11 66 df<1230127812F812781270
394 05057C840E>46 D<1304130C137CEA079CEA001CA21338A61370A613E0A6EA01C0A61203
395 A2EAFFFE0F217CA018>49 D<EB1FC0EB6070EB80383801003C0002131C48131EA2120F13
396 80A2EB003E0006133CC7FC1478A214F0EB01E014C0EB0380EB0700130E13185B5B5B3801
397 8010EA030012044813205A383FFFE04813C0B5FC17217EA018>I<EB3F80EBC0E0380100
398 70000213785AEA0780120FA2380700F8C712F0A2EB01E014C0EB0380EB0E0013FC1307EB
399 038014C0EB01E0A314F01230387803E012F8A200F013C0EA800700401380EB0F00EA201E
400 EA1838EA07E015227DA018>I<1420146014E01301A21302EB05C0130913191311132113
401 41EB838012011303120212041208381807001210122012401280B512F838000E00A65B13
402 1E3801FFE015217DA018>I<38018008EBE078EBFFF014E0148038027E0090C7FCA55A13
403 3EEBC380380701C0EA040014E0C7FC14F0A5127038F801E012F012E0008013C038400380
404 EB0700A2EA200CEA1838EA07E015227DA018>I<EB07C0EB3830EB6010EBC03838018078
405 EA0300481370000E1300A25AA2123C137CEA3987387A0380EA7C0114C0127800F813E0A2
406 12F0A4EB03C0A212E0148038700700A2EA300EEA381CEA1C30EA07C015227CA018>I<12
407 101238383FFFF014E0A23860004000401380EB0100EA8002A2485A5B5B5BA25B13C05B12
408 0148C7FCA25A1206120EA2121E121CA2123CA35AA31230142379A118>I<EB1F80EB60E0
409 EB803038010018120212061204120C120E1410000F1330EB80603807E0C03803F1803801
410 FE006C5A13FF38033F8038060FC0380C07E0EA1803EA3001EA600014605AA3144014C000
411 601380EB0100EA3002EA1C1CEA07E015227DA018>I<133FEBE180380180C0380300E048
412 1360000E1370121E121C123CA314F05AA3EA3801A3381C03E0EA0C05EA0619EA03E13800
413 01C013031480A2EB0700EA6006EAF00E5BEAE018EA8070EA40C0003FC7FC14227CA018>
414 I<14041406140E141EA2143E143F144FA2148FA29038010F8014071302A2130481EB0803
415 A21310A2132090383FFFE0EB400113C01380EA01008100021300A25AA2000C80003E1301
416 3AFF800FFF8021237EA225>65 D E /Fr 24 120 df<EB01C0EA01F112033807F00090C7
417 FC120EA738FFF1C0A2EA0E01B0121E809D16>12 D<EAFFF813FF38F00F80EB03C0EB01E0
418 EB00F0A5EB01E0EB07C0B51280EBFE00EBFF8038F01FC0EB03E0EB01F013001478A514F0
419 EB01E0EB07C0B51280EBFC00151D7C9C1C>66 D<EB3FC03801FFF8EA03C03807801848C7
420 FC121E5AA25AA35AA91278A37EA27E6C1308380780183803C0783801FFF038003F80151F
421 7D9D1B>I<EB3FC0EBFFF83803E07C3807801C380F000C001E1300121C123C12381278A2
422 5AA6EB03FCA2EB001C1278A21238123C121C121E7EEA07803803E07C3800FFF8EB3FC016
423 1F7E9D1C>71 D<00F013F0ADB5FCA2EAF000AE141D7C9C1D>I<00FCEB07E0A300EE130D
424 A300E71319A3EB803900E31331EBC071A200E11361A2EBE0E1A200E013C113F1EB7181A3
425 EB3B01A3131EA313001B1D7C9C24>77 D<133F3801FFE0487F3807C0F8380F807C381E00
426 1E003E131F003C7F48EB0780A348EB03C0A86C130700781480A2007C130F003C1400003E
427 5B6C133E6C6C5A6C6C5A6CB45A6C5BD8003FC7FC1A1F7E9D1F>79
428 D<EAFFFC13FF38F00F80EB03C0EB01E0EB00F0A6EB01E01303EB0FC0B51280EBFE0000F0
429 C7FCAD141D7C9C1B>I<EA03F8EA0FFEEA1C0F487E487E0060C7FC12E0A47E1278127FEA
430 3FE0EA1FFCEA07FEEA01FF38001F801307EB03C0A21301A400C01380EAE00338F00700EA
431 7C0EEA1FFCEA07F0121F7E9D17>83 D<00F01370B3A5007813E0A2383C01C0381E0380EA
432 0F073807FE00EA01F8141E7C9C1D>85 D<00F0EB0380A2007814005CA26C130EA2123E00
433 1E5BA26C5BA36C6C5AA23803C06014E0A26C6C5A13E1A23800F18013F30173C7FCA2137B
434 133EA2131C191D7F9C1C>I<EA0FC0EA3FF0EA7FF8EA7038EA401C1200A213FC120F123F
435 EA781C12E0A3EAF07CEA7FFC13DCEA3F1C0E127E9114>97 D<12E0ABEAE3E0EAEFF8EAFF
436 FCEAF83EEAE01E130E1307A6130EEAF01EEAF83CEAFFF8EAEFF0EAE3E0101D7D9C15>I<
437 EA03F0EA0FFCEA1FFEEA3C0EEA7802EA70005AA61270EA7802EA3C0EEA1FFEEA0FFCEA03
438 F00F127F9112>I<EA07E0EA0FF0EA3FF8EA3C3CEA700C130EEAFFFEA3EAE000A31270EA
439 7802EA3C0EEA1FFEEA0FFCEA03F00F127F9112>101 D<12F0A41200A71270B2041D7E9C
440 0A>105 D<EA03C0A4C7FCA7EA01C0B3A412C3EAFF801300123E0A25839C0B>I<12E0AB13
441 3C137813F0EAE1E0EAE3C0EAE780EAEF00B4FC138012FBEAF9C0EAF1E012E013F0137813
442 38133C131E0F1D7D9C14>I<EA03F0EA0FFC487EEA3C0F38780780EA700338E001C0A5EA
443 F00300701380EA7807383C0F00EA1FFE6C5AEA03F012127F9115>111
444 D<EAE3E0EAEFF8EAFFFCEAF83EEAE01E130E1307A5130F130EEAF01EEAF87CEAFFF8EAEF
445 F0EAE3E0EAE000A8101A7D9115>I<EAE38012E712EFEAFC005A5AA25AAB09127D910E>
446 114 D<EA1FC0EA3FF0127FEAF030EAE000A27E127FEA3FC0EA1FE0EA01F0EA0038A21280
447 EAF078EAFFF0EA7FE0EA1FC00D127F9110>I<121CA6EAFFE0A2EA1C00AC1320EA1FF012
448 0FEA07C00C187F970F>I<39E03E0380A3D870371300EB7707A213733838E38EA33818E1
449 8C381CC1CC001D13DCA2380D80D8000F13F8A20007137019127F911C>119
450 D E /Fs 92 127 df<126012F0AF12601200A4126012F0A212600419779816>33
451 D<EAE038EAF078A7EAE038A2EA60300D0B7C9816>I<EA0387A6387FFFC0B512E0A23807
452 0E00A3EA0E1CA4B512E0A26C13C0381C3800A613197F9816>I<13C01201A3EA07F0EA1F
453 FC487EEA7DCF3871C780EAE1C313C7A238F1C300EA79C0123FEA1FF0EA07FCEA01FE13CF
454 13C73861C38012F1A212E13871C700EA79DFEA3FFEEA1FF8EA07E0EA01C0A2120011207E
455 9C16>I<38380180EA7C03A238EE0700A2130EA35B127C5B1238C65AA35BA2485AA3485A
456 EB8380380707C0A2380E0EE0A3121CA2383807C0A23818038013207F9C16>I<EA0380EA
457 07E0120FEA1E70121CA3EBF7E013E7EA1DC7000F1300138E130E121F485AEA7B9C1273EA
458 E1F8A238E0F0E0A2EA71F8387FFFC0EA3F9F381E070013197F9816>I<EA03801207EA0F
459 00123E5A12F05A0907789816>I<13E01201EA0380EA0700120E5AA25AA25AA35AA91270
460 A37EA27EA27E7EEA0380EA01E012000B217A9C16>I<12C07E12707E7E7EA27EA2EA0380
461 A3EA01C0A9EA0380A3EA0700A2120EA25A5A5A5A5A0A217B9C16>I<EA0380A4EAE38EEA
462 F39EEAFFFEEA3FF8EA0FE0A2EA3FF8EAFFFEEAF39EEAE38EEA0380A40F127D9516>I<13
463 E0A8B512E0A33800E000A813137F9516>I<1238127C127EA2123E120E121E121C127812
464 F01260070B798416>I<B51280A311037E8D16>I<127012F8A312700505788416>I<EB01
465 801303A2EB0700A2130EA25BA25BA25BA25BA2485AA2485AA248C7FCA2120EA25AA25AA2
466 5AA25AA25A11207E9C16>I<EA03E0EA0FF8487EEA1E3CEA380EEA780FEA7007A238E003
467 80A8EAF00700701300A2EA780FEA3C1E6C5AEA1FFC6C5AEA03E011197E9816>I<12035A
468 A25A5AB4FCA212E71207AEEAFFF8A30D197B9816>I<EA07E0EA1FF8487EEA783EEAE007
469 00F01380130312601200A2EB0700A2130E5B5B5B5B485A485A000FC7FC381E03801238EA
470 7FFFB5FC7E11197E9816>I<EA07E0EA1FF8487EEA781E130712301200A2130E133EEA07
471 FC13F013FCEA001E13077F1480A2126012F038E00700EA781EEA3FFC6C5AEA07E011197E
472 9816>I<137C13FC13DC1201EA039CA2EA071C120F120E121E123C1238127812F0B512E0
473 A338001C00A53801FFC0A313197F9816>I<EA3FFE127FA20070C7FCA7EA77F0EA7FFC7F
474 EA780FEA300738000380A2126012F0A238E00700EA781EEA3FFC6C5AEA07E011197E9816
475 >I<13F8EA03FC487EEA0F07EA1C0F1238EA78060070C7FCA2EAE3F8EAEFFCB47EEAF80F
476 487EEB038012E0A21270A2130700381300EA3C1EEA1FFC6C5AEA03E011197E9816>I<12
477 E0B51280A338E00F00131EEA001C5B137813705BA2485AA3485AA448C7FCA7111A7E9916
478 >I<EA07F0EA1FFC487EEA7C1F38F00780EAE003A338700700EA7C1FEA1FFCEA07F0EA1F
479 FCEA3C1EEA700700F01380EAE003A3EAF00700701300EA7C1FEA3FFE6C5AEA07F011197E
480 9816>I<EA03E0EA0FF8487EEA3C1EEA700E7F12E014801303A213071270EA780FEA3FFF
481 EA1FFBEA0FE338000700A21230EA780E5BEA707CEA3FF8EA1FE0EA0F8011197E9816>I<
482 127012F8A312701200A8127012F8A312700512789116>I<1238127CA312381200A81238
483 1278127CA2123C121CA21238127012F012400618799116>I<EB01801307131FEB3E0013
484 F8485AEA07C0485A003EC7FC12FC12F012FC123EEA0F806C7EEA01F06C7E133EEB1F8013
485 07130111157E9616>I<387FFFC0B512E0A2C8FCA5B512E0A26C13C0130B7F9116>I<12C0
486 12F012FC123EEA0F806C7EEA01F06C7E133EEB1F801307131FEB3E0013F8485AEA07C048
487 5A003EC7FC12FC12F012C011157E9616>I<EA0FF0EA3FFE487E38F00F801303A2EA6007
488 38001F00133E13785BEA01C0A55BC8FCA4487E487EA26C5A11197E9816>I<13E0487EA2
489 13B0A2EA03B8A31318EA071CA5EA0E0EA2EA0FFEA2487EEA1C07A3387E0FC038FF1FE038
490 7E0FC013197F9816>65 D<EA7FF8EAFFFE6C7EEA1C0714801303A4EB0700EA1FFF5BA2EA
491 1C1FEB038014C01301A41303EB0780EA7FFFB51200EA7FFC12197F9816>I<3801F180EA
492 07FBEA0FFFEA1F0FEA3C07EA38031270A200F0C7FC5AA77E38700380A21238383C0700EA
493 1F0FEA0FFE6C5AEA01F011197E9816>I<EA7FF8EAFFFE6C7EEA1C0FEB0780EB03C01301
494 A214E01300A8EB01C0A21303EB0780130F387FFF00485AEA7FF81319809816>I<387FFF
495 C0B5FC7EEA1C01A490C7FCA2131CA2EA1FFCA3EA1C1CA290C7FC14E0A5EA7FFFB5FC7E13
496 197F9816>I<387FFFE0B5FC7EEA1C00A41400A2131CA2EA1FFCA3EA1C1CA290C7FCA6EA
497 7F80487E6C5A13197F9816>I<3801F180EA07FBEA0FFFEA1F0FEA3C07EA38031270A200
498 F0C7FC5AA4EB1FC014E014C038F00380127013071238123CEA1E0FEA0FFFEA07FBEA01F3
499 13197F9816>I<387F07F038FF8FF8387F07F0381C01C0A7EA1FFFA3EA1C01A9387F07F0
500 38FF8FF8387F07F01519809816>I<EA7FFCEAFFFEEA7FFCEA0380B3EA7FFCEAFFFEEA7F
501 FC0F197D9816>I<387F0FE038FF8FF0387F0FE0381C0780EB0F00130E5B133C5B5B5BEA
502 1DF0121F7F1338EA1E1C121C7FA27FA2EB0380387F07E038FF8FF0387F07E01419809816
503 >75 D<B47E7F5B001CC7FCAE144014E0A4B5FCA313197F9816>I<38FC07E0EAFE0FA238
504 3A0B80EA3B1BA513BBEA39B3A413F3EA38E3A21303A538FE0FE0A313197F9816>I<387E
505 07F038FF0FF8387F07F0381D81C0A313C1121C13E1A213611371A313311339A21319131D
506 130DA3EA7F07EAFF87EA7F031519809816>I<EA1FFC487E487EEA780F38F00780EAE003
507 AEEAF007A238780F00EA7FFF6C5A6C5A11197E9816>I<EA7FF8EAFFFE6C7E381C0F8013
508 0314C01301A313031480130F381FFF005B13F8001CC7FCA7127F487E6CC7FC12197F9816
509 >I<EA1FFC487E487EEA780F38F00780EAE003AD13E312E1EAF0F738787F00EA7FFF6C5A
510 6C5AEA001C131E130E130F7FA2111F7E9816>I<EA7FF0EAFFFC6C7EEA1C0FEB07801303
511 A41307EB0F00EA1FFE5B7FEA1C0E7FA414101438A2387F03F0EAFF83387F01E015198098
512 16>I<EA07E3EA1FFF5AEA781FEAF00712E0A290C7FC7E1278EA3F80EA1FF0EA07FCC67E
513 130F7FEB0380A2126012E0EB0700EAF80FEAFFFE5BEAC7F011197E9816>I<387FFFE0B5
514 FCA2EAE0E0A400001300AFEA07FC487E6C5A13197F9816>I<387F07F038FF8FF8387F07
515 F0381C01C0B0380E0380A23807070013FF6C5AEA00F81519809816>I<38FE0FE0A33838
516 0380EA3C07001C1300A3EA1E0FEA0E0EA46C5AA4EA031813B8A3EA01B013F0A26C5A1319
517 7F9816>I<387E03F038FF07F8387E03F0383800E0A4381C01C0A3137113F9A213D9A200
518 0C1380A3EA0DDD138DA338078F00A213071519809816>I<387F1F80EB3FC0EB1F80380E
519 1E00131C12075BEA03B813F012015B120012017F120313B81207131C120FEA0E0EA2487E
520 387E0FC038FF1FE0387E0FC013197F9816>I<38FE0FE0EAFF1FEAFE0F381C0700A2EA0E
521 0EA26C5AA3EA03B8A2EA01F0A26C5AA8EA03F8487E6C5A13197F9816>I<387FFF80B5FC
522 A238E007005B131E131CEA003C5B137013F0485A5B1203485A90C7FC5A381E0380121C12
523 3C12781270B5FCA311197E9816>I<EAFFF0A3EAE000B3A8EAFFF0A30C20789C16>I<12C0
524 7EA21270A27EA27EA27EA27EA26C7EA26C7EA26C7EA21370A27FA27FA27FA27FA2EB0380
525 A2130111207E9C16>I<EAFFF0A3EA0070B3A8EAFFF0A30C207F9C16>I<1203EA0F80EA3F
526 E0EAFDF8EAF078EA40100D067C9816>I<B51280A311037E7E16>I<12E07E1278123E7EEA
527 0780120309077C9816>I<EA1FE0487E487EEA783CEA300E1200A2EA03FE121FEA3E0E12
528 7012E0A3EA783E387FFFE0EA3FE7EA0F8313127E9116>I<12FCA3121CA4137CEA1DFEEA
529 1FFFEB0780381E03C0EA1C01EB00E0A6EB01C0EA1E03381F0780EBFF00EA1DFEEA0C7813
530 197F9816>I<EA03F8EA0FFCEA1FFEEA3C1EEA780CEA70005AA57EEA70071278EA3E0EEA
531 1FFCEA0FF8EA03F010127D9116>I<133FA31307A4EA03C7EA0FF748B4FCEA3C1F487EEA
532 700712E0A6EA700F12786C5A381FFFE0EA0FF7EA07C713197F9816>I<EA03F0EA0FFC48
533 7EEA3C0F487E3870038012E0B5FCA300E0C7FCA2387003801278EA3E07381FFF00EA07FE
534 EA01F811127E9116>I<131E137F3801FF8013C7380383001380A2EA7FFFB5FCA2EA0380
535 ACEA7FFC487E6C5A11197F9816>I<3803E3C03807F7E0EA0FFF381C1CC038380E00A56C
536 5AEA0FF8485AEA1BE00038C7FC1218EA1FFC13FF481380387003C038E000E0A4387001C0
537 EA7C07383FFF80380FFE00EA03F8131C7F9116>I<12FCA3121CA41378EA1DFCEA1FFE13
538 0FEA1E07121CAA38FF8FE0139F138F13197F9816>I<1203EA0780A2EA0300C7FCA4EAFF
539 80A31203ACEAFFFC13FE13FC0F1A7C9916>I<13301378A213301300A4EA0FF8121F120F
540 EA0038B3EA6070EAF0F0EAFFE0EA7FC0EA3F800D237E9916>I<127E12FE127E120EA4EB
541 7FE0A3EB0F00131E5B5B5B120F7F13BC131EEA0E0E7F1480387F87F0EAFFCFEA7F871419
542 809816>I<EA7FC012FF127F1201B3EA7FFFB512806C130011197E9816>I<38F9C38038FF
543 EFC0EBFFE0EA3C78A2EA3870AA38FE7CF8A31512809116>I<EAFC78EAFDFCB47EEA1F0F
544 EA1E07121CAA38FF8FE0139F138F13127F9116>I<EA03E0EA0FF8487EEA3C1E487EEA70
545 0738E00380A5EAF00700701300EA780FEA3C1EEA1FFC6C5AEA03E011127E9116>I<EAFC
546 7CEAFDFEB5FC381F0780381E03C0EA1C01EB00E0A6EB01C0EA1E03381F0780EBFF00EA1D
547 FEEA1C7890C7FCA6B47EA3131B7F9116>I<3803E380EA0FF3EA1FFBEA3E0FEA78071270
548 EAE003A6EA70071278EA3C1FEA1FFBEA0FF3EA03E3EA0003A6EB1FF0EB3FF8EB1FF0151B
549 7F9116>I<387F0FC038FF3FE0EA7F7F3807F040EBC0005BA290C7FCA8EA7FFC12FF127F
550 13127F9116>I<EA0FECEA3FFC127FEAF03CEAE01CA2EA7000EA7F80EA1FF0EA07F8EA00
551 3CEA600E12E012F0EAF81EEAFFFC13F8EAC7E00F127D9116>I<12035AA4EA7FFFB5FCA2
552 0007C7FCA75BEB0380A3EB8700EA03FE6C5A6C5A11177F9616>I<EAFC3FA3EA1C07AB13
553 1F381FFFE0EA0FF7EA07C713127F9116>I<387F1FC038FF9FE0387F1FC0381C0700A2EA
554 0E0EA36C5AA4EA03B8A3EA01F0A26C5A13127F9116>I<38FF1FE0A338380380A4EA39F3
555 A20019130013B3A3EA1DB71317EA1F1FEA0F1EEA0E0E13127F9116>I<387F1FC0133F13
556 1F380F1E006C5AEA03B813F012016C5A12017FEA03B8EA073C131CEA0E0E387F1FC038FF
557 3FE0387F1FC013127F9116>I<387F1FC038FF9FE0387F1FC0381C0700120E130EA21207
558 5BA2EA039CA21398EA01B8A2EA00F0A35BA3485A1279127BEA7F8090C7FC123C131B7F91
559 16>I<383FFFC05AA238700780EB0F00131EC65A5B485A485AEA078048C7FC381E01C012
560 3C1278B5FCA312127F9116>I<EB1F80137F13FF3801E0005BA91203EA7F8048C7FCA26C
561 7EEA03C01201A97F3800FF80137F131F11207E9C16>I<12E0B3AE0320779C16>I<127CB4
562 FC7FEA03C01201A97F6CB4FCEB7F80A2EBFF00EA01E05BA91203B45A90C7FC127C11207E
563 9C16>I<EA1C30EA3F78EAFFF8EAF7E0EA61C00D057C9816>I E /Ft
564 24 121 df<380FFFE05A5A3860C0001240485A12001201A348C7FCA35AA3120E12061312
565 7E9112>28 D<126012F0A2126004047C830C>58 D<126012F0A212701210A41220A21240
566 1280040C7C830C>I<140CA2141CA2143C145CA2149E148EEB010E1302A21304A2130813
567 10A2497EEB3FFFEB40071380A2EA0100A212025AA2001C148039FF803FF01C1D7F9C1F>
568 65 D<903801F80890380E0618903838013890386000F048481370485A48C71230481420
569 120E5A123C15005AA35AA45CA300701302A200305B00385B6C5B6C136038070180D800FE
570 C7FC1D1E7E9C1E>67 D<3801FFC038003C001338A45BA45BA4485AA4485AA448C7FCA45A
571 EAFFE0121C7E9B12>73 D<3A01FFC07F803A003C001E000138131815205D5DD97002C7FC
572 5C5C5CEBE04014C0EBE1E013E23801C47013D0EBE03813C0EA038080A280EA0700A280A2
573 488039FFE03FF0211C7E9B23>75 D<EB03F8EB0E0E90383803809038E001C0EA01C03903
574 8000E048C7FC4814F0121E121C123CA25AA348EB01E0A3EC03C0A2EC0780A2EC0F000070
575 130E5C6C5B003C5B381C01C038070780D801FCC7FC1C1E7E9C20>79
576 D<EB03F8EB0E0E90383803809038E001C0EA01C039038000E048C7FC4814F0121E121C12
577 3CA25AA348EB01E0A3EC03C0A215801407EC0F0038703C0EEB421C383882385C381C83C0
578 380787813801FF01380003031402148E14FC5C130114E01C257E9C21>81
579 D<EB0FC1EB3033EB400FEB80061201EA0300A200061304A200071300A27FEA03F06CB4FC
580 6C13C0EB3FE01303EB00F014701430A21220A200601360A214C0148038F00300EACC06EA
581 83F8181E7E9C19>83 D<3A01FFC0FF803A001E003C00011C13306D13205D010F5B6D48C7
582 FC1482EB038414CCEB01D814F05C130080EB0170EB0278EB04381308EB103CEB201CEB40
583 1EEB800E3801000F00027F1206001E497E39FF803FF0211C7F9B22>88
584 D<EA01F0EA030C120CEA1C1EEA383CEA3018EA7000A25AA51304EA60081310EA3060EA1F
585 800F127E9112>99 D<EA01F0EA0708120CEA1804EA38081230EA7030EA7FC0EAE000A513
586 04EA60081310EA3060EA0F800E127E9113>101 D<EB01E0EB0630EB0E7814F0EB1C6014
587 00A45BA23803FFC038003800A25BA55BA5485AA55B1203A20063C7FC12F312F612E41278
588 15257E9C14>I<EA0FC01201A2485AA448C7FCA4EA0E3E13C3380F0380120E121E121CA3
589 38380700A3130E00701320A2131C144038E00C8038600700131D7E9C18>104
590 D<EA01C01203A2EA0180C7FCA6121C12271247A21287A2120EA25AA35A1380A21270EA71
591 001232121C0A1C7E9B0E>I<EA1F801203A2EA0700A4120EA45AA45AA45AA412E2A312E4
592 12641238091D7F9C0C>108 D<EA3C1F384E6180384681C0EA4701128F128E120EA2381C
593 0380A3EB070000381310A2130E1420387006403830038014127E9119>110
594 D<380787803809C8603808D03013E0EA11C014381201A238038070A31460380700E014C0
595 EB0180EB8300EA0E86137890C7FCA25AA4123CB4FC151A819115>112
596 D<EA3C3CEA4E42EA4687EA470FEA8E1E130CEA0E00A25AA45AA45A123010127E9113>
597 114 D<EA01F0EA060CEA0C04130EEA180CEA1C00121FEA0FE013F0EA03F8EA0038EA201C
598 EA701812F01310EA8030EA6060EA1F800F127E9113>I<13C01201A3EA0380A4EAFFF0EA
599 0700A3120EA45AA4EA3820A21340A2EA1880EA0F000C1A80990F>I<EA1C03EA27071247
600 1303EA8701A2120EA2EA1C02A3130412181308A2EA1C10EA0C20EA07C010127E9114>
601 118 D<380787803808C8403810F0C03820F1E0EBE3C03840E1803800E000A2485AA43863
602 808012F3EB810012E5EA84C6EA787813127E9118>120 D E /Fu
603 58 124 df<EB3FC03801F0303803C0380007137CEA0F80A2143891C7FCA4B512FCA2380F
604 807CAE397FE1FF80A2191D809C1B>12 D<EAFFF8A40D04808A10>45
605 D<127812FCA4127806067D850D>I<1360EA01E0120F12FF12F31203B3A2387FFF80A211
606 1B7D9A18>49 D<EA07F8EA1FFE38383F8038780FC0EAFC0714E01303A21278EA000714C0
607 A2EB0F80EB1F00131E13385B5B38018060EA03001206000813E0381FFFC05A5AB5FCA213
608 1B7E9A18>I<EA07F8EA1FFEEA3C1FEB0F80387C07C0127E127C123838000F80A2EB1E00
609 5BEA03F8EA001EEB0F80EB07C0A214E01230127812FCA214C038780F80EB1F00EA1FFEEA
610 07F8131B7E9A18>I<EB018013031307130F131F133F136F13CF138F1201EA030F120612
611 0C12181230126012C0B512F8A238000F80A6EBFFF8A2151B7F9A18>I<38380180383FFF
612 005B5B5B13C00030C7FCA4EA31F8EA361E38380F80EA3007000013C014E0A3127812F8A2
613 14C012F038600F8038381F00EA1FFEEA07F0131B7E9A18>I<137EEA03FF38078180380F
614 03C0EA1E07123C387C03800078C7FCA212F813F8EAFB0E38FA0780EAFC0314C000F813E0
615 A41278A214C0123CEB0780381E0F00EA07FEEA03F8131B7E9A18>I<1260387FFFE0A214
616 C01480A238E00300EAC0065B5BC65AA25B13E0A212015B1203A41207A66C5A131C7D9B18
617 >I<EA03F8EA0FFE381E0F80EA3807EB03C01278127C127E387F8380383FC70013FE6C5A
618 6C7E6C7E001D138038387FC038781FE0EA700FEAF0031301A3007813C0EB0380EA3E0738
619 1FFE00EA03F8131B7E9A18>I<EA03F8EA0FFEEA1E0F383C07801278EB03C012F8A214E0
620 A4EA78071238EA3C0BEA0E1BEA03E3EA000314C0A2EA3807007C13801400EA780FEA383C
621 EA1FF8EA0FE0131B7E9A18>I<127812FCA412781200A6127812FCA4127806127D910D>I<
622 B612FCA27EC9FCA7007FB512FCB6FCA21E0D7D9025>61 D<EB0380A2497EA3497EA2497E
623 131BEB3BF81331A2EB60FCA2EBE0FEEBC07EA248487E90B5FC481480EB001F4814C00006
624 130FA248EB07E0A239FF803FFEA21F1C7E9B24>65 D<90381FE0209038FFF8E03803F80F
625 3807C003380F800148C7FC123E1560127E127C00FC1400A8007C1460127E123E15C07E39
626 0F8001803907C003003803F80E3800FFFCEB1FE01B1C7D9B22>67
627 D<B512F814FF390FC01FC0EC07E0EC01F015F8140015FC157CA2157EA8157CA315F8A2EC
628 01F0EC07E0EC1FC0B6120014F81F1C7E9B25>I<B6FCA2380FC01F1407801580A214C1A3
629 9038C1C00013C313FFA213C313C113C01560A2EC00E015C0A21401A21403EC0F80B6FCA2
630 1B1C7E9B1F>I<B6FCA2380FC01F1407801580A2140114C1A2ECC00013C113C313FFA213
631 C313C113C0A391C7FCA6EAFFFEA2191C7E9B1E>I<90380FF00890387FFE383901FC07F8
632 3807E001390F80007848C7FC481438123E007E1418127C00FC1400A6EC7FFFA2007CEB01
633 F8127E123E123F7EEA0F80EA07E03801FC0739007FFE7890380FF818201C7D9B26>I<39
634 FFFC3FFFA2390FC003F0AA90B5FCA2EBC003AC39FFFC3FFFA2201C7E9B25>I<EAFFFCA2
635 EA0FC0B3A6EAFFFCA20E1C7E9B12>I<39FFFC07FFA2390FC000E04A5A4A5A0206C7FC5C
636 14385C5CEBC1C013C3EBC7E0EBCFF013FBEBF1F8EBE0FC497E147E806E7E81140F6E7E81
637 6E7E3AFFFC1FFF80A2211C7E9B25>75 D<EAFFFEA2EA0FC0AF1403A31407A21406140E14
638 1E147EB512FEA2181C7E9B1D>I<D8FFC0EB03FF6D5B000F15F0D80DF0130DA3D80CF813
639 19A2017C1331A26D1361A26D13C1A390380F8181A2903807C301A2EB03E6A2EB01FCA3EB
640 00F8A23AFFC0701FFFA2281C7E9B2D>I<B512F814FE390FC03F80140FEC07C015E0A515
641 C0A2EC0F80EC3F00EBFFFC01C0C7FCABEAFFFCA21B1C7E9B21>80
642 D<B512F014FE380FC03FEC0F806E7E81A55D4A5A023EC7FCEBFFF0EBC07C80143F6E7EA6
643 ED8180A2EC0FC13AFFFC07C300EC01FE211C7E9B24>82 D<3807F820381FFEE0EA3C07EA
644 7801EA700012F01460A26C130012FEEAFFE0EA7FFE6C7E1480000F13C06C13E0EA007FEB
645 03F01301130012C0A214E07E38F001C0EAFC0338EFFF00EA83FC141C7D9B1B>I<007FB5
646 12E0A238781F81007013800060146000E0147000C01430A400001400B03807FFFEA21C1C
647 7E9B21>I<39FFFC03FFA2390FC00030B3120715606C6C13E03901F001C03900FC078090
648 387FFE00EB0FF8201C7E9B25>I<3AFFFC01FF80A23A0FC00018006D1338000714306D13
649 70000314607F00015CA26C6C485AA2EBFE03017E90C7FCEB7F07EB3F061486EB1F8CA2EB
650 0FD8A214F86D5AA26D5AA26D5AA2211C7F9B24>I<3BFFF87FFE0FFCA23B0FC007E000C0
651 81D9E003130100071680EC07F801F014030003D90FFC1300140CD801F81406EC1CFE9039
652 FC187E0E0000150CEC303F01FE141CD97E701398EC601F013F14B002E013F0ECC00F011F
653 5CEC8007A2010F5CEC00036D5CA22E1C7F9B31>I<EA0FF8EA1C1E383E0F80130714C012
654 1C1200137FEA07E7EA1F07123C127C12F8A3EA780B383E13F8EA0FE115127F9117>97
655 D<B4FCA2121FA9EB3F80EBE1E0EB8070EB0078143CA2143EA6143CA21478EB8070381EC1
656 E0381C3F00171D7F9C1B>I<EA03FCEA0E0EEA1C1F123C1278130E00F8C7FCA61278EB01
657 80123C381C0300EA0E0EEA03F811127E9115>I<EB0FF0A21301A9EA01F9EA0F07EA1C03
658 EA3C011278A212F8A61278A2123CEA1C03380F0FFEEA03F9171D7E9C1B>I<EA03FCEA0F
659 07381C0380383C01C0127814E012F8A2B5FC00F8C7FCA3127814607E6C13C0380F038038
660 01FC0013127F9116>I<137F3801E3803803C7C0EA0787120FEB8380EB8000A5EAFFF8A2
661 EA0F80AEEA7FF0A2121D809C0F>I<3803F0F0380E1F38EA3C0F3838073000781380A400
662 381300EA3C0FEA1E1CEA33F00030C7FCA3EA3FFF14C06C13E014F0387801F838F00078A3
663 00701370007813F0381E03C03807FF00151B7F9118>I<B4FCA2121FA9EB0FC0EB31E0EB
664 40F0EB80F8A21300AB38FFE7FFA2181D7F9C1B>I<121E123FA4121EC7FCA6127FA2121F
665 AEEAFFC0A20A1E7F9D0E>I<137813FCA413781300A6EA03FCA2EA007CB2127012F81378
666 13F0EA70E0EA1F800E26839D0F>I<B4FCA2121FA9EB03FCA2EB01C0EB0300130E5B5B13
667 7813FC13BE131F7F1480EB07C0EB03E0130138FFE7FEA2171D7F9C19>I<B4FCA2121FB3
668 A7EAFFE0A20B1D7F9C0E>I<39FF0FC07E903831E18F3A1F40F20780D980FC13C0A2EB00
669 F8AB3AFFE7FF3FF8A225127F9128>I<38FF0FC0EB31E0381F40F0EB80F8A21300AB38FF
670 E7FFA218127F911B>I<EA01FC380F0780381C01C0003C13E0387800F0A200F813F8A600
671 7813F0A2383C01E0381E03C0380F07803801FC0015127F9118>I<38FF3F80EBE1E0381F
672 80F0EB0078147C143C143EA6143C147C1478EB80F0EBC1E0EB3F0090C7FCA6EAFFE0A217
673 1A7F911B>I<EAFE3E1347381E8F80A3381F070090C7FCAAEAFFE0A211127F9114>114
674 D<EA1FD8EA3078EA601812E0A2EAF000EAFF80EA7FE013F0EA1FF8EA07FCEA007CEAC01C
675 A212E01318EAF830EACFC00E127E9113>I<1203A45AA25AA2EA3FFC12FFEA1F00A9130C
676 A4EA0F08EA0798EA03F00E1A7F9913>I<38FF07F8A2EA1F00AC1301120F380786FFEA01
677 F818127F911B>I<38FFC1FCA2381F00601380000F13C0A23807C180A23803E300A213F7
678 EA01F613FE6C5AA21378A2133016127F9119>I<39FF8FF8FEA2391F03E030A3390F87F0
679 6013869038C6F8E03907CC78C0A23903FC7D80EBF83D143F3901F01F00A20000131EEBE0
680 0EA21F127F9122>I<38FFC7FCA2381F81C0380F83803807C700EA03EEEA01FC5B120013
681 7C13FEEA01DF38039F80EA070F380607C0380C03E038FF07FCA216127F9119>I<38FFC1
682 FCA2381F00601380000F13C0A23807C180A23803E300A213F7EA01F613FE6C5AA21378A2
683 1330A25B1270EAF8E05BEAF9800073C7FC123E161A7F9119>I<387FFF8038781F00EA70
684 3FEA603E5B13FC5BEA01F01203485AEBC180EA0F81121F1303003E1300EA7E07EA7C0FB5
685 FC11127F9115>I<B512FE1701808B18>I E /Fv 43 122 df<49B4FC011F13C090387F00
686 E001FC7F3901F001F800031303EA07E0A26E5A6E5A92C7FCA5B612F8A23807E001B3A53A
687 7FFE1FFF80A2212A7FA925>12 D<130C131C137CEA07FC12FF12F81200B3ADB512FCA216
688 277BA621>49 D<EBFF80000713F0380E03F8381800FE48137F127C00FEEB3F807E15C014
689 1FA2127E003C133FC7FC1580A2EC7F00147E14FE5CEB01F0495A495A5C49C7FC131C5B49
690 13C05B485A3903800180EA070000061303000FB5FC5A5A481400B6FCA21A277DA621>I<
691 EBFF80000713F0380F01FC381C007E003E137F127FEC3F80A37E003E137FC71300A214FE
692 5C495AEB07E0EBFF80A2EB01F0EB00FC147E147FEC3F80A215C0A2123C127EB4FCA21580
693 A248EB7F00127C003813FE381F01F83807FFF0C613801A277DA621>I<141C143CA2147C
694 14FC1301A213031307130E130C131813381370136013C01201EA038013001206120E5A12
695 185A12705AB612F0A2C7EAFC00A990383FFFF0A21C277EA621>I<00181306381F803EEB
696 FFFC5C5C5C148049C7FC0018C8FCA7EB7F803819FFF0381B80F8381E007E00187FC7FCEC
697 1F80A215C0A3127C12FEA315805A0078133F006014006C133E001C5B380F01F83807FFE0
698 C690C7FC1A277DA621>I<EB07F0EB3FFCEBFC0E3801E0073907C01F80EB803F120FEA1F
699 005AEC1F0091C7FC127EA312FEEB1FE0EB7FF8EB407C497E00FF133F9038001F80A25A15
700 C0A4127EA3123E1580123F6C14006C133E6C6C5A3803E0F86CB45A38003F801A277DA621
701 >I<1230123C003FB512E0A215C0481480A215003870000600605B5C5A5C5CC75A495AA2
702 49C7FC5BA2130E131EA2133EA25BA313FCA41201A76C5A13701B297CA821>I<EB7FC038
703 03FFF83807807C380C001E001C7F5AEC07801278A2127C127E397F800F0013E0383FF01E
704 381FFC3CEBFFF06C5B12036C7F14FC38079FFE380F0FFFEA1E0348C6138048137FEC1FC0
705 48130F14071403A315801278EC07007E6C131E380F807C3807FFF0C613801A277DA621>
706 I<EB7F803803FFE03807C0F0380F807848487E48133E007E133F8000FE1480A415C0A412
707 7E143FA26C137F6C135F380F809FEA07FF3801FE1FC7FC1580A4003EEB3F00127F143E5C
708 A2007E5B383801F0381C07C0380FFF80D803FCC7FC1A277DA621>I<123C127E12FFA412
709 7E123C1200AB123C127E12FFA4127E123C081B7B9A12>I<1407A24A7EA34A7EA24A7EA3
710 EC67F0A2ECC7F814C3A290380181FCA290380301FE1400497F01067FA24980153F011C80
711 0118131FA2013FB57EA2903970000FF001601307A249801503000181491301A248C87E48
712 7ED8FFF890381FFFF8A22D297EA832>65 D<91387FE002903907FFF80690391FE01E0E90
713 397F00039E01FCEB01FE4848EB007ED807F0143E5B4848141E001F150E485AA21606127F
714 90C8FC16005AA97EA26D1406123FA36C6C140C120F6C6C14186D1438D801F814306C6C14
715 E0017FEB03C090391FE00F00903807FFFC9038007FE027297CA830>67
716 D<B612F815FF3A03F8003FE0ED07F0ED01F86F7E167E821780161F17C0A2EE0FE0A417F0
717 AA17E0A3EE1FC0A3EE3F8017005E16FE4B5AED07F0ED1FE0B7128003F8C7FC2C297EA833
718 >I<91387FE002903907FFF80690391FE01E0E90397F00039E01FCEB01FE4848EB007ED8
719 07F0143E5B4848141E001F150E485AA21606127F90C8FC93C7FC5AA892B512E07E923800
720 FE007F123FA27F121F120F6C7E7FEA01F86C6C1301017FEB03BE90391FF00F1E903907FF
721 FC0E9039007FE0022B297CA834>71 D<B512E0A23803F800B3B3B512E0A213297EA818>
722 73 D<B512F8A2D803F8C8FCB3A516C0A4ED0180A31503A21507150F151FED3F0015FFB7
723 FCA222297EA828>76 D<D8FFF8ED1FFF6D5D000317C0017E156FA36D15CFA26D6CEB018F
724 A26D6CEB030FA36D6C1306A26D6C130CA26D6C1318A26D6C1330A3027E1360A26E13C0A2
725 91381F8180A291380FC300A3EC07E6A2EC03FCA26E5AA36E5AD8FFFC0203B5FC15603829
726 7DA83F>I<B612F015FE3A03F8007F80ED1FE0ED07F0A2ED03F8A216FCA616F8A2ED07F0
727 A2ED1FE0ED7F8090B5EAFE0015F001F8C8FCB1B512E0A226297EA82D>80
728 D<B612E015FC3A03F8007F80ED1FC06F7E6F7E6F7EA282A55EA24B5A4B5A4B5AED7F8090
729 B500FCC7FC15F09038F801FCEC007F6F7E151F6F7E82A582A4170CED07F8171C923803FC
730 38B539E000FFF0EE1FE02E297EA831>82 D<007FB7FCA29039007F007F007C151F007015
731 07A200608100E01680A2481501A5C791C7FCB3A790B67EA229297EA82E>84
732 D<B500E0EBFFFCA2D803F8C7EA0300B3AB000115067F0000150E160C017E5C6D5C6D6C13
733 E0903907F007C00101B5C7FC9038001FF82E297EA833>I<B500C0EB3FFEA2D803F8C7EA
734 01C017806C6CEC0300A26D5C000015067F6D5C80013F5CA26E1338011F143080010F5C80
735 01075CA2ECF80101035CECFC03010191C7FC14FE01001306A2EC7F0CA2159CEC3F9815D8
736 EC1FF0A26E5AA36E5AA26E5AA22F297FA832>I<3803FF80000F13E0381F01F8383F80FC
737 147EA280EA1F00C7FCA4EB3FFF3801FE3FEA0FE0EA1F80EA3F005A12FE150CA3145F007F
738 139F393F831FF8391FFE0FF03903F807C01E1B7E9A21>97 D<EAFFC0A2120FADEBC1FE90
739 38C7FF809038DE07E09038F003F09038E001F89038C000FCA2157EA2157FA8157EA315FC
740 A29038E001F89038B003F090381C0FE0390E07FF80390C01FC00202A7EA925>I<EB3FF0
741 3801FFFC3807E03E380FC07FEA1F80EA3F00A2007E133E1400A212FEA7127EA2127F6C13
742 031380001F1306380FC00C3807F0383801FFF038003FC0181B7E9A1D>I<EC3FF0A21403
743 ADEB3F833801FFF33807F03B380FC00F381F8007383F0003A2127EA312FEA8127EA27E14
744 07EA1F80380FC01F3807E07B3901FFE3FF38007F83202A7EA925>I<EB7F803801FFF038
745 07E0F8380F807C48487E48133F80127E158012FEA2B6FCA248C8FCA4127EA2127F6CEB01
746 80A2391F800300380FC0063803F01C3801FFF838003FC0191B7E9A1E>I<EB07F0EB3FF8
747 EBFC7C3801F8FEEA03F013E01207147C1400A7B51280A23807E000B3A5EA7FFFA2172A7F
748 A914>I<9038FF01E00003EBC7F8390F81FC78381F00F8003EEB7C701500007E137EA600
749 3E137CA26C5B380F81F0380BFFC0001890C7FC0010C8FC1238A2123C381FFFF014FE6CEB
750 FF806C14C0001F14E0383C000F007CEB03F0127800F81301A4007CEB03E0A2003FEB0FC0
751 390FC03F003807FFFE38007FE01D287E9A21>I<EAFFC0A2120FAD14FE9038C3FF809038
752 C60FC09038C807E0EBD00301F013F013E0A213C0B139FFFC3FFFA2202A7EA925>I<120F
753 EA1F8013C0123FA2121F1380EA0F00C7FCA8EAFFC0A2120FB3A5EAFFF8A20D2B7EAA13>
754 I<EAFFC0A2120FB3B3A2EAFFFCA20E2A7EA913>108 D<38FFC0FE9038C3FF80390FC60F
755 C09038C807E0EBD00301F013F013E0A213C0B139FFFC3FFFA2201B7E9A25>110
756 D<EB3FC03801FFF83807E07E380F801F001F1480393F000FC0A2007EEB07E0A300FE14F0
757 A8007E14E0A26CEB0FC0A2391F801F80390FC03F003807E07E3801FFF838003FC01C1B7E
758 9A21>I<38FFC1FE9038C7FF80390FDE0FE09038F003F09038E001F801C013FC140015FE
759 A2157FA8157E15FEA215FC140101E013F89038F007F09038DC0FE09038C7FF809038C1FC
760 0001C0C7FCAAEAFFFCA220277E9A25>I<38FF83E0EB8FF8380F8C7CEB98FE13B013A0A2
761 EBE07CEBC000B1EAFFFEA2171B7E9A1B>114 D<3803FC60381FFFE0EA3C03EA7801EA70
762 0000F01360A300FC1300B47EEA7FFC13FF6C13C0000F13E0000313F0EA003FEB03F8EAC0
763 0014787EA27E14706C13E0EAFE0338E7FF803881FE00151B7E9A1A>I<1360A413E0A212
764 01A212031207121FB512E0A23807E000AE1430A73803F0603801F8C03800FF80EB3F0014
765 267FA51A>I<39FFC03FF0A2000F1303B21407A2140F0007131B3803E0333901FFE3FF38
766 007F83201B7E9A25>I<3BFFF8FFF81FF8A23B0FC00FC00180A22607E007EB030015E0A2
767 D803F01406EC0FF0D9F80D130E0001ECF80C1418D800FC5C15FC9039FE307C38017EEB7E
768 30147090393F603E60153F9138C01FE0011F5CA26D486C5AA2EC00076D91C7FCA22D1B7F
769 9A30>119 D<39FFF80FFEA2390FE001C0D807F013800003EB03003801F806EBFC0E6C6C
770 5AEB7E38EB3F30EB1FE05C6D7E130780497EEB0DFCEB18FEEB387E497E01E013803901C0
771 1FC0EB800F39030007E048EB03F039FFE01FFFA2201B7F9A23>I<39FFF801FFA2390FC0
772 00707F000714606D13E0000314C07F0001EB0180A23900FC0300A26D5AEB7E06EB7F0EEB
773 3F0C148CEB1F98A2EB0FF0A36D5AA26D5AA26D5AA249C7FCA25BEA3006EAFC0E130C5B13
774 38EA7870EA3FE0EA1F8020277F9A23>I E /Fw 87 128 df<EB7E1F3901C1B180390303
775 E3C0000713C3000EEBC180903801C000A6B512FC380E01C0B0387F87FC1A1D809C18>11
776 D<137E3801C180EA0301380703C0120EEB018090C7FCA5B512C0EA0E01B0387F87F8151D
777 809C17>I<EB7FC0EA01C1EA03031207EA0E01A7B5FCEA0E01B0387FCFF8151D809C17>I<
778 90383F07E03901C09C18380380F0D80701133C000E13E00100131892C7FCA5B612FC390E
779 00E01CB03A7FC7FCFF80211D809C23>I<126012F0A71260AD1200A5126012F0A2126004
780 1E7C9D0C>33 D<EA6060EAF0F0EAF8F8EA6868EA0808A3EA1010A2EA2020EA4040EA8080
781 0D0C7F9C15>I<9038030180A39038060300A5EB0C06A4495A007FB512F8B612FC390030
782 1800A4495AA4B612FC6C14F83900C0600048485AA438030180A4D80603C7FCA31E257E9C
783 23>I<000F14C0EA188039306003803970380700386027FB38E010065CA25CA25C5CEA60
784 2000705B38304180EA1881390F0303C03900060620EC0C1090380C1C08EB1818EC380413
785 301360A213C0A2EA01803903001808141C0006EB0C1048EB06200004EB03C01E217E9E23
786 >37 D<13E0EA0310EA0608A2120EA45BA25B6C5AEC3FE09038800F80EC06000003130412
787 073809C00800115BEA30E03820F020EA607038E03840EB3C80131C90380F00207F0070EB
788 8040383009C0391830E180390FC03F001B1F7E9D20>I<126012F012F812681208A31210
789 A2122012401280050C7C9C0C>I<1380EA0100120212065AA25AA25AA35AA412E0AC1260
790 A47EA37EA27EA27E12027EEA0080092A7C9E10>I<7E12407E12307EA27EA27EA37EA413
791 80AC1300A41206A35AA25AA25A12205A5A092A7E9E10>I<1306ADB612E0A2D80006C7FC
792 AD1B1C7E9720>43 D<126012F0A212701210A41220A212401280040C7C830C>I<EAFFE0
793 A20B0280890E>I<126012F0A2126004047C830C>I<130113031306A3130CA31318A31330
794 A31360A213C0A3EA0180A3EA0300A31206A25AA35AA35AA35AA35AA210297E9E15>I<EA
795 03C0EA0C30EA1818EA300CA2EA700EEA6006A2EAE007ADEA6006A2EA700EEA300CA2EA18
796 18EA0C30EA07E0101D7E9B15>I<5A1207123F12C71207B3A5EAFFF80D1C7C9B15>I<EA07
797 C0EA1830EA201CEA400C130EEAF00F12F81307A21270EA000F130EA2131CA21338137013
798 6013C0EA0180EA0300EA0601120C1218EA1002EA3FFE127F12FF101C7E9B15>I<EA07E0
799 EA1830EA201CA2EA781E130E131E1238EA001CA2131813301360EA07C0EA0030131CA213
800 0E130FA2127012F8A3EAF00EEA401C1220EA1830EA07C0101D7E9B15>I<130CA2131C13
801 3CA2135C13DC139CEA011C120312021204120C1208121012301220124012C0B512C03800
802 1C00A73801FFC0121C7F9B15>I<EA300CEA3FF813F013C0EA2000A6EA23E0EA2C30EA30
803 18131CEA200E1200130FA3126012F0A3EA800EEA401E131CEA2038EA1870EA07C0101D7E
804 9B15>I<13F0EA030CEA0404EA0C0EEA181E1230130CEA7000A21260EAE3E0EAE430EAE8
805 18EAF00C130EEAE0061307A51260A2EA7006EA300E130CEA1818EA0C30EA03E0101D7E9B
806 15>I<1240387FFF801400A2EA4002485AA25B485AA25B1360134013C0A212015BA21203
807 A41207A66CC7FC111D7E9B15>I<EA03E0EA0C30EA1008EA200C13061260A21270A2EA7C
808 0CEA3E18EA3FB0EA1FE0EA07F013F8EA18FCEA307EEA601E130FEAC0071303A4EA600213
809 04EA300CEA1C10EA07E0101D7E9B15>I<EA03C0EA0C30EA1818EA300C1270EA600EEAE0
810 06A21307A51260EA700F1230EA1817EA0C27EA07C7EA0006A2130EEA300C127813181270
811 EA2030EA10C0EA0F80101D7E9B15>I<126012F0A212601200AA126012F0A2126004127C
812 910C>I<126012F0A212601200AA126012F0A212701210A41220A212401280041A7C910C>
813 I<007FB512C0B612E0C9FCA8B612E06C14C01B0C7E8F20>61 D<1306A3130FA3EB1780A2
814 EB37C01323A2EB43E01341A2EB80F0A338010078A2EBFFF83802003CA3487FA2000C131F
815 80001E5BB4EBFFF01C1D7F9C1F>65 D<B512C0380F00788080140E140FA4140E141E5C14
816 F8EBFFF0EB003C8080801580A5EC0F00A2141E1478B512E0191C7F9B1D>I<90381F8080
817 EBE0613801801938070007000E13035A14015A00781300A2127000F01400A80070148012
818 78A212386CEB0100A26C13026C5B380180083800E030EB1FC0191E7E9C1E>I<B512C038
819 0F00F0143C140E80A2EC038015C01401A215E0A815C0A21403158014071500140E5C1470
820 B512C01B1C7E9B20>I<B512FC380F003C140C1404A214061402A213011400A35B13FF13
821 037FA3140113001402A31406A2140C143CB512FC181C7E9B1C>I<B512F8380F00781418
822 1408A2140C1404A213011400A35B13FF13037FA490C7FCA8EAFFF8161C7E9B1B>I<9038
823 1F8080EBE0613801801938070007000E13035A14015A00781300A2127000F01400A6ECFF
824 F0EC0F80007013071278A212387EA27E6C130B380180113800E06090381F80001C1E7E9C
825 21>I<39FFF0FFF0390F000F00AC90B5FCEB000FAD39FFF0FFF01C1C7F9B1F>I<EAFFF0EA
826 0F00B3A8EAFFF00C1C7F9B0F>I<3807FF8038007C00133CB3127012F8A21338EA7078EA
827 4070EA30E0EA0F80111D7F9B15>I<39FFF01FE0390F000780EC060014045C5C5C5C5C49
828 C7FC13021306130FEB17801327EB43C0EB81E013016D7E1478A280143E141E80158015C0
829 39FFF03FF01C1C7F9B20>I<EAFFF8EA0F8090C7FCB01408A31418A2141014301470EB01
830 F0B5FC151C7E9B1A>I<B46CEBFF80000FECF800A2390BC00178A33809E002A23808F004
831 A3EB7808A3EB3C10A3EB1E20A3EB0F40A2EB0780A3EB0300121C3AFF8307FF80211C7E9B
832 26>I<B4EB1FF0390F8003809038C00100120BEA09E0EA08F0A21378133C133E131E130F
833 14811307EB03C1EB01E114F113001479147D143D141FA2808080121CB46C7E1C1C7F9B1F
834 >I<EB3F80EBE0E03803803848487E000E7F487F003C148000381303007814C0A2007013
835 0100F014E0A8007014C000781303A200381480003C1307001C14006C130E6C5B6C6C5A38
836 00E0E0EB3F801B1E7E9C20>I<B51280380F00E01478143C141C141EA5141C143C147814
837 E0EBFF8090C7FCACEAFFF0171C7E9B1C>I<EB3F80EBE0E03803803848487E000E7F487F
838 003C148000381303007814C0A20070130100F014E0A8007014C000781303A20038148038
839 3C0E07D81C111300380E208E0007135C3803A0783900F0E020133FEB0060EC3060EC38E0
840 EC3FC0A2EC1F80EC0F001B257E9C20>I<B5FC380F01E0EB007880141C141EA4141C143C
841 5CEB01E001FFC7FCEB01E0EB0070147880A61510A2141CA239FFF00E20C7EA03C01C1D7E
842 9B1F>I<3807E080EA1C19EA30051303EA600112E01300A36C13007E127CEA7FC0EA3FF8
843 EA1FFEEA07FFC61380130FEB07C0130313011280A300C01380A238E00300EAD002EACC0C
844 EA83F8121E7E9C17>I<007FB512C038700F010060130000401440A200C014201280A300
845 001400B1497E3803FFFC1B1C7F9B1E>I<39FFF01FF0390F000380EC0100B3A26C130213
846 8000035BEA01C03800E018EB7060EB0F801C1D7F9B1F>I<39FFE00FF0391F0003C0EC01
847 806C1400A238078002A213C000035BA2EBE00C00011308A26C6C5AA213F8EB7820A26D5A
848 A36D5AA2131F6DC7FCA21306A31C1D7F9B1F>I<3AFFE1FFC0FF3A1F003E003C001E013C
849 13186C6D1310A32607801F1320A33A03C0278040A33A01E043C080A33A00F081E100A390
850 38F900F3017913F2A2017E137E013E137CA2013C133C011C1338A2011813180108131028
851 1D7F9B2B>I<39FFF07FC0390FC01E003807800CEBC00800035B6C6C5A13F000005BEB78
852 80137C013DC7FC133E7F7F80A2EB13C0EB23E01321EB40F0497E14783801007C00027F14
853 1E0006131F001F148039FF807FF01C1C7F9B1F>I<39FFF003FC390F8001E00007EB00C0
854 6D13800003EB01006D5A000113026C6C5A13F8EB7808EB7C18EB3C10EB3E20131F6D5A14
855 C06D5AABEB7FF81E1C809B1F>I<12FEA212C0B3B312FEA207297C9E0C>91
856 D<EA0808EA1010EA2020EA4040A2EA8080A3EAB0B0EAF8F8EA7878EA30300D0C7A9C15>
857 I<12FEA21206B3B312FEA20729809E0C>I<EA1FC0EA3070EA78387F12301200A2EA01FC
858 EA0F1C12381270126000E01340A3EA603C38304E80381F870012127E9115>97
859 D<12FC121CAA137CEA1D87381E0180381C00C014E014601470A6146014E014C0381E0180
860 38190700EA10FC141D7F9C17>I<EA03F8EA0C0CEA181E1230EA700CEA600012E0A61260
861 EA70021230EA1804EA0C18EA03E00F127F9112>I<EB1F801303AAEA03F3EA0E0BEA1807
862 EA30031270126012E0A6126012701230EA1807EA0E1B3803E3F0141D7F9C17>I<EA07E0
863 EA0C30EA1818EA300CEA700EEA600612E0EAFFFEEAE000A41260EA70021230EA1804EA0C
864 18EA03E00F127F9112>I<13F8EA018CEA071E1206EA0E0C1300A6EAFFE0EA0E00B0EA7F
865 E00F1D809C0D>I<EB03803807C4C0EA1C783838388038301800EA701CA4EA3018EA3838
866 6C5AEA27C00020C7FCA21230EA3FF86CB4FC1480EA2003386001C0EAC000A33860018038
867 300300EA1C0EEA07F8121C7F9215>I<12FC121CAA137C1387EA1D03001E1380121CAD38
868 FF9FF0141D7F9C17>I<1218123CA21218C7FCA712FC121CB0EAFF80091D7F9C0C>I<13C0
869 EA01E0A2EA00C01300A7EA07E01200B3A21260EAF0C012F1EA6180EA3E000B25839C0D>
870 I<12FC121CAAEB0FE0EB0780EB06005B13105B5B13E0121DEA1E70EA1C781338133C131C
871 7F130F148038FF9FE0131D7F9C16>I<12FC121CB3A9EAFF80091D7F9C0C>I<39FC7E07E0
872 391C838838391D019018001EEBE01C001C13C0AD3AFF8FF8FF8021127F9124>I<EAFC7C
873 EA1C87EA1D03001E1380121CAD38FF9FF014127F9117>I<EA03F0EA0E1CEA1806487E00
874 701380EA600100E013C0A600601380EA700300301300EA1806EA0E1CEA03F012127F9115
875 >I<EAFC7CEA1D87381E0180001C13C0EB00E0A21470A614E0A2EB01C0001E1380381D07
876 00EA1CFC90C7FCA7B47E141A7F9117>I<3803E080EA0E19EA1805EA3807EA7003A212E0
877 A61270A2EA38071218EA0E1BEA03E3EA0003A7EB1FF0141A7F9116>I<EAFCE0EA1D38EA
878 1E78A2EA1C301300ACEAFFC00D127F9110>I<EA1F90EA2070EA4030EAC010A212E0EAF8
879 00EA7F80EA3FE0EA0FF0EA00F8EA8038131812C0A2EAE010EAD060EA8FC00D127F9110>
880 I<1204A4120CA2121C123CEAFFE0EA1C00A91310A5120CEA0E20EA03C00C1A7F9910>I<
881 38FC1F80EA1C03AD1307120CEA0E1B3803E3F014127F9117>I<38FF07E0383C0380381C
882 0100A2EA0E02A2EA0F06EA0704A2EA0388A213C8EA01D0A2EA00E0A3134013127F9116>
883 I<39FF3FC7E0393C0703C0001CEB01801500130B000E1382A21311000713C4A213203803
884 A0E8A2EBC06800011370A2EB8030000013201B127F911E>I<38FF0FE0381E0700EA1C06
885 EA0E046C5AEA039013B0EA01E012007F12011338EA021C1204EA0C0E487E003C138038FE
886 1FF014127F9116>I<38FF07E0383C0380381C0100A2EA0E02A2EA0F06EA0704A2EA0388
887 A213C8EA01D0A2EA00E0A31340A25BA212F000F1C7FC12F312661238131A7F9116>I<EA
888 7FFCEA70381260EA407013F013E0EA41C012031380EA0700EA0F04120E121CEA3C0CEA38
889 0812701338EAFFF80E127F9112>I<B512F01401808B15>I<B812802901808B2A>I<EA60
890 60EAF0F0A2EA60600C047C9C15>127 D E /Fx 4 115 df<EAFFF813FE38F00F80EB03C0
891 A2EB01E0A5EB03C0A2EB0F8038FFFE0013F800F0C7FCAB131A7D9919>80
892 D<EA07E0EA1FF8EA3C3CEA381CEA700EEA6006EAE007A5EAF00FEA700EEA781EEA3C3CEA
893 1FF8EA07E010117F9013>111 D<EAE7C0EAFFF0EAF878EAF038EAE01CA2130EA5131CA2
894 EAF0381370EAFFE0EAE7C0EAE000A70F187D9014>I<EAE1C012E712EFEAFE0012F85AA2
895 5AAA0A117E900D>114 D E /Fy 1 44 df<EA01C0A7B51280A33801C000A711117F9314>
896 43 D E /Fz 12 115 df<137013F01207127F12FF127B1203B3A3EA7FFE13FF13FE101E
897 7D9D17>49 D<EA07F0EA1FFC487E487E387C3F80EAF81F12F038700FC0126012201200A2
898 1480131F14005B137E137C5B485A485AEA078048C7FC5A121E5A387FFFC0B5FCA27E121E
899 7E9D17>I<EA07F0EA1FFC487E487EEAFC3F38701F8012201200A314005B137EEA07FC5B
900 13FEEA003FEB1F80130F14C0A5128038E01F80EAF83FB512006C5AEA1FFCEA07F0121F7E
901 9D17>I<133F5B5BA2EA01DFA21203139F1207A2EA0F1FA2121EA2123E123C127C127812
902 F8B512F0A438001F00A6141D7F9C17>I<381FFF805AA390C7FCA613FC13FF1480EB8FC0
903 1307123E001C13E01200A512201270EB0FC0EAFC1F387FFF806C13006C5AEA03F8131E7F
904 9C17>I<13F8EA03FC120F121F138448C7FC127EA2127CA2EAFCF8EAFDFEB5FCEB1F80EA
905 FE0F00FC13C0A8127CA2007E1380EA3E1F383FFF006C5A6C5AEA03F8121F7E9D17>I<B5
906 12C0A438000780EB0F005B133E133C137C137813F812015BA212035BA21207A35B120FA7
907 121D7E9C17>I<EA07F8EA1FFE487E481380EA7E1F38FC0FC0A6007C1380EA7E1F381FFE
908 006C5A487EEA3E1F387C0F8000FC13C0A7007C1380EA7E1FEA7FFF6C13006C5AEA07F812
909 1F7E9D17>I<EA7FFFB512C014F0A238FC03F81301EB00FCA6EB01F81303B512F014E014
910 8000FCC7FCAB127C161D7C9C1D>80 D<EA03FCEA0FFF003F13C0130F387E07E0EA7C0300
911 FC13F0A7007C13E0EA7E07EA7F0F383FFFC0000F1300EA03FC14137F9217>111
912 D<EA7C7CEAFDFFB5128038FE1FC0EAFC0FEB07E0A8EB0FC0A2EAFE1FB512801400EAFCFC
913 90C7FCA7127C131B7E9217>I<EA7C60EAFDE0A212FF13005AA25AAB127C0B137E920F>
914 114 D E /FA 48 122 df<126012F0A212701210A31220A21240A2040B7D830B>44
915 D<EAFFC0A20A0280880D>I<126012F0A2126004047D830B>I<EA0F80EA1060EA2030EA40
916 38EA803CEAC01C12E01240EA003C1338A21370136013C0EA018013001202EA0404120812
917 10EA3008EA3FF8127F12FF0E187E9713>50 D<EA07E0EA1838EA201CEA601EEA700EEA20
918 1E1200131CA213381370EA07E0EA0038131C130E130FA212E0A212C0EA400EEA601CEA18
919 38EA07E010187F9713>I<1318A21338137813F813B8EA01381202A21204120812181210
920 1220124012C0B5FCEA0038A6EA03FF10187F9713>I<126012F0A212601200A8126012F0
921 A212701210A31220A21240A204177D8F0B>59 D<130CA3131EA2132F1327A2EB4380A3EB
922 81C0A200017F1300A248B47E38020070A2487FA3487FA2003C131EB4EBFFC01A1A7F991D
923 >65 D<B51280380E00E014701438143CA514781470EB01E0380FFFC0380E00F01478143C
924 141C141EA4141C143C147814F0B512C0171A7F991B>I<EB3F023801C0C63803002E000E
925 131E48130E14065A007813021270A200F01300A600701302A21278003813047E14087E00
926 0313303801C0C038003F00171A7E991C>I<B512F8380E003814181408140C1404A3EB01
927 00A35BEA0FFFEA0E037FA3EB0002A314061404A2140C143CB512FC171A7F991A>69
928 D<B512F8380E003814181408140C1404A3EB0100A35BEA0FFFEA0E037FA390C7FCA8EAFF
929 E0161A7F9919>I<39FFE1FFC0390E001C00AB380FFFFC380E001CAC39FFE1FFC01A1A7F
930 991D>72 D<EAFF80EA1C00B3A6EAFF80091A7E990E>I<EAFFE0000EC7FCB01408A31418
931 14101430147014F0B5FC151A7F9918>76 D<B414FF000F14F0A2390B800170A23809C002
932 A33808E004A2EB7008A3EB3810A3EB1C20A2EB0E40A3EB0780A2EB0300121C39FF8307FF
933 201A7F9923>I<00FEEB7FC0000FEB0E001404EA0B80EA09C0A2EA08E01370A21338131C
934 A2130E1307EB0384A2EB01C4EB00E4A21474143CA2141C140C121C38FF80041A1A7F991D
935 >I<137F3801C1C038070070000E7F487F003C131E0038130E0078130F00707F00F01480
936 A80078EB0F00A20038130E003C131E001C131C6C5B6C5B3801C1C0D8007FC7FC191A7E99
937 1E>I<B51280380E01E0EB007014781438143CA4143814781470EB01E0380FFF80000EC7
938 FCABEAFFE0161A7F991A>I<B5FC380E01C0EB0070147880A55C1470EB01C0D80FFFC7FC
939 380E0380EB00C0801470A31478A31540143CEC1C8039FFE00F001A1A7F991C>82
940 D<EA0FC2EA1836EA200EEA600612C01302A3EAE0001270127EEA3FE0EA1FF8EA03FCEA00
941 7E130E130713031280A3EAC0021306EAE004EAD818EA87E0101A7E9915>I<007FB5FC38
942 701C0700401301A200C0148000801300A300001400B13803FFE0191A7F991C>I<39FFE0
943 7FC0390E000E001404B200065B12076C5B6C6C5A3800E0C0013FC7FC1A1A7F991D>I<3A
944 FF81FF07F03A3C007801C0001CEC0080A36C90389C0100A33907010E02A33903830F04EB
945 8207A2150C3901C40388A33900E801D0A390387000E0A301305B01201340241A7F9927>
946 87 D<39FF801FE0391E00070014066C13046C130CEB800800035BEA01C06D5A00001360
947 EB7040EB78801338011DC7FC131F130EAAEBFFC01B1A7F991D>89
948 D<EA1FC0EA38707FEA101C1200A2EA03FCEA1E1C1238127012E01480A2133CEA705F381F
949 8F0011107F8F13>97 D<12FC121CA913FCEA1D07381E0380381C01C0130014E0A6EB01C0
950 1480381E0300EA1906EA10F8131A809915>I<EA07F8EA1C1C1238EA700813005AA61270
951 1304EA3808EA1C18EA07E00E107F8F11>I<133F1307A9EA03E7EA0C17EA180F487E1270
952 12E0A6126012706C5AEA1C373807C7E0131A7F9915>I<EA07C0EA1C30EA30181270EA60
953 0C12E0EAFFFCEAE000A41260EA7004EA3808EA1C18EA07E00E107F8F11>I<EA01F0EA07
954 18EA0E38EA1C101300A6EAFFC0EA1C00AEEAFF800D1A80990C>I<EA0FCF381871803830
955 3000EA7038A4EA30306C5AEA2FC00060C7FCA21270EA3FF013FC6C7EEA600FEAC003A4EA
956 6006EA381CEA07E011187F8F13>I<12FC121CA9137CEA1D87381E0380A2121CAB38FF9F
957 F0141A809915>I<1218123CA212181200A612FC121CAE12FF081A80990A>I<EA0180EA03
958 C0A2EA0180C7FCA6EA0FC01201B21241EAE180EAE300127E0A2182990C>I<12FC121CB3
959 A6EAFF80091A80990A>108 D<38FC7C1F391D8E6380391E0781C0A2001C1301AB39FF9F
960 E7F81D107F8F20>I<EAFC7CEA1D87381E0380A2121CAB38FF9FF01410808F15>I<EA07E0
961 EA1C38EA300CEA700EEA6006EAE007A6EA6006EA700EEA381CEA1C38EA07E010107F8F13
962 >I<EAFCFCEA1D07381E0380381C01C0A2EB00E0A6EB01C01480381E0300EA1D06EA1CF8
963 90C7FCA6B47E1317808F15>I<EAFC78EA1D9CEA1E1C1308EA1C00ABEAFF800E10808F0F>
964 114 D<EA1F20EA60E0EA402012C0A2EAF000127FEA3FC0EA1FE0EA00F0EA8070133012C0
965 1320EAF040EA8F800C107F8F0F>I<1208A41218A21238EAFFC0EA3800A81320A41218EA
966 1C40EA07800B177F960F>I<38FC1F80EA1C03AB1307120CEA0E0B3803F3F01410808F15>
967 I<38FF0F80383C0700EA1C061304A26C5AA26C5AA3EA03A0A2EA01C0A36C5A11107F8F14
968 >I<39FE7F1F8039381C0700003C1306381C0C04130E380E16081317A238072310149013
969 A33803C1A014E0380180C0A319107F8F1C>I<38FE3F80383C1E00EA1C086C5AEA0F306C
970 5A6C5A12017F1203EA0270487E1208EA181CEA381E38FC3FC012107F8F14>I<38FF0F80
971 383C0700EA1C061304A26C5AA26C5AA3EA03A0A2EA01C0A36C5AA248C7FCA212E112E212
972 E4127811177F8F14>I E /FB 7 117 df<1303497EA2497EA3EB1BE0A2EB3BF01331A2EB
973 60F8A2EBE0FCEBC07CA248487EEBFFFE487FEB001F4814800006130FA248EB07C039FF80
974 3FFCA21E1A7F9921>65 D<EA1FF0EA383CEA7C1E7FA21238120013FFEA0FCFEA3E0F127C
975 12F8A31317387C27E0EA1FC313117F9015>97 D<12FCA2123CA713FE383F8780383E01C0
976 003C13E0EB00F0A214F8A514F0A2EB01E0003E13C0383B07803830FE00151A7E9919>I<
977 EA03FCEA0F0EEA1C1F123C1278130E00F8C7FCA51278A2383C0180381C0300EA0F06EA03
978 FC11117F9014>I<EAF8F0EAF938EA3A7CA2123C13381300A9EAFF80A20E117E9012>114
979 D<EA1FD8EA2078EA401812C0A2EAF000EAFF80EA7FE0EA3FF0EA07F8EA003CEAC00CA212
980 E01308EAF830EACFE00E117F9011>I<1206A4120EA2121EEA3FF012FFEA1E00A81318A5
981 EA0F30EA03E00D187F9711>I E /FC 24 127 df<1230127812FCA21278123006067685
982 1A>46 D<14C0EB01E0A2130314C013071480130F1400A25B131E133E133C137C1378A213
983 F85B12015B12035BA212075B120F90C7FC5A121EA2123E123C127C127812F85AA2126013
984 277DA21A>I<EA01FCEA07FF001F13C01307383C01E0387800F000701370A3007813F000
985 3813E0381E03C0380FFF803803FE00487E381F8FC0383C01E0387800F000701370481338
986 A46C137800701370007813F0383E03E0381FFFC000071300EA01FC151E7E9D1A>56
987 D<1230127812FCA2127812301200A91230127812FCA212781230061576941A>58
988 D<133E3801FF804813C03807C1E0EA0F00381E0F70383C3FF0EA387F387070F8EBE078A2
989 38E1C038A83870E070A2EB70E0EA387F383C3FC0381E0F00380F00383807C0F83803FFF0
990 6C13E038003F00151E7E9D1A>64 D<EA1FF0EA3FFC487EEA780FEA300738000380A2137F
991 EA07FF121FEA3F83EA7803127012E0A3EA7007EA780F383FFFFCEA1FFDEA07F016157D94
992 1A>97 D<EBFF80000313C0000F13E0EA1F01383C00C04813001270A25AA51270A2007813
993 707E381F01F0380FFFE0000313C03800FE0014157D941A>99 D<EB0FC0131F130F1301A6
994 EA01F1EA07FDEA0FFFEA1E0FEA3C07EA7803EA700112E0A7EA7003A2EA3807EA3E0F381F
995 FFF83807FDFC3801F1F8161E7E9D1A>I<EA01F8EA07FF481380381E07C0EA3C01387800
996 E01270481370A2B512F0A300E0C7FC1270A2007813707E381F01F0380FFFE00003138038
997 00FE0014157D941A>I<EB07E0EB1FF0EB3FF8EB7878EBF030EBE000A4387FFFF0B5FCA2
998 3800E000AF383FFF804813C06C1380151E7F9D1A>I<3801F87C3807FFFE5A381E078C38
999 1C0380383801C0A5381C0380EA1E07381FFF005BEA39F80038C7FCA27E381FFF8014E048
1000 13F83878007C0070131C48130EA40070131C0078133C003E13F8381FFFF0000713C00001
1001 130017217F941A>I<127E12FE127E120EA6133EEBFF80000F13C013C1EB80E01300120E
1002 AC387FC3FC38FFE7FE387FC3FC171E7F9D1A>I<13C0487EA26C5A90C7FCA6EA7FE0A312
1003 00AF387FFF80B512C06C1380121F7C9E1A>I<EA7FE012FF127F1200B3A6387FFFC0B512
1004 E06C13C0131E7D9D1A>108 D<EA7E3E38FEFF80007F13C0EA0FC1EB80E01300120EAC38
1005 7FC3FC38FFE7FE387FC3FC17157F941A>110 D<EA7E3E38FEFF80007F13E0380FC1F0EB
1006 8070EB0038120E141CA7000F13381478EB80F0EBC1E0EBFFC0000E1380EB3E0090C7FCA8
1007 EA7FC0487E6C5A16207F941A>112 D<387F81F838FF8FFC387F9FFE3803FE1EEBF80CEB
1008 E000A25B5BAAEA7FFFB5FC7E17157F941A>114 D<3807FB80EA1FFF127FEA7807EAE003
1009 A30078C7FCEA7FC0EA1FFCEA07FE38003F801307386001C012E0A2EAF00338FC0780B512
1010 00EAEFFEEAE3F812157C941A>I<487E1203A6387FFFE0B5FCA238038000AA1470A43801
1011 C1E013FF6C1380EB3F00141C7F9B1A>I<387E07E0EAFE0FEA7E07EA0E00AD1301EA0F03
1012 3807FFFC6C13FE3800FCFC17157F941A>I<387F83FC38FFC7FE387F83FC380E00E0A338
1013 0701C0A338038380A33801C700A3EA00EEA3137CA2133817157F941A>I<38FF83FEA338
1014 380038A26C1370A31338137CA2380C6C60380EEEE0A413C6000613C0EA07C71383A21715
1015 7F941A>I<387F83FC38FFC7FE387F83FC380E00E0A27EEB01C0A2EA0381EB838013C312
1016 01EBC700EA00E7A213E61366136E133CA31338A35BA2EA30F0EA78E01271EA7FC06C5A00
1017 1EC7FC17207F941A>121 D<EA0703381F8780EA3FCF38F9FE00EAF0FCEA607011067C9D
1018 1A>126 D E /FD 34 120 df<127012F812FCA212741204A41208A21210A21220124006
1019 0F7C840E>44 D<EAFFF8A20D02808B10>I<EA01F0EA071CEA0C06487E00381380A23870
1020 01C0A400F013E0AE007013C0A3EA780300381380A2381C0700EA0C06EA071CEA01F01322
1021 7EA018>48 D<13801203120F12F31203B3A9EA07C0EAFFFE0F217CA018>I<EA03F0EA0C
1022 1CEA100700201380384003C0A2008013E012F0EAF801A3EA2003120014C0A2EB07801400
1023 130E5B13185B5B5B485A90C7FC000213205A5A00181360481340383FFFC05AB5FC13217E
1024 A018>I<00101380381E0700EA1FFF5B13F8EA17E00010C7FCA6EA11F8EA120CEA1C0738
1025 1803801210380001C0A214E0A4127012F0A200E013C01280EA4003148038200700EA1006
1026 EA0C1CEA03F013227EA018>53 D<12401260387FFFE014C0A23840008038C00100128013
1027 02A2485A5BA25B5BA21360134013C0A21201A25B1203A41207A76CC7FC13237DA118>55
1028 D<EA01F0EA060C487EEA1807383803801270A238F001C0A314E0A5127013031238EA1805
1029 120CEA0619EA03E1380001C0A3EB0380A21230387807001306EA700CEA20186C5AEA0FC0
1030 13227EA018>57 D<127012F8A312701200AB127012F8A3127005157C940E>I<497EA349
1031 7EA3EB05E0A2EB09F01308A2EB1078A3497EA3497EA2EBC01F497EA248B51280EB0007A2
1032 0002EB03C0A348EB01E0A348EB00F0121C003EEB01F839FF800FFF20237EA225>65
1033 D<903807E0109038381830EBE0063901C0017039038000F048C7FC000E1470121E001C14
1034 30123CA2007C14101278A200F81400A812781510127C123CA2001C1420121E000E14407E
1035 6C6C13803901C001003800E002EB381CEB07E01C247DA223>67 D<B612C0380F80070007
1036 130114001540A215601520A314201500A3146014E013FF138014601420A315081400A215
1037 10A31530A2157015E0000F1303B6FC1D227EA121>69 D<EAFFFCEA0FC0EA0780B3ACEA0F
1038 C0EAFFFC0E227EA112>73 D<D8FFC0EB03FF000F15F0000715E0D805E01305A2D804F013
1039 09A301781311A36D1321A36D1341A26D1381A39038078101A3EB03C2A2EB01E4A3EB00F8
1040 A31470120E001FEC03F03AFFE0203FFF28227EA12D>77 D<39FF8007FF3907C000F81570
1041 D805E01320EA04F0A21378137C133C7F131F7FEB0780A2EB03C0EB01E0A2EB00F014F814
1042 78143C143E141E140FA2EC07A0EC03E0A21401A21400000E1460121FD8FFE0132020227E
1043 A125>I<3803F020380C0C60EA1802383001E0EA70000060136012E0A21420A36C1300A2
1044 1278127FEA3FF0EA1FFE6C7E0003138038003FC0EB07E01301EB00F0A214707EA46C1360
1045 A26C13C07E38C8018038C60700EA81FC14247DA21B>83 D<D8FFF0EB7FC0D81F80EB1F00
1046 000F140C000714087F00035C6C6C5B7F00005C6D13C0017C5BD93C01C7FC133EEB1E02EB
1047 1F06EB0F84EB078814D8EB03D014E01301AC1303EB3FFE22227FA125>89
1048 D<EA1FE0EA3038EA780C130EEA30071200A313FFEA07C7EA1E07123C1278127000F01308
1049 A3130FEA7817383C2390380FC1E015157E9418>97 D<EA01FEEA0703380C0780121C3838
1050 03000078C7FC127012F0A712700078134012386C1380380C0100EA0706EA01F812157E94
1051 16>99 D<EA01FCEA0707380C0380381C01C01238007813E0EA700012F0B5FC00F0C7FCA5
1052 12700078132012386C13406C138038070300EA00FC13157F9416>101
1053 D<133E13E33801C780EA0387130748C7FCA9EAFFF80007C7FCB27FEA7FF0112380A20F>
1054 I<120E12FE121E120EABEB1F80EB60C0EB80E0380F0070A2120EAF38FFE7FF18237FA21B
1055 >104 D<121C121E123E121E121CC7FCA8120E127E121E120EB1EAFFC00A227FA10E>I<12
1056 0E12FE121E120EABEB03FCEB01F014C01480EB02005B5B5B133813F8EA0F1CEA0E1E130E
1057 7F1480EB03C0130114E0EB00F014F838FFE3FE17237FA21A>107
1058 D<120E12FE121E120EB3ADEAFFE00B237FA20E>I<390E1FC07F3AFE60E183803A1E8072
1059 01C03A0F003C00E0A2000E1338AF3AFFE3FF8FFE27157F942A>I<380E1F8038FE60C038
1060 1E80E0380F0070A2120EAF38FFE7FF18157F941B>I<EA01FCEA0707380C0180381800C0
1061 003813E0481370A200F01378A700701370007813F0003813E0381C01C0380E0380380707
1062 00EA01FC15157F9418>I<EA0E1F38FE61C0380E8060380F0070000E1338143CA2141EA7
1063 143CA21438000F1370380E80E0EB41C0EB3F0090C7FCA9EAFFE0171F7F941B>I<EA0E3C
1064 EAFE46EA1E8FEA0F0F13061300120EAD120FEAFFF010157F9413>114
1065 D<EA0F88EA3078EA601812C01308A212E0EAF000127FEA3FE0EA0FF0EA01F8EA003CEA80
1066 1C130CA212C01308EAE018EAD030EA8FC00E157E9413>I<1202A41206A3120E121E123E
1067 EAFFFCEA0E00AB1304A6EA07081203EA01F00E1F7F9E13>I<000E137038FE07F0EA1E00
1068 000E1370AD14F0A238060170380382783800FC7F18157F941B>I<39FF8FF87F393E01E0
1069 3C001CEBC01814E0000E1410EB0260147000071420EB04301438D803841340EB8818141C
1070 D801C81380EBD00C140E3900F00F00497EA2EB6006EB400220157F9423>119
1071 D E /FE 7 118 df<1430A31478A314BCA2EB01BE141EA2EB021F80A2496C7EA3496C7E
1072 A3496C7EA201307FEB2000A2497FEB7FFFA2903880003CA348C77EA3000280A348EC0780
1073 120E001FEC0FC0D8FFC0EB7FFCA2262A7EA92B>65 D<EAFFFEA2EA07C05BB3A41504A515
1074 0CA3150815181538157815F81403B6FCA21E297DA824>76 D<13FCEA0387380601C0380C
1075 00E0121C481370127800701378143812F0A2B512F800F0C7FCA51270127800381308A26C
1076 1310000C13206C1340380381803800FE00151A7E9919>101 D<140F9038FC1080380387
1077 63380703C3390E01C100486C7EA2003C7FA5001C5BA26C485A6C485AD80B87C7FCEA08FC
1078 48C8FCA21218A2121C380FFFC06C13F8803818003E481307487F0040148000C01301A400
1079 60EB0300A26C1306000C1318000713703800FF8019287F9A1C>103
1080 D<121E12FEA2121E120EB3B2EAFFE0A20B2A7EA910>108 D<381E0FE038FE3030EB4018
1081 381E801C000E7FEA0F00A2120EB139FFE0FFE0A21B1A7E9920>110
1082 D<001E131E00FE13FEA2001E131E000E130EB0141EA20006132E6C134F3901818FE03800
1083 7E0F1B1A7E9920>117 D E /FF 55 123 df<EB0FF0EB7FFC3801F80E3803E01F48485A
1084 EA0F80A2141E140C91C7FCA4B6FCA2380F801FB2397FF0FFE0A21B237FA21F>12
1085 D<EB0FFF137F3801F83FEA03E0EA07C0EA0F8080A7B6FCA2380F801FB2397FF0FFE0A21B
1086 237FA21F>I<13181330136013C01201EA0380EA0700A2120E121E121C123CA35AA412F8
1087 5AAB7E1278A47EA3121C121E120E7EA2EA0380EA01C012001360133013180D317BA416>
1088 40 D<12C012607E7E121C7E7EA2EA038013C0120113E0A3EA00F0A413F81378AB13F813
1089 F0A4EA01E0A313C012031380EA0700A2120E5A12185A5A5A0D317DA416>I<1238127C12
1090 FEA3127C123807077C8610>46 D<13FE3807FFC0380F83E0381F01F0383E00F8A248137C
1091 A312FC147EAD007C137CA36C13F8A2381F01F0380F83E03807FFC03800FE0017207E9F1C
1092 >48 D<13181378EA01F812FFA21201B3A7387FFFE0A213207C9F1C>I<EA03FCEA0FFF38
1093 3C1FC0387007E0007C13F0EAFE0314F8A21301127CEA3803120014F0A2EB07E014C0EB0F
1094 80EB1F00133E13385BEBE018EA01C0EA0380EA0700000E1338380FFFF05A5A5AB5FCA215
1095 207D9F1C>I<13FE3807FFC0380F07E0381E03F0123FEB81F8A3EA1F0314F0120014E0EB
1096 07C0EB1F803801FE007F380007C0EB01F014F8EB00FCA2003C13FE127EB4FCA314FCEA7E
1097 01007813F8381E07F0380FFFC03801FE0017207E9F1C>I<14E013011303A21307130F13
1098 1FA21337137713E7EA01C71387EA03071207120E120C12181238127012E0B6FCA2380007
1099 E0A790B5FCA218207E9F1C>I<00301320383E01E0383FFFC0148014005B13F8EA33C000
1100 30C7FCA4EA31FCEA37FF383E0FC0383807E0EA3003000013F0A214F8A21238127C12FEA2
1101 00FC13F0A2387007E0003013C0383C1F80380FFF00EA03F815207D9F1C>I<EB1F80EBFF
1102 E03803E0703807C0F0380F01F8121F123EA2387E00F0007C1300A2EAFC08EB7FC0EBFFE0
1103 38FD80F038FF00F848137CA248137EA4127CA3003C137C123E001E13F86C13F0380783E0
1104 3803FFC0C6130017207E9F1C>I<12601278387FFFFEA214FC14F8A214F038E0006014C0
1105 38C00180EB0300A2EA00065B131C131813381378A25BA31201A31203A76C5A17227DA11C
1106 >I<13FE3803FFC0380703E0380E00F05A1478123C123E123F1380EBE0F0381FF9E0EBFF
1107 C06C13806C13C06C13E04813F0381E7FF8383C1FFCEA7807EB01FEEAF000143E141EA36C
1108 131C007813387E001F13F0380FFFC00001130017207E9F1C>I<EA01FE3807FF80380F83
1109 E0381E01F0EA3E004813F8147800FC137CA3147EA4007C13FEA2EA3E01381E037EEA0FFE
1110 EA07FCEA0020EB007CA2121E003F13F8A214F0EB01E0381E03C0381C0F80380FFE00EA03
1111 F817207E9F1C>I<1470A214F8A3497EA2497EA3EB067FA2010C7F143FA2496C7EA20130
1112 7F140F01707FEB6007A201C07F90B5FC4880EB8001A2D803007F14004880000680A23AFF
1113 E007FFF8A225227EA12A>65 D<B67E15F03907F001F86E7E157EA2157FA5157E15FE5DEC
1114 03F890B55AA29038F001FCEC007E811680151F16C0A6ED3F80A2ED7F00EC01FEB612F815
1115 C022227EA128>I<D903FE138090381FFF819038FF01E33901F8003FD803E0131F484813
1116 0F48481307121F48C71203A2481401127EA200FE91C7FCA8127EED0180127F7E15036C6C
1117 1400120F6C6C1306D803F05B6C6C13386CB413F090381FFFC0D903FEC7FC21227DA128>
1118 I<B67E15F03907F003FCEC007E81ED1F80ED0FC0ED07E0A216F01503A316F8A916F0A3ED
1119 07E0A2ED0FC0ED1F80ED3F00157EEC03FCB612F0158025227EA12B>I<B612FCA23807F0
1120 00153C151C150C150EA21506140CA31500141C143CEBFFFCA2EBF03C141C140CA21503A2
1121 14001506A3150EA2151E153EEC01FCB6FCA220227EA125>I<B612F8A23807F001EC0078
1122 15381518151CA2150CA21418A21500A214381478EBFFF8A2EBF07814381418A491C7FCA8
1123 B512C0A21E227EA123>I<D903FE134090391FFFC0C090387F00F1D801F8133F4848130F
1124 D807C01307000F1403485A48C71201A2481400127EA200FE1500A791380FFFFC127E007F
1125 9038001FC0A27EA26C7E6C7E6C7E6C7ED801FC133F39007F80E790381FFFC30103130026
1126 227DA12C>I<B51280A23807F000B3ACB51280A211227EA115>73
1127 D<B512C0A2D807F0C7FCB31518A41538A21570A215F014011407B6FCA21D227EA122>76
1128 D<D8FFF0EC0FFF6D5C000716E0D806FC1437A3017E1467A26D14C7A290391F800187A290
1129 390FC00307A3903807E006A2903803F00CA2903801F818A3903800FC30A2EC7E60A2EC3F
1130 C0A2EC1F80A3EC0F00D8FFF091B5FC140630227EA135>I<EB07FC90383FFF809038FC07
1131 E03903F001F848486C7E4848137E48487FA248C7EA1F80A24815C0007E140FA200FE15E0
1132 A9007E15C0007F141FA26C15806D133F001F15006C6C137E6C6C5B6C6C485A3900FC07E0
1133 90383FFF80D907FCC7FC23227DA12A>79 D<B6FC15E03907F007F0EC01FC1400157EA215
1134 7FA5157EA215FC1401EC07F090B512E0150001F0C7FCADB57EA220227EA126>I<B512FE
1135 ECFFC03907F007F0EC01F86E7E157E157FA6157E5D4A5AEC07F090B512C05D9038F00FE0
1136 6E7E6E7E6E7EA81606EC00FEEDFF0CB538803FF8ED0FF027227EA12A>82
1137 D<3801FE023807FF86381F01FE383C007E007C131E0078130EA200F81306A27E1400B4FC
1138 13E06CB4FC14C06C13F06C13F86C13FC000313FEEA003F1303EB007F143FA200C0131FA3
1139 6C131EA26C133C12FCB413F838C7FFE00080138018227DA11F>I<007FB61280A2397E03
1140 F80F00781407007014030060140100E015C0A200C01400A400001500B3A248B512F0A222
1141 227EA127>I<EA0FFC383FFF80387E07C0EB03E0130114F0123C1200A2133FEA03FDEA1F
1142 C1EA3F01127E12FCA4EA7E02EB0CF8381FF87F3807E03F18167E951B>97
1143 D<B4FCA2121FABEB0FE0EB3FF8EBE07CEB803E497EEC0F80A215C0A81580141F01801300
1144 EBC03E381EE07C381C3FF838180FC01A237EA21F>I<EBFF80000713E0380F83F0EA1F03
1145 123E127E387C01E090C7FC12FCA6127C127EA2003E13186C1330380FC0603807FFC0C613
1146 0015167E9519>I<EB01FEA2EB003EABEA01FC3807FFBE380F81FE381F007E003E133E12
1147 7E127C12FCA8127CA26C137E6C13FE380F83BE3907FF3FC0EA01FC1A237EA21F>I<13FE
1148 3807FF80380F87C0381E01E0003E13F0EA7C0014F812FCA2B5FCA200FCC7FCA3127CA212
1149 7E003E13186C1330380FC0703803FFC0C6130015167E951A>I<EB1FC0EB7FE0EBF1F0EA
1150 01E31203EA07C3EBC1E0EBC000A6EAFFFEA2EA07C0B2EA3FFCA2142380A211>I<3801FE
1151 0F3907FFBF80380F87C7381F03E7391E01E000003E7FA5001E5BEA1F03380F87C0EBFF80
1152 D809FEC7FC0018C8FCA2121C381FFFE06C13F86C13FE001F7F383C003F48EB0F80481307
1153 A40078EB0F006C131E001F137C6CB45A000113C019217F951C>I<B4FCA2121FABEB07E0
1154 EB1FF8EB307CEB403CEB803EA21300AE39FFE1FFC0A21A237EA21F>I<121C123FA25A7E
1155 A2121CC7FCA7B4FCA2121FB2EAFFE0A20B247EA310>I<B4FCA2121FABECFF80A2EC3800
1156 1460495A495A49C7FC130E5B137E13FF13CFEB0F806D7E6D7E1301806D7E147C143C39FF
1157 E0FFC0A21A237EA21E>107 D<B4FCA2121FB3ADEAFFE0A20B237EA210>I<3AFF07F007F0
1158 90391FFC1FFC3A1F303E303E01401340496C487EA201001300AE3BFFE0FFE0FFE0A22B16
1159 7E9530>I<38FF07E0EB1FF8381F307CEB403CEB803EA21300AE39FFE1FFC0A21A167E95
1160 1F>I<13FE3807FFC0380F83E0381E00F0003E13F848137CA300FC137EA7007C137CA26C
1161 13F8381F01F0380F83E03807FFC03800FE0017167E951C>I<38FF0FE0EB3FF8381FE07C
1162 EB803E497E1580A2EC0FC0A8EC1F80A29038803F00EBC03EEBE0FCEB3FF8EB0FC090C8FC
1163 A8EAFFE0A21A207E951F>I<EBFE033807FF87380FC1C7381F006F48133F127E80127C12
1164 FCA7127EA2003E5B6C5B380FC1DF3807FF9F3801FC1FC7FCA8ECFFE0A21B207E951E>I<
1165 EAFE1FEB3FC0381E67E013C71387A2381F83C090C7FCADEAFFF0A213167E9517>I<EA0F
1166 F3EA3FFFEA781FEA6007EAE003A212F000FCC7FCEA7FE013F8EA3FFEEA0FFF120138000F
1167 80EAC007130312E0A238F00700EAFC0EEAEFFCEAC7F011167E9516>I<487EA41203A212
1168 07A2120F123FB5FCA2EA0F80ABEB8180A5EB8300EA07C3EA03FEEA00F811207F9F16>I<
1169 38FF01FEA2381F003EAF147E14FE380F81BE3907FF3FC0EA01FC1A167E951F>I<39FFE0
1170 1FE0A2391F800700000F1306EBC00E0007130C13E000035BA26C6C5AA26C6C5AA2EB7CC0
1171 A2137F6D5AA26DC7FCA2130EA21B167F951E>I<3AFFE3FF07F8A23A1F007800C0903880
1172 7C01000F1580A23A07C07E030014DE5D3903E1DF06148FD801F1138CEBF307A2D800FF13
1173 D8EBFE0315F890387C01F0A2013C5BEB3800A225167F9528>I<39FFE07FC0A2390F801C
1174 006C6C5A6C6C5AEBF0606C6C5A3800F980137F6DC7FC7F80497E1337EB63E0EBC1F03801
1175 C0F848487E3807007E000E133E39FF80FFE0A21B167F951E>I<39FFE01FE0A2391F8007
1176 00000F1306EBC00E0007130C13E000035BA26C6C5AA26C6C5AA2EB7CC0A2137F6D5AA26D
1177 C7FCA2130EA2130CA25B1278EAFC3813305BEA69C0EA7F80001FC8FC1B207F951E>I<38
1178 7FFFF0A2387C03E0387007C0EA600F38E01F8000C01300133E137EC65A5B485A00031330
1179 EA07E013C0380F8070121F383F0060003E13E0EA7C03B5FCA214167E9519>I
1180 E /FG 15 118 df<B712C0A326003FF8CAFCB3B3A6F00380A41807A21900A360A360A260
1181 A260605F4D5A170F173FEE01FFB9FCA339477CC642>76 D<B500FC4DB512F8A26E5FD800
1182 3FF2E000A2D93BFFEF077FA201396D160EA201386D161CA36E6C1638A26E6C1670A36E6C
1183 16E0A26E6CED01C0A26E6CED0380A36E6CED0700A26E6D140EA26E6D5CA36F6C5CA26F6C
1184 5CA26F6C5CA36F6C495AA26F6C495AA36F6C49C7FCA26FEB800EA26F6D5AA3706C5AA270
1185 6C5AA2706C5AA393380FFDC0A270B45AA37090C8FCA2705AA2705A13FEB500FE4CB612F8
1186 1778A25D477BC668>I<B812F0EFFF8018E026003FF8C7EA7FF8EF0FFEEF03FF050013C0
1187 F07FE0183F19F0F01FF8A219FC180FA219FEA819FCA2181F19F8A2F03FF019E0187FF0FF
1188 C005031300EF0FFEEF7FF891B712E0188005F0C7FC02F8CAFCB3ACB612FEA33F477BC64B
1189 >80 D<B87E17FCEFFF8028003FF8000113E09338003FF8EF07FE717E717F717F727E727E
1190 A285181FA285A761A2183F61A24E5A4E5A4D5B4D90C8FC4D5AEF3FF8933801FFE091B712
1191 8005FCC9FC17FF9126F8000713C004007FEF3FF8717E717E717EA2717FA2717FAF1BE0A2
1192 717FA2067FEB01C0F03FF095391FF80380B600FE91380FFE0F0603B5120006005BCCEA0F
1193 F84B487BC651>82 D<903803FFC0013F13FC90B6FC2603F80113C03A07F0003FE06D6D7E
1194 486C6D7E8215078215036C48806C5AEA00C090C7FCA60203B5FC91B6FC010F13F390383F
1195 FC03EBFFC000031300485AEA0FF8485A123F485AEF0380485AA45DA26C6C130D151D6C6C
1196 013913876C6C0170EBCF003B0FFE03E07FFE6CB500805BC69039FE001FF8D91FF8EB07E0
1197 312E7CAD37>97 D<EC3FFC0103B512C0010F14F090393FE001FC90397F8000FE3901FE00
1198 014848497E485AA2485A121F496D5A003F6E5A1630007F92C7FC5BA312FFAA127FA27FA2
1199 123F7F001FED0380A26C6CEC07006C7E160E6C6C5C6C6C6C5B26007FE013F090393FFC03
1200 E0010FB55A010349C7FC9038003FF0292E7CAD31>99 D<EC7FF0903803FFFE011F6D7E90
1201 393FE03FE09039FF000FF048486D7E48486D7E48486D7E485A6F7E485A1780003F157FA2
1202 485A17C0A312FF90B7FCA301C0C9FCA6127FA27FA2123FA26C6CEC01C0A26C6CEC038012
1203 076C6CEC07006C6C140E6C6C6C5BD97FE0137890393FFC01F0010FB512C0010191C7FC90
1204 38003FF82A2E7DAD31>101 D<EC03FE91383FFF8091B512C00103EB0FE0903807FC1F90
1205 390FF83FF0EB1FF0EB3FE0A2137F9138C01FE001FFEB0FC0ED030092C7FCADB612F0A3C6
1206 01C0C7FCB3B3A4007FEBFFE0A324487EC721>I<177E9139FFC003FF010FD9FC0F138001
1207 3F9039FF1F0FC090397F807FF89039FE001FE04848130F4848D907F0138000079238F802
1208 0094C7FC48486D7EA2001F81A8000F5DA26C6C495AA200035D6C6C495A6C6C495A9039FF
1209 807F80D801BFB5C8FCD8038F13FC010013C04890CAFCA4487EA26C7E13F090B612C016FC
1210 6C15FF17C06C826C8283000782D80FF0C7127FD81FC0EC0FFE4848140348C97EA200FE82
1211 A6007F16FE6D1401003F5E6C6C4A5AD80FF0EC0FF0D807FCEC3FE03B01FFC003FF806C6C
1212 B548C7FC010F14F0010091C8FC32447DAE37>I<EB7F80B5FCA312037EB3B3B3AAB6FCA3
1213 18487DC71F>108 D<9039FF800FFCB590387FFF8092B57E913983E07FE0000390398700
1214 1FF06C018E80029C6D7E149802B0130702E080A25CA45CB3AAB60003B512FCA3362E7DAD
1215 3D>110 D<EC3FFC49B57E010F14F090393FF00FFC90397F8001FED801FEC7EA7F804848
1216 EC3FC04848EC1FE0A24848EC0FF04848EC07F8A2003F16FCA24848EC03FEA400FF16FFAA
1217 007F16FEA36D1407003F16FCA2001F16F86D140F000F16F06C6CEC1FE06D143F6C6CEC7F
1218 C06C6CECFF803B007F8001FE0090393FF00FFC010FB512F0010314C09026003FFCC7FC30
1219 2E7DAD37>I<9039FF801FF8B590B5FC028314C091398FC07FF0000390399E000FF86C01
1220 F86D7E4A6D7E4A6D7E4A6D13804A15C0177F18E0A2173F18F0A3EF1FF8AB18F0173FA318
1221 E0177F18C017FF18806E5B6E15006E495A6EEB0FFC029E495A91398F80FFE00287B55A02
1222 8149C7FC9138803FF092C9FCB1B6FCA335427DAD3D>I<01FF137FB53801FFC04A13F091
1223 380783F80003EB0E076C90381C0FFC1438A2147091386007F8A29138E001E04AC7FCA45C
1224 B3A9B612C0A3262E7DAD2C>114 D<D9FF80EB03FEB5EB03FFA30003EC000F6C1507B3AB
1225 160FA2161FA26C153F16776D6C13E7ED01C7903A3FF00787FF010FB5000713FC6D13FC90
1226 38007FE0362E7DAD3D>117 D E end
1227 %%EndProlog
1228 %%BeginSetup
1229 %%Feature: *Resolution 300dpi
1230 TeXDict begin
1232 %%EndSetup
1233 %%Page: 1 1
1234 1 0 bop 875 253 a FG(Pro)m(p)314 349 y(Lan)n(guage)35
1235 b(Reference)j(Man)-5 b(ual)771 440 y FF(\(for)18 b(v)n(ers)q(ion)g
1236 (2.3.4\))840 572 y FE(Allen)f(Leu)o(n)o(g)684 630 y FD(E-m)o(ail:)j
1237 FC(leunga@cs.)o(nyu)o(.e)o(du)529 688 y(http://va)o(lis)o(.c)o(s.n)o
1238 (yu.)o(edu)o(:8)o(888)o(/~l)o(eu)o(nga)531 746 y FD(Couran)o(t)d(Inst)o
1239 (it)o(u)o(t)o(e)e(of)h(Ma)o(t)n(h)o(em)o(a)o(t)o(ical)d(Science)q(s)800
1240 805 y(251)k(M)o(ercer)f(Street)764 863 y(New)g(Y)l(or)o(k,)g(NY)f
1241 (10012)852 972 y(A)m(pr)q(il)g(7,)h(1997)906 2126 y FB(A)n(bstract)161
1242 2192 y FA(Thi)q(s)c(reference)h(m)o(an)n(ual)h(pro)o(vid)o(e)q(s)g(an)e
1243 (in)o(tro)q(d)o(u)o(ct)o(ion)i(t)o(o)e Fz(Pro)o(p)p FA(,)g(releas)q(e)i
1244 (2.3.4.)i Fz(Pro)o(p)c FA(i)q(s)g(a)g(m)n(ul)o(t)o(iparadi)q(gm)j(ext)o
1245 (en-)104 2237 y(s)q(ion)e(of)f(C)p Fy(++)p FA(,)f(an)o(d)i(i)q(s)f(d)o
1246 (e)q(s)q(ign)o(e)q(d)i(for)e(building)j(high)f(p)q(erform)o(ance)f
1247 (compiler)h(an)o(d)f(lan)o(guage)i(transform)o(a)o(t)o(ion)f(syst)o
1248 (ems,)104 2283 y(us)q(in)o(g)f(pa)o(t)o(t)o(er)q(n)e(m)o(a)o(t)o(c)o
1249 (hin)o(g)j(an)o(d)e(rewr)q(it)o(in)o(g.)18 b(Thi)q(s)12
1250 b(guid)o(e)h(d)o(e)q(scr)q(ib)q(e)q(s)g(t)n(h)o(e)f(syn)o(t)o(ax)g(an)o
1251 (d)g(s)q(em)o(an)o(t)o(ics)g(of)g(t)n(h)o(e)g Fz(Pro)o(p)g
1252 FA(lan)o(guage)104 2329 y(an)o(d)h(d)o(e)q(scr)q(ib)q(e)q(s)i(h)o(o)o
1253 (w)e(t)o(o)g(d)o(ev)o(elo)o(p)i(programs)f(us)q(in)o(g)g(t)n(h)o(e)g
1254 Fz(Pro)o(p)f FA(t)o(o)h(C)p Fy(++)d FA(transla)o(t)o(or.)0
1255 2411 y(Th)o(e)i(a)o(u)o(t)n(h)o(or)i(will)g(n)o(e)q(it)n(h)o(er)h(assu)
1256 o(m)o(e)f(re)q(sp)q(ons)q(ibili)q(t)o(y)h(for)e(an)o(y)g(d)o(am)o(age)q
1257 (s)h(ca)o(us)q(e)q(d)f(b)o(y)g(t)n(h)o(e)g(us)q(e)g(of)f(t)n(hi)q(s)h
1258 (pro)q(d)o(u)o(ct,)h(nor)f(accept)g(w)o(arran)o(t)o(y)0
1259 2457 y(or)g(up)q(d)o(a)o(t)o(e)i(claims.)21 b(Thi)q(s)15
1260 b(pro)q(d)o(u)o(ct)g(i)q(s)f(di)q(str)q(ibu)o(t)o(e)q(d)i(in)f(t)n(h)o
1261 (e)g(h)o(o)o(p)q(e)f(t)n(h)o(a)o(t)h(it)f(will)i(b)q(e)e(us)q(eful,)g
1262 (bu)o(t)h(WITHOUT)e(ANY)h(W)l(ARRANTY;)0 2502 y(wit)n(h)o(ou)o(t)h(ev)o
1263 (en)e(t)n(h)o(e)h(implie)q(d)h(w)o(arran)o(t)o(y)e(of)g(MER)o(CHANT)m
1264 (ABILITY)e(or)i(FITNESS)g(F)o(OR)g(A)g(P)m(AR)m(TICULAR)e(PURPOSE.)0
1265 2560 y(Thi)q(s)i(pro)q(d)o(u)o(ct)h(i)q(s)f(in)h(t)n(h)o(e)g(pu)n(blic)
1266 h(dom)o(ain,)f(an)o(d)f(m)o(ay)h(b)q(e)e(f)q(reely)i(di)q(str)q(ibu)o
1267 (t)o(e)q(d.)0 2621 y Fx(Pro)o(p)e FA(i)q(s)i(a)f(re)q(s)q(earc)o(h)g
1268 (prot)o(ot)o(yp)q(e.)18 b(Th)o(e)13 b(inform)o(a)o(t)o(ion)i(con)o(t)o
1269 (ain)o(e)q(d)g(in)f(t)n(hi)q(s)g(do)q(cu)o(m)o(en)o(t)g(i)q(s)f(su)n(b)
1270 r(ject)h(t)o(o)g(c)o(h)o(an)o(ge)g(wit)n(h)o(ou)o(t)h(not)o(ice.)980
1271 2753 y Fw(1)p eop
1272 %%Page: 1 2
1273 1 1 bop 0 45 a Fv(Con)n(t)n(en)n(t)o(s)0 148 y Fu(1)38
1274 b(In)o(tro)q(d)o(u)o(ct)o(i)o(on)1631 b(4)62 210 y Fw(1.1)42
1275 b(Av)n(aila)o(bilit)o(y)28 b Ft(:)20 b(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1276 (:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)
1277 h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1278 (:)h(:)f(:)64 b Fw(4)62 271 y(1.2)42 b(Organiza)o(t)o(ion)13
1279 b(of)g(t)n(hi)q(s)h(Reference)i(Man)n(ual)25 b Ft(:)20
1280 b(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g
1281 (:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)64
1282 b Fw(4)0 375 y Fu(2)38 b(Gen)o(eral)14 b(Concept)o(s)1523
1283 b(5)62 436 y Fw(2.1)42 b(Syn)o(t)o(act)o(ic)13 b(Con)o(v)o(en)o(t)o
1284 (ions)34 b Ft(:)20 b(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)
1285 h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1286 (:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)64 b Fw(5)62 498
1287 y(2.2)42 b(Bas)q(ic)13 b(syn)o(t)o(act)o(ic)h(class)q(e)q(s)32
1288 b Ft(:)20 b(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g
1289 (:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)
1290 g(:)h(:)f(:)g(:)g(:)h(:)f(:)64 b Fw(5)62 559 y(2.3)42
1291 b(Lit)o(erals)d Ft(:)21 b(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h
1292 (:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)
1293 f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h
1294 (:)f(:)64 b Fw(5)62 621 y(2.4)42 b(Th)o(e)14 b Fz(Pro)o(p)g
1295 Fw(Lan)o(guage)41 b Ft(:)21 b(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1296 (:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)
1297 h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)64
1298 b Fw(5)0 724 y Fu(3)38 b(Lexer)16 b(an)o(d)f(P)o(ars)q(er)f(Gen)o(era)o
1299 (t)o(ion)1285 b(7)62 786 y Fw(3.1)42 b(Lexer)15 b(Sp)q(eci\014ca)o(t)o
1300 (ion)27 b Ft(:)20 b(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f
1301 (:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)
1302 g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)64 b Fw(7)158
1303 848 y(3.1.1)46 b(Regular)13 b(expre)q(ss)q(ions)39 b
1304 Ft(:)21 b(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f
1305 (:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)
1306 g(:)g(:)h(:)f(:)64 b Fw(7)158 909 y(3.1.2)46 b(Lexem)o(e)34
1307 b Ft(:)21 b(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f
1308 (:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)
1309 g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)64 b Fw(8)158
1310 971 y(3.1.3)46 b(Lexem)o(e)13 b(class)35 b Ft(:)21 b(:)f(:)g(:)g(:)h(:)
1311 f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f
1312 (:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)
1313 f(:)64 b Fw(8)158 1032 y(3.1.4)46 b(T)m(ok)o(ens)13 b
1314 Ft(:)20 b(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h
1315 (:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)
1316 f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)64 b
1317 Fw(9)158 1094 y(3.1.5)46 b(Th)o(e)14 b Fs(matchscan)e
1318 Fw(st)o(a)o(t)o(em)o(en)o(t)25 b Ft(:)c(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f
1319 (:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)
1320 f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)64 b Fw(9)158 1156 y(3.1.6)46
1321 b(Class)14 b Fs(LexerBuffer)g Ft(:)20 b(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h
1322 (:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)
1323 f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b
1324 Fw(11)158 1217 y(3.1.7)j(Class)14 b Fs(IOLexerBuffer)35
1325 b Ft(:)20 b(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g
1326 (:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)
1327 g(:)h(:)f(:)43 b Fw(12)158 1279 y(3.1.8)j(Class)14 b
1328 Fs(IOLexerStack)24 b Ft(:)d(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f
1329 (:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)
1330 f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(12)62 1340 y(3.2)f(P)o(ars)q
1331 (er)15 b(Sp)q(eci\014ca)o(t)o(ion)d Ft(:)20 b(:)h(:)f(:)g(:)g(:)h(:)f
1332 (:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)
1333 g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f
1334 (:)43 b Fw(13)158 1402 y(3.2.1)j(Syn)o(t)o(ax)13 b(class)i
1335 Ft(:)20 b(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h
1336 (:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)
1337 h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(13)158 1464
1338 y(3.2.2)j(Syn)o(t)o(ax)13 b(d)o(eclara)o(t)o(ion)29 b
1339 Ft(:)20 b(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h
1340 (:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)
1341 f(:)g(:)g(:)h(:)f(:)43 b Fw(13)158 1525 y(3.2.3)j(Prece)q(d)o(ence)38
1342 b Ft(:)20 b(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h
1343 (:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)
1344 h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(14)158 1587
1345 y(3.2.4)j Fs(expect:)17 b Ft(n)40 b(:)20 b(:)h(:)f(:)g(:)g(:)h(:)f(:)g
1346 (:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)
1347 g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43
1348 b Fw(14)158 1649 y(3.2.5)j(Pro)q(d)o(u)o(ct)o(ion)13
1349 b(rule)q(s)35 b Ft(:)20 b(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g
1350 (:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)
1351 g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(15)158
1352 1710 y(3.2.6)j(P)o(ars)q(er)15 b(rep)q(ort)27 b Ft(:)21
1353 b(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1354 (:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)
1355 h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(16)158 1772 y(3.2.7)j(In)o(t)o(erf)q
1356 (acin)o(g)13 b(wit)n(h)h(t)n(h)o(e)h(gen)o(era)o(t)o(e)q(d)g(lexer)f
1357 Ft(:)20 b(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g
1358 (:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43
1359 b Fw(16)62 1833 y(3.3)f(De)o(buggin)o(g)13 b(P)o(ars)q(ers)33
1360 b Ft(:)20 b(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h
1361 (:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)
1362 h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(16)0 1937
1363 y Fu(4)38 b(Alge)o(braic)14 b(Da)o(t)o(a)o(t)o(yp)q(e)q(s)g(an)o(d)g(P)
1364 o(a)o(t)n(t)o(er)q(n)f(Ma)o(t)o(c)o(hin)o(g)972 b(17)62
1365 1998 y Fw(4.1)42 b(A)14 b(quic)o(k)f(t)o(our)i(of)e(pa)o(t)n(t)o(er)q
1366 (n)h(m)o(a)o(t)o(c)o(hin)o(g)27 b Ft(:)21 b(:)f(:)g(:)g(:)h(:)f(:)g(:)h
1367 (:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)
1368 h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(17)158 2060
1369 y(4.1.1)j(P)o(a)o(t)n(t)o(er)q(n)14 b(m)o(a)o(t)o(c)o(hin)o(g)f(v)o
1370 (ersus)i(ob)r(ject-or)q(ien)o(t)o(e)q(d)g(st)o(yle)28
1371 b Ft(:)21 b(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f
1372 (:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(18)158 2121 y(4.1.2)j(More)14
1373 b(example)q(s)27 b Ft(:)20 b(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)
1374 f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f
1375 (:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(19)158
1376 2183 y(4.1.3)j(V)m(ar)q(ian)o(t)o(s)13 b(of)g(m)o(a)o(t)o(c)o(h)e
1377 Ft(:)20 b(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1378 (:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)
1379 h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(22)62 2245 y(4.2)f(Alge)o(braic)14
1380 b(Da)o(t)o(a)o(t)o(yp)q(e)q(s)33 b Ft(:)21 b(:)f(:)g(:)g(:)h(:)f(:)g(:)
1381 h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1382 (:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43
1383 b Fw(23)158 2306 y(4.2.1)j(Inst)o(an)o(t)o(ia)o(t)o(in)o(g)12
1384 b(a)i(d)o(a)o(t)o(a)o(t)o(yp)q(e)30 b Ft(:)20 b(:)h(:)f(:)g(:)g(:)h(:)f
1385 (:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)
1386 g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(25)62
1387 2368 y(4.3)f(P)o(a)o(t)n(t)o(er)q(n)14 b(Ma)o(t)o(c)o(hin)o(g)21
1388 b Ft(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)
1389 h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1390 (:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(25)62
1391 2430 y(4.4)f(Re\014nin)o(g)13 b(a)h(d)o(a)o(t)o(a)o(t)o(yp)q(e)h
1392 Ft(:)20 b(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h
1393 (:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)
1394 h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(27)62 2491
1395 y(4.5)f(M)o(emory)13 b(m)o(an)o(agem)o(en)o(t)c Ft(:)21
1396 b(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1397 (:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)
1398 h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(29)158 2553 y(4.5.1)j(Garbage)13
1399 b(collect)o(ion)29 b Ft(:)20 b(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g
1400 (:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)
1401 g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(29)158
1402 2614 y(4.5.2)j(P)o(ers)q(i)q(st)o(ence)37 b Ft(:)20 b(:)h(:)f(:)g(:)g
1403 (:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)
1404 h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1405 (:)h(:)f(:)43 b Fw(30)p eop
1406 %%Page: 2 3
1407 2 2 bop 1959 -100 a Fw(2)0 45 y Fu(5)38 b(Inference)1676
1408 b(32)62 107 y Fw(5.1)42 b(An)14 b(Example)e Ft(:)20 b(:)g(:)h(:)f(:)g
1409 (:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)
1410 g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g
1411 (:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(32)158 168 y(5.1.1)j(Anot)n(h)o(er)
1412 15 b(example)23 b Ft(:)d(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)
1413 h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1414 (:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(33)62
1415 230 y(5.2)f(Inference)16 b(Class)31 b Ft(:)21 b(:)f(:)g(:)h(:)f(:)g(:)g
1416 (:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)
1417 h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1418 (:)h(:)f(:)43 b Fw(33)62 292 y(5.3)f(Inference)16 b(R)n(ule)q(s)27
1419 b Ft(:)21 b(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f
1420 (:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)
1421 g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(34)0
1422 395 y Fu(6)38 b(T)l(ree)16 b(Rewr)q(it)o(in)o(g)1552
1423 b(35)62 456 y Fw(6.1)42 b(A)14 b(rewr)q(it)o(in)o(g)f(example)30
1424 b Ft(:)21 b(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f
1425 (:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)
1426 f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(35)158 518 y(6.1.1)j(Con)o(dit)
1427 o(ion)o(al)11 b(rewr)q(it)o(in)o(g)j(an)o(d)g(act)o(ions)k
1428 Ft(:)j(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g
1429 (:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43
1430 b Fw(36)62 580 y(6.2)f(Rewr)q(it)o(e)13 b(class)35 b
1431 Ft(:)20 b(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h
1432 (:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)
1433 f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b
1434 Fw(37)62 641 y(6.3)f(Rewr)q(it)o(in)o(g)13 b(rule)q(s)27
1435 b Ft(:)21 b(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f
1436 (:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)
1437 g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(37)62
1438 703 y(6.4)f(Rewr)q(it)o(in)o(g)13 b(mo)q(di\014ers)f
1439 Ft(:)20 b(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h
1440 (:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)
1441 h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(38)158 764
1442 y(6.4.1)j(Rewr)q(it)o(in)o(g)13 b(mo)q(di\014er)g(example)23
1443 b Ft(:)d(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)
1444 g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43
1445 b Fw(38)62 826 y(6.5)f(Th)o(e)14 b Fs(rewrite)e Fw(st)o(a)o(t)o(em)o
1446 (en)o(t)41 b Ft(:)20 b(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h
1447 (:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)
1448 h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(40)158 888
1449 y(6.5.1)j(Rewr)q(it)o(in)o(g)13 b(mo)q(d)o(e)q(s)27 b
1450 Ft(:)20 b(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1451 (:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)
1452 h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(41)158 949 y(6.5.2)j(St)o(a)o(t)o(e)14
1453 b(cac)o(hin)o(g)g(o)o(pt)o(imiza)o(t)o(io)o(n)h Ft(:)21
1454 b(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1455 (:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43
1456 b Fw(41)158 1011 y(6.5.3)j(Sp)q(ecifyin)o(g)13 b(s)q(econ)o(d)o(ary)i
1457 (in)o(dice)q(s)g Ft(:)20 b(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f
1458 (:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)
1459 g(:)g(:)h(:)f(:)43 b Fw(42)158 1073 y(6.5.4)j(Us)q(in)o(g)13
1460 b(an)h(in)o(t)o(er)q(n)o(al)f(in)o(d)o(ex)40 b Ft(:)20
1461 b(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g
1462 (:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)
1463 43 b Fw(42)158 1134 y(6.5.5)j(Us)q(in)o(g)13 b(an)h(ext)o(er)q(n)o(al)g
1464 (in)o(d)o(ex)33 b Ft(:)20 b(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1465 (:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)
1466 h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(43)62 1196 y(6.6)f(Sh)o(ort)14
1467 b(circuit)o(in)o(g)g(rewr)q(it)o(e)g(pa)o(t)n(hs)h(wit)n(h)e
1468 Fs(cutrewrite)28 b Ft(:)20 b(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)
1469 f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43
1470 b Fw(45)62 1257 y(6.7)f(Con)o(dit)o(ion)o(al)11 b(f)q(ailure)i(wit)n(h)
1471 h Fs(failrewrite)38 b Ft(:)20 b(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g
1472 (:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)
1473 g(:)h(:)f(:)43 b Fw(46)62 1319 y(6.8)f(Con\015uence)15
1474 b(an)o(d)e(t)o(ermin)o(a)o(t)o(ion)29 b Ft(:)21 b(:)f(:)g(:)h(:)f(:)g
1475 (:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)
1476 g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43
1477 b Fw(46)62 1381 y(6.9)f(De)o(buggin)o(g)13 b(T)m(ree)i(Rewr)q(it)o(in)o
1478 (g)21 b Ft(:)f(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1479 (:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)
1480 h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(47)62 1442 y(6.10)21
1481 b(Opt)o(imizin)o(g)12 b(T)m(ree)i(Rewr)q(it)o(in)o(g)e
1482 Ft(:)20 b(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h
1483 (:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)
1484 f(:)g(:)g(:)h(:)f(:)43 b Fw(47)0 1545 y Fu(7)38 b(Us)q(er)15
1485 b(d)o(e\014n)o(e)q(d)f(d)o(a)o(t)o(a)o(t)o(yp)q(e)q(s:)20
1486 b(Views)1232 b(49)62 1607 y Fw(7.1)42 b(A)14 b(\014rst)h(example)23
1487 b Ft(:)e(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)
1488 g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g
1489 (:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(49)62
1490 1669 y(7.2)f(Anot)n(h)o(er)15 b(view)e(example)29 b Ft(:)20
1491 b(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h
1492 (:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)
1493 f(:)g(:)g(:)h(:)f(:)43 b Fw(51)62 1730 y(7.3)f(Syn)o(t)o(ax)13
1494 b(of)g(view)h(d)o(e\014nit)o(ions)32 b Ft(:)20 b(:)h(:)f(:)g(:)h(:)f(:)
1495 g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f
1496 (:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43
1497 b Fw(52)0 1833 y Fu(8)38 b(Graph)15 b(T)o(yp)q(e)q(s)g(an)o(d)g(Graph)f
1498 (Rewr)q(it)o(in)o(g)1129 b(54)62 1895 y Fw(8.1)42 b(Graph)13
1499 b(T)o(yp)q(e)q(s)33 b Ft(:)20 b(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g
1500 (:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)
1501 g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43
1502 b Fw(54)62 1957 y(8.2)f(Th)o(e)14 b(Graph)f(In)o(t)o(erf)q(ace)31
1503 b Ft(:)21 b(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f
1504 (:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)
1505 f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(54)62 2018 y(8.3)f(Set)14
1506 b(F)m(orm)o(ali)q(sm)o(s)24 b Ft(:)d(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)
1507 g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g
1508 (:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)
1509 43 b Fw(54)62 2080 y(8.4)f(Graph)13 b(Rewr)q(it)o(in)o(g)30
1510 b Ft(:)20 b(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g
1511 (:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)
1512 g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(55)0
1513 2183 y Fu(9)38 b(R)m(u)o(nnin)o(g)14 b(t)n(h)o(e)h(T)l(ransla)o(t)o(or)
1514 1383 b(56)62 2245 y Fw(9.1)42 b(Opt)o(ions)33 b Ft(:)21
1515 b(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1516 (:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)
1517 h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43
1518 b Fw(56)62 2306 y(9.2)f(Error)14 b(M)o(e)q(ssage)q(s)28
1519 b Ft(:)21 b(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f
1520 (:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)
1521 g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(57)0
1522 2410 y Fu(A)26 b(Garbage)15 b(Co)o(llect)o(ion)e(in)i(t)n(h)o(e)g
1523 Fr(Pro)o(p)g Fu(Library)1063 b(63)62 2471 y Fw(A.1)32
1524 b(In)o(tro)q(d)o(u)o(ct)o(ion)16 b Ft(:)k(:)g(:)h(:)f(:)g(:)h(:)f(:)g
1525 (:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)
1526 g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g
1527 (:)g(:)h(:)f(:)43 b Fw(63)62 2533 y(A.2)32 b(Th)o(e)14
1528 b(F)m(ram)o(ew)o(or)o(k)19 b Ft(:)i(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g
1529 (:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)
1530 g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43
1531 b Fw(63)62 2594 y(A.3)32 b(Our)14 b(F)m(ram)o(ew)o(or)o(k)k
1532 Ft(:)j(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g
1533 (:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)
1534 g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(63)p
1536 %%Page: 3 4
1537 3 3 bop 1959 -100 a Fw(3)62 45 y(A.4)32 b(Th)o(e)14 b(Implem)o(en)o(t)o
1538 (a)n(t)o(ion)33 b Ft(:)21 b(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h
1539 (:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)
1540 f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b
1541 Fw(64)62 107 y(A.5)32 b(Arc)o(hit)o(ect)o(ure)18 b Ft(:)i(:)g(:)h(:)f
1542 (:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)
1543 g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f
1544 (:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(64)62 168 y(A.6)32
1545 b(Th)o(e)14 b(Programm)o(a)o(t)o(i)o(c)d(In)o(t)o(erf)q(ace)20
1546 b Ft(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)
1547 g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g
1548 (:)g(:)h(:)f(:)43 b Fw(64)62 230 y(A.7)32 b(M)o(emory)13
1549 b(Allo)q(ca)o(t)o(ion)20 b Ft(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f
1550 (:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)
1551 f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43
1552 b Fw(65)62 292 y(A.8)32 b(Th)o(e)14 b(GC)f(Prot)o(o)q(col)24
1553 b Ft(:)c(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)
1554 h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1555 (:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(66)62
1556 353 y(A.9)32 b(M)o(e)q(ssage)q(s)16 b(an)o(d)e(St)o(a)o(t)o(i)q(st)o
1557 (ics)42 b Ft(:)20 b(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f
1558 (:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)
1559 f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(66)62 415 y(A.10)11
1560 b(Th)o(e)j(Bart)n(let)n(t)h(st)o(yle)g(most)n(ly)d(co)o(p)o(yin)o(g)i
1561 (collect)o(or)j Ft(:)j(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1562 (:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43
1563 b Fw(68)62 476 y(A.11)11 b(Th)o(e)j(Mar)o(k)g(Sw)o(eep)h(collect)o(or)
1564 27 b Ft(:)20 b(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g
1565 (:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)
1566 h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(68)62 538 y(A.12)11 b(Fin)o(aliza)o(t)o
1567 (ion)25 b Ft(:)20 b(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f
1568 (:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)
1569 f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43
1570 b Fw(68)158 600 y(A.12.1)15 b(W)m(eak)e(P)o(oin)o(t)o(ers)40
1571 b Ft(:)20 b(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g
1572 (:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)
1573 g(:)h(:)f(:)g(:)g(:)h(:)f(:)43 b Fw(69)158 661 y(A.12.2)15
1574 b(Th)o(e)f(Heap)g(W)m(alk)o(er)g Ft(:)20 b(:)g(:)h(:)f(:)g(:)h(:)f(:)g
1575 (:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)
1576 g(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)h(:)f(:)43
1577 b Fw(70)p eop
1578 %%Page: 4 5
1579 4 4 bop 0 -82 1981 3 v 0 -100 a Fq(1.)22 b Fp(Intr)o(oduction)1565
1580 b Fw(4)0 45 y Fv(1)66 b(In)n(tro)r(d)n(u)n(ct)n(ion)0
1581 148 y Fw(Thi)q(s)16 b(i)q(s)f(t)n(h)o(e)i(lan)o(guage)e(reference)k(m)o
1582 (an)n(ual)14 b(for)i Fz(Pro)o(p)p Fw(,)g(a)g(compiler)f(gen)o(era)o(t)o
1583 (or.)26 b Fz(Pro)o(p)16 b Fw(can)h(b)q(e)f(us)q(e)q(d)h(t)o(o)f(gen)o
1584 (era)o(t)o(e)h(lexers,)0 198 y(pars)q(ers,)22 b(an)o(alys)q(i)q(s)17
1585 b(an)o(d)i(transform)o(a)o(t)o(ion)e(t)o(o)q(ols)i(us)q(in)o(g)f(pa)o
1586 (t)n(t)o(er)q(n)i(m)o(a)o(t)o(c)o(hin)o(g)e(an)o(d)h(rewr)q(it)o(in)o
1587 (g.)33 b(Th)o(e)20 b Fz(Pro)o(p)f Fw(lan)o(guage)g(i)q(s)f(a)0
1588 247 y Fo(multi-p)n(ar)n(adigm)11 b Fw(ext)o(ens)q(ion)h(of)f(C)p
1589 Fs(++)p Fw([Str91)o(])g(an)o(d)h(C)p Fs(++)f Fw(programs)f(gen)o(era)o
1590 (t)o(e)q(d)k(f)q(rom)9 b Fz(Pro)o(p)j Fw(sp)q(eci\014ca)o(t)o(ions)h
1591 (can)f(b)q(e)f(compile)q(d)0 297 y(in)o(t)o(o)i(e\016cien)o(t)i(co)q(d)
1592 o(e.)54 359 y(V)m(ers)q(ion)e(2.3.4)g(of)g Fz(Pro)o(p)h
1593 Fw(includ)o(e)q(s)h(t)n(h)o(e)g(follo)o(win)o(g)c(m)o(a)r(jor)h(fea)o
1594 (t)o(ure)q(s:)51 454 y(1.)20 b(Alge)o(braic)13 b(d)o(a)o(t)o(a)o(t)o
1595 (yp)q(e)q(s)g(an)o(d)g(pa)o(t)n(t)o(er)q(n)h(m)o(a)o(t)o(c)o(hin)o(g,)d
1596 (an)o(d)i(a)n(u)o(t)o(om)o(a)o(t)o(ic)f(m)o(ap)o(pin)o(g)f(of)i(alge)o
1597 (braic)f(d)o(a)o(t)o(a)o(t)o(yp)q(e)q(s)i(in)o(t)o(o)e(C)p
1598 Fs(++)h Fw(class)104 504 y(hierarc)o(hie)q(s.)51 587
1599 y(2.)20 b(A)c(LALR\(1\))g(pars)q(er)h(gen)o(era)o(t)o(or)g(in)f(t)n(h)o
1600 (e)h(tradit)o(ion)e(of)g Fo(yac)n(c)i Fw(an)o(d)e Fo(bison)p
1601 Fw(.)25 b(Eac)o(h)17 b(gramm)o(a)o(r)d(i)q(s)h(encapsula)o(t)o(e)q(d)j
1602 (in)o(t)o(o)d(a)104 636 y(pars)q(er)g(class)g(an)o(d)e(it)h(i)q(s)f(p)q
1603 (oss)q(ible)h(t)o(o)g(h)o(a)o(v)o(e)g(m)n(ul)o(t)o(iple)e(inst)o(ance)q
1604 (s)j(of)e(a)h(pars)q(er.)51 719 y(3.)20 b(Regular)13
1605 b(expre)q(ss)q(ion)i(str)q(in)o(g)f(m)o(a)o(t)o(c)o(hin)o(g)f(an)o(d)g
1606 (lexer)i(gen)o(era)o(t)o(ion.)51 802 y(4.)20 b(T)m(ransform)o(a)o(t)o
1607 (ion)11 b(of)i(alge)o(braic)h(d)o(a)o(t)o(a)o(t)o(yp)q(e)q(s)g(us)q(in)
1608 o(g)g(con)o(dit)o(ion)o(al)e(rewr)q(it)o(in)o(g.)51 885
1609 y(5.)20 b(In)12 b(addit)o(ion,)f(us)q(in)o(g)h(t)n(h)o(e)h(view)f(m)o
1610 (ec)o(h)o(ani)q(sm,)d(it)j(i)q(s)g(p)q(oss)q(ible)g(t)o(o)h(trea)o(t)g
1611 (ext)o(er)q(n)o(ally)f(d)o(e\014n)o(e)q(d)i(C)e(or)g(C)p
1612 Fs(++)g Fw(d)o(a)o(t)o(a)g(stru)o(ct)o(ure)q(s)104 935
1613 y(as)i(if)f(t)n(h)o(ey)i(w)o(ere)g Fz(Pro)o(p)g Fw(d)o(e\014n)o(e)q(d)g
1614 (d)o(a)o(t)o(a)o(t)o(yp)q(e)q(s.)k(Th)o(e)c(full)e(ran)o(ge)i(of)e(pa)o
1615 (t)n(t)o(er)q(n)i(m)o(a)o(t)o(c)o(hin)o(g)d(an)o(d)i(rewr)q(it)o(in)o
1616 (g)g(capa)o(bilit)o(y)f(can)104 985 y(b)q(e)h(us)q(e)q(d)g(on)g(t)n(h)o
1617 (e)q(s)q(e)h(ext)o(er)q(n)o(ally)f(d)o(e\014n)o(e)q(d)h(d)o(a)o(t)o
1618 (a..)54 1080 y(In)f(addit)o(ion,)e(w)o(e)i(in)o(t)o(en)o(d)f(t)o(o)h
1619 (implem)o(en)o(t/\014x-up)c(t)n(h)o(e)15 b(follo)o(win)o(g)c(fea)o(t)o
1620 (ure)q(s)16 b(in)d(t)n(h)o(e)i(n)o(ear)f(fu)o(t)o(ure:)51
1621 1175 y(1.)20 b(P)o(ers)q(i)q(st)o(ence.)51 1258 y(2.)g(Pret)n(t)o(y)15
1622 b(pr)q(in)o(t)o(in)o(g/readin)o(g.)51 1341 y(3.)20 b(Vi)q(sualiza)o(t)o
1623 (ion)12 b(of)h(d)o(a)o(t)o(a)h(stru)o(ct)o(ure)q(s)i(us)q(in)o(g)e
1624 Fo(vc)n(g)p Fw([San94)o(,)f(San95].)51 1424 y(4.)20 b(A)n(u)o(t)o(om)o
1625 (a)o(t)o(ic)12 b(m)o(ap)o(pin)o(g)g(of)i(graph)f(stru)o(ct)o(ure)j(sp)q
1626 (eci\014ca)o(t)o(ions)e(in)o(t)o(o)g(C)p Fs(++)f Fw(class)q(e)q(s.)51
1627 1507 y(5.)20 b(Graph)13 b(rewr)q(it)o(in)o(g)h(syst)o(em)g(gen)o(era)o
1628 (t)o(ion.)0 1635 y FF(1.1)56 b(Av)m(aila)n(bilit)n(y)0
1629 1723 y Fw(Th)o(e)14 b(la)o(t)o(e)q(st)g(releas)q(e)i(of)d
1630 Fz(Pro)o(p)h Fw(2.3.4)f(i)q(s)g(a)o(v)n(aila)o(ble)e(f)q(rom)166
1631 1818 y Fs(http://valis.cs.ny)o(u.ed)o(u:888)o(8/~le)o(unga/)o(prop.)o
1632 (html)0 1913 y Fw(New)j(up)q(d)o(a)o(t)o(e)q(s)i(of)d(t)n(h)o(e)i
1633 (source)g(co)q(d)o(e)g(an)o(d)e(do)q(cu)o(m)o(en)o(t)o(a)o(t)o(ion)g
1634 (will)f(b)q(e)i(a)o(v)n(aila)o(ble)d(f)q(rom)h(t)n(hi)q(s)i(s)q(it)o
1635 (e.)0 2041 y FF(1.2)56 b(Organiza)o(t)n(ion)18 b(of)h(t)n(hi)q(s)f
1636 (Reference)f(Man)n(ual)0 2129 y Fw(Thi)q(s)g(reference)j(m)o(an)n(ual)
1637 15 b(i)q(s)i(organize)q(d)g(as)h(follo)o(ws.)26 b(Sect)o(ion)17
1638 b(2)g(o)o(v)o(erviews)h(t)n(h)o(e)g(gen)o(eral)g(fea)o(t)o(ure)q(s)g
1639 (of)f Fz(Pro)o(p)p Fw(.)29 b(Sect)o(ion)17 b(3)0 2179
1640 y(d)o(e)q(scr)q(ib)q(e)q(s)c(t)n(h)o(e)g(lexer)f(an)o(d)f(pars)q(er)i
1641 (sp)q(eci\014ca)o(t)o(ion)f(form)o(alism)o(s.)j(Sect)o(ion)d(4)f(d)o(e)
1642 q(scr)q(ib)q(e)q(s)i(t)n(h)o(e)g(alge)o(braic)e(d)o(a)o(t)o(a)o(t)o(yp)
1643 q(e)q(s)h(an)o(d)f(pa)o(t)n(t)o(er)q(n)0 2229 y(m)o(a)o(t)o(c)o(hin)o
1644 (g)i(fea)o(t)o(ure)q(s.)22 b(Sect)o(ion)16 b(6)e(d)o(e)q(scr)q(ib)q(e)q
1645 (s)i(t)n(h)o(e)g(tree)g(rewr)q(it)o(in)o(g)f(m)o(ec)o(h)o(ani)q(sm.)i
1646 (Fin)o(ally)m(,)c(s)q(ect)o(ion)i(9)g(d)o(e)q(scr)q(ib)q(e)q(s)h(t)n(h)
1647 o(e)g(pro)q(ce)q(ss)0 2279 y(of)d(ru)o(nnin)o(g)i(t)n(h)o(e)f
1648 Fz(Pro)o(p)h Fw(transla)o(t)o(or.)54 2340 y(W)m(e'll)10
1649 b(us)q(e)k(t)n(h)o(e)f(follo)o(win)o(g)d(ext)o(en)o(d)o(e)q(d)k(BNF)g
1650 (not)o(a)o(t)o(ion)d(t)o(o)i(sp)q(ecify)g(t)n(h)o(e)g(syn)o(t)o(ax)g
1651 (of)f(t)n(h)o(e)h(lan)o(guage.)k(T)m(ermin)o(als)11 b(are)i(t)o(yp)q(e)
1652 q(s)q(et)0 2390 y(in)h Fs(typewriter)f Fw(fon)o(t,)h(while)g(non-t)o
1653 (ermin)o(als)g(are)h(t)o(yp)q(e)q(s)q(et)h(in)e Fo(ital)r(lics)g
1654 Fw(fon)o(t.)20 b(Giv)o(en)14 b(a)g(syn)o(t)o(act)o(ic)h(class)h
1655 Fo(S)p Fw(,)f(w)o(e)g(us)q(e)g Fo(S)q Fs(,)g Ft(:)7 b(:)g(:)0
1656 2440 y Fs(,)15 b Fo(S)g Fw(t)o(o)g(d)o(enot)o(e)h(on)o(e)f(or)g(more)f
1657 (o)q(ccurrence)q(s)k(of)c Fo(S)h Fw(s)q(epara)o(t)o(e)q(d)h(b)o(y)f
1658 (comm)o(as.)j(Similarly)l(,)12 b Fo(S)p Fs(;)j Ft(:)7
1659 b(:)g(:)14 b Fs(;)h Fo(S)g Fw(d)o(enot)o(e)q(s)h(on)o(e)f(or)g(more)0
1660 2490 y(o)q(ccurrence)q(s)k(of)d Fo(S)h Fw(s)q(epara)o(t)o(e)q(d)g(b)o
1661 (y)f(s)q(emi-colons.)23 b(Slan)o(t)o(e)q(d)15 b(brac)o(k)o(et)o(s)j
1662 (are)f(us)q(e)q(d)g(t)o(o)f(d)o(enot)o(e)h(an)f(o)o(pt)o(ion)o(al)f(o)q
1663 (ccurrence)k(of)c(a)0 2540 y(syn)o(t)o(act)o(ic)d(class.)19
1664 b(W)m(e'll)11 b(com)n(bin)o(e)q(d)g(t)n(h)o(e)i(t)o(w)o(o)f(forms)f(wh)
1665 o(en)i(w)o(e)g(w)o(an)o(t)f(t)o(o)h(d)o(enot)o(e)g(zero)h(or)e(more)g
1666 (o)q(ccurrence)q(s)k(of)c(som)o(e)f(t)o(erm.)0 2590 y(F)m(or)i
1667 (example,)f Fo([)j(S)p Fs(,)g Ft(:)7 b(:)g(:)13 b Fs(,)i
1668 Fo(S)g(])e Fw(d)o(enot)o(e)q(s)j(zero)f(or)f(more)e(o)q(ccurrence)q(s)
1669 18 b(of)13 b Fo(S)p Fw(.)p eop
1670 %%Page: 5 6
1671 5 5 bop 0 -82 1981 3 v 0 -100 a Fq(2.)22 b Fp(General)d(Concepts)1435
1672 b Fw(5)0 45 y Fv(2)66 b(Gen)n(eral)21 b(Concept)o(s)0
1673 156 y FF(2.1)56 b(Syn)n(t)n(act)n(ic)18 b(Con)n(v)n(en)n(t)n(ions)0
1674 245 y Fw(Th)o(e)f(syn)o(t)o(ax)g(of)f Fz(Pro)o(p)h Fw(i)q(s)g(an)f(ext)
1675 o(ens)q(ion)h(of)g(C)p Fs(++)p Fw(.)26 b(Most)18 b(n)o(ew)f(constru)o
1676 (ct)o(s)j(of)c Fz(Pro)o(p)h Fw(st)o(art)o(s)i(wit)n(h)e(n)o(ew)g(k)o
1677 (eyw)o(ords,)g(li)q(st)o(e)q(d)0 294 y(b)q(elo)o(w.)25
1678 428 y Fs(applicative)47 b(arb)246 b(as)f(bagof)180 b(begin)136
1679 b(bitfield)113 b(card)25 478 y(category)g(classof)158
1680 b(collectable)47 b(constraint)70 b(dataflow)g(datatype)113
1681 b(declare)25 528 y(dequeof)135 b(dom)246 b(domain)157
1682 b(edges:)h(elsif)136 b(end)223 b(equiv:)25 578 y(exists)157
1683 b(expect:)h(feature)135 b(finalizable)48 b(forall)114
1684 b(fun)223 b(function)25 627 y(functor)135 b(graphrewrite)48
1685 b(graphtype)91 b(implies:)114 b(inference)48 b(inherited)91
1686 b(inline)25 677 y(instantiate)47 b(is)268 b(law)223 b(left:)180
1687 b(less)158 b(lexeme)f(listof)25 727 y(loop)201 b(mapof)h(match)179
1688 b(matchall)114 b(matchscan)48 b(module)157 b(multimapof)25
1689 777 y(mutable)135 b(nodes:)180 b(of)245 b(persistent)70
1690 b(prec:)136 b(printable)91 b(priqueueof)25 827 y(procedure)g(queueof)
1691 158 b(ran)223 b(refine)158 b(relation)70 b(rewrite)135
1692 b(right:)25 877 y(setof)179 b(sharing)158 b(signature)91
1693 b(space:)158 b(syntax)114 b(synthesized)47 b(then)25
1694 926 y(time:)179 b(topdown)158 b(traced)f(treeparser)70
1695 b(tupleof)92 b(unifiable)f(unique)25 976 y(view)201 b(where)h(with)f
1696 (xor:)h(bottomup:)48 b(topdown:)113 b(before:)25 1026
1697 y(preorder:)91 b(postorder:)h(cutrewrite)69 b(failrewrite)48
1698 b(index:)54 1119 y Fw(In)14 b(addit)o(ion,)e(t)n(h)o(e)i(follo)o(win)o
1699 (g)d(n)o(ew)k(m)n(ul)o(t)o(i-c)o(h)o(aract)o(er)e(sym)n(b)q(ols)f(are)i
1700 (add)o(e)q(d:)65 1214 y Fs(<->)43 b(<=>)g(:=)g(:-)h(.\()65
1701 b(.[)65 1264 y(#[)g(#\()g(#{)43 b([|)h(|])65 b(\(|)43
1702 b(|\))g({|)g(|})0 1392 y FF(2.2)56 b(Bas)q(ic)17 b(syn)n(t)n(act)n(ic)i
1703 (clas)q(s)q(e)r(s)0 1480 y Fw(W)m(e'll)9 b(us)q(e)j Fo(Inte)n(ger)p
1704 Fw(,)f Fo(Char)p Fw(,)g Fo(R)n(e)n(al)p Fw(,)h Fo(String)f
1705 Fw(an)o(d)f Fo(Id)i Fw(t)o(o)f(d)o(enot)o(e)i(t)n(h)o(e)f(syn)o(t)o
1706 (act)o(ic)f(class)q(e)q(s)i(of)d(in)o(t)o(egers,)j(c)o(h)o(aract)o
1707 (ers,)g(real)e(n)n(u)o(m)n(b)q(ers,)0 1530 y(str)q(in)o(gs)16
1708 b(an)o(d)g(id)o(en)o(t)o(i\014ers,)g(re)q(sp)q(ect)o(iv)o(ely)m(.)24
1709 b(As)16 b(in)f(C)p Fs(++)p Fw(,)g(c)o(h)o(aract)o(ers)j(are)e(quot)o(e)
1710 q(d)f(wit)n(h)h(t)n(h)o(e)g(s)q(in)o(gle)g(quot)o(e)q(s)g
1711 Fs(')p Fw(,)f(while)g(str)q(in)o(gs)0 1580 y(are)f(quot)o(e)q(d)g(wit)n
1712 (h)f(dou)n(ble)h(quot)o(e)q(s)g Fs(")p Fw(.)k(An)13 b(id)o(en)o(t)o
1713 (i\014er)i(i)q(s)e(an)o(y)g(s)q(equence)i(of)e(alph)o(an)n(u)o(m)o(er)q
1714 (ic)g(of)g(c)o(h)o(aract)o(ers)i(t)n(h)o(a)o(t)f(b)q(egins)f(wit)n(h)0
1715 1629 y(a)18 b(let)n(t)o(er.)33 b(In)19 b(addit)o(ion,)e(w)o(e'll)h(us)q
1716 (e)h(t)n(h)o(e)g(syn)o(t)o(act)o(ic)f(class)i Fo(Stmt)e
1717 Fw(t)o(o)h(d)o(enot)o(e)g(an)o(y)f(v)n(alid)f(com)n(bin)o(a)o(t)o(ion)f
1718 (of)h(C)p Fs(++)h Fw(an)o(d)h Fz(Pro)o(p)0 1679 y Fw(st)o(a)o(t)o(em)o
1719 (en)o(t)o(s.)0 1807 y FF(2.3)56 b(Lit)n(erals)0 1896
1720 y Fw(In)19 b(addit)o(ion)f(t)o(o)h(t)n(h)o(e)h(usual)f(C)p
1721 Fs(++)g Fw(lit)o(erals,)g Fz(Pro)o(p)h Fw(in)o(tro)q(d)o(u)o(ce)q(s)g
1722 (t)o(w)o(o)f(n)o(ew)g(t)o(yp)q(e)g(of)g(lit)o(erals:)28
1723 b Fo(quark)20 b(liter)n(als)d Fw(an)o(d)i Fo(r)n(e)n(gular)0
1724 1946 y(expr)n(ession)c(liter)n(als)p Fw(.)i(Quar)o(k)d(lit)o(erals)f
1725 (are)i(of)e(t)o(yp)q(e)h Fs(Quark)f Fw(an)o(d)g(are)i(wr)q(it)n(t)o(en)
1726 f(as)g(str)q(in)o(gs)g(pre\014xe)q(d)i(b)o(y)d(t)n(h)o(e)i
1727 Fs(#)f Fw(sym)n(b)q(ol.)129 2040 y Fo(Quark)49 b Fu(::=)i
1728 Fs(#)p Fo(String)54 2135 y Fw(Quar)o(ks)22 b(act)f(lik)o(e)f(a)o(t)o
1729 (oms)g(in)h(Li)q(sp,)g(in)g(whic)o(h)f(n)o(am)o(e)g(equalit)o(y)g
1730 (implie)q(s)f(p)q(oin)o(t)o(er)i(equalit)o(y)m(.)38 b(In)21
1731 b(con)o(trast,)i(in)d(C)p Fs(++)0 2185 y Fw(t)o(w)o(o)e(str)q(in)o(g)h
1732 (lit)o(erals)f(t)n(h)o(a)o(t)g(are)h(id)o(en)o(t)o(ical)f(in)g(v)n
1733 (alue)f(do)i(not)f(n)o(ece)q(ssar)q(ily)i(re)q(s)q(id)o(e)f(in)f(t)n(h)
1734 o(e)h(sam)o(e)f(addre)q(ss.)34 b(Giv)o(en)17 b(str)q(in)o(gs)0
1735 2235 y Fs(s1)h Fw(an)o(d)g Fs(s2)p Fw(,)g Fs(strcmp\(s1,s2\))h(==)j(0)c
1736 Fw(do)q(e)q(s)h(not)f(imply)d Fs(s1)22 b(==)f(s2)p Fw(.)31
1737 b(Quar)o(ks)19 b(are)g(d)o(e\014n)o(e)q(d)h(in)e(t)n(h)o(e)h(library)e
1738 (includ)o(e)i(\014le)0 2285 y Fs(<AD/strings/quark)o(.h>)p
1739 Fw(.)54 2346 y(Regular)e(expre)q(ss)q(ion)i(lit)o(erals)e(are)i(s)q
1740 (imilar)c(t)o(o)j(str)q(in)o(g)g(lit)o(erals)f(except)j(t)n(h)o(a)o(t)e
1741 (t)n(h)o(ey)g(are)g(quot)o(e)q(d)h(b)o(y)e(slash)o(e)q(s)i
1742 Fs(/)p Fw(.)30 b(W)m(e'll)0 2396 y(di)q(scuss)15 b(t)n(h)o(e)g(regular)
1743 e(expre)q(ss)q(ion)j(in)d(s)q(ect)o(ion)h(3.1.1.)0 2524
1744 y FF(2.4)56 b(Th)n(e)18 b Fz(Pro)o(p)i FF(Lan)o(guage)0
1745 2613 y Fw(Th)o(e)14 b(bas)q(ic)g Fz(Pro)o(p)g Fw(lan)o(guage)f(i)q(s)h
1746 (t)n(h)o(e)g(sam)o(e)f(as)h(C)p Fs(++)f Fw(wit)n(h)h(t)n(h)o(e)h(follo)
1747 o(win)o(g)c(syn)o(t)o(act)o(ic)j(ext)o(ens)q(ions:)p
1749 %%Page: 6 7
1750 6 6 bop 0 -82 1981 3 v 0 -100 a Fq(2.)22 b Fp(General)d(Concepts)1435
1751 b Fw(6)264 38 y Fu(K)o(eyw)o(ords)416 b(F)l(u)o(nct)o(ions)191
1752 88 y Fz(1)50 b Fs(datatype)12 b(refine)g(instantiate)48
1753 b Fw(Alge)o(braic)14 b(d)o(a)o(t)o(a)o(t)o(yp)q(e)f(d)o(e\014nit)o
1754 (ions)191 138 y Fz(2)50 b Fs(match)12 b(matchall)324
1755 b Fw(P)o(a)o(t)n(t)o(er)q(n)15 b(m)o(a)o(t)o(c)o(hin)o(g)191
1756 188 y Fz(3)50 b Fs(rewrite)468 b Fw(Rewr)q(it)o(in)o(g)191
1757 238 y Fz(4)50 b Fs(lexeme)490 b Fw(Lexical)13 b(ca)o(t)o(egory)h(d)o
1758 (e\014nit)o(ion)191 288 y Fz(5)50 b Fs(matchscan)424
1759 b Fw(Lexical)13 b(scannin)o(g)191 337 y Fz(6)50 b Fs(syntax)490
1760 b Fw(P)o(ars)q(er)15 b(sp)q(eci\014ca)o(t)o(ion)191 387
1761 y Fz(7)50 b Fs(graphtype)424 b Fw(Graph)13 b(d)o(a)o(t)o(a)h(stru)o(ct)
1762 o(ure)i(sp)q(eci\014ca)o(t)o(ion)191 437 y Fz(8)50 b
1763 Fs(graphrewrite)358 b Fw(Graph)13 b(rewr)q(it)o(in)o(g)54
1764 530 y(Lik)o(e)d(C)p Fs(++)p Fw(,)h(a)g Fz(Pro)o(p)g Fw(i)q(s)g(t)o
1765 (ypically)e(divid)o(e)q(d)i(in)o(t)o(o)g(t)n(h)o(e)g
1766 Fo(sp)n(e)n(ci\014c)n(ation)p Fw(,)h(whic)o(h)f(d)o(e\014n)o(e)q(s)h(t)
1767 n(h)o(e)g(d)o(a)o(t)o(a)f(stru)o(ct)o(ure)i(an)o(d)e(it)o(s)g(in)o(t)o
1768 (erf)q(ace,)0 580 y(an)o(d)20 b(t)n(h)o(e)g Fo(implementation)g
1769 Fw(part)o(s.)37 b Fz(Pro)o(p)21 b Fw(sp)q(eci\014ca)o(t)o(ions)f(sh)o
1770 (ould)g(b)q(e)f(place)q(d)h(in)g(a)f(\014le)h(wit)n(h)g(a)g
1771 Fs(.ph)f Fw(su\016x,)i(while)e(an)0 630 y(implem)n(en)o(t)o(a)o(t)o(io)
1772 o(n)11 b(sh)o(ould)j(b)q(e)g(place)q(d)g(in)f(a)h(\014le)f(wit)n(h)h(a)
1773 g Fs(.pC)951 614 y Fn(1)969 630 y Fw(.)f(Th)o(e)h(transla)o(t)o(or)h
1774 (will)d(con)o(v)o(ert)j(eac)o(h)g Fs(.p)p Ft(xxx)d Fw(in)o(t)o(o)i(a)f
1775 (\014le)h(wit)n(h)0 679 y(t)n(h)o(e)h(su\016x)e Fs(.)p
1776 Ft(xxx)p Fw(.)k(Th)o(e)e(transla)o(t)o(e)q(d)f(ou)o(t)o(pu)o(t)h(can)f
1777 (t)n(h)o(en)h(b)q(e)f(fe)q(d)g(t)o(o)g(t)n(h)o(e)g(C)p
1778 Fs(++)g Fw(compiler)f(for)g(compila)o(t)o(ion.)p 0 2590
1779 792 2 v 46 2617 a Fm(1)64 2629 y Fl(Th)o(e)e(su\016xe)q(s)g
1780 Fk(.pcc)p Fl(,)f Fk(.pCpp)g Fl(et)o(c.)15 b(can)10 b(also)h(be)h(us)q
1781 (e)q(d.)p eop
1782 %%Page: 7 8
1783 7 7 bop 0 -82 1981 3 v 0 -100 a Fq(3.)22 b Fp(Lexer)d(and)g(P)l(arser)f
1784 (Genera)m(tion)1145 b Fw(7)0 45 y Fv(3)66 b(Lexer)21
1785 b(an)n(d)h(P)n(ars)q(er)h(Gen)n(era)n(t)n(ion)0 148 y
1786 Fw(In)16 b(t)n(hi)q(s)f(s)q(ect)o(ion)h(w)o(e'll)f(d)o(e)q(scr)q(ib)q
1787 (e)h(t)n(h)o(e)h(lexer)f(an)o(d)f(pars)q(er)i(gen)o(era)o(t)o(ion)f(m)o
1788 (ec)o(h)o(ani)q(sm)c(of)j Fz(Pro)o(p)p Fw(.)24 b(Not)o(e)16
1789 b(t)n(h)o(a)o(t)g(t)n(h)o(e)g(us)q(e)g(of)f(t)n(h)o(e)q(s)q(e)0
1790 198 y(fea)o(t)o(ure)q(s)g(i)q(s)e(not)g(m)o(an)o(d)o(a)o(t)o(ory:)k(t)n
1791 (h)o(e)d(us)q(er)g(can)g(su)n(bst)o(it)o(u)o(t)o(e)h(an)o(y)e(ot)n(h)o
1792 (er)h(lexer/pars)q(er)h(gen)o(era)o(t)o(ion)e(t)o(o)q(ols)g(or)h(us)q
1793 (e)g(h)o(an)o(d)f(wr)q(it)n(t)o(en)0 247 y(lexers)f(an)o(d)f(pars)q
1794 (ers.)19 b(On)12 b(t)n(h)o(e)f(ot)n(h)o(er)i(h)o(an)o(d,)d(high)o(er)i
1795 (lev)o(el)e(of)h(in)o(t)o(egra)o(t)o(ion)f(i)q(s)h(p)q(oss)q(ible)g(wh)
1796 o(en)h(us)q(in)o(g)e Fz(Pro)o(p)p Fw('s)i(lexer)g(an)o(d)f(pars)q(er)0
1797 297 y(m)o(ec)o(h)o(ani)q(sms.)0 425 y FF(3.1)56 b(Lexer)17
1798 b(Sp)q(eci\014ca)o(t)n(ion)0 514 y Fw(Lexical)f(an)o(alyzers)i(are)f
1799 (sp)q(eci\014e)q(d)h(us)q(in)o(g)f(t)n(h)o(e)g Fs(matchscan)e
1800 Fw(st)o(a)o(t)o(em)o(en)o(t.)27 b(Thi)q(s)16 b(constru)o(ct)j(i)q(s)d
1801 (re)q(sp)q(ons)q(ible)h(for)g(gen)o(era)o(t)o(in)o(g)0
1802 564 y(t)n(h)o(e)f(act)o(ual)f(str)q(in)o(g)g(m)o(a)o(t)o(c)o(hin)o(g)f
1803 (DF)-5 b(A.)15 b(Th)o(e)g(act)o(ual)g(bu\013er)q(in)o(g)h(m)o(ec)o(h)o
1804 (ani)q(sms)d(are)i(pro)o(vid)o(e)q(d)h(b)o(y)f(t)n(h)o(e)h(class)q(e)q
1805 (s)h Fs(LexerBuffer)p Fw(,)0 613 y Fs(IOLexerBuffer)11
1806 b Fw(an)o(d)j Fs(IOLexerStack)p Fw(.)h(Th)o(e)q(s)q(e)g(class)q(e)q(s)h
1807 (are)e(part)g(of)f(t)n(h)o(e)i(sup)o(p)q(ort)g(library)e(di)q(str)q
1808 (ibu)o(t)o(e)q(d)h(wit)n(h)g Fz(Pro)o(p)p Fw(.)54 675
1809 y(W)m(e)f(assu)o(m)o(e)h(t)n(h)o(a)o(t)g(t)n(h)o(e)h(us)q(er)g(i)q(s)e
1810 (f)q(amili)o(ar)e(wit)n(h)j(lexer)h(gen)o(era)o(t)o(or)g(t)o(o)q(ols)e
1811 (lik)o(e)g Fo(lex)p Fw([Le)q(s75])h(or)g Fo(\015ex)p
1812 Fw([P)o(ax90)o(].)0 795 y Fu(3.1.1)48 b(Regular)14 b(expre)q(s)q(s)q
1813 (ions)0 883 y Fw(Figure)h(1)f(d)o(e)q(scr)q(ib)q(e)q(s)i(t)n(h)o(e)f(s)
1814 q(et)h(of)e(curren)o(t)i(sup)o(p)q(ort)o(e)q(d)f(regular)g(expre)q(ss)q
1815 (ions)h(in)e Fz(Pro)o(p)p Fw(.)21 b(Th)o(e)15 b(syn)o(t)o(ax)f(i)q(s)g
1816 (s)q(imilar)d(t)o(o)k(wh)o(a)o(t)g(i)q(s)0 933 y(fou)o(n)o(d)f(in)f
1817 Fo(lex)p Fw(,)g(or)h Fo(e)n(gr)n(ep)p Fw(.)p 201 1034
1818 1578 2 v 200 1084 2 50 v 226 1069 a Ft(c)p 586 1084 V
1819 368 w Fw(m)o(a)o(t)o(c)o(h)o(e)q(s)g(c)o(h)o(aract)o(er)h
1820 Ft(c)e Fw(if)g(it)h(i)q(s)f(not)h(a)g(m)o(et)o(a)e(c)o(h)o(aract)o(er)p
1821 1778 1084 V 200 1134 V 226 1119 a Ft(e)245 1125 y Fn(1)264
1822 1119 y Ft(e)283 1125 y Fn(2)p 586 1134 V 612 1119 a Fw(m)o(a)o(t)o(c)o
1823 (h)o(e)q(s)i Ft(e)789 1125 y Fn(1)821 1119 y Fw(t)n(h)o(en)h
1824 Ft(e)932 1125 y Fn(2)p 1778 1134 V 200 1183 V 226 1168
1825 a Fs(.)p 586 1183 V 364 w Fw(m)o(a)o(t)o(c)o(h)o(e)q(s)f(an)o(y)f(c)o
1826 (h)o(aract)o(er)i(except)g Fs(\\n)p 1778 1183 V 200 1233
1827 V 226 1218 a(\\)p Ft(c)p 586 1233 V 346 w Fw(m)o(a)o(t)o(c)o(h)o(e)q(s)
1828 f(e)q(scap)q(e)g(s)q(equence)i Ft(c)p 1778 1233 V 200
1829 1283 V 226 1268 a Fs(^)p Ft(e)p 586 1283 V 345 w Fw(m)o(a)o(t)o(c)o(h)o
1830 (e)q(s)e Ft(e)g Fw(a)o(t)f(t)n(h)o(e)i(st)o(art)f(of)g(t)n(h)o(e)g(lin)
1831 o(e)p 1778 1283 V 200 1333 V 226 1318 a Ft(e)245 1324
1832 y Fn(1)264 1318 y Fs(|)p Ft(e)305 1324 y Fn(2)p 586 1333
1833 V 612 1318 a Fw(m)o(a)o(t)o(c)o(h)o(e)q(s)g Ft(e)789
1834 1324 y Fn(1)821 1318 y Fw(or)g Ft(e)891 1324 y Fn(2)p
1835 1778 1333 V 200 1383 V 226 1368 a Ft(e)p Fs(*)p 586 1383
1836 V 345 w Fw(m)o(a)o(t)o(c)o(h)o(e)q(s)g(zero)g(or)g(more)f
1837 Ft(e)p 1778 1383 V 200 1432 V 226 1418 a(e)p Fs(+)p 586
1838 1432 V 345 w Fw(m)o(a)o(t)o(c)o(h)o(e)q(s)h(on)o(e)f(or)h(more)f
1839 Ft(e)p 1778 1432 V 200 1482 V 226 1467 a(e)p Fs(?)p 586
1840 1482 V 345 w Fw(m)o(a)o(t)o(c)o(h)o(e)q(s)h(zero)g(or)g(on)o(e)g
1841 Ft(e)p 1778 1482 V 200 1532 V 226 1517 a Fs(\()p Ft(e)p
1842 Fs(\))p 586 1532 V 323 w Fw(groupin)o(g)p 1778 1532 V
1843 200 1582 V 226 1567 a Fs(<<)p Ft(C)300 1573 y Fn(1)318
1844 1567 y Ft(;)7 b(C)367 1573 y Fn(2)392 1567 y Ft(:)g(:)g(:)e(C)477
1845 1573 y Fj(n)499 1567 y Fs(>>)p Ft(e)p 586 1582 V 50 w
1846 Fw(m)o(a)o(t)o(c)o(h)o(e)q(s)14 b Ft(e)g Fw(only)f(if)g(w)o(e)h(are)g
1847 (in)g(a)f(con)o(t)o(ext)i(f)q(rom)c(on)o(e)j(of)g Ft(C)1543
1848 1573 y Fn(1)1561 1567 y Ft(;)7 b(C)1610 1573 y Fn(2)1628
1849 1567 y Ft(;)g(:)g(:)g(:)t(C)1731 1573 y Fj(n)p 1778 1582
1850 V 200 1632 V 226 1617 a Fs({)p Fo(lexeme)p Fs(})p 586
1851 1632 V 221 w Fw(m)o(a)o(t)o(c)o(h)o(e)q(s)14 b(lexem)o(e)p
1852 1778 1632 V 201 1633 1578 2 v 713 1749 a(Figure)g(1:)k(Regular)13
1853 b(expre)q(ss)q(ions.)54 1849 y(Th)o(e)18 b(sym)n(b)q(ols)f
1854 Fs(\\)k([)h(])g(\()f(\))h({)f(})h(<<)f(>>)h(*)f(+)h(.)f(-)h(?)g(|)c
1855 Fw(are)h(m)o(et)o(a)e(c)o(h)o(aract)o(ers)j(an)o(d)e(are)h(in)o(t)o
1856 (erpret)o(e)q(d)h(non-lit)o(erally)m(.)0 1899 y(Th)o(e)14
1857 b(e)q(scap)q(e)h(c)o(h)o(aract)o(er)g Fs(\\)f Fw(can)g(b)q(e)g(prep)q
1858 (en)o(d)o(e)q(d)h(t)o(o)g(t)n(h)o(e)f(m)o(et)o(a)f(c)o(h)o(aract)o(ers)
1859 i(if)e(t)n(h)o(ey)i(o)q(ccur)g(as)f(lit)o(erals)f(in)h(con)o(t)o(ext.)
1860 54 1960 y(Prece)q(d)o(ence-wi)q(s)q(e,)k(m)o(et)o(a)c(c)o(h)o(aract)o
1861 (ers)j Fs(*)p Fw(,)e Fs(+)g Fw(an)o(d)g Fs(?)f Fw(bin)o(d)h(t)o(igh)o
1862 (t)o(er)g(t)n(h)o(an)h(juxt)o(ap)q(os)q(it)o(ion.)k(Th)n(us)c(t)n(h)o
1863 (e)g(regular)g(expre)q(ss)q(ion)0 2010 y Fs(ab*)d Fw(m)o(eans)h
1864 Fs(a\(b*\))p Fw(.)j(P)o(aren)o(t)n(h)o(e)q(s)q(i)q(s)d(can)g(b)q(e)g
1865 (us)q(e)q(d)h(t)o(o)f(o)o(v)o(err)q(id)o(e)g(t)n(h)o(e)h(d)o(ef)q(a)n
1866 (ul)o(t)f(prece)q(d)o(ence)q(.)54 2072 y(Ch)o(aract)o(er)f(class)q(e)q
1867 (s)h(are)e(of)g(t)n(h)o(e)h(form)d(as)j(fou)o(n)o(d)f(in)g
1868 Fo(lex)p Fw(:)17 b(\(i\))12 b Ft(c)1015 2078 y Fn(1)1033
1869 2072 y Fs(-)p Ft(c)1073 2078 y Fn(2)1104 2072 y Fw(d)o(enot)o(e)q(s)i
1870 (t)n(h)o(e)f(ran)o(ge)g(of)e(c)o(h)o(aract)o(ers)j(f)q(rom)c
1871 Ft(c)1784 2078 y Fn(1)1815 2072 y Fw(t)o(o)j Ft(c)1882
1872 2078 y Fn(2)1900 2072 y Fw(;)g(\(ii\))0 2122 y(s)q(in)o(gle)i(\(non-m)o
1873 (et)o(a\))e(c)o(h)o(aract)o(ers)k(d)o(enot)o(e)f(t)n(h)o(ems)q(elv)o(e)
1874 q(s;)f(\(iii\))f(t)n(h)o(e)h(m)o(et)o(a)f(c)o(h)o(aract)o(er)i
1875 Fs(^)f Fw(can)g(b)q(e)g(us)q(e)q(d)g(t)o(o)h(n)o(ega)o(t)o(e)f(t)n(h)o
1876 (e)g(s)q(et.)22 b(F)m(or)0 2172 y(example,)13 b(t)n(h)o(e)i(regular)g
1877 (expre)q(ss)q(ion)h Fs([a-zA-Z][a-zA-Z0-9])o(*)c Fw(sp)q(eci\014e)q(s)k
1878 (an)f(alph)o(an)n(u)o(m)o(er)q(ic)e(id)o(en)o(t)o(i\014er)i(t)n(h)o(a)o
1879 (t)g(m)n(ust)g(st)o(art)o(s)0 2221 y(wit)n(h)i(a)g(let)n(t)o(er.)29
1880 b(Similarly)l(,)15 b(t)n(h)o(e)j(regular)f(expre)q(ss)q(ion)h
1881 Fs([^)k(\\t\\n])16 b Fw(m)o(a)o(t)o(c)o(h)o(e)q(s)g(an)o(y)h(c)o(h)o
1882 (aract)o(er)i(except)f(a)f(space,)h(a)f(t)o(a)o(b)g(or)g(a)0
1883 2271 y(n)o(ewlin)o(e.)54 2333 y Fo(L)n(exemes)d Fw(are)g(s)q(imply)d(a)
1884 o(bbrevia)o(t)o(e)q(d)j(n)o(am)o(e)q(s)f(giv)o(en)h(t)o(o)g(a)f
1885 (regular)h(expre)q(ss)q(ion)h(pa)o(t)n(t)o(er)q(n.)k(Th)o(ey)14
1886 b(act)h(lik)o(e)e(m)o(acros)g(in)h Fo(lex)p Fw(.)54 2394
1887 y(While)d(a)h(lexer)g(i)q(s)g(scannin)o(g,)g(it)f(m)o(ay)g(b)q(e)h(in)f
1888 (on)o(e)h(of)g(m)o(an)o(y)e Fo(c)n(ontexts)p Fw(.)18
1889 b(Con)o(t)o(ext)o(s)12 b(can)h(b)q(e)f(us)q(e)q(d)h(t)o(o)f(group)g(a)f
1890 (s)q(et)i(of)e(rela)o(t)o(e)q(d)0 2444 y(lexical)j(rule)q(s;)j(su)o(c)o
1891 (h)e(rule)q(s)i(are)e(only)g(ap)o(plica)o(ble)e(wh)o(en)j(t)n(h)o(e)g
1892 (con)o(t)o(ext)o(s)g(are)g(act)o(iv)o(e.)22 b(Thi)q(s)15
1893 b(m)o(ak)o(e)q(s)f(t)n(h)o(e)i(lexer)g(b)q(e)o(h)o(a)o(v)o(e)g(lik)o(e)
1894 e(a)0 2494 y(s)q(et)h(of)e(DF)-5 b(As,)14 b(wit)n(h)g(t)n(h)o(e)g(a)o
1895 (bilit)o(y)e(t)o(o)j(swit)o(c)o(h)f(b)q(et)o(w)o(een)g(DF)-5
1896 b(As)15 b(u)o(n)o(d)o(er)g(programm)o(er)d(con)o(trol.)p
1898 %%Page: 8 9
1899 8 8 bop 0 -82 1981 3 v 0 -100 a Fq(3.)16 b Fp(Lexer)k(and)f(P)l(arser)f
1900 (Genera)m(tion)1150 b Fw(8)0 45 y Fu(3.1.2)48 b(Lexem)o(e)0
1901 134 y Fw(Lexem)o(e)q(s)14 b(are)g(d)o(e\014n)o(e)q(d)i(us)q(in)o(g)d(t)
1902 n(h)o(e)i Fs(lexeme)d Fw(d)o(eclara)o(t)o(ion)i(in)g
1903 Fz(Pro)o(p)p Fw(.)k(It)o(s)d(syn)o(t)o(ax)e(i)q(s)129
1904 225 y Fo(L)n(exeme)p 266 225 13 2 v 15 w(De)n(cl)50 b
1905 Fu(::=)h Fs(lexeme)12 b Fo(L)n(exeme)p 801 225 V 16 w(Eq)i
1906 Fs(|)g Ft(:)7 b(:)g(:)12 b Fs(|)i Fo(L)n(exeme)p 1146
1907 225 V 15 w(Eq)g Fs(;)129 275 y Fo(L)n(exeme)p 266 275
1908 V 15 w(Eq)81 b Fu(::=)51 b Fo(Id)14 b Fs(=)f Fo(R)n(e)n(gexp)54
1909 367 y Fw(F)m(or)g(example,)e(t)n(h)o(e)j(follo)o(win)o(g)d(lexem)o(e)i
1910 (d)o(e\014nit)o(ion)g(i)q(s)g(us)q(e)q(d)h(in)f(t)n(h)o(e)h
1911 Fz(Pro)o(p)g Fw(transla)o(t)o(or)g(t)o(o)g(d)o(e\014n)o(e)h(t)n(h)o(e)f
1912 (lexical)e(stru)o(ct)o(ure)k(of)0 417 y(common)11 b(lexical)i(it)o
1913 (ems.)0 519 y Fs(lexeme)21 b(digits)129 b(=)22 b(/[0-9]+/)109
1914 568 y(|)g(sign)173 b(=)22 b(/[\\+\\-]/)109 618 y(|)g(integer)107
1915 b(=)22 b(/{digits}/)109 668 y(|)g(exponent)85 b(=)22
1916 b(/[eE]{sign}?{dig)o(its}/)109 718 y(|)g(mantissa)85
1917 b(=)22 b(/\({digits}\\.{dig)o(its}?)o(|\\.{)o(digit)o(s}\)/)109
1918 768 y(|)g(real)173 b(=)22 b(/{mantissa}{expo)o(nent})o(?/)109
1919 818 y(|)g(string)129 b(=)22 b(/"\([^\\\\"\\n]|\\\\.\))o(*"/)109
1920 867 y(|)g(character)63 b(=)22 b(/'\([^\\\\'\\n]|\\\\.[)o(0-9a-)o(f]*\))
1921 o('/)109 917 y(|)g(regexp)129 b(=)22 b(/\\/\([^\\/\\n*]|\\\\.)o
1922 (\)\([^\\)o(/\\n])o(|\\\\.\))o(*\\//)109 967 y(;)54 1069
1923 y Fw(Not)o(e)14 b(t)n(h)o(a)o(t)g(regular)g(expre)q(ss)q(ion)h(lit)o
1924 (erals)e(are)i(wr)q(it)n(t)o(en)f(b)q(et)o(w)o(een)h(slash)o(e)q(s:)k
1925 Fs(/)p Ft(r)q(e)p Fs(/)p Fw(.)0 1189 y Fu(3.1.3)48 b(Lexem)o(e)15
1926 b(clas)q(s)0 1277 y Fw(Oft)o(en)g(w)o(e)f(wi)q(sh)g(t)o(o)g(group)g(a)g
1927 (s)q(et)h(of)e(lexem)o(e)q(s)h(t)o(oget)n(h)o(er)i(in)o(t)o(o)e
1928 Fo(lexeme)h(classes)f Fw(if)f(t)n(h)o(ey)i(logically)d(b)q(e)o(h)o(a)o
1929 (v)o(e)i(in)g(som)o(e)f(u)o(niform)0 1327 y(m)o(ann)o(er;)f(for)i
1930 (example,)d(if)i(t)n(h)o(ey)h(act)g(u)o(niformly)d(in)j(a)f(lexical)f
1931 (rule.)19 b(By)14 b(groupin)o(g)f(rela)o(t)o(e)q(d)h(lexem)o(e)q(s)f(t)
1932 o(oget)n(h)o(er)j(in)o(t)o(o)d(a)g(class)0 1377 y(w)o(e)h(can)g(refer)h
1933 (t)o(o)f(t)n(h)o(em)g(su)o(ccinct)n(ly)h(b)o(y)e(t)n(h)o(e)q(ir)i
1934 (class)g(n)o(am)o(e.)54 1438 y(Th)o(e)f(syn)o(t)o(ax)f(of)h(a)f(lexem)o
1935 (e)g(class)i(d)o(eclara)o(t)o(ion)f(i)q(s)129 1538 y
1936 Fo(L)n(exeme)p 266 1538 V 15 w(Class)p 377 1538 V 15
1937 w(De)n(cl)50 b Fu(::=)g Fs(lexeme)21 b(class)13 b Fo(L)n(exeme)p
1938 1043 1538 V 15 w(Class)p 1154 1538 V 15 w(Eq)h Fs(and)f
1939 Ft(:)7 b(:)g(:)13 b Fs(and)g Fo(L)n(exeme)p 1585 1538
1940 V 16 w(Class)p 1697 1538 V 14 w(Eq)h Fs(;)129 1588 y
1941 Fo(L)n(exeme)p 266 1588 V 15 w(Class)p 377 1588 V 15
1942 w(Eq)81 b Fu(::=)50 b Fo(Id)14 b Fs(=)g Fo(L)n(exeme)p
1943 854 1588 V 16 w(Sp)n(e)n(c)g Fs(|)g Ft(:)7 b(:)g(:)12
1944 b Fs(|)i Fo(L)n(exeme)p 1230 1588 V 15 w(Sp)n(e)n(c)129
1945 1637 y(L)n(exeme)p 266 1637 V 15 w(Sp)n(e)n(c)161 b Fu(::=)50
1946 b Fo(String)550 1687 y Fi(j)68 b Fo(Id)14 b(R)n(e)n(gexp)54
1947 1787 y Fw(Th)o(e)g(follo)o(win)o(g)d(example,)h(t)n(h)o(e)i(lexem)o(e)f
1948 (class)q(e)q(s)j Fs(MainKeywords)p Fw(,)11 b Fs(Symbols)p
1949 Fw(,)h(an)o(d)h Fs(Literals)f Fw(are)j(d)o(e\014n)o(e)q(d.)0
1950 1881 y Fs(lexeme)21 b(class)f(MainKeywords)g(=)87 1931
1951 y("rewrite")g(|)i("inference")d(|)j("match")e(|)i("matchall")d(|)j
1952 ("matchscan")44 1981 y(|)f("refine")42 b(|)22 b("classof")e(|)h("type")
1953 g(|)g("datatype")f(|)i("instantiate")44 2031 y(|)f("lexeme")42
1954 b(|)22 b("bitfield")d(|)j("begin")e(|)i("syntax")44 2081
1955 y(|)f("dataflow")f(|)h("module")g(|)g("signature")f(|)h("constraint")f
1956 (|)h("declare")44 2130 y(|)g("procedure")f(|)h("fun")g(|)h("function")d
1957 (|)j("domain")44 2180 y(|)f("graphtype")f(|)h("graphrewrite")0
1958 2280 y(and)43 b(Symbols)20 b(=)87 2330 y("..")h(|)h("...")e(|)i("<->")f
1959 (|)g("::")g(|)h("&&")f(|)h("||")e(|)i("++")f(|)h("--")f(|)g("->")44
1960 2380 y(|)g("<<")g(|)h(">>")f(|)g(">=")g(|)h("<=")f(|)g("+=")g(|)h("-=")
1961 f(|)g("*=")g(|)h("/=")f(|)h("\045=")f(|)g("==")44 2429
1962 y(|)g("!=")g(|)h("<<=")e(|)i(">>=")f(|)g("&=")g(|)h("|=")f(|)h("^=")e
1963 (|)i("=>")f(|)h("<-")f(|)g("<=>")44 2479 y(|)g(":=")g(|)h(":-")f(|)g
1964 (LONG_BAR)f(/\\-\\-\\-\\-\\-+/)0 2579 y(and)h(Literals)f(=)87
1965 2629 y(INT_TOK)108 b(/{integer}/)p eop
1966 %%Page: 9 10
1967 9 9 bop 0 -82 1981 3 v 0 -100 a Fq(3.)22 b Fp(Lexer)d(and)g(P)l(arser)f
1968 (Genera)m(tion)1145 b Fw(9)44 45 y Fs(|)21 b(REAL_TOK)86
1969 b(/{real}/)44 95 y(|)21 b(CHAR_TOK)86 b(/{character}/)44
1970 145 y(|)21 b(STRING_TOK)42 b(/{string}/)44 195 y(;)0
1971 314 y Fu(3.1.4)48 b(T)l(ok)o(ens)0 403 y Fw(Lexical)13
1972 b(t)o(ok)o(ens)i(are)f(d)o(e\014n)o(e)q(d)i(us)q(in)o(g)d(t)n(h)o(e)i
1973 Fs(datatype)d Fw(d)o(eclara)o(t)o(ion.)18 b(Th)o(e)c(syn)o(t)o(ax)g(i)q
1974 (s)f(as)h(follo)o(ws.)129 496 y Fo(T)m(okens)p 258 496
1975 13 2 v 15 w(De)n(cl)50 b Fu(::=)g Fs(datatype)13 b Fo(Id)h
1976 Fs(::)k(lexeme)12 b(=)553 546 y Fo(T)m(oken)p 665 546
1977 V 16 w(Sp)n(e)n(c)i Fs(|)g Ft(:)7 b(:)g(:)12 b Fs(|)h
1978 Fo(T)m(oken)p 1015 546 V 16 w(Sp)n(e)n(c)h Fs(;)129 596
1979 y Fo(T)m(oken)p 241 596 V 15 w(Sp)n(e)n(c)67 b Fu(::=)50
1980 b Fs(lexeme)21 b(class)13 b Fo(Id)368 b Fw(Includ)o(e)15
1981 b(a)e(lexem)o(e)g(class)431 645 y Fi(j)68 b Fo(Id)15
1982 b([)f(R)n(e)n(gexp)i(])450 b Fw(Sin)o(gle)14 b(t)o(ok)o(en)g(sp)q(ec)54
1983 738 y(A)f(t)o(ok)o(en)g(d)o(a)o(t)o(a)o(t)o(yp)q(e)g(i)q(s)g(d)o
1984 (e\014n)o(e)q(d)h(b)o(y)f(includin)o(g)f(on)o(e)h(of)g(more)f(lexem)o
1985 (e)g(class)q(e)q(s,)i(an)o(d)f(b)o(y)g(d)o(e\014nin)o(g)g(st)o(an)o
1986 (d-alon)o(e)g(t)o(ok)o(ens.)18 b(If)0 788 y(a)13 b(lexem)o(e)f(class)i
1987 (i)q(s)e(includ)o(e)q(d,)i(all)e(t)n(h)o(e)h(t)o(ok)o(ens)h(d)o(e\014n)
1988 o(e)q(d)h(wit)n(hin)d(t)n(h)o(e)i(lexem)o(e)e(class)i(are)g(includ)o(e)
1989 q(d.)k(A)13 b(C)p Fs(++)g(enum)f Fw(t)o(yp)q(e)h(of)f(t)n(h)o(e)0
1990 838 y(sam)o(e)i(n)o(am)o(e)g(as)i(t)n(h)o(e)g(t)o(ok)o(en)g(d)o(a)o(t)o
1991 (a)o(t)o(yp)q(e)f(i)q(s)f(gen)o(era)o(t)o(e)q(d.)24 b(If)15
1992 b(a)g(t)o(ok)o(en)h(i)q(s)f(giv)o(en)f(an)h(id)o(en)o(t)o(i\014er)h(n)o
1993 (am)o(e,)e(t)n(h)o(en)i(t)n(h)o(e)g(sam)o(e)f(n)o(am)o(e)f(i)q(s)0
1994 888 y(us)q(e)q(d)g(as)g(t)n(h)o(e)g Fs(enum)e Fw(lit)o(eral.)17
1995 b(On)c(t)n(h)o(e)h(ot)n(h)o(er)h(h)o(an)o(d,)d(if)h(a)g(str)q(in)o(g)g
1996 (i)q(s)g(us)q(e)q(d)h(t)o(o)g(d)o(enot)o(e)g(a)f(t)o(ok)o(en,)g(t)n(h)o
1997 (en)h(it)f(can)h(b)q(e)f(referre)q(d)j(t)o(o)d(b)o(y)0
1998 938 y(pre\014xin)o(g)h(t)n(h)o(e)h(str)q(in)o(g)f(wit)n(h)g(a)g(dot)f
1999 Fs(.)h Fw(F)m(or)f(example,)f(t)n(h)o(e)j(t)o(ok)o(en)f
2000 Fs("=>")f Fw(can)h(b)q(e)g(reference)q(d)j(as)d Fs(."=>")f
2001 Fw(wit)n(hin)g(a)h(program.)54 999 y(As)c(an)f(example,)f(t)n(h)o(e)j
2002 (follo)o(win)o(g)c(t)o(ok)o(en)j(d)o(a)o(t)o(a)o(t)o(yp)q(e)f(d)o
2003 (e\014nit)o(ion)h(i)q(s)f(us)q(e)q(d)h(wit)n(hin)f(t)n(h)o(e)i
2004 Fz(Pro)o(p)f Fw(transla)o(t)o(or.)17 b(Here,)11 b(t)n(h)o(e)g(k)o(eyw)o
2005 (ords)0 1049 y(are)18 b(\014rst)g(part)o(it)o(ion)o(e)q(d)f(in)o(t)o(o)
2006 f(6)h(di\013eren)o(t)i(lexem)o(e)d(class)q(e)q(s.)30
2007 b(In)17 b(addit)o(ion)o(al,)f(t)n(h)o(e)i(t)o(ok)o(ens)g
2008 Fs(ID)p 1486 1049 14 2 v 15 w(TOK)p Fw(,)e Fs(REGEXP)p
2009 1727 1049 V 15 w(TOK)p Fw(,)g(et)o(c.)29 b(are)0 1099
2010 y(d)o(e\014n)o(e)q(d.)0 1202 y Fs(datatype)20 b(PropToken)g(::)h
2011 (lexeme)g(=)87 1252 y(lexeme)g(class)f(MainKeywords)44
2012 1302 y(|)h(lexeme)g(class)f(Keywords)44 1351 y(|)h(lexeme)g(class)f
2013 (SepKeywords)44 1401 y(|)h(lexeme)g(class)f(Symbols)44
2014 1451 y(|)h(lexeme)g(class)f(Special)44 1501 y(|)h(lexeme)g(class)f
2015 (Literals)44 1551 y(|)h(ID_TOK)151 b(/{patvar}/)44 1600
2016 y(|)21 b(REGEXP_TOK)63 b(/{regexp}/)44 1650 y(|)21 b(QUARK_TOK)85
2017 b(/#{string}/)44 1700 y(|)21 b(BIGINT_TOK)63 b(/#{sign}{integer}/)44
2018 1750 y(|)21 b(PUNCTUATIONS)e(/[\\<\\>\\,\\.\\;\\&\\|\\^\\!)o(\\~\\+\\)o
2019 (-\\*\\)o(/\\\045\\?)o(\\=\\:\\)o(\\]/)44 1800 y(;)0
2020 1919 y Fu(3.1.5)48 b(Th)o(e)15 b Fs(matchscan)f Fu(st)o(a)o(t)o(em)o
2021 (en)o(t)0 2008 y Fw(Th)o(e)d Fs(matchscan)d Fw(st)o(a)o(t)o(em)o(en)o
2022 (t)i(i)q(s)g(us)q(e)q(d)h(t)o(o)g(p)q(erform)e(t)o(ok)o(eniza)o(t)o
2023 (ion.)16 b(Th)o(e)11 b(us)q(er)h(can)e(sp)q(ecify)h(a)f(s)q(et)h(of)f
2024 (str)q(in)o(g)g(pa)o(t)n(t)o(er)q(n)i(m)o(a)o(t)o(c)o(hin)o(g)0
2025 2058 y(rule)q(s)i(wit)n(hin)g(a)f Fs(matchscan)f Fw(constru)o(ct.)19
2026 b(Giv)o(en)13 b(a)g(ob)r(ject)i(of)e(class)h Fs(LexerBuffer)p
2027 Fw(,)d(t)n(h)o(e)k Fs(matchscan)c Fw(st)o(a)o(t)o(em)o(en)o(t)i(lo)q
2028 (oks)g(for)0 2107 y(t)n(h)o(e)g(rule)f(t)n(h)o(a)o(t)g(m)o(a)o(t)o(c)o
2029 (h)o(e)q(s)g(t)n(h)o(e)h(lon)o(ge)q(st)g(pre\014x)g(f)q(rom)d(t)n(h)o
2030 (e)i(inpu)o(t)h(stream)f(an)o(d)g(execu)o(t)o(e)q(s)j(t)n(h)o(e)d(act)o
2031 (ion)g(asso)q(cia)o(t)o(e)q(d)h(wit)n(h)f(t)n(h)o(e)h(rule.)0
2032 2157 y(Tie)q(s)h(are)h(brok)o(en)f(b)o(y)f(t)n(h)o(e)i(lexical)e(ord)o
2033 (er)q(in)o(g)h(of)g(t)n(h)o(e)g(rule)q(s.)54 2219 y(Th)o(e)g(gen)o
2034 (eral)g(syn)o(t)o(ax)f(i)q(s)h(as)g(follo)o(ws:)p eop
2035 %%Page: 10 11
2036 10 10 bop 0 -82 1981 3 v 0 -100 a Fq(3.)22 b Fp(Lexer)d(and)g(P)l
2037 (arser)f(Genera)m(tion)1124 b Fw(10)129 38 y Fo(Matchsc)n(an)185
2038 b Fu(::=)50 b Fo(Matchsc)n(an)p 810 38 13 2 v 17 w(Mo)n(de)14
2039 b([)h(Context)p 1105 38 V 15 w(Sp)n(e)n(c)g(])f Fs(\()g
2040 Fo(Exp)g Fs(\))240 b Fw(v)n(ar)q(ian)o(t)12 b(1)617 88
2041 y Fi(f)i Fs(case)f Fo(Matchsc)n(an)p 946 88 V 16 w(R)o(ule)28
2042 b Ft(:)7 b(:)g(:)26 b Fs(case)13 b Fo(Matchsc)n(an)p
2043 1438 88 V 16 w(R)o(ule)h Fi(g)537 138 y(j)68 b Fo(Matchsc)n(an)p
2044 810 138 V 17 w(Mo)n(de)14 b([)h(Context)p 1105 138 V
2045 15 w(Sp)n(e)n(c)g(])f Fs(\()g Fo(Exp)g Fs(\))240 b Fw(v)n(ar)q(ian)o(t)
2046 12 b(2)617 188 y Fi(f)i Fo(Matchsc)n(an)p 845 188 V 16
2047 w(R)o(ule)g Fs(|)g Ft(:)7 b(:)g(:)12 b Fs(|)i Fo(Matchsc)n(an)p
2048 1280 188 V 16 w(R)o(ule)g Fi(g)537 238 y(j)68 b Fo(Matchsc)n(an)p
2049 810 238 V 17 w(Mo)n(de)14 b([)h(Context)p 1105 238 V
2050 15 w(Sp)n(e)n(c)g(])f Fs(\()g Fo(Exp)g Fs(\))g(of)182
2051 b Fw(v)n(ar)q(ian)o(t)12 b(3)659 288 y Fo(Matchsc)n(an)p
2052 852 288 V 16 w(R)o(ule)i Fs(|)g Ft(:)7 b(:)g(:)12 b Fs(|)i
2053 Fo(Matchsc)n(an)p 1287 288 V 16 w(R)o(ule)617 337 y Fs(end)f(matchscan)
2054 f(;)129 387 y Fo(Matchsc)n(an)p 322 387 V 16 w(Mo)n(de)73
2055 b Fu(::=)50 b Fs(matchscan)12 b Fo([)j Fs(while)f Fo(])625
2056 b Fw(cas)q(e)15 b(s)q(ens)q(it)o(iv)o(e)537 437 y Fi(j)68
2057 b Fs(matchscan*)12 b Fo([)j Fs(while)e Fo(])604 b Fw(cas)q(e)15
2058 b(ins)q(ens)q(it)o(iv)o(e)129 487 y Fo(Context)p 272
2059 487 V 15 w(Sp)n(e)n(c)142 b Fu(::=)50 b Fs([)14 b Fo(Id)p
2060 Fs(,)g Ft(:)7 b(:)g(:)12 b Fs(,)i Fo(Id)g Fs(])129 537
2061 y Fo(Matchsc)n(an)p 322 537 V 16 w(R)o(ule)88 b Fu(::=)50
2062 b Fo([)15 b Fs(<<)f Fo(Context)h Fs(,)g Ft(:)7 b(:)g(:)13
2063 b Fs(,)i Fo(Context)g Fs(>>)f Fo(])659 586 y Fs(lexeme)e(class)h
2064 Fo(Id)h Fs(:)k Fo(Matchsc)n(an)p 1210 586 V 17 w(A)n(ction)537
2065 636 y Fi(j)68 b Fo([)15 b Fs(<<)f Fo(Context)h Fs(,)g
2066 Ft(:)7 b(:)g(:)13 b Fs(,)i Fo(Context)g Fs(>>)f Fo(])659
2067 686 y(R)n(e)n(gexp)g Fs(:)19 b Fo(Matchsc)n(an)p 1030
2068 686 V 16 w(A)n(ction)129 736 y(Matchsc)n(an)p 322 736
2069 V 16 w(A)n(ction)50 b Fu(::=)g Fi(f)14 b Fo(Co)n(de)g
2070 Fi(g)537 786 y(j)68 b Fo(Co)n(de)911 b Fw(for)14 b(v)n(ar)q(ian)o(t)e
2071 (1)i(only)54 872 y(Th)o(e)k(t)o(w)o(o)f(di\013eren)o(t)i(mo)q(d)o(e)q
2072 (s)f(of)f(o)o(p)q(era)o(t)o(ion)g(are)h Fs(matchscan)e
2073 Fw(an)o(d)h Fs(matchscan*)p Fw(,)g(whic)o(h)g(re)q(sp)q(ect)o(iv)o(ely)
2074 i(m)o(a)o(t)o(c)o(h)d(str)q(in)o(gs)0 922 y(cas)q(e)d(s)q(ens)q(it)o
2075 (iv)o(ely)f(an)o(d)g(ins)q(ens)q(it)o(iv)o(ely)m(.)k(Th)o(e)d(mo)q
2076 (di\014er)e Fs(where)h Fw(m)o(ay)e(o)o(pt)o(ion)o(ally)g(sp)q(ecify)j
2077 (t)n(h)o(a)o(t)f(t)n(h)o(e)h(m)o(a)o(t)o(c)o(hin)o(g)e(pro)q(ce)q(ss)k
2078 (sh)o(ould)0 971 y(rep)q(ea)o(t)g(u)o(n)o(t)o(il)e(no)h(rule)q(s)g(ap)o
2079 (ply)m(,)e(or)i(t)n(h)o(e)h(en)o(d)f(of)f(stream)h(con)o(dit)o(ion)f(i)
2080 q(s)g(reac)o(h)o(e)q(d.)54 1033 y(By)20 b(d)o(ef)q(a)n(ul)o(t,)i(if)d
2081 (no)h(rule)q(s)h(ap)o(ply)e(an)o(d)h(if)g(t)n(h)o(e)h(inpu)o(t)f
2082 (stream)h(i)q(s)e(non-empt)o(y)m(,)h(t)n(h)o(en)h(an)f(error)h(h)o(as)g
2083 (o)q(ccurre)q(d.)39 b(Th)o(e)0 1083 y Fs(matchscan)12
2084 b Fw(st)o(a)o(t)o(em)o(en)o(t)h(will)g(in)o(v)o(ok)o(e)g(t)n(h)o(e)h(m)
2085 o(et)n(h)o(o)q(d)f Fs(error\(\))g Fw(of)g(t)n(h)o(e)i
2086 Fs(LexerBuffer)c Fw(ob)r(ject)k(b)o(y)f(d)o(ef)q(a)n(ul)o(t.)54
2087 1144 y(F)m(or)f(example,)f(t)n(h)o(e)i(follo)o(win)o(g)e(i)q(s)h(part)h
2088 (of)f(t)n(h)o(e)i Fz(Pro)o(p)f Fw(lexer)h(sp)q(eci\014ca)o(t)o(ion.)65
2089 1239 y Fs(datatype)21 b(LexicalContext)d(=)k(NONE)f(|)h(C)f(|)h(PROP)f
2090 (|)g(COMMENT)g(|)g(...;)0 1339 y(int)g(PropParser::get_to)o(ken\(\))0
2091 1388 y({)65 1438 y(matchscan[LexicalCo)o(ntext)o(])e(while)i
2092 (\(lexbuf\))65 1488 y({)131 1538 y(...)65 1588 y(|)44
2093 b(<<C>>)21 b(/[)g(\\t\\\\\\014]/:)259 b({)22 b(emit\(\);)e(})65
2094 1637 y(|)44 b(<<C>>)21 b(/\(\\/\\/.*\)?\\n/:)258 b({)22
2095 b(emit\(\);)e(line++;)g(})65 1687 y(|)44 b(<<C>>)21 b(/^#.*/:)412
2096 b({)22 b(emit\(\);)e(})65 1737 y(|)44 b(<<PROP>>)20 b(lexeme)g(class)h
2097 (MainKeywords:)e({)j(return)e(?lexeme;)h(})65 1787 y(|)44
2098 b(<<PROP>>)20 b(lexeme)g(class)h(SepKeywords:)f({)h(return)g(?lexeme;)f
2099 (})65 1837 y(|)44 b(<<PROP>>)20 b(QUARK_TOK:)281 b({)22
2100 b(return)e(QUARK_TOK;)g(})65 1886 y(|)44 b(<<PROP>>)20
2101 b(BIGINT_TOK:)259 b({)22 b(return)e(BIGINT_TOK;)g(})65
2102 1936 y(|)44 b(<<PROP>>)20 b(REGEXP_TOK:)259 b({)22 b(return)e
2103 (REGEXP_TOK;)g(})65 1986 y(|)44 b(<<PROP>>)20 b(PUNCTUATIONS:)215
2104 b({)22 b(return)e(lexbuf[0];)g(})65 2036 y(|)44 b(<<PROP>>)20
2105 b(/[)h(\\t\\014]/:)238 b({)22 b(/*)f(skip)g(*/)g(})65
2106 2086 y(|)44 b(<<PROP>>)20 b(/\(\\/\\/.*\)?\\n/:)193 b({)22
2107 b(line++;)e(})65 2136 y(|)44 b(/\\/\\*/:)543 b({)22 b(emit\(\);)e
2108 (set_context\(COMMEN)o(T\);)f(})65 2185 y(|)44 b(<<COMMENT>>)19
2109 b(/\\*\\//:)282 b({)22 b(emit\(\);)e(set_context\(PROP\);)e(})65
2110 2235 y(|)44 b(<<COMMENT>>)19 b(/\\n/:)326 b({)22 b(emit\(\);)e(line++;)
2111 g(})65 2285 y(|)44 b(<<COMMENT>>)19 b(/./:)348 b({)22
2112 b(emit\(\);)e(})65 2335 y(|)44 b(/./:)21 b({)g(error\("\045Lillegal)e
2113 (character)h(\045c\\n",)g(lexbuf[0]\);)g(})65 2385 y(})0
2114 2434 y(})54 2529 y Fw(Here,)13 b(t)n(h)o(e)g(lexer)g(i)q(s)f(part)o(it)
2115 o(ion)o(e)q(d)g(in)g(m)n(ul)o(t)o(iple)e(lexical)i(con)o(t)o(ext)o(s:)
2116 18 b(con)o(t)o(ext)13 b Fs(C)f Fw(d)o(eals)h(wit)n(h)g(C)p
2117 Fs(++)f Fw(co)q(d)o(e)h(while)f(con)o(t)o(ext)h Fs(PROP)0
2118 2579 y Fw(d)o(eals)f(wit)n(h)f Fz(Pro)o(p)g Fw(ext)o(ens)q(ions.)18
2119 b(Th)o(e)11 b(sp)q(ecial)g(con)o(t)o(ext)g Fs(COMMENT)f
2120 Fw(i)q(s)g(us)q(e)q(d)i(t)o(o)f(pars)q(e)h Fs(/*)22 b(*/)10
2121 b Fw(d)o(elimit)o(e)q(d)g(comm)o(en)o(t)o(s.)15 b(Con)o(t)o(ext)o(s)0
2122 2629 y(are)f(c)o(h)o(an)o(ge)q(d)h(us)q(in)o(g)f(t)n(h)o(e)g
2123 Fs(set_context)e Fw(m)o(et)n(h)o(o)q(d)h(d)o(e\014n)o(e)q(d)i(in)f
2124 (class)g Fs(LexerBuffer)p Fw(.)p eop
2125 %%Page: 11 12
2126 11 11 bop 0 -82 1981 3 v 0 -100 a Fq(3.)16 b Fp(Lexer)k(and)f(P)l
2127 (arser)f(Genera)m(tion)1129 b Fw(11)54 45 y(Th)o(e)15
2128 b(sp)q(ecial)g(v)n(ar)q(ia)o(ble)e Fs(?lexeme)g Fw(can)j(b)q(e)f(us)q
2129 (e)q(d)h(wit)n(hin)e(a)h(rule)g(t)n(h)o(a)o(t)h(m)o(a)o(t)o(c)o(h)o(e)q
2130 (s)e(a)h(lexem)o(e)f(class.)23 b(F)m(or)14 b(example,)f(wit)n(hin)0
2131 95 y(t)n(h)o(e)i(rule)65 189 y Fs(|)44 b(<<PROP>>)20
2132 b(lexeme)g(class)h(MainKeywords:)85 b({)21 b(return)g(?lexeme;)f(})0
2133 282 y Fw(t)n(h)o(e)c(v)n(ar)q(ia)o(ble)c Fs(?lexeme)i
2134 Fw(i)q(s)g(b)q(ou)o(n)o(d)h(t)o(o)g(t)n(h)o(e)h(t)o(ok)o(en)f
2135 Fs(."rewrite")e Fw(if)h(t)n(h)o(e)i(str)q(in)o(g)f(\\rewr)q(it)o(e")g
2136 (i)q(s)f(m)o(a)o(t)o(c)o(h)o(e)q(d;)g(it)h(i)q(s)f(b)q(ou)o(n)o(d)h(t)o
2137 (o)g(t)n(h)o(e)0 332 y(t)o(ok)o(en)f Fs(."inference")e
2138 Fw(if)h(t)n(h)o(e)h(str)q(in)o(g)h(\\inference")g(i)q(s)e(m)o(a)o(t)o
2139 (c)o(h)o(e)q(d)g(an)o(d)g(so)h(on.)0 452 y Fu(3.1.6)48
2140 b(Clas)q(s)15 b Fs(LexerBuffer)0 540 y Fw(W)m(e'll)d(n)o(ext)i(d)o(e)q
2141 (scr)q(ib)q(e)h(t)n(h)o(e)g(class)g Fs(LexerBuffer)c
2142 Fw(an)o(d)j(it)o(s)g(su)n(b)q(class)q(e)q(s.)54 602 y(Class)h
2143 Fs(LexerBuffer)e Fw(i)q(s)i(t)n(h)o(e)h(bas)q(e)f(class)h(in)f(t)n(h)o
2144 (e)h(lexical)e(bu\013er)j(hierarc)o(h)o(y)m(.)22 b(It)15
2145 b(i)q(s)g(d)o(e\014n)o(e)q(d)h(in)f(t)n(h)o(e)h(library)e(includ)o(e)i
2146 (\014le)0 652 y Fs(<AD/automata/lexe)o(rbuf.)o(h>)p Fw(.)g(Thi)q(s)e
2147 (class)h(i)q(s)e(re)q(sp)q(ons)q(ible)i(for)f(implem)n(en)o(t)o(i)o(n)o
2148 (g)e(a)i(str)q(in)o(g)g(bu\013er)i(for)d(us)q(e)i(d)o(ur)q(in)o(g)f
2149 (lexical)0 701 y(an)o(alys)q(i)q(s.)54 763 y(As)f(it)g(st)o(an)o(ds,)g
2150 (it)f(can)i(b)q(e)f(us)q(e)q(d)h(direct)n(ly)f(if)f(t)n(h)o(e)i(lexer)g
2151 (inpu)o(t)f(i)q(s)f(direct)n(ly)i(f)q(rom)d(a)h(str)q(in)o(g.)18
2152 b(M)o(emory)13 b(m)o(an)o(agem)o(en)o(t)d(of)i(t)n(h)o(e)0
2153 813 y(bu\013er)j(i)q(s)e(assu)o(m)o(e)q(d)i(t)o(o)f(b)q(e)g(h)o(an)o
2154 (dle)q(d)g(b)o(y)f(t)n(h)o(e)i(us)q(er.)54 874 y(Th)o(e)c(class)g
2155 Fs(LexerBuffer)d Fw(h)o(as)j(t)n(hree)h(constru)o(ct)o(ors.)20
2156 b(Th)o(e)11 b(d)o(ef)q(a)n(ul)o(t)g(constru)o(ct)o(or)i(init)o(ialize)q
2157 (s)c(t)n(h)o(e)j(str)q(in)o(g)f(bu\013er)g(t)o(o)g(NULL.)0
2158 924 y(Th)o(e)h(t)o(w)o(o)g(ot)n(h)o(er)h(constru)o(ct)o(ors)i(init)o
2159 (ialize)10 b(t)n(h)o(e)j(str)q(in)o(g)f(bu\013er)i(t)o(o)e(a)g(str)q
2160 (in)o(g)g(giv)o(en)g(b)o(y)g(t)n(h)o(e)h(us)q(er.)18
2161 b(In)12 b(t)n(h)o(e)h(cas)q(e)g(wh)o(en)f(t)n(h)o(e)h(len)o(gt)n(h)0
2162 974 y(i)q(s)i(not)h(sup)o(plie)q(d,)f(t)n(h)o(e)i(bu\013er)g(i)q(s)e
2163 (assu)o(m)o(e)q(d)h(t)o(o)h(b)q(e)e Fs('\\0')p Fw(-t)o(ermin)o(a)o(t)o
2164 (e)q(d.)23 b(Th)o(e)16 b(t)o(w)o(o)f Fs(set_buffer)f
2165 Fw(m)o(et)n(h)o(o)q(ds)h(can)h(b)q(e)g(us)q(e)q(d)h(t)o(o)0
2166 1024 y(s)q(et)d(t)n(h)o(e)g(curren)o(t)h(str)q(in)o(g)f(bu\013er.)19
2167 b(Not)o(ice)13 b(t)n(h)o(a)o(t)h(all)e(lexical)g(an)o(alys)q(i)q(s)g(o)
2168 o(p)q(era)o(t)o(ions)h(are)h(don)o(e)f(in)g(place.)18
2169 b(Th)o(e)13 b(us)q(er)i(sh)o(ould)e(not)0 1074 y(al)o(t)o(er)h(t)n(h)o
2170 (e)h(str)q(in)o(g)f(bu\013er)h(direct)n(ly)m(,)f(bu)o(t)g(sh)o(ould)g
2171 (us)q(e)g(t)n(h)o(e)h(in)o(t)o(erf)q(ace)f(pro)o(vid)o(e)q(d)g(b)o(y)g
2172 (t)n(hi)q(s)g(class)g(inst)o(ead.)0 1175 y Fs(class)21
2173 b(LexerBuffer)e({)0 1225 y(public:)65 1275 y(LexerBuffer\(\);)65
2174 1325 y(LexerBuffer\(char)g(*\);)65 1375 y(LexerBuffer\(char)g(*,)i
2175 (size_t\);)65 1425 y(virtual)g(~LexerBuffer\(\);)65 1474
2176 y(virtual)g(void)g(set_buffer)e(\(char)i(*,)h(size_t\);)240
2177 1524 y(void)f(set_buffer)e(\(char)i(*\);)0 1574 y(};)54
2178 1676 y Fw(Th)o(e)15 b(follo)o(win)o(g)e(m)o(et)n(h)o(o)q(ds)i(are)h(us)
2179 q(e)q(d)h(acce)q(ss)h(t)n(h)o(e)e(str)q(in)o(g)g(bu\013er.)24
2180 b(M)o(et)n(h)o(o)q(d)17 b Fs(capacity)d Fw(ret)o(ur)q(ns)i(t)n(h)o(e)g
2181 (s)q(ize)g(of)f(t)n(h)o(e)h(bu\013er.)0 1726 y(M)o(et)n(h)o(o)q(d)f
2182 Fs(length)d Fw(ret)o(ur)q(ns)i(t)n(h)o(e)g(len)o(gt)n(h)g(of)f(t)n(h)o
2183 (e)h(curren)o(t)h(m)o(a)o(t)o(c)o(h)o(e)q(d)d(t)o(ok)o(en.)19
2184 b(M)o(et)n(h)o(o)q(ds)c Fs(text)d Fw(can)i(b)q(e)f(us)q(e)q(d)h(t)o(o)g
2185 (obt)o(ain)e(a)i(p)q(oin)o(t)0 1775 y(t)o(o)h(lo)q(ca)o(t)o(ion)e(of)h
2186 (t)n(h)o(e)h(curren)o(t)g(m)o(a)o(t)o(c)o(h)o(e)q(d)f(t)o(ok)o(en.)20
2187 b(Th)o(e)15 b(str)q(in)o(g)f(ret)o(ur)q(n)o(e)q(d)i(i)q(s)e(guaran)o(t)
2188 o(ee)q(d)g(t)o(o)h(b)q(e)f Fs('\\0')p Fw(-t)o(ermin)o(a)o(t)o(e)q(d.)k
2189 (M)o(et)n(h)o(o)q(ds)0 1825 y Fs(operator)i([])15 b Fw(ret)o(ur)q(n)g
2190 (t)n(h)o(e)h Ft(i)p Fw(t)n(h)f(c)o(h)o(aract)o(er)h(of)f(t)n(h)o(e)g(t)
2191 o(ok)o(en.)22 b(Fin)o(ally)m(,)13 b(m)o(et)n(h)o(o)q(d)h
2192 Fs(lookahead)f Fw(ret)o(ur)q(ns)j(t)n(h)o(e)f(c)o(h)o(aract)o(er)i(co)q
2193 (d)o(e)f(of)0 1875 y(t)n(h)o(e)f(n)o(ext)f(c)o(h)o(aract)o(er)h(t)o(o)f
2194 (b)q(e)g(m)o(a)o(t)o(c)o(h)o(e)q(d.)65 1977 y Fs(int)22
2195 b(capacity)e(\(\))h(const;)65 2027 y(int)h(length)64
2196 b(\(\))21 b(const;)65 2076 y(const)g(char)g(*)h(text)f(\(\))g(const;)
2197 196 2126 y(char)g(*)h(text)f(\(\);)65 2176 y(char)43
2198 b(operator)20 b([])i(\(int)f(i\))g(const;)65 2226 y(char&)g(operator)f
2199 ([])i(\(int)f(i\);)65 2276 y(int)h(lookahead)d(\(\))j(const;)65
2200 2325 y(void)f(push_back)f(\(int)h(n\))54 2427 y Fw(In)14
2201 b(addit)o(ion)f(t)o(o)i(t)n(h)o(e)g(str)q(in)o(g)g(bu\013er,)h(t)n(h)o
2202 (e)f(class)g Fs(LexerBuffer)d Fw(k)o(eeps)k(trac)o(k)f(of)f(t)o(w)o(o)g
2203 (addit)o(ion)o(al)f(t)o(yp)q(e)q(s)i(of)f(inform)o(a)o(t)o(io)o(n:)0
2204 2477 y(t)n(h)o(e)20 b(curren)o(t)g(con)o(t)o(ext)f(of)f(t)n(h)o(e)i(DF)
2205 -5 b(A,)18 b(an)o(d)h(wh)o(et)n(h)o(er)h(t)n(h)o(e)g(n)o(ext)f(t)o(ok)o
2206 (en)g(st)o(art)o(s)i(a)o(t)d(t)n(h)o(e)i(b)q(eginnin)o(g)e(of)g(t)n(h)o
2207 (e)i(lin)o(e,)f(or)g(in)f(our)0 2527 y(t)o(erminology)m(,)10
2208 b(wh)o(et)n(h)o(er)16 b(it)d(i)q(s)g Fo(anchor)n(e)n(d)p
2209 Fw(.)19 b(Th)o(e)q(s)q(e)c(are)f(m)o(anipula)o(t)o(e)q(d)e(wit)n(h)i(t)
2210 n(h)o(e)g(follo)o(win)o(g)e(m)o(et)n(h)o(o)q(ds:)65 2629
2211 y Fs(int)22 b(context)85 b(\(\))22 b(const;)p eop
2212 %%Page: 12 13
2213 12 12 bop 0 -82 1981 3 v 0 -100 a Fq(3.)16 b Fp(Lexer)k(and)f(P)l
2214 (arser)f(Genera)m(tion)1129 b Fw(12)65 45 y Fs(void)21
2215 b(set_context)f(\(int)h(c)g(=)h(0\);)65 95 y(Bool)f(is_anchored\(\))e
2216 (const;)65 145 y(void)i(set_anchored\(Bool)e(a)i(=)h(true\);)54
2217 245 y Fw(Fin)o(ally)m(,)16 b(t)n(h)o(e)j(follo)o(win)o(g)d(m)o(et)n(h)o
2218 (o)q(ds)i(sh)o(ould)g(b)q(e)g(re)q(d)o(e\014n)o(e)q(d)j(b)o(y)d(su)n(b)
2219 q(class)q(e)q(s)i(t)o(o)f(al)o(t)o(er)g(t)n(h)o(e)g(b)q(e)o(h)o(a)o
2220 (vior)e(of)h(t)n(hi)q(s)g(class.)32 b(By)0 295 y(d)o(ef)q(a)n(ul)o(t,)
2221 15 b(t)n(h)o(e)g(class)g Fs(LexerBuffer)e Fw(calls)h
2222 Fs(fill)p 756 295 14 2 v 15 w(buffer\(\))e Fw(wh)o(en)j(it)g(reac)o(h)o
2223 (e)q(s)h(t)n(h)o(e)f(en)o(d)g(of)f(t)n(h)o(e)i(str)q(in)o(g;)e(su)n(b)q
2224 (class)q(e)q(s)k(can)c(us)q(e)0 345 y(t)n(hi)q(s)f(m)o(et)n(h)o(o)q(d)f
2225 (t)o(o)h(re\014ll)f(t)n(h)o(e)i(bu\013er)g(an)o(d)e(ret)o(ur)q(n)h(t)n
2226 (h)o(e)h(n)n(u)o(m)n(b)q(er)e(of)g(c)o(h)o(aract)o(ers)j(read.)j
2227 (Curren)o(t)n(ly)m(,)13 b Fs(fill)p 1606 345 V 15 w(buffer)e
2228 Fw(i)q(s)i(d)o(e\014n)o(e)q(d)h(t)o(o)0 394 y(do)f(not)n(hin)o(g)g(an)o
2229 (d)g(ret)o(ur)q(n)h(0.)k(Wh)o(en)13 b(it)g(reac)o(h)o(e)q(s)i(t)n(h)o
2230 (e)f(en)o(d)g(of)f(t)n(h)o(e)h(\014le)f(\(i.e.)k(wh)o(en)d
2231 Fs(fill)p 1377 394 V 15 w(buffer\(\))d Fw(f)q(ails)h(t)o(o)i(re\014ll)f
2232 (t)n(h)o(e)h(bu\013er)0 444 y(an)o(d)f(t)n(h)o(e)g(scannin)o(g)h(pro)q
2233 (ce)q(ss)h(\014ni)q(sh)o(e)q(s\),)f(m)o(et)n(h)o(o)q(d)e
2234 Fs(end)p 850 444 V 15 w(of)p 909 444 V 15 w(file)g Fw(i)q(s)h(calle)q
2235 (d.)k(Curren)o(t)n(ly)m(,)c(t)n(hi)q(s)g(i)q(s)g(a)f(no-o)o(p.)17
2236 b(Fin)o(ally)m(,)11 b(t)n(h)o(e)j(error)0 494 y(h)o(an)o(dlin)o(g)h
2237 (rou)o(t)o(in)o(e)h Fs(error\(\))e Fw(i)q(s)i(calle)q(d)f(wit)n(h)h(t)n
2238 (h)o(e)h(p)q(os)q(it)o(ion)e(of)g(t)n(h)o(e)i(b)q(eginnin)o(g)e(an)o(d)
2239 g(t)n(h)o(e)i(en)o(d)f(of)g(t)n(h)o(e)g(bu\013er)h(in)f(whic)o(h)f(t)n
2240 (h)o(e)0 544 y(error)g(o)q(ccurs.)20 b(By)14 b(d)o(ef)q(a)n(ul)o(t,)g
2241 (t)n(hi)q(s)f(rou)o(t)o(in)o(e)i(pr)q(in)o(t)o(s)f(ou)o(t)g(t)n(h)o(e)h
2242 (bu\013er.)0 644 y Fs(protected:)65 694 y(virtual)21
2243 b(size_t)f(fill_buffer\(\);)65 744 y(virtual)h(void)64
2244 b(end_of_file\(\);)65 793 y(virtual)21 b(void)64 b(error\(const)20
2245 b(char)h(*)g(start,)g(const)g(char)g(*)g(stop\);)0 913
2246 y Fu(3.1.7)48 b(Clas)q(s)15 b Fs(IOLexerBuffer)0 1001
2247 y Fw(Class)k Fs(IOLexerBuffer)d Fw(i)q(s)h(a)h(d)o(er)q(iv)o(e)q(d)i
2248 (class)f(of)f Fs(LexerBuffer)p Fw(.)29 b(It)19 b(a)n(u)o(t)o(om)o(a)o
2249 (t)o(ically)d(m)o(an)o(age)q(s)h(an)h(in)o(t)o(er)q(n)o(al)g(bu\013er)h
2250 (an)o(d)0 1051 y(rece)q(iv)o(e)q(s)d(inpu)o(t)e(f)q(rom)e(an)h
2251 Fs(istream)p Fw(.)k(It)d(i)q(s)f(d)o(e\014n)o(e)q(d)j(in)d(t)n(h)o(e)i
2252 (\014le)e Fs(<AD/automata/iolexer)o(buf.h)o(>)54 1112
2253 y Fw(Thi)q(s)e(class)h(pro)o(vid)o(e)q(s)g(t)n(h)o(e)g(follo)o(win)o(g)
2254 d(addit)o(ion)o(al)h(fea)o(t)o(ure)q(s:)18 b(Constru)o(ct)o(or)13
2255 b Fs(IOLexerBuffer\(ist)o(ream&)o(\))c Fw(t)o(ie)q(s)j(t)n(h)o(e)g
2256 (inpu)o(t)0 1162 y(t)o(o)17 b(a)f(stream.)26 b(If)16
2257 b(t)n(h)o(e)h(d)o(ef)q(a)n(ul)o(t)g(constru)o(ct)o(or)i(i)q(s)d(us)q(e)
2258 q(d,)h(t)n(h)o(en)h(it)e(a)n(u)o(t)o(om)o(a)o(t)o(ically)e(t)o(ie)q(s)j
2259 (t)n(h)o(e)g(inpu)o(t)g(t)o(o)g(t)n(h)o(e)g(stream)f
2260 Fs(cin)p Fw(.)26 b(Th)o(e)0 1212 y(m)o(et)n(h)o(o)q(d)13
2261 b Fs(set_stream)f Fw(can)i(b)q(e)g(us)q(e)q(d)h(t)o(o)f(s)q(et)h(t)n(h)
2262 o(e)f(stream)g(t)o(o)g(som)o(e)f(ot)n(h)o(er)i(inpu)o(t.)0
2263 1312 y Fs(class)21 b(IOLexerBuffer)e(:)i(public)g(LexerBuffer)f({)65
2264 1362 y(size_t)86 b(buffer_size;)41 b(//)22 b(size)f(of)g(the)g(buffer)
2265 65 1412 y(istream)g(*)g(input;)173 b(//)22 b(input)f(stream)0
2266 1462 y(public:)65 1511 y(IOLexerBuffer\(\);)65 1561 y
2267 (IOLexerBuffer\(istre)o(am&\);)65 1611 y(virtual)g(~IOLexerBuffer\(\))o
2268 (;)65 1661 y(virtual)g(void)g(set_stream)e(\(istream&\);)0
2269 1711 y(};)54 1811 y Fw(By)e(d)o(ef)q(a)n(ul)o(t,)g(class)h
2270 Fs(IOLexerBuffer)c Fw(reads)k(n)o(ew)f(d)o(a)o(t)o(a)g(f)q(rom)d(t)n(h)
2271 o(e)k(inpu)o(t)f(stream)g(us)q(in)o(g)f(a)h(lin)o(e)f(bu\013er)q(in)o
2272 (g)h(di)q(sciplin)o(e.)0 1861 y(Thi)q(s)g(m)o(ec)o(h)o(ani)q(sm)e(i)q
2273 (s)i(suit)o(a)o(ble)g(for)h(in)o(t)o(eract)o(iv)o(e,)g(bu)o(t)g(for)g
2274 (ot)n(h)o(er)g(ap)o(plica)o(t)o(ions)e(it)h(m)o(ay)g(b)q(e)g(more)g
2275 (e\016cien)o(t)h(t)o(o)g(us)q(e)h(blo)q(c)o(k)0 1910
2276 y(bu\013ere)q(d)e(inpu)o(t.)23 b(Th)o(e)16 b(prot)o(ect)o(e)q(d)g(m)o
2277 (et)n(h)o(o)q(d)f Fs(read_buffer)e Fw(con)o(trols)i(t)n(hi)q(s)g
2278 (readin)o(g)i(b)q(e)o(h)o(a)o(vior;)d(it)h(i)q(s)g(calle)q(d)h(wh)o(en)
2279 o(ev)o(er)g(t)n(h)o(e)0 1960 y(d)o(a)o(t)o(a)c(in)f(t)n(h)o(e)i(str)q
2280 (in)o(g)f(bu\013er)h(h)o(as)f(b)q(een)h(consu)o(m)o(e)q(d)f(an)o(d)g(n)
2281 o(ew)g(inpu)o(t)g(i)q(s)f(n)o(ee)q(d)o(e)q(d)j(f)q(rom)c(t)n(h)o(e)j
2282 (stream.)k(It)12 b(i)q(s)g(pass)q(e)q(d)h(t)n(h)o(e)g(p)q(os)q(it)o
2283 (ion)0 2010 y(of)f(t)n(h)o(e)i(bu\013er)g(an)o(d)e(it)o(s)i(rem)o
2284 (ainin)o(g)d(capacit)o(y)m(,)h(an)o(d)g(it)h(ret)o(ur)q(ns)h(t)n(h)o(e)
2285 f(n)n(u)o(m)n(b)q(er)g(of)f(n)o(ew)h(c)o(h)o(aract)o(ers)i(t)n(h)o(a)o
2286 (t)e(are)g(read.)19 b(Su)n(b)q(class)q(e)q(s)0 2060 y(can)14
2287 b(re)q(d)o(e\014n)o(e)i(t)n(hi)q(s)e(m)o(et)n(h)o(o)q(d.)0
2288 2160 y Fs(protected:)65 2210 y(virtual)21 b(size_t)f(read_buffer\(char)
2289 f(*,)i(size_t\);)0 2329 y Fu(3.1.8)48 b(Clas)q(s)15 b
2290 Fs(IOLexerStack)0 2418 y Fw(Class)i Fs(IOLexerStack)e
2291 Fw(i)q(s)h(a)g(d)o(er)q(iv)o(e)q(d)i(class)g(of)e Fs(LexerStack)p
2292 Fw(.)25 b(It)17 b(pro)o(vid)o(e)q(s)g(a)g(m)o(ec)o(h)o(ani)q(sm)c(of)k
2293 (readin)o(g)g(f)q(rom)e(a)h(st)o(ac)o(k)i(of)0 2467 y
2294 Fs(istream)p Fw('s.)j(Streams)15 b(can)h(b)q(e)f(push)o(e)q(d)i(an)o(d)
2295 e(p)q(o)o(p)o(p)q(e)q(d)g(f)q(rom)e(t)n(h)o(e)j(st)o(ac)o(k.)23
2296 b(Th)o(e)16 b(n)o(ext)g(t)o(ok)o(en)g(i)q(s)e(obt)o(ain)o(e)q(d)h(f)q
2297 (rom)f(t)n(h)o(e)i(stream)0 2517 y(f)q(rom)11 b(t)n(h)o(e)k(t)o(o)o(p)e
2298 (of)g(t)n(h)o(e)h(st)o(ac)o(k.)19 b(Th)o(e)13 b(class)i(allo)o(ws)d
2299 (allo)o(ws)g(easy)j(implem)n(en)o(t)o(a)o(t)o(i)o(on)10
2300 b(of)j(constru)o(ct)o(s)j(su)o(c)o(h)e(as)g(t)n(h)o(e)g
2301 Fs(#include)e Fw(\014le)0 2567 y(m)o(ec)o(h)o(ani)q(sm)f(of)i(t)n(h)o
2302 (e)i(C)f(prepro)q(ce)q(ssor.)54 2629 y(Th)o(e)g(in)o(t)o(erf)q(ace)g
2303 (of)f(t)n(hi)q(s)h(class)h(i)q(s)e(li)q(st)o(e)q(d)g(b)q(elo)o(w:)p
2305 %%Page: 13 14
2306 13 13 bop 0 -82 1981 3 v 0 -100 a Fq(3.)22 b Fp(Lexer)d(and)g(P)l
2307 (arser)f(Genera)m(tion)1124 b Fw(13)0 45 y Fs(class)21
2308 b(IOLexerStack)e(:)j(public)e(IOLexerBuffer)f({)0 95
2309 y(public:)65 145 y(IOLexerStack\(\);)65 195 y(IOLexerStack\(istrea)o
2310 (m&\);)65 244 y(virtual)i(~IOLexerStack\(\);)65 344 y(virtual)g(void)
2311 108 b(push_stream)19 b(\(istream&\);)65 394 y(virtual)i(istream&)f
2312 (pop_stream)41 b(\(\);)0 444 y(};)0 572 y FF(3.2)56 b(P)n(ars)q(er)19
2313 b(Sp)q(eci\014ca)o(t)n(ion)0 660 y Fw(P)o(ars)q(ers)d(are)e(sp)q
2314 (eci\014e)q(d)h(as)f(a)f(t)o(w)o(o)h(ph)o(as)q(e)g(pro)q(ce)q(ss:)51
2315 755 y(1.)20 b(First)14 b(a)f Fo(syntax)j(class)d Fw(i)q(s)h(d)o(e\014n)
2316 o(e)q(d.)19 b(A)14 b(syn)o(t)o(ax)f(class)i(d)o(eclara)o(t)o(ion)e(i)q
2317 (s)g(lik)o(e)g(a)h(norm)o(al)d(C)p Fs(++)i Fw(class)i(d)o(eclara)o(t)o
2318 (ion)f(an)o(d)f(h)o(as)104 805 y(a)i(s)q(imilar)e(syn)o(t)o(ax,)j
2319 (except)h(t)n(h)o(a)o(t)f Fz(Pro)o(p)g Fw(will)e(also)h(gen)o(era)o(t)o
2320 (e)i(t)n(h)o(e)g(in)o(t)o(erf)q(ace)f(of)f(t)n(h)o(e)h(pars)q(er.)25
2321 b(All)15 b(pars)q(ers)j(t)n(h)o(a)o(t)e Fz(Pro)o(p)104
2322 855 y Fw(gen)o(era)o(t)o(e)q(s)e(are)f(encapsula)o(t)o(e)q(d)h(wit)n
2323 (hin)e(a)h(class.)18 b(Thi)q(s)12 b(m)o(ak)o(e)q(s)g(it)g(easy)i(for)e
2324 (t)n(h)o(e)i(programm)n(er)d(t)o(o)i(add)f(addit)o(ion)o(al)f(d)o(a)o
2325 (t)o(a)104 904 y(for)i(pars)q(in)o(g)h(us)q(e,)g(an)o(d)g(t)o(o)g(h)o
2326 (a)o(v)o(e)f(m)n(ul)o(t)o(iple)f(inst)o(ance)q(s)j(of)f(a)f(pars)q(er.)
2327 51 987 y(2.)20 b(Secon)o(dly)m(,)c(t)n(h)o(e)i(gramm)o(a)o(r)c(of)i(t)n
2328 (h)o(e)h(lan)o(guage)g(i)q(s)f(d)o(e\014n)o(e)q(d)i(in)e(a)g
2329 Fo(syntax)h Fw(d)o(eclara)o(t)o(ion)g(as)f(a)h(s)q(et)g(of)f(pro)q(d)o
2330 (u)o(ct)o(ions,)h(in)f(a)104 1037 y(syn)o(t)o(ax)d(s)q(imilar)e(t)o(o)j
2331 (t)n(h)o(a)o(t)h(of)e Fo(yac)n(c)p Fw(.)54 1132 y(W)m(e'll)f(d)o(e)q
2332 (scr)q(ib)q(e)j(t)n(h)o(e)q(s)q(e)g(t)o(w)o(o)f(ph)o(as)q(e)q(s.)0
2333 1252 y Fu(3.2.1)48 b(Syn)o(t)o(ax)14 b(clas)q(s)0 1340
2334 y Fw(A)j(syn)o(t)o(ax)g(class)h(d)o(e\014nit)o(ion)f(sp)q(eci\014e)q(s)
2335 i(an)e(ob)r(ject)h(class)g(t)n(h)o(a)o(t)f(encapsula)o(t)o(e)q(s)i(a)e
2336 (pars)q(er.)29 b(It)o(s)18 b(syn)o(t)o(ax)f(i)q(s)g(t)n(h)o(e)h(sam)o
2337 (e)e(as)h(t)n(h)o(e)0 1390 y(usual)d(C)p Fs(++)f Fw(class)i(d)o
2338 (e\014nit)o(ion,)e(except)i(t)n(h)o(a)o(t)f(t)n(h)o(e)h(pre\014x)f
2339 Fs(syntax)f Fw(i)q(s)g(us)q(e)q(d:)129 1493 y Fo(Syntax)p
2340 252 1493 13 2 v 16 w(Class)p 364 1493 V 15 w(De)n(cl)50
2341 b Fu(::=)g Fs(syntax)21 b(class)12 b Fo(Id)j([)f Fs(:)19
2342 b Fo(Inherit)p 1139 1493 V 15 w(List)14 b(])g Fi(f)f
2343 Fo(Class)p 1395 1493 V 15 w(Bo)n(dy)i Fi(g)e Fs(;)54
2344 1596 y Fw(Thi)q(s)f(sp)q(eci\014ca)o(t)o(ion)g(a)n(u)o(t)o(om)o(a)o(t)o
2345 (ically)f(gen)o(era)o(t)o(e)i(a)g(class)g(wit)n(h)g(t)n(h)o(e)g(follo)o
2346 (win)o(g)d(in)o(t)o(erf)q(ace)j(\(assu)o(min)o(g)f(t)n(h)o(a)o(t)h(t)n
2347 (h)o(e)g(pars)q(er)h(class)0 1646 y(in)f(que)q(st)o(ion)i(i)q(s)e
2348 (calle)q(d)h Fs(ParserClass)p Fw(\))0 1741 y Fs(public:)65
2349 1791 y(ParserClass\(\);)41 b(//)21 b(constructor)0 1840
2350 y(public:)65 1890 y(virtual)g(void)g(parse\(\);)54 1985
2351 y Fw(Th)o(e)14 b(constru)o(ct)o(or)i(an)o(d)d(t)n(h)o(e)i(m)o(et)n(h)o
2352 (o)q(d)e Fs(parse\(\))f Fw(will)h(b)q(e)h(a)n(u)o(t)o(om)o(a)o(t)o
2353 (ically)d(gen)o(era)o(t)o(e)q(d)16 b(la)o(t)o(er.)54
2354 2047 y(A)e(pars)q(er)h(class)f(exp)q(ect)o(s)i(t)n(h)o(e)f(follo)o(win)
2355 o(g)c(m)o(et)n(h)o(o)q(d)i(t)o(o)h(b)q(e)g(d)o(e\014n)o(e)q(d:)65
2356 2142 y Fs(int)22 b(get_token\(\);)0 2236 y Fw(Th)o(e)15
2357 b(fu)o(nct)o(ion)g(of)f Fs(get_token)f Fw(i)q(s)h(t)o(o)h(ret)o(ur)q(n)
2358 h(t)n(h)o(e)f(n)o(ext)h(t)o(ok)o(en)f(f)q(rom)e(t)n(h)o(e)i(lexer)h
2359 (stream)f(wh)o(en)o(ev)o(er)h(it)e(i)q(s)h(calle)q(d.)20
2360 b(It)15 b(sh)o(ould)0 2286 y(ret)o(ur)q(n)f Fs(EOF)g
2361 Fw(if)f(t)n(h)o(e)h(stream)g(i)q(s)g(empt)o(y)m(.)0 2406
2362 y Fu(3.2.2)48 b(Syn)o(t)o(ax)14 b(d)o(eclara)o(t)o(ion)0
2363 2494 y Fw(Th)o(e)g(gramm)o(ar)d(of)i(a)h(lan)o(guage)f(i)q(s)h(sp)q
2364 (eci\014e)q(d)h(in)e(t)n(h)o(e)i Fs(syntax)d Fw(d)o(eclara)o(t)o(ion.)
2365 18 b(It)o(s)d(syn)o(t)o(ax)e(i)q(s)h(li)q(st)o(e)q(d)f(as)h(follo)o
2366 (ws:)p eop
2367 %%Page: 14 15
2368 14 14 bop 0 -82 1981 3 v 0 -100 a Fq(3.)22 b Fp(Lexer)d(and)g(P)l
2369 (arser)f(Genera)m(tion)1124 b Fw(14)129 38 y Fo(Syntax)p
2370 252 38 13 2 v 16 w(De)n(cl)50 b Fu(::=)g Fs(syntax)13
2371 b Fo(Id)h Fi(f)548 88 y Fo([)g(Pr)n(e)n(c)n(e)n(denc)n(e)p
2372 772 88 V 16 w(De)n(cl)h Ft(:)7 b(:)g(:)28 b Fo(Pr)n(e)n(c)n(e)n(denc)n
2373 (e)p 1153 88 V 15 w(De)n(cl)15 b(])548 138 y([)f(Exp)n(e)n(ct)p
2374 694 138 V 16 w(De)n(cl)h(])548 188 y([)f(Pr)n(o)n(duction)p
2375 774 188 V 16 w(R)o(ule)h Ft(:)7 b(:)g(:)28 b Fo(Pr)n(o)n(duction)p
2376 1160 188 V 16 w(R)o(ule)15 b(])506 238 y Fi(g)54 325
2377 y Fw(Th)o(e)g(n)o(am)o(e)e(of)h(a)g Fs(syntax)g Fw(d)o(eclara)o(t)o
2378 (ion)g(sh)o(ould)g(m)o(a)o(t)o(c)o(h)g(t)n(h)o(a)o(t)g(of)g(a)h
2379 Fs(syntax)e(class)p Fw(.)19 b(A)c Fs(syntax)e Fw(d)o(eclara)o(t)o(ion)i
2380 (i)q(s)f(divid)o(e)q(d)0 374 y(in)o(t)o(o)e(t)n(hree)i(part)o(s:)19
2381 b(\(i\))12 b(t)n(h)o(e)i(o)o(p)q(era)o(t)o(or)f(prece)q(d)o(ence)j(s)q
2382 (ect)o(ion,)d(\(ii\))e(t)n(h)o(e)j Fs(expect:)i Ft(n)d
2383 Fw(s)q(ect)o(ion,)f(an)o(d)h(\(iii\))e(t)n(h)o(e)i(gramm)o(ar)d(s)q
2384 (ect)o(ion.)0 492 y Fu(3.2.3)48 b(Prece)q(d)o(ence)0
2385 580 y Fw(Op)q(era)o(t)o(or)15 b(prece)q(d)o(ence)r(s)i(are)d(sp)q
2386 (eci\014e)q(d)h(us)q(in)o(g)f(prece)q(d)o(ence)j(d)o(eclara)o(t)o
2387 (ions.)h(Th)o(e)d(syn)o(t)o(ax)e(i)q(s:)129 666 y Fo(Pr)n(e)n(c)n(e)n
2388 (denc)n(e)p 326 666 V 15 w(De)n(cl)50 b Fu(::=)g Fs(left:)18
2389 b Fo(Inte)n(ger)13 b(Op)n(er)n(ator)27 b Ft(:)7 b(:)g(:)26
2390 b Fo(Op)n(er)n(ator)13 b Fs(;)72 b Fw(left)13 b(asso)q(cia)o(t)o(iv)o
2391 (e)i(o)o(p)q(era)o(t)o(ors)499 716 y Fi(j)68 b Fs(right:)18
2392 b Fo(Inte)n(ger)13 b(Op)n(er)n(ator)27 b Ft(:)7 b(:)g(:)26
2393 b Fo(Op)n(er)n(ator)13 b Fs(;)50 b Fw(r)q(igh)o(t)13
2394 b(asso)q(cia)o(t)o(iv)o(e)h(o)o(p)q(era)o(t)o(ors)129
2395 766 y Fo(Op)n(er)n(ator)177 b Fu(::=)50 b Fo(Char)707
2396 b Fw(s)q(in)o(gle)13 b(c)o(h)o(aract)o(er)i(o)o(p)q(era)o(t)o(or)499
2397 816 y Fi(j)68 b Fo(String)687 b Fw(m)n(ul)o(t)o(i-c)o(h)o(aract)o(er)13
2398 b(o)o(p)q(era)o(t)o(or)499 865 y Fi(j)68 b Fo(Cons)706
2399 b Fw(constru)o(ct)o(or)54 952 y(Th)o(e)13 b(in)o(t)o(eger)h(asso)q(cia)
2400 o(t)o(e)q(d)h(wit)n(h)e(a)g(prece)q(d)o(ence)k(d)o(eclara)o(t)o(ion)c
2401 (i)q(s)g(t)n(h)o(e)i(prece)q(d)o(ence)i(lev)o(el)c(of)f(an)i(o)o(p)q
2402 (era)o(t)o(or.)k(Th)o(e)c(high)o(er)f(t)n(h)o(e)0 1002
2403 y(lev)o(el)h(of)f(an)g(o)o(p)q(era)o(t)o(or,)h(t)n(h)o(e)h
2404 Fo(lower)e Fw(it)o(s)h(prece)q(d)o(ence)q(.)54 1064 y(F)m(or)f
2405 (example,)f(t)n(h)o(e)i(follo)o(win)o(g)e(s)q(et)i(of)f(prece)q(d)o
2406 (enc)q(e)q(s)k(are)e(us)q(e)q(d)f(in)g(t)n(h)o(e)h Fz(Pro)o(p)f
2407 Fw(lan)o(guage)f(pars)q(er:)0 1147 y Fs(left:)21 b(23)g("as";)0
2408 1197 y(left:)g(22)g("::";)0 1247 y(left:)g(21)g("||";)0
2409 1297 y(left:)g(20)g("equiv:";)0 1346 y(left:)g(19)g("xor:";)0
2410 1396 y(left:)g(18)g("implies:";)0 1446 y(left:)g(17)g("&&")g("and";)0
2411 1496 y(right:)g(16)g("|=")g("&=")g("^=")g("<<=")g(">>=";)0
2412 1546 y(right:)g(15)g('=')g(":=")g("+=")g("-=")g("*=")g("/=")g("\045=";)
2413 0 1595 y(left:)g(14)g('|';)0 1645 y(left:)g(13)g(':';)0
2414 1695 y(left:)g(12)g(';';)0 1745 y(left:)g(11)g('^';)0
2415 1795 y(left:)g(10)g('&';)0 1845 y(left:)g(9)g("==")g("!=";)0
2416 1894 y(left:)g(8)g('<')h('>')f(">=")g("<=";)0 1944 y(left:)g(7)g("<<")g
2417 (">>";)0 1994 y(left:)g(6)g('+')h('-')f("with")f("less";)0
2418 2044 y(left:)h(5)g('*')h('/')f('\045';)0 2094 y(left:)g(4)g("++")g
2419 ("--";)0 2143 y(left:)g(3)g('!')h('~')f("arb")f("card")h("dom")g
2420 ("ran";)0 2193 y(left:)g(2)g('[')h(']')f('{')g('}')g('.')g("->")g(;)0
2421 2310 y Fu(3.2.4)48 b Fs(expect:)20 b Ft(n)0 2399 y Fw(Th)o(e)d(d)o
2422 (eclara)o(t)o(ion)f Fs(expect)f Ft(n)h Fw(sp)q(eci\014e)q(s)i(t)n(h)o
2423 (a)o(t)e(t)n(h)o(ere)i(sh)o(ould)e(b)q(e)g Ft(n)g Fw(shift/re)q(d)o(u)o
2424 (ce)i(errors)g(in)d(t)n(h)o(e)i(gramm)o(ar.)23 b(If)15
2425 b(t)n(h)o(e)i(act)o(ual)0 2449 y(gramm)o(ar)11 b(d)o(evia)o(t)o(e)q(s)j
2426 (f)q(rom)e(t)n(hi)q(s)i(n)n(u)o(m)n(b)q(er,)f(a)g(w)o(ar)q(nin)o(g)g
2427 (will)g(b)q(e)h(gen)o(era)o(t)o(e)q(d.)19 b(Th)o(e)14
2428 b(al)o(t)o(er)q(n)o(a)o(t)o(iv)o(e)f(form)f Fs(expect:)p
2429 1763 2449 14 2 v 47 w Fw(sup)o(pre)q(ss)q(e)q(s)0 2499
2430 y(all)h(w)o(ar)q(nin)o(gs.)k(Th)o(e)d(syn)o(t)o(ax)g(i)q(s:)129
2431 2585 y Fo(Exp)n(e)n(ct)p 248 2585 13 2 v 15 w(De)n(cl)50
2432 b Fu(::=)h Fs(expect:)17 b Fo(Inte)n(ger)c Fs(;)50 b
2433 Fw(exp)q(ect)o(s)16 b Ft(n)d Fw(shift/re)q(d)o(u)o(ce)i(errors)421
2434 2634 y Fi(j)69 b Fs(expect:)p 675 2634 14 2 v 46 w(;)160
2435 b Fw(exp)q(ect)o(s)16 b(m)o(an)o(y)c(shift/re)q(d)o(u)o(ce)j(errors)p
2437 %%Page: 15 16
2438 15 15 bop 0 -82 1981 3 v 0 -100 a Fq(3.)22 b Fp(Lexer)d(and)g(P)l
2439 (arser)f(Genera)m(tion)1124 b Fw(15)54 45 y(Thi)q(s)12
2440 b(d)o(eclara)o(t)o(ion)i(i)q(s)e(o)o(pt)o(ion)o(al.)k(If)d(omit)n(t)o
2441 (e)q(d,)f(w)o(ar)q(nin)o(gs)h(will)f(b)q(e)h(pr)q(in)o(t)o(e)q(d)h(if)e
2442 (pars)q(er)j(con\015ict)o(s)f(are)g(fou)o(n)o(d)f(d)o(ur)q(in)o(g)g
2443 (pars)q(er)0 95 y(gen)o(era)o(t)o(ion.)0 215 y Fu(3.2.5)48
2444 b(Pro)q(d)o(u)o(ct)o(i)o(on)13 b(rule)q(s)0 303 y Fw(Th)o(e)h(syn)o(t)o
2445 (ax)g(of)f(t)n(h)o(e)i(pro)q(d)o(u)o(ct)o(ion)e(rule)q(s)i(i)q(s)e(as)h
2446 (follo)o(ws:)129 403 y Fo(Pr)n(o)n(duction)p 328 403
2447 13 2 v 15 w(R)o(ule)50 b Fu(::=)h Fo(Id)14 b([)g(T)m(yp)n(e)p
2448 751 403 V 16 w(Exp)30 b(])13 b Fs(:)626 453 y Fo([)i(One)p
2449 731 453 V 15 w(A)o(lt)f Fs(|)h Ft(:)7 b(:)g(:)13 b Fs(|)i
2450 Fo(One)p 1026 453 V 16 w(A)o(lt)f(])f Fs(;)129 503 y
2451 Fo(One)p 206 503 V 15 w(A)o(lt)198 b Fu(::=)51 b Fo([)14
2452 b(Symb)n(ol)30 b Ft(:)7 b(:)g(:)28 b Fo(Symb)n(ol)15
2453 b(])206 b Fw(on)o(e)14 b(al)o(t)o(er)q(n)o(a)o(t)o(iv)o(e)129
2454 553 y Fo(Symb)n(ol)216 b Fu(::=)51 b Fo(Id)584 b Fw(non-t)o(ermin)o(al)
2455 504 603 y Fi(j)69 b Fo(Cons)530 b Fw(t)o(ermin)o(al)12
2456 b(\(a)i(d)o(a)o(t)o(a)o(t)o(yp)q(e)f(constru)o(ct)o(or\))504
2457 653 y Fi(j)69 b Fo(String)511 b Fw(t)o(ermin)o(al)12
2458 b(\(a)i(d)o(a)o(t)o(a)o(t)o(yp)q(e)f(constru)o(ct)o(or\))504
2459 702 y Fi(j)69 b Fo(Char)531 b Fw(t)o(ermin)o(al)12 b(\(f)q(rom)g(t)n(h)
2460 o(e)i(ASCI)q(I)h(c)o(h)o(aract)o(er)g(s)q(et\))504 752
2461 y Fi(j)69 b Fs(?)599 b Fw(t)n(h)o(e)14 b(error)h(t)o(ermin)o(al)504
2462 802 y Fi(j)69 b Fs($)599 b Fw(t)n(h)o(e)14 b(en)o(d)h(of)e(\014le)h(t)o
2463 (ermin)o(al)504 852 y Fi(j)69 b(f)13 b Fo(Co)n(de)h Fi(g)463
2464 b Fw(em)n(b)q(e)q(dd)o(e)q(d)14 b(act)o(ions)54 953 y(Eac)o(h)g(rule)g
2465 (sp)q(eci\014e)q(s)h(a)f(s)q(et)g(of)g(pro)q(d)o(u)o(ct)o(ions)g(of)f
2466 (t)n(h)o(e)i(form)735 1042 y Ft(l)q(hs)56 b Fw(:)f Ft(A)945
2467 1048 y Fn(11)980 1042 y Ft(A)1011 1048 y Fn(12)1053 1042
2468 y Ft(:)7 b(:)g(:)f(A)1140 1048 y Fn(1)p Fj(n)1178 1052
2469 y Fh(1)847 1091 y Fi(j)55 b Ft(A)945 1097 y Fn(21)980
2470 1091 y Ft(A)1011 1097 y Fn(22)1053 1091 y Ft(:)7 b(:)g(:)f(A)1140
2471 1097 y Fn(2)p Fj(n)1178 1101 y Fh(2)847 1136 y Fw(.)847
2472 1152 y(.)847 1169 y(.)847 1219 y Fi(j)55 b Ft(A)945 1225
2473 y Fj(m)p Fn(1)993 1219 y Ft(A)1024 1225 y Fj(m)p Fn(2)1079
2474 1219 y Ft(:)7 b(:)g(:)e(A)1165 1225 y Fj(mn)1215 1229
2475 y Fg(m)0 1308 y Fw(wh)o(ere)17 b Ft(l)q(hs)f Fw(i)q(s)g(t)n(h)o(e)g
2476 (non-t)o(ermin)o(al)e(an)o(d)h Ft(A)667 1314 y Fj(ij)697
2477 1308 y Fw('s)g(are)h(a)g(mixt)o(ure)f(of)g(t)o(ermin)o(als,)f(non-t)o
2478 (ermin)o(als)g(an)o(d)i(em)n(b)q(e)q(dd)o(e)q(d)g(act)o(ions.)23
2479 b(If)0 1358 y(syn)o(t)n(h)o(e)q(s)q(ize)q(d)d(a)o(t)n(tr)q(ibu)o(t)o(e)
2480 q(s)h(are)e(us)q(e)q(d,)h(t)n(h)o(en)g(t)n(h)o(e)g(t)o(yp)q(e)e(of)h(t)
2481 n(h)o(e)g(s-a)o(t)n(tr)q(ibu)o(t)o(e)h(sh)o(ould)f(b)q(e)g(annot)o(a)o
2482 (t)o(e)q(d)g(n)o(ext)g(t)o(o)g(t)n(h)o(e)g(lhs)g(non-)0
2483 1408 y(t)o(ermin)o(al.)54 1469 y(T)m(ermin)o(als)12 b(can)i(b)q(e)g(sp)
2484 q(eci\014e)q(d)h(in)e(a)h(few)g(w)o(ays:)k(\(i\))c(a)f(c)o(h)o(aract)o
2485 (er)i(lit)o(eral)e(i)q(s)h(a)f(pre)q(d)o(e\014n)o(e)q(d)k(t)o(ermin)o
2486 (al)12 b(of)h(t)n(h)o(e)i(sam)o(e)e(n)o(am)o(e,)0 1519
2487 y(\(ii\))k(a)h(str)q(in)o(g)h(lit)o(eral)e(i)q(s)h(m)o(a)o(t)o(c)o(h)o
2488 (e)q(d)f(wit)n(h)h(a)g Fs(datatype)f Fw(or)h(a)g Fs(lexeme)f(class)g
2489 Fw(constru)o(ct)o(or)j(of)e(t)n(h)o(e)h(sam)o(e)e(n)o(am)o(e,)g
2490 (\(iii\))g(an)0 1569 y(id)o(en)o(t)o(i\014er)d(i)q(s)f(a)g(t)o(ermin)o
2491 (al)f(if)h(t)n(h)o(ere)i(i)q(s)e(a)g Fs(datatype)f Fw(constru)o(ct)o
2492 (or)j(of)e(t)n(h)o(e)h(sam)o(e)f(n)o(am)o(e.)j(An)o(y)e(ot)n(h)o(er)g
2493 (id)o(en)o(t)o(i\014ers)h(are)e(assu)o(m)o(e)q(d)0 1619
2494 y(t)o(o)h(b)q(e)g(non-t)o(ermin)o(als.)54 1680 y(F)m(or)f(example,)f(t)
2495 n(h)o(e)i(follo)o(win)o(g)e(are)i(t)o(w)o(o)f(s)q(et)o(s)j(of)d(pro)q
2496 (d)o(u)o(ct)o(ion)h(rule)q(s)g(us)q(e)q(d)h(in)f(t)n(h)o(e)g
2497 Fz(Pro)o(p)g Fw(transla)o(t)o(or)h(it)o(s)q(elf:)0 1775
2498 y Fs(ty)21 b(Ty:)43 b(simple_ty)325 b({)22 b($$)f(=)h($1;)f(})0
2499 1825 y(|)152 b(ty)22 b('=')f(exp)304 b({)22 b($$)f(=)h
2500 (DEFVALty\($1,$3\);)c(})0 1875 y(|)152 b(ty)22 b('*')391
2501 b({)22 b($$)f(=)h(mkptrty\($1\);)d(})0 1925 y(|)152 b(ty)22
2502 b('&')391 b({)22 b($$)f(=)h(mkrefty\($1\);)d(})0 1975
2503 y(|)152 b(ty)22 b('[')f(']')304 b({)22 b($$)f(=)h(mkptrty\($1\);)d(})0
2504 2024 y(|)152 b(ty)22 b('[')f(exp)g(']')217 b({)22 b($$)f(=)h
2505 (mkarrayty\($1,$3\);)c(})0 2074 y(;)0 2124 y(exp)j(Exp:)174
2506 2174 y(app_exp)369 b({)22 b($$)f(=)h($1;)f(})0 2224 y(|)152
2507 b(exp)22 b('+')f(exp)282 b({)22 b($$)f(=)h(BINOPexp\("+",$1,$)o(3\);)d
2508 (})0 2273 y(|)152 b(exp)22 b('-')f(exp)282 b({)22 b($$)f(=)h
2509 (BINOPexp\("-",$1,$)o(3\);)d(})0 2323 y(|)152 b(exp)22
2510 b('*')f(exp)282 b({)22 b($$)f(=)h(BINOPexp\("*",$1,$)o(3\);)d(})0
2511 2373 y(|)152 b(exp)22 b('/')f(exp)282 b({)22 b($$)f(=)h
2512 (BINOPexp\("/",$1,$)o(3\);)d(})0 2423 y(|)152 b(exp)22
2513 b('\045')f(exp)282 b({)22 b($$)f(=)h(BINOPexp\("\045",$1,$)o(3\);)d(})0
2514 2473 y(|)152 b(exp)22 b('^')f(exp)282 b({)22 b($$)f(=)h
2515 (BINOPexp\("^",$1,$)o(3\);)d(})0 2522 y(|)152 b(exp)22
2516 b("+=")e(exp)261 b({)22 b($$)f(=)h(BINOPexp\("+=",$1,)o($3\);)c(})0
2517 2572 y(|)152 b(exp)22 b("-=")e(exp)261 b({)22 b($$)f(=)h
2518 (BINOPexp\("-=",$1,)o($3\);)c(})0 2622 y(|)152 b(exp)22
2519 b("*=")e(exp)261 b({)22 b($$)f(=)h(BINOPexp\("*=",$1,)o($3\);)c(})p
2521 %%Page: 16 17
2522 16 16 bop 0 -82 1981 3 v 0 -100 a Fq(3.)22 b Fp(Lexer)d(and)g(P)l
2523 (arser)f(Genera)m(tion)1124 b Fw(16)0 45 y Fs(|)152 b(exp)22
2524 b("/=")e(exp)261 b({)22 b($$)f(=)h(BINOPexp\("/=",$1,)o($3\);)c(})0
2525 95 y(|)152 b(exp)22 b("\045=")e(exp)261 b({)22 b($$)f(=)h
2526 (BINOPexp\("\045=",$1,)o($3\);)c(})0 190 y Fo(etc)d Ft(:)7
2527 b(:)g(:)54 251 y Fw(Here,)14 b Fs(ty)e Fw(i)q(s)g(t)n(h)o(e)i(non-t)o
2528 (ermin)o(al)d(of)h(t)n(hi)q(s)h(pro)q(d)o(u)o(ct)o(ion.)k(Th)o(e)c(t)o
2529 (yp)q(e)g(of)f(t)n(h)o(e)i(syn)o(t)n(h)o(e)q(s)q(ize)q(d)g(a)o(t)n(tr)q
2530 (ibu)o(t)o(e)g(of)e(t)n(hi)q(s)h(rule)g(i)q(s)f Fs(Ty)p
2531 Fw(,)g(an)o(d)0 301 y(it)j(i)q(s)h(wr)q(it)n(t)o(en)g(n)o(ext)g(t)o(o)g
2532 (t)n(h)o(e)g(non-t)o(ermin)o(al.)22 b(Lik)o(e)15 b Fo(yac)n(c)p
2533 Fw(,)h(t)n(h)o(e)h(syn)o(t)n(h)o(e)q(s)q(ize)q(d)g(a)o(t)n(tr)q(ibu)o
2534 (t)o(e)f(of)g(a)f(rule)h(can)g(b)q(e)g(reference)q(d)i(us)q(in)o(g)0
2535 351 y(t)n(h)o(e)e Fs($)f Fw(v)n(ar)q(ia)o(ble)q(s:)20
2536 b(v)n(ar)q(ia)o(ble)14 b Fs($)o($)i Fw(d)o(enot)o(e)g(t)n(h)o(e)g(syn)o
2537 (t)n(h)o(e)q(s)q(ize)q(d)h(a)o(t)n(tr)q(ibu)o(t)o(e)g(of)e(t)n(h)o(e)h
2538 (curren)o(t)h(rule,)e(while)g Fs($)p Ft(n)h Fw(wh)o(ere)g
2539 Ft(n)g Fw(i)q(s)e(1,)i(2,)f(3,)0 401 y Ft(:)7 b(:)g(:)e
2540 Fw(d)o(enot)o(e)15 b(t)n(h)o(e)g(syn)o(t)n(h)o(e)q(s)q(ize)q(d)g(a)o(t)
2541 n(tr)q(ibu)o(t)o(e)g(of)e(t)n(h)o(e)i Ft(n)p Fw(t)n(h)f(rhs)h(sym)n(b)q
2542 (ol)c(of)i(t)n(h)o(e)i(curren)o(t)g(rule.)0 521 y Fu(3.2.6)48
2543 b(P)o(ars)q(er)15 b(rep)q(ort)0 609 y Fw(If)e(t)n(h)o(e)h(comm)o(an)o
2544 (d)c(lin)o(e)j(o)o(pt)o(ion)f Fs(-r)h Fw(i)q(s)g(us)q(e)q(d,)h(t)n(h)o
2545 (en)g(in)f(addit)o(ion)f(t)o(o)h(gen)o(era)o(t)o(in)o(g)h(t)n(h)o(e)g
2546 (co)q(d)o(e)h(for)e(t)n(h)o(e)h(gramm)o(a)o(r,)d(t)n(h)o(e)j(transla)o
2547 (t)o(or)0 659 y(will)d(also)i(gen)o(era)o(t)o(e)h(a)e(compre)o(h)o(ens)
2548 q(iv)o(e)h(rep)q(ort)h(of)f(t)n(h)o(e)g(gramm)o(ar)d(an)o(d)j(t)n(h)o
2549 (e)g(re)q(sul)o(t)o(in)o(g)h(LALR\(1\))f(a)n(u)o(t)o(om)o(a)o(t)o(on.)k
2550 (Th)o(e)c(amou)o(n)o(t)0 709 y(of)g(d)o(et)o(ails)h(in)g(t)n(hi)q(s)f
2551 (rep)q(ort)i(can)f(b)q(e)g(v)n(ar)q(ie)q(d)g(us)q(in)o(g)f(t)n(h)o(e)i
2552 (t)n(h)o(e)f(v)o(erb)q(os)q(e)i(o)o(pt)o(ion)d Fs(-v)p
2553 Fw(:)0 812 y Fs(-v1)20 b Fw(Pr)q(in)o(t)14 b(full)e(inform)o(a)o(t)o
2554 (ion)f(for)j(all)e(LR\(0\))i(st)o(a)o(t)o(e)q(s.)0 895
2555 y Fs(-v2)20 b Fw(Also)15 b(pr)q(in)o(t)f(ou)o(t)h(t)n(h)o(e)h(lo)q(oka)
2556 o(h)o(ead)e(s)q(et)i(of)e(a)h(re)q(d)o(u)o(ct)o(ion)g(rule.)22
2557 b(Thi)q(s)14 b(m)o(ay)f(b)q(e)i(us)q(eful)g(for)f(trac)o(kin)o(g)h(do)o
2558 (wn)g(shift/re)q(d)o(u)o(ce)104 945 y(an)o(d)e(re)q(d)o(u)o(ce/re)q(d)o
2559 (u)o(ce)k(con\015ict)o(s.)0 1028 y Fs(-v3)j Fw(Do)13
2560 b(b)q(ot)n(h)i Fs(-v1)e Fw(an)o(d)g Fs(-v2)p Fw(.)0 1147
2561 y Fu(3.2.7)48 b(In)o(t)o(erf)q(acin)n(g)14 b(wit)n(h)g(t)n(h)o(e)h(gen)
2562 o(era)o(t)o(e)q(d)e(lexer)0 1236 y Fw(Th)o(e)19 b(eas)q(ie)q(st)i(w)o
2563 (ay)d(of)h(in)o(t)o(erf)q(acin)o(g)f(wit)n(h)h(a)g(lexer)h(i)q(s)f(t)o
2564 (o)g(em)n(b)q(e)q(d)f(an)h(ob)r(ject)h(of)f(class)h Fs(LexerBuffer)p
2565 Fw(,)d Fs(IOLexerBuffer)p Fw(,)0 1286 y(or)g Fs(IOLexerStack)d
2566 Fw(wit)n(hin)i(a)h(syn)o(t)o(ax)f(class)717 1270 y Fn(2)737
2567 1286 y Fw(.)26 b(W)m(e)17 b(can)g(t)n(h)o(en)g(d)o(e\014n)o(e)h(t)n(h)o
2568 (e)g(t)o(ok)o(eniza)o(t)o(ion)e(m)o(et)n(h)o(o)q(d)g
2569 Fs(get_token)f Fw(us)q(in)o(g)h(t)n(h)o(e)0 1335 y Fs(matchscan)c
2570 Fw(st)o(a)o(t)o(em)o(en)o(t)h(d)o(e)q(scr)q(ib)q(e)q(d)i(in)f(s)q(ect)o
2571 (ion)g(3.1.5.)0 1463 y FF(3.3)56 b(De)o(buggin)o(g)18
2572 b(P)n(ars)q(ers)0 1552 y Fw(Curren)o(t)n(ly)m(,)f(only)g(t)n(h)o(e)g
2573 (most)g(rudim)o(en)o(t)o(ary)e(d)o(e)o(buggin)o(g)j(f)q(acilit)o(ie)q
2574 (s)d(h)o(a)o(v)o(e)i(b)q(een)g(implem)n(en)o(t)o(e)q(d)e(for)i(pars)q
2575 (er.)28 b(Th)o(e)18 b(us)q(er)g(can)0 1602 y(d)o(e\014n)o(e)h(t)n(h)o
2576 (e)g(m)o(acro)e Fs(DEBUG_)p Ft(C)s Fw(,)h(wh)o(ere)h
2577 Ft(C)i Fw(i)q(s)d(t)n(h)o(e)h(n)o(am)o(e)e(of)g(a)h(syn)o(t)o(ax)g
2578 (class)h(b)q(efore)g(t)n(h)o(e)g Fs(syntax)e Fw(d)o(e\014nit)o(ion.)31
2579 b(Thi)q(s)17 b(will)0 1651 y(act)o(iv)n(a)o(t)o(e)c(t)n(h)o(e)i(pars)q
2580 (er)g(d)o(e)o(buggin)o(g)f(co)q(d)o(e.)19 b(Dur)q(in)o(g)14
2581 b(pars)q(in)o(g,)f(t)n(h)o(e)i(re)q(d)o(u)o(ct)o(ions)f(t)n(h)o(a)o(t)g
2582 (are)h(t)o(ak)o(en)f(will)e(b)q(e)i(pr)q(in)o(t)o(e)q(d)g(t)o(o)g
2583 Fs(cerr)p Fw(.)p 0 1686 792 2 v 46 1713 a Fm(2)64 1725
2584 y Fl(Alt)o(ern)o(a)o(t)o(iv)o(ely)m(,)8 b(inh)o(er)q(it)o(ance)h(m)o
2585 (ay)h(be)i(us)q(e)q(d.)p eop
2586 %%Page: 17 18
2587 17 17 bop 0 -82 1981 3 v 0 -100 a Fq(4.)16 b Fp(Algebraic)i(D)o(a)m(t)m
2588 (a)m(types)g(and)h(P)l(a)m(ttern)g(Ma)m(tching)762 b
2589 Fw(17)0 45 y Fv(4)66 b(Alge)o(braic)20 b(Da)n(t)n(a)n(t)n(yp)q(e)r(s)h
2590 (an)n(d)g(P)n(a)n(t)n(t)n(er)q(n)h(Ma)n(t)n(c)n(hin)o(g)0
2591 148 y Fz(Pro)o(p)14 b Fw(implem)n(en)o(t)o(s)d(alge)o(braic)i(d)o(a)o
2592 (t)o(a)o(t)o(yp)q(e)q(s)h(an)o(d)f(pa)o(t)n(t)o(er)q(n)h(m)o(a)o(t)o(c)
2593 o(hin)o(g)e(in)h(t)n(h)o(e)h(st)o(yle)f(of)g(St)o(an)o(d)o(ard)h
2594 (ML[HMM86)o(].)j(T)m(ree,)d(D)o(A)o(G)0 198 y(an)o(d)g(ev)o(en)g(graph)
2595 g(stru)o(ct)o(ure)q(s)j(can)d(b)q(e)g(sp)q(eci\014e)q(d)h(as)f(a)g(s)q
2596 (et)h(of)e(d)o(a)o(t)o(a)o(t)o(yp)q(e)h(equa)o(t)o(ions)g(in)g(alge)o
2597 (braic)f(d)o(a)o(t)o(a)o(t)o(yp)q(e)h(sp)q(eci\014ca)o(t)o(ions.)0
2598 247 y Fz(Pro)o(p)e Fw(t)n(h)o(en)g(pro)q(cee)q(ds)h(t)o(o)f(transla)o
2599 (t)o(e)f(t)n(h)o(e)q(s)q(e)i(in)o(t)o(o)e(concret)o(e)i(C)p
2600 Fs(++)e Fw(class)q(e)q(s.)18 b(Thi)q(s)11 b(m)o(ak)o(e)q(s)g(it)f(v)o
2601 (ery)i(easy)g(t)o(o)g(implem)n(en)o(t)d(complex)0 297
2602 y(d)o(a)o(t)o(a)14 b(stru)o(ct)o(ure)q(s.)54 359 y(Alge)o(braic)i(d)o
2603 (a)o(t)o(a)o(t)o(yp)q(e)q(s)g(can)g(b)q(e)g(m)o(anipula)o(t)o(e)q(d)e
2604 (an)o(d)h(transform)o(e)q(d)h(us)q(in)o(g)f Fz(Pro)o(p)i
2605 Fw(pa)o(t)n(t)o(er)q(n)f(m)o(a)o(t)o(c)o(hin)o(g)f(constru)o(ct)o(s,)j
2606 (whic)o(h)0 409 y(d)o(ecomp)q(os)q(e)12 b(a)e(d)o(a)o(t)o(a)o(t)o(yp)q
2607 (e)h(v)n(alue)g(in)o(t)o(o)f(it)o(s)i(const)o(it)o(uen)o(t)o(s.)19
2608 b(Complex)8 b(pa)o(t)n(t)o(er)q(ns)13 b(in)o(v)o(olvin)o(g)8
2609 b(m)n(ul)o(t)o(iple)h(ob)r(ject)o(s)k(can)e(b)q(e)g(sp)q(eci\014e)q(d.)
2610 0 459 y(Th)o(e)q(s)q(e)k(are)f(transla)o(t)o(e)q(d)h(in)o(t)o(o)e
2611 (e\016cien)o(t)h(t)o(e)q(st)o(in)o(g)h(an)o(d)e(s)q(elect)o(ion)i(co)q
2612 (d)o(e)g(in)e(C)p Fs(++)p Fw(.)54 520 y(In)h(t)n(h)o(e)h(follo)o(win)o
2613 (g)d(w)o(e)j(sh)o(all)e(giv)o(e)h(a)g(br)q(ief)g(o)o(v)o(erview)h(of)f
2614 (t)n(h)o(e)h(pa)o(t)n(t)o(er)q(n)g(m)o(a)o(t)o(c)o(hin)o(g)e(fea)o(t)o
2615 (ure)q(s)j(of)e Fz(Pro)o(p)p Fw(.)20 b(F)m(or)14 b(most)g(us)q(ers)i
2616 (of)0 570 y(mo)q(d)o(er)q(n)d(d)o(eclara)o(t)o(iv)o(e)h(lan)o(guage)q
2617 (s)g(m)o(an)o(y)e(of)i(t)n(h)o(e)q(s)q(e)h(fea)o(t)o(ure)q(s)g(are)g
2618 (already)f(f)q(amil)o(iar)d(constru)o(ct)o(s.)0 698 y
2619 FF(4.1)56 b(A)19 b(quic)n(k)e(t)o(our)i(of)g(pa)o(t)n(t)n(er)q(n)f(m)o
2620 (a)o(t)n(c)n(hin)o(g)0 786 y Fw(Alge)o(braic)10 b(d)o(a)o(t)o(a)o(t)o
2621 (yp)q(e)q(s)h(are)g(sp)q(eci\014e)q(d)g(us)q(in)o(g)f
2622 Fs(datatype)f Fw(d)o(e\014nit)o(ions,)i(whic)o(h)f(d)o(e\014n)o(e)h(t)n
2623 (h)o(e)g(in)o(d)o(u)o(ct)o(iv)o(e)f(stru)o(ct)o(ure)i(of)e(on)o(e)g(of)
2624 g(more)0 836 y(t)o(yp)q(e)q(s)16 b(us)q(in)o(g)e(a)h(tree-gramm)o(ar)e
2625 (lik)o(e)i(syn)o(t)o(ax.)21 b(Wh)o(en)15 b(a)g(d)o(a)o(t)o(a)o(t)o(yp)q
2626 (e)g(i)q(s)f(d)o(eclare)q(d,)i(t)n(h)o(e)g(follo)o(win)o(g)d(o)o(p)q
2627 (era)o(t)o(ions)h(are)i(impli)o(cit)n(ly)0 886 y(d)o(e\014n)o(e)q(d)k
2628 (b)o(y)f(t)n(h)o(e)h(d)o(a)o(t)o(a)o(t)o(yp)q(e)f(compiler:)27
2629 b(\(1\))19 b(t)n(h)o(e)g(constru)o(ct)o(ors)j(for)d(all)e(t)n(h)o(e)j
2630 (v)n(ar)q(ian)o(t)o(s)e(of)h(a)g(t)o(yp)q(e;)i(\(2\))e(t)n(h)o(e)g(id)o
2631 (en)o(t)o(it)o(y)g(t)o(e)q(st)0 936 y(o)o(p)q(era)o(t)o(or)14
2632 b Fs(==)p Fw(,)g(an)o(d)f(t)n(h)o(e)i(ass)q(ignm)o(en)o(t)e(o)o(p)q
2633 (era)o(t)o(or)i Fs(=)e Fw(for)h(t)n(hi)q(s)g(t)o(yp)q(e;)g(an)o(d)g
2634 (\(3\))g(t)n(h)o(e)h(m)o(em)n(b)q(er)c(fu)o(nct)o(ions)k(n)o(ee)q(d)o
2635 (e)q(d)h(t)o(o)e(d)o(ecomp)q(os)q(e)0 986 y(a)g(d)o(a)o(t)o(a)o(t)o(yp)
2636 q(e)f(v)n(alue)h(d)o(ur)q(in)o(g)f(pa)o(t)n(t)o(er)q(n)i(m)o(a)o(t)o(c)
2637 o(hin)o(g.)54 1047 y(W)m(e'll)d(s)q(elect)k(t)n(h)o(e)f(in)o(t)o(er)q
2638 (n)o(als)e(of)h(a)g(compiler)f(for)h(a)g(s)q(impli)o(\014e)q(d)e(imp)q
2639 (era)o(t)o(iv)o(e)h(lan)o(guage)h(as)g(t)n(h)o(e)h(ru)o(nnin)o(g)g
2640 (example)d(in)i(t)n(hi)q(s)0 1097 y(s)q(ect)o(ion.)k(Sup)o(p)q(os)q(e)d
2641 (t)n(h)o(a)o(t)e(in)g(t)n(hi)q(s)h(lan)o(guage)f(an)g(expre)q(ss)q(ion)
2642 i(i)q(s)e(comp)q(os)q(e)q(d)g(of)g(id)o(en)o(t)o(i\014ers,)h(in)o(t)o
2643 (eger)g(const)o(an)o(t)o(s)h(an)o(d)e(t)n(h)o(e)h(four)0
2644 1147 y(ar)q(it)n(hm)o(et)o(ic)e(o)o(p)q(era)o(t)o(ors.)19
2645 b(Th)o(en)14 b(t)n(h)o(e)h(stru)o(ct)o(ure)h(of)d(t)n(h)o(e)i(a)o
2646 (bstract)g(syn)o(t)o(ax)e(tree)j(can)e(b)q(e)g(sp)q(eci\014e)q(d)h(as)f
2647 (follo)o(ws:)65 1250 y Fs(datatype)21 b(Exp)g(=)g(INT)g(\(int\))349
2648 1300 y(|)g(ID)43 b(\(const)21 b(char)g(*\))349 1350 y(|)g(ADD)g(\(Exp,)
2649 g(Exp\))349 1399 y(|)g(SUB)g(\(Exp,)g(Exp\))349 1449
2650 y(|)g(MUL)g(\(Exp,)g(Exp\))349 1499 y(|)g(DIV)g(\(Exp,)g(Exp\))349
2651 1549 y(;)54 1652 y Fw(A)n(bstract)15 b(syn)o(t)o(ax)f(of)f(an)g(expre)q
2652 (ss)q(ion)j(su)o(c)o(h)e(as)g Fo(a)h(*)g(b)g(-)f(17)h
2653 Fw(can)f(b)q(e)g(constru)o(ct)o(e)q(d)i(direct)n(ly)e(in)f(a)h
2654 (pre\014x)g(syn)o(t)o(ax,)f(direct)n(ly)0 1702 y(mirror)q(in)o(g)e(t)n
2655 (h)o(a)o(t)i(of)f(t)n(h)o(e)h(d)o(e\014nit)o(ion.)18
2656 b(Th)o(e)13 b Fz(Pro)o(p)g Fw(d)o(a)o(t)o(a)o(t)o(yp)q(e)g(compiler)e
2657 (will)h(a)n(u)o(t)o(om)o(a)o(t)o(ically)e(gen)o(era)o(t)o(e)k(a)e(C)p
2658 Fs(++)h Fw(class)g(hierarc)o(h)o(y)0 1752 y(t)o(o)18
2659 b(repre)q(s)q(en)o(t)i(t)n(h)o(e)e(v)n(ar)q(ian)o(t)o(s)f(of)g(t)o(yp)q
2660 (e)h Fs(Exp)p Fw(.)28 b(Da)o(t)o(a)o(t)o(yp)q(e)17 b(constru)o(ct)o(or)
2661 j(fu)o(nct)o(ions\(not)e(t)o(o)g(b)q(e)g(mi)q(st)o(ak)o(en)d(wit)n(h)j
2662 (C)p Fs(++)p Fw('s)f(class)0 1801 y(constru)o(ct)o(ors\))g(will)12
2663 b(also)h(b)q(e)h(a)n(u)o(t)o(om)o(a)o(t)o(ically)e(gen)o(era)o(t)o(e)q
2664 (d)j(us)q(in)o(g)f(t)n(h)o(e)g(sam)o(e)f(n)o(am)o(e)q(s)g(as)h(t)n(h)o
2665 (e)h(v)n(ar)q(ian)o(t)o(s.)65 1905 y Fs(Exp)22 b(formula)e(=)h
2666 (ADD\(MUL\(ID\("a"\),ID\(")o(b"\)\),)o(INT\()o(17\)\);)54
2667 2008 y Fw(Da)o(t)o(a)o(t)o(yp)q(e)12 b(v)n(alue)q(s)h(can)h(b)q(e)g(d)o
2668 (ecomp)q(os)q(e)q(d)g(us)q(in)o(g)f(t)n(h)o(e)h Fs(match)f
2669 Fw(st)o(a)o(t)o(em)o(en)o(t,)f(whic)o(h)h(can)h(b)q(e)f(s)q(een)i(as)e
2670 (a)h(gen)o(eraliza)o(t)o(ion)e(of)h('s)0 2058 y Fs(switch)d
2671 Fw(constru)o(ct.)19 b(P)o(a)o(t)n(t)o(er)q(n)12 b(m)o(a)o(t)o(c)o(hin)o
2672 (g)d(i)q(s)i(a)g(com)n(bin)o(a)o(t)o(ion)e(of)h(con)o(dit)o(ion)o(al)g
2673 (branc)o(hin)o(g)h(an)o(d)g(v)n(alue)g(bin)o(din)o(g.)16
2674 b(F)m(or)11 b(example,)0 2107 y(a)16 b(t)o(ypical)g(ev)n(alua)o(t)o
2675 (ion)f(fu)o(nct)o(ion)i(for)f(t)n(h)o(e)i(t)o(yp)q(e)e
2676 Fs(Exp)g Fw(can)h(b)q(e)g(wr)q(it)n(t)o(en)g(as)g(in)f(t)n(h)o(e)i
2677 (follo)o(win)o(g)c(example.)24 b(Not)o(ice)17 b(t)n(h)o(a)o(t)g(eac)o
2678 (h)0 2157 y(arm)e(of)h(a)g Fs(case)f Fw(i)q(s)h(in)g(f)q(act)g(a)g(pa)o
2679 (t)n(t)o(er)q(n\(wit)n(h)h(o)o(pt)o(ion)o(al)e(v)n(ar)q(ia)o(ble)q(s\))
2680 g(mirror)q(in)o(g)f(t)n(h)o(e)j(syn)o(t)o(ax)f(of)g(a)g(d)o(a)o(t)o(a)o
2681 (t)o(yp)q(e.)26 b(Th)o(e)16 b(pa)o(t)n(t)o(er)q(n)0 2207
2682 y(v)n(ar)q(ia)o(ble)q(s\(wr)q(it)n(t)o(en)11 b(wit)n(h)h(t)n(h)o(e)h
2683 (pre\014x)f Fs(?)g Fw(in)f(t)n(h)o(e)i(s)q(equel\))g(of)e(a)h(m)o(a)o
2684 (t)o(c)o(hin)o(g)e(arm)g(i)q(s)i Fo(b)n(ound)h Fw(t)o(o)f(t)n(h)o(e)g
2685 (v)n(alue)g(of)f(t)n(h)o(e)i(m)o(a)o(t)o(c)o(hin)o(g)d(v)n(alue,)0
2686 2257 y(whic)o(h)k(can)g(b)q(e)g(su)n(bs)q(equen)o(t)n(ly)h(reference)q
2687 (d)i(an)o(d)d(mo)q(di\014e)q(d)e(in)i(t)n(h)o(e)g(act)o(ion)g(of)f(an)h
2688 (arm.)0 2360 y Fs(int)21 b(eval)g(\(Exp)g(e,)g(const)g(map<const)f
2689 (char)h(*,)h(int>&)e(env\))0 2410 y({)43 b(match)21 b(\(e\))65
2690 2460 y({)44 b(case)21 b(INT)g(?i:)174 b(return)20 b(?i;)131
2691 2509 y(case)h(ID)43 b(?id:)152 b(return)20 b(env[?id];)131
2692 2559 y(case)h(ADD)g(\(?e1,?e2\):)f(return)g(eval\(?e1,env\))f(+)j
2693 (eval\(?e2,env\);)131 2609 y(case)f(SUB)g(\(?e1,?e2\):)f(return)g
2694 (eval\(?e1,env\))f(-)j(eval\(?e2,env\);)p eop
2695 %%Page: 18 19
2696 18 18 bop 0 -82 1981 3 v 0 -100 a Fq(4.)16 b Fp(Algebraic)i(D)o(a)m(t)m
2697 (a)m(types)g(and)h(P)l(a)m(ttern)g(Ma)m(tching)762 b
2698 Fw(18)131 45 y Fs(case)21 b(MUL)g(\(?e1,?e2\):)f(return)g
2699 (eval\(?e1,env\))f(*)j(eval\(?e2,env\);)131 95 y(case)f(DIV)g
2700 (\(?e1,?e2\):)f(return)g(eval\(?e1,env\))f(/)j(eval\(?e2,env\);)65
2701 145 y(})0 195 y(})0 313 y Fu(4.1.1)48 b(P)o(a)o(t)n(t)o(er)q(n)13
2702 b(m)o(a)o(t)o(c)o(hin)o(g)g(v)o(ersus)i(ob)s(ject-or)q(ien)n(t)n(e)q(d)
2703 e(st)o(yle)0 401 y Fw(Al)o(t)n(h)o(ough)20 b(a)g(compara)o(ble)e(ev)n
2704 (alua)o(t)o(ion)h(fu)o(nct)o(ion)h(can)g(b)q(e)h(wr)q(it)n(t)o(en)f(in)
2705 g(ob)r(ject)h(or)q(ien)o(t)o(e)q(d)f(st)o(yle)h(us)q(in)o(g)f(la)o(t)o
2706 (e)f(bin)o(din)o(g,)i(as)0 451 y(in)d(b)q(elo)o(w,)g(in)g(gen)o(eral)h
2707 (pa)o(t)n(t)o(er)q(n)g(m)o(a)o(t)o(c)o(hin)o(g)e(i)q(s)h(m)n(u)o(c)o(h)
2708 f(more)h(p)q(o)o(w)o(erful)g(t)n(h)o(an)g(la)o(t)o(e)g(bin)o(din)o(g)g
2709 (in)g(C)p Fs(++)p Fw(,)h(whic)o(h)f(only)f(allo)o(ws)0
2710 501 y(di)q(spa)o(t)o(c)o(hin)o(g)c(bas)q(e)q(d)i(on)e(t)n(h)o(e)i(t)o
2711 (yp)q(e)f(of)f(on)o(e)h(rece)q(iv)o(er.)44 596 y Fs(//)21
2712 b(Class)g(definitions)44 646 y(class)f(Exp)i({)44 695
2713 y(public:)109 745 y(virtual)e(int)h(eval\(const)f(map<const)g(char)h
2714 (*,)g(int>&)g(env\))g(const)g(=)h(0;)44 795 y(};)44 845
2715 y(class)e(INT)i(:)f(Exp)g({)109 895 y(int)g(i;)44 944
2716 y(public:)109 994 y(int)g(eval\(const)f(map<const)g(char)h(*,)g(int>&)g
2717 (env\);)44 1044 y(};)44 1094 y(class)f(ID)i(:)f(Exp)g({)109
2718 1144 y(const)g(char)g(*)g(id)44 1194 y(public:)109 1243
2719 y(int)g(eval\(const)f(map<const)g(char)h(*,)g(int>&)g(env\);)44
2720 1293 y(};)44 1343 y(...)44 1443 y(//)g(Member)g(functions)44
2721 1492 y(int)g(INT::eval\(const)d(map<const)i(char)h(*,)h(int>&)e(env\))h
2722 (const)g({)h(return)e(i;)i(})44 1542 y(int)f(ID)g(::eval\(const)e
2723 (map<const)h(char)h(*,)h(int>&)e(env\))h(const)g({)h(return)e(id;)i(})
2724 44 1592 y(int)f(ADD::eval\(const)d(map<const)i(char)h(*,)h(int>&)e
2725 (env\))h(const)109 1642 y({)h(return)e(e1->eval\(env\))f(+)j
2726 (e2->eval\(env\);)d(})44 1692 y(int)i(SUB::eval\(const)d(map<const)i
2727 (char)h(*,)h(int>&)e(env\))h(const)109 1741 y({)h(return)e
2728 (e1->eval\(env\))f(-)j(e2->eval\(env\);)d(})44 1791 y(int)i
2729 (MUL::eval\(const)d(map<const)i(char)h(*,)h(int>&)e(env\))h(const)109
2730 1841 y({)h(return)e(e1->eval\(env\))f(*)j(e2->eval\(env\);)d(})44
2731 1891 y(int)i(DIV::eval\(const)d(map<const)i(char)h(*,)h(int>&)e(env\))h
2732 (const)109 1941 y({)h(return)e(e1->eval\(env\))f(/)j(e2->eval\(env\);)d
2733 (})54 2036 y Fw(F)m(or)9 b(example,)g(in)g(t)n(h)o(e)i(follo)o(win)o(g)
2734 d(fu)o(nct)o(ion)i(w)o(e)g(us)q(e)h(n)o(e)q(st)o(e)q(d)g(pa)o(t)n(t)o
2735 (er)q(ns,)h(non-lin)o(ear)d(pa)o(t)n(t)o(er)q(ns)i(\(i.e.)17
2736 b(pa)o(t)n(t)o(er)q(ns)11 b(wit)n(h)f(m)n(ul)o(t)o(iple)0
2737 2085 y(o)q(ccurrence)q(s)18 b(of)13 b(a)i(pa)o(t)n(t)o(er)q(n)g(v)n(ar)
2738 q(ia)o(ble\),)d(an)o(d)i(guards)h(t)o(o)f(p)q(erform)f(alge)o(braic)h
2739 (s)q(impli\014ca)o(t)o(ion)d(of)j(an)g(expre)q(ss)q(ion.)21
2740 b(Al)o(t)n(h)o(ough)0 2135 y(t)n(h)o(e)15 b(pa)o(t)n(t)o(er)q(ns)g(are)
2741 f(rela)o(t)o(iv)o(ely)f(s)q(imple)e(in)j(t)n(hi)q(s)g(example,)d(in)j
2742 (gen)o(eral)g(arbitrar)q(ily)e(complex)g(pa)o(t)n(t)o(er)q(ns)j(m)o(ay)
2743 e(b)q(e)h(us)q(e)q(d.)0 2230 y Fs(Exp)21 b(simplify)f(\(Exp)h(redex\))0
2744 2280 y({)43 b(//)22 b(recursive)e(traversal)g(code)h(omitted)f(...)65
2745 2380 y(//)i(match)f(while)f(repeats)h(the)g(matching)f(process)65
2746 2429 y(//)i(until)f(no)g(more)g(matches)f(are)h(found.)65
2747 2479 y(match)g(while)g(\(redex\))65 2529 y({)44 b(ADD\(INT)20
2748 b(0,)43 b(?x\):)108 b({)22 b(redex)f(=)g(?x;)h(})65 2579
2749 y(|)44 b(ADD\(INT)20 b(?x,)h(INT)g(?y\):)g({)h(redex)f(=)g
2750 (INT\(?x+?y\);)f(})65 2629 y(|)44 b(ADD\(?x,)107 b(INT)21
2751 b(0\))65 b({)22 b(redex)f(=)g(?x;)h(})p eop
2752 %%Page: 19 20
2753 19 19 bop 0 -82 1981 3 v 0 -100 a Fq(4.)16 b Fp(Algebraic)i(D)o(a)m(t)m
2754 (a)m(types)g(and)h(P)l(a)m(ttern)g(Ma)m(tching)762 b
2755 Fw(19)65 45 y Fs(|)44 b(SUB\(?x,)107 b(INT)21 b(0\):)43
2756 b({)22 b(redex)f(=)g(?x;)h(})65 95 y(|)44 b(SUB\(?x,)107
2757 b(?x\):)h({)22 b(redex)f(=)g(INT\(0\);)g(})65 145 y(|)44
2758 b(SUB\(INT)20 b(?x,)h(INT)g(?y\):)g({)h(redex)f(=)g(INT\(?x-?y\);)f(})
2759 65 195 y(|)44 b(MUL\(INT)20 b(0,)43 b(?x\):)108 b({)22
2760 b(redex)f(=)g(INT\(0\);)g(})65 244 y(|)44 b(MUL\(?x,)107
2761 b(INT)21 b(0\):)43 b({)22 b(redex)f(=)g(INT\(0\);)g(})65
2762 294 y(|)44 b(DIV\(?x,)107 b(?x\):)h({)22 b(redex)f(=)g(INT\(1\);)g(})
2763 174 344 y(//)h(don't)e(divide)h(by)g(zero.)65 394 y(|)44
2764 b(DIV\(INT)20 b(?x,)h(INT)g(?y\))h(|)f(?y)h(!=)f(0:)g({)h(redex)f(=)g
2765 (INT\(?x/?y\);)f(})65 444 y(|)44 b(...)65 493 y(})65
2766 543 y(return)21 b(redex;)0 593 y(})54 696 y Fw(P)o(a)o(t)n(t)o(er)q(n)d
2767 (m)o(a)o(t)o(c)o(hin)o(g)e(in)g Fz(Pro)o(p)i Fw(i)q(s)f(not)g(re)q(str)
2768 q(ict)o(e)q(d)i(t)o(o)f(on)o(e)f(d)o(a)o(t)o(a)o(t)o(yp)q(e)h(a)o(t)f
2769 (a)g(t)o(im)o(e.)27 b(In)17 b(t)n(h)o(e)h(follo)o(win)o(g)d(example,)h
2770 (w)o(e)h(us)q(e)0 746 y(m)o(a)o(t)o(c)o(hin)o(g)10 b(on)i(m)n(ul)o(t)o
2771 (iple)e(v)n(alue)q(s)i(t)o(o)h(d)o(e\014n)o(e)g(equalit)o(y)e(on)h
2772 (expre)q(ss)q(ions)i(in)o(d)o(u)o(ct)o(iv)o(ely)m(.)h(F)m(or)d(v)n(ar)q
2773 (iet)o(y)m(,)f(w)o(e'll)g(us)q(e)h(t)n(h)o(e)h Fs(fun)e
2774 Fw(v)n(ar)q(ian)o(t)0 796 y(of)k Fs(match)p Fw(,)g(whic)o(h)g(d)o
2775 (e\014n)o(e)q(s)j(a)d(fu)o(nct)o(ion)h(in)f(rule)h(form.)22
2776 b(Not)o(ice)16 b(t)n(h)o(a)o(t)g(t)n(h)o(e)g(last)g(cas)q(e)h(of)e(t)n
2777 (h)o(e)h(m)o(a)o(t)o(c)o(h)f(s)q(et)h(us)q(e)q(s)h Fo(wild)f(c)n(ar)n
2778 (ds)f Fs(_)0 846 y Fw(t)o(o)f(ca)o(t)o(c)o(h)f(all)g(t)n(h)o(e)h(ot)n
2779 (h)o(er)g(non-equal)f(com)n(bin)o(a)o(t)o(ions.)i(Since)f(C)p
2780 Fs(++)f Fw(do)q(e)q(s)g(not)h(pro)o(vid)o(e)f(m)n(ul)o(t)o(iple)e(di)q
2781 (spa)o(t)o(c)o(hin)o(g,)i(implem)n(en)o(t)o(in)o(g)0
2782 895 y(bin)o(ary)g(\(or)h Ft(n)p Fw(-ary\))f(m)o(a)o(t)o(c)o(hin)o(g)f
2783 (o)o(p)q(era)o(t)o(ions)h(on)g(v)n(ar)q(ian)o(t)f(d)o(a)o(t)o(a)o(t)o
2784 (yp)q(e)q(s)i(are)g(in)f(gen)o(eral)h(cu)o(m)n(b)q(ersom)o(e)f(an)o(d)g
2785 (v)o(erb)q(os)q(e)i(in)e(ob)r(ject-)0 945 y(or)q(ien)o(t)o(e)q(d)d(st)o
2786 (yle.)17 b(In)9 b(con)o(trast,)i(us)q(in)o(g)f(an)f(ap)o(plica)o(t)o
2787 (iv)o(e)f(pa)o(t)n(t)o(er)q(n)i(m)o(a)o(t)o(c)o(hin)o(g)f(st)o(yle)h(m)
2788 o(an)o(y)e(m)o(anipula)o(t)o(i)o(ons)f(an)o(d)j(transform)o(a)o(t)o
2789 (ions)0 995 y(on)k(v)n(ar)q(ian)o(t)e(d)o(a)o(t)o(a)o(t)o(yp)q(e)q(s)i
2790 (wit)n(h)g(tree-lik)o(e)g(or)g(graph-lik)o(e)f(stru)o(ct)o(ure)j(can)e
2791 (b)q(e)g(expre)q(ss)q(e)q(d)j(su)o(ccinct)n(ly)m(.)0
2792 1098 y Fs(fun)k(equal)g(INT)g(?i,)108 b(INT)22 b(?j:)f(bool:)g({)g
2793 (return)g(?i)g(==)g(?j;)h(})44 1148 y(|)f(equal)g(ID)43
2794 b(?a,)108 b(ID)44 b(?b:)152 b({)21 b(return)g(strcmp\(a,b\))e(==)j(0;)f
2795 (})44 1198 y(|)g(equal)g(ADD\(?a,?b\),)e(ADD\(?c,?d\):)64
2796 b({)21 b(return)g(equal\(?a,?c\))e(&&)i(equal\(?b,?d\);)e(})44
2797 1248 y(|)i(equal)g(SUB\(?a,?b\),)e(SUB\(?c,?d\):)64 b({)21
2798 b(return)g(equal\(?a,?c\))e(&&)i(equal\(?b,?d\);)e(})44
2799 1297 y(|)i(equal)g(MUL\(?a,?b\),)e(MUL\(?c,?d\):)64 b({)21
2800 b(return)g(equal\(?a,?c\))e(&&)i(equal\(?b,?d\);)e(})44
2801 1347 y(|)i(equal)g(DIV\(?a,?b\),)e(DIV\(?c,?d\):)64 b({)21
2802 b(return)g(equal\(?a,?c\))e(&&)i(equal\(?b,?d\);)e(})44
2803 1397 y(|)i(equal)g(_,)217 b(_:)262 b({)21 b(return)g(false;)f(})44
2804 1447 y(;)0 1567 y Fu(4.1.2)48 b(More)16 b(examp)o(le)q(s)0
2805 1655 y Fw(As)j(anot)n(h)o(er)h(example,)e(w)o(e)i(can)f(sp)q(ecify)g(t)
2806 n(h)o(e)h(t)o(erm)e(stru)o(ct)o(ure)j(of)d Fo(wel)r(l-forme)n(d)g
2807 (formulas)h Fw(in)g(pro)o(p)q(os)q(it)o(ion)f(calculus)h(as)0
2808 1705 y(follo)o(ws.)d(Not)o(ice)e(t)n(h)o(a)o(t)g(t)n(h)o(e)h(constru)o
2809 (ct)o(ors)h Fs(F)e Fw(an)o(d)f Fs(T)h Fw(are)g(n)n(ullary)m(.)65
2810 1808 y Fs(datatype)21 b(Wff)g(=)g(F)349 1858 y(|)g(T)349
2811 1908 y(|)g(Var)109 b(\(const)20 b(char)h(*\))349 1957
2812 y(|)g(And)109 b(\(Wff,)20 b(Wff\))349 2007 y(|)h(Or)131
2813 b(\(Wff,)20 b(Wff\))349 2057 y(|)h(Not)109 b(\(Wff\))349
2814 2107 y(|)21 b(Implies)g(\(Wff,)f(Wff\))349 2157 y(;)54
2815 2260 y Fw(Da)o(t)o(a)o(t)o(yp)q(e)q(s)15 b(t)n(h)o(a)o(t)h(are)g(param)
2816 o(etr)q(ically)d(p)q(olymorphic,)g(su)o(c)o(h)k(as)f(li)q(st)o(s)f(an)o
2817 (d)h(tree)q(s,)h(can)f(b)q(e)g(d)o(e\014n)o(e)q(d)h(b)o(y)f(param)o(et)
2818 o(er)q(izin)o(g)0 2310 y(t)n(h)o(em)f(wit)n(h)h(re)q(sp)q(ect)h(t)o(o)f
2819 (on)o(e)g(of)f(more)g(t)o(yp)q(e)q(s.)23 b(F)m(or)16
2820 b(example,)e(b)q(ot)n(h)i(li)q(st)o(s)f(an)o(d)h(tree)h(b)q(elo)o(w)e
2821 (are)h(param)o(etr)q(ic)e(on)h(on)o(e)h(t)o(yp)q(e)0
2822 2359 y(argu)o(m)o(en)o(t)d Fs(T)p Fw(.)65 2463 y Fs(datatype)21
2823 b(List<T>)f(=)h(nil)436 2512 y(|)g(cons\(T,)g(List<T>\);)65
2824 2562 y(datatype)g(Tree<T>)f(=)h(empty)436 2612 y(|)g(leaf\(T\))p
2826 %%Page: 20 21
2827 20 20 bop 0 -82 1981 3 v 0 -100 a Fq(4.)16 b Fp(Algebraic)i(D)o(a)m(t)m
2828 (a)m(types)g(and)h(P)l(a)m(ttern)g(Ma)m(tching)762 b
2829 Fw(20)436 45 y Fs(|)21 b(node\(Tree<T>,)f(T,)h(Tree<T>\);)65
2830 145 y(List<int>)f(primes)h(=)g(cons\(2,cons\(3,cons\(5)o(,con)o(s\(7,n)
2831 o(il\)\)\))o(\);)65 195 y(List<int>)f(more_primes)g(=)h
2832 (cons\(11,cons\(13,pri)o(mes\)\))o(;)65 244 y(Tree<char)f(*>)i(names)e
2833 (=)i(node\(leaf\("Church")o(\),"G)o(odel")o(,empt)o(y\);)54
2834 347 y Fw(As)15 b(a)g(programmi)o(n)o(g)d(con)o(v)o(enience,)k
2835 Fz(Pro)o(p)f Fw(h)o(as)g(a)g(s)q(et)g(of)g(buil)o(t-in)f(li)q(st-lik)o
2836 (e)f(syn)o(t)o(act)o(ic)i(forms.)k(Unlik)o(e)14 b(lan)o(guage)q(s)h(su)
2837 o(c)o(h)0 397 y(as)e(ML,)f(h)o(o)o(w)o(ev)o(er,)h(t)n(h)o(e)q(s)q(e)h
2838 (forms)d(are)i(not)f(pre)q(d)o(e\014n)o(e)q(d)j(t)o(o)e(b)q(e)g(an)o(y)
2839 f(sp)q(eci\014c)h(li)q(st)f(t)o(yp)q(e)q(s.)18 b(Inst)o(ead,)13
2840 b(it)g(i)q(s)f(p)q(oss)q(ible)g(for)h(t)n(h)o(e)g(us)q(er)0
2841 447 y(t)o(o)k(us)q(e)g(t)n(h)o(e)q(s)q(e)g(forms)e(on)h(an)o(y)g(d)o(a)
2842 o(t)o(a)o(t)o(yp)q(e)q(s)h(wit)n(h)f(a)g(n)o(a)o(t)o(ural)g(bin)o(ary)g
2843 Fo(c)n(ons)h Fw(o)o(p)q(era)o(t)o(or)f(an)o(d)g(a)g(n)n(ullary)g
2844 Fo(nil)g Fw(constru)o(ct)o(or.)27 b(F)m(or)0 497 y(inst)o(ance,)14
2845 b(t)n(h)o(e)h(previous)f(li)q(st)f(d)o(a)o(t)o(a)o(t)o(yp)q(e)h(can)g
2846 (b)q(e)g(re)q(d)o(e\014n)o(e)q(d)i(as)e(follo)o(ws:)65
2847 600 y Fs(datatype)21 b(List<T>)f(=)h(#[])h(|)f(#[)h(T)f(...)g(List<T>)g
2848 (];)65 650 y(List<int>)f(primes)h(=)g(#[)h(2,)f(3,)h(5,)f(7)h(];)65
2849 700 y(List<int>)e(more_primes)g(=)h(#[)h(11,)f(13)g(...)h(primes)e(];)
2850 65 749 y(List<char)g(*>)i(names)e(=)i(#[)f("Church",)f("Godel",)g
2851 ("Turing",)g("Curry")h(];)65 849 y(template)g(<class)f(T>)131
2852 899 y(List<T>)g(append)h(\(List<T>)f(a,)h(List<T>)g(b\))131
2853 949 y({)43 b(match)21 b(\(a\))196 998 y({)44 b(case)20
2854 b(#[]:)218 b(return)20 b(b;)262 1048 y(case)g(#[hd)h(...)h(tl]:)f
2855 (return)f(#[hd)h(...)g(append\(tl,b\)];)196 1098 y(})131
2856 1148 y(})0 1251 y Fw(Th)o(e)c(empt)o(y)e(li)q(st)h(i)q(s)g(wr)q(it)n(t)
2857 o(en)g(as)h Fs(#[])p Fw(,)f(while)g Fo(c)n(ons\(a,b\))h
2858 Fw(i)q(s)e(wr)q(it)n(t)o(en)i(as)g Fs(#[)k(a)h(...)f(b)h(])p
2859 Fw(.)j(An)17 b(expre)q(ss)q(ion)g(of)f(t)n(h)o(e)h(sp)q(ecial)0
2860 1301 y(form)12 b Fs(#[a,)21 b(b,)g(c])p Fw(,)13 b(for)h(inst)o(ance,)g
2861 (i)q(s)f(s)q(imple)f(syn)o(t)o(act)o(ic)i(sugar)g(for)f(rep)q(ea)o(t)o
2862 (e)q(d)j(ap)o(plica)o(t)o(ion)11 b(of)i(t)n(h)o(e)i Fo(c)n(ons)f
2863 Fw(o)o(p)q(era)o(t)o(or,)g(i.e.)87 1404 y Fs(#[a,)21
2864 b(b,)h(c])f(==)g(#[a)g(...)h(#[)f(b)h(...)f(#[)g(c)h(...)f(#[])g(])h(])
2865 f(].)87 1454 y(#[a,)g(b,)h(c)f(...)g(d)h(])f(==)h(#[a)f(...)g(#[)h(b)f
2866 (...)g(#[)h(c)f(...)g(d)h(])g(])f(].)54 1557 y Fw(Li)q(st-lik)o(e)14
2867 b(sp)q(ecial)i(forms)e(are)i(not)g(limit)o(e)q(d)d(t)o(o)j(d)o(a)o(t)o
2868 (a)o(t)o(yp)q(e)q(s)g(wit)n(h)g(only)f(t)o(w)o(o)g(v)n(ar)q(ian)o(t)o
2869 (s.)23 b(F)m(or)15 b(example,)f(w)o(e)i(can)g(d)o(e\014n)o(e)h(a)0
2870 1607 y(d)o(a)o(t)o(a)o(t)o(yp)q(e)12 b(s)q(imila)o(r)d(in)j(stru)o(ct)o
2871 (ure)h(t)o(o)f(S-expre)q(ss)q(ions)i(in)d Fo(Lisp)g Fw(or)h
2872 Fo(scheme)p Fw(.)18 b(Here's)13 b(h)o(o)o(w)e(su)o(c)o(h)h(as)g(d)o(a)o
2873 (t)o(a)o(t)o(yp)q(e)g(m)o(ay)e(b)q(e)h(d)o(e\014n)o(e)q(d)1948
2874 1592 y Fn(3)1968 1607 y Fw(:)65 1710 y Fs(datatype)21
2875 b(Sexpr)f(=)i(INT)86 b(\(int\))392 1760 y(|)22 b(REAL)64
2876 b(\(double\))392 1809 y(|)22 b(STRING)e(\(char)h(*\))392
2877 1859 y(|)h(ATOM)64 b(\(const)21 b(char)g(*\))392 1909
2878 y(|)h(#\(\))392 1959 y(|)g(#\()f(Sexpr)g(...)g(Sexpr)g(\))65
2879 2009 y(where)g(type)g(Atom)g(=)h(Sexpr)42 b(//)22 b(synonym)e(for)h
2880 (Sexpr)65 2058 y(;)54 2162 y Fw(Wit)n(h)12 b(t)n(hi)q(s)h(d)o(a)o(t)o
2881 (a)o(t)o(yp)q(e)g(sp)q(eci\014ca)o(t)o(ion)f(in)h(place,)f(w)o(e)h(can)
2882 g(constru)o(ct)i(v)n(alue)q(s)d(of)h(t)o(yp)q(e)g Fs(Sexpr)e
2883 Fw(in)i(a)f(syn)o(t)o(ax)h(clos)q(e)g(t)o(o)h(t)n(h)o(a)o(t)f(of)0
2884 2211 y Fo(Lisp)p Fw(.)18 b(F)m(or)12 b(example,)f(w)o(e)i(can)g(d)o
2885 (e\014n)o(e)h(lam)n(b)q(d)o(a)d(expre)q(ss)q(ions)k(corre)q(sp)q(on)o
2886 (din)o(g)f(t)o(o)f(t)n(h)o(e)h(com)n(bin)o(a)o(t)o(ors)e
2887 Ft(I)s Fw(,)h Ft(K)j Fw(an)o(d)d Ft(S)i Fw(as)e(follo)o(ws:)65
2888 2314 y Fs(Atom)21 b(LAMBDA)g(=)g(ATOM\("LAMBDA"\);)65
2889 2364 y(Atom)g(f)131 b(=)21 b(ATOM\("f"\);)65 2414 y(Atom)g(x)131
2890 b(=)21 b(ATOM\("x"\);)65 2464 y(Atom)g(y)131 b(=)21 b(ATOM\("y"\);)65
2891 2514 y(Atom)g(NIL)87 b(=)21 b(#\(\);)p 0 2590 792 2 v
2892 46 2617 a Fm(3)64 2629 y Fl(for)10 b(simplicit)o(y)m(,)f(w)o(e'll)j(us)
2893 q(e)e(a)i(str)q(ing)d(repre)q(s)q(en)o(t)o(a)o(t)n(ion)f(for)j(a)o
2894 (toms)f(inst)o(ead)g(of)h(a)h(more)e(e\016cien)o(t)g(m)o(et)o(h)o(o)q
2895 (d.)p eop
2896 %%Page: 21 22
2897 21 21 bop 0 -82 1981 3 v 0 -100 a Fq(4.)22 b Fp(Algebraic)c(D)o(a)m(t)m
2898 (a)m(types)g(and)h(P)l(a)m(ttern)g(Ma)m(tching)756 b
2899 Fw(21)65 45 y Fs(Sexpr)21 b(I)h(=)f(#\(LAMBDA,)f(#\(x\),)h(x\);)65
2900 95 y(Sepxr)g(K)h(=)f(#\(LAMBDA,)f(#\(x\),)h(#\(LAMBDA,)f(#\(y\),)h
2901 (x\)\);)65 145 y(Sepxr)g(S)h(=)f(#\(LAMBDA,)f(#\(f\),)349
2902 195 y(#\(LAMBDA,)g(#\(x\),)414 244 y(#\(LAMBDA,)g(#\(y\),)h
2903 (#\(#\(f,x\),)f(#\(g,x\)\)\)\)\);)54 346 y Fw(Similar)13
2904 b(t)o(o)j(li)q(st-lik)o(e)f(forms,)f(v)o(ect)o(or-lik)o(e)j(forms)e
2905 (are)h(also)f(a)o(v)n(aila)o(ble.)22 b(Thi)q(s)16 b(addre)q(ss)q(e)q(s)
2906 j(on)o(e)d(of)f(t)n(h)o(e)i(\015aws)f(of)g(t)n(h)o(e)g(C)p
2907 Fs(++)0 396 y Fw(lan)o(guage,)f(whic)o(h)g(lac)o(ks)h(\014rst)h(class)f
2908 (array)g(constru)o(ct)o(ors.)26 b(V)m(ect)o(ors)17 b(are)f(s)q(imply)d
2909 (h)o(omogen)o(eous)i(arrays)g(wh)o(os)q(e)i(s)q(ize)q(s)g(are)0
2910 446 y(\014xe)q(d)11 b(an)o(d)g(are)g(d)o(et)o(ermin)o(e)q(d)g(a)o(t)g
2911 (crea)o(t)o(ion)h(t)o(im)o(e)735 431 y Fn(4)752 446 y
2912 Fw(.)17 b(Ran)o(dom)8 b(acce)q(ss)13 b(wit)n(hin)e(v)o(ect)o(ors)h(can)
2913 g(b)q(e)e(don)o(e)h(in)g(const)o(an)o(t)g(t)o(im)o(e.)16
2914 b(Unlik)o(e)0 496 y(li)q(st)o(s,)h(h)o(o)o(w)o(ev)o(er,)g(t)n(h)o(e)h
2915 (prep)q(en)o(din)o(g)f(o)o(p)q(era)o(t)o(ion)f(i)q(s)g(not)h(sup)o(p)q
2916 (ort)o(e)q(d.)27 b(V)m(ect)o(ors)18 b(lit)o(erals)f(are)g(d)o(elimit)o
2917 (e)q(d)e(wit)n(h)i(t)n(h)o(e)g(comp)q(os)q(it)o(e)0 545
2918 y(brac)o(k)o(et)o(s)i Fs(\(|)i(...)g(|\))p Fw(,)d Fs([|)j(...)g(|])p
2919 Fw(,)c(or)h Fs({|)j(...)g(|})p Fw(.)28 b(In)17 b(t)n(h)o(e)h(follo)o
2920 (win)o(g)d(example)g(t)n(h)o(e)j(d)o(a)o(t)o(a)o(t)o(yp)q(e)g
2921 Fs(Exp)e Fw(us)q(e)q(s)j(v)o(ect)o(ors)g(t)o(o)0 595
2922 y(repre)q(s)q(en)o(t)d(t)n(h)o(e)f(co)q(o)q(e\016cien)o(t)o(s)f(of)g(t)
2923 n(h)o(e)g(p)q(olynomial)o(s:)65 697 y Fs(datatype)21
2924 b(Vector<T>)e(=)j(\(|)f(T)h(|\);)65 747 y(datatype)f(Exp)g(=)g
2925 (Polynomial)f(\(Var,)h(Vector<int>\))349 797 y(|)g(Functor)g(\(Exp,)f
2926 (Vector<Exp>\))349 846 y(|)h(Atom)g(\(Var\))349 896 y(|)g(...)65
2927 946 y(where)g(type)g(Var)g(=)h(const)f(char)g(*;)65 996
2928 y(Exp)h(formula)e(=)h(Polynomial\("X",)e(\(|)j(1,)f(2,)g(3)h(|\)\);)54
2929 1098 y Fw(Commo)o(nly)7 b(us)q(e)q(d)k(pa)o(t)n(t)o(er)q(ns)g(can)f(b)q
2930 (e)h(giv)o(en)e(synon)o(yms)g(so)h(t)n(h)o(a)o(t)h(t)n(h)o(ey)f(can)h
2931 (b)q(e)f(readily)g(reus)q(e)q(d)h(wit)n(h)o(ou)o(t)g(u)o(n)o(d)o(ue)g
2932 (rep)q(et)o(it)o(ion.)0 1147 y(Thi)q(s)e(can)g(b)q(e)h(accompli)q(sh)o
2933 (e)q(d)d(b)o(y)i(d)o(e\014nin)o(g)h(ps)q(eudo)g(d)o(a)o(t)o(a)o(t)o(yp)
2934 q(e)g(constru)o(ct)o(ors)h(t)o(o)f(st)o(an)o(d)g(for)e(common)f(pa)o(t)
2935 n(t)o(er)q(ns)j(us)q(in)o(g)f Fo(datatyp)n(e)0 1197 y(law)j
2936 Fw(d)o(e\014nit)o(ions.)18 b(F)m(or)12 b(example,)e(t)n(h)o(e)j(follo)o
2937 (win)o(g)d(s)q(et)k(of)d(laws)i(d)o(e\014n)o(e)g(som)o(e)f(commonly)d
2938 (us)q(e)q(d)k(sp)q(ecial)f(forms)g(for)g(a)g Fo(Lisp)p
2939 Fw(-lik)o(e)0 1247 y(lan)o(guage)h(us)q(in)o(g)h(t)n(h)o(e)h
2940 (previously)e(d)o(e\014n)o(e)q(d)j Fs(Sexpr)c Fw(d)o(a)o(t)o(a)o(t)o
2941 (yp)q(e.)65 1349 y Fs(datatype)21 b(law)g(inline)f(Lambda\(x,e\))42
2942 b(=)21 b(#\(ATOM)g("LAMBDA",)f(#\(x\),)g(e\))305 1399
2943 y(|)i(inline)e(Quote\(x\))108 b(=)21 b(#\(ATOM)g("QUOTE",)f(x\))305
2944 1449 y(|)i(inline)e(If\(a,b,c\))86 b(=)21 b(#\(ATOM)g("IF",)f(a,)i(b,)f
2945 (c\))305 1498 y(|)h(inline)e(Nil)218 b(=)21 b(#\(\))305
2946 1548 y(|)h(inline)e(ProgN\(exprs\))g(=)h(#\(ATOM)g("PROGN")f(...)h
2947 (exprs\))305 1598 y(|)h(SpecialForm)41 b(=)22 b(#\(ATOM)e(\("LAMBDA")g
2948 (||)h("IF")g(||)850 1648 y("PROGN")f(||)i("QUOTE"\))e(...)h(_\))305
2949 1698 y(|)h(Call\(f,args\))d(=)j(!)f(SpecialForm)f(&&)h(#\(f)g(...)g
2950 (args\))305 1747 y(;)54 1849 y Fw(Not)o(e)15 b(t)n(h)o(a)o(t)g(t)n(h)o
2951 (e)g(pa)o(t)n(t)o(er)q(n)h Fs(SpecialForm)d Fw(i)q(s)h(m)o(ean)o(t)g(t)
2952 o(o)h(m)o(a)o(t)o(c)o(h)f(all)g(sp)q(ecial)g(forms)g(in)g(our)h(t)o(o)o
2953 (y)g(lan)o(guage:)20 b(i.e.)g Fo(lamb)n(das)p Fw(,)0
2954 1899 y Fo(ifs)p Fw(,)12 b Fo(pr)n(o)n(gn)p Fw('s)i(an)o(d)f
2955 Fo(quotes)p Fw(.)18 b(Th)o(e)c(pa)o(t)n(t)o(er)q(n)g(di)q(sju)o(nct)o
2956 (ion)f(conn)o(ect)o(iv)o(e)h Fs(||)f Fw(i)q(s)g(us)q(e)q(d)h(t)o(o)g
2957 (link)f(t)n(h)o(e)q(s)q(e)i(forms)d(t)o(oget)n(h)o(er.)19
2958 b(Since)14 b(w)o(e'd)0 1949 y(lik)o(e)f(t)n(h)o(e)i Fs(Call)f
2959 Fw(pa)o(t)n(t)o(er)q(n)h(t)o(o)f(m)o(a)o(t)o(c)o(h)f(only)h(if)f(t)n(h)
2960 o(e)i(S-expre)q(ss)q(ion)h(i)q(s)d(not)i(a)e(sp)q(ecial)h(form,)f(w)o
2961 (e)h(us)q(e)h(t)n(h)o(e)g(pa)o(t)n(t)o(er)q(n)g(n)o(ega)o(t)o(ion)e(an)
2962 o(d)0 1999 y(conju)o(nct)o(ion)h(o)o(p)q(era)o(t)o(ors,)g
2963 Fs(!)g Fw(an)o(d)g Fs(&&)f Fw(are)h(us)q(e)q(d)h(t)o(o)f(screen)i(ou)o
2964 (t)e(sp)q(ecial)g(forms.)54 2060 y(Wit)n(h)f(t)n(h)o(e)q(s)q(e)j(d)o
2965 (e\014nit)o(ions)e(in)f(place,)g(an)h(in)o(t)o(erpret)o(er)h(for)f(our)
2966 g(lan)o(guage)f(can)h(b)q(e)g(wr)q(it)n(t)o(en)h(t)n(h)n(us:)65
2967 2162 y Fs(Sexpr)21 b(eval)g(\(Sexpr)g(e\))65 2212 y({)44
2968 b(match)21 b(\(e\))131 2262 y({)43 b(Call\(?f,?args\):)106
2969 b({)22 b(/*)f(perform)f(function)g(call)h(*/)h(})131
2970 2311 y(|)43 b(Lambda\(?x,?e\):)128 b({)22 b(/*)f(construct)f(closure)g
2971 (*/)i(})131 2361 y(|)43 b(If\(?e,?then,?else\))o(:)19
2972 b({)j(/*)f(branching)f(*/)h(})131 2411 y(|)43 b(Quote\(?x\):)216
2973 b({)22 b(return)e(?x;)h(})131 2461 y(|)43 b(...:)348
2974 b({)22 b(/*)f(others)g(*/)g(})131 2511 y(})65 2561 y(})p
2975 0 2590 792 2 v 46 2617 a Fm(4)64 2629 y Fl(F)m(or)11
2976 b(e\016ciency)m(,)f(b)q(oun)o(ds)f(c)o(h)o(ec)o(king)f(is)k
2977 Ff(not)g Fl(perform)o(e)q(d.)p eop
2978 %%Page: 22 23
2979 22 22 bop 0 -82 1981 3 v 0 -100 a Fq(4.)16 b Fp(Algebraic)i(D)o(a)m(t)m
2980 (a)m(types)g(and)h(P)l(a)m(ttern)g(Ma)m(tching)762 b
2981 Fw(22)54 45 y(As)12 b(an)g(in)o(t)o(ere)q(st)o(in)o(g)h(not)o(e,)f(t)n
2982 (h)o(e)h(sp)q(ecial)e(form)g(pa)o(t)n(t)o(er)q(n)h(can)g(also)g(b)q(e)g
2983 (rewr)q(it)n(t)o(en)h(us)q(in)o(g)f(regular)g(expre)q(ss)q(ion)h(str)q
2984 (in)o(g)f(m)o(a)o(t)o(c)o(h-)0 95 y(in)o(g,)h(as)h(in)g(t)n(h)o(e)g
2985 (follo)o(win)o(g:)22 198 y Fs(datatype)20 b(law)h(SpecialForm)f(=)h
2986 (#\(ATOM)g(/LAMBDA|IF|PROGN)o(|QUOT)o(E/)e(...)i(_\))54
2987 301 y Fw(In)d(addit)o(ion,)f(s)q(ince)i(t)n(h)o(e)g(law)f(constru)o(ct)
2988 o(ors)i Fs(Lambda)p Fw(,)e Fs(Quote)p Fw(,)g Fs(If)p
2989 Fw(,)g Fs(Nil)g Fw(an)o(d)g Fs(ProgN)f Fw(are)h(d)o(e\014n)o(e)q(d)i
2990 (wit)n(h)e(t)n(h)o(e)h Fs(inline)0 351 y Fw(k)o(eyw)o(ord,)f(t)n(h)o(e)
2991 q(s)q(e)h(constru)o(ct)o(ors)h(can)e(b)q(e)g(us)q(e)q(d)g(t)o(o)g(wit)n
2992 (hin)f(expre)q(ss)q(ions)j(as)d(a)o(bbrevia)o(t)o(e)q(s)h(for)g(t)n(h)o
2993 (e)q(ir)g(rhs)g(d)o(e\014nit)o(ions.)29 b(F)m(or)0 401
2994 y(example,)12 b(wr)q(it)o(in)o(g)h Fs(Lambda\(x,x\))e
2995 Fw(i)q(s)j(t)n(h)o(e)g(sam)o(e)f(wr)q(it)o(in)o(g)g Fs
2996 (#\(ATOM\("Lambda"\),#)o(\(x\),x)o(\))p Fw(.)0 521 y
2997 Fu(4.1.3)48 b(V)l(ar)q(ian)o(t)o(s)14 b(of)h(m)o(a)o(t)o(c)o(h)0
2998 609 y Fw(As)q(id)o(e)j(f)q(rom)e(t)n(h)o(e)j(usual)e(plain)g(pa)o(t)n
2999 (t)o(er)q(n)h(m)o(a)o(t)o(c)o(hin)o(g)f(constru)o(ct)o(s,)k(a)c(few)h
3000 (v)n(ar)q(ian)o(t)o(s)f(of)h(t)n(h)o(e)g Fs(match)f Fw(constru)o(ct)j
3001 (are)e(o\013ere)q(d.)0 659 y(W)m(e'll)12 b(br)q(ie\015y)i(en)n(u)o(m)o
3002 (era)o(t)o(e)g(a)g(few)g(of)f(t)n(h)o(e)q(s)q(e:)62 754
3003 y Fi(\017)21 b Fw(Th)o(e)16 b Fs(matchall)e Fw(constru)o(ct)k(i)q(s)d
3004 (a)h(v)n(ar)q(ian)o(t)e(of)i Fs(match)e Fw(t)n(h)o(a)o(t)i(execu)o(t)o
3005 (e)q(s)j(all)c(m)o(a)o(t)o(c)o(hin)o(g)f(rule)q(s\(inst)o(ead)k(of)d
3006 (just)h(t)n(h)o(e)h(\014rst)104 803 y(on)o(e\))d(in)f(s)q(equence.)62
3007 886 y Fi(\017)21 b Fw(Eac)o(h)f(rule)h(of)e(a)h Fs(match)f
3008 Fw(st)o(a)o(t)o(em)o(en)o(t)h(can)g(h)o(a)o(v)o(e)g(asso)q(cia)o(t)o(e)
3009 q(d)h(cost)h(expre)q(ss)q(ions.)38 b(Inst)o(ead)22 b(of)d(s)q(elect)o
3010 (in)o(g)i(t)n(h)o(e)g(\014rst)104 936 y(m)o(a)o(t)o(c)o(hin)o(g)13
3011 b(rule)i(t)o(o)g(execu)o(t)o(e)i(as)e(in)f(t)n(h)o(e)h(d)o(ef)q(a)n(ul)
3012 o(t,)g(all)f(m)o(a)o(t)o(c)o(hin)o(g)f(rule)q(s)j(are)f(cons)q(id)o
3013 (ere)q(d)h(an)o(d)f(t)n(h)o(e)g(rule)g(wit)n(h)g(t)n(h)o(e)g(least)104
3014 986 y(cost)g(i)q(s)e(execu)o(t)o(e)q(d.)21 b(Tie)q(s)14
3015 b(are)g(brok)o(en)g(b)o(y)g(c)o(h)o(o)q(os)q(in)o(g)g(t)n(h)o(e)h(rule)
3016 f(t)n(h)o(a)o(t)g(com)o(e)q(s)f(\014rst)i(lexically)m(.)h(F)m(or)e
3017 (example:)169 1094 y Fs(match)21 b(\(ir\))169 1144 y({)44
3018 b(ADD\(LOAD\(?r0\),?)o(r1\))19 b(\\)i(e1:)g({)h(...)f(})169
3019 1194 y(|)44 b(ADD\(?r0,LOAD\(?r)o(0\)\))19 b(\\)i(e2:)g({)h(...)f(})169
3020 1243 y(|)44 b(ADD\(?r0,)20 b(?r1\))130 b(\\)21 b(e3:)g({)h(...)f(})169
3021 1293 y(|)44 b(...)169 1343 y(})62 1501 y Fi(\017)21 b
3022 Fw(A)e Fs(match)f Fw(constru)o(ct)i(can)f(b)q(e)g(mo)q(di\014e)q(d)f
3023 (wit)n(h)h(t)n(h)o(e)g Fs(while)f Fw(mo)q(di\014er,)h(as)g(in)f(t)n(h)o
3024 (e)i(follo)o(win)o(g)c(example.)31 b(A)19 b(m)o(a)o(t)o(c)o(h)104
3025 1551 y(mo)q(di\014e)q(d)11 b(t)n(h)n(us)j(i)q(s)e(rep)q(ea)o(t)o(e)q
3026 (dly)i(m)o(a)o(t)o(c)o(h)o(e)q(d)d(u)o(n)o(t)o(il)h(non)o(e)h(of)f(t)n
3027 (h)o(e)h(pa)o(t)n(t)o(er)q(ns)h(are)f(ap)o(plica)o(ble.)i(F)m(or)e
3028 (example,)d(t)n(h)o(e)k(follo)o(win)o(g)104 1600 y(rou)o(t)o(in)o(e)g
3029 (us)q(e)q(s)h(a)f Fs(match)20 b(while)13 b Fw(st)o(a)o(t)o(em)o(en)o(t)
3030 g(t)o(o)i(tra)o(v)o(ers)q(e)g(t)o(o)f(t)n(h)o(e)h(left)o(most)e(leaf.)
3031 169 1708 y Fs(template)20 b(<class)h(T>)169 1758 y(Tree<T>)g
3032 (left_most_leaf\()o(Tree<)o(T>)e(tree\))169 1808 y({)44
3033 b(match)20 b(while)h(\(tree\))235 1858 y({)43 b(case)21
3034 b(node\(t,_,_\):)41 b(tree)21 b(=)h(t;)235 1908 y(})235
3035 1957 y(return)e(tree;)169 2007 y(})62 2115 y Fi(\017)h
3036 Fw(Fin)o(ally)m(,)d(t)n(h)o(e)i Fs(matchscan)e Fw(v)n(ar)q(ian)o(t)g
3037 (of)g(m)o(a)o(t)o(c)o(h)g(can)i(b)q(e)g(us)q(e)q(d)g(t)o(o)g(p)q
3038 (erform)e(str)q(in)o(g)h(m)o(a)o(t)o(c)o(hin)o(g)f(on)h(a)h(stream.)34
3039 b(F)m(or)104 2165 y(example,)11 b(a)j(s)q(imple)e(lexical)g(scann)o(er)
3040 j(can)f(b)q(e)g(wr)q(it)n(t)o(en)h(as)f(follo)o(ws.)169
3041 2273 y Fs(int)21 b(lexer)g(\(LexerBuffer&)e(in\))169
3042 2323 y({)44 b(matchscan)19 b(while)i(\(in\))235 2373
3043 y({)43 b(/if/:)457 b({)21 b(return)g(IF;)g(})235 2422
3044 y(|)43 b(/else/:)413 b({)21 b(return)g(ELSE;)f(})235
3045 2472 y(|)43 b(/while/:)391 b({)21 b(return)g(WHILE;)f(})235
3046 2522 y(|)43 b(/for/:)435 b({)21 b(return)g(FOR;)g(})235
3047 2572 y(|)43 b(/break/:)391 b({)21 b(return)g(BREAK;)f(})235
3048 2622 y(|)43 b(/[0-9]+/:)369 b({)21 b(return)g(INTEGER;)f(})p
3050 %%Page: 23 24
3051 23 23 bop 0 -82 1981 3 v 0 -100 a Fq(4.)22 b Fp(Algebraic)c(D)o(a)m(t)m
3052 (a)m(types)g(and)h(P)l(a)m(ttern)g(Ma)m(tching)756 b
3053 Fw(23)235 45 y Fs(|)43 b(/[a-zA-Z_][a-zA-Z)o(_0-9])o(*/:)19
3054 b({)i(return)g(IDENTIFIER;)e(})235 95 y(|)43 b(/[)21
3055 b(\\t]+/:)370 b({)21 b(/*)h(skip)e(spaces)h(*/)g(})235
3056 145 y(|)43 b(...)21 b(//)g(other)g(rules)235 195 y(})169
3057 244 y(})0 420 y FF(4.2)56 b(Alge)o(braic)17 b(Da)o(t)n(a)o(t)n(yp)q(e)r
3058 (s)0 508 y Fw(Alge)o(braic)d(d)o(a)o(t)o(a)o(t)o(yp)q(e)q(s)g(are)g(d)o
3059 (e\014n)o(e)q(d)i(us)q(in)o(g)d(t)n(h)o(e)i Fs(datatype)d
3060 Fw(constru)o(ct.)20 b(It)o(s)15 b(syn)o(t)o(ax)e(i)q(s)g(as)h(follo)o
3061 (ws.)129 596 y Fo(Datatyp)n(e)p 291 596 13 2 v 16 w(De)n(cl)49
3062 b Fu(::=)i Fs(datatype)586 646 y Fo([)15 b(Datatyp)n(e)p
3063 776 646 V 16 w(Sp)n(e)n(c)g Fs(and)g Ft(:)7 b(:)g(:)13
3064 b Fs(and)h Fo(Datatyp)n(e)p 1268 646 V 16 w(Sp)n(e)n(c)h(])586
3065 696 y([)g Fs(where)21 b(type)14 b Fo(T)m(yp)n(e)p 935
3066 696 V 15 w(Sp)n(e)n(c)h Fs(and)g Ft(:)7 b(:)g(:)13 b
3067 Fs(and)h Fo(T)m(yp)n(e)p 1352 696 V 15 w(Sp)n(e)n(c)i(])586
3068 746 y([)f Fs(law)f Fo(L)n(aw)p 770 746 V 15 w(Sp)n(e)n(c)i
3069 Fs(and)e Ft(:)7 b(:)g(:)13 b Fs(and)h Fo(L)n(aw)p 1175
3070 746 V 15 w(Sp)n(e)n(c)i(])545 795 y Fs(;)54 885 y Fw(Eac)o(h)e
3071 Fs(datatype)e Fw(d)o(eclara)o(t)o(ion)h(sp)q(eci\014e)q(s)j(a)d(s)q(et)
3072 i(of)e(\(p)q(ot)o(en)o(t)o(ially)f(m)n(u)o(t)o(ually)g(recurs)q(iv)o
3073 (e\))j(t)o(yp)q(e)q(s,)f(a)f(s)q(et)i(of)e(t)o(yp)q(e)h(a)o(bbrevia-)0
3074 935 y(t)o(ions,)f(an)o(d)h(a)f(s)q(et)i(of)e(pa)o(t)n(t)o(er)q(n)i(m)o
3075 (a)o(t)o(c)o(hin)o(g)d(a)o(bbrevia)o(t)o(ions)h(calle)q(d)h
3076 Fo(laws)p Fw(.)129 1022 y Fo(Datatyp)n(e)p 291 1022 V
3077 16 w(Sp)n(e)n(c)118 b Fu(::=)50 b Fo(Id)14 b([)h Fs(<)f
3078 Fo(Id)q Fs(,)g Ft(:)7 b(:)g(:)14 b Fs(,)g Fo(Id)h Fs(>)g
3079 Fo(])655 1072 y([)f Fs(:)19 b Fo(Inherit)p 850 1072 V
3080 15 w(List)14 b(])655 1121 y([)g Fs(::)19 b Fo(Datatyp)n(e)p
3081 907 1121 V 16 w(Quali\014ers)14 b(])655 1171 y([)g Fs(=)h
3082 Fo(Cons)p 813 1171 V 15 w(Sp)n(e)n(cs)h(])129 1221 y(Cons)p
3083 223 1221 V 15 w(Sp)n(e)n(cs)170 b Fu(::=)50 b Fo(Cons)p
3084 707 1221 V 16 w(Sp)n(e)n(c)14 b Fs(|)g Ft(:)7 b(:)g(:)12
3085 b Fs(|)i Fo(Cons)p 1040 1221 V 15 w(Sp)n(e)n(c)655 1271
3086 y([)g Fs(public:)k Fo(Datatyp)n(e)p 1016 1271 V 16 w(Bo)n(dy)d(])129
3087 1321 y(Cons)p 223 1321 V 15 w(Sp)n(e)n(c)187 b Fu(::=)50
3088 b Fo(Simple)p 737 1321 V 15 w(Cons)p 843 1321 V 16 w(Sp)n(e)n(c)655
3089 1370 y([)14 b Fs(with)g Fi(f)h Fo(Class)p 919 1370 V
3090 15 w(De)n(cl)g Fi(g)f Fo(])129 1420 y(Simple)p 253 1420
3091 V 15 w(Cons)p 359 1420 V 15 w(Sp)n(e)n(c)51 b Fu(::=)f
3092 Fo(Id)14 b([)h(String)f(])367 b Fw(u)o(nit)14 b(constru)o(ct)o(or)533
3093 1470 y Fi(j)68 b Fo(String)473 b Fw(u)o(nit)14 b(constru)o(ct)o(or)533
3094 1520 y Fi(j)68 b Fo(Id)14 b([)h Fs(of)f Fo(])g(T)m(yp)n(e)p
3095 865 1520 V 15 w(Exp)251 b Fw(constru)o(ct)o(or)16 b(wit)n(h)e(argu)o(m)
3096 o(en)o(t)o(s)533 1570 y Fi(j)68 b Fs(#[)14 b(])503 b
3097 Fw(u)o(nit)14 b(li)q(st)f(constru)o(ct)o(or)533 1620
3098 y Fi(j)68 b Fs(#)p Fi(f)14 b(g)505 b Fw(u)o(nit)14 b(li)q(st)f(constru)
3099 o(ct)o(or)533 1669 y Fi(j)68 b Fs(#\()14 b(\))503 b Fw(u)o(nit)14
3100 b(li)q(st)f(constru)o(ct)o(or)533 1719 y Fi(j)68 b Fs(#[)14
3101 b Fo(T)m(yp)n(e)p 759 1719 V 15 w(Exp)g Fs(...)k Fo(T)m(yp)n(e)p
3102 1025 1719 V 15 w(Exp)d Fs(])54 b Fw(li)q(st)13 b(constru)o(ct)o(or)533
3103 1769 y Fi(j)68 b Fs(#)p Fi(f)14 b Fo(T)m(yp)n(e)p 758
3104 1769 V 15 w(Exp)g Fs(...)k Fo(T)m(yp)n(e)p 1024 1769
3105 V 15 w(Exp)d Fi(g)56 b Fw(li)q(st)13 b(constru)o(ct)o(or)533
3106 1819 y Fi(j)68 b Fs(#\()14 b Fo(T)m(yp)n(e)p 759 1819
3107 V 15 w(Exp)g Fs(...)k Fo(T)m(yp)n(e)p 1025 1819 V 15
3108 w(Exp)d Fs(\))54 b Fw(li)q(st)13 b(constru)o(ct)o(or)533
3109 1869 y Fi(j)68 b Fs([|)14 b Fo(T)m(yp)n(e)p 759 1869
3110 V 15 w(Exp)g Fs(|])299 b Fw(v)o(ect)o(or)15 b(constru)o(ct)o(or)533
3111 1918 y Fi(j)68 b Fs(\(|)14 b Fo(T)m(yp)n(e)p 759 1918
3112 V 15 w(Exp)g Fs(|\))299 b Fw(v)o(ect)o(or)15 b(constru)o(ct)o(or)533
3113 1968 y Fi(j)68 b(f)p Fs(|)14 b Fo(T)m(yp)n(e)p 758 1968
3114 V 15 w(Exp)g Fs(|)p Fi(g)301 b Fw(v)o(ect)o(or)15 b(constru)o(ct)o(or)
3115 54 2056 y(Da)o(t)o(a)o(t)o(yp)q(e)q(s)g(can)h(b)q(e)f(annot)o(a)o(t)o
3116 (e)q(d)h(wit)n(h)f Fo(quali\014ers)p Fw(.)23 b(Th)o(ey)16
3117 b(t)o(ell)f(t)n(h)o(e)h Fz(Pro)o(p)g Fw(transla)o(t)o(or)g(t)o(o)f(gen)
3118 o(era)o(t)o(e)i(addit)o(ion)o(al)d(co)q(d)o(e)i(for)0
3119 2106 y(eac)o(h)f(d)o(a)o(t)o(a)o(t)o(yp)q(e)f(t)o(o)g(pro)o(vid)o(e)g
3120 (addit)o(ion)o(al)e(fu)o(nct)o(ion)o(alit)o(y)m(.)129
3121 2192 y Fo(Datatyp)n(e)p 291 2192 V 16 w(Quali\014ers)49
3122 b Fu(::=)i Fo(Datatyp)n(e)p 805 2192 V 15 w(Quali\014er)14
3123 b Ft(:)7 b(:)g(:)26 b Fo(Datatyp)n(e)p 1228 2192 V 16
3124 w(Quali\014er)129 2242 y(Datatyp)n(e)p 291 2242 V 16
3125 w(Quali\014er)66 b Fu(::=)51 b Fs(collectable)564 b Fw(garbage)14
3126 b(collect)o(a)o(ble)562 2292 y Fi(j)69 b Fs(rewrite)652
3127 b Fw(o)o(pt)o(imize)q(d)13 b(for)g(tree)i(rewr)q(it)o(in)o(g)562
3128 2342 y Fi(j)69 b Fs(persistent)586 b Fw(gen)o(era)o(t)o(e)15
3129 b(p)q(ers)q(i)q(st)o(ence)h(in)o(t)o(erf)q(ace)562 2392
3130 y Fi(j)69 b Fs(lexeme)674 b Fw(us)q(e)q(d)15 b(for)f(pars)q(er/lexer)h
3131 (t)o(ok)o(ens)562 2441 y Fi(j)69 b Fs(inline)674 b Fw(us)q(e)15
3132 b(inlin)o(e)q(d)e(implem)n(en)o(t)o(a)o(t)o(io)o(n)562
3133 2491 y Fi(j)69 b Fs(extern)674 b Fw(us)q(e)15 b(non-inlin)o(e)q(d)e
3134 (implem)n(en)o(t)o(a)o(t)o(i)o(on)54 2579 y(T)o(yp)q(e)j(sp)q
3135 (eci\014ca)o(t)o(ions)g(ass)q(ign)h(a)o(bbrevia)o(t)o(ions)e(t)o(o)i
3136 (commonly)c(us)q(e)q(d)k(t)o(yp)q(e)g(expre)q(ss)q(ions.)27
3137 b(Th)o(ey)16 b(act)h(lik)o(e)f Fs(typedef)p Fw('s)e(in)0
3138 2629 y(C)p Fs(++)p Fw(,)f(except)i(t)n(h)o(a)o(t)f Fz(Pro)o(p)h
3139 Fw(can)f(m)o(ak)o(e)e(us)q(e)j(of)e(t)n(h)o(e)h(t)o(yp)q(e)g(inform)o
3140 (a)o(t)o(ion)d(pro)o(vid)o(e)q(d)j(b)o(y)g(t)n(h)o(e)q(s)q(e)h(sp)q
3141 (eci\014ca)o(t)o(ions.)p eop
3142 %%Page: 24 25
3143 24 24 bop 0 -82 1981 3 v 0 -100 a Fq(4.)16 b Fp(Algebraic)i(D)o(a)m(t)m
3144 (a)m(types)g(and)h(P)l(a)m(ttern)g(Ma)m(tching)762 b
3145 Fw(24)129 45 y Fo(T)m(yp)n(e)p 217 45 13 2 v 15 w(Sp)n(e)n(c)50
3146 b Fu(::=)h Fo(Id)14 b Fs(=)f Fo(T)m(yp)n(e)p 645 45 V
3147 15 w(Exp)54 145 y Fw(Law)f(sp)q(eci\014ca)o(t)o(ions)h(are)h(us)q(e)q
3148 (d)f(t)o(o)h(d)o(e\014n)o(e)g(a)o(bbrevia)o(t)o(ions)e(t)o(o)h(d)o(a)o
3149 (t)o(a)o(t)o(yp)q(e)g(pa)o(t)n(t)o(er)q(ns)1340 130 y
3150 Fn(5)1359 145 y Fw(.)18 b(Th)o(ey)13 b(b)q(e)o(h)o(a)o(v)o(e)g(lik)o(e)
3151 f(m)o(acros)h(in)f(som)o(e)0 195 y(s)q(ens)q(e,)j(except)g(t)n(h)o(a)o
3152 (t)e(u)o(nlik)o(e)h(m)o(acros,)f(t)n(h)o(ey)h(are)g(pro)o(p)q(erly)f(t)
3153 o(yp)q(e)h(c)o(h)o(ec)o(k)o(e)q(d)h(b)o(y)e Fz(Pro)o(p)p
3154 Fw(.)19 b(In)13 b(addit)o(ion,)f(if)h(t)n(h)o(e)i(k)o(eyw)o(ord)e
3155 Fs(inline)0 245 y Fw(i)q(s)i(us)q(e)q(d,)i(t)n(h)o(en)g
3156 Fz(Pro)o(p)f Fw(will)e(trea)o(t)j(t)n(h)o(e)g(lhs)e(as)h(an)g(expre)q
3157 (ss)q(ion)h(an)o(d)f(gen)o(era)o(t)o(e)h(a)e(fu)o(nct)o(ion)h(of)f(t)n
3158 (h)o(e)i(sam)o(e)d(n)o(am)o(e)h(t)n(h)o(a)o(t)h(can)g(b)q(e)0
3159 294 y(us)q(e)q(d)f(t)o(o)f(constru)o(ct)h(t)n(h)o(e)g(d)o(a)o(t)o(a)o
3160 (t)o(yp)q(e)f(t)o(erm.)129 392 y Fo(L)n(aw)p 205 392
3161 V 15 w(Sp)n(e)n(c)50 b Fu(::=)g Fo([)15 b Fs(inline)f
3162 Fo(])f(Id)h([)h(L)n(aw)p 813 392 V 15 w(A)o(r)n(g)f(])g
3163 Fs(=)f Fo(Pat)129 442 y(L)n(aw)p 205 442 V 15 w(A)o(r)n(g)63
3164 b Fu(::=)50 b Fo(Id)378 491 y Fi(j)68 b Fs(\()14 b Fo(Id)p
3165 Fs(,)g Ft(:)7 b(:)g(:)12 b Fs(,)i Fo(Id)g Fs(\))54 589
3166 y Fz(Pro)o(p)g Fw(recognize)q(s)h(t)n(h)o(e)g(follo)o(win)o(g)c(s)q(et)
3167 k(of)e(t)o(yp)q(e)h(expre)q(ss)q(ions.)129 679 y Fo(T)m(yp)n(e)p
3168 217 679 V 15 w(Exp)140 b Fu(::=)51 b Fo(T)m(yp)n(e)p
3169 639 679 V 15 w(Id)643 b Fw(t)o(yp)q(e)13 b(n)o(am)o(e)470
3170 729 y Fi(j)69 b Fo(T)m(yp)n(e)p 639 729 V 15 w(Exp)14
3171 b Fs(*)576 b Fw(p)q(oin)o(t)o(er)13 b(t)o(yp)q(e)470
3172 779 y Fi(j)69 b Fo(T)m(yp)n(e)p 639 779 V 15 w(Exp)14
3173 b Fs(&)576 b Fw(reference)16 b(t)o(yp)q(e)470 828 y Fi(j)69
3174 b Fo(T)m(yp)n(e)p 639 828 V 15 w(Quali\014er)13 b(T)m(yp)n(e)p
3175 911 828 V 15 w(Id)371 b Fw(quali\014e)q(d)13 b(t)o(yp)q(e)470
3176 878 y Fi(j)69 b Fo(Datatyp)n(e)p 713 878 V 16 w(Quali\014er)13
3177 b(T)m(yp)n(e)p 986 878 V 15 w(Exp)265 b Fw(annot)o(a)o(t)o(ion)470
3178 928 y Fi(j)69 b Fs(\()13 b Fo(T)m(yp)n(e)p 674 928 V
3179 15 w(Exp)i Fs(\))540 b Fw(groupin)o(g)470 978 y Fi(j)69
3180 b Fs(\()13 b Fo(T)m(yp)n(e)p 674 978 V 15 w(Exp)i Fs(,)f
3181 Fo(T)m(yp)n(eExp)p Fs(,)g Ft(:)7 b(:)g(:)12 b Fs(,)i
3182 Fo(T)m(yp)n(eExp)g Fs(\))50 b Fw(t)o(uple)13 b(t)o(yp)q(e)470
3183 1028 y Fi(j)69 b Fs(\()13 b Fo(T)m(yp)n(e)p 674 1028
3184 V 15 w(Exp)i Fs(,)f Fo(T)m(yp)n(eExp)p Fs(,)g Ft(:)7
3185 b(:)g(:)12 b Fs(,)i Fo(T)m(yp)n(eExp)g Fs(\))50 b Fw(t)o(uple)13
3186 b(class)470 1077 y Fi(j)69 b(f)13 b Fo(L)n(ab)p 652 1077
3187 V 16 w(T)m(yp)n(e)p 753 1077 V 15 w(Exp)q Fs(,)g Ft(:)7
3188 b(:)g(:)12 b Fs(,)i Fo(L)n(ab)p 1034 1077 V 16 w(T)m(yp)n(e)p
3189 1135 1077 V 15 w(Exp)g Fi(g)81 b Fw(record)15 b(t)o(yp)q(e)470
3190 1127 y Fi(j)69 b Fo(T)m(yp)n(e)p 639 1127 V 15 w(Exp)14
3191 b Fs(=)g Fo(Exp)494 b Fw(d)o(ef)q(a)n(ul)o(t)14 b(v)n(alue)129
3192 1177 y Fo(L)n(ab)p 196 1177 V 15 w(T)m(yp)n(e)p 296 1177
3193 V 15 w(Exp)61 b Fu(::=)51 b Fo(Id)14 b Fs(:)k Fo(T)m(yp)n(e)p
3194 730 1177 V 15 w(Exp)129 1227 y(T)m(yp)n(e)p 217 1227
3195 V 15 w(Quali\014er)49 b Fu(::=)i Fs(class)670 b Fw(a)13
3196 b(class)i(t)o(yp)q(e)470 1277 y Fi(j)69 b Fs(const)670
3197 b Fw(const)o(an)o(t)14 b(t)o(yp)q(e)470 1327 y Fi(j)69
3198 b Fs(rewrite)626 b Fw(rewr)q(it)o(a)o(ble)470 1376 y
3199 Fi(j)69 b Fs(collectable)538 b Fw(garbage)13 b(collect)o(e)q(d)470
3200 1426 y Fi(j)69 b Fs(persistent)560 b Fw(p)q(ers)q(i)q(st)o(en)o(t)14
3201 b(ob)r(ject)54 1517 y(In)g(gen)o(eral,)f(four)h(di\013eren)o(t)h(t)o
3202 (yp)q(e)q(s)f(of)f(d)o(a)o(t)o(a)o(t)o(yp)q(e)h(constru)o(ct)o(ors)i
3203 (can)f(b)q(e)e(d)o(e\014n)o(e)q(d:)0 1609 y Fu(n)n(ullary)h(constru)o
3204 (ct)o(ors)k Fw(Th)o(e)q(s)q(e)13 b(are)g(constru)o(ct)o(ors)i(wit)n(h)o
3205 (ou)o(t)e(an)f(argu)o(m)o(en)o(t.)k Fz(Pro)o(p)d Fw(m)o(aps)e(t)n(h)o
3206 (e)q(s)q(e)j(in)o(t)o(o)e(sm)o(all)e(in)o(t)o(egers)j(an)o(d)104
3207 1659 y(no)g(h)o(eap)i(space)g(will)d(b)q(e)i(consu)o(m)o(e)q(d.)0
3208 1740 y Fu(t)o(up)o(le)g(argu)o(m)o(en)o(t)f(constru)o(ct)o(ors)19
3209 b Fw(Th)o(e)q(s)q(e)c(are)f(constru)o(ct)o(ors)i(wit)n(h)e(on)o(e)g(or)
3210 g(more)f(u)o(n)o(am)o(e)q(d)g(argu)o(m)o(en)o(t)o(s.)0
3211 1822 y Fu(record)i(argu)o(m)o(en)o(t)e(constru)o(ct)o(ors)19
3212 b Fw(Th)o(e)q(s)q(e)c(are)g(constru)o(ct)o(ors)i(wit)n(h)d(on)o(e)h(or)
3213 f(more)g(n)o(am)o(e)q(d)f(argu)o(m)o(en)o(t)o(s)i(wr)q(it)n(t)o(en)f
3214 (wit)n(hin)104 1872 y(brace)q(s.)28 b(F)m(or)17 b(example,)f(in)g(t)n
3215 (h)o(e)i(follo)o(win)o(g)c(d)o(a)o(t)o(a)o(t)o(yp)q(e)j(d)o(e\014nit)o
3216 (ion)g(a)f(record)i(argu)o(m)o(en)o(t)e(constru)o(ct)o(or)j(calle)q(d)e
3217 Fs(Add)g Fw(i)q(s)104 1922 y(d)o(e\014n)o(e)q(d:)147
3218 2018 y Fs(datatype)k(Exp)g(=)g(Add)g({)h(left)f(:)h(Exp,)f(right)f(:)i
3219 (Exp)f(})256 2068 y(|)h(...)104 2214 y Fw(T)m(o)13 b(constru)o(ct)i(an)
3220 f Fs(Add)f Fw(expre)q(ss)q(ion,)i(w)o(e)f(can)g(us)q(e)h(an)o(y)e(on)o
3221 (e)h(of)f(t)n(h)o(e)i(follo)o(win)o(g)c(forms:)213 2311
3222 y Fs(Exp)21 b(e1)g(=)h(Add\(x,y\);)213 2361 y(Exp)f(e2)g(=)h(Add'{)f
3223 (left)g(=)g(x,)h(right)e(=)i(y)g(};)213 2410 y(Exp)f(e3)g(=)h(Add'{)f
3224 (right)f(=)i(y,)f(left)g(=)h(x)g(};)104 2557 y Fw(Not)o(e)14
3225 b(t)n(h)o(a)o(t)g(w)o(e)g(are)g(allo)o(w)o(e)q(d)f(t)o(o)h(rearran)o
3226 (ge)i(t)n(h)o(e)f(la)o(b)q(els)e(in)g(an)o(y)g(ord)o(er)i(if)f(t)n(h)o
3227 (e)g(record)h(expre)q(ss)q(ion)g(form)e(i)q(s)g(us)q(e)q(d.)p
3228 0 2590 792 2 v 46 2617 a Fm(5)64 2629 y Fl(P)o(a)o(t)o(t)o(erns)d(are)h
3229 (discuss)q(e)q(d)e(in)j(s)q(ect)o(ion)d(4.3.)p eop
3230 %%Page: 25 26
3231 25 25 bop 0 -82 1981 3 v 0 -100 a Fq(4.)22 b Fp(Algebraic)c(D)o(a)m(t)m
3232 (a)m(types)g(and)h(P)l(a)m(ttern)g(Ma)m(tching)756 b
3233 Fw(25)0 45 y Fu(empt)o(y)15 b(constru)o(ct)o(ors)j Fw(Th)o(e)q(s)q(e)f
3234 (are)f(constru)o(ct)o(ors)j(wr)q(it)n(t)o(en)d(wit)n(h)g(an)f(empt)o(y)
3235 g(argu)o(m)o(en)o(t)g Fs(\(\))p Fw(.)24 b(F)m(or)15 b(example,)g(in)g
3236 (t)n(h)o(e)i(fol-)104 95 y(lo)o(win)o(g)12 b(d)o(e\014nit)o(ion)i(an)g
3237 (empt)o(y)f(constru)o(ct)o(or)j(calle)q(d)d Fs(NONE)g
3238 Fw(i)q(s)h(d)o(e\014n)o(e)q(d:)191 187 y Fs(datatype)20
3239 b(Exp)h(:)h(public)e(AST)104 237 y(=)h(NONE)g(\(\))104
3240 287 y(|)g(NONE2)278 337 y(|)h(...)104 479 y Fw(Here,)15
3241 b(t)n(h)o(e)f(constru)o(ct)o(or)i Fs(NONE)d Fw(will)g(inh)o(er)q(it)g
3242 (f)q(rom)f(t)n(h)o(e)j(class)f Fs(AST)p Fw(,)f(while)h(t)n(h)o(e)g(n)n
3243 (ullay)f(constru)o(ct)o(or)j Fs(NONE2)d Fw(will)f(not.)0
3244 597 y Fu(4.2.1)48 b(Inst)o(an)o(t)o(i)o(a)o(t)o(i)o(n)n(g)14
3245 b(a)i(d)o(a)o(t)o(a)o(t)o(yp)q(e)0 686 y Fw(Eac)o(h)f(d)o(eclare)q(d)h
3246 (d)o(a)o(t)o(a)o(t)o(yp)q(e)e(sh)o(ould)h(b)q(e)f Fo(instantiate)n(d)h
3247 Fw(in)f(som)o(e)g(implem)n(en)o(t)o(a)o(t)o(i)o(on)e(\014le)i(us)q(in)o
3248 (g)h(t)n(h)o(e)g Fs(instantiate)20 b(datatype)0 736 y
3249 Fw(st)o(a)o(t)o(em)o(en)o(t.)d(Th)o(e)e(transla)o(t)o(or)f(will)e(gen)o
3250 (era)o(t)o(e)j(addit)o(ion)o(al)d(co)q(d)o(e)j(t)o(o)f(implem)n(en)o(t)
3251 e(t)n(h)o(e)i(d)o(a)o(t)o(a)o(t)o(yp)q(e.)k(Th)o(e)c(gen)o(eral)g(syn)o
3252 (t)o(ax)g(i)q(s:)129 822 y Fo(Instantiate)p 327 822 13
3253 2 v 15 w(De)n(cl)50 b Fu(::=)h Fs(instantiate)19 b(datatype)12
3254 b Fo(T)m(yp)n(e)p 1118 822 V 15 w(Sp)n(e)n(c)q Fs(,)i
3255 Ft(:)7 b(:)g(:)12 b Fs(,)h Fo(T)m(yp)n(e)p 1430 822 V
3256 16 w(Sp)n(e)n(c)500 872 y Fi(j)69 b Fs(instantiate)11
3257 b(extern)i(datatype)f Fo(T)m(yp)n(e)p 1255 872 V 15 w(Sp)n(e)n(c)q
3258 Fs(,)h Ft(:)7 b(:)g(:)12 b Fs(,)i Fo(T)m(yp)n(e)p 1567
3259 872 V 15 w(Sp)n(e)n(c)129 922 y(T)m(yp)n(e)p 217 922
3260 V 15 w(Sp)n(e)n(c)160 b Fu(::=)51 b Fo(Id)14 b([)29 b
3261 Fs(<)15 b Fo(T)m(yp)n(eExp)p Fs(,)g Ft(:)7 b(:)g(:)13
3262 b Fs(,)i Fo(T)m(yp)n(eExp)g Fs(>)g Fo(])0 1009 y Fu(Tip)q(s:)95
3263 b Fw(Wh)o(en)18 b(a)g(d)o(a)o(t)o(a)o(t)o(yp)q(e)g(i)q(s)g(d)o(e\014n)o
3264 (e)q(d)h(wit)n(h)g(t)n(h)o(e)g Fs(inline)e Fw(quali\014er,)h
3265 Fz(Pro)o(p)h Fw(will)e(try)h(t)o(o)h(gen)o(era)o(t)o(e)g(inlin)o(e)e(m)
3266 o(et)n(h)o(o)q(ds)0 1059 y(wh)o(en)o(ev)o(er)f(p)q(oss)q(ible.)j(On)c
3267 (t)n(h)o(e)g(ot)n(h)o(er)g(h)o(an)o(d,)e(if)h(t)n(h)o(e)h
3268 Fs(extern)e Fw(quali\014er)h(i)q(s)f(us)q(e)q(d,)i Fz(Pro)o(p)g
3269 Fw(will)e(try)h(t)o(o)h(gen)o(era)o(t)o(e)g(an)f(non-inlin)o(e)0
3270 1109 y(implem)n(en)o(t)o(a)o(t)o(io)o(n,)d(an)o(d)i(only)g(on)o(e)h(co)
3271 o(p)o(y)g(are)g(gen)o(era)o(t)o(e)q(d)i(a)o(t)d(wh)o(ere)i(t)n(h)o(e)g
3272 Fs(instantiate)k(datatype)13 b Fw(st)o(a)o(t)o(em)o(en)o(t)g(o)q
3273 (ccurs.)54 1170 y(Since)h(most)g Fz(Pro)o(p)h Fw(d)o(a)o(t)o(a)o(t)o
3274 (yp)q(e)q(s)g(are)g(ligh)o(t-w)o(e)q(igh)o(t)d(ob)r(ject)o(s,)k
3275 Fs(inline)d Fw(i)q(s)h(t)o(ak)o(en)g(as)h(t)n(h)o(e)g(d)o(ef)q(a)n(ul)o
3276 (t.)20 b(Th)o(e)14 b(us)q(er)i(can)e(o)o(v)o(err)q(id)o(e)0
3277 1220 y(t)n(hi)q(s)g(d)o(ef)q(a)n(ul)o(t)g(us)q(in)o(g)g
3278 Fs(-save)p 439 1220 14 2 v 14 w(space)f Fw(o)o(pt)o(ion)g(of)g(t)n(h)o
3279 (e)i(transla)o(t)o(or)f(\(s)q(ee)h(page)f(57\).)0 1282
3280 y Fu(Tip)q(s:)74 b Fw(Wh)o(en)11 b(t)n(h)o(e)h(o)o(pt)o(ion)e
3281 Fs(-fno-implicit-te)o(mpla)o(tes)e Fw(i)q(s)i(us)q(e)q(d)i(u)o(n)o(d)o
3282 (er)g(G)p Fs(++)p Fw(,)f(t)n(h)o(e)g(us)q(er)h(sh)o(ould)f
3283 Fs(#define)f Fw(t)n(h)o(e)h(sym)n(b)q(ol)0 1331 y(b)q(efore)j(an)g
3284 Fs(instantiate)19 b(datatype)12 b Fw(st)o(a)o(t)o(em)o(en)o(t.)18
3285 b(Thi)q(s)13 b(will)g(en)o(a)o(ble)g(t)n(h)o(e)i(co)q(d)o(e)g(for)e
3286 (explicit)g(t)o(empla)o(t)o(e)f(inst)o(an)o(t)o(ia)o(t)o(ion.)0
3287 1458 y FF(4.3)56 b(P)n(a)o(t)n(t)n(er)q(n)18 b(Ma)o(t)n(c)n(hin)o(g)0
3288 1547 y Fw(Th)o(e)10 b(bas)q(ic)g(pa)o(t)n(t)o(er)q(n)h(m)o(a)o(t)o(c)o
3289 (hin)o(g)d(constru)o(ct)k(i)q(s)d(t)n(h)o(e)i Fs(match)e
3290 Fw(st)o(a)o(t)o(em)o(en)o(t.)16 b(A)10 b(m)o(a)o(t)o(c)o(h)f(st)o(a)o
3291 (t)o(em)o(en)o(t)g(can)i(b)q(e)f(s)q(een)h(as)f(a)g(gen)o(eraliza)o(t)o
3292 (ion)0 1596 y(of)j(C)p Fs(++)p Fw('s)h Fs(switch)e Fw(st)o(a)o(t)o(em)o
3293 (en)o(t,)h(in)g(whic)o(h)h(t)n(h)o(e)h(expre)q(ss)q(ion)g(t)n(h)o(a)o
3294 (t)f(follo)o(ws)e(a)h Fs(case)g Fw(can)h(b)q(e)g(a)g(gen)o(eral)g
3295 (complex)e(pa)o(t)n(t)o(er)q(n.)54 1658 y(It)o(s)i(bas)q(ic)g(syn)o(t)o
3296 (ax)f(i)q(s)h(as)g(follo)o(ws:)129 1744 y Fo(Match)184
3297 b Fu(::=)51 b Fo(Match)p 654 1744 13 2 v 15 w(Mo)n(de)15
3298 b Fs(\()f Fo(Exp)g Fs(\))g(and)f Ft(:)7 b(:)g(:)12 b
3299 Fs(and)h(\()h Fo(Exp)g Fs(\))539 1794 y Fi(f)f Fs(case)g
3300 Fo(Match)p 789 1794 V 16 w(R)o(ule)h Ft(:)7 b(:)g(:)26
3301 b Fs(case)13 b Fo(Match)p 1189 1794 V 16 w(R)o(ule)h
3302 Fi(g)81 b Fw(v)n(ar)q(ian)o(t)12 b(1)458 1844 y Fi(j)69
3303 b Fo(Match)p 654 1844 V 15 w(Mo)n(de)15 b Fs(\()f Fo(Exp)g
3304 Fs(\))g(and)f Ft(:)7 b(:)g(:)12 b Fs(and)h(\()h Fo(Exp)g
3305 Fs(\))539 1894 y Fi(f)f Fo(Match)p 688 1894 V 16 w(R)o(ule)h
3306 Fs(|)g Ft(:)7 b(:)g(:)12 b Fs(|)i Fo(Match)p 1045 1894
3307 V 15 w(R)o(ule)h Fi(g)225 b Fw(v)n(ar)q(ian)o(t)12 b(2)458
3308 1944 y Fi(j)69 b Fo(Match)p 654 1944 V 15 w(Mo)n(de)15
3309 b Fs(\()f Fo(Exp)g Fs(\))g(and)f Ft(:)7 b(:)g(:)12 b
3310 Fs(and)h(\()h Fo(Exp)g Fs(\))g(of)50 b Fw(v)n(ar)q(ian)o(t)12
3311 b(3)580 1993 y Fo(Match)p 695 1993 V 16 w(R)o(ule)i Fs(|)g
3312 Ft(:)7 b(:)g(:)12 b Fs(|)i Fo(Match)p 1052 1993 V 15
3313 w(R)o(ule)539 2043 y Fs(end)f(match)g(;)129 2093 y Fo(Match)p
3314 244 2093 V 16 w(Mo)n(de)72 b Fu(::=)51 b Fs(match)12
3315 b Fo([)j Fs(while)f Fo(])458 2143 y Fi(j)69 b Fs(matchall)12
3316 b Fo([)i Fs(while)g Fo(])129 2193 y(Match)p 244 2193
3317 V 16 w(R)o(ule)87 b Fu(::=)51 b Fo(Pat)14 b([)g(Guar)n(d)h(])f([)g
3318 (Cost)h(])f Fs(:)k Fo(Match)p 1103 2193 V 16 w(A)n(ction)129
3319 2243 y(Guar)n(d)184 b Fu(::=)51 b Fs(if)13 b Fo(Exp)458
3320 2292 y Fi(j)69 b Fs(where)12 b Fo(Exp)458 2342 y Fi(j)69
3321 b Fs(|)13 b Fo(Exp)129 2392 y(Cost)214 b Fu(::=)51 b
3322 Fs(\\)13 b Fo(Exp)757 b Fw(cost)15 b(expre)q(ss)q(ion)129
3323 2442 y Fo(Match)p 244 2442 V 16 w(A)n(ction)49 b Fu(::=)i
3324 Fi(f)13 b Fo(Co)n(de)h Fi(g)458 2492 y(j)69 b Fo(Co)n(de)771
3325 b Fw(for)13 b(v)n(ar)q(ian)o(t)f(1)i(only)54 2579 y(Th)o(e)g(3)g(syn)o
3326 (t)o(act)o(ic)g(v)n(ar)q(ian)o(t)o(s)f(of)g(t)n(h)o(e)i(m)o(a)o(t)o(c)o
3327 (h)e(st)o(a)o(t)o(em)o(en)o(t)g(are)h(equiv)n(alen)o(t)g(in)f(m)o
3328 (eanin)o(g.)k(A)d Fs(match)f Fw(st)o(a)o(t)o(em)o(en)o(t)h(t)o(ak)o(e)q
3329 (s)g(a)g(li)q(st)0 2629 y(of)g(m)o(a)o(t)o(c)o(h)g(ob)r(ject)o(s)j(an)o
3330 (d)d(a)h(s)q(et)h(of)e(pa)o(t)n(t)o(er)q(n)i(m)o(a)o(t)o(c)o(hin)o(g)d
3331 (rule)q(s.)22 b(Th)o(e)15 b(\014rst)h(rule)f(t)n(h)o(a)o(t)h(m)o(a)o(t)
3332 o(c)o(h)o(e)q(s)e(t)n(h)o(e)i(pa)o(t)n(t)o(er)q(n)f(complet)o(ely)e
3333 (will)p eop
3334 %%Page: 26 27
3335 26 26 bop 0 -82 1981 3 v 0 -100 a Fq(4.)22 b Fp(Algebraic)c(D)o(a)m(t)m
3336 (a)m(types)g(and)h(P)l(a)m(ttern)g(Ma)m(tching)756 b
3337 Fw(26)0 45 y(b)q(e)12 b(execu)o(t)o(e)q(d.)20 b(Not)o(ice)12
3338 b(t)n(h)o(a)o(t)h(guards)f(can)h(b)q(e)f(place)q(d)g(on)g(eac)o(h)i
3339 (rule,)e(an)o(d)g(a)g(rule)g(i)q(s)g(only)g(ap)o(plica)o(ble)e(if)h(t)n
3340 (h)o(e)i(guards)g(ev)n(alua)o(t)o(e)0 95 y(t)o(o)h(true.)0
3341 215 y Fu(Co)q(st)g(minimiza)o(t)n(io)o(n)39 b Fw(In)12
3342 b(addit)o(ion,)f(if)h(cost)i(expre)q(ss)q(ions)h(are)e(sp)q(eci\014e)q
3343 (d,)h(t)n(h)o(en)f(t)n(h)o(e)h(m)o(a)o(t)o(c)o(hin)o(g)d(pro)q(ce)q(ss)
3344 k(will)c(pro)q(cee)q(d)k(as)0 264 y(follo)o(ws:)51 359
3345 y(1.)20 b(Lo)q(ca)o(t)o(e)14 b(all)f(ap)o(plica)o(ble)e(rule)q(s.)19
3346 b(If)14 b(no)f(su)o(c)o(h)i(rule)f(exi)q(st)o(s)h(t)n(h)o(en)f(exit.)51
3347 442 y(2.)20 b(Compu)o(t)o(e)13 b(t)n(h)o(e)h(cost)i(expre)q(ss)q(ions)f
3348 (of)f(all)e(ap)o(plica)o(ble)g(rule)q(s.)51 525 y(3.)20
3349 b(Ch)o(o)q(os)q(e)14 b(t)n(h)o(e)h(act)o(ion)e(t)n(h)o(a)o(t)h(h)o(as)g
3350 (t)n(h)o(e)h(lo)o(w)o(e)q(st)f(cost)h(t)o(o)f(execu)o(t)o(e.)20
3351 b(If)13 b(a)h(t)o(ie)f(o)q(ccurs,)i(re)q(solv)o(e)f(b)o(y)g(t)n(h)o(e)h
3352 (t)o(ext)o(ual)e(ord)o(er)i(of)e(t)n(h)o(e)104 575 y(rule)q(s.)0
3353 695 y Fu(Ma)o(t)o(c)o(h)18 b(all)g(rule)q(s)39 b Fw(Th)o(e)17
3354 b Fs(matchall)e Fw(st)o(a)o(t)o(em)o(en)o(t)h(i)q(s)g(a)g(v)n(ar)q(ian)
3355 o(t)f(of)h Fs(match)p Fw(.)25 b(In)16 b(t)n(h)o(e)h(m)o(a)o(t)o(c)o(h)o
3356 (all)d(mo)q(d)o(e,)i(t)n(h)o(e)h(act)o(ions)g(of)e Fo(al)r(l)0
3357 745 y Fw(ap)o(plica)o(ble)10 b(rule)q(s)k(are)e(execu)o(t)o(e)q(d)j(in)
3358 d(t)n(h)o(e)i(t)o(ext)o(ual)e(ord)o(er.)19 b(Ca)n(u)o(t)o(ion:)e(s)q
3359 (ince)c(t)n(h)o(e)g(m)o(a)o(t)o(c)o(hin)o(g)e(v)n(ar)q(ia)o(ble)g(bin)o
3360 (din)o(g)g(pro)q(ce)q(ss)k(o)q(ccurs)0 794 y Fo(b)n(efor)n(e)f
3361 Fw(t)n(h)o(e)h(rule)q(s)g(are)g(execu)o(t)o(e)q(d,)h(t)n(h)o(e)g(rhs)f
3362 (act)o(ions)f(sh)o(ould)g(not)h(al)o(t)o(er)g(t)n(h)o(e)g(m)o(a)o(t)o
3363 (c)o(h)o(e)q(d)e(v)n(alue)h(or)g(t)n(h)o(e)i(pa)o(t)n(t)o(er)q(n)f(v)n
3364 (ar)q(ia)o(ble)q(s)e(m)o(ay)0 844 y(b)q(e)h(b)q(ou)o(n)o(d)g(t)o(o)g(t)
3365 n(h)o(e)h(wron)o(g)f(v)n(alue.)0 964 y Fu(Rep)q(et)o(it)n(ion)38
3366 b Fw(In)15 b(addit)o(ion,)e(b)q(ot)n(h)i Fs(match)f Fw(an)o(d)h
3367 Fs(matchall)e Fw(can)j(b)q(e)f(annot)o(a)o(t)o(e)q(d)f(wit)n(h)h(t)n(h)
3368 o(e)h Fs(while)e Fw(mo)q(di\014er.)20 b(It)15 b(t)n(hi)q(s)g(cas)q(e)0
3369 1014 y(t)n(h)o(e)d(s)q(em)o(an)o(t)o(ics)f(of)g(t)n(h)o(e)h(m)o(a)o(t)o
3370 (c)o(hin)o(g)e(constru)o(ct)k(i)q(s)d(t)o(o)h(rep)q(ea)o(t)g(u)o(n)o(t)
3371 o(il)f(no)h(more)e(rule)i(i)q(s)f(ap)o(plica)o(ble.)k(F)m(or)c
3372 (example,)f(t)n(h)o(e)j(follo)o(win)o(g)0 1064 y(co)q(d)o(e)i(f)q(ragm)
3373 o(en)o(t)d(ret)o(ur)q(ns)j(t)n(h)o(e)f(last)g(elem)o(en)o(t)f(of)g(a)h
3374 (li)q(st)0 1158 y Fs(datatype)20 b(List)h(=)h(#[])f(|)g(#[)h(int)f(...)
3375 g(List)g(];)0 1258 y(int)g(last)g(\(List)g(l\))0 1308
3376 y({)43 b(match)21 b(while)g(\(l\))65 1358 y({)h(case)f(#[]:)195
3377 b(assert\(0\);)20 b(//)h(an)h(error)109 1408 y(case)f(#[i]:)173
3378 b(return)21 b(i;)109 1457 y(case)g(#[h)g(...)g(t]:)43
3379 b(l)22 b(=)f(t;)65 1507 y(})0 1557 y(})0 1677 y Fu(P)o(a)o(t)n(t)o(er)q
3380 (n)e(syn)o(t)o(ax)40 b Fw(Th)o(e)20 b(bas)q(ic)e(form)g(of)g(a)h(pa)o
3381 (t)n(t)o(er)q(n)h(i)q(s)f(a)g(lit)o(eral,)g(whic)o(h)f(t)n(h)o(a)o(t)i
3382 (m)o(a)o(t)o(c)o(h)o(e)q(s)e(only)h(a)f(s)q(in)o(gle)h(in)o(t)o(eger,)i
3383 (real)0 1726 y(n)n(u)o(m)n(b)q(er,)e(str)q(in)o(g,)g(et)o(c.)32
3384 b(Complex)16 b(pa)o(t)n(t)o(er)q(ns)k(can)f(b)q(e)f(constru)o(ct)o(e)q
3385 (d)i(in)o(d)o(u)o(ct)o(iv)o(ely)d(us)q(in)o(g)i(d)o(a)o(t)o(a)o(t)o(yp)
3386 q(e)f(constru)o(ct)o(ors,)j(t)o(uple)q(s,)0 1776 y(li)q(st)o(s,)13
3387 b(an)o(d)h Fo(lo)n(gic)n(al)g(p)n(attern)h(c)n(onne)n(ctives)p
3388 Fw(.)54 1838 y(Th)o(e)f(syn)o(t)o(ax)f(of)h(t)n(h)o(e)g(pa)o(t)n(t)o
3389 (er)q(ns)h(i)q(s)f(as)g(follo)o(ws:)p eop
3390 %%Page: 27 28
3391 27 27 bop 0 -82 1981 3 v 0 -100 a Fq(4.)16 b Fp(Algebraic)i(D)o(a)m(t)m
3392 (a)m(types)g(and)h(P)l(a)m(ttern)g(Ma)m(tching)762 b
3393 Fw(27)129 38 y Fo(Pat)131 b Fu(::=)51 b Fo(Inte)n(ger)555
3394 b Fw(m)o(a)o(t)o(c)o(h)o(e)q(s)13 b(in)o(t)o(eger)h(lit)o(eral)356
3395 88 y Fi(j)69 b Fo(R)n(e)n(al)604 b Fw(m)o(a)o(t)o(c)o(h)o(e)q(s)13
3396 b(real)i(lit)o(eral)356 138 y Fi(j)69 b Fo(Char)591 b
3397 Fw(m)o(a)o(t)o(c)o(h)o(e)q(s)13 b(c)o(h)o(aract)o(er)i(lit)o(eral)356
3398 188 y Fi(j)69 b Fo(Quark)569 b Fw(m)o(a)o(t)o(c)o(h)o(e)q(s)13
3399 b(quar)o(k)h(lit)o(eral)356 238 y Fi(j)69 b Fo(String)571
3400 b Fw(m)o(a)o(t)o(c)o(h)o(e)q(s)13 b(str)q(in)o(g)h(lit)o(eral)356
3401 288 y Fi(j)69 b Fo(R)n(e)n(gexp)558 b Fw(m)o(a)o(t)o(c)o(h)o(e)q(s)13
3402 b(an)o(y)h(str)q(in)o(g)g(t)n(h)o(a)o(t)g(m)o(a)o(t)o(c)o(h)o(e)q(s)f
3403 Fo(r)n(e)n(gexp)356 337 y Fi(j)69 b Fo(Pat)p 503 337
3404 13 2 v 15 w(V)m(ar)536 b Fw(a)13 b(pa)o(t)n(t)o(er)q(n)i(v)n(ar)q(ia)o
3405 (ble;)d(m)o(a)o(t)o(c)o(h)o(e)q(s)h(an)o(yt)n(hin)o(g)356
3406 387 y Fi(j)p 439 387 14 2 v 750 w Fw(wild)g(card;)h(m)o(a)o(t)o(c)o(h)o
3407 (e)q(s)f(an)o(yt)n(hin)o(g)356 437 y Fi(j)69 b Fo(Cons)590
3408 b Fw(m)o(a)o(t)o(c)o(h)o(e)q(s)13 b(a)h(d)o(a)o(t)o(a)o(t)o(yp)q(e)g
3409 (constru)o(ct)o(or)356 487 y Fi(j)69 b Fo(Cons)14 b(PatA)o(r)n(g)448
3410 b Fw(a)13 b(constru)o(ct)o(or)j(ap)o(plica)o(t)o(ion)c(pa)o(t)n(t)o(er)
3411 q(n)356 537 y Fi(j)69 b Fo(Id)14 b Fs(as)f Fo(Pat)510
3412 b Fw(bin)o(ds)14 b(a)f(v)n(ar)q(ia)o(ble)f(t)o(o)i(t)n(h)o(e)h(su)n
3413 (b-pa)o(t)n(t)o(er)q(n)356 586 y Fi(j)69 b Fo(Pat)14
3414 b Fs(:)k Fo(T)m(yp)n(e)p 642 586 13 2 v 15 w(Exp)396
3415 b Fw(t)o(yp)q(e)q(d)14 b(pa)o(t)n(t)o(er)q(n)356 636
3416 y Fi(j)69 b Fo(Pat)14 b Fs(||)f Fo(Pat)484 b Fw(m)o(a)o(t)o(c)o(h)o(e)q
3417 (s)13 b(e)q(it)n(h)o(er)i(pa)o(t)n(t)o(er)q(n)356 686
3418 y Fi(j)69 b Fo(Pat)14 b Fs(&&)f Fo(Pat)484 b Fw(m)o(a)o(t)o(c)o(h)o(e)q
3419 (s)13 b(b)q(ot)n(h)i(pa)o(t)n(t)o(er)q(ns)356 736 y Fi(j)69
3420 b Fs(!)18 b Fo(Pat)578 b Fw(m)o(a)o(t)o(c)o(h)o(e)q(s)13
3421 b(an)o(yt)n(hin)o(g)h(bu)o(t)g(t)n(h)o(e)h(pa)o(t)n(t)o(er)q(n)356
3422 786 y Fi(j)69 b Fs(\()13 b Fo(Pat)h Fs(\))547 b Fw(Groupin)o(g)356
3423 835 y Fi(j)69 b Fs(#[)13 b Fo(Pat)p Fs(,)h Ft(:)7 b(:)g(:)12
3424 b Fs(,)i Fo(Pat)g Fs(])328 b Fw(li)q(st)13 b(pa)o(t)n(t)o(er)q(n;)h
3425 (exact)h(len)o(gt)n(h)f(m)o(a)o(t)o(c)o(h)356 885 y Fi(j)69
3426 b Fs(#[)13 b Fo(Pat)p Fs(,)h Ft(:)7 b(:)g(:)12 b Fs(,)i
3427 Fo(Pat)g Fs(...)k(])244 b Fw(li)q(st)13 b(pa)o(t)n(t)o(er)q(n;)h
3428 (non-exact)g(len)o(gt)n(h)h(m)o(a)o(t)o(c)o(h)356 935
3429 y Fi(j)69 b Fs([|)13 b Fo(Pat)p Fs(,)h Ft(:)7 b(:)g(:)12
3430 b Fs(,)i Fo(Pat)g Fs(|])306 b Fw(v)o(ect)o(or)15 b(pa)o(t)n(t)o(er)q
3431 (n;)f(exact)h(len)o(gt)n(h)f(m)o(a)o(t)o(c)o(h)356 985
3432 y Fi(j)69 b Fs([|)13 b Fo(Pat)p Fs(,)h Ft(:)7 b(:)g(:)12
3433 b Fs(,)i Fo(Pat)g Fs(...)k(|])222 b Fw(v)o(ect)o(or)15
3434 b(pa)o(t)n(t)o(er)q(n;)f(m)o(a)o(t)o(c)o(h)o(e)q(s)f(t)o(o)i(t)n(h)o(e)
3435 f(left)356 1035 y Fi(j)69 b Fs([|)13 b(...)18 b Fo(Pat)p
3436 Fs(,)c Ft(:)7 b(:)g(:)12 b Fs(,)i Fo(Pat)g Fs(|])222
3437 b Fw(v)o(ect)o(or)15 b(pa)o(t)n(t)o(er)q(n;)f(m)o(a)o(t)o(c)o(h)o(e)q
3438 (s)f(t)o(o)i(t)n(h)o(e)f(r)q(igh)o(t)129 1085 y Fo(PatA)o(r)n(g)66
3439 b Fu(::=)51 b Fo(Pat)356 1134 y Fi(j)69 b Fs(\()13 b
3440 Fo(Pat)q Fs(,)g Ft(:)7 b(:)g(:)12 b Fs(,)i Fo(Pat)g Fs(\))356
3441 1184 y Fi(j)69 b(f)13 b Fo(L)n(ab)p 538 1184 V 16 w(Pat)p
3442 Fs(,)h Ft(:)7 b(:)g(:)12 b Fs(,)i Fo(L)n(ab)p 815 1184
3443 V 15 w(Pat)g([)h Fs(...)j Fo(])g Fi(g)129 1234 y Fo(L)n(ab)p
3444 196 1234 V 15 w(Pat)52 b Fu(::=)f Fo(Id)14 b Fs(=)f Fo(Pat)129
3445 1284 y(Pat)p 195 1284 V 15 w(V)m(ar)49 b Fu(::=)i Fo(Id)356
3446 1334 y Fi(j)69 b Fs(?)p Fo(Id)0 1457 y FF(4.4)56 b(Re\014nin)o(g)18
3447 b(a)h(d)o(a)o(t)n(a)o(t)n(yp)q(e)0 1545 y Fw(A)14 b(d)o(a)o(t)o(a)o(t)o
3448 (yp)q(e)g(d)o(e\014nit)o(ion)f(can)h(b)q(e)g(re\014n)o(e)q(d)i(in)d(a)h
3449 (few)g(w)o(ays:)51 1647 y(1.)20 b Fu(inh)o(er)q(it)n(ance)11
3450 b Fw(A)k(d)o(a)o(t)o(a)o(t)o(yp)q(e)g(can)g(b)q(e)g(d)o(eclare)q(d)h(t)
3451 o(o)f(b)q(e)g(inh)o(er)q(it)o(e)q(d)g(f)q(rom)e(on)o(e)i(or)g(more)f
3452 (class)q(e)q(s)i Ft(C)1647 1653 y Fn(1)1666 1647 y Ft(;)7
3453 b(C)1715 1653 y Fn(2)1732 1647 y Ft(;)g(:)g(:)g(:)e(;)i(C)1855
3454 1653 y Fj(n)1877 1647 y Fw(.)21 b(Th)o(e)104 1696 y(e\013ect)15
3455 b(i)q(s)f(t)n(h)o(a)o(t)g(all)e(v)n(ar)q(ian)o(t)o(s)i(of)f(a)g(d)o(a)o
3456 (t)o(a)o(t)o(yp)q(e)h(will)f(b)q(e)g(inh)o(er)q(it)o(e)q(d)i(f)q(rom)c
3457 (t)n(h)o(e)k(class)q(e)q(s)h Ft(C)1450 1702 y Fn(1)1468
3458 1696 y Ft(;)7 b(C)1517 1702 y Fn(2)1535 1696 y Ft(;)g(:)g(:)g(:)t(C)
3459 1638 1702 y Fn(2)1657 1696 y Fw(.)51 1779 y(2.)20 b Fu(m)o(em)n(b)q(er)
3460 13 b(fu)o(nct)o(ions)d Fw(M)o(em)n(b)q(er)j(fu)o(nct)o(ions)h(an)o(d)f
3461 (addit)o(ion)f(a)o(t)n(tr)q(ibu)o(t)o(e)q(s)j(can)e(b)q(e)g(a)o(t)n(t)o
3462 (ac)o(h)o(e)q(d)i(t)o(o)e(t)n(h)o(e)h(d)o(a)o(t)o(a)o(t)o(yp)q(e)g(v)n
3463 (ar)q(ian)o(t)o(s)104 1828 y(us)q(in)o(g)f(t)n(h)o(e)i(k)o(eyw)o(ord)f
3464 Fs(with)p Fw(.)54 1930 y(F)m(or)20 b(example,)g(t)n(h)o(e)h(follo)o
3465 (win)o(g)d(d)o(a)o(t)o(a)o(t)o(yp)q(e)i Fs(Exp)g Fw(i)q(s)g(inh)o(er)q
3466 (it)o(e)q(d)g(f)q(rom)f(som)o(e)g(us)q(er)j(d)o(e\014n)o(e)q(d)g(class)
3467 q(e)q(s)g Fs(AST)e Fw(an)o(d)g Fs(Object)p Fw(.)0 1979
3468 y(F)m(urt)n(h)o(ermore,)14 b(a)f(virt)o(ual)g(m)o(em)n(b)q(er)f(fu)o
3469 (nct)o(ion)i(calle)q(d)f(pr)q(in)o(t)h(i)q(s)f(d)o(e\014n)o(e)q(d.)0
3470 2081 y Fs(datatype)20 b(Exp)h(:)h(public)e(AST,)h(virtual)g(public)f
3471 (Object)65 2130 y(=)i(INT)f(int)196 2180 y(with)g({)h(ostream&)e
3472 (print\(ostream&\);)e(})65 2230 y(|)k(PLUS)43 b(Exp,)21
3473 b(Exp)196 2280 y(with)g({)h(ostream&)e(print\(ostream&\);)e(})65
3474 2330 y(|)k(MINUS)f(Exp,)g(Exp)196 2380 y(with)g({)h(ostream&)e
3475 (print\(ostream&\);)e(})65 2429 y(|)k(MULT)43 b(Exp,)21
3476 b(Exp)196 2479 y(with)g({)h(ostream&)e(print\(ostream&\);)e(})65
3477 2529 y(|)k(DIV)65 b(Exp,)21 b(Exp)196 2579 y(with)g({)h(ostream&)e
3478 (print\(ostream&\);)e(})65 2629 y(|)k(VAR)f({)h(name)f(:)g(const)g
3479 (char)g(*,)g(typ)h(:)f(Type)g(})p eop
3480 %%Page: 28 29
3481 28 28 bop 0 -82 1981 3 v 0 -100 a Fq(4.)22 b Fp(Algebraic)c(D)o(a)m(t)m
3482 (a)m(types)g(and)h(P)l(a)m(ttern)g(Ma)m(tching)756 b
3483 Fw(28)196 45 y Fs(with)21 b({)h(ostream&)e(print\(ostream&\);)e(})65
3484 95 y(public:)65 145 y({)44 b(virtual)20 b(ostream&)g(print)h
3485 (\(ostream&\))f(=)h(0;)131 195 y(void)g(*)g(operator)f(new)i
3486 (\(size_t\);)65 244 y(})0 294 y(;)54 393 y Fw(Th)o(e)14
3487 b(allo)q(ca)o(t)o(or)f(an)o(d)h(pr)q(in)o(t)o(in)o(g)f(m)o(et)n(h)o(o)q
3488 (ds)g(can)h(b)q(e)g(d)o(e\014n)o(e)q(d)h(as)f(follo)o(ws:)0
3489 484 y Fs(void)21 b(*)h(classof)e(Exp::operator)f(new\(size_t\))h({)h
3490 (...)g(})0 534 y(ostream&)f(classof)g(INT::print\(ostream&)e(s\))65
3491 b({)22 b(return)e(s)i(<<)f(INT;)g(})0 584 y(ostream&)f(classof)g
3492 (PLUS::print\(ostream&)e(s\))65 634 y({)k(return)f(s)g(<<)g('\(')h(<<)f
3493 (this->#1)f(<<)i('+')f(<<)g(this->#2)f(<<'\)';)h(})0
3494 684 y(ostream&)f(classof)g(MINUS::print\(ostream)o(&)f(s\))65
3495 734 y({)j(return)f(s)g(<<)g('\(')h(<<)f(this->#1)f(<<)i('-')f(<<)g
3496 (this->#2)f(<<'\)';)h(})0 783 y(ostream&)f(classof)g
3497 (MULT::print\(ostream&)e(s\))65 833 y({)k(return)f(s)g(<<)g('\(')h(<<)f
3498 (this->#1)f(<<)i('*')f(<<)g(this->#2)f(<<'\)';)h(})0
3499 883 y(ostream&)f(classof)g(DIV::print\(ostream&)e(s\))65
3500 933 y({)k(return)f(s)g(<<)g('\(')h(<<)f(this->#1)f(<<)i('/')f(<<)g
3501 (this->#2)f(<<'\)';)h(})0 983 y(ostream&)f(classof)g
3502 (VAR::print\(ostream&)e(s\))65 b({)22 b(return)e(s)i(<<)f(name;)g(})54
3503 1074 y Fw(Th)o(e)10 b(sp)q(ecial)g(t)o(yp)q(e)g(form)f
3504 Fs(classof)g Fo(c)n(on)h Fw(i)q(s)g(us)q(e)q(d)h(t)o(o)g(reference)i(t)
3505 n(h)o(e)e(t)o(yp)q(e)f(of)g(a)g(constru)o(ct)o(or.)19
3506 b(Argu)o(m)o(en)o(t)o(s)10 b(of)g(a)g(constru)o(ct)o(or)0
3507 1124 y(us)q(e)q(s)16 b(t)n(h)o(e)f(follo)o(win)o(g)d(n)o(amin)o(g)g
3508 (con)o(v)o(en)o(t)o(ion:)19 b(\(i\))14 b(if)g(t)n(h)o(e)h(constru)o(ct)
3509 o(or)h Ft(C)h Fw(t)o(ak)o(e)q(s)e(only)f(on)o(e)h(argu)o(m)o(en)o(t,)e
3510 (t)n(h)o(en)i(t)n(h)o(e)g(n)o(am)o(e)e(of)h(t)n(h)o(e)0
3511 1174 y(argu)o(m)o(en)o(t)f(i)q(s)g Ft(C)s Fw(;)g(\(ii\))g(if)g
3512 Ft(C)k Fw(t)o(ak)o(e)q(s)d(t)o(w)o(o)f(or)h(more)f(u)o(nn)o(am)o(e)q(d)
3513 g(argu)o(m)o(en)o(t)o(s,)g(t)n(h)o(en)i(t)n(h)o(e)q(s)q(e)g(are)g(n)o
3514 (am)o(e)q(d)d Fs(#1)p Fw(,)h Fs(#2)p Fw(,)g(et)o(c;)h(\(iii\))f(\014n)o
3515 (ally)m(,)0 1223 y(la)o(b)q(ele)q(d)g(argu)o(m)o(en)o(t)o(s)h(are)g
3516 (giv)o(en)g(t)n(h)o(e)g(sam)o(e)f(n)o(am)o(e)g(as)h(t)n(h)o(e)g(la)o(b)
3517 q(el.)54 1285 y(F)m(or)g(read)o(a)o(bilit)o(y)g(reasons,)i(it)e(i)q(s)h
3518 (oft)o(en)f(us)q(eful)h(t)o(o)g(s)q(epara)o(t)o(e)g(a)g(d)o(a)o(t)o(a)o
3519 (t)o(yp)q(e)f(d)o(e\014nit)o(ion)h(f)q(rom)d(t)n(h)o(e)k(m)o(em)n(b)q
3520 (er)c(fu)o(nct)o(ions)j(an)o(d)0 1335 y(inh)o(er)q(it)o(ance)e(d)o
3521 (e\014nit)o(ions.)18 b(Th)o(e)13 b Fs(refine)f Fw(d)o(eclara)o(t)o(ion)
3522 g(can)h(b)q(e)g(us)q(e)q(d)h(in)e(t)n(hi)q(s)h(s)q(it)o(ua)o(t)o(ion.)j
3523 (F)m(or)d(example,)e(t)n(h)o(e)i(a)o(b)q(o)o(v)o(e)g(example)0
3524 1385 y(can)h(b)q(e)g(re)q(st)o(a)o(t)o(e)q(d)i(more)c(su)o(ccinct)n(ly)
3525 j(as)f(follo)o(ws:)0 1484 y Fs(//)0 1533 y(//)21 b(Datatype)g
3526 (definition)e(section)0 1583 y(//)0 1633 y(datatype)h(Exp)h(=)h(INT)f
3527 (int)283 1683 y(|)h(PLUS)43 b(Exp,)21 b(Exp)283 1733
3528 y(|)h(MINUS)f(Exp,)g(Exp)283 1783 y(|)h(MULT)43 b(Exp,)21
3529 b(Exp)283 1832 y(|)h(DIV)65 b(Exp,)21 b(Exp)283 1882
3530 y(|)h(VAR)f({)h(name)f(:)g(const)g(char)g(*,)g(typ)g(:)h(Type)f(})0
3531 1932 y(;)0 2032 y(//)0 2081 y(//)g(Refinement)f(section)0
3532 2131 y(//)0 2181 y(refine)h(Exp)g(:)g(public)g(AST,)g(virtual)f(public)
3533 h(Object)153 2231 y({)g(virtual)f(ostream&)h(print)f(\(ostream&\))g(=)i
3534 (0;)196 2281 y(void)f(*)h(operator)e(new)h(\(size_t\);)153
3535 2330 y(})0 2380 y(and)87 b(INT,)21 b(PLUS,)f(MINUS,)h(MULT,)g(DIV,)g
3536 (VAR)153 2430 y({)g(ostream&)f(print\(ostream&\);)153
3537 2480 y(})0 2530 y(;)54 2629 y Fw(Th)o(e)14 b(gen)o(eral)g(syn)o(t)o(ax)
3538 f(of)h(t)n(h)o(e)g Fs(refine)f Fw(d)o(eclara)o(t)o(ion)h(i)q(s)f(as)h
3539 (follo)o(ws:)p eop
3540 %%Page: 29 30
3541 29 29 bop 0 -82 1981 3 v 0 -100 a Fq(4.)22 b Fp(Algebraic)c(D)o(a)m(t)m
3542 (a)m(types)g(and)h(P)l(a)m(ttern)g(Ma)m(tching)756 b
3543 Fw(29)129 38 y Fo(R)n(e\014ne)p 244 38 13 2 v 16 w(De)n(cl)50
3544 b Fu(::=)h Fs(refine)12 b Fo(R)n(e\014ne)p 758 38 V 17
3545 w(Sp)n(e)n(c)i Fs(and)f Ft(:)7 b(:)g(:)12 b Fs(and)i
3546 Fo(R)n(e\014ne)p 1200 38 V 16 w(Sp)n(e)n(c)g Fs(;)129
3547 88 y Fo(R)n(e\014ne)p 244 88 V 16 w(Sp)n(e)n(c)50 b Fu(::=)h
3548 Fo(Id)p Fs(,)14 b Ft(:)7 b(:)g(:)12 b Fs(,)i Fo(Id)540
3549 138 y([)h Fs(:)k Fo(Inherit)p 736 138 V 15 w(List)14
3550 b(])540 188 y([)h Fs(::)k Fo(Datatyp)n(e)p 793 188 V
3551 16 w(Quali\014ers)14 b(])540 238 y([)h Fi(f)f Fo(Datatyp)n(e)p
3552 765 238 V 16 w(Bo)n(dy)i Fi(g)f Fo(])0 331 y Fw(Here,)g
3553 Fo(Id)f Fw(refers)h(t)o(o)g(e)q(it)n(h)o(er)g(a)e(constru)o(ct)o(or)j
3554 (n)o(am)o(e)d(or)h(a)f(d)o(a)o(t)o(a)o(t)o(yp)q(e)h(n)o(am)o(e.)0
3555 459 y FF(4.5)56 b(M)o(emory)16 b(m)o(an)o(agem)n(en)n(t)0
3556 547 y Fw(By)i(d)o(ef)q(a)n(ul)o(t,)h(a)f(d)o(a)o(t)o(a)o(t)o(yp)q(e)g
3557 (constru)o(ct)o(or)i(calls)d(t)n(h)o(e)i Fs(operator)h(new)d
3558 Fw(t)o(o)h(allo)q(ca)o(t)o(e)q(d)g(m)o(emory)m(.)27 b(Th)o(ere)19
3559 b(are)f(a)g(few)g(w)o(ays)g(t)o(o)0 597 y(c)o(h)o(an)o(ge)c(t)n(hi)q(s)
3560 g(b)q(e)o(h)o(a)o(vior:)j(\(i\))d(re)q(d)o(e\014n)o(e)i(t)n(h)o(e)f
3561 Fs(operator)20 b(new)13 b Fw(wit)n(hin)g(t)n(h)o(e)i(d)o(a)o(t)o(a)o(t)
3562 o(yp)q(e)f(us)q(in)o(g)f(re\014n)o(em)o(en)o(t;)g(or)h(\(ii\))f(inh)o
3563 (er)q(it)h(f)q(rom)0 647 y(a)g(class)g(t)n(h)o(a)o(t)g(re)q(d)o(e\014n)
3564 o(e)q(s)j(t)n(hi)q(s)d(m)o(et)n(h)o(o)q(d.)54 708 y(If)d(a)g
3565 Fo(plac)n(ement)g Fs(operator)21 b(new)10 b Fw(i)q(s)h(d)o(e\014n)o(e)q
3566 (d)i(in)e(d)o(a)o(t)o(a)o(t)o(yp)q(e,)g(t)n(h)o(e)h(placem)o(en)o(t)e
3567 (constru)o(ct)o(or)k(syn)o(t)o(ax)d(can)g(b)q(e)h(us)q(e)q(d)g(t)o(o)g
3568 (in)o(v)o(ok)o(e)0 758 y(t)n(hi)q(s)i(o)o(p)q(era)o(t)o(or:)129
3569 850 y Fo(Plac)n(ement)p 318 850 V 15 w(Cons)50 b Fu(::=)h
3570 Fo(Cons)14 b Fs('\()f Fo(Exp)q Fs(,)g Ft(:)7 b(:)g(:)13
3571 b Fs(,)g Fo(Exp)i Fs(\))e(\()h Fo([)h(Exp)p Fs(,)g Ft(:)7
3572 b(:)g(:)13 b Fs(,)i Fo(Exp)g(])f Fs(\))504 900 y Fi(j)69
3573 b Fo(Cons)14 b Fs('\()f Fo(Exp)q Fs(,)g Ft(:)7 b(:)g(:)13
3574 b Fs(,)g Fo(Exp)i Fs(\))e Fi(f)h Fo([)h(Id)g(=)f(Exp)q
3575 Fs(,)h Ft(:)7 b(:)g(:)13 b Fs(,)i Fo(Id)g(=)f(Exp)i(])d
3576 Fi(g)54 993 y Fw(F)m(or)g(example,)f(in)h(t)n(h)o(e)i(follo)o(win)o(g)c
3577 (t)n(h)o(e)k(extra)f(param)o(et)o(er)f Fs(mem)h Fw(will)e(b)q(e)i(pass)
3578 q(e)q(d)h(t)o(o)f(placem)o(en)o(t)f Fs(new)g Fw(o)o(p)q(era)o(t)o(or.)
3579 44 1088 y Fs(Exp)21 b(e1)g(=)h(INT'\(mem\)\(1\);)44 1138
3580 y(Exp)f(e2)g(=)h(VAR'\(mem\){)d(name)i(=)h("foo",)f(typ)g(=)g(t)h(};)0
3581 1257 y Fu(4.5.1)48 b(Garbage)15 b(co)o(llect)o(ion)0
3582 1346 y Fw(Th)o(e)d(sup)o(p)q(ort)h(library)e(con)o(t)o(ains)h(an)g
3583 (implem)n(en)o(t)o(a)o(t)o(io)o(n)862 1331 y Fn(6)890
3584 1346 y Fw(of)f(a)h(cons)q(erv)n(a)o(t)o(iv)o(e)h(garbage)e(collect)o
3585 (or)i(us)q(in)o(g)f(t)o(w)o(o)f(algor)q(it)n(hms:)k(on)o(e)0
3586 1396 y(us)q(in)o(g)f(a)f(most)n(ly)g(co)o(p)o(yin)o(g)h(sc)o(h)o(em)o
3587 (e[Bar88)o(,)f(Bar89])h(an)o(d)f(on)o(e)h(us)q(in)o(g)g(m)o(ar)o(k-sw)o
3588 (eep.)54 1457 y(A)20 b(d)o(a)o(t)o(a)o(t)o(yp)q(e)g(can)g(b)q(e)g(d)o
3589 (e\014n)o(e)q(d)h(t)o(o)g(b)q(e)f(garbage)f(collect)o(a)o(ble)g(wit)n
3590 (h)h(t)n(h)o(e)h(quali\014er)f Fs(collectable)p Fw(.)34
3591 b(In)20 b(t)n(h)o(e)h(follo)o(win)o(g)0 1507 y(example,)13
3592 b(t)n(h)o(e)j(d)o(a)o(t)o(a)o(t)o(yp)q(e)e Fs(Exp)h Fw(i)q(s)f(will)g
3593 (b)q(e)h(allo)q(ca)o(t)o(e)q(d)f(f)q(rom)f(t)n(h)o(e)j(a)e(garbage)h
3594 (collect)o(e)q(d)g(h)o(eap)h(inst)o(ead)f(of)g(t)n(h)o(e)g(d)o(ef)q(a)n
3595 (ul)o(t)h(h)o(eap.)0 1557 y(Since)h(it)f(reference)q(s)k(anot)n(h)o(er)
3596 d(us)q(er)h(d)o(e\014n)o(e)q(d)g(garbage)e(collect)o(a)o(ble)g(ob)r
3597 (ject)h Fs(SymbolTable)p Fw(,)e(t)n(h)o(e)i(p)q(oin)o(t)o(er)g(t)o(o)f
3598 (t)n(h)o(a)o(t)h(sym)n(b)q(ol)0 1607 y(t)o(a)o(ble)c(i)q(s)g(also)h(m)o
3599 (ar)o(k)o(e)q(d)f(as)h Fs(collectable)p Fw(.)65 1702
3600 y Fs(//)22 b(SymbolTable)d(is)j(collectable)65 1751 y(class)f
3601 (SymbolTable:)e(public)i(GCObject)65 1801 y({)65 1851
3602 y(public:)131 1901 y(class)g(Id)g(:)g(public)g(GCObject)f({)i(...)f(};)
3603 131 1951 y(...)65 2000 y(};)65 2100 y(datatype)g(Exp)g(::)g
3604 (collectable)131 2150 y(=)g(INT)h(int)131 2200 y(|)f(VAR)h
3605 (\(collectable)d(SymbolTable::Id,)f(collectable)i(SymbolTable)f(*\))131
3606 2249 y(|)i(ADD)h(Exp,)e(Exp)131 2299 y(|)h(SUB)h(Exp,)e(Exp)131
3607 2349 y(|)h(MUL)h(Exp,)e(Exp)131 2399 y(|)h(DIV)h(Exp,)e(Exp)131
3608 2449 y(;)p 0 2481 792 2 v 46 2508 a Fm(6)64 2520 y Fl(Th)o(e)12
3609 b(implem)o(en)n(t)o(a)n(t)o(ion)d(h)o(as)i(only)g(been)g(t)o(e)q(st)o
3610 (e)q(d)g(on)g(Lin)o(ux,)f(SunOS)h(an)o(d)g(Solar)q(is.)k(Pleas)q(e)c
3611 (con)o(t)o(act)f(t)o(h)o(e)g(a)o(ut)o(h)o(or)f(for)j(d)o(et)o(ails)f
3612 (if)g(y)o(ou'd)g(lik)o(e)g(to)0 2559 y(p)q(ort)f(t)o(h)o(e)h(collector)
3613 d(to)j(y)o(our)f(part)o(icular)f(pla)o(tform.)p eop
3614 %%Page: 30 31
3615 30 30 bop 0 -82 1981 3 v 0 -100 a Fq(4.)16 b Fp(Algebraic)i(D)o(a)m(t)m
3616 (a)m(types)g(and)h(P)l(a)m(ttern)g(Ma)m(tching)762 b
3617 Fw(30)54 45 y(Th)o(e)12 b(corre)q(sp)q(on)o(din)o(g)h
3618 Fs(instantiate)19 b(datatype)10 b Fw(st)o(a)o(t)o(em)o(en)o(t)h(for)g
3619 Fs(Exp)g Fw(will)f(gen)o(era)o(t)o(e)j(t)n(h)o(e)f(ap)o(pro)o(pr)q(ia)o
3620 (t)o(e)f(tracin)o(g)h(m)o(et)n(h)o(o)q(ds)0 95 y(for)i(garbage)f
3621 (collect)o(ion.)54 157 y(Pleas)q(e)i(s)q(ee)f(ap)o(p)q(en)o(dix)f(A)h
3622 (for)g(more)f(d)o(et)o(ails)h(concer)q(nin)o(g)h(garbage)e(collect)o
3623 (ion.)0 276 y Fu(4.5.2)48 b(P)o(ers)q(i)q(st)o(e)o(nce)0
3624 364 y Fw(Da)o(t)o(a)o(t)o(yp)q(e)q(s)9 b(can)h(b)q(e)g(in)o(t)o(erf)q
3625 (ace)q(d)g(wit)n(h)g(t)n(h)o(e)g(p)q(ers)q(i)q(st)o(en)o(t)g(ob)r(ject)
3626 h(library)e(sup)o(plie)q(d)g(wit)n(h)h(t)n(h)o(e)g(transla)o(t)o(or)g
3627 (us)q(in)o(g)g(t)n(h)o(e)g Fs(persistent)0 414 y Fw(quali\014er.)24
3628 b(A)16 b(p)q(ers)q(i)q(st)o(en)o(t)h(ob)r(ject)g(d)o(e\014n)o(e)q(s)h
3629 (t)n(h)o(e)e(prot)o(o)q(col)g(for)g(s)q(er)q(ializin)o(g)f(it)o(s)i
3630 (repre)q(s)q(en)o(t)o(a)o(t)o(ion)g(in)o(t)o(o)f(an)f(arc)o(hit)o(ect)o
3631 (ure)j(in)o(d)o(e-)0 464 y(p)q(en)o(d)o(en)o(t)d(form)o(a)o(t)d(on)h(a)
3632 h(p)q(ers)q(i)q(st)o(ence)h(stream.)54 526 y(F)m(or)g(example,)g(t)n(h)
3633 o(e)h(follo)o(win)o(g)e(d)o(a)o(t)o(a)o(t)o(yp)q(e)i(d)o(eclara)o(t)o
3634 (ion)g(d)o(e\014n)o(e)q(s)h(a)f(p)q(ers)q(i)q(st)o(en)o(t)h(t)o(yp)q(e)
3635 f Fs(Exp)p Fw(.)24 b(Not)o(e)16 b(t)n(h)o(a)o(t)g(a)g(p)q(oin)o(t)o(er)
3636 g(t)o(o)g(t)n(h)o(e)0 576 y(sym)n(b)q(ol)d(t)o(a)o(ble)h(i)q(s)h(annot)
3637 o(a)o(t)o(e)q(d)g(wit)n(h)g(t)n(h)o(e)h Fs(persisent)d
3638 Fw(quali\014er)i(t)o(o)h(s)q(ignify)d(t)n(h)o(a)o(t)j(t)n(h)o(e)g(ob)r
3639 (ject)g(asso)q(cia)o(t)o(e)q(d)g(wit)n(h)f(t)n(h)o(e)h(p)q(oin)o(t)o
3640 (er)0 625 y(sh)o(ould)e(b)q(e)g(tra)o(v)o(ers)q(e)q(d)h(d)o(ur)q(in)o
3641 (g)f(t)n(h)o(e)g(s)q(er)q(ializa)o(t)o(ion)f(ph)o(as)q(e.)65
3642 719 y Fs(//)22 b(SymbolTable)d(is)j(persistent)65 769
3643 y(class)f(SymbolTable:)e(public)i(PObject)65 819 y({)65
3644 869 y(public:)131 919 y(class)g(Id)g(:)g(public)g(PObject)f({)i(...)f
3645 (};)131 968 y(...)65 1018 y(};)65 1118 y(datatype)g(Exp)g(::)g
3646 (persistent)131 1168 y(=)g(INT)h(int)131 1217 y(|)f(VAR)h(\(persistent)
3647 d(SymbolTable::Id,)g(persistent)g(SymbolTable)h(*\))131
3648 1267 y(|)h(ADD)h(Exp,)e(Exp)131 1317 y(|)h(SUB)h(Exp,)e(Exp)131
3649 1367 y(|)h(MUL)h(Exp,)e(Exp)131 1417 y(|)h(DIV)h(Exp,)e(Exp)131
3650 1467 y(;)54 1561 y Fw(A)c(p)q(ers)q(i)q(st)o(en)o(t)h(ob)r(ject)g(id)f
3651 Fo(must)g Fw(b)q(e)g(pro)o(vid)o(e)q(d)h(wit)n(h)f(eac)o(h)h(di)q(st)o
3652 (inct)f(d)o(a)o(t)o(a)o(t)o(yp)q(e.)25 b(Ob)r(ject)18
3653 b(ids)e(are)h(us)q(e)q(d)g(t)o(o)g(id)o(en)o(t)o(ify)e(t)n(h)o(e)0
3654 1610 y(class)q(e)q(s)k(of)e(p)q(ers)q(i)q(st)o(en)o(t)g(ob)r(ject)o(s.)
3655 30 b(Th)n(us)18 b(t)n(h)o(ey)g(m)n(ust)f(b)q(e)g(u)o(nique)h(wit)n(hin)
3656 f(an)g(ap)o(plica)o(t)o(ion.)25 b(Eac)o(h)18 b(p)q(ers)q(i)q(st)o(en)o
3657 (t)g(t)o(yp)q(e)f(t)o(ag)g(i)q(s)0 1660 y(s)q(imply)11
3658 b(a)j(str)q(in)o(g,)f(an)o(d)h(can)g(b)q(e)g(d)o(e\014n)o(e)q(d)h(us)q
3659 (in)o(g)f(t)n(h)o(e)g Fs(refine)21 b(persistent)12 b
3660 Fw(st)o(a)o(t)o(em)o(en)o(t.)54 1722 y(F)m(or)c(example,)g(t)n(h)o(e)i
3661 (follo)o(win)o(g)d(st)o(a)o(t)o(em)o(en)o(t)i(d)o(eclare)q(s)i(t)n(h)o
3662 (e)f(p)q(ers)q(i)q(st)o(en)o(t)f(ob)r(ject)i(id)d(for)h(t)o(yp)q(e)g
3663 Fs(Exp)g Fw(a)o(b)q(o)o(v)o(e)g(t)o(o)g(b)q(e)h Fs("Simple)20
3664 b(expressions")p Fw(.)65 1816 y Fs(refine)h(persistent)f(Exp)h(=>)g
3665 ("Simple)g(expressions";)54 1910 y Fw(Th)o(e)10 b(corre)q(sp)q(on)o
3666 (din)o(g)h Fs(instantiate)19 b(datatype)9 b Fw(st)o(a)o(t)o(em)o(en)o
3667 (t)g(will)f(gen)o(era)o(t)o(e)j(t)n(h)o(e)f(ap)o(pro)o(pr)q(ia)o(t)o(e)
3668 f(m)o(et)n(h)o(o)q(ds)h(t)o(o)g(comm)n(u)o(nica)o(t)o(e)0
3669 1960 y(wit)n(h)k(a)f(p)q(ers)q(i)q(st)o(en)o(t)i(stream.)44
3670 2053 y Fs(instantiate)k(datatype)h(Exp;)54 2147 y Fw(T)m(o)13
3671 b(wr)q(it)o(e)g(an)h(ob)r(ject)h Ft(e)f Fw(t)o(o)g(t)n(h)o(e)h(d)o(a)o
3672 (t)o(a\014le)f Fs("foo")p Fw(,)e(w)o(e)i(can)g(say:)65
3673 2241 y Fs(#include)21 b(<AD/persist/pos)o(tream)o(.h>)65
3674 2291 y(ofstream)g(out\("foo"\);)65 2341 y(Postream)g(pout\(out\);)65
3675 2391 y(pout)g(<<)h(e;)65 2441 y(out.close\(\);)54 2535
3676 y Fw(T)m(o)13 b(read)i(t)n(h)o(e)f(ob)r(ject)h(bac)o(k)f(f)q(rom)e(t)n
3677 (h)o(e)i(\014le,)g(w)o(e)g(can)g(say:)65 2629 y Fs(#include)21
3678 b(<AD/persist/pis)o(tream)o(.h>)p eop
3679 %%Page: 31 32
3680 31 31 bop 0 -82 1981 3 v 0 -100 a Fq(4.)22 b Fp(Algebraic)c(D)o(a)m(t)m
3681 (a)m(types)g(and)h(P)l(a)m(ttern)g(Ma)m(tching)756 b
3682 Fw(31)65 45 y Fs(EXP)22 b(e;)65 95 y(ifstream)f(in\("foo"\);)65
3683 145 y(Pistream)g(pin\(in\);)65 195 y(e)h(=)g(\(Exp\)read_objec)o
3684 (t\(pin)o(\);)65 244 y(in.close\(\);)54 339 y Fw(F)m(or)14
3685 b(more)f(d)o(et)o(ails)i(concer)q(nin)o(g)g(p)q(ers)q(i)q(st)o(en)o(t)g
3686 (streams)g(an)o(d)f(p)q(ers)q(i)q(st)h(ob)r(ject)o(s,)h(pleas)q(e)f(s)q
3687 (ee)h(direct)o(ory)f Fs(<AD/persist>)d Fw(for)0 389 y(d)o(et)o(ails.)p
3689 %%Page: 32 33
3690 32 32 bop 0 -82 1981 3 v 0 -100 a Fq(5.)22 b Fp(Inference)1632
3691 b Fw(32)0 45 y Fv(5)66 b(Inference)0 148 y Fw(Sem)o(an)o(t)o(ic)12
3692 b(pro)q(ce)q(ss)q(in)o(g)j(in)f(compilers)f(an)o(d)g(ot)n(h)o(er)h(lan)
3693 o(guage)g(pro)q(ce)q(ssors,)i(su)o(c)o(h)e(as)g(d)o(a)o(t)o(a)f(\015o)o
3694 (w)h(an)o(alys)q(i)q(s,)d(can)j(f)q(requen)o(t)n(ly)g(b)q(e)0
3695 198 y(sp)q(eci\014e)q(d)j(as)g(in)f(a)g(rule-bas)q(e)q(d,)h(logical)e
3696 (d)o(e)q(d)o(u)o(ct)o(iv)o(e)i(st)o(yle.)26 b(In)16 b
3697 Fz(Pro)o(p)p Fw(,)h(d)o(e)q(d)o(u)o(ct)o(iv)o(e)g(inference)h(us)q(in)o
3698 (g)e(forw)o(ard)g(c)o(h)o(ainin)o(g)1917 183 y Fn(7)1952
3699 198 y Fw(i)q(s)0 247 y(pro)o(vid)o(e)q(d)c(as)h(a)f(buil)o(t-in)f(m)o
3700 (ec)o(h)o(ani)q(sm,)e(ort)n(h)o(ogon)o(al)i(t)o(o)h(pa)o(t)n(t)o(er)q
3701 (n)h(m)o(a)o(t)o(c)o(hin)o(g)e(an)o(d)h(rewr)q(it)o(in)o(g,)g(for)f(m)o
3702 (anipula)o(t)o(in)o(g)f(us)q(er-d)o(e\014n)o(e)q(d)0
3703 297 y(alge)o(braic)j(d)o(a)o(t)o(a)o(t)o(yp)q(e)q(s.)54
3704 359 y(Similar)f(t)o(o)j(syn)o(t)o(ax)g(class)q(e)q(s,)i
3705 Fu(inference)e(clas)q(s)q(e)q(s)f Fw(m)o(ay)f(b)q(e)i(us)q(e)q(d)h(for)
3706 f(d)o(a)o(t)o(a)g(encapsula)o(t)o(ion.)22 b(An)15 b(inference)i(class)f
3707 (i)q(s)e(a)0 409 y(com)n(bin)o(a)o(t)o(ion)c(of)j(a)f(C)p
3708 Fs(++)h Fw(class,)g(a)g(d)o(a)o(t)o(a)o(bas)q(e)g(of)f(inference)j
3709 (rela)o(t)o(ions,)d(an)o(d)h(a)g(collect)o(ion)e(of)i(inference)h(rule)
3710 q(s)g(of)e(t)n(h)o(e)i(form)d Fo(lhs)0 459 y Fs(->)h
3711 Fo(rhs)p Fw(.)17 b(Th)o(e)11 b(lhs)g(of)g(an)g(inference)h(rule)g(i)q
3712 (s)e(a)h(s)q(et)h(of)f(pa)o(t)n(t)o(er)q(ns)h(in)f(conju)o(nct)o(iv)o
3713 (e)h(form.)j(Dur)q(in)o(g)c(t)n(h)o(e)g(inference)i(pro)q(ce)q(ss,)h(a)
3714 d(rule)0 508 y(i)q(s)i(\014re)q(d)i(wh)o(en)f(it)o(s)h(lhs)f(con)o(dit)
3715 o(ion)f(i)q(s)g(sa)o(t)o(i)q(s\014e)q(d.)18 b(A)c(\014re)q(d)h(rule)f
3716 (t)n(h)o(en)h(execu)o(t)o(e)q(s)i(t)n(h)o(e)d(corre)q(sp)q(on)o(din)o
3717 (g)i(rhs)e(act)o(ion,)f(whic)o(h)h(m)o(ay)0 558 y(ass)q(ert)j(or)e
3718 (retract)h(addit)o(ion)o(al)d(rela)o(t)o(ions)i(f)q(rom)e(t)n(h)o(e)j
3719 (d)o(a)o(t)o(a)o(bas)q(e.)22 b(Us)q(in)o(g)14 b(m)n(ul)o(t)o(iple)f
3720 (inh)o(er)q(it)o(ance,)j(it)e(i)q(s)h(p)q(oss)q(ible)g(t)o(o)g(com)n
3721 (bin)o(e)0 608 y(a)h(rewr)q(it)o(in)o(g)g(class)h(wit)n(h)f(an)g
3722 (inference)h(class)g(su)o(c)o(h)g(t)n(h)o(a)o(t)f(t)n(h)o(e)h(rewr)q
3723 (it)o(in)o(g)f(pro)q(ce)q(ss)i(gen)o(era)o(t)o(e)q(s)g(n)o(ew)e(rela)o
3724 (t)o(ions)g(t)o(o)g(dr)q(iv)o(e)g(t)n(h)o(e)0 658 y(inference)f(pro)q
3725 (ce)q(ss,)h(or)e(vice)g(v)o(ersa.)0 783 y FF(5.1)56 b(An)19
3726 b(Examp)o(le)0 872 y Fw(Da)o(t)o(a)o(t)o(yp)q(e)12 b(rela)o(t)o(ions)g
3727 (are)h(not)g(a)f(di)q(st)o(inct)g(kin)o(d)g(of)h(d)o(a)o(t)o(a)f(stru)o
3728 (ct)o(ure)j(bu)o(t)e(are)g(in)f(f)q(act)h(s)q(imply)c(alge)o(braic)j(d)
3729 o(a)o(t)o(a)o(t)o(yp)q(e)q(s)i(d)o(eclare)q(d)0 922 y(t)o(o)e(h)o(a)o
3730 (v)o(e)g(a)g Fs(relation)e Fw(a)o(t)n(tr)q(ibu)o(t)o(e.)18
3731 b(F)m(or)12 b(example,)e(in)h(t)n(h)o(e)i(follo)o(win)o(g)c(d)o
3732 (e\014nit)o(ion)j(t)n(hree)h(rela)o(t)o(ion)f(t)o(yp)q(e)q(s)g
3733 Fs(Person)p Fw(,)f Fs(Parent)f Fw(an)o(d)0 971 y Fs(Gen)j
3734 Fw(are)i(d)o(e\014n)o(e)q(d.)65 1060 y Fs(datatype)21
3735 b(Person)f(::)h(relation)g(=)g(person)g(\(const)f(char)h(*\))153
3736 1110 y(and)43 b(Parent)20 b(::)h(relation)g(=)g(parent)g(\(const)f
3737 (char)h(*,)h(const)e(char)h(*\))153 1160 y(and)43 b(Gen)86
3738 b(::)21 b(relation)g(=)g(same_generation)e(\(const)h(char)h(*,)h(const)
3739 f(char)f(*\);)65 1259 y(instantiate)g(datatype)g(Person,)g(Parent,)h
3740 (Gen;)54 1348 y Fw(Us)q(in)o(g)15 b(t)n(h)o(e)q(s)q(e)i(rela)o(t)o
3741 (ions)e(w)o(e)g(can)h(d)o(e\014n)o(e)g(an)f(inference)i(class)f(t)n(h)o
3742 (a)o(t)g(compu)o(t)o(e)q(s)f(wh)o(et)n(h)o(er)i(t)o(w)o(o)e(p)q(ersons)
3743 h(are)g(in)f(t)n(h)o(e)h(sam)o(e)0 1398 y(gen)o(era)o(t)o(ion.)i(Nin)o
3744 (e)13 b(axioms)e(are)j(d)o(e\014n)o(e)q(d)g(\(i.e.)k(t)n(h)o(os)q(e)c
3745 (wh)o(os)q(e)g(lhs)f(are)h(empt)o(y\))e(in)h(t)n(h)o(e)h(follo)o(win)o
3746 (g.)h(Th)o(e)f(t)o(w)o(o)e(inference)j(rule)q(s)0 1448
3747 y(st)o(a)o(t)o(e)e(t)n(h)o(a)o(t)f(\(1\))g(a)g(p)q(erson)h(i)q(s)f(in)g
3748 (t)n(h)o(e)h(sam)o(e)e(gen)o(era)o(t)o(ion)h(as)g(him/h)o(ers)q(elf,)f
3749 (an)o(d)h(\(2\))g(t)o(w)o(o)g(p)q(ersons)h(are)g(in)f(t)n(h)o(e)h(sam)o
3750 (e)e(gen)o(era)o(t)o(ion)0 1497 y(if)i(t)n(h)o(e)q(ir)i(paren)o(t)o(s)g
3751 (are)f(in)f(t)n(h)o(e)i(sam)o(e)e(gen)o(era)o(t)o(ion.)65
3752 1586 y Fs(inference)20 b(class)h(SameGeneration)e({};)65
3753 1686 y(inference)h(SameGeneration)65 1736 y({)44 b(->)21
3754 b(person\("p1"\))e(and)j(person\("p2"\))d(and)196 1785
3755 y(person\("p3"\))g(and)j(person\("p4"\))d(and)196 1835
3756 y(person\("p5"\);)131 1935 y(->)i(parent\("p1",)e("p2"\))i(and)196
3757 1985 y(parent\("p1",)e("p3"\))i(and)196 2035 y(parent\("p2",)e("p4"\))i
3758 (and)196 2084 y(parent\("p3",)e("P5"\);)131 2184 y(person)h(?p)i(->)f
3759 (same_generation)e(\(?p,)i(?p\);)131 2284 y(parent)f(\(?x,)h(?y\))g
3760 (and)h(parent)e(\(?z,)h(?w\))g(and)g(same_generation)e(\(?x,)i(?z\))131
3761 2333 y(->)g(same_generation\(?y)o(,)e(?w\);)65 2383 y(};)54
3762 2472 y Fw(In)e(gen)o(eral,)h(d)o(a)o(t)o(a)o(t)o(yp)q(e)q(s)g
3763 (quali\014e)q(d)f(as)h Fs(relation)p Fw(s)e(will)g(inh)o(er)q(it)h(f)q
3764 (rom)e(t)n(h)o(e)k(bas)q(e)e(class)i Fs(Fact)p Fw(,)e(while)g(a)g(rewr)
3765 q(it)o(e)h(class)0 2522 y(d)o(e\014nit)o(ion)f(impli)o(cit)n(ly)d(d)o
3766 (e\014n)o(e)q(s)19 b(t)o(w)o(o)e(m)o(em)n(b)q(er)e(fu)o(nct)o(ions)i
3767 (us)q(e)q(d)h(t)o(o)g(ass)q(ert)h(an)o(d)d(retract)j(f)q(act)o(s)f(in)e
3768 (t)n(h)o(e)i(in)o(t)o(er)q(n)o(al)e(d)o(a)o(t)o(a)o(bas)q(e.)p
3769 0 2551 792 2 v 46 2577 a Fm(7)64 2589 y Fl(Th)o(e)c(curren)o(t)f
3770 (implem)o(en)n(t)o(a)o(t)n(ion)e(of)k Fe(Pro)o(p)f Fl(transla)o(t)o(e)q
3771 (s)e(inference)h(in)o(to)g(v)o(ery)g(n)o(aiv)o(e)h(co)q(d)o(e.)18
3772 b(This)13 b(fea)o(t)o(ure)e(will)i(be)f(ph)o(as)q(e)q(d)f(out)g(an)o(d)
3773 h(replace)q(d)0 2629 y(b)o(y)f(t)o(h)o(e)f(more)h(gen)o(eral)e(an)o(d)i
3774 (m)o(u)o(c)o(h)f(fast)o(er)h(graph)f(rewr)q(it)o(ing)f(m)o(ec)o(h)o
3775 (anism.)p eop
3776 %%Page: 33 34
3777 33 33 bop 0 -82 1981 3 v 0 -100 a Fq(5.)22 b Fp(Inference)1632
3778 b Fw(33)0 45 y(F)m(or)17 b(example,)f(in)h(t)n(h)o(e)i(a)o(b)q(o)o(v)o
3779 (e)e(example,)f(t)n(h)o(e)i(follo)o(win)o(g)d(prot)o(o)q(col)i(will)f
3780 (b)q(e)i(a)n(u)o(t)o(om)o(a)o(t)o(ically)d(gen)o(era)o(t)o(e)q(d)k(b)o
3781 (y)e(t)n(h)o(e)h(inference)0 95 y(compiler.)65 198 y
3782 Fs(class)j(SameGeneration)e(:)j(...)65 248 y({)65 298
3783 y(public:)153 347 y(virtual)e(Rete&)86 b(infer)152 b(\(\);)f(//)22
3784 b(start)f(the)g(inference)f(process)153 397 y(virtual)g(ReteNet&)g
3785 (operator)g(+=)i(\(Fact)e(*\);)h(//)h(assert)e(fact)153
3786 447 y(virtual)g(ReteNet&)g(operator)g(-=)i(\(Fact)e(*\);)h(//)h
3787 (retract)e(fact)65 497 y(};)54 600 y Fw(Us)q(in)o(g)c(t)n(h)o(e)q(s)q
3788 (e)j(m)o(et)n(h)o(o)q(ds,)e(an)f(ap)o(plica)o(t)o(ion)f(can)i(ins)q
3789 (ert)h(or)f(remo)o(v)o(e)f(rela)o(t)o(ions)g(f)q(rom)f(an)i(inference)h
3790 (class.)29 b(Thi)q(s)16 b(will)f(in)0 650 y(t)o(ur)q(n)f(tr)q(igger)g
3791 (an)o(y)f(a)o(t)n(t)o(ac)o(h)o(e)q(d)i(inference)g(rule)q(s)g(of)e(t)n
3792 (h)o(e)i(class.)0 770 y Fu(5.1.1)48 b(Anot)n(h)o(er)14
3793 b(examp)o(le)0 858 y Fw(Cons)q(id)o(er)j(t)n(h)o(e)g(follo)o(win)o(g)d
3794 (example,)g(whic)o(h)i(i)q(s)g(us)q(e)q(d)i(t)o(o)e(compu)o(t)o(e)g
3795 (Pyt)n(h)o(agorean)h(tr)q(ian)o(gle)q(s.)26 b(Only)16
3796 b(on)o(e)g(axiom)e(an)o(d)i(t)o(w)o(o)0 908 y(rule)q(s)c(are)f(us)q(e)q
3797 (d.)18 b(Th)o(e)11 b(axiom)d(an)o(d)j(t)n(h)o(e)h(\014rst)g(rule)f(are)
3798 g(us)q(e)q(d)h(t)o(o)f(ass)q(ert)i(t)n(h)o(e)e(rela)o(t)o(ions)g
3799 Fs(num\(1\))e Fw(t)o(o)j Fs(num\(n\))d Fw(in)o(t)o(o)i(t)n(h)o(e)g(d)o
3800 (a)o(t)o(a)o(bas)q(e,)0 958 y(wh)o(ere)17 b Fs(n)f Fw(i)q(s)f(limit)o
3801 (e)q(d)f(b)o(y)i(t)n(h)o(e)g(t)o(erm)g Fs(limit\(n\))p
3802 Fw(.)22 b(Th)o(e)16 b(s)q(econ)o(d)h(inference)g(rule)g(i)q(s)e(re)q
3803 (sp)q(ons)q(ible)h(for)g(pr)q(in)o(t)o(in)o(g)f(ou)o(t)h(only)f(t)n(h)o
3804 (e)0 1007 y(ap)o(pro)o(pr)q(ia)o(t)o(e)e(com)n(bin)o(a)o(t)o(ions)f(of)
3805 h(n)n(u)o(m)n(b)q(ers.)65 1111 y Fs(datatype)21 b(Number)f(::)h
3806 (relation)g(=)g(num)g(int)h(|)f(limit)g(int;)65 1210
3807 y(inference)f(class)h(Triangle)f({};)65 1310 y(inference)g(Triangle)65
3808 1360 y({)44 b(->)f(num)21 b(1;)218 1459 y(num)g(m)131
3809 1509 y(and)g(limit)g(n)g(|)h(n)f(>)h(m)131 1559 y(->)43
3810 b(num)21 b(\(m+1\);)218 1659 y(num)g(a)131 1708 y(and)g(num)g(b)131
3811 1758 y(and)g(num)g(c)h(|)f(a)h(<)f(b)h(&&)f(b)h(<)g(c)f(&&)h(a*a)f(+)g
3812 (b*b)g(==)h(c*c)131 1808 y(->)43 b({)22 b(cout)e(<<)i(a)f(<<)h(")f(*)h
3813 (")g(<<)f(a)h(<<)f(")h(+)f(")370 1858 y(<<)h(b)f(<<)h(")f(*)h(")g(<<)f
3814 (b)h(<<)f(")h(=)f(")370 1908 y(<<)h(c)f(<<)h(")f(*)h(")g(<<)f(c)h(<<)f
3815 ("\\n";)218 1957 y(};)65 2007 y(};)54 2110 y Fw(No)o(w,)12
3816 b(t)o(o)i(pr)q(in)o(t)f(all)f(t)n(h)o(e)i(tr)q(ian)o(gle)f(id)o(en)o(t)
3817 o(it)o(ie)q(s)h(lyin)o(g)f(in)g(ran)o(ge)h(of)e(1)i(t)o(o)f(100,)g(w)o
3818 (e)g(only)g(h)o(a)o(v)o(e)g(t)o(o)h(crea)o(t)o(e)h(an)e(inst)o(ance)h
3819 (of)f(t)n(h)o(e)0 2160 y(inference)i(class,)g(ins)q(ert)f(t)n(h)o(e)h
3820 (limit,)c(an)o(d)i(st)o(art)i(t)n(h)o(e)f(inference)i(pro)q(ce)q(ss,)g
3821 (as)e(in)f(b)q(elo)o(w:)65 2263 y Fs(Triangle)21 b(triangle;)65
3822 2313 y(triangle)g(+=)g(limit\(100\);)65 2363 y(triangle.infer\(\);)0
3823 2491 y FF(5.2)56 b(Inference)17 b(Clas)q(s)0 2579 y Fo(This)d(se)n
3824 (ction)h(is)g(inc)n(omplete.)p eop
3825 %%Page: 34 35
3826 34 34 bop 0 -82 1981 3 v 0 -100 a Fq(5.)22 b Fp(Inference)1632
3827 b Fw(34)0 45 y FF(5.3)56 b(Inference)17 b(R)m(ule)r(s)0
3828 134 y Fo(This)d(se)n(ction)h(is)g(inc)n(omplete.)p eop
3829 %%Page: 35 36
3830 35 35 bop 0 -82 1981 3 v 0 -100 a Fq(6.)16 b Fp(Tree)k(Rewriting)1484
3831 b Fw(35)0 45 y Fv(6)66 b(T)-6 b(ree)22 b(Rewr)q(it)n(in)o(g)0
3832 148 y Fz(Pro)o(p)p Fw('s)13 b(tree)g(rewr)q(it)o(in)o(g)g(m)o(ec)o(h)o
3833 (ani)q(sm)c(let)j(us)h(transform)e(a)h(tree)i(in)e(alge)o(braic)g(d)o
3834 (a)o(t)o(a)o(t)o(yp)q(e)g(form)f(in)o(t)o(o)h(anot)n(h)o(er)h(tree)h
3835 (accordin)o(g)0 198 y(t)o(o)e(a)g(s)q(et)h(of)f Fo(r)n(ewriting)f
3836 (rules)p Fw(.)17 b(Unlik)o(e)11 b(plain)g(pa)o(t)n(t)o(er)q(n)i(m)o(a)o
3837 (t)o(c)o(hin)o(g)d(d)o(e)q(scr)q(ib)q(e)q(d)k(in)d(s)q(ect)o(ion)i
3838 (4.3,)e(whic)o(h)h(only)f(ap)o(ply)g(t)o(o)h(t)n(h)o(e)h(ro)q(ot)0
3839 247 y(of)d(a)h(tree,)h(rewr)q(it)o(in)o(g)f(rule)q(s)g(are)h(ap)o
3840 (plica)o(ble)c(t)o(o)j(all)f(part)o(s)i(of)e(t)n(h)o(e)h(tree.)19
3841 b(Thi)q(s)10 b(allo)o(ws)g(t)n(h)o(e)h(us)q(er)h(t)o(o)f(concen)o(tra)o
3842 (t)o(e)h(on)f(d)o(ev)o(elo)o(pin)o(g)0 297 y(t)n(h)o(e)17
3843 b(s)q(et)g(of)e(transform)o(a)o(t)o(ions;)g(t)n(h)o(e)i(act)o(ual)e
3844 (tra)o(v)o(ersal)i(of)e(t)n(h)o(e)i(tree)g(ob)r(ject)g(i)q(s)f(h)o(an)o
3845 (dle)q(d)g(impli)o(cit)n(ly)d(b)o(y)j Fz(Pro)o(p)p Fw(.)25
3846 b(Wh)o(en)16 b(us)q(e)q(d)0 347 y(pro)o(p)q(erly)m(,)c(t)n(hi)q(s)g(m)o
3847 (ec)o(h)o(ani)q(sm)d(h)o(as)k(an)f(adv)n(an)o(t)o(age)f(o)o(v)o(er)i
3848 (plain)d(pa)o(t)n(t)o(er)q(n)j(m)o(a)o(t)o(c)o(hin)o(g)e(s)q(ince)i
3849 (rewr)q(it)o(in)o(g)f(rule)q(s)h(rem)o(ain)e(v)n(alid)g(ev)o(en)0
3850 397 y(wh)o(en)j(a)g(n)o(ew)g(v)n(ar)q(ian)o(t)e(t)o(o)j(a)e(d)o(a)o(t)o
3851 (a)o(t)o(yp)q(e)h(i)q(s)f(in)o(tro)q(d)o(u)o(ce)q(d.)54
3852 459 y(In)g Fz(Pro)o(p)p Fw(,)h(a)f(rewr)q(it)o(in)o(g)h(syst)o(em)f(i)q
3853 (s)g(d)o(ev)o(elo)o(p)q(e)q(d)h(in)g(a)f(s)q(imilar)e(m)o(ann)o(er)i
3854 (as)g(a)h(pars)q(er.)19 b(Th)o(e)14 b(\014rst)g(ph)o(as)q(e)g(require)q
3855 (s)h(t)n(h)o(e)g(us)q(er)0 508 y(t)o(o)f(d)o(e\014n)o(e)q(s)i(a)d
3856 Fo(r)n(ewrite)g(class)h Fw(t)o(o)g(encapsula)o(t)o(e)h(t)n(h)o(e)g
3857 (rewr)q(it)o(in)o(g)f(rule)q(s.)54 570 y(F)m(requen)o(t)n(ly)m(,)d(t)n
3858 (h)o(e)h(rewr)q(it)o(in)o(g)f(m)o(ec)o(h)o(ani)q(sm)d(i)q(s)j(us)q(e)q
3859 (d)h(t)o(o)g(collect)f(inform)o(a)o(t)o(ion)d(a)o(b)q(ou)o(t)j(a)g
3860 (tree)i(stru)o(ct)o(ure;)g(furt)n(h)o(ermore,)f(more)0
3861 620 y(transform)o(a)o(t)o(ion)e(rule)q(s)j(are)g Fo(c)n(onditional)p
3862 Fw(:)18 b(i.e.)f(w)o(e)12 b(w)o(an)o(t)g(t)n(h)o(em)g(t)o(o)g(b)q(e)h
3863 (ap)o(plica)o(ble)d(only)h(if)h(cert)o(ain)h(con)o(dit)o(ions)e(are)i
3864 (sa)o(t)o(i)q(s\014e)q(d.)0 670 y(W)m(e)i(can)h(accompli)q(sh)d(b)q(ot)
3865 n(h)j(of)f(t)n(h)o(e)q(s)q(e)i(t)o(asks)f(b)o(y)f(d)o(e\014nin)o(g)h(d)
3866 o(a)o(t)o(a)f(m)o(em)n(b)q(ers)f(an)o(d)h(m)o(et)n(h)o(o)q(ds)h(in)f(t)
3867 n(h)o(e)h(rewr)q(it)o(in)o(g)f(class.)24 b(Th)o(e)q(s)q(e)0
3868 719 y(are)17 b(acce)q(ss)q(ible)g(d)o(ur)q(in)o(g)f(t)n(h)o(e)i(rewr)q
3869 (it)o(in)o(g)e(pro)q(ce)q(ss.)28 b(Inform)o(a)o(t)o(ion)14
3870 b(collect)o(e)q(d)j(d)o(ur)q(in)o(g)f(rewr)q(it)o(in)o(g)g(can)h(b)q(e)
3871 f(st)o(ore)q(d)i(wit)n(hin)e(t)n(h)o(e)0 769 y(d)o(a)o(t)o(a)e(m)o(em)n
3872 (b)q(ers.)54 831 y(In)20 b(t)n(h)o(e)h(rewr)q(it)o(in)o(g)g(form)o
3873 (alism)o(,)e(equa)o(t)o(ion)o(al)g(rule)q(s)i(of)f(t)n(h)o(e)i(form)c
3874 Fo(lhs)i Fs(->)h Fo(rhs)f Fw(are)h(sp)q(eci\014e)q(d)g(b)o(y)f(t)n(h)o
3875 (e)i(us)q(er.)39 b(Dur)q(in)o(g)0 881 y(pro)q(ce)q(ss)q(in)o(g,)21
3876 b(eac)o(h)e(inst)o(ance)g(of)f(t)n(h)o(e)h(lhs)f(in)g(a)g(complex)f
3877 (tree)i(i)q(s)f(replace)q(d)h(b)o(y)f(an)g(inst)o(ance)h(of)f(t)n(h)o
3878 (e)h(rhs,)h(u)o(n)o(t)o(il)d(no)h(su)o(c)o(h)0 930 y(replacem)o(en)o(t)
3879 f(i)q(s)h(p)q(oss)q(ible.)31 b(Equa)o(t)o(ion)o(al)17
3880 b(rule)q(s)i(can)f(oft)o(en)g(b)q(e)h(us)q(e)q(d)g(t)o(o)f(sp)q(ecify)g
3881 (s)q(em)o(an)o(t)o(ics)f(bas)q(e)q(d)i(s)q(impli\014ca)o(t)o(io)o(n)d
3882 (\(e.g.)0 980 y(const)o(an)o(t)f(foldin)o(g)e(an)o(d)h(s)q(impli\014ca)
3883 o(t)o(i)o(on)e(bas)q(e)q(d)j(on)f(s)q(imple)e(alge)o(braic)i(id)o(en)o
3884 (t)o(it)o(ie)q(s\))h(or)f(transform)o(a)o(t)o(ion\(e.g.)k(co)q(d)o(e)e
3885 (s)q(elect)o(ion)0 1030 y(in)d(a)h(compiler)f(bac)o(k)o(en)o(d[A)o
3886 (GT89)o(]\).)54 1092 y(Unlik)o(e)i(plain)f(pa)o(t)n(t)o(er)q(n)i(m)o(a)
3887 o(t)o(c)o(hin)o(g,)e(h)o(o)o(w)o(ev)o(er,)i(t)n(h)o(e)g(stru)o(ct)o
3888 (ural)h(tra)o(v)o(ersal)e(pro)q(ce)q(ss)j(in)e(rewr)q(it)o(in)o(g)f(i)q
3889 (s)g(implicit)n(l)o(y)e(inferre)q(d)0 1142 y(f)q(rom)f(t)n(h)o(e)i(t)o
3890 (yp)q(e)g(stru)o(ct)o(ure)i(of)d(an)h(alge)o(braic)f(d)o(a)o(t)o(a)o(t)
3891 o(yp)q(e,)h(as)g(sp)q(eci\014e)q(d)h(in)e(it)o(s)i(d)o(e\014nit)o(ion.)
3892 54 1203 y(Th)o(ere)g(are)f(t)o(w)o(o)f(m)o(ain)f(forms)h(of)g(rewr)q
3893 (it)o(in)o(g)h(mo)q(d)o(e)q(s)f(a)o(v)n(aila)o(ble:)62
3894 1298 y Fi(\017)21 b Fw(Th)o(e)12 b(\014rst)h(i)q(s)f
3895 Fu(norm)o(aliza)o(t)o(i)o(on)c Fw(mo)q(d)o(e:)17 b(a)11
3896 b(giv)o(en)h(tree)h(i)q(s)f(re)q(d)o(u)o(ce)q(d)h(us)q(in)o(g)f(t)n(h)o
3897 (e)h(m)o(a)o(t)o(c)o(hin)o(g)d(rule)q(s)j(u)o(n)o(t)o(il)f(no)f(more)g
3898 (re)q(d)o(exe)q(s)104 1348 y(are)j(a)o(v)n(aila)o(ble.)h(Th)o(ere)g
3899 (are)g(t)o(w)o(o)e(mo)q(d)o(e)q(s)h(of)f(o)o(p)q(era)o(t)o(ions)g(a)o
3900 (v)n(aila)o(ble:)150 1431 y Fu({)21 b Fw(in)14 b Fu(rep)o(lacem)o(en)o
3901 (t)c Fw(mo)q(d)o(e,)j(t)n(h)o(e)i(re)q(d)o(ex)g(of)e(a)h(tree)h(will)e
3902 (b)q(e)g(ph)o(ys)q(ically)g(o)o(v)o(erwr)q(it)n(t)o(en.)150
3903 1497 y Fu({)21 b Fw(in)13 b Fu(ap)o(p)o(lica)o(t)o(i)o(v)o(e)d
3904 Fw(mo)q(d)o(e,)i(on)h(t)n(h)o(e)h(ot)n(h)o(er)h(h)o(an)o(d,)d(a)h(n)o
3905 (ew)g(tree)i(corre)q(sp)q(on)o(din)o(g)g(t)o(o)e(t)n(h)o(e)h(replacem)o
3906 (en)o(t)f(v)n(alue)f(will)g(b)q(e)195 1547 y(constru)o(ct)o(e)q(d.)104
3907 1630 y(Replacem)o(en)o(t)g(mo)q(d)o(e)h(i)q(s)h(us)q(e)q(d)g(as)g(t)n
3908 (h)o(e)h(d)o(ef)q(a)n(ul)o(t)f(s)q(ince)h(it)e(i)q(s)g(usually)g(t)n(h)
3909 o(e)i(more)e(e\016cien)o(t)h(of)f(t)n(h)o(e)i(t)o(w)o(o.)62
3910 1713 y Fi(\017)21 b Fw(Th)o(e)d(s)q(econ)o(d)g(form)e(i)q(s)h
3911 Fu(re)q(d)o(u)o(ct)o(ion)d Fw(an)o(d)j Fu(transform)o(a)o(t)o(i)o(on)o
3912 Fw(.)26 b(In)18 b(t)n(hi)q(s)f(mo)q(d)o(e)g(a)g(tree)i(pars)q(e)g(of)e
3913 (t)n(h)o(e)h(inpu)o(t)g(t)o(erm)f(i)q(s)104 1763 y(compu)o(t)o(e)q(d.)g
3914 (If)c(cost)h(fu)o(nct)o(ions)f(are)g(a)o(t)n(t)o(ac)o(h)o(e)q(d)g(t)o
3915 (o)g(t)n(h)o(e)h(rule)q(s,)f(t)n(h)o(en)g(t)n(h)o(ey)h(will)d(also)h(b)
3916 q(e)h(us)q(e)q(d)g(t)o(o)g(d)o(et)o(ermin)o(e)g(a)f(minim)o(a)o(l)104
3917 1813 y(cost)h(re)q(d)o(u)o(ct)o(ion)f(s)q(equence.)19
3918 b(Dur)q(in)o(g)12 b(t)n(hi)q(s)f(pro)q(ce)q(ss)j(a)o(t)n(t)o(ac)o(h)o
3919 (e)q(d)f(act)o(ions)f(of)f(a)g(rule)i(m)o(ay)d(b)q(e)h(in)o(v)o(ok)o(e)
3920 q(d)g(t)o(o)i(syn)o(t)n(h)o(e)q(s)q(ize)g(n)o(ew)104
3921 1863 y(d)o(a)o(t)o(a.)54 1957 y(Eac)o(h)h(in)o(d)o(ep)q(en)o(d)o(en)o
3922 (t)i(s)q(et)f(of)f(rewr)q(it)o(in)o(g)g(rule)q(s)h(in)f
3923 Fz(Pro)o(p)h Fw(i)q(s)e(encapsula)o(t)o(e)q(d)j(in)e(it)o(s)h(o)o(wn)f
3924 Fu(rewr)q(it)o(e)g(clas)q(s)p Fw(.)19 b(A)14 b(rewr)q(it)o(e)h(class)0
3925 2007 y(i)q(s)h(bas)q(ically)g(a)g(norm)o(al)f(C)p Fs(++)i
3926 Fw(class)h(wit)n(h)f(a)f(s)q(et)i(of)e(rewr)q(it)o(in)o(g)h(rule)q(s)h
3927 (a)o(t)n(t)o(ac)o(h)o(e)q(d.)28 b(Dur)q(in)o(g)17 b(rewr)q(it)o(in)o
3928 (g,)g(t)n(h)o(e)h(d)o(a)o(t)o(a)f(m)o(em)n(b)q(ers)0
3929 2057 y(an)o(d)g(t)n(h)o(e)h(m)o(em)n(b)q(er)e(fu)o(nct)o(ions)i(are)g
3930 (vi)q(s)q(ible)d(accordin)o(g)j(t)o(o)g(t)n(h)o(e)g(norm)o(al)d(C)p
3931 Fs(++)i Fw(sco)o(pin)o(g)h(rule)q(s.)30 b(Thi)q(s)17
3932 b(m)o(ak)o(e)q(s)f(it)h(i)q(s)g(easy)i(t)o(o)0 2107 y(encapsula)o(t)o
3933 (e)c(addit)o(ion)o(al)d(d)o(a)o(t)o(a)i(compu)o(t)o(e)q(d)g(as)g(a)f(s)
3934 q(id)o(e)h(e\013ect)i(d)o(ur)q(in)o(g)d(t)n(h)o(e)i(rewr)q(it)o(in)o(g)
3935 f(pro)q(ce)q(ss.)0 2235 y FF(6.1)56 b(A)19 b(rewr)q(it)n(in)o(g)f
3936 (examp)o(le)0 2323 y Fw(Cons)q(id)o(er)d(an)e(a)o(bbrevia)o(t)o(e)q(d)i
3937 (s)q(impli)o(\014er)d(for)i(t)n(h)o(e)h(w)o(ell-form)o(e)q(d)d(form)n
3938 (ula)g(d)o(a)o(t)o(a)o(t)o(yp)q(e)i Fs(Wff)f Fw(d)o(e\014n)o(e)q(d)j
3939 (in)d(t)n(h)o(e)i(s)q(ect)o(ion)g(4.1.2.)i(Th)o(e)0 2373
3940 y(rewr)q(it)o(e)e(class)h(for)f(t)n(hi)q(s)g(can)g(b)q(e)g(d)o(e\014n)o
3941 (e)q(d)i(as)e(follo)o(ws.)k(Since)c(t)n(h)o(ere)i(i)q(s)d(no)h
3942 (encapsula)o(t)o(e)q(d)i(d)o(a)o(t)o(a)e(in)f(t)n(hi)q(s)h(example,)e
3943 (only)h(t)n(h)o(e)0 2423 y(d)o(ef)q(a)n(ul)o(t)g(constru)o(ct)o(or)h
3944 (for)f(t)n(h)o(e)g(class)g(n)o(ee)q(ds)h(t)o(o)f(b)q(e)f(d)o(e\014n)o
3945 (e)q(d.)19 b(A)14 b(rewr)q(it)o(e)g(class)g(d)o(e\014nit)o(ion)g
3946 (require)q(s)g(t)n(h)o(e)h(tra)o(v)o(ersal)e(li)q(st)g(t)o(o)h(b)q(e)0
3947 2473 y(sp)q(eci\014e)q(d.)23 b(Thi)q(s)15 b(i)q(s)f(s)q(imply)e(a)j(li)
3948 q(st)g(of)f(d)o(a)o(t)o(a)o(t)o(yp)q(e)q(s)i(in)o(v)o(olv)o(e)q(d)d(in)
3949 i(t)n(h)o(e)h(rewr)q(it)o(in)o(g)f(tra)o(v)o(ersal)g(pro)q(ce)q(ss.)25
3950 b(In)15 b(t)n(hi)q(s)g(inst)o(ance)h(only)0 2523 y Fs(Wff)d
3951 Fw(i)q(s)h(n)o(ee)q(d)o(e)q(d.)65 2626 y Fs(rewrite)21
3952 b(class)f(Simplify)h(\(Wff\))p eop
3953 %%Page: 36 37
3954 36 36 bop 0 -82 1981 3 v 0 -100 a Fq(6.)16 b Fp(Tree)k(Rewriting)1484
3955 b Fw(36)65 45 y Fs({)65 95 y(public:)131 145 y(Simplify\(\))19
3956 b({})65 195 y(};)54 294 y Fw(Th)o(e)13 b(rewr)q(it)o(e)h(rule)q(s)g
3957 (for)e(t)n(h)o(e)i(s)q(impli\014er)d(can)i(t)n(h)o(en)h(b)q(e)f(sp)q
3958 (eci\014e)q(d)i(su)o(ccinct)n(ly)f(as)f(follo)o(ws.)j(Lik)o(e)c(t)n(h)o
3959 (e)i Fs(match)e Fw(st)o(a)o(t)o(em)o(en)o(t,)g(in)0 344
3960 y(gen)o(eral)h(t)n(h)o(e)g(rhs)g(of)f(a)g(rewr)q(it)o(e)h(rule)g(can)g
3961 (b)q(e)f(an)o(y)g(st)o(a)o(t)o(em)o(en)o(t.)17 b(A)c(sp)q(ecial)f(st)o
3962 (a)o(t)o(em)o(en)o(t)g Fs(rewrite\(e\))e Fw(can)j(b)q(e)f(us)q(e)q(d)i
3963 (t)o(o)e(rewr)q(it)o(e)0 394 y(t)n(h)o(e)j(curren)o(t)g(re)q(d)o(ex)h
3964 (in)o(t)o(o)d(anot)n(h)o(er)i(form.)i(If)c(t)n(h)o(e)i(rhs)g(i)q(s)e
3965 (of)h(t)n(h)o(e)h(form)d Fs(rewrite\(e\))p Fw(,)f(t)n(h)o(en)k(it)f
3966 (can)g(b)q(e)g(a)o(bbrevia)o(t)o(e)q(d)g(t)o(o)h Fs(e)p
3967 Fw(,)e(as)0 444 y(in)g(b)q(elo)o(w:)65 536 y Fs(rewrite)21
3968 b(Simplify)65 585 y({)44 b(And\(F,)e(_\):)130 b(F)65
3969 635 y(|)44 b(And\(_,)e(F\):)130 b(F)65 685 y(|)44 b(And\(T,)e(?X\):)108
3970 b(?X)65 735 y(|)44 b(And\(?X,)20 b(T\):)130 b(?X)65 785
3971 y(|)44 b(Or)21 b(\(T,)43 b(_\):)130 b(T)65 835 y(|)44
3972 b(Or)21 b(\(_,)43 b(T\):)130 b(T)65 884 y(|)44 b(Or)21
3973 b(\(F,)43 b(?X\):)108 b(?X)65 934 y(|)44 b(Or)21 b(\(?X,)g(F\):)130
3974 b(?X)65 984 y(|)44 b(Not\(Not\(?X\)\):)84 b(?X)65 1034
3975 y(|)44 b(Not\(And\(?X,?Y\)\):)18 b(Or\(Not\(?X\),)i(Not\(?Y\)\))65
3976 1084 y(|)44 b(Not\(Or\(?X,?Y\)\):)c(And\(Not\(?X\),)20
3977 b(Not\(?Y\)\))65 1133 y(|)44 b(Implies\(?X,?Y\):)c(Or\(Not\(?X\),)20
3978 b(?Y\))65 1183 y(|)44 b(And)21 b(\(?X,)g(?X\):)108 b(?X)65
3979 1233 y(|)44 b(Or)21 b(\(?X,)g(?X\):)130 b(?X)65 1283
3980 y(//)22 b(etc)f(...)65 1333 y(};)54 1425 y Fw(Th)o(e)f(rewr)q(it)o(e)g
3981 (class)h(d)o(e\014nit)o(ion)f(crea)o(t)o(e)q(s)i(a)e(n)o(ew)g(class)h
3982 (of)e(t)n(h)o(e)i(sam)o(e)e(n)o(am)o(e.)34 b(Thi)q(s)20
3983 b(n)o(ew)g(class)h(d)o(e\014n)o(e)q(s)h(an)d(implicit)0
3984 1475 y Fs(operator)h(\(\))c Fw(wit)n(h)h(t)n(h)o(e)h(prot)o(o)q(col)e
3985 (b)q(elo)o(w.)26 b(Thi)q(s)16 b(m)o(em)n(b)q(er)f(fu)o(nct)o(ion)h(can)
3986 h(b)q(e)g(in)o(v)o(ok)o(e)q(d)f(t)o(o)h(p)q(erform)f(t)n(h)o(e)h(rewr)q
3987 (it)o(in)o(g)g(in)f(a)0 1524 y(fu)o(nct)o(ion)o(al)d(syn)o(t)o(ax.)65
3988 1624 y Fs(class)21 b(Simplify)f(:)i(...)f({)65 1674 y({)44
3989 b(...)65 1724 y(public:)131 1773 y(void)21 b(operator)f(\(\))h
3990 (\(Wff\);)131 1823 y(//)g(Wff)g(operator)f(\(\))i(\(Wff\);)e(//)i(if)f
3991 (rewrite)f(class)h(is)h(applicative)65 1873 y(};)65 1973
3992 y(Wff)g(wff)f(=)g(...;)65 2023 y(Simplify)g(simplify;)e(//)j(create)e
3993 (a)i(new)f(instance)f(of)i(the)f(rewrite)f(class)65 2072
3994 y(simplify\(wff\);)85 b(//)21 b(rewrite)f(the)i(term)f(wff)0
3995 2191 y Fu(6.1.1)48 b(Con)o(dit)o(ion)n(al)12 b(rewr)q(it)o(in)o(g)h(an)
3996 o(d)i(act)o(ions)0 2280 y Fw(Rewr)q(it)o(in)o(g)f(rule)q(s)j(m)o(ay)c
3997 (b)q(e)i(guard)o(e)q(d)h(wit)n(h)g(pre)q(dica)o(t)o(e)q(s)g(t)o(o)g
3998 (limit)c(t)n(h)o(e)q(ir)k(ap)o(plica)o(bilit)o(y)m(.)j(In)c(addit)o
3999 (ion,)f(t)n(h)o(e)i Fo(rhs)f Fw(of)f(a)h(rewr)q(it)o(e)0
4000 2330 y(rule)e(i)q(s)f(not)h(limit)o(e)q(d)d(t)o(o)j(only)f(a)h
4001 (replacem)o(en)o(t)f(expre)q(ss)q(ion:)18 b(in)13 b(gen)o(eral,)f(an)o
4002 (y)h(arbitrar)q(ily)e(complex)g(s)q(equence)k(of)d(co)q(d)o(e)i(m)o(ay)
4003 0 2380 y(b)q(e)e(us)q(e)q(d.)18 b(F)m(or)11 b(example,)f(in)i(t)n(h)o
4004 (e)g(follo)o(win)o(g)d(s)q(et)k(of)e(rewr)q(it)o(in)o(g)g(rule)q(s)i(w)
4005 o(e)f(us)q(e)g(guards)g(t)o(o)g(prev)o(en)o(t)h(u)o(n)o(d)o(e)q(s)q
4006 (ira)o(ble)f(replacem)o(en)o(t)o(s)0 2429 y(t)o(o)i(b)q(e)g(m)o(ad)o(e)
4007 f(d)o(ur)q(in)o(g)h(expre)q(ss)q(ion)h(const)o(an)o(t)f(foldin)o(g:)65
4008 2529 y Fs(rewrite)21 b(ConstantFolding)65 2579 y({)44
4009 b(ADD)21 b(\(INT)g(a,)g(INT)g(b\):)43 b(INT\(a+b\))65
4010 2629 y(|)h(SUB)21 b(\(INT)g(a,)g(INT)g(b\):)43 b(INT\(a-b\))p
4012 %%Page: 37 38
4013 37 37 bop 0 -82 1981 3 v 0 -100 a Fq(6.)22 b Fp(Tree)d(Rewriting)1479
4014 b Fw(37)65 45 y Fs(|)44 b(MUL)21 b(\(INT)g(a,)g(INT)g(b\):)131
4015 95 y({)43 b(int)21 b(c)h(=)f(a)h(*)g(b;)479 b(//)21 b(silent)g
4016 (overflow)196 145 y(if)h(\(a)f(==)g(0)h(||)f(b)h(==)f(0)h(||)f(c)h(/)f
4017 (b)h(==)f(a\))h(//)f(no)g(overflow?)196 195 y({)44 b
4018 (rewrite\(INT\(c\)\))o(;)19 b(})196 244 y(else)196 294
4019 y({)44 b(cerr)20 b(<<)i("Overflow)e(in)h(multiply\\n";)e(})131
4020 344 y(})65 394 y(|)44 b(DIV)21 b(\(INT)g(a,)g(INT)g(b\))h(|)f(b)h(==)f
4021 (0:)44 b({)21 b(cerr)g(<<)g("Division)f(by)i(zero\\n";)e(})65
4022 444 y(|)44 b(DIV)21 b(\(INT)g(a,)g(INT)g(b\):)43 b(INT\(a/b\))65
4023 493 y(|)h(//)21 b(etc...)65 543 y(};)0 670 y FF(6.2)56
4024 b(Rewr)q(it)n(e)17 b(clas)q(s)0 759 y Fw(Th)o(e)d(syn)o(t)o(ax)g(of)f
4025 (a)h(rewr)q(it)o(e)g(class)h(d)o(eclara)o(t)o(ion)e(i)q(s)h(as)g(follo)
4026 o(ws:)129 852 y Fo(R)n(ewrite)p 271 852 13 2 v 14 w(Class)p
4027 381 852 V 15 w(De)n(cl)49 b Fu(::=)i Fs(rewrite)20 b(class)13
4028 b Fo(Id)h Fs(\()g Fo(T)m(yp)n(eExp)p Fs(,)g Ft(:)7 b(:)g(:)12
4029 b Fs(,)i Fo(T)m(yp)n(eExp)g Fs(\))675 902 y Fo([)h Fs(:)k
4030 Fo(Inherit)p 871 902 V 15 w(List)14 b(])g([)g Fs(::)19
4031 b Fo(R)n(ewrite)p 1226 902 V 14 w(Mo)n(de)d Ft(:)7 b(:)g(:)28
4032 b Fo(R)n(ewrite)p 1569 902 V 14 w(Mo)n(de)16 b(])675
4033 952 y Fi(f)e Fo(Class)p 809 952 V 15 w(Bo)n(dy)g Fi(g)g
4034 Fs(;)129 1002 y Fo(R)n(ewrite)p 271 1002 V 14 w(Mo)n(de)142
4035 b Fu(::=)51 b Fs(treeparser)553 1052 y Fi(j)69 b Fs(applicative)553
4036 1101 y Fi(j)g Fs(topdown)54 1196 y Fw(Thi)q(s)13 b(i)q(s)g(s)q(imply)e
4037 (t)n(h)o(e)k(usual)e(C)p Fs(++)h Fw(class)h(d)o(eclara)o(t)o(ion)e(syn)
4038 o(t)o(ax)h(ext)o(en)o(d)o(e)q(d)h(t)o(o)g(t)n(h)o(e)f(follo)o(win)o(g)d
4039 (inform)o(a)o(t)o(ion:)0 1286 y Fu(a)16 b(tra)o(v)o(ersal)e(li)q(st)19
4040 b Fw(enclos)q(e)q(d)g(in)e(paren)o(t)n(h)o(e)q(s)q(i)q(s.)31
4041 b(Th)o(e)18 b(tra)o(v)o(ersal)g(li)q(st)f(of)h(a)f(rewr)q(it)o(e)i
4042 (class)f(d)o(e\014n)o(e)q(s)i(t)n(h)o(e)f(s)q(et)f(of)f(t)o(yp)q(e)q(s)
4043 i(t)n(h)o(a)o(t)104 1336 y(rewr)q(it)o(in)o(g)13 b(sh)o(ould)g(tra)o(v)
4044 o(ers)q(e.)19 b(If)13 b(a)f(d)o(a)o(t)o(a)o(t)o(yp)q(e)h(ob)r(ject)h
4045 (con)o(t)o(ains)f(an)g(argu)o(m)o(en)o(t)f(of)g(a)h(t)o(yp)q(e)g(not)g
4046 (li)q(st)o(e)q(d)g(in)g(t)n(h)o(e)h(tra)o(v)o(ersal)104
4047 1385 y(li)q(st,)e(it)o(s)j(v)n(alue)e(will)f(not)i(b)q(e)g(al)o(t)o
4048 (ere)q(d.)0 1466 y Fu(rewr)q(it)o(e)g(mo)q(d)o(e)20 b
4049 Fw(t)n(hi)q(s)14 b(d)o(e\014n)o(e)q(s)h(t)n(h)o(e)g(rewr)q(it)o(in)o(g)
4050 f(mo)q(d)o(e)f(of)g(t)n(h)o(e)i(rewr)q(it)o(e)f(class.)0
4051 1593 y FF(6.3)56 b(Rewr)q(it)n(in)o(g)18 b(rule)r(s)0
4052 1681 y Fw(Rewr)q(it)o(in)o(g)13 b(rule)q(s)i(are)f(sp)q(eci\014e)q(d)h
4053 (in)e(a)h(rewr)q(it)o(e)g(d)o(eclara)o(t)o(ion.)k(Th)o(e)c(syn)o(t)o
4054 (ax)g(of)f(a)h(rewr)q(it)o(in)o(g)g(sp)q(eci\014ca)o(t)o(ion)g(i)q(s)f
4055 (as)h(follo)o(ws:)129 1775 y Fo(R)n(ewrite)p 271 1775
4056 V 14 w(De)n(cl)122 b Fu(::=)50 b Fs(rewrite)13 b Fo(Id)985
4057 b Fw(v)n(ar)q(ian)o(t)13 b(1)595 1825 y Fi(f)h Fo([)h(Index)p
4058 759 1825 V 16 w(De)n(cl)g(])e Fs(case)g Fo(R)n(ewrite)p
4059 1134 1825 V 14 w(R)o(ules)28 b Ft(:)7 b(:)g(:)26 b Fs(case)13
4060 b Fo(R)n(ewrite)p 1590 1825 V 15 w(R)o(ules)h Fi(g)515
4061 1875 y(j)68 b Fs(rewrite)13 b Fo(Id)985 b Fw(v)n(ar)q(ian)o(t)13
4062 b(2)595 1924 y Fi(f)h Fo([)h(Index)p 759 1924 V 16 w(De)n(cl)g(])e(R)n
4063 (ewrite)p 1033 1924 V 14 w(R)o(ules)h Fs(|)g Ft(:)7 b(:)g(:)12
4064 b Fs(|)i Fo(R)n(ewrite)p 1432 1924 V 14 w(R)o(ules)g
4065 Fi(g)129 1974 y Fo(R)n(ewrite)p 271 1974 V 14 w(R)o(ule)119
4066 b Fu(::=)50 b Fo([)15 b(R)n(ewrite)p 765 1974 V 14 w(Mo)n(di\014er)g(])
4067 f([)g(Id)h Fs(->)g Fo(])637 2024 y(Pat)f([)g(Guar)n(d)i(])d([)i(Cost)f
4068 (])g Fs(:)k Fo(R)n(ewrite)p 1228 2024 V 14 w(A)n(ction)129
4069 2074 y(R)n(ewrite)p 271 2074 V 14 w(Mo)n(di\014er)50
4070 b Fu(::=)g Fs(bottomup:)991 b Fw(b)q(ot)n(t)o(om)14 b(up)f(mo)q(d)o(e)
4071 515 2124 y Fi(j)68 b Fs(topdown:)1013 b Fw(t)o(o)o(p)14
4072 b(do)o(wn)g(mo)q(d)o(e)515 2173 y Fi(j)68 b Fs(before:)1035
4073 b Fw(b)q(efore)14 b(act)o(ions)515 2223 y Fi(j)68 b Fs(preorder:)991
4074 b Fw(preord)o(er)16 b(act)o(ions)515 2273 y Fi(j)68 b
4075 Fs(postorder:)969 b Fw(p)q(ost)o(ord)o(er)17 b(act)o(ions)129
4076 2323 y Fo(R)n(ewrite)p 271 2323 V 14 w(A)n(ction)81 b
4077 Fu(::=)50 b Fi(f)14 b Fo(Co)n(de)g Fi(g)515 2373 y(j)68
4078 b Fo(Exp)54 2467 y Fw(Th)o(e)16 b(n)o(am)o(e)f(of)h(a)g(rewr)q(it)o(e)h
4079 (d)o(eclara)o(t)o(ion)f(sh)o(ould)g(m)o(a)o(t)o(c)o(h)f(t)n(h)o(e)j(n)o
4080 (am)o(e)d(of)g(a)h(rewr)q(it)o(e)h(class.)27 b(Th)o(e)16
4081 b(t)o(w)o(o)g(syn)o(t)o(act)o(ic)h(forms)e(of)0 2517
4082 y Fs(rewrite)d Fw(h)o(a)o(v)o(e)i(equiv)n(alen)o(t)f(s)q(em)o(an)o(t)o
4083 (ics.)54 2579 y(Th)o(e)k(sp)q(ecial)f(st)o(a)o(t)o(em)o(en)o(t)g
4084 Fs(rewrite)p Fw(\()p Ft(e)p Fw(\))g(m)o(ay)f(b)q(e)i(us)q(e)q(d)h(ins)q
4085 (id)o(e)e(t)n(h)o(e)i(rhs)f(act)o(ion)f(t)o(o)i(rewr)q(it)o(e)f(t)n(h)o
4086 (e)g(curren)o(t)h(re)q(d)o(ex)h(in)o(t)o(o)d Ft(e)p Fw(.)0
4087 2629 y(Not)o(e)e(t)n(h)o(a)o(t)g Fs(rewrite)p Fw(\()p
4088 Ft(e)p Fw(\))f(i)q(s)g(a)h(branc)o(hin)o(g)g(st)o(a)o(t)o(em)o(en)o(t;)
4089 f(st)o(a)o(t)o(em)o(en)o(t)o(s)h(aft)o(er)g Fs(rewrite)e
4090 Fw(are)j(not)f(reac)o(h)o(a)o(ble.)p eop
4091 %%Page: 38 39
4092 38 38 bop 0 -82 1981 3 v 0 -100 a Fq(6.)16 b Fp(Tree)k(Rewriting)1484
4093 b Fw(38)0 45 y FF(6.4)56 b(Rewr)q(it)n(in)o(g)18 b(mo)r(di\014ers)0
4094 134 y Fw(In)h(v)o(ers)q(ion)g(2.3.3)e(on)o(w)o(ard,)i(rewr)q(it)o(e)g
4095 (rule)q(s)h(can)f(b)q(e)g(mo)q(di\014e)q(d)f(b)o(y)g(t)n(h)o(e)i(k)o
4096 (eyw)o(ords:)28 b Fs(bottomup:)p Fw(,)18 b Fs(topdown:)p
4097 Fw(,)g Fs(before:)p Fw(,)0 183 y Fs(preorder:)f Fw(an)o(d)c
4098 Fs(postorder:)p Fw(.)j(Th)o(e)q(s)q(e)f(mo)q(di\014ers)e(al)o(t)o(er)i
4099 (t)n(h)o(e)f(ord)o(er)h(in)f(whic)o(h)f(a)h(s)q(et)h(of)e(rewr)q(it)o
4100 (in)o(g)h(rule)q(s)g(i)q(s)g(ap)o(plie)q(d.)54 245 y(Th)o(e)q(s)q(e)k
4101 (mo)q(di\014ers)f(act)h(lik)o(e)f(d)o(elimit)o(ers,)g(s)q(imilar)d(t)o
4102 (o)k(t)n(h)o(e)g(w)o(ay)f(sco)o(pin)o(g)h(k)o(eyw)o(ords)g(lik)o(e)e
4103 Fs(public:)p Fw(,)h Fs(protected:)23 b Fw(an)o(d)0 295
4104 y Fs(private:)k Fw(are)19 b(us)q(e)q(d)h(t)o(o)f(d)o(elimit)e(d)o
4105 (eclara)o(t)o(ions)i(in)f(C++.)34 b(F)m(or)18 b(inst)o(ance,)j(a)d(s)q
4106 (et)i(of)e(rule)q(s)i(pre\014xe)q(d)g(b)o(y)e(t)n(h)o(e)i(mo)q
4107 (di\014er)0 345 y Fs(topdown:)d Fw(will)12 b(u)o(t)o(ilize)i(t)n(h)o(e)
4108 h(t)o(o)o(p)q(do)o(wn)f(stra)o(t)o(egy)g(for)g(re)q(d)o(u)o(ct)o(ion.)k
4109 (If)c(no)g(mo)q(di\014er)f(are)h(sp)q(eci\014e)q(d,)g(t)n(h)o(en)h(b)q
4110 (ot)n(t)o(om-up)e(will)g(b)q(e)0 394 y(t)n(h)o(e)i(d)o(ef)q(a)n(ul)o
4111 (t.)54 456 y(Not)o(e)e(t)n(h)o(a)o(t)h(all)e(\014v)o(e)h(mo)q(d)o(e)q
4112 (s)g(of)g(rule)q(s)h(can)f(b)q(e)h(us)q(e)q(d)g(t)o(oget)n(h)o(er)h(in)
4113 e(a)g(rewr)q(it)o(in)o(g)g(syst)o(em)g(u)o(n)o(d)o(er)i(tree)f(rewr)q
4114 (it)o(in)o(g)f(mo)q(d)o(e)g(\(s)q(ee)0 506 y(6.5.1\))f(an)o(d)i(t)n(h)o
4115 (e)q(ir)g(execu)o(t)o(ions)i(are)e(in)o(t)o(ermixe)q(d)f(t)o(oget)n(h)o
4116 (er.)54 567 y(Th)o(e)h(s)q(em)o(an)o(t)o(ics)f(of)g(t)n(h)o(e)q(s)q(e)i
4117 (mo)q(di\014ers)f(are)g(as)g(follo)o(ws:)0 662 y Fs(bottomup:)19
4118 b Fw(Thi)q(s)c(sp)q(eci\014e)q(s)j(t)n(h)o(e)f(mo)q(di\014e)q(d)d(rewr)
4119 q(it)o(in)o(g)i(rule)q(s)h(sh)o(ould)f(b)q(e)g(ap)o(plie)q(d)f(in)h(t)n
4120 (h)o(e)g(d)o(ef)q(a)n(ul)o(t)h(b)q(ot)n(t)o(om-up)e(mo)q(d)o(e.)24
4121 b(In)104 712 y(t)n(hi)q(s)13 b(mo)q(d)o(e,)f(t)n(h)o(e)i(inn)o
4122 (ermost/left)o(most)e(re)q(d)o(ex)j(i)q(s)d(c)o(h)o(os)q(en)j(as)e(t)n
4123 (h)o(e)h(n)o(ext)g(re)q(d)o(ex.)19 b(So)13 b(re)q(d)o(u)o(ct)o(ion)h(o)
4124 q(ccurs)g(in)f(a)g(b)q(ot)n(t)o(om)n(up)104 762 y(m)o(ann)o(er.)22
4125 b(Thi)q(s)15 b(m)o(eans)g(t)n(h)o(a)o(t)h(if)e(a)i(t)o(erm)f
4126 Ft(t)g Fw(i)q(s)g(a)g(re)q(d)o(ex)i(an)o(d)f(if)e(t)n(h)o(e)j(t)o(erm)d
4127 Ft(t)i Fw(con)o(t)o(ains)f(a)g(su)n(bt)o(erm)h Ft(t)1683
4128 747 y Fd(0)1710 762 y Fw(whic)o(h)f(i)q(s)g(also)g(a)104
4129 812 y(re)q(d)o(ex,)g Ft(t)243 797 y Fd(0)268 812 y Fw(will)e(b)q(e)h
4130 (re)q(d)o(u)o(ce)q(d)h(b)q(efore)f Ft(t)p Fw(.)0 895
4131 y Fs(topdown:)19 b Fw(Thi)q(s)13 b(sp)q(eci\014e)q(s)i(t)n(h)o(e)f(mo)q
4132 (di\014e)q(d)e(rewr)q(it)o(in)o(g)h(rule)q(s)h(sh)o(ould)f(b)q(e)h(ap)o
4133 (plie)q(d)e(in)h(a)g(t)o(o)o(p)q(do)o(wn)g(mo)q(d)o(e.)k(In)d(t)n(hi)q
4134 (s)f(mo)q(d)o(e,)f(t)n(h)o(e)104 945 y(rewr)q(it)o(er)g(will)e(\014rst)
4135 j(try)f(t)o(o)g(lo)q(ca)o(t)o(e)f(t)n(h)o(e)i(ou)o(t)o(ermost/left)o
4136 (most)e(re)q(d)o(ex.)18 b(Re)q(d)o(u)o(ct)o(ion)12 b(will)e(o)q(ccur)i
4137 (in)g(a)f(\(most)n(ly\))g(t)o(o)o(p)q(do)o(wn)104 994
4138 y(m)o(ann)o(er.)0 1077 y Fs(before:)19 b Fw(Thi)q(s)10
4139 b(sp)q(eci\014e)q(s)j(t)n(h)o(a)o(t)d(t)n(h)o(e)i(mo)q(di\014e)q(d)d
4140 (rewr)q(it)o(in)o(g)i(rule)q(s)g(sh)o(ould)g(b)q(e)g(tr)q(ie)q(d)g(b)q
4141 (efore)g(t)n(h)o(e)g(t)o(o)o(p)q(do)o(wn)g(ph)o(as)q(e.)17
4142 b(In)11 b(addit)o(ion,)104 1127 y(u)o(nlik)o(e)i(t)o(o)o(p)q(do)o(wn)g
4143 (mo)q(d)o(e,)g(if)f(st)o(a)o(t)o(e-cac)o(hin)o(g)i(if)f(us)q(e)q(d)h
4144 (\(s)q(ee)h(6.5.2\),)c(t)n(h)o(e)j(rule)q(s)h(are)e(only)g(tr)q(ie)q(d)
4145 h(once.)k(Ot)n(h)o(erwi)q(s)q(e,)c(t)n(h)o(e)q(s)q(e)104
4146 1177 y(act)g(just)g(lik)o(e)f(t)n(h)o(e)i(preord)o(er)h(mo)q(di\014er,)
4147 c(d)o(e)q(scr)q(ib)q(e)q(d)j(b)q(elo)o(w.)0 1260 y Fs(preorder:)k
4148 Fw(Thi)q(s)13 b(sp)q(eci\014e)q(s)j(t)n(h)o(a)o(t)e(t)n(h)o(e)h(mo)q
4149 (di\014e)q(d)e(rewr)q(it)o(in)o(g)h(rule)q(s)g(sh)o(ould)g(b)q(e)g(tr)q
4150 (ie)q(d)h(only)e(a)o(t)h(t)n(h)o(e)g(preord)o(er)i(tra)o(v)o(ersal)f
4151 (of)e(a)104 1310 y(t)o(erm.)0 1393 y Fs(postorder:)19
4152 b Fw(Thi)q(s)13 b(sp)q(eci\014e)q(s)i(t)n(h)o(e)g(rewr)q(it)o(in)o(g)f
4153 (rule)q(s)g(sh)o(ould)g(b)q(e)g(tr)q(ie)q(d)g(only)f(a)o(t)h(t)n(h)o(e)
4154 h(p)q(ost)o(ord)o(er)h(tra)o(v)o(ersal)e(of)g(a)f(t)o(erm.)0
4155 1513 y Fu(6.4.1)48 b(Rewr)q(it)o(in)o(g)13 b(mo)q(di\014er)h(examp)o
4156 (le)0 1601 y Fw(W)m(e'll)h(us)q(e)i(t)n(h)o(e)g(follo)o(win)o(g)c
4157 (example,)i(extract)o(e)q(d)j(f)q(rom)c(a)i(query)h(o)o(pt)o(imizer)e
4158 (for)h(a)g(su)n(bs)q(et)i(of)e(t)n(h)o(e)h(rela)o(t)o(ion)o(al)e
4159 (calculus,)i(t)o(o)0 1651 y(d)o(emonstra)o(t)o(e)d(t)n(h)o(e)h(us)q(e)f
4160 (of)f(t)n(h)o(e)i(rewr)q(it)o(in)o(g)f(mo)q(di\014ers.)54
4161 1712 y(Th)o(e)g(query)g(o)o(pt)o(imizer)f(transforms)g(t)n(h)o(e)i
4162 (follo)o(win)o(g)c(a)o(bstract)k(syn)o(t)o(ax,)e(d)o(e\014n)o(e)q(d)i
4163 (as)f(a)g(s)q(et)h(of)e Fz(Pro)o(p)p Fw('s)h(d)o(a)o(t)o(a)o(t)o(yp)q
4164 (e)q(s.)0 1807 y Fs(datatype)20 b(List<T>)g(=)i(#[])f(|)h(#[)f(T)h(...)
4165 f(List<T>)f(];)0 1857 y(datatype)g(Literal)g(=)i(INT)f(int)370
4166 1907 y(|)h(STRING)f(const)f(char)h(*)370 1957 y(|)h(BOOL)f(Bool)0
4167 2056 y(and)130 b(Exp)108 b(=)22 b(OP)f(Id,)h(Exps)370
4168 2106 y(|)g(APP)f(Id,)g(Exps)370 2156 y(|)h(LIT)f(Literal)370
4169 2206 y(|)h(ID)f(Id)370 2256 y(|)h(TUPLE)f(Exps)391 b(//)22
4170 b([)f(E1,)g(E2,)h(...)f(En)g(])370 2305 y(|)h(FORALL)f(Id,)g(Exp,)g
4171 (Exp)195 b(//)22 b(forall)e(x)i(in)f(E1)h(.)f(E2)370
4172 2355 y(|)h(EXISTS)f(Id,)g(Exp,)g(Exp)195 b(//)22 b(exists)e(x)i(in)f
4173 (E1)h(.)f(E2)370 2405 y(|)h(GUARD)f(\(Exp,)g(Exp\))260
4174 b(//)370 2455 y(|)22 b(GENERATOR)e(\(Ids,)h(Exps,)g(Exp\))42
4175 b(//)22 b([x_1,...,x_n])d(in)i(X_1*...*X_n)370 2505 y(|)h(LET)43
4176 b(\(Id,)21 b(Exp,)g(Exp\))0 2604 y(law)g(inline)g(Int)43
4177 b(i)87 b(=)21 b(LIT\(INT)g(i\))p eop
4178 %%Page: 39 40
4179 39 39 bop 0 -82 1981 3 v 0 -100 a Fq(6.)16 b Fp(Tree)k(Rewriting)1484
4180 b Fw(39)0 45 y Fs(|)65 b(inline)21 b(Boolean)f(b)i(=)f(LIT\(BOOL)f(b\))
4181 0 95 y(|)218 b(True)130 b(=)21 b(Boolean)g(true)0 145
4182 y(|)218 b(False)108 b(=)21 b(Boolean)g(false)0 195 y(|)65
4183 b(inline)21 b(And)g(a,b)65 b(=)21 b(OP\("and",#[a,b]\))0
4184 244 y(|)65 b(inline)21 b(Or)43 b(a,b)65 b(=)21 b(OP\("or",)f(#[a,b]\))0
4185 294 y(|)65 b(inline)21 b(Not)g(a)109 b(=)21 b(OP\("not",#[a]\))0
4186 344 y(|)65 b(inline)21 b(Eq)g(a,b)87 b(=)21 b(OP\("=",)42
4187 b(#[a,b]\))0 394 y(|)65 b(inline)21 b(Ne)g(a,b)87 b(=)21
4188 b(OP\("/=",)f(#[a,b]\))0 444 y(|)65 b(inline)21 b(Gt)g(a,b)87
4189 b(=)21 b(OP\(">",)42 b(#[a,b]\))0 493 y(|)65 b(inline)21
4190 b(Ge)g(a,b)87 b(=)21 b(OP\(">=",)f(#[a,b]\))0 543 y(|)65
4191 b(inline)21 b(Lt)g(a,b)87 b(=)21 b(OP\("<",)42 b(#[a,b]\))0
4192 593 y(|)65 b(inline)21 b(Le)g(a,b)87 b(=)21 b(OP\("<=",)f(#[a,b]\))0
4193 643 y(|)65 b(inline)21 b(In)g(a,b)87 b(=)21 b(OP\("in",)f(#[a,b]\))0
4194 693 y(|)65 b(inline)21 b(Union)f(a,b)i(=)f(OP\("union",)f(#[a,b]\))0
4195 742 y(|)65 b(inline)21 b(Count)f(a)66 b(=)21 b(OP\("#",)g(#[a]\))0
4196 842 y(where)g(type)g(Id)195 b(=)22 b(const)f(char)g(*)0
4197 892 y(and)174 b(Ids)f(=)22 b(List<Id>)0 942 y(and)174
4198 b(Exps)151 b(=)22 b(List<Exp>)0 992 y(;)54 1083 y Fw(Not)o(e)e(t)n(h)o
4199 (a)o(t)g(exi)q(st)o(en)o(t)o(ial)f(an)o(d)h(u)o(niv)o(ersal)g(quan)o(t)
4200 o(i\014ers)h(are)f(repre)q(s)q(en)o(t)o(e)q(d)j(b)o(y)c(t)n(h)o(e)i
4201 (constru)o(ct)o(ors)i Fs(FORALL)c Fw(an)o(d)g Fs(EXISTS)0
4202 1133 y Fw(re)q(sp)q(ect)o(iv)o(ely)m(.)h(F)m(or)14 b(example,)f
4203 Fi(9)p Ft(x)f Fi(2)g Ft(A:p)i Fw(i)q(s)g(pre)q(s)q(en)o(t)o(e)q(d)j(as)
4204 d(t)n(h)o(e)i(t)o(erm)d Fs(EXISTS)o Fw(\()p Ft(x;)7 b(A;)g(p)p
4205 Fw(\).)19 b(Here)d Ft(x)e Fw(i)q(s)g(a)g Fo(binding)h
4206 Fw(o)q(ccurrence)0 1183 y(for)f Ft(x)p Fw(;)f(not)o(e)h(t)n(h)o(a)o(t)g
4207 (t)n(h)o(e)h(v)n(ar)q(ia)o(ble)d Ft(x)h Fw(m)o(ay)g(o)q(ccur)i(wit)n
4208 (hin)e(t)n(h)o(e)i(pre)q(dica)o(t)o(e)g Ft(p)p Fw(.)j(In)c(addit)o
4209 (ion,)e(a)i(li)q(st)f(compre)o(h)o(ens)q(ion)h(expre)q(ss)q(ion)0
4210 1233 y(su)o(c)o(h)g(as)655 1283 y Fi(f)p Ft(e)e Fw(:)f([)p
4211 Ft(x)766 1289 y Fn(1)783 1283 y Ft(;)c(:)g(:)g(:)e(;)i(x)900
4212 1289 y Fj(n)922 1283 y Fw(])k Fi(2)g Ft(X)1018 1289 y
4213 Fn(1)1047 1283 y Fi(\002)e Ft(:)e(:)g(:)h Fi(\002)h Ft(X)1221
4214 1289 y Fj(n)1258 1283 y Fi(j)k Ft(p)p Fi(g)0 1355 y Fw(i)q(s)g(repre)q
4215 (s)q(en)o(t)o(e)q(d)k(as)d(t)n(h)o(e)g(comp)q(ou)o(n)o(d)f(t)o(erm)508
4216 1443 y Fs(GENERATOR)n Fw(\(#[)p Ft(x)791 1449 y Fn(1)809
4217 1443 y Ft(;)7 b(:)g(:)g(:)e(;)i(x)926 1449 y Fj(n)947
4218 1443 y Fw(])p Ft(;)g Fw(#[)p Ft(X)1059 1449 y Fn(1)1077
4219 1443 y Ft(;)g(:)g(:)g(:)t(;)g(X)1203 1449 y Fj(n)1226
4220 1443 y Fw(])p Ft(;)g Fs(GUARD)n Fw(\()p Ft(p;)g(e)p Fw(\)\))54
4221 1542 y(Sup)o(p)q(os)q(e)17 b(w)o(e'll)e(lik)o(e)g(t)o(o)i(ren)o(am)o(e)
4222 f(all)f(v)n(ar)q(ia)o(ble)q(s)f(in)i(a)g(query)h Ft(Q)f
4223 Fw(so)h(t)n(h)o(a)o(t)f(no)g(t)o(w)o(o)g(bin)o(din)o(g)f(o)q(ccurrence)
4224 q(s)20 b(are)c(giv)o(en)g(t)n(h)o(e)0 1592 y(sam)o(e)d(n)o(am)o(e.)j
4225 (Thi)q(s)e(can)g(b)q(e)f(eas)q(ily)h(accompli)q(sh)o(e)q(d)e(us)q(in)o
4226 (g)h(a)h(com)n(bin)o(a)o(t)o(ion)d(of)i Fs(preorder:)k
4227 Fw(an)o(d)c Fs(postorder:)j Fw(rule)q(s)f(in)e(t)n(h)o(e)0
4228 1642 y(follo)o(win)o(g)e(m)o(ann)o(er:)39 1734 y(\(i\))21
4229 b(Us)q(e)e(preord)o(er)g(rule)q(s)g(t)o(o)g(c)o(h)o(ec)o(k)f(for)g(n)o
4230 (ew)g(v)n(ar)q(ia)o(ble)e(bin)o(din)o(gs,)j(for)e(example)f(in)i
4231 Fs(EXISTS)o Fw(\()p Ft(x;)7 b(A;)g(p)p Fw(\).)29 b(F)m(or)18
4232 b(eac)o(h)h(n)o(ew)104 1784 y(bin)o(din)o(g)14 b(o)q(ccurrence)j(for)d
4233 Ft(x)p Fw(,)g(crea)o(t)o(e)i(a)e(n)o(ew)h(n)o(am)o(e)e(for)h
4234 Ft(x)p Fw(.)19 b(Th)o(e)q(s)q(e)d(will)d(b)q(e)h(p)q(erform)o(e)q(d)g
4235 (b)q(efore)h(t)n(h)o(e)g(su)n(bt)o(erms)g Ft(A)f Fw(an)o(d)104
4236 1833 y Ft(p)f Fw(are)i(tra)o(v)o(ers)q(e)q(d.)28 1915
4237 y(\(ii\))20 b(Wh)o(en)o(ev)o(er)c(a)f(v)n(ar)q(ia)o(ble)e
4238 Ft(x)h Fw(i)q(s)h(fou)o(n)o(d)g(d)o(ur)q(in)o(g)g(t)n(h)o(e)g(su)n
4239 (b-tra)o(v)o(ersal)i(of)d Ft(A)h Fw(an)o(d)g Ft(p)p Fw(,)g(ren)o(am)o
4240 (e)f(t)n(h)o(e)i(v)n(ar)q(ia)o(ble)d(b)o(y)i(lo)q(okin)o(g)f(up)104
4241 1965 y(it)o(s)g(n)o(ew)g(n)o(am)o(e.)16 2046 y(\(iii\))20
4242 b(Fin)o(ally)m(,)11 b(us)q(e)j(p)q(ost)o(ord)o(er)i(rule)q(s)e(t)o(o)f
4243 (remo)o(v)o(e)f(t)n(h)o(e)i(curren)o(t)h(v)n(ar)q(ia)o(ble)c(su)n(bst)o
4244 (it)o(u)o(t)o(ion)k(wh)o(en)o(ev)o(er)f(w)o(e're)g(exit)o(in)o(g)f(a)g
4245 (bin)o(din)o(g)104 2096 y(o)q(ccurrence.)54 2188 y(F)m(or)e(example,)f
4246 (t)n(h)o(e)i(follo)o(win)o(g)d(s)q(et)j(of)f(rewr)q(it)o(in)o(g)h(rule)
4247 q(s)g(accompli)q(sh)d(t)n(hi)q(s)j(ren)o(amin)o(g)e(t)o(ask)i(for)f
4248 (our)h(query)g(lan)o(guage)f(us)q(in)o(g)0 2238 y(exact)n(ly)j(t)n(hi)q
4249 (s)g(m)o(et)n(h)o(o)q(d.)0 2330 y Fs(rewrite)20 b(RemoveDuplicateName)o
4250 (s)0 2380 y({)65 2429 y(//)i(We)f(use)g(before)g(and)g(after)g(rules)g
4251 (to)g(remove)f(duplicates)g(from)h(variable)f(names.)65
4252 2479 y(//)i(As)f(each)g(new)g(binding)g(occurrence)e(is)j(found,)e(we)i
4253 (enter)e(a)i(new)f(binding)65 2529 y(//)h(into)f(the)g(current)f
4254 (environment.)41 b(Identifiers)20 b(found)h(within)65
4255 2579 y(//)h(the)f(binding)f(occurrence)g(are)h(then)g(renamed.)p
4257 %%Page: 40 41
4258 40 40 bop 0 -82 1981 3 v 0 -100 a Fq(6.)16 b Fp(Tree)k(Rewriting)1484
4259 b Fw(40)0 45 y Fs(preorder:)20 b(//)h(insert)g(new)g(bindings)65
4260 95 y(EXISTS\(x,_,_\):)106 b({)22 b(new_binding\(x\);)d(})0
4261 145 y(|)43 b(FORALL\(x,_,_\):)106 b({)22 b(new_binding\(x\);)d(})0
4262 195 y(|)43 b(GENERATOR\(xs,_,_\):)18 b({)k(new_binding\(xs\);)d(})0
4263 244 y(|)43 b(LET\(x,_,_\):)172 b({)22 b(new_binding\(x\);)d(})196
4264 344 y(//)j(rename)e(variables)0 394 y(|)43 b(ID)22 b(x:)283
4265 b({)21 b(rename\(x\);)f(})0 493 y(postorder:)g(//)h(removes)f(the)i
4266 (binding)0 543 y(|)43 b(EXISTS\(x,A,_\):)128 b({)22 b
4267 (old_binding\(x\);)d(})0 593 y(|)43 b(FORALL\(x,A,_\):)128
4268 b({)22 b(old_binding\(x\);)d(})0 643 y(|)43 b(GENERATOR\(xs,As,_\):)18
4269 b({)k(old_binding\(xs\);)c(})0 693 y(|)43 b(LET\(x,_,_\):)194
4270 b({)22 b(old_binding\(x\);)d(})0 742 y(};)54 837 y Fw(Not)o(e)14
4271 b(t)n(h)o(a)o(t)g(w)o(e)h(h)o(a)o(v)o(e)f(accompli)q(sh)o(e)q(d)e(a)i
4272 (d)o(ept)n(h)i(\014rst)f(tra)o(v)o(ersal)g(us)q(in)o(g)f(rewr)q(it)o
4273 (in)o(g)g(wit)n(h)o(ou)o(t)g(wr)q(it)o(in)o(g)g(an)o(y)g(tra)o(v)o
4274 (ersal)g(co)q(d)o(e!)0 887 y(As)h(a)e(s)q(id)o(e)i(b)q(en)o(e\014t,)f
4275 (s)q(ince)h(t)n(h)o(e)f(tra)o(v)o(ersal)h(i)q(s)e(a)n(u)o(t)o(om)o(a)o
4276 (t)o(ically)f(d)o(et)o(ermin)o(e)q(d)j(b)o(y)f(t)n(h)o(e)g(stru)o(ct)o
4277 (ure)i(of)e(t)n(h)o(e)h(d)o(a)o(t)o(a)o(t)o(yp)q(e)q(s,)f(w)o(e)g(do)g
4278 (not)0 937 y(h)o(a)o(v)o(e)e(t)o(o)h(rewr)q(it)o(e)h(t)n(hi)q(s)e(ren)o
4279 (amin)o(g)g(co)q(d)o(e)i(ev)o(en)f(if)f(t)n(h)o(e)i(a)o(bstract)g(syn)o
4280 (t)o(ax)e(of)h(t)n(h)o(e)g(query)h(lan)o(guage)e(i)q(s)g(ext)o(en)o(d)o
4281 (e)q(d,)i(as)f(lon)o(g)f(as)h(no)0 987 y(addit)o(ion)o(al)f(bin)o(din)o
4282 (g)h(o)o(p)q(era)o(t)o(ors)i(are)f(add)o(e)q(d.)0 1115
4283 y FF(6.5)56 b(Th)n(e)18 b FC(rewrite)f FF(st)n(a)o(t)n(em)n(en)n(t)0
4284 1203 y Fw(While)f(t)n(h)o(e)h(rewr)q(it)o(e)g(class)g(constru)o(ct)h
4285 (pro)o(vid)o(e)q(s)g(a)e(v)o(ery)h(gen)o(eral)g(a)o(bstract)o(ion)g
4286 (for)f(rewr)q(it)o(in)o(g,)g(in)g(gen)o(eral)h(it)o(s)g(full)e(p)q(o)o
4287 (w)o(er)0 1253 y(i)q(s)g(u)o(nn)o(ee)q(d)o(e)q(d.)24
4288 b(It)15 b(i)q(s)g(oft)o(en)g(con)o(v)o(enien)o(t)h(t)o(o)f(b)q(e)g(a)o
4289 (ble)g(t)o(o)g(p)q(erform)f(rewr)q(it)o(in)o(g)h(on)g(a)g(t)o(erm)g
4290 (wit)n(h)o(ou)o(t)g(h)o(a)o(vin)o(g)g(t)o(o)g(m)o(ak)o(e)f(a)h(n)o(ew)0
4291 1303 y(n)o(am)o(e)i(for)g(a)h(class)h(just)f(for)g(t)n(h)o(e)h(o)q
4292 (ccas)q(ion,)f(e)q(sp)q(ecially)g(if)f(m)o(em)n(b)q(er)f(fu)o(nct)o
4293 (ions)i(an)o(d)g(m)o(em)n(b)q(er)e(d)o(a)o(t)o(a)h(are)i(u)o(nn)o(ee)q
4294 (d)o(e)q(d.)33 b(T)m(o)0 1352 y(accommo)q(d)o(a)o(t)o(e)13
4295 b(t)n(h)o(e)q(s)q(e)j(s)q(it)o(ua)o(t)o(ions,)e(t)n(h)o(e)i
4296 Fs(rewrite)d Fw(st)o(a)o(t)o(em)o(en)o(t)i(i)q(s)f(pro)o(vid)o(e)q(d)h
4297 (t)o(o)h(p)q(erform)d(a)i(s)q(et)h(rewr)q(it)o(in)o(g)f(transform)o(a)o
4298 (t)o(ions)0 1402 y(on)d(a)h(t)o(erm)f(wit)n(h)o(ou)o(t)h(h)o(a)o(vin)o
4299 (g)f(t)o(o)h(d)o(e\014n)o(e)h(a)e(t)o(emp)q(orary)g(rewr)q(it)o(e)h
4300 (class.)19 b(It)13 b(i)q(s)f(s)q(imply)e(syn)o(t)o(act)o(ic)i(sugar)h
4301 (for)g(t)n(h)o(e)g(more)f(gen)o(eral)0 1452 y(rewr)q(it)o(e)j(class)h
4302 (an)o(d)f(rewr)q(it)o(e)g(rule)q(s)h(sp)q(eci\014ca)o(t)o(ions.)21
4303 b(F)m(or)15 b(example,)d(a)j(s)q(implif)o(y)d(rou)o(t)o(in)o(e)j(for)g
4304 (t)o(yp)q(e)g Fs(Exp)f Fw(d)o(e\014n)o(e)q(d)i(a)o(b)q(o)o(v)o(e)f(can)
4305 0 1502 y(b)q(e)f(sp)q(eci\014e)q(d)h(as)f(follo)o(ws:)65
4306 1605 y Fs(Exp)22 b(simplify)e(\(Exp)h(e\))65 1655 y({)44
4307 b(//)21 b(transformations)e(on)i(e)h(before)131 1704
4308 y(rewrite)e(\(e\))h(type)g(\(Exp\))131 1754 y({)43 b(ADD)21
4309 b(\(INT)g(a,)h(INT)f(b\):)43 b(INT\(a+b\))131 1804 y(|)g(SUB)21
4310 b(\(INT)g(a,)h(INT)f(b\):)43 b(INT\(a-b\))131 1854 y(|)g(MUL)21
4311 b(\(INT)g(a,)h(INT)f(b\):)43 b(INT\(a*b\))131 1904 y(|)g(...)131
4312 1953 y(})131 2003 y(//)21 b(transformations)e(on)i(e)h(after)131
4313 2053 y(return)e(e;)65 2103 y(})54 2206 y Fw(Th)o(e)11
4314 b Fs(rewrite)f Fw(norm)o(ally)f(p)q(erforms)i(t)n(h)o(e)h(replacem)o
4315 (en)o(t)e(in-place.)17 b(An)11 b(ap)o(plica)o(t)o(iv)o(e)f(v)o(ers)q
4316 (ion)h(of)g(t)n(h)o(e)h(sam)o(e)e(can)i(b)q(e)g(wr)q(it)n(t)o(en)0
4317 2256 y(as)i(follo)o(ws)175 2241 y Fn(8)192 2256 y Fw(:)65
4318 2359 y Fs(Exp)22 b(simplify)e(\(Exp)h(e\))65 2408 y({)44
4319 b(rewrite)20 b(\(e\))h(=>)h(e)f(type)g(\(Exp\))131 2458
4320 y({)43 b(ADD)21 b(\(INT)g(a,)h(INT)f(b\):)43 b(INT\(a+b\))131
4321 2508 y(|)g(SUB)21 b(\(INT)g(a,)h(INT)f(b\):)43 b(INT\(a+b\))131
4322 2558 y(|)g(MUL)21 b(\(INT)g(a,)h(INT)f(b\):)43 b(INT\(a*b\))p
4323 0 2590 792 2 v 46 2617 a Fm(8)64 2629 y Fl(Th)o(e)11
4324 b(v)n(ar)q(ia)o(ble)e Fk(e)i Fl(is)h(assign)o(e)q(d)e(t)o(h)o(e)h(n)o
4325 (ew)g(co)o(p)o(y)m(.)p eop
4326 %%Page: 41 42
4327 41 41 bop 0 -82 1981 3 v 0 -100 a Fq(6.)22 b Fp(Tree)d(Rewriting)1479
4328 b Fw(41)131 45 y Fs(|)43 b(...)131 95 y(})131 145 y(return)20
4329 b(e;)65 195 y(})54 298 y Fw(Th)o(e)14 b(syn)o(t)o(ax)g(of)g(t)n(h)o(e)h
4330 (rewr)q(it)o(e)g(st)o(a)o(t)o(em)o(en)o(t)f(i)q(s)g(as)g(follo)o(ws.)k
4331 (Th)o(e)d(tra)o(v)o(ersal)g(li)q(st)e(of)h(t)n(h)o(e)h(s)q(et)g(of)f
4332 (rewr)q(it)o(e)h(rule)g(i)q(s)e(li)q(st)o(e)q(d)i(n)o(ext)0
4333 347 y(t)o(o)f(t)n(h)o(e)h(k)o(eyw)o(ord)f Fs(type)p Fw(.)129
4334 449 y Fo(R)n(ewrite)p 271 449 13 2 v 14 w(Stmt)50 b Fu(::=)g
4335 Fs(rewrite)12 b(\()i Fo(Exp)h Fs(\))e Fo([)i Fs(=>)f
4336 Fo(Exp)i(])572 499 y Fs(type)d(\()g Fo(T)m(yp)n(eExp)q
4337 Fs(,)g Ft(:)7 b(:)g(:)13 b Fs(,)g Fo(T)m(yp)n(eExp)i
4338 Fs(\))530 549 y Fi(f)f Fo([)g(Index)p 693 549 V 16 w(De)n(cl)h(])f(R)n
4339 (ewrite)p 968 549 V 14 w(R)o(ules)g Fi(g)450 598 y(j)68
4340 b Fs(rewrite)12 b(\()i Fo(Exp)h Fs(\))e Fo([)i Fs(=>)f
4341 Fo(Exp)i(])572 648 y Fs(type)d(\()g Fo(T)m(yp)n(eExp)q
4342 Fs(,)g Ft(:)7 b(:)g(:)13 b Fs(,)g Fo(T)m(yp)n(eExp)i
4343 Fs(\))e(of)572 698 y Fo([)h(Index)p 700 698 V 16 w(De)n(cl)h(])f(R)n
4344 (ewrite)p 975 698 V 14 w(R)o(ules)530 748 y Fs(end)f(rewrite)g(;)0
4345 866 y Fu(6.5.1)48 b(Rewr)q(it)o(in)o(g)13 b(mo)q(d)o(e)q(s)0
4346 954 y Fw(Th)o(ere)21 b(are)e(t)o(w)o(o)g(bas)q(ic)g(mo)q(d)o(e)q(s)h
4347 (of)e(o)o(p)q(era)o(t)o(ions)h(in)g(a)h(rewr)q(it)o(e)g(class:)30
4348 b(\(i\))19 b Fo(tr)n(e)n(e)g(r)n(ewriting)f Fw(an)o(d)h(\(ii\))f
4349 Fo(tr)n(e)n(e)i(p)n(arsing)p Fw(.)34 b(T)m(ree)0 1004
4350 y(rewr)q(it)o(in)o(g)14 b(rep)q(ea)o(t)o(e)q(dly)h(lo)q(oks)e(for)h(re)
4351 q(d)o(exe)q(s)i(in)d(a)h(tree)h(an)o(d)f(transforms)f(it)g(in)o(t)o(o)h
4352 (anot)n(h)o(er)g(tree.)20 b(Th)o(ere)15 b(are)f(t)o(w)o(o)g(su)n(b-mo)q
4353 (d)o(e)q(s)0 1054 y(of)j(o)o(p)q(era)o(t)o(ions:)25 b(\(a\))18
4354 b Fo(applic)n(ative)g Fw(an)o(d)f(\(b\))h Fo(in-plac)n(e)p
4355 Fw(.)30 b(A)n(p)o(plica)o(t)o(iv)o(e)15 b(mo)q(d)o(e)i(i)q(s)h(sp)q
4356 (eci\014e)q(d)g(us)q(in)o(g)g(t)n(h)o(e)g Fs(applicative)e
4357 Fw(mo)q(d)o(e)0 1104 y(sp)q(eci\014er)g(wh)o(en)f(d)o(eclar)q(in)o(g)g
4358 (a)f(rewr)q(it)o(e)i(class.)21 b(In)15 b(t)n(hi)q(s)f(mo)q(d)o(e,)g(a)h
4359 (n)o(ew)g(tree)h(i)q(s)e(buil)o(t)g(f)q(rom)f(a)h(b)q(ot)n(t)o(om-up)g
4360 (m)o(ann)o(er,)g(an)o(d)g(t)n(h)o(e)0 1153 y(su)n(b)r(ject)k(tree)g(i)q
4361 (s)e(left)h(u)o(n)o(al)o(t)o(ere)q(d.)28 b(Th)o(e)17
4362 b(d)o(ef)q(a)n(ul)o(t)g(mo)q(d)o(e)e(i)q(s)h(\\in-place.")25
4363 b(In)17 b(t)n(hi)q(s)g(mo)q(d)o(e,)f(t)n(h)o(e)h(su)n(b)r(ject)h(tree)g
4364 (i)q(s)e(o)o(v)o(erwr)q(it)n(t)o(en)0 1203 y(wit)n(h)e(t)n(h)o(e)g
4365 (transform)o(e)q(d)g(expre)q(ss)q(ion.)54 1265 y(On)h(t)n(h)o(e)h(ot)n
4366 (h)o(er)h(h)o(an)o(d,)e(in)f(tree)j(pars)q(in)o(g)e(mo)q(d)o(e,)g(t)n
4367 (h)o(e)h(left)f(h)o(an)o(d)g(s)q(id)o(e)h(of)f(a)g(rewr)q(it)o(e)h
4368 (rule)q(s)g(sp)q(eci\014ca)o(t)o(ion)f(i)q(s)g(trea)o(t)o(e)q(d)i(as)e
4369 (a)0 1315 y(tree)h(gramm)o(ar.)j(Th)o(e)d(tree)g(pars)q(er)h(will)c(lo)
4370 q(ok)i(for)f(a)h(d)o(er)q(iv)n(a)o(t)o(ion)g(of)f(giv)o(en)h(tree)h(ob)
4371 r(ject)g(f)q(rom)d(t)n(h)o(e)j(st)o(art)g(non-t)o(ermin)o(al.)k(A)0
4372 1365 y(guard)o(e)q(d)15 b(rule)f(will)e(only)h(b)q(e)h(us)q(e)q(d)h(if)
4373 e(t)n(h)o(e)i(guard)e(ev)n(alua)o(t)o(e)q(s)h(t)o(o)g(true.)54
4374 1426 y(If)g(rule)q(s)h(are)g(annot)o(a)o(t)o(e)q(d)g(wit)n(h)f(cost)i
4375 (expre)q(ss)q(ions,)g(t)n(h)o(en)f(t)n(h)o(e)g(tree)h(pars)q(er)g(will)
4376 d(try)i(t)o(o)g(lo)q(ca)o(t)o(e)f(a)g(d)o(er)q(iv)n(a)o(t)o(ion)g(c)o
4377 (h)o(ain)g(wit)n(h)0 1476 y(a)f(minim)n(al)d(t)o(ot)o(al)j(cost.)19
4378 b(Aft)o(er)14 b(a)f(d)o(er)q(iv)n(a)o(t)o(ion)f(tree)j(i)q(s)e(fou)o(n)
4379 o(d,)g(t)n(h)o(e)h(tree)g(can)g(b)q(e)f(rep)q(ea)o(t)o(e)q(d)i(tra)o(v)
4380 o(ers)q(e)q(d.)20 b(Th)o(e)13 b(rhs)h(act)o(ions)f(will)0
4381 1526 y(b)q(e)h(in)o(v)o(ok)o(e)q(d)f(d)o(ur)q(in)o(g)h(t)n(hi)q(s)f
4382 (tra)o(v)o(ersal)i(pro)q(ce)q(ss.)0 1645 y Fu(6.5.2)48
4383 b(St)o(a)o(t)o(e)14 b(cac)o(hin)o(g)g(o)o(pt)o(imiza)o(t)n(ion)0
4384 1734 y Fw(Th)o(e)h(pa)o(t)n(t)o(er)q(n)h(m)o(a)o(t)o(c)o(hin)o(g)d(pro)
4385 q(ce)q(ss)k(pro)q(cee)q(ds)h(in)c(a)h(b)q(ot)n(t)o(om)f(up)h(m)o(ann)o
4386 (er:)k(for)c(eac)o(h)h(su)n(btree)g(of)f(t)n(h)o(e)g(form)e
4387 Ft(l)q Fw(\()p Ft(t)1751 1740 y Fn(1)1770 1734 y Ft(;)7
4388 b(t)1804 1740 y Fn(2)1822 1734 y Ft(;)g(:)g(:)g(:)e(;)i(t)1930
4389 1740 y Fj(n)1952 1734 y Fw(\),)0 1784 y Ft(n)k Fi(\025)h
4390 Fw(0,)e(a)f(st)o(a)o(t)o(e)h(n)n(u)o(m)n(b)q(er)f(i)q(s)f(compu)o(t)o
4391 (e)q(d)h(f)q(rom)f(t)n(h)o(e)i(curren)o(t)g(tree)h(la)o(b)q(el)d
4392 Ft(l)i Fw(an)o(d)f(t)n(h)o(e)h(st)o(a)o(t)o(e)g(n)n(u)o(m)n(b)q(ers)g
4393 (of)e(it)o(s)i(su)n(btree)q(s)i Ft(t)1768 1790 y Fn(1)1787
4394 1784 y Ft(;)7 b(t)1821 1790 y Fn(2)1839 1784 y Ft(;)g(:)g(:)g(:)t(;)g
4395 (t)1946 1790 y Fj(n)1968 1784 y Fw(.)0 1834 y(Th)o(e)17
4396 b(s)q(et)h(of)e(m)o(a)o(t)o(c)o(h)o(e)q(d)g(rule)q(s)i(can)f(b)q(e)g
4397 (direct)n(ly)g(compu)o(t)o(e)q(d)g(f)q(rom)e(t)n(h)o(e)j(curren)o(t)g
4398 (st)o(a)o(t)o(e)f(n)n(u)o(m)n(b)q(er.)27 b(Thi)q(s)16
4399 b(m)o(eans)h(t)n(h)o(a)o(t)g(in)f(t)n(h)o(e)0 1883 y(a)o(bs)q(ence)h
4400 (of)d(re)q(d)o(ex)i(replacem)o(en)o(t)o(s,)f(pa)o(t)n(t)o(er)q(n)h(m)o
4401 (a)o(t)o(c)o(hin)o(g)d(t)o(ak)o(e)q(s)i(t)o(im)o(e)e(pro)o(p)q(ort)o
4402 (ion)o(al)h(only)g Ft(O)q Fw(\()p Fi(j)p Ft(t)p Fi(j)9
4403 b Fw(+)h Ft(r)q Fw(\),)15 b(wh)o(ere)h Fi(j)p Ft(t)p
4404 Fi(j)e Fw(i)q(s)g(t)n(h)o(e)i(s)q(ize)0 1933 y(of)e(t)n(h)o(e)i(inpu)o
4405 (t)g(tree)g Ft(t)f Fw(an)o(d)g Ft(r)h Fw(i)q(s)e(t)o(im)o(e)f(it)i(t)o
4406 (ak)o(e)q(s)h(t)o(o)f(execu)o(t)o(e)i(t)n(h)o(e)f(rhs)g(act)o(ions.)21
4407 b(Th)o(a)o(t)15 b(i)q(s,)f(t)n(h)o(e)i(ru)o(n)o(t)o(im)o(e)e(i)q(s)g
4408 (ins)q(ens)q(it)o(iv)o(e)h(t)o(o)g(t)n(h)o(e)0 1983 y(n)n(u)o(m)n(b)q
4409 (er)f(of)f(rewr)q(it)o(e)h(rule)q(s)h(or)f(t)n(h)o(e)g(complexit)o(y)e
4410 (of)h(t)n(h)o(e)i(pa)o(t)n(t)o(er)q(ns.)54 2045 y(Ho)o(w)o(ev)o(er,)c
4411 (if)g(t)n(h)o(e)h(inpu)o(t)f(i)q(s)g(a)g(D)o(A)o(G)f(ra)o(t)n(h)o(er)i
4412 (t)n(h)o(an)g(a)f(tree)925 2030 y Fn(9)945 2045 y Fw(,)g(or)g(if)f
4413 (replacem)o(en)o(t)o(s)i(are)f(p)q(erform)o(e)q(d,)g(t)n(h)o(en)h(t)n
4414 (h)o(e)g(a)o(b)q(o)o(v)o(e)f(an)o(alys)q(i)q(s)0 2094
4415 y(m)o(ay)k(not)h(h)o(old.)24 b(Replacem)o(en)o(t)o(s)16
4416 b(d)o(ur)q(in)o(g)g(rewr)q(it)o(in)o(g)g(oft)o(en)g(require)h(st)o(a)o
4417 (t)o(e)g(inform)o(a)o(t)o(ion)c(of)j(t)n(h)o(e)h(replacem)o(en)o(t)f(t)
4418 o(erm)f(t)o(o)i(b)q(e)0 2144 y(recompu)o(t)o(e)q(d)e(t)o(o)f(furt)n(h)o
4419 (er)i(t)n(h)o(e)e(m)o(a)o(t)o(c)o(hin)o(g)f(pro)q(ce)q(ss.)21
4420 b(Since)15 b(compu)o(t)o(a)o(t)o(ion)d(of)i(st)o(a)o(t)o(e)h(can)f(in)o
4421 (v)o(olv)o(e)e(a)i(complet)o(e)f(tra)o(v)o(ersal)i(of)e(a)0
4422 2194 y(t)o(erm,)g(replacem)o(en)o(t)g(can)g(b)q(ecom)o(e)g(exp)q(ens)q
4423 (iv)o(e)h(if)f(t)n(h)o(e)h(replacem)o(en)o(t)f(t)o(erm)g(i)q(s)h
4424 (large.)j(F)m(or)d(inst)o(ance,)g(cons)q(id)o(er)g(t)n(h)o(e)h(follo)o
4425 (win)o(g)0 2244 y(replacem)o(en)o(t)e(rule,)h(whic)o(h)f(replace)q(s)i
4426 (all)e(expre)q(ss)q(ions)i(of)f(t)n(h)o(e)g(form)f Fo(2*x)h
4427 Fw(in)o(t)o(o)g Fo(x+x)p Fw(:)65 2347 y Fs(rewrite)21
4428 b(class)f(StrengthReduction)65 2397 y({)131 2447 y(MUL)h(\(INT)g(2,)g
4429 (?x\):)43 b(ADD\(?x,)20 b(?x\))131 2496 y(...)65 2546
4430 y(})p 0 2576 792 2 v 46 2603 a Fm(9)64 2615 y Fl(Rewr)q(it)o(ing)9
4431 b(of)i(a)g(gen)o(er)q(ic)f(graph)g(stru)o(ct)o(ure)f(is)j(not)f(recomm)
4432 o(en)n(d)o(e)q(d)e(wit)o(h)h Fk(rewrite)p Fl(.)p eop
4433 %%Page: 42 43
4434 42 42 bop 0 -82 1981 3 v 0 -100 a Fq(6.)22 b Fp(Tree)d(Rewriting)1479
4435 b Fw(42)0 45 y(Since)14 b(t)n(h)o(e)h(su)n(bt)o(erm)f
4436 Fs(?x)f Fw(could)h(b)q(e)g(arbitrar)q(ily)e(large,)h(recompu)o(t)o(in)o
4437 (g)h(t)n(h)o(e)h(st)o(a)o(t)o(e)f(enco)q(din)o(g)g(for)g
4438 Fs(ADD\(?x,?x\))e Fw(n)o(aiv)o(ely)h(t)o(ak)o(e)q(s)0
4439 95 y(t)o(im)o(e)g(in)g(pro)o(p)q(ort)o(ion)h(t)o(o)h(t)n(h)o(e)g(s)q
4440 (ize)f(of)g Fs(?x)p Fw(.)k(Ho)o(w)o(ev)o(er,)d(s)q(ince)g(t)n(h)o(e)g
4441 (su)n(btree)h Fs(?x)e Fw(o)q(ccurs)h(as)g(part)f(of)g(t)n(h)o(e)h(pa)o
4442 (t)n(t)o(er)q(n,)f(it)o(s)h(st)o(a)o(t)o(e)g(h)o(as)0
4443 145 y(already)f(b)q(een)g(compu)o(t)o(e)q(d,)g(an)o(d)f(it)h(w)o(ould)f
4444 (b)q(e)h(w)o(ast)o(eful)f(t)o(o)i(recompu)o(t)o(e)f(it)o(s)g(st)o(a)o
4445 (t)o(e)h(f)q(rom)c(scra)o(t)o(c)o(h.)54 206 y(A)k(s)q(imilar)d(obs)q
4446 (erv)n(a)o(t)o(ion)j(can)g(b)q(e)g(m)o(ad)o(e)f(t)o(o)h(t)n(h)o(e)h
4447 (cas)q(e)g(wh)o(en)f(t)n(h)o(e)h(inpu)o(t)f(i)q(s)f(a)h(D)o(A)o(G,)f
4448 (wh)o(ere)i(m)o(an)o(y)d(su)n(b)q(comp)q(on)o(en)o(t)o(s)j(are)0
4449 256 y(sh)o(are)q(d)f(b)q(et)o(w)o(een)h(no)q(d)o(e)q(s.)21
4450 b(In)14 b(ord)o(er)i(t)o(o)e(sp)q(ee)q(d)i(up)f(t)n(h)o(e)g(rewr)q(it)o
4451 (in)o(g)f(pro)q(ce)q(ss,)j(t)n(h)o(e)e(st)o(a)o(t)o(e)g(of)f(eac)o(h)h
4452 (sh)o(are)q(d)g(co)o(p)o(y)g(of)f(t)n(h)o(e)h(no)q(d)o(e)q(s)0
4453 306 y(sh)o(ould)f(b)q(e)g(compu)o(t)o(e)q(d)f(only)g(once.)54
4454 368 y(In)18 b(ord)o(er)i(t)o(o)f(sp)q(ee)q(d)o(up)h(t)n(h)o(e)g(st)o(a)
4455 o(t)o(e)f(compu)o(t)o(a)o(t)o(ion)e(pro)q(ce)q(ss)22
4456 b(in)c(t)n(h)o(e)q(s)q(e)i(s)q(it)o(ua)o(t)o(ions,)39
4457 b(can)19 b(b)q(e)f(en)o(a)o(ble)q(d)h(b)o(y)g(sp)q(ecifyin)o(g)f(a)0
4458 417 y Fo(r)n(ewriting)11 b(index)p Fw(.)18 b(Thi)q(s)11
4459 b(can)g(b)q(e)h(accompli)q(sh)o(e)q(d)d(in)i(t)o(w)o(o)g(w)o(ays:)17
4460 b(\(i\))11 b(us)q(e)h(t)n(h)o(e)g(quali\014er)g Fs(rewrite)d
4461 Fw(wh)o(en)j(d)o(e\014nin)o(g)g(a)g(d)o(a)o(t)o(a)o(t)o(yp)q(e.)0
4462 467 y(Thi)q(s)h(sp)q(eci\014e)q(s)h(t)n(h)o(e)g Fo(primary)g(index)p
4463 Fw(.)k(Or)c(al)o(t)o(er)q(n)o(a)o(t)o(iv)o(ely)m(,)e(\(ii\))g(us)q(e)i
4464 (in)o(d)o(ex)f(d)o(eclara)o(t)o(ions)h(t)o(o)f(sp)q(ecify)h(on)o(e)f
4465 (or)g(more)f Fo(se)n(c)n(ondary)0 517 y(indic)n(es)p
4466 Fw(.)54 579 y(W)m(e'll)h(\014rst)j(d)o(e)q(scr)q(ib)q(e)g(t)n(h)o(e)g
4467 (\014rst)g(m)o(et)n(h)o(o)q(d.)21 b(A)15 b Fs(rewrite)f
4468 Fw(quali\014er)h(can)g(b)q(e)g(us)q(e)q(d)h(in)f(t)n(h)o(e)h(d)o
4469 (e\014nit)o(ion)f(of)f(a)h(d)o(a)o(t)o(a)o(t)o(yp)q(e.)21
4470 b(F)m(or)0 628 y(inst)o(ance:)65 722 y Fs(datatype)g(Exp)g(::)g
4471 (rewrite)131 772 y(=)g(INT)h(\(int\))131 821 y(|)f(ID)44
4472 b(\(const)20 b(char)h(*\))131 871 y(|)g(ADD)h(\(Exp,)e(Exp\))131
4473 921 y(|)h(SUB)h(\(Exp,)e(Exp\))131 971 y(|)h(MUL)h(\(Exp,)e(Exp\))131
4474 1021 y(|)h(DIV)h(\(Exp,)e(Exp\))131 1071 y(;)54 1164
4475 y Fw(Th)o(e)12 b Fs(rewrite)f Fw(quali\014er)g(t)o(ells)h(t)n(h)o(e)h
4476 (transla)o(t)o(or)g(t)o(o)f(gen)o(era)o(t)o(e)h(an)f(extra)g(st)o(a)o
4477 (t)o(e)h(\014eld)f(in)g(t)n(h)o(e)h(implem)n(en)o(t)o(a)o(t)o(i)o(on)c
4478 (of)j Fs(Exp)p Fw(.)k(Thi)q(s)0 1214 y(st)o(a)o(t)o(e)i(\014eld)g(i)q
4479 (s)f(implicit)n(ly)d(up)q(d)o(a)o(t)o(e)q(d)19 b(d)o(ur)q(in)o(g)e(t)n
4480 (h)o(e)i(rewr)q(it)o(in)o(g)e(pro)q(ce)q(ss.)32 b(Wh)o(en)18
4481 b(t)n(h)o(e)g(rewr)q(it)o(er)h(encou)o(n)o(t)o(ers)h(a)d(no)q(d)o(e)i
4482 (wit)n(h)e(a)0 1264 y(cac)o(h)o(e)q(d)e(st)o(a)o(t)o(e)f(it)g(can)g
4483 (quic)o(kly)f(sh)o(ort-circuit)h(all)f(u)o(nn)o(ece)q(ssary)k(st)o(a)o
4484 (t)o(e)d(compu)o(t)o(a)o(t)o(ion.)54 1325 y Fu(A)g(w)o(ord)f(of)h(ca)n
4485 (u)o(t)o(ion:)i Fw(s)q(ince)d(eac)o(h)g(rewr)q(it)o(in)o(g)f(syst)o(em)
4486 g(compu)o(t)o(e)q(s)h(it)o(s)g(o)o(wn)e(enco)q(din)o(g,)i(rewr)q(it)o
4487 (in)o(g)g(syst)o(ems)f(sh)o(ould)g(not)0 1375 y(b)q(e)j(mixe)q(d)e(if)h
4488 (t)n(h)o(ey)h(sh)o(ard)g(t)n(h)o(e)g(sam)o(e)f(in)o(d)o(ex,)g(i.e.)20
4489 b(act)o(ions)14 b(of)g(a)g(rewr)q(it)o(in)o(g)h(syst)o(em)f(sh)o(ould)h
4490 (not)f(in)o(v)o(ok)o(e)g(anot)n(h)o(er)h(rewr)q(it)o(in)o(g)0
4491 1425 y(syst)o(em)i(on)f(a)h(t)o(erm)g(t)n(h)o(a)o(t)g(i)q(s)f(part)o
4492 (icipa)o(t)o(in)o(g)g(in)g(t)n(h)o(e)i(curren)o(t)h(rewr)q(it)o(in)o(g)
4493 d(syst)o(em,)h(if)g(b)q(ot)n(h)g(syst)o(ems)g(us)q(e)h(t)n(h)o(e)f(sam)
4494 o(e)f(in)o(d)o(ex.)0 1475 y(Thi)q(s)d(limit)o(a)o(t)o(ion)d(can)15
4495 b(b)q(e)e(o)o(v)o(ercom)o(e)h(b)o(y)f(us)q(in)o(g)h(s)q(econ)o(d)o(ary)
4496 h(in)o(dice)q(s,)e(whic)o(h)h(w)o(e'll)f(di)q(scuss)i(n)o(ext.)0
4497 1593 y Fu(6.5.3)48 b(Sp)q(ecifyin)n(g)14 b(s)q(econ)o(d)o(ary)g(in)o
4498 (dice)q(s)0 1681 y Fw(F)m(rom)f(releas)q(e)k(2.3.0)d(on)o(w)o(ard,)g
4499 (it)h(i)q(s)g(p)q(oss)q(ible)h(t)o(o)f(sp)q(ecify)g(s)q(econ)o(d)o(ary)
4500 i(in)o(dice)q(s)e(wit)n(hin)g(a)g(rewr)q(it)o(in)o(g)g(syst)o(em.)22
4501 b(Thi)q(s)15 b(m)o(ak)o(e)q(s)0 1731 y(it)e(p)q(oss)q(ible)h(t)o(o)g
4502 (in)o(v)o(ok)o(e)f(ot)n(h)o(er)h(rewr)q(it)o(in)o(g)g(syst)o(ems)g(wit)
4503 n(hin)f(t)n(h)o(e)h(execu)o(t)o(ion)h(of)e(anot)n(h)o(er,)h(while)f
4504 (ret)o(ainin)o(g)g(t)n(h)o(e)i(st)o(a)o(t)o(e)f(cac)o(hin)o(g)0
4505 1781 y(o)o(pt)o(imiza)o(t)o(ions)d(t)n(hrough)o(ou)o(t.)54
4506 1842 y(Th)o(ere)19 b(are)g(t)o(w)o(o)e(forms)g(of)h(s)q(econ)o(d)o(ary)
4507 h(in)o(d)o(ex:)27 b Fo(internal)18 b(index)h Fw(an)o(d)f
4508 Fo(external)h(index)p Fw(.)32 b(In)o(t)o(er)q(n)o(al)17
4509 b(in)o(dice)q(s)i(are)f(st)o(ore)q(d)0 1892 y(direct)n(ly)e(wit)n(hin)f
4510 (a)g(rewr)q(it)o(e)h(t)o(erm)e(an)o(d)h(require)i(t)n(h)o(e)f(us)q(er)g
4511 (t)o(o)g(pre-allo)q(ca)o(t)o(e)f(space)h(for)f(eac)o(h)i(t)o(erm.)22
4512 b(In)15 b(con)o(trast,)h(ext)o(er)q(n)o(al)0 1942 y(in)o(dice)q(s)e
4513 (are)g(st)o(ore)q(d)i(in)d(a)h(s)q(epara)o(t)o(e)h(d)o(a)o(t)o(a)e
4514 (stru)o(ct)o(ure)j(su)o(c)o(h)f(as)f(a)f(h)o(ash)h(t)o(a)o(ble.)54
4515 2004 y(Th)o(e)g(syn)o(t)o(ax)f(of)h(s)q(econ)o(d)o(ary)h(in)o(d)o(ex)f
4516 (d)o(eclara)o(t)o(ions)g(i)q(s)f(as)h(follo)o(ws:)129
4517 2088 y Fo(Index)p 230 2088 13 2 v 16 w(De)n(cl)50 b Fu(::=)h
4518 Fs(index:)17 b Fo(Index)p 735 2088 V 16 w(Sp)n(e)n(c)q
4519 Fs(,)c Ft(:)7 b(:)g(:)12 b Fs(,)i Fo(Index)p 1061 2088
4520 V 16 w(Sp)n(e)n(c)h Fs(;)129 2138 y Fo(Index)p 230 2138
4521 V 16 w(Sp)n(e)n(c)50 b Fu(::=)h Fo(T)m(yp)n(e)p 573 2138
4522 V 15 w(Exp)14 b Fs(=)g(none)447 b Fw(Di)q(sa)o(ble)12
4523 b(in)o(d)o(exin)o(g)404 2188 y Fi(j)69 b Fo(T)m(yp)n(e)p
4524 573 2188 V 15 w(Exp)14 b Fs(=)g Fo(Id)498 b Fw(In)o(t)o(er)q(n)o(al)14
4525 b(in)o(d)o(ex)404 2237 y Fi(j)69 b Fo(T)m(yp)n(e)p 573
4526 2237 V 15 w(Exp)14 b Fs(=)g(extern)e Fo(Id)354 b Fw(Ext)o(er)q(n)o(al)
4527 14 b(in)o(d)o(ex)0 2353 y Fu(6.5.4)48 b(Us)q(in)o(g)14
4528 b(an)i(in)o(t)o(er)q(n)n(al)c(in)o(d)o(ex)0 2442 y Fw(In)17
4529 b(ord)o(er)g(t)o(o)g(m)o(ak)o(e)e(us)q(e)j(of)e(an)g(in)o(d)o(ex,)h
4530 (cert)o(ain)g(m)o(em)n(b)q(er)e(fu)o(nct)o(ions)i(h)o(a)o(v)o(e)f(t)o
4531 (o)h(d)o(e\014n)o(e)q(d)h(b)o(y)e(t)n(h)o(e)h(us)q(er.)28
4532 b(Giv)o(en)16 b(an)g(in)o(t)o(er)q(n)o(al)0 2492 y(in)o(d)o(ex)e(n)o
4533 (am)o(e)q(d)f Fo(fo)n(o)p Fw(,)g(t)n(h)o(e)i(rewr)q(it)o(er)g(in)o(v)o
4534 (ok)o(e)q(s)e(t)o(w)o(o)h(fu)o(nct)o(ions)g(n)o(am)o(e)q(d)104
4535 2579 y Fs(int)21 b(get)p 260 2579 14 2 v 15 w Fc(foo)p
4536 341 2579 V 15 w Fs(state\(\))f(const;)104 2629 y(void)h(set)p
4537 282 2629 V 15 w Fc(foo)p 363 2629 V 15 w Fs(state\(int\);)p
4539 %%Page: 43 44
4540 43 43 bop 0 -82 1981 3 v 0 -100 a Fq(6.)22 b Fp(Tree)d(Rewriting)1479
4541 b Fw(43)0 45 y(wit)n(hin)22 b(t)n(h)o(e)g(gen)o(era)o(t)o(e)q(d)i(co)q
4542 (d)o(e.)43 b(Th)o(e)22 b(us)q(er)i(sh)o(ould)d(pro)o(vid)o(e)i(t)n(h)o
4543 (e)f(implem)n(en)o(t)o(a)o(t)o(ions)d(for)j(t)n(h)o(e)q(s)q(e)h(fu)o
4544 (nct)o(ions)g(wit)n(hin)e(t)n(h)o(e)0 95 y(d)o(a)o(t)o(a)o(t)o(yp)q(e)q
4545 (s.)54 157 y(F)m(or)10 b(example,)g(reus)q(in)o(g)i(t)n(h)o(e)g(w)o
4546 (ell-form)o(e)q(d)d(form)n(ulas)g(example)h(\(s)q(ee)i(s)q(ect)o(ion)g
4547 (4.1.2\),)d(an)j(in)o(t)o(er)q(n)o(al)e(in)o(d)o(ex)h(on)g(t)n(h)o(e)h
4548 (d)o(a)o(t)o(a)o(t)o(yp)q(e)0 206 y Fs(Wff)h Fw(can)h(b)q(e)g(implem)n
4549 (en)o(t)o(e)q(d)e(as)i(follo)o(ws:)0 301 y Fs(#include)20
4550 b(<AD/rewrite/burs.h)o(>)0 351 y(class)h(WffIndex)f({)65
4551 401 y(int)i(state;)0 451 y(public:)65 500 y(WffIndex\(\))e(:)i
4552 (state\(BURS::unde)o(fined)o(_stat)o(e\))d({})65 550
4553 y(int)j(get_wff_state\(\))c(const)j({)h(return)e(state;)h(})65
4554 600 y(void)g(set_wff_state\(int)e(s\))i({)h(state)e(=)i(s;)f(})0
4555 650 y(};)0 750 y(datatype)f(Wff)h(:)h(public)e(WffIndex)65
4556 799 y(=)i(F)65 849 y(|)g(T)65 899 y(|)g(Var)108 b(\(const)21
4557 b(char)g(*\))65 949 y(|)h(And)108 b(\(Wff,)21 b(Wff\))65
4558 999 y(|)h(Or)130 b(\(Wff,)21 b(Wff\))65 1048 y(|)h(Not)108
4559 b(\(Wff\))65 1098 y(|)22 b(Implies)e(\(Wff,)h(Wff\))65
4560 1148 y(;)0 1248 y(...)0 1347 y(rewrite)f(Simplify)g({)65
4561 1397 y(index:)h(Wff)g(=)h(wff;)65 1447 y(...)0 1497 y(};)54
4562 1592 y Fw(Here,)12 b(t)n(h)o(e)f(class)h Fs(WffIndex)d
4563 Fw(pro)o(vid)o(e)q(s)i(t)n(h)o(e)g(in)o(t)o(er)q(n)o(al)f(in)o(d)o(ex)h
4564 (in)o(t)o(erf)q(ace)f(fu)o(nct)o(ions)h Fs(get_wff_state)d
4565 Fw(an)o(d)j Fs(set_wff_state)0 1641 y Fw(exp)q(ect)o(e)q(d)19
4566 b(b)o(y)e(t)n(h)o(e)g(rewr)q(it)o(er.)29 b(Not)o(e)18
4567 b(t)n(h)o(a)o(t)f(eac)o(h)h(t)o(erm)f(m)n(ust)f(b)q(e)h(init)o(ialize)q
4568 (d)f(wit)n(h)h(t)n(h)o(e)h(st)o(a)o(t)o(e)g Fs(BURS::undefined_s)o
4569 (tate)o Fw(.)0 1691 y(Thi)q(s)13 b(const)o(an)o(t)i(i)q(s)e(d)o(e\014n)
4570 o(e)q(d)i(wit)n(hin)f(t)n(h)o(e)g(library)f(includ)o(e)i(\014le)f
4571 Fs(<AD/rewrite/bur)o(s.h>)p Fw(.)54 1753 y(T)m(o)e(en)o(a)o(ble)i(t)n
4572 (h)o(e)g(in)o(d)o(ex,)g(in)f(t)n(h)o(e)h(rewr)q(it)o(er)h(w)o(e)f(sp)q
4573 (ecify)f(t)n(h)o(a)o(t)h(d)o(a)o(t)o(a)o(t)o(yp)q(e)f
4574 Fs(Wff)g Fw(sh)o(ould)h(m)o(ak)o(e)e(us)q(e)i(of)f(t)n(h)o(e)i(in)o(d)o
4575 (ex)f(n)o(am)o(e)q(d)e Fs(wff)p Fw(,)0 1803 y(us)q(in)o(g)i(t)n(h)o(e)g
4576 Fs(index:)j Fw(d)o(eclara)o(t)o(ion.)0 1922 y Fu(6.5.5)48
4577 b(Us)q(in)o(g)14 b(an)i(ext)o(er)q(n)o(al)d(in)o(d)o(ex)0
4578 2011 y Fw(Ext)o(er)q(n)o(al)f(in)o(dice)q(s)h(are)g(sp)q(eci\014e)q(d)h
4579 (in)e(a)g(s)q(imilar)d(m)o(ann)o(er.)17 b(Giv)o(en)12
4580 b(a)g(d)o(a)o(t)o(a)o(t)o(yp)q(e)h Fo(F)m(o)n(o)f Fw(an)o(d)g(an)h(ext)
4581 o(er)q(n)o(al)f(in)o(d)o(ex)h(n)o(am)o(e)q(d)e Fo(b)n(ar)p
4582 Fw(,)h(t)n(h)o(e)0 2061 y(rewr)q(it)o(er)j(in)o(v)o(ok)o(e)q(s)e(calls)
4583 h(t)o(o)g(t)n(h)o(e)h(follo)o(win)o(g)c(fu)o(nct)o(ions:)104
4584 2155 y Fs(int)21 b(get)p 260 2155 14 2 v 15 w Fc(bar)p
4585 341 2155 V 15 w Fs(state\()p Fc(Foo)p Fs(\))f(const;)104
4586 2205 y(void)h(set)p 282 2205 V 15 w Fc(bar)p 363 2205
4587 V 15 w Fs(state\()p Fc(Foo)p Fs(,)f(int\);)0 2300 y Fw(T)o(ypically)m
4588 (,)11 b(t)n(h)o(e)q(s)q(e)16 b(are)e(implem)n(en)o(t)o(e)q(d)e(as)i(m)o
4589 (em)n(b)q(er)d(fu)o(nct)o(ions)k(in)e(t)n(h)o(e)i(rewr)q(it)o(e)f
4590 (class.)54 2362 y(Th)o(e)g(rewr)q(it)o(er)h(us)q(e)q(s)g(t)n(h)o(e)f
4591 (fu)o(nct)o(ion)g Fs(get)p 683 2362 V 15 w Fc(bar)p 764
4592 2362 V 15 w Fs(state)f Fw(t)o(o)h(lo)q(okup)g(previously)f(cac)o(h)o(e)
4593 q(d)i(inform)o(a)o(t)o(ion)c(s)q(et)k(b)o(y)e(t)n(h)o(e)i(fu)o(nct)o
4594 (ion)0 2411 y Fs(set)p 69 2411 V 15 w Fc(bar)p 150 2411
4595 V 15 w Fs(state)p Fw(.)k(T)o(ypically)m(,)12 b(t)n(h)o(e)j(implem)n(en)
4596 o(t)o(a)o(t)o(i)o(on)c(of)j(t)n(h)o(e)h(t)o(w)o(o)f(fu)o(nct)o(ions)h
4597 (can)g(b)q(e)f(implem)n(en)o(t)o(e)q(d)f(as)h(h)o(ash)g(t)o(a)o(ble)q
4598 (s,)g(us)q(in)o(g)0 2461 y(t)n(h)o(e)f(addre)q(ss)q(e)q(s)i(of)d(t)n(h)
4599 o(e)h(t)o(erms)f(as)g(h)o(ash)h(fu)o(nct)o(ions)f(an)o(d)g(p)q(oin)o(t)
4600 o(er)h(equalit)o(y)e(compar)q(i)q(sons.)16 b(Not)o(e)d(t)n(h)o(a)o(t)f
4601 (cac)o(hin)o(g)h(can)f(b)q(e)h Fo(lossy)p Fw(;)0 2511
4602 y(i.e.)25 b(it)16 b(i)q(s)g(p)q(erfect)n(ly)h(alr)q(igh)o(t)e(for)h(t)n
4603 (h)o(e)h(cac)o(h)o(e)g(t)o(o)g(elimin)o(a)o(t)o(e)d(cac)o(h)o(e)q(d)k
4604 (inform)o(a)o(t)o(ion)13 b(t)o(o)k(k)o(eep)g(it)o(s)g(s)q(ize)f(u)o(n)o
4605 (d)o(er)i(con)o(trol.)25 b(If)16 b(no)0 2561 y(cac)o(h)o(e)f(inform)o
4606 (a)o(t)o(ion)10 b(i)q(s)k(fou)o(n)o(d,)f(t)n(h)o(e)i(fu)o(nct)o(ion)f
4607 Fs(get)p 800 2561 V 15 w Fc(bar)p 881 2561 V 15 w Fs(state)e
4608 Fw(sh)o(ould)i(ret)o(ur)q(n)h Fs(BURS::undefined_)o(state)o
4609 Fw(.)p eop
4610 %%Page: 44 45
4611 44 44 bop 0 -82 1981 3 v 0 -100 a Fq(6.)16 b Fp(Tree)k(Rewriting)1484
4612 b Fw(44)0 45 y Fu(Clas)q(s)20 b Fs(RewriteCache)39 b
4613 Fw(T)m(o)17 b(m)o(ak)o(e)g(it)h(easy)h(for)f(t)n(h)o(e)h(us)q(ers)h(t)o
4614 (o)e(implem)n(en)o(t)e(t)n(h)o(e)q(ir)j(o)o(wn)f(ext)o(er)q(n)o(al)g
4615 (in)o(dice)q(s,)h(t)o(w)o(o)f(sample)0 95 y(ext)o(er)q(n)o(al)g(in)o(d)
4616 o(ex)f(implem)n(en)o(t)o(a)o(t)o(ion)d(are)k(pro)o(vid)o(e)q(d.)29
4617 b(Th)o(e)18 b(\014rst)h(i)q(s)d(t)n(h)o(e)j(class)f Fs(RewriteCache)d
4618 Fw(d)o(e\014n)o(e)q(d)k(in)e(t)n(h)o(e)h(library)f(\014le)0
4619 145 y Fs(<AD/rewrite/cache)o(.h>)p Fw(.)54 206 y(Th)o(e)d(class)h
4620 Fs(RewriteCache)c Fw(implem)n(en)o(t)o(s)h(a)i(s)q(imple)d(\014xe)q(d)k
4621 (capacit)o(y)e(cac)o(h)o(e)i(wit)n(h)f(t)n(h)o(e)h(follo)o(win)o(g)c(m)
4622 o(em)n(b)q(er)h(fu)o(nct)o(ions.)65 301 y Fs(RewriteCache\(\);)65
4623 351 y(RewriteCache\(int)19 b(capacity\);)44 401 y(~RewriteCache\(\))o
4624 (;)65 500 y(void)i(clear\(\);)413 b(//)21 b(after)g(rewriting)65
4625 550 y(void)g(initialize\(\);)303 b(//)21 b(before)g(rewriting)65
4626 600 y(void)g(initialize\(int)e(capacity\);)42 b(//)21
4627 b(before)g(rewriting/also)e(set)i(capacity)65 700 y(int)h(capacity\(\))
4628 d(const;)65 799 y(void)i(set_state\(const)e(void)i(*)h(t,)f(int)g(s\);)
4629 65 849 y(int)h(get_state\(const)c(void)j(*)h(t\))f(const;)65
4630 949 y(void)g(invalidate\(const)e(void)i(*)g(t\);)54 1043
4631 y Fw(Th)o(e)13 b(us)q(er)i(sh)o(ould)e(call)g(t)n(h)o(e)h(fu)o(nct)o
4632 (ion)f Fs(initialize)e Fw(b)q(efore)j(rewr)q(it)o(in)o(g)f(in)g(ord)o
4633 (er)i(t)o(o)e(s)q(et)o(up)h(t)n(h)o(e)g(cac)o(h)o(e)h(an)o(d/or)d
4634 (clear)j(ou)o(t)0 1093 y(previously)h(cac)o(h)o(e)q(d)h(re)q(sul)o(t.)
4635 25 b(Th)o(e)16 b(fu)o(nct)o(ions)h Fs(set_state)d Fw(an)o(d)h
4636 Fs(get_state)f Fw(can)i(b)q(e)g(us)q(e)q(d)h(t)o(o)f(implem)o(en)o(t)d
4637 (t)n(h)o(e)j(n)o(ece)q(ssary)0 1143 y(st)o(a)o(t)o(e)e(cac)o(hin)o(g)h
4638 (fu)o(nct)o(ions)f(exp)q(ect)o(e)q(d)h(b)o(y)f(t)n(h)o(e)g(rewr)q(it)o
4639 (er.)54 1205 y(Ret)o(ur)q(nin)o(g)f(t)o(o)h(our)g Fs(Wff)f
4640 Fw(example,)f(w)o(e)i(h)o(a)o(v)o(e)g(t)n(h)o(e)g(follo)o(win)o(g)e(p)q
4641 (oss)q(ible)i(implem)n(en)o(t)o(a)o(t)o(i)o(on)d(of)i(t)n(h)o(e)i(ext)o
4642 (er)q(n)o(al)f(in)o(d)o(ex:)65 1299 y Fs(rewrite)21 b(class)f(Simplify)
4643 h(\(Wff\))65 1349 y({)44 b(RewriteCache)19 b(cache;)65
4644 1399 y(public:)131 1449 y(int)i(get_wff_state\(Wff)d(t\))k(const)e({)i
4645 (return)e(cache.get_state\(t\);)e(})131 1499 y(void)j
4646 (set_wff_state\(Wf)o(f)e(t,)i(int)h(s\))f({)h(cache.set_state)o
4647 (\(t,s\))o(;)d(})65 1549 y(};)65 1648 y(rewrite)i(Simplify)65
4648 1698 y({)44 b(index:)20 b(Wff)h(=)h(extern)f(wff;)131
4649 1748 y(...)65 1798 y(};)0 1892 y Fu(Tip)q(s:)81 b Fw(If)15
4650 b(m)o(an)n(ual)e(m)o(emory)f(m)o(an)o(agem)o(en)o(t)h(i)q(s)h(us)q(e)q
4651 (d,)i(a)e(t)o(erm)h(sh)o(ould)f(not)h(b)q(e)g(d)o(eallo)q(ca)o(t)o(e)q
4652 (d)h(f)q(rom)d(m)o(emory)f(if)i(a)h(cac)o(h)o(e)0 1942
4653 y(con)o(t)o(ains)g(a)f(h)o(an)o(dle)h(t)o(o)g(it.)21
4654 b(Th)o(e)15 b(m)o(et)n(h)o(o)q(d)f Fs(invalidate)f Fw(can)i(b)q(e)g(us)
4655 q(e)q(d)h(t)o(o)f(m)o(ak)o(e)e(sure)j(t)n(h)o(e)g(en)o(try)f(asso)q
4656 (cia)o(t)o(e)q(d)h(wit)n(h)f(a)g(t)o(erm)0 1992 y(i)q(s)e(remo)o(v)o(e)
4657 q(d)g(f)q(rom)f(t)n(h)o(e)j(cac)o(h)o(e.)0 2112 y Fu(Clas)q(s)g
4658 Fs(GCRewriteCache)40 b Fo(This)14 b(class)h(has)g(not)g(b)n(e)g(c)n
4659 (ompletely)g(teste)n(d.)54 2173 y Fw(Since)j(a)g(garbage)f(collect)o(a)
4660 o(ble)g(ob)r(ject)i(i)q(s)e(not)h(reclaim)o(e)q(d)f(b)o(y)h(t)n(h)o(e)h
4661 (collect)o(or)f(wh)o(en)o(ev)o(er)h(t)n(h)o(ere)h(exi)q(st)o(s)e(a)g
4662 (reference)j(t)o(o)0 2223 y(it,)c(us)q(in)o(g)f(t)n(h)o(e)i(class)f
4663 Fs(RewriteCache)e Fw(m)o(ay)g(crea)o(t)o(e)j(problems)e(s)q(ince)h(ob)r
4664 (ject)o(s)h(are)f(not)g(reclaim)o(e)q(d)f(if)g(it)g(i)q(s)h(reference)q
4665 (d)i(b)o(y)0 2273 y(t)n(h)o(e)h(cac)o(h)o(e.)34 b(Th)o(e)19
4666 b(t)o(empla)o(t)o(e)f(class)i Fs(GCRewriteCache)c Fw(solv)o(e)q(s)j(t)n
4667 (hi)q(s)g(problem)e(b)o(y)i(us)q(in)o(g)g Fo(we)n(ak)g(p)n(ointers)g
4668 Fw(in)f(it)o(s)i(in)o(t)o(er)q(n)o(al)0 2323 y(implem)n(en)o(t)o(a)o(t)
4669 o(io)o(n.)54 2384 y(Th)o(e)15 b(t)o(empla)o(t)o(e)e(class)i
4670 Fs(GCRewriteCache<T>)c Fw(exp)q(ect)o(s)17 b Fs(T)d Fw(t)o(o)i(b)q(e)e
4671 (a)h(class)g(d)o(er)q(iv)o(e)q(d)h(f)q(rom)d Fs(GCObject)p
4672 Fw(.)19 b(Thi)q(s)14 b(class)h(imple-)0 2434 y(m)o(en)o(t)o(s)f(t)n(h)o
4673 (e)g(follo)o(win)o(g)d(fu)o(nct)o(ions:)65 2529 y Fs
4674 (GCRewriteCache\(\);)65 2579 y(GCRewriteCache\(int)18
4675 b(capacity\);)44 2629 y(~GCRewriteCache)o(\(\);)p eop
4676 %%Page: 45 46
4677 45 45 bop 0 -82 1981 3 v 0 -100 a Fq(6.)16 b Fp(Tree)k(Rewriting)1484
4678 b Fw(45)65 95 y Fs(void)21 b(clear\(\);)413 b(//)21 b(after)g
4679 (rewriting)65 145 y(void)g(initialize\(\);)303 b(//)21
4680 b(before)g(rewriting)65 195 y(void)g(initialize\(int)e(capacity\);)42
4681 b(//)21 b(before)g(rewriting/also)e(set)i(capacity)65
4682 294 y(int)h(capacity\(\))d(const;)65 394 y(void)i(set_state\(T)f(*)h
4683 (t,)h(int)f(s\);)65 444 y(int)h(get_state\(T)d(*)j(t\))f(const;)65
4684 543 y(void)g(invalidate\(T)f(*)h(t\);)54 638 y Fw(Th)o(e)14
4685 b(usage)g(of)f(t)n(h)o(e)q(s)q(e)j(fu)o(nct)o(ions)e(are)g(id)o(en)o(t)
4686 o(ical)f(t)o(o)h(t)n(h)o(a)o(t)g(of)g(class)g Fs(RewriteCache)p
4687 Fw(.)0 766 y FF(6.6)56 b(Sh)o(ort)18 b(circuit)n(in)o(g)g(rewr)q(it)n
4688 (e)g(pa)o(t)n(hs)g(wit)n(h)g FC(cutrewrite)0 855 y Fw(F)m(rom)d(v)o
4689 (ers)q(ion)i(2.3.0)f(on)o(w)o(ard,)h(t)n(h)o(e)h Fs(cutrewrite)p
4690 Fw(\()p Ft(e)p Fw(\))d(st)o(a)o(t)o(em)o(en)o(t)i(m)o(ay)e(b)q(e)i(us)q
4691 (e)q(d)h(wh)o(erev)o(er)h(a)e Fs(rewrite)p Fw(\()p Ft(e)p
4692 Fw(\))f(st)o(a)o(t)o(em)o(en)o(t)h(i)q(s)0 904 y(exp)q(ect)o(e)q(d.)22
4693 b(Th)o(e)15 b Fs(cutrewrite)d Fw(st)o(a)o(t)o(em)o(en)o(t)i(can)h(b)q
4694 (e)g(us)q(e)q(d)g(t)o(o)g(s)q(elect)o(iv)o(ely)g(ignore)f(cert)o(ain)h
4695 (su)n(bt)o(erms)g(d)o(ur)q(in)o(g)g(t)n(h)o(e)g(rewr)q(it)o(in)o(g)0
4696 954 y(pro)q(ce)q(ss.)54 1016 y(Th)o(e)k(s)q(em)o(an)o(t)o(ics)e(of)h
4697 Fs(cutrewrite)p Fw(\()p Ft(e)p Fw(\))f(i)q(s)h(t)o(o)h(replace)g(t)n(h)
4698 o(e)g(curren)o(t)h(re)q(d)o(ex)g(wit)n(h)f Ft(e)g Fw(bu)o(t)g(do)f(not)
4699 h(b)q(ot)n(h)o(er)h(wit)n(h)e(lo)q(okin)o(g)0 1066 y(for)g(ot)n(h)o(er)
4700 g(re)q(d)o(exe)q(s)j(in)c(t)n(h)o(e)i(replacem)o(en)o(t)e(t)o(erm.)29
4701 b(Thi)q(s)17 b(m)o(eans)h(t)n(h)o(a)o(t)g(t)n(h)o(e)g(replacem)o(en)o
4702 (t)g(t)o(erm)f(will)f(not)i(b)q(e)g(re-tra)o(v)o(ers)q(e)q(d)0
4703 1115 y(imm)o(e)q(dia)n(t)o(ely)m(.)30 b(F)m(urt)n(h)o(ermore,)20
4704 b(t)n(h)o(e)g(replace)q(d)g(t)o(erm)e(will)g(not)h(m)o(a)o(t)o(c)o(h)e
4705 (an)o(y)i(ot)n(h)o(er)h(left)f(h)o(an)o(d)f(s)q(id)o(e)i(su)n(b-pa)o(t)
4706 n(t)o(er)q(ns)h(except)0 1165 y(pa)o(t)n(t)o(er)q(n)15
4707 b(v)n(ar)q(ia)o(ble)q(s)d(an)o(d)i(wildcards.)54 1227
4708 y(Thi)q(s)f(fea)o(t)o(ure)i(i)q(s)e(v)o(ery)i(us)q(eful)e(for)h(prev)o
4709 (en)o(t)o(in)o(g)g(t)n(h)o(e)h(rewr)q(it)o(er)g(f)q(rom)d(lo)q(okin)o
4710 (g)g(ins)q(id)o(e)i(cert)o(ain)g(t)o(erms.)54 1288 y(T)m(o)f(d)o
4711 (emonstra)o(t)o(e,)g(cons)q(id)o(er)i(t)n(h)o(e)g(s)q(imple)c(follo)o
4712 (win)o(g)g(example:)65 1383 y Fs(datatype)21 b(Exp)g(=)g(NUM)g(of)h
4713 (int)349 1433 y(|)f(ADD)g(of)h(Exp,)f(Exp)349 1483 y(|)g(SUB)g(of)h
4714 (Exp,)f(Exp)349 1533 y(|)g(MUL)g(of)h(Exp,)f(Exp)349
4715 1583 y(|)g(DIV)g(of)h(Exp,)f(Exp)349 1632 y(|)g(FINAL)g(of)g(Exp)349
4716 1682 y(;)65 1732 y(Exp)h(e)f(=)h(ADD\(NUM\(1\),MUL\(N)o(UM\(2\))o
4717 (,NUM\()o(3\)\)\);)54 1827 y Fw(Sup)o(p)q(os)q(e)14 b(w)o(e)f(w)o(an)o
4718 (t)g(t)o(o)g(\014n)o(d)g(all)f(n)n(u)o(m)n(b)q(ers)h(wit)n(hin)g(t)n(h)
4719 o(e)h(expre)q(ss)q(ion)g Fs(e)f Fw(an)o(d)g(increm)o(en)o(t)g(t)n(h)o
4720 (e)q(ir)g(v)n(alue)q(s)g(b)o(y)g(1.)18 b(Th)o(e)13 b(straigh)o(t)0
4721 1877 y(forw)o(ard)g(w)o(ay)h(of)f(wr)q(it)o(in)o(g:)65
4722 1971 y Fs(rewrite)21 b(\(e\))g(type)g(\(Exp\))g({)131
4723 2021 y(NUM)g(x:)g(NUM\(x+1\))65 2071 y(})0 2166 y Fw(will)12
4724 b(not)i(w)o(or)o(k,)g(s)q(ince)g(t)n(h)o(e)h(replacem)o(en)o(t)e(t)o
4725 (erm)g(i)q(s)g(a)h(n)o(ew)g(re)q(d)o(ex,)h(an)o(d)f(t)n(h)o(e)g(rewr)q
4726 (it)o(in)o(g)g(syst)o(em)g(will)e(not)i(t)o(ermin)o(a)o(t)o(e.)54
4727 2228 y(W)m(e)g(can)g(re)q(implem)o(en)o(t)e(t)n(h)o(e)j(rewr)q(it)o(in)
4728 o(g)f(syst)o(em)g(as)h(a)f(t)o(w)o(o)g(st)o(age)g(pro)q(ce)q(ss.)22
4729 b(First,)15 b(w)o(e)f(m)o(ar)o(k)g(all)f(t)o(erms)h(t)n(h)o(a)o(t)g(w)o
4730 (e)h(do)f(not)0 2277 y(w)o(an)o(t)j(t)o(o)g(b)q(e)g(c)o(h)o(an)o(ge)q
4731 (d;)i(wh)o(en)o(ev)o(er)g(w)o(e)e(\014n)o(d)g(a)g(m)o(ar)o(k)o(e)q(d)g
4732 (t)o(erm,)g(w)o(e)g(execu)o(t)o(e)i(a)e Fs(cutrewrite)e
4733 Fw(t)o(o)j(prev)o(en)o(t)g(t)n(h)o(e)g(t)o(erm)e(f)q(rom)0
4734 2327 y(b)q(e)q(in)o(g)e(c)o(h)o(an)o(ge)q(d.)19 b(Th)o(en)14
4735 b(w)o(e)g(u)o(nm)o(ar)o(k)f(t)n(h)o(e)i(t)o(erms.)65
4736 2422 y Fs(rewrite)21 b(\(e\))g(type)g(\(Exp\))g({)131
4737 2472 y(NUM)g(x:)65 b(FINAL\(NUM\(x+1\)\);)65 2522 y(preorder:)131
4738 2571 y(FINAL)21 b(_:)g(cutrewrite;)65 2621 y(})p eop
4739 %%Page: 46 47
4740 46 46 bop 0 -82 1981 3 v 0 -100 a Fq(6.)22 b Fp(Tree)d(Rewriting)1479
4741 b Fw(46)65 45 y Fs(rewrite)21 b(\(e\))g(type)g(\(Exp\))g({)131
4742 95 y(FINAL)g(x:)g(x)65 145 y(})54 228 y Fw(In)c(t)n(h)o(e)g(\014rst)h
4743 (rewr)q(it)o(e)f(st)o(a)o(t)o(em)o(en)o(t,)g(replacem)o(en)o(t)f(t)o
4744 (erms)h(t)n(h)o(a)o(t)g(w)o(e)g(w)o(an)o(t)f(t)o(o)i(st)o(ay)f(\014xe)q
4745 (d)g(are)g(encapsula)o(t)o(e)q(d)i(wit)n(hin)d(t)n(h)o(e)0
4746 278 y(a)n(uxiliary)e Fs(FINAL)f Fw(constru)o(ct)o(or.)24
4747 b(Recall)14 b(t)n(h)o(a)o(t)h(preord)o(er)i(rule)q(s)f(are)f(tr)q(ie)q
4748 (d)g(b)q(efore)h(t)n(h)o(e)f(su)n(bt)o(erms)h(of)e(a)h(re)q(d)o(ex)h
4749 (are)g(re)q(d)o(u)o(ce)q(d.)0 328 y(Th)n(us)j(w)o(e)g(can)f(m)o(ak)o(e)
4750 f(sure)i(all)f(t)n(h)o(a)o(t)g(all)f(t)o(erms)h(t)n(h)o(a)o(t)h(are)f
4751 (argu)o(m)o(en)o(t)o(s)h(t)o(o)f(a)g Fs(FINAL)g Fw(t)o(erm)f(i)q(s)h
4752 (left)g(u)o(n)o(al)o(t)o(ere)q(d)i(b)o(y)e(addin)o(g)0
4753 378 y(a)e Fs(preorder)f Fw(rule)i(t)n(h)o(a)o(t)g(execu)o(t)o(e)q(s)j
4754 (a)c Fs(cutrewrite)828 363 y Fn(10)878 378 y Fw(Fin)o(ally)m(,)f(aft)o
4755 (er)i(t)n(h)o(e)g(\014rst)h(rewr)q(it)o(e)f(st)o(a)o(t)o(em)o(en)o(t)f
4756 (\014ni)q(sh)o(e)q(s,)i(w)o(e)f(us)q(e)g(t)n(h)o(e)0
4757 427 y(s)q(econ)o(d)e(rewr)q(it)o(e)f(st)o(a)o(t)o(em)o(en)o(t)f(t)o(o)h
4758 (remo)o(v)o(e)f(all)g Fs(FINAL)g Fw(t)o(erms)g(gen)o(era)o(t)o(e)q(d)j
4759 (in)d(t)n(h)o(e)i(\014rst.)54 489 y(Th)o(e)f(s)q(em)o(an)o(t)o(ics)f
4760 (of)g Fs(cutrewrite)f Fw(n)o(ee)q(ds)j(furt)n(h)o(er)g(explan)o(a)o(t)o
4761 (ion.)h(Cons)q(id)o(er)f(t)n(h)o(e)f(follo)o(win)o(g)d(rewr)q(it)o(e)k
4762 (syst)o(em:)65 573 y Fs(rewrite)21 b(\(e\))g(type)g(\(Exp\))g({)131
4763 622 y(NUM)g(x:)217 b(cutrewrite\(NUM\(x+1\)\))65 672
4764 y(|)44 b(MUL\(X,)20 b(NUM)h(1\):)43 b(X)65 722 y(|)h(MUL\(NUM)20
4765 b(1,X\):)64 b(X)65 772 y(})0 855 y Fw(Giv)o(en)12 b(t)n(h)o(e)i(t)o
4766 (erm)e Fs(MUL\(NUM\(0\),NUM\(2\)\))p Fw(,)d(t)n(h)o(e)14
4767 b(su)n(bt)o(erms)f Fs(NUM\(0\))f Fw(an)o(d)h Fs(NUM\(1\))e
4768 Fw(will)h(b)q(e)h(rewr)q(it)n(t)o(en)h(b)o(y)f(t)n(h)o(e)g(\014rst)h
4769 (rule)f(in)o(t)o(o)0 905 y Fs(NUM\(1\))e Fw(an)o(d)h
4770 Fs(NUM\(3\))e Fw(re)q(sp)q(ect)o(iv)o(ely)m(.)18 b(F)m(urt)n(h)o
4771 (ermore,)12 b(t)n(h)o(e)h(replacem)o(en)o(t)f(t)o(erm)f
4772 Fs(NUM\(1\))g Fw(will)g Fo(not)h Fw(m)o(a)o(t)o(c)o(h)f(t)n(h)o(e)i
4773 (left)f(su)n(b)o(pa)o(t)n(t)o(er)q(n)0 955 y(in)h Fs(MUL\(NUM)21
4774 b(1,X\))p Fw(.)12 b(Th)n(us)j(t)n(h)o(e)g(re)q(sul)o(t)g(of)e(t)n(h)o
4775 (e)i(rewr)q(it)o(e)f(will)e(b)q(e)i Fs(MUL\(NUM\(1\),NUM\(3\)\))p
4776 Fw(.)0 1017 y Fu(Tip)q(s:)78 b Fw(Since)15 b(t)n(h)o(e)f(s)q(em)o(an)o
4777 (t)o(ics)f(of)h(a)g(rewr)q(it)o(in)o(g)g(syst)o(em)g(wit)n(h)g
4778 Fs(cutrewrite)e Fw(can)i(b)q(e)g(tr)q(ic)o(ky)g(t)o(o)g(an)o(alyze,)g
4779 (it)o(s)g(us)q(e)h(sh)o(ould)0 1066 y(b)q(e)f(a)o(v)o(oid)o(e)q(d)f(as)
4780 h(m)n(u)o(c)o(h)f(as)h(p)q(oss)q(ible.)0 1192 y FF(6.7)56
4781 b(Con)n(dit)n(ion)o(al)19 b(f)q(ailure)e(wit)n(h)h FC(failrewrite)0
4782 1280 y Fw(F)m(rom)8 b(v)o(ers)q(ion)i(2.3.0)f(on)o(w)o(ard,)h(t)n(h)o
4783 (e)g Fs(failrewrite)e Fw(st)o(a)o(t)o(em)o(en)o(t)i(m)o(ay)e(b)q(e)i
4784 (us)q(e)q(d)h(wh)o(erev)o(er)h(a)d Fs(rewrite)g Fw(st)o(a)o(t)o(em)o
4785 (en)o(t)g(i)q(s)h(exp)q(ect)o(e)q(d.)0 1330 y(Th)o(e)16
4786 b Fs(failrewrite)e Fw(st)o(a)o(t)o(em)o(en)o(t)h(i)q(s)h(an)g(al)o(t)o
4787 (er)q(n)o(a)o(t)o(e)g(w)o(ay)f(of)h(wr)q(it)o(in)o(g)f(con)o(dit)o(ion)
4788 o(al)f(rewr)q(it)o(in)o(g)i(rule)q(s,)h(an)o(d)f(it)g(i)q(s)f(oft)o(en)
4789 h(us)q(eful)0 1380 y(wh)o(en)e(t)n(h)o(e)h(con)o(dit)o(ion)e(t)o(o)h(b)
4790 q(e)g(c)o(h)o(ec)o(k)o(e)q(d)h(i)q(s)e(t)o(o)q(o)h(complex)f(t)o(o)h(b)
4791 q(e)g(wr)q(it)n(t)o(en)g(as)g(a)f(guard.)54 1442 y(Wh)o(en)i(a)g
4792 Fs(failrewrite)e Fw(st)o(a)o(t)o(em)o(en)o(t)i(i)q(s)f(execu)o(t)o(e)q
4793 (d)k(wit)n(hin)d(t)n(h)o(e)h(rhs)g(act)o(ion)f(of)f(a)h(rewr)q(it)o(e)h
4794 (rule,)g(t)n(h)o(e)g(curren)o(t)g(pa)o(t)n(t)o(er)q(n)h(i)q(s)0
4795 1491 y(reject)o(e)q(d)f(an)o(d)d(t)n(h)o(e)i(rewr)q(it)o(er)g(will)d
4796 (pro)q(cee)q(d)k(t)o(o)e(try)g(ot)n(h)o(er)h(m)o(a)o(t)o(c)o(h)o(e)q
4797 (s.)54 1553 y(F)m(or)d(inst)o(ance,)h(sup)o(p)q(os)q(e)i(t)n(h)o(e)e
4798 (curren)o(t)h(re)q(d)o(ex)h(i)q(s)d Fs(DIV\(INT)20 b(0,INT)h(0\))13
4799 b Fw(an)o(d)f(t)n(h)o(e)i(follo)o(win)o(g)c(rule)q(s)k(are)f(sp)q
4800 (eci\014e)q(d)h(wit)n(hin)e(a)0 1603 y(rewr)q(it)o(in)o(g)i(syst)o(em:)
4801 65 1686 y Fs(DIV\(INT)21 b(X,INT)f(Y\):)i({)f(if)h(\(Y)f(==)g(0\))h
4802 (failrewrite;)d(else)i(rewrite\(NUM\(X/Y\);)d(})0 1736
4803 y(|)43 b(DIV\(INT)21 b(0,Y\):)108 b(NUM\(0\))54 1820
4804 y Fw(Th)o(e)15 b(execu)o(t)o(ion)h(of)e(t)n(h)o(e)q(s)q(e)i(rule)q(s)g
4805 (will)d(pro)q(cee)q(d)k(as)e(follo)o(ws:)j(b)q(ot)n(h)d(pa)o(t)n(t)o
4806 (er)q(ns)h(m)o(a)o(t)o(c)o(h)e(t)n(h)o(e)h(re)q(d)o(ex,)h(bu)o(t)g(t)n
4807 (h)o(e)f(\014rst)h(rule)f(will)0 1869 y(b)q(e)h(tr)q(ie)q(d)g(\014rst.)
4808 26 b(Since)16 b Fs(Y)g Fw(i)q(s)g(zero,)h(t)n(h)o(e)g
4809 Fs(failrewrite)c Fw(st)o(a)o(t)o(em)o(en)o(t)j(i)q(s)f(execu)o(t)o(e)q
4810 (d.)27 b(Th)o(e)16 b(rewr)q(it)o(er)h(will)e(pro)q(cee)q(d)j(t)o(o)e
4811 (try)g(t)n(h)o(e)0 1919 y(s)q(econ)o(d)g(rule)f(an)o(d)g(t)n(h)o(e)h
4812 (re)q(d)o(ex)g(will)e(b)q(e)h(replace)q(d)h(wit)n(h)f
4813 Fs(NUM\(0\))p Fw(.)20 b(Not)o(e)c(t)n(h)o(a)o(t)f(if)f(w)o(e)h(omit)e
4814 (t)n(h)o(e)j Fs(failrewrite)d Fw(st)o(a)o(t)o(em)o(en)o(t)h(in)0
4815 1969 y(t)n(h)o(e)h(\014rst)g(rule,)e(as)h(in:)65 2053
4816 y Fs(DIV\(INT)21 b(X,INT)f(Y\):)i({)f(if)h(\(Y)f(!=)g(0\))h
4817 (rewrite\(NUM\(X/Y\))o(;)d(})0 2102 y(|)43 b(DIV\(INT)21
4818 b(0,Y\):)108 b(NUM\(0\))0 2186 y Fw(t)n(h)o(e)15 b(rewr)q(it)o(er)f
4819 (will)f(commit)e(on)i(t)n(h)o(e)i(\014rst)g(rule)f(an)o(d)g(no)f(act)o
4820 (ion)h(will)e(b)q(e)i(p)q(erform)o(e)q(d)f(on)h(t)n(h)o(e)g(re)q(d)o
4821 (ex.)54 2247 y(Lik)o(e)c Fs(rewrite)f Fw(an)o(d)h Fs(cutrwerite)p
4822 Fw(,)e Fs(failrewrite)h Fw(act)o(s)i(as)g(a)f(branc)o(hin)o(g)h(st)o(a)
4823 o(t)o(em)o(en)o(t)e(an)o(d)i(all)e(st)o(a)o(t)o(em)o(en)o(t)o(s)h(imm)o
4824 (e)q(dia)o(t)o(e)q(dly)0 2297 y(follo)o(win)o(g)h Fs(failrewrite)h
4825 Fw(are)i(d)o(ead)h(co)q(d)o(e.)0 2423 y FF(6.8)56 b(Con\015uence)18
4826 b(an)n(d)i(t)n(ermin)o(a)o(t)n(ion)0 2511 y Fw(Curren)o(t)n(ly)d(no)f
4827 (a)n(u)o(t)o(om)o(a)o(t)o(ic)g(c)o(h)o(ec)o(kin)o(g)h(i)q(s)f(a)o(v)n
4828 (aila)o(ble)d(t)o(o)k(m)o(ak)o(e)e(sure)j(t)n(h)o(a)o(t)e(a)h(s)q(et)g
4829 (of)f(rewr)q(it)o(in)o(g)g(rule)q(s)h(i)q(s)f(con\015uen)o(t)h(an)o(d)f
4830 (will)0 2561 y(t)o(ermin)o(a)o(t)o(e.)g(Thi)q(s)11 b(i)q(s)h(curren)o
4831 (t)n(ly)g(t)n(h)o(e)h(us)q(er's)f(re)q(sp)q(ons)q(ibilit)o(y)m(.)k(Som)
4832 o(e)11 b(v)o(er)q(i\014ca)o(t)o(ion)g(fea)o(t)o(ure)q(s)i(will)d(b)q(e)
4833 i(d)o(ev)o(elo)o(p)q(e)q(d)g(in)f(t)n(h)o(e)i(fu)o(t)o(ure.)p
4834 0 2590 792 2 v 31 2617 a Fm(10)64 2629 y Fl(If)e(an)g(expre)q(ssion)f
4835 (argum)o(en)n(t)f(is)j(not)f(giv)o(en)f(to)g(a)i Fk(cutrewrite)c
4836 Fl(st)o(a)o(t)o(em)o(en)o(t,)h(t)o(h)o(en)h(t)o(h)o(e)g(re)q(d)o(ex)g
4837 (is)i(left)f(unc)o(h)o(anged.)p eop
4838 %%Page: 47 48
4839 47 47 bop 0 -82 1981 3 v 0 -100 a Fq(6.)22 b Fp(Tree)d(Rewriting)1479
4840 b Fw(47)0 45 y FF(6.9)56 b(De)o(buggin)o(g)18 b(T)-5
4841 b(ree)18 b(Rewr)q(it)n(in)o(g)0 134 y Fw(By)12 b(d)o(ef)q(a)n(ul)o(t,)g
4842 Fz(Pro)o(p)g Fw(gen)o(era)o(t)o(e)q(s)i(a)d(m)o(acro)f
4843 Fs(DEBUG_)p Ft(C)k Fw(for)d(eac)o(h)i(rewr)q(it)o(e)f(class)g(n)o(am)o
4844 (e)q(d)f Ft(C)s Fw(.)17 b(Th)o(e)12 b(us)q(er)h(can)f(re)q(d)o(e\014n)o
4845 (e)i(t)n(hi)q(s)d(m)o(acro)0 183 y(in)16 b(ord)o(er)i(t)o(o)g(trace)g
4846 (t)n(h)o(e)f(replacem)o(en)o(t)o(s)g(t)n(h)o(a)o(t)g(are)g(p)q(erform)o
4847 (e)q(d)f(d)o(ur)q(in)o(g)h(t)n(h)o(e)h(execu)o(t)o(ion)f(of)g(a)f(s)q
4848 (et)i(of)e(rewr)q(it)o(in)o(g)h(rule)q(s.)28 b(Th)o(e)0
4849 233 y(d)o(ef)q(a)n(ul)o(t)14 b(d)o(e\014nit)o(ion)g(of)f
4850 Fs(DEBUG_)p Ft(C)i Fw(i)q(s)f(as)g(follo)o(ws:)433 320
4851 y Fs(#define)20 b(DEBUG_)o Ft(C)s Fw(\()p Fo(R)r Ft(;)7
4852 b Fo(r)n(e)n(dex)e Ft(;)i Fo(\014lename)s Ft(;)g Fo(linenumb)n(er)t
4853 Ft(;)g Fo(ruletext)r Fw(\))14 b Fo(R)0 408 y Fw(i.e.)j(it)d(s)q(imply)d
4854 (ret)o(ur)q(ns)k(t)n(h)o(e)f(v)n(alue)g(of)f Fo(R)p Fw(.)54
4855 469 y(Th)o(e)h(argu)o(m)o(en)o(t)o(s)g(t)o(o)g(t)n(h)o(e)g(m)o(acro)f
4856 (are)h(as)g(follo)o(ws:)62 561 y Fi(\017)21 b Fo(R)14
4857 b Fw(i)q(s)f(t)n(h)o(e)i(n)o(ew)f(replacem)o(en)o(t)f(t)o(erm.)62
4858 642 y Fi(\017)21 b Fo(r)n(e)n(dex)14 b Fw(i)q(s)f(t)n(h)o(e)h(curren)o
4859 (t)i(re)q(d)o(ex,)f(b)q(efore)f(t)n(h)o(e)g(replacem)o(en)o(t)g(h)o(as)
4860 f(b)q(een)i(p)q(erform)o(e)q(d.)62 723 y Fi(\017)21 b
4861 Fo(\014lename)14 b Fw(i)q(s)g(t)n(h)o(e)g(\014le)g(n)o(am)o(e)f(of)g(t)
4862 n(h)o(e)i(curren)o(t)g(rewr)q(it)o(in)o(g)f(rule.)62
4863 805 y Fi(\017)21 b Fo(linenumb)n(er)14 b Fw(i)q(s)f(t)n(h)o(e)h(lo)q
4864 (ca)o(t)o(ion)f(of)h(t)n(h)o(e)g(curren)o(t)h(rewr)q(it)o(in)o(g)f
4865 (rule.)62 886 y Fi(\017)21 b Fo(ruletext)13 b Fw(i)q(s)g(a)h(str)q(in)o
4866 (g)g(t)n(h)o(a)o(t)g(d)o(e)q(scr)q(ib)q(e)q(s)i(t)n(h)o(e)e(curren)o(t)
4867 i(rule.)54 978 y(In)e(ord)o(er)h(t)o(o)f(act)o(iv)n(a)o(t)o(e)f(tracin)
4868 o(g,)h(t)n(h)o(e)g(us)q(er)h(can)f(re)q(d)o(e\014n)o(e)i(t)n(h)o(e)f(m)
4869 o(acro)e Fs(DEBUG_FOO)f Fw(\(for)h(rewr)q(it)o(e)i(class)f
4870 Fs(FOO)p Fw(\))g(as)g(follo)o(ws:)0 1069 y Fs(#define)20
4871 b(DEBUG_FOO\(a,b,c,d,e)o(\))f(print_rule\(a,b,c,)o(d,e\))0
4872 1169 y(template)h(<class)h(T>)44 1219 y(T)g(print_rule\(T)e
4873 (replacement,)h(T)h(redex,)327 1268 y(const)g(char)g(*)g(file_name,)327
4874 1318 y(int)g(line,)g(const)g(char)g(*)g(rule_text\))44
4875 1368 y({)g(cerr)g(<<)h(file_name)d(<<)j(':')f(<<)g(line)g(<<)h(":)f(")h
4876 (<<)f(rule_text)196 1418 y(<<)h(")f(redex)g(=)g(")h(<<)f(redex)g(<<)h
4877 (")f(replacement)f(=)h(")h(<<)f(replacement)196 1468
4878 y(<<)h(endl;)87 1518 y(return)f(replacement;)44 1567
4879 y(})0 1659 y Fw(Not)o(e)14 b(t)n(h)o(a)o(t)g(t)n(h)o(e)q(s)q(e)i(d)o
4880 (e\014nit)o(ions)e(m)n(ust)f(ap)o(p)q(ear)h(b)q(efore)g(t)n(h)o(e)h
4881 Fs(rewrite)20 b(FOO)13 b Fw(d)o(eclara)o(t)o(ion.)0 1786
4882 y FF(6.10)56 b(Opt)n(imizin)o(g)16 b(T)-5 b(ree)18 b(Rewr)q(it)n(in)o
4883 (g)0 1875 y Fw(An)d(exp)q(er)q(im)o(en)o(t)o(al)e(rewr)q(it)o(in)o(g)i
4884 (o)o(pt)o(imizer)f(bas)q(e)q(d)h(on)g(part)o(ial)f(ev)n(alua)o(t)o(ion)
4885 f(t)o(ec)o(hnique)q(s)j(h)o(as)f(b)q(een)h(implem)n(en)o(t)o(e)q(d)d
4886 (in)h(releas)q(e)0 1924 y(2.3.4)e(of)h Fz(Pro)o(p)p Fw(.)19
4887 b(Th)o(e)14 b(o)o(pt)o(imizer)f(can)h(b)q(e)g(en)o(a)o(ble)q(d)f(wit)n
4888 (h)h(t)n(h)o(e)h(o)o(pt)o(ion)e Fs(-Orewriting)p Fw(.)54
4889 1986 y(Inform)o(ally)f(sp)q(eakin)o(g,)17 b(t)n(h)o(e)f(rewr)q(it)o(in)
4890 o(g)g(o)o(pt)o(imizer)e(will)h(try)h(t)o(o)g(lo)q(ca)o(t)o(e)g(\\lon)o
4891 (ger")f(re)q(d)o(u)o(ct)o(ion)i(s)q(equence)g(an)o(d)f(add)f(t)n(h)o(e)
4892 q(s)q(e)0 2036 y(t)o(o)h(y)o(our)g(rewr)q(it)o(in)o(g)f(rule)q(s.)25
4893 b(Th)o(e)16 b(re)q(sul)o(t)h(i)q(s)f(t)n(h)o(a)o(t)f(d)o(ur)q(in)o(g)h
4894 (execu)o(t)o(ion)h(t)n(h)o(e)q(s)q(e)g(bigger)f(re)q(d)o(u)o(ct)o(ion)g
4895 (st)o(eps)i(are)e(t)o(ak)o(en)g(wh)o(en)o(ev)o(er)0 2086
4896 y(p)q(oss)q(ible.)54 2147 y(F)m(or)10 b(example,)f(cons)q(id)o(er)j(t)n
4897 (h)o(e)f Fs(Wff)f Fw(d)o(a)o(t)o(a)o(t)o(yp)q(e)h(d)o(e\014n)o(e)q(d)h
4898 (in)e(s)q(ect)o(ion)h(6.4.1.)k(Sup)o(p)q(os)q(e)d(w)o(e)f(h)o(a)o(v)o
4899 (e)f(t)n(h)o(e)i(follo)o(win)o(g)c(t)o(w)o(o)i(rewr)q(it)o(in)o(g)0
4900 2197 y(rule)q(s)15 b(in)e(our)h(rule)g(s)q(et:)65 2289
4901 y Fs(Not\(Not)21 b(X\):)g(X)0 2338 y(|)43 b(FORALL\(X,A,P\):)19
4902 b(Not\(EXISTS\(X,A,Not\()o(P\)\)\))54 2430 y Fw(Giv)o(en)8
4903 b(an)h(inpu)o(t)h(t)o(erm)e(of)h(t)n(h)o(e)h(form)e Fs
4904 (FORALL\(X,A,Not\()o(P\)\))p Fw(,)e(t)n(h)o(e)k(t)o(erm)e(will)g
4905 (\014rst)i(b)q(e)g(re)q(d)o(u)o(ce)q(d)h(t)o(o)e Fs
4906 (Not\(EXISTS\(X,A,Not)o(\(Not\()o(P\)\)\)\))0 2480 y
4907 Fw(via)14 b(t)n(h)o(e)h(s)q(econ)o(d)g(rule,)g(t)n(h)o(en)g(t)o(o)g
4908 Fs(Not\(EXISTS\(X,A,P\)\))c Fw(via)j(t)n(h)o(e)h(\014rst)g(rule.)21
4909 b(Th)o(e)15 b(o)o(pt)o(imizer)e(can)i(di)q(sco)o(v)o(er)f(t)n(h)o(a)o
4910 (t)h(t)n(hi)q(s)f(t)o(w)o(o)0 2530 y(st)o(ep)h(re)q(d)o(u)o(ct)o(ion)f
4911 (can)g(b)q(e)g(compre)q(ss)q(e)q(d)h(in)o(t)o(o)f(on)o(e)g(st)o(ep)h
4912 (if)e(t)n(h)o(e)h(rewr)q(it)o(in)o(g)g(syst)o(em)g(i)q(s)f(a)n(ugm)o
4913 (en)o(t)o(e)q(d)g(wit)n(h)h(t)n(h)o(e)g(follo)o(win)o(g)e(rule:)65
4914 2629 y Fs(FORALL\(X,A,Not)19 b(P\):)i(Not\(EXISTS\(X,A,P\)\))p
4916 %%Page: 48 49
4917 48 48 bop 0 -82 1981 3 v 0 -100 a Fq(6.)22 b Fp(Tree)d(Rewriting)1479
4918 b Fw(48)54 45 y(Not)o(e)12 b(t)n(h)o(a)o(t)g(t)n(hi)q(s)g(a)n(ugm)o(en)
4919 o(t)o(e)q(d)g(rule)g(i)q(s)g(a)g Fo(sp)n(e)n(cialization)g
4920 Fw(of)f(t)n(h)o(e)i(t)o(w)o(o)f(rule)q(s)h(giv)o(en)e(b)o(y)h(t)n(h)o
4921 (e)h(us)q(er.)19 b(In)12 b(gen)o(eral,)g(t)n(h)o(e)h(rewr)q(it)o(in)o
4922 (g)0 95 y(o)o(pt)o(imizer)f(will)f(rep)q(ea)o(t)o(e)q(dly)j(lo)q(ok)e
4923 (for)h(us)q(eful)g(sp)q(ecializa)o(t)o(ions)f(an)o(d)h(add)g(t)n(h)o
4924 (em)f(t)o(o)i(t)n(h)o(e)f(us)q(er)i(rule)e(s)q(et)1601
4925 80 y Fn(11)1637 95 y Fw(.)k(Th)o(e)q(s)q(e)e(sp)q(ecialize)q(d)0
4926 145 y(rule)q(s)g(will)d(p)q(erform)h(m)n(ul)o(t)o(iple)f(re)q(d)o(u)o
4927 (ct)o(ions)i(in)g(on)o(e)g(s)q(in)o(gle)f(st)o(ep.)54
4928 206 y(T)m(o)g(m)o(ak)o(e)f(us)q(e)j(of)e(t)n(h)o(e)i(o)o(pt)o(imizer,)d
4929 (t)n(h)o(e)i(rewr)q(it)o(in)o(g)g(syst)o(em)g(m)n(ust)f(h)o(a)o(v)o(e)g
4930 (t)n(h)o(e)i(follo)o(win)o(g)c(pro)o(p)q(ert)o(ie)q(s:)51
4931 301 y(1.)20 b(It)14 b(m)n(ust)f(b)q(e)h(stron)o(gly)g(norm)o(alizin)o
4932 (g,)d(i.e.)18 b(it)13 b(will)g(t)o(ermin)o(a)o(t)o(e)g(u)o(n)o(d)o(er)i
4933 (all)e(inpu)o(t)o(s.)51 384 y(2.)20 b(It)13 b(m)n(ust)f(b)q(e)h
4934 (con\015uen)o(t,)g(or)f(els)q(e)i(con\015uence)g(i)q(s)e(not)h(n)o(ece)
4935 q(ssary)m(.)20 b(Not)o(ice)12 b(t)n(h)o(a)o(t)h(t)n(h)o(e)h(o)o(pt)o
4936 (imizer)d(can)i(an)o(d)f(will)g(al)o(t)o(er)q(n)o(a)o(t)o(e)104
4937 434 y(t)n(h)o(e)17 b(re)q(d)o(u)o(ct)o(ion)h(ord)o(er)g(of)e(a)h(rule)g
4938 (s)q(et.)28 b(Th)n(us)18 b(if)e(a)h(rewr)q(it)o(in)o(g)f(syst)o(em)h(i)
4939 q(s)f(non-con\015uen)o(t,)i(an)f(o)o(pt)o(imize)q(d)e(rewr)q(it)o(in)o
4940 (g)104 484 y(syst)o(em)e(m)o(ay)f(giv)o(e)i(a)f(di\013eren)o(t)i(re)q
4941 (sul)o(t.)54 579 y(In)f(addit)o(ion,)e(t)n(h)o(e)i(follo)o(win)o(g)d(t)
4942 n(hin)o(gs)k(sh)o(ould)f(h)o(old)e(t)o(o)j(m)o(axim)o(ize)c(t)n(h)o(e)k
4943 (e\013ect)o(iv)o(en)o(e)q(ss)i(of)c(t)n(h)o(e)i(o)o(pt)o(imizer.)51
4944 673 y(1.)20 b(In)o(dice)q(s)d(\(i.e.)26 b(st)o(a)o(t)o(e)17
4945 b(cac)o(hin)o(g\))g(sh)o(ould)g(b)q(e)g(en)o(a)o(ble)q(d.)26
4946 b(Ot)n(h)o(erwi)q(s)q(e)18 b(t)n(h)o(e)f(o)o(pt)o(imizer)e(will)g(not)i
4947 (b)q(e)g(a)o(ble)e(t)o(o)i(o)o(pt)o(imize)e(a)104 723
4948 y(rule.)51 806 y(2.)20 b(Sp)q(ecializa)o(ble)13 b(rule)q(s)j(m)n(ust)f
4949 (b)q(e)g(s)q(imple,)e(i.e.)21 b(t)n(h)o(e)15 b(r)q(igh)o(t)g(h)o(an)o
4950 (d)f(s)q(id)o(e)i(m)n(ust)e(b)q(e)i(wr)q(it)n(t)o(en)f(as)g(an)g(expre)
4951 q(ss)q(ion)i(cons)q(i)q(st)e(of)104 856 y(only)h Fz(Pro)o(p)i
4952 Fw(d)o(a)o(t)o(a)o(t)o(yp)q(e)q(s.)28 b(If)17 b(t)n(h)o(e)h(r)q(igh)o
4953 (t)e(h)o(an)o(d)h(s)q(id)o(e)g(i)q(s)g(a)g(complex)e(st)o(a)o(t)o(em)o
4954 (en)o(t)i(or)g(if)f(it)h(in)o(v)o(olv)o(e)q(s)f(ext)o(er)q(n)o(al)h(fu)
4955 o(nct)o(ion)104 906 y(calls,)c(t)n(h)o(e)h(o)o(pt)o(imizer)f(will)f(f)q
4956 (ail)g(t)o(o)i(an)o(alyze)g(it)g(pro)o(p)q(erly)m(.)51
4957 989 y(3.)20 b(Only)13 b(b)q(ot)n(t)o(om-up)h(rule)q(s)g(m)o(ay)e(b)q(e)
4958 i(pre)q(s)q(en)o(t.)51 1072 y(4.)20 b(Av)o(oid)13 b(con)o(dit)o(ion)o
4959 (al)f(rule)q(s)j(wh)o(en)o(ev)o(er)g(p)q(oss)q(ible.)54
4960 1167 y(Fin)o(ally)m(,)g(it)i(sh)o(ould)h(b)q(e)f(w)o(ar)q(n)o(e)q(d)g
4961 (t)n(h)o(a)o(t)h(an)f(o)o(pt)o(imize)q(d)f(rewr)q(it)o(in)o(g)h(syst)o
4962 (em)g(m)o(ay)f(gen)o(era)o(t)o(e)i(a)f(lot)g(more)f(co)q(d)o(e)j(t)n(h)
4963 o(an)e(t)n(h)o(e)0 1217 y(u)o(n-o)o(pt)o(imize)q(d)11
4964 b(on)o(e.)18 b(Th)o(e)13 b(us)q(er)g(sh)o(ould)f(view)h(t)n(h)o(e)g
4965 (gen)o(era)o(t)o(e)q(d)h(rep)q(ort)f(an)o(d)f(c)o(h)o(ec)o(k)h(t)n(h)o
4966 (a)o(t)g(exce)q(ss)q(iv)o(e)h(sp)q(ecializa)o(t)o(ions)e(h)o(a)o(v)o(e)
4967 g(not)0 1266 y(b)q(een)i(p)q(erform)o(e)q(d.)p 0 1301
4968 792 2 v 31 1328 a Fm(11)64 1340 y Fl(T)m(o)d(ensure)f(t)o(ermin)o(a)o
4969 (t)o(ion)f(of)i(t)o(h)o(e)g(o)o(pt)o(imiza)o(t)o(io)o(n)e(pro)q(ce)q
4970 (ss,)h(a)o(ugm)o(en)o(t)o(ed)f(rule)q(s)h(will)i(not)e(be)i(furt)o(h)o
4971 (er)d(specialize)q(d.)p eop
4972 %%Page: 49 50
4973 49 49 bop 0 -82 1981 3 v 0 -100 a Fq(7.)22 b Fp(User)c(defined)h(d)o(a)
4974 m(t)m(a)m(types:)24 b(Views)1102 b Fw(49)0 45 y Fv(7)66
4975 b(Us)q(er)22 b(d)o(e\014n)n(e)r(d)f(d)o(a)n(t)n(a)n(t)n(yp)q(e)r(s:)29
4976 b(Views)0 148 y Fw(F)m(or)13 b(m)o(an)o(y)f(ap)o(plica)o(t)o(ions)f(it)
4977 j(i)q(s)f(n)o(ece)q(ssary)j(t)o(o)d(in)o(t)o(erf)q(ace)h
4978 Fz(Pro)o(p)g Fw(t)o(o)g(d)o(a)o(t)o(a)f(stru)o(ct)o(ure)q(s)j(pre)q(d)o
4979 (e\014n)o(e)q(d)g(in)d(librar)q(ie)q(s,)g(or)h(gen)o(era)o(t)o(e)q(d)0
4980 198 y(b)o(y)i(ot)n(h)o(er)g(t)o(o)q(ols.)23 b(In)16 b(ord)o(er)h(t)o(o)
4981 f(m)o(ak)o(e)e(it)i(p)q(oss)q(ible)g(t)o(o)g(w)o(or)o(k)g(wit)n(h)f(t)n
4982 (h)o(e)q(s)q(e)i(ext)o(er)q(n)o(al)f(d)o(a)o(t)o(a)g(stru)o(ct)o(ure)q
4983 (s,)i Fz(Pro)o(p)p Fw(,)e(f)q(rom)e(v)o(ers)q(ion)0 247
4984 y(2.3.3.)k(on)o(w)o(ard,)c(pro)o(vid)o(e)q(s)h(a)f Fo(view)g
4985 Fw(m)o(ec)o(h)o(ani)q(sm)d(t)o(o)k(in)o(t)o(erf)q(ace)f(wit)n(h)g(t)n
4986 (h)o(e)q(s)q(e)i(d)o(a)o(t)o(a)f(stru)o(ct)o(ure)q(s.)22
4987 b(Us)q(in)o(g)14 b(views,)g(an)g(ext)o(er)q(n)o(ally)0
4988 297 y(d)o(e\014n)o(e)q(d)h(t)o(yp)q(e)e(can)g(b)q(e)g(us)q(e)q(d)i(wit)
4989 n(hin)d Fz(Pro)o(p)p Fw('s)i(pa)o(t)n(t)o(er)q(n)g(m)o(a)o(t)o(c)o(hin)
4990 o(g)d(an)o(d)i(rewr)q(it)o(in)o(g)g(m)o(ec)o(h)o(ani)q(sms)e
4991 (transparen)o(t)n(ly)m(,)i(just)h(as)f(if)f(it)0 347
4992 y(w)o(ere)17 b(d)o(e\014n)o(e)q(d)g(b)o(y)e Fz(Pro)o(p)p
4993 Fw(.)23 b(Th)o(e)16 b Fz(Pro)o(p)g Fw(transla)o(t)o(or)g(will)e(call)g
4994 (t)n(h)o(e)j(ap)o(pro)o(pr)q(ia)o(t)o(e)d(in)o(t)o(erf)q(ace)i(fu)o
4995 (nct)o(ions)g(sp)q(eci\014e)q(d)g(b)o(y)g(t)n(h)o(e)g(us)q(er)0
4996 397 y(t)o(o)e(m)o(anipula)o(t)o(e)e(t)n(h)o(e)q(s)q(e)j(ext)o(er)q(n)o
4997 (al)f(d)o(a)o(t)o(a)o(t)o(yp)q(e)q(s.)0 523 y FF(7.1)56
4998 b(A)19 b(\014rst)g(examp)o(le)0 612 y Fw(.)f(T)m(o)13
4999 b(illustra)o(t)o(e)h(t)n(h)o(e)g(us)q(e)h(of)e(views,)h(w)o(e'll)e(b)q
5000 (egin)i(wit)n(h)f(a)h(s)q(imple)d(example.)54 673 y(Sup)o(p)q(os)q(e)k
5001 (in)g(our)f(ap)o(plica)o(t)o(ion)f(w)o(e)h(us)q(e)i(t)n(h)o(e)f(follo)o
5002 (win)o(g)d(t)o(agge)q(d)j(C)f(u)o(nion)h(t)o(o)g(repre)q(s)q(en)o(t)i
5003 (our)d(expre)q(ss)q(ion)j(d)o(a)o(t)o(a)o(t)o(yp)q(e.)j(An)0
5004 723 y(expre)q(ss)q(ion)14 b(i)q(s)e(repre)q(s)q(en)o(t)o(e)q(d)j(s)q
5005 (imply)9 b(as)j(a)h(p)q(oin)o(t)o(er)f(t)o(o)h(t)n(hi)q(s)f(stru)o(ct)o
5006 (ure.)19 b(An)13 b(n)n(ull)f(expre)q(ss)q(ion)i(i)q(s)d(repre)q(s)q(en)
5007 o(t)o(e)q(d)k(s)q(imply)10 b(as)i(t)n(h)o(e)0 773 y(NULL)i(p)q(oin)o(t)
5008 o(er.)0 866 y Fs(enum)21 b(exp_tag)f({)i(Int)f(=)h(1,)f(Ident,)g(Add,)g
5009 (Sub,)g(Mul,)f(Div)i(};)0 916 y(struct)f(exp)g({)65 966
5010 y(enum)g(exp_tag)g(tag;)65 1016 y(union)g({)131 1066
5011 y(int)217 b(number;)131 1116 y(const)21 b(char)f(*)i(ident;)131
5012 1165 y(struct)e({)i(struct)e(exp)i(*)f(l,)h(*)f(r)h(})f(children;)65
5013 1215 y(})h(u;)0 1265 y(};)0 1315 y(typedef)e(struct)h(exp)g(*)h(Exp;)0
5014 1365 y(/*)f(User)g(defined)g(constructor)e(functions)h(*/)0
5015 1414 y(Exp)h(NONE)g(=)h(NULL;)0 1464 y(extern)f(Exp)g(INT\(int\);)0
5016 1514 y(extern)g(Exp)g(IDENT\(const)e(char)i(*\);)0 1564
5017 y(extern)g(Exp)g(ADD\(Exp,)f(Exp\);)0 1614 y(extern)h(Exp)g(SUB\(Exp,)f
5018 (Exp\);)0 1663 y(extern)h(Exp)g(MUL\(Exp,)f(Exp\);)0
5019 1713 y(extern)h(Exp)g(DIV\(Exp,)f(Exp\);)54 1807 y Fw(Sup)o(p)q(os)q(e)
5020 e(t)n(hi)q(s)f(d)o(a)o(t)o(a)g(stru)o(ct)o(ure)i(i)q(s)e(already)g(us)q
5021 (e)q(d)h(ext)o(ens)q(iv)o(ely)f(in)g(ot)n(h)o(er)h(mo)q(d)o(ule)q(s,)f
5022 (an)o(d)g(w)o(e'd)g(lik)o(e)f(t)o(o)i Fz(Pro)o(p)f Fw(pa)o(t)n(t)o(er)q
5023 (n)0 1857 y(m)o(a)o(t)o(c)o(hin)o(g)d(m)o(ec)o(h)o(ani)q(sms)f(while)i
5024 (k)o(eepin)o(g)g(t)n(h)o(e)i(old)d(co)q(d)o(e)i(in)o(t)o(act.)23
5025 b(W)m(e)15 b(can)h(accompli)q(sh)d(t)n(hi)q(s)i(b)o(y)g(d)o(eclar)q(in)
5026 o(g)h(a)f(view)g(t)o(o)h(t)n(hi)q(s)0 1906 y(d)o(a)o(t)o(a)e(stru)o(ct)
5027 o(ure,)h(us)q(in)o(g)f(a)f Fs(datatype)21 b(view)13 b
5028 Fw(d)o(e\014nit)o(ion:)0 1994 y Fs(dataype)20 b(Exp)i(::)f(view)g(=)65
5029 2043 y(match)g(\(this)g(?)g(this->tag)f(:)i(0\))109 2093
5030 y(view)f(0)109 b(=>)21 b(NONE)65 2143 y(|)h(view)f(Int)65
5031 b(=>)21 b(INT\(int)f(=)i(this->u.number\))65 2193 y(|)g(view)f(Ident)g
5032 (=>)g(ID)g(\(const)g(char)g(*)h(=)f(this->u.ident\))65
5033 2243 y(|)h(view)f(Add)65 b(=>)21 b(ADD\(Exp)f(=)i(this->u.children.)o
5034 (l,)d(Exp)i(=)h(this->u.children)o(.r\))65 2292 y(|)g(view)f(Sub)65
5035 b(=>)21 b(SUB\(Exp)f(=)i(this->u.children.)o(l,)d(Exp)i(=)h
5036 (this->u.children)o(.r\))65 2342 y(|)g(view)f(Mul)65
5037 b(=>)21 b(MUL\(Exp)f(=)i(this->u.children.)o(l,)d(Exp)i(=)h
5038 (this->u.children)o(.r\))65 2392 y(|)g(view)f(Div)65
5039 b(=>)21 b(DIV\(Exp)f(=)i(this->u.children.)o(l,)d(Exp)i(=)h
5040 (this->u.children)o(.r\))65 2442 y(;)54 2529 y Fw(In)16
5041 b(t)n(h)o(e)h(a)o(b)q(o)o(v)o(e,)g(a)f(view)g(n)o(am)o(e)q(d)g
5042 Fs(Exp)g Fw(i)q(s)g(d)o(e\014n)o(e)q(d.)27 b(Let's)17
5043 b(d)o(e)q(scr)q(ib)q(e)h(wh)o(a)o(t)e(t)n(h)o(e)i(d)o(e\014nit)o(ion)e
5044 (m)o(eans:)23 b(in)16 b(gen)o(eral,)h(a)f(view)0 2579
5045 y(d)o(e\014nit)o(ion)c(h)o(as)g(t)n(hree)i(m)o(ain)d(part)o(s,)i(t)n(h)
5046 o(e)g Fo(view)g(sele)n(ctor)p Fw(,)e(a)h(s)q(et)h(of)f
5047 Fo(view)h(tr)n(ansformation)g(rules)p Fw(,)f(an)o(d)g(a)g(s)q(et)h
5048 Fo(of)g(view)g(ac)n(c)n(essor)0 2629 y(expr)n(essions)p
5049 Fw(.)18 b(Th)o(e)q(s)q(e)d(part)o(s)g(p)q(erform)e(t)n(h)o(e)h(follo)o
5050 (win)o(g)e(t)o(asks:)p eop
5051 %%Page: 50 51
5052 50 50 bop 0 -82 1981 3 v 0 -100 a Fq(7.)16 b Fp(User)i(defined)i(d)o(a)
5053 m(t)m(a)m(types:)e(Views)1113 b Fw(50)0 45 y Fu(View)16
5054 b(s)q(elect)o(or)j Fw(Th)o(e)f Fo(view)g(sele)n(ctor)e
5055 Fw(i)q(s)h(sp)q(eci\014e)q(d)i(in)e(t)n(h)o(e)i(t)n(h)o(e)f
5056 Fs(match)f Fw(part)g(of)g(t)n(h)o(e)i(d)o(e\014nit)o(ion.)29
5057 b(In)17 b(t)n(hi)q(s)h(example,)e(t)n(h)o(e)104 95 y(expre)q(ss)q(ion)
5058 22 b(asso)q(cia)o(t)o(e)q(d)g(wit)n(h)e Fs(match)g Fw(i)q(s)g
5059 Fs(this)h(?)h(0)f(:)h(this->tag)p Fw(.)37 b(Thi)q(s)20
5060 b(ret)o(ur)q(ns)i(a)e(v)n(ar)q(ian)o(t)f(di)q(scr)q(imin)o(a)o(t)o(ion)
5061 104 145 y(in)o(t)o(eger)14 b(f)q(rom)e Fs(0)h Fw(t)o(o)i
5062 Fs(Div)p Fw(.)i(Not)o(e)d(t)n(h)o(a)o(t)g(t)n(h)o(e)h(ps)q(eudo)g(v)n
5063 (ar)q(ia)o(ble)c Fs(this)i Fw(refers)j(t)o(o)e(an)g(ob)r(ject)g(of)g(t)
5064 o(yp)q(e)g Fs(Exp)p Fw(.)0 227 y Fu(View)i(transform)o(a)o(t)n(ion)c
5065 (rule)q(s)19 b Fw(Eac)o(h)14 b(of)g(t)n(h)o(e)g(cla)n(us)q(e)q(s)902
5066 315 y Fs(view)o Fo(exp)s Fs(=>)p Fo(term)104 403 y Fw(sp)q(eci\014e)q
5067 (s)e(a)e Fo(view)h(tr)n(ansformation)h(rule)p Fw(.)k(Th)o(e)q(s)q(e)c
5068 (rule)q(s)f(are)g(us)q(e)q(d)h(t)o(o)f(sp)q(ecify)f(h)o(o)o(w)g(t)o(o)h
5069 (transform)f(a)g(compu)o(t)o(e)q(d)g(v)n(ar)q(ian)o(t)104
5070 453 y(t)o(ag)i(in)o(t)o(o)h(a)g(pa)o(t)n(t)o(er)q(n.)19
5071 b(In)13 b(gen)o(eral,)g(expre)q(ss)q(ion)i Fo(exp)e Fw(m)n(ust)g(b)q(e)
5072 g(a)g(const)o(an)o(t)h(expre)q(ss)q(ion)g(usa)o(ble)f(in)g(a)g
5073 Fs(case)f Fw(st)o(a)o(t)o(em)o(en)o(t.)0 535 y Fu(View)k(acce)q(s)q
5074 (sors)k Fw(In)14 b(eac)o(h)i(of)e(t)n(h)o(e)h(constru)o(ct)o(or)h(argu)
5075 o(m)o(en)o(t)o(s,)e(an)h Fo(view)g(ac)n(c)n(essor)f Fw(expre)q(ss)q
5076 (ion)i(can)e(b)q(e)h(d)o(e\014n)o(e)q(d)h(t)o(o)f(acce)q(ss)104
5077 585 y(t)n(h)o(e)f(logical)e(comp)q(on)o(en)o(t)o(s)i(of)f(t)n(h)o(e)i
5078 (constru)o(ct)o(or.)20 b(In)14 b(t)n(h)o(e)h(rule:)169
5079 682 y Fs(|)22 b(view)f(Add)64 b(=>)22 b(ADD\(Exp)e(=)i
5080 (this->u.children)o(.l,)d(Exp)i(=)g(this->u.children.r\))104
5081 778 y Fw(Th)o(e)c(expre)q(ss)q(ions)i Fs(this->u.children.l)14
5082 b Fw(an)o(d)j Fs(this->u.children.)o(r)d Fw(t)o(ell)j
5083 Fz(Pro)o(p)h Fw(h)o(o)o(w)f(t)o(o)g(acce)q(ss)j(t)n(h)o(e)e(left)f(an)o
5084 (d)104 828 y(r)q(igh)o(t)c(c)o(hild)g(of)g(t)n(h)o(e)i(an)f(addit)o
5085 (ion)e(expre)q(ss)q(ion)k(no)q(d)o(e.)104 894 y(Not)o(e)h(t)n(h)o(a)o
5086 (t)g(s)q(ince)g(t)n(h)o(e)g(v)n(ar)q(ian)o(t)f Fs(NONE)g
5087 Fw(h)o(as)g(no)h(argu)o(m)o(en)o(t)o(s,)g(it)f(i)q(s)h(repre)q(s)q(en)o
5088 (t)o(e)q(d)i(as)e(a)f(n)n(ullary)h(constru)o(ct)o(or,)i(an)o(d)d(no)104
5089 944 y(acce)q(ssors)h(expre)q(ss)q(ions)e(are)g(d)o(e\014n)o(e)q(d.)54
5090 1044 y(A)f(pret)n(t)o(y)h(pr)q(in)o(t)o(in)o(g)e(fu)o(nct)o(ion)g(for)h
5091 Fs(struct)21 b(exp)13 b Fw(can)h(b)q(e)g(implem)n(en)o(t)o(e)q(d)e(in)h
5092 Fz(Pro)o(p)h Fw(us)q(in)o(g)g(pa)o(t)n(t)o(er)q(n)h(m)o(a)o(t)o(c)o
5093 (hin)o(g)d(as)i(follo)o(ws:)0 1137 y Fs(ostream&)20 b(operator)g(<<)i
5094 (\(ostream&)e(s,)h(Exp)g(e\))0 1186 y({)43 b(match)21
5095 b(\(e\))65 1236 y({)44 b(NONE:)108 b({)21 b(s)h(<<)f("none";)g(})65
5096 1286 y(|)44 b(INT)21 b(i:)87 b({)21 b(s)h(<<)f(i;)h(})65
5097 1336 y(|)44 b(ID)21 b(id:)87 b({)21 b(s)h(<<)f(id;)g(})65
5098 1386 y(|)44 b(ADD\(a,b\):)20 b({)h(s)h(<<)f('\(')g(<<)h(a)f(<<)h(")f(+)
5099 h(")g(<<)f(b)g(<<)h('\);)f(})65 1435 y(|)44 b(SUB\(a,b\):)20
5100 b({)h(s)h(<<)f('\(')g(<<)h(a)f(<<)h(")f(-)h(")g(<<)f(b)g(<<)h('\);)f(})
5101 65 1485 y(|)44 b(MUL\(a,b\):)20 b({)h(s)h(<<)f('\(')g(<<)h(a)f(<<)h(")f
5102 (*)h(")g(<<)f(b)g(<<)h('\);)f(})65 1535 y(|)44 b(DIV\(a,b\):)20
5103 b({)h(s)h(<<)f('\(')g(<<)h(a)f(<<)h(")f(/)h(")g(<<)f(b)g(<<)h('\);)f(})
5104 65 1585 y(})65 1635 y(return)g(s;)0 1685 y(})54 1777
5105 y Fw(Not)o(e)d(t)n(h)o(a)o(t)g(t)n(hi)q(s)g(i)q(s)f(exact)n(ly)h(t)n(h)
5106 o(e)h(sam)o(e)e(co)q(d)o(e)i(w)o(e)f(w)o(ould'v)o(e)f(wr)q(it)n(t)o(en)
5107 h(if)f Fs(Exp)h Fw(i)q(s)f(d)o(e\014n)o(e)q(d)i(as)f(a)g(d)o(a)o(t)o(a)
5108 o(t)o(yp)q(e)g(ra)o(t)n(h)o(er)h(t)n(h)o(an)0 1827 y(a)e(view.)26
5109 b(Thi)q(s)16 b(m)o(eans)h(t)n(h)o(a)o(t)g(t)n(h)o(e)g(us)q(er)h(can)f
5110 (re)q(implem)o(en)o(t)d(t)n(h)o(e)k(expre)q(ss)q(ion)g(d)o(a)o(t)o(a)f
5111 (stru)o(ct)o(ure)h(as)f(a)g Fz(Pro)o(p)p Fw('s)g(d)o(a)o(t)o(a)o(t)o
5112 (yp)q(e)g(a)o(t)f(a)0 1877 y(la)o(t)n(t)o(er)h(t)o(im)o(e,)e(wit)n(h)o
5113 (ou)o(t)i(al)o(t)o(er)q(in)o(g)f(t)n(h)o(e)h Fz(Pro)o(p)g
5114 Fw(source)h(co)q(d)o(e.)26 b(In)17 b(e\013ect,)h(t)n(h)o(e)f
5115 Fo(lo)n(gic)n(al)f Fw(view)g(of)g(a)g(d)o(a)o(t)o(a)o(t)o(yp)q(e,)g(an)
5116 o(d)g(it)o(s)h Fo(physic)n(al)0 1927 y Fw(implem)n(en)o(t)o(a)o(t)o(io)
5117 o(n)12 b(can)k(s)q(epara)o(t)o(ely)m(.)21 b(Wit)n(h)15
5118 b(t)n(hi)q(s)g Fo(r)n(epr)n(esentation)h(tr)n(ansp)n(ar)n(ency)f
5119 Fw(capa)o(bilit)o(y)m(,)e(programs)g(wr)q(it)n(t)o(en)j(in)f
5120 Fz(Pro)o(p)p Fw('s)0 1976 y(pa)o(t)n(t)o(er)q(n)g(m)o(a)o(t)o(c)o(hin)o
5121 (g)d(form)o(ali)q(sm)o(s)f(can)j(ev)o(olv)o(e)f(in)g(an)h(increm)o(en)o
5122 (t)o(ally)e(an)o(d)i(pain-f)q(ree)f(m)o(ann)o(er.)54
5123 2038 y(Th)o(e)e(gen)o(era)o(t)o(e)q(d)h(co)q(d)o(e)g(for)e(t)n(h)o(e)h
5124 (a)o(b)q(o)o(v)o(e)g(fu)o(nct)o(ion)f(will)g(re)q(s)q(em)n(ble)g(t)n(h)
5125 o(e)h(follo)o(win)o(g)d(ou)o(t)o(pu)o(t.)19 b(Not)o(e)10
5126 b(t)n(h)o(a)o(t)h(all)f(t)n(h)o(e)h(view)g(s)q(elect)o(ors)0
5127 2088 y(an)o(d)j(view)f(acce)q(ssors)k(are)d(inlin)o(e)q(d)f(in)o(t)o(o)
5128 h(t)n(h)o(e)h(co)q(d)o(e,)f(an)o(d)g(in)f(gen)o(eral,)h(views)g(incur)g
5129 (no)g(o)o(v)o(erh)o(ead)g(t)o(o)h(t)n(h)o(e)q(ir)f(us)q(e.)0
5130 2180 y Fs(ostream&)20 b(operator)g(<<)i(\(ostream&)e(s,)h(Exp)g(e\))0
5131 2230 y({)43 b(switch)21 b(\(e)g(?)h(e->tag)e(:)i(0\))65
5132 2280 y({)44 b(case)21 b(0:)130 b({)22 b(s)f(<<)h("none";)e(})131
5133 2330 y(case)h(Int:)86 b({)22 b(s)f(<<)h(e->u.number;)d(})131
5134 2380 y(case)i(Ident:)42 b({)22 b(s)f(<<)h(e->u.ident;)d(})131
5135 2429 y(case)i(Add:)86 b({)22 b(s)f(<<)h('\(')f(<<)g(e->u.children.l)501
5136 2479 y(<<)h(")f(+)h(")f(<<)h(e->children.r)d(<<)i('\);)g(})131
5137 2529 y(case)g(Sub:)86 b({)22 b(s)f(<<)h('\(')f(<<)g(e->u.children.l)501
5138 2579 y(<<)h(")f(-)h(")f(<<)h(e->children.r)d(<<)i('\);)g(})131
5139 2629 y(case)g(Mul:)86 b({)22 b(s)f(<<)h('\(')f(<<)g(e->u.children.l)p
5141 %%Page: 51 52
5142 51 51 bop 0 -82 1981 3 v 0 -100 a Fq(7.)22 b Fp(User)c(defined)h(d)o(a)
5143 m(t)m(a)m(types:)24 b(Views)1102 b Fw(51)501 45 y Fs(<<)22
5144 b(")f(*)h(")f(<<)h(e->children.r)d(<<)i('\);)g(})131
5145 95 y(case)g(Div:)86 b({)22 b(s)f(<<)h('\(')f(<<)g(e->u.children.l)501
5146 145 y(<<)h(")f(/)h(")f(<<)h(e->children.r)d(<<)i('\);)g(})65
5147 195 y(})65 244 y(return)g(s;)0 294 y(})0 422 y FF(7.2)56
5148 b(Anot)n(h)n(er)19 b(view)e(examp)o(le)0 511 y Fw(Sup)o(p)q(os)q(e)c(w)
5149 o(e)f(us)q(e)g(t)n(h)o(e)h(follo)o(win)o(g)c(al)o(t)o(er)q(n)o(a)o(t)o
5150 (iv)o(e)i(implem)n(en)o(t)o(a)o(t)o(io)o(n,)e(a)j Fs(Expression)d
5151 Fw(class)k(hierarc)o(h)o(y)f(t)o(o)g(repre)q(s)q(en)o(t)i(an)e(expre)q
5152 (s-)0 560 y(s)q(ion)e(in)g(our)h(AST.)g(Not)o(e)g(t)n(h)o(a)o(t)g
5153 Fs(Exp)f Fw(i)q(s)g(an)h(a)o(bstract)h(bas)q(e)f(class)h(inh)o(er)q(it)
5154 o(e)q(d)f(b)o(y)f(t)n(h)o(e)i(class)q(e)q(s)g Fs(Number)p
5155 Fw(,)e Fs(Operator)p Fw(,)f Fs(Identifer)p Fw(,)0 610
5156 y(et)o(c.)0 713 y Fs(class)21 b(Expression)0 763 y({)0
5157 813 y(public:)65 913 y(//)h(This)f(class)f(uses)h(a)h(``wide'')e
5158 (interface)65 962 y(virtual)h(int)43 b(number\(\))20
5159 b(const)195 b(=)22 b(0;)43 b(//)21 b(returns)f(a)i(number)65
5160 1012 y(virtual)f(const)f(char)h(*)h(ident\(\))e(const)43
5161 b(=)22 b(0;)43 b(//)21 b(returns)f(an)i(identifier)65
5162 1112 y(//)g(returns)e(the)h(ith)g(subchild)65 1162 y(virtual)g(const)f
5163 (Expression)g(*)i(child\(int\))e(const)g(=)i(0;)65 1212
5164 y(//)g(mutable)e(version)g(of)i(above)65 1261 y(virtual)f(Expression)e
5165 (*&)j(child\(int\))e(=)h(0;)0 1311 y(};)0 1411 y(typedef)f(Expression)g
5166 (*)i(Exp;)0 1510 y(class)f(NullExp)42 b(:)21 b(public)g(Expression)f({)
5167 h(...)h(};)0 1560 y(class)f(Number)64 b(:)21 b(public)g(Expression)f({)
5168 h(...)h(};)0 1610 y(class)f(Operator)f(:)h(public)g(Expression)f({)h
5169 (...)h(};)0 1660 y(class)f(Identifier)e(:)j(public)f(Expression)e({)j
5170 (...)f(};)54 1763 y Fw(In)e(ord)o(er)h(t)o(o)f(pro)o(vid)o(e)g(a)f
5171 (suit)o(a)o(ble)g(in)o(t)o(erf)q(ace)h(t)o(o)h Fz(Pro)o(p)p
5172 Fw('s)f(view)g(m)o(ec)o(h)o(ani)q(sm,)d(w)o(e)j(in)o(tro)q(d)o(u)o(ce)h
5173 (an)e(addit)o(ion)o(al)f(m)o(em)n(b)q(er)0 1813 y(fu)o(nct)o(ion)d(t)o
5174 (o)g(ret)o(ur)q(n)h(a)e(v)n(ar)q(ian)o(t)f(t)o(ag:)0
5175 1916 y Fs(class)21 b(Expression)0 1966 y({)0 2016 y(public:)65
5176 2065 y(enum)g(Variant)g({)g(None,)g(Int,)g(Ident,)g(Add,)g(Sub,)f(Mul,)
5177 h(Div)h(};)65 2115 y(virtual)f(Variant)f(get_variant\(\))f(const)i(=)h
5178 (0;)0 2165 y(})54 2268 y Fw(In)14 b(addit)o(ion,)e(w)o(e)i(assu)o(m)o
5179 (e)g(t)n(h)o(e)h(follo)o(win)o(g)c(constru)o(ct)o(or)16
5180 b(fu)o(nct)o(ions)e(h)o(a)o(v)o(e)f(b)q(een)i(implem)n(en)o(t)o(e)q(d:)
5181 0 2371 y Fs(extern)21 b(Exp)g(INT\(int\);)0 2421 y(extern)g(Exp)g
5182 (IDENT\(const)e(char)i(*\);)0 2471 y(extern)g(Exp)g(ADD\(Exp,)f(Exp\);)
5183 0 2521 y(extern)h(Exp)g(SUB\(Exp,)f(Exp\);)0 2570 y(extern)h(Exp)g
5184 (MUL\(Exp,)f(Exp\);)0 2620 y(extern)h(Exp)g(DIV\(Exp,)f(Exp\);)p
5186 %%Page: 52 53
5187 52 52 bop 0 -82 1981 3 v 0 -100 a Fq(7.)22 b Fp(User)c(defined)h(d)o(a)
5188 m(t)m(a)m(types:)24 b(Views)1102 b Fw(52)54 45 y(No)o(w,)11
5189 b(wit)n(h)g(t)n(h)o(e)q(s)q(e)i(d)o(e\014nit)o(ions)f(in)f(place,)h(w)o
5190 (e)f(can)h(d)o(e\014n)o(e)h(a)e(d)o(a)o(t)o(a)o(t)o(yp)q(e)h(view)f(of)
5191 g(t)n(h)o(e)h(a)o(b)q(o)o(v)o(e)g Fs(Expression)d Fw(hierarc)o(h)o(y)j
5192 (us)q(in)o(g)0 95 y(t)n(h)o(e)j(follo)o(win)o(g)c(d)o(e\014nit)o(ion:)0
5193 198 y Fs(datatype)20 b(Exp)h(::)h(view)65 248 y(=)g(match)f
5194 (\(this->get_varia)o(nt\(\)\))109 298 y(view)g(Expression::None)40
5195 b(=>)22 b(NONE)65 347 y(|)g(view)f(Expression::Int)62
5196 b(=>)22 b(INT)f(\(int)g(=)g(this->number\(\)\))65 397
5197 y(|)h(view)f(Expression::Ident)d(=>)k(ID)43 b(\(const)20
5198 b(char)h(*)h(=)f(this->ident\(\)\))65 447 y(|)h(view)f(Expression::Add)
5199 62 b(=>)22 b(ADD)f(\(Exp)g(=)g(this->child\(0\),)785
5200 497 y(Exp)g(=)g(this->child\(1\)\))65 547 y(|)h(view)f(Expression::Sub)
5201 62 b(=>)22 b(SUB)f(\(Exp)g(=)g(this->child\(0\),)785
5202 597 y(Exp)g(=)g(this->child\(1\)\))65 646 y(|)h(view)f(Expression::Mul)
5203 62 b(=>)22 b(MUL)f(\(Exp)g(=)g(this->child\(0\),)785
5204 696 y(Exp)g(=)g(this->child\(1\)\))65 746 y(|)h(view)f(Expression::Div)
5205 62 b(=>)22 b(DIV)f(\(Exp)g(=)g(this->child\(0\),)785
5206 796 y(Exp)g(=)g(this->child\(1\)\))65 846 y(;)54 949
5207 y Fw(An)14 b(ev)n(alua)o(t)o(ion)e(fu)o(nct)o(ion)i(can)g(b)q(e)g(wr)q
5208 (it)n(t)o(en)g(us)q(in)o(g)g Fz(Pro)o(p)p Fw('s)g(pa)o(t)n(t)o(er)q(n)h
5209 (m)o(a)o(t)o(c)o(hin)o(g)d(constru)o(ct:)0 1052 y Fs(int)21
5210 b(eval\(Exp)f(e,)i(const)e(Env&)h(env\))0 1102 y({)43
5211 b(match)21 b(\(e\))65 1152 y({)44 b(NONE:)217 b({)21
5212 b(return)g(0;)g(})65 1201 y(|)44 b(INT)21 b(i:)196 b({)21
5213 b(return)g(i;)g(})65 1251 y(|)44 b(ID)21 b(id:)196 b({)21
5214 b(return)g(env\(id\);)f(})65 1301 y(|)44 b(ADD)21 b(\(x,y\):)108
5215 b({)21 b(return)g(eval\(x,env\))e(+)j(eval\(y,env\);)d(})65
5216 1351 y(|)44 b(SUB)21 b(\(x,y\):)108 b({)21 b(return)g(eval\(x,env\))e
5217 (-)j(eval\(y,env\);)d(})65 1401 y(|)44 b(MUL)21 b(\(x,y\):)108
5218 b({)21 b(return)g(eval\(x,env\))e(*)j(eval\(y,env\);)d(})65
5219 1450 y(|)44 b(DIV)21 b(\(x,INT)f(0\):)i({)f(cerr)g(<<)h("Division)e(by)
5220 h(zero";)f(return)h(0;)g(})65 1500 y(|)44 b(DIV)21 b(\(x,y\):)108
5221 b({)21 b(return)g(eval\(x,env\))e(/)j(eval\(y,env\);)d(})65
5222 1550 y(})0 1600 y(})0 1703 y Fw(Not)o(e)14 b(t)n(h)o(a)o(t)g(t)n(hi)q
5223 (s)g(co)q(d)o(e)h(w)o(or)o(ks)f(equally)f(w)o(ell)h(wit)n(h)f(t)n(h)o
5224 (e)i(t)o(agge)q(d)f(u)o(nion)f(repre)q(s)q(en)o(t)o(a)o(t)o(ion)i(d)o
5225 (e\014n)o(e)q(d)h(in)d(s)q(ect)o(ion)h(7.1.)54 1765 y(W)m(e)f(can)h
5226 (also)f(us)q(e)i(rewr)q(it)o(in)o(g)f(t)o(o)g(transform)f(an)g(expre)q
5227 (ss)q(ion)j(tree)f(as)f(follo)o(ws)0 1868 y Fs(void)21
5228 b(simplify\(Exp&)e(e\))0 1918 y({)65 1967 y(rewrite)i(\(e\))g(type)g
5229 (\(Exp\))65 2017 y({)44 b(ADD\(INT)20 b(i,)h(INT)h(j\):)f(INT\(i+j\))65
5230 2067 y(|)44 b(SUB\(INT)20 b(i,)h(INT)h(j\):)f(INT\(i-j\))65
5231 2117 y(|)44 b(MUL\(INT)20 b(i,)h(INT)h(j\):)f(INT\(i*j\))65
5232 2167 y(|)44 b(DIV\(INT)20 b(i,)h(INT)h(j\):)f(INT\(i/j\))65
5233 2216 y(})0 2266 y(})0 2394 y FF(7.3)56 b(Syn)n(t)n(ax)19
5234 b(of)f(view)g(d)o(e\014nit)n(ions)0 2483 y Fw(Th)o(e)c(gen)o(eral)g
5235 (syn)o(t)o(ax)g(of)f(a)h(view)f(d)o(e\014nit)o(ion)h(re)q(s)q(em)n(ble)
5236 q(s)g(t)n(h)o(a)o(t)g(of)f(a)h Fs(datatype)e Fw(d)o(e\014nit)o(ion:)p
5238 %%Page: 53 54
5239 53 53 bop 0 -82 1981 3 v 0 -100 a Fq(7.)22 b Fp(User)c(defined)h(d)o(a)
5240 m(t)m(a)m(types:)24 b(Views)1102 b Fw(53)129 38 y Fo(Datatyp)n(e)p
5241 291 38 13 2 v 16 w(Sp)n(e)n(c)156 b Fu(::=)50 b Fo(Datatyp)n(e)p
5242 813 38 V 16 w(View)p 920 38 V 14 w(Sp)n(e)n(c)129 88
5243 y(Datatyp)n(e)p 291 88 V 16 w(View)p 398 88 V 14 w(Sp)n(e)n(c)h
5244 Fu(::=)f Fo(Id)14 b Fs(::)k(view)13 b(=)692 138 y(match)g(\()h
5245 Fo(Exp)g Fs(\))692 188 y Fo(View)p 786 188 V 15 w(Cons)p
5246 892 188 V 16 w(Sp)n(e)n(cs)129 238 y(View)p 223 238 V
5247 14 w(Cons)p 328 238 V 16 w(Sp)n(e)n(cs)102 b Fu(::=)50
5248 b Fs(view)13 b Fo(Exp)h Fs(=>)g Fo(Cons)p 986 238 V 15
5249 w(Sp)n(e)n(c)h Fs(|)e Ft(:)7 b(:)g(:)13 b Fs(|)g(view)g
5250 Fo(Exp)i Fs(=>)e Fo(Cons)p 1559 238 V 16 w(Sp)n(e)n(c)54
5251 339 y Fw(Def)q(a)n(ul)o(t)g(argu)o(m)o(en)o(t)o(s)h(in)f(a)h
5252 Fo(Cons)p 577 339 V 16 w(Sp)n(e)n(c)g Fw(are)g(in)o(t)o(erpret)o(e)q(d)
5253 i(as)d(view)h(acce)q(ssors.)54 401 y(Th)o(ere)h(are)f(a)g(few)g(gen)o
5254 (eral)g(rule)q(s)g(t)o(o)g(obs)q(erv)o(e)i(wh)o(en)e(d)o(e\014nin)o(g)h
5255 (a)e(view:)51 495 y(1.)20 b(A)g Fs(datatype)g(view)f
5256 Fw(d)o(e\014nit)o(ion)h(only)f(d)o(e\014n)o(e)q(s)j(t)n(h)o(e)f(in)o(t)
5257 o(erf)q(ace)f(t)o(o)h(an)e(ext)o(er)q(n)o(al)i(d)o(a)o(t)o(a)f(stru)o
5258 (ct)o(ure)i(an)o(d)d(no)h(co)q(d)o(e)i(i)q(s)104 545
5259 y(gen)o(era)o(t)o(e)q(d.)e(In)14 b(part)o(icular,)f(t)n(h)o(e)i(d)o
5260 (e\014n)o(e)q(d)g(view)f(n)o(am)o(e)f(i)q(s)h(not)g(an)f(act)o(ual)h(C)
5261 p Fs(++)g Fw(t)o(yp)q(e.)k(Th)n(us)d(t)n(h)o(e)g(us)q(er)g(i)q(s)f(re)q
5262 (sp)q(ons)q(ible)104 595 y(for)f(d)o(e\014nin)o(g)i(all)e(ap)o(pro)o
5263 (pr)q(ia)o(t)o(e)g(t)o(yp)q(e)g(d)o(e\014nit)o(ions.)51
5264 678 y(2.)20 b(All)14 b(ot)n(h)o(er)i(quali\014ers)f(ot)n(h)o(er)h(t)n
5265 (h)o(an)f Fs(view)g Fw(are)g(ignore)q(d.)22 b(Th)n(us)16
5266 b(a)n(u)o(t)o(om)o(a)o(t)o(ic)e(gen)o(era)o(t)o(ion)h(of)f(pret)n(t)o
5267 (y)j(pr)q(in)o(t)o(ers,)e(garbage)104 728 y(collect)o(ion)e(in)o(t)o
5268 (erf)q(ace)h(rou)o(t)o(in)o(e)q(s,)g(et)o(c.)19 b(are)14
5269 b(di)q(sa)o(ble)q(d)f(for)g(views.)51 811 y(3.)20 b(In)d(gen)o(eral,)g
5270 (t)n(h)o(e)h(view)f(acce)q(ssors)j(m)n(ust)c(b)q(e)i(usa)o(ble)e(as)h
5271 (lv)n(alue)q(s)g(if)f(t)n(h)o(e)i(us)q(er)g(w)o(an)o(t)o(s)f(t)o(o)g
5272 (mo)q(dify)e(a)i(view)g(d)o(a)o(t)o(a)o(t)o(yp)q(e.)104
5273 861 y(Thi)q(s)c(includ)o(e)q(s)i(t)n(h)o(e)g(s)q(it)o(ua)o(t)o(ion)d
5274 (wh)o(en)i(in-place)f(rewr)q(it)o(in)o(g)h(i)q(s)f(us)q(e)q(d.)51
5275 944 y(4.)20 b(Fin)o(ally)m(,)d(t)n(h)o(e)h(us)q(er)i(are)e(re)q(sp)q
5276 (ons)q(ible)h(for)f(gen)o(era)o(t)o(in)o(g)g(t)n(h)o(e)h(constru)o(ct)o
5277 (or)h(fu)o(nct)o(ions.)32 b(In)18 b(t)n(h)o(e)h(t)o(w)o(o)e(example)q
5278 (s)g(giv)o(en)104 994 y(a)o(b)q(o)o(v)o(e,)c(t)n(h)o(e)h(us)q(er)h(sh)o
5279 (ould)f(implem)n(en)o(t)d(t)n(h)o(e)k(fu)o(nct)o(ions)f
5280 Fs(INT)p Fw(,)f Fs(ID)p Fw(,)g(et)o(c.)p eop
5281 %%Page: 54 55
5282 54 54 bop 0 -82 1981 3 v 0 -100 a Fq(8.)22 b Fp(Graph)c(Types)i(and)f
5283 (Graph)f(Rewriting)991 b Fw(54)0 45 y Fv(8)66 b(Graph)21
5284 b(T)n(yp)q(e)r(s)g(an)n(d)h(Graph)f(Rewr)q(it)n(in)o(g)0
5285 148 y Fw(A)12 b(t)o(ypical)g(compiler)f(us)q(e)q(s)i(m)o(an)o(y)e(t)o
5286 (yp)q(e)q(s)h(of)g(graphs)h(t)o(o)f(repre)q(s)q(en)o(t)j(in)o(t)o(er)q
5287 (n)o(al)c(program)g(inform)o(a)o(t)o(io)o(n.)k(F)m(or)d(inst)o(ance,)h
5288 (con)o(trol)0 198 y(\015o)o(w)18 b(graphs,)g(d)o(a)o(t)o(a)g(d)o(ep)q
5289 (en)o(d)o(ence)j(graphs,)d(call)f(graphs,)i(d)o(ef/us)q(e)g(c)o(h)o
5290 (ains)f(are)g(som)o(e)f(of)h(t)n(h)o(e)g(most)g(common)d(example)q(s.)0
5291 247 y(In)h(ord)o(er)h(t)o(o)e(a)n(u)o(t)o(om)o(a)o(t)o(e)h(t)n(h)o(e)g
5292 (pro)q(ce)q(ss)i(of)d(implem)n(en)o(t)o(in)o(g)e(an)o(d)i(m)o(anipula)o
5293 (t)o(in)o(g)e(t)n(h)o(e)q(s)q(e)k(graph)f(stru)o(ct)o(ure)q(s,)i
5294 Fz(Pro)o(p)e Fw(pro)o(vid)o(e)q(s)g(a)0 297 y(gen)o(er)q(ic)11
5295 b(form)o(ali)q(sm)o({)d Fo(gr)n(aph)k(typ)n(es)p Fw({)f(for)f(sp)q
5296 (ecifyin)o(g)h(m)n(ul)o(t)o(i)q(sort)o(e)q(d,)f(a)o(t)n(tr)q(ibu)o(t)o
5297 (e)q(d,)i(hierarc)o(hical)e(direct)o(e)q(d)j(graphs)e(in)f(v)o(ery)i
5298 (high)0 347 y(lev)o(el)i(m)o(ann)o(er.)20 b(Th)o(e)15
5299 b(d)o(a)o(t)o(a)g(stru)o(ct)o(ure)h(m)o(ap)o(pin)o(g)d(pro)q(ce)q(ss)k
5300 (of)d(transla)o(t)o(in)o(g)h(high)f(lev)o(el)g(graph)h(sp)q(eci\014ca)o
5301 (t)o(ions)g(in)o(t)o(o)f(concret)o(e)0 397 y(C)p Fs(++)g
5302 Fw(class)q(e)q(s)j(i)q(s)d(complet)o(ely)f(a)n(u)o(t)o(om)o(a)o(t)o(e)q
5303 (d.)21 b(Th)n(us)16 b(t)n(h)o(e)f(us)q(er)h(can)f(concen)o(tra)o(t)o(e)
5304 i(on)d(sp)q(ecifyin)o(g)h(t)n(h)o(e)g(s)q(em)o(an)o(t)o(ic)f(rela)o(t)o
5305 (ionships)0 447 y(b)q(et)o(w)o(een)h(t)n(h)o(e)f(elem)o(en)o(t)o(s)g
5306 (of)g(t)n(h)o(e)g(dom)o(ain,)d(inst)o(ead)k(of)e(t)n(h)o(e)i(implem)n
5307 (en)o(t)o(a)o(t)o(i)o(on)c(d)o(et)o(ails.)54 508 y(Th)o(e)e(graph)g
5308 (stru)o(ct)o(ure)j(m)o(ap)o(pin)o(g)7 b(pro)q(ce)q(ss)12
5309 b(us)q(e)q(s)e(real-t)o(im)o(e)e(s)q(et)i(m)o(ac)o(hin)o(e)e(s)q(im)n
5310 (ula)o(t)o(ion[)o(P)o(ai8)o(9)m(])h(an)o(d)g(su)n(bt)o(yp)q(e)h(an)o
5311 (alys)q(i)q(s[CFH)1981 493 y Fn(+)2007 508 y Fw(91)o(])0
5312 558 y(t)o(o)16 b(con)o(v)o(ert)h(asso)q(cia)o(t)o(iv)o(e)f(acce)q(ss)q
5313 (e)q(s)j(in)o(v)o(olvin)o(g)14 b(s)q(et)o(s,)j(m)o(aps,)e(an)o(d)h(m)n
5314 (ul)o(t)o(im)o(aps)d(in)o(t)o(o)j(h)o(ash)g(f)q(ree,)g(w)o(orst-cas)q
5315 (e)h(const)o(an)o(t)g(t)o(im)o(e)0 608 y(p)q(oin)o(t)o(er)d(m)o
5316 (anipula)o(t)o(ions.)h(Thi)q(s)e(o)o(pt)o(imiza)o(t)o(ion)e(i)q(s)i(p)q
5317 (erform)o(e)q(d)g(transparen)o(t)n(ly)i(b)o(y)f(t)n(h)o(e)g(transla)o
5318 (t)o(or.)54 670 y(Manipula)o(t)o(ion)e(of)h(graphs)h(stru)o(ct)o(ure)q
5319 (s)i(are)f(don)o(e)f(in)f(t)n(hree)j(w)o(ays:)0 758 y
5320 Fu(ob)s(ject-or)q(ien)n(t)n(e)q(d)h Fw(Us)q(in)o(g)h(a)g(st)o(an)o(d)o
5321 (ard)h(in)o(t)o(erf)q(ace)f(gen)o(era)o(t)o(e)q(d)i(f)q(rom)c
5322 Fz(Pro)o(p)j Fw(t)n(h)o(e)g(us)q(er)g(can)g(m)o(anipula)o(t)o(e)c(a)j
5323 (graph)g(in)g(t)n(h)o(e)104 807 y(usual)13 b(pro)q(ce)q(d)o(ural/ob)r
5324 (ject-or)q(ien)o(t)o(e)q(d)j(m)o(ann)o(er.)0 887 y Fu(s)q(et)f(form)o
5325 (ali)q(sm)j Fw(Us)q(in)o(g)h(an)g(em)n(b)q(e)q(dd)o(e)q(d)g
5326 (SETL[SDDS86)o(]-lik)o(e)f(su)n(blan)o(guage,)i(t)n(h)o(e)g(us)q(er)g
5327 (can)g(m)o(anipula)o(t)o(e)d(t)n(h)o(e)j(graphs)104 937
5328 y(us)q(in)o(g)13 b(high)h(lev)o(el)f(s)q(et)i(o)o(p)q(era)o(t)o(ions)e
5329 (su)o(c)o(h)i(as)f(s)q(et)g(compre)o(h)o(ens)q(ion.)0
5330 1017 y Fu(graph)h(rewr)q(it)o(in)n(g)j Fw(A)o(t)10 b(t)n(h)o(e)g(high)o
5331 (e)q(st)f(lev)o(el,)h(an)o(alys)q(i)q(s)e(an)o(d)h(transform)o(a)o(t)o
5332 (ion)e(can)i(b)q(e)g(carr)q(ie)q(d)h(ou)o(t)g(us)q(in)o(g)f(t)n(h)o(e)h
5333 (graph)f(rewr)q(it)o(in)o(g)104 1066 y(form)o(alism)o(.)54
5334 1154 y(In)14 b(t)n(hi)q(s)f(s)q(ect)o(ion)i(w)o(e'll)d(d)o(e)q(scr)q
5335 (ib)q(e)j(eac)o(h)g(of)e(t)n(h)o(e)q(s)q(e)j(t)o(o)o(pics)e(in)f(d)o
5336 (et)o(ail.)0 1281 y FF(8.1)56 b(Graph)19 b(T)n(yp)q(e)r(s)0
5337 1369 y Fw(A)e(d)o(eclara)o(t)o(ion)f(i)q(s)g(us)q(e)q(d)h(t)o(o)g(sp)q
5338 (ecify)g(a)f(graph)g(stru)o(ct)o(ure)j(wit)n(h)d(m)n(ul)o(t)o(iple)f
5339 (sort)o(s)j(of)e(la)o(b)q(ele)q(d)g(no)q(d)o(e)q(s)i(an)o(d)e(la)o(b)q
5340 (ele)q(d)g(direct)o(e)q(d)0 1419 y(e)q(dge)q(s.)i(A)o(t)n(tr)q(ibu)o(t)
5341 o(e)q(s)13 b(can)e(b)q(e)g(a)o(t)n(t)o(ac)o(h)o(e)q(d)h(t)o(o)f(b)q(ot)
5342 n(h)g(no)q(d)o(e)q(s)h(an)o(d)f(e)q(dge)q(s.)18 b(Th)o(e)11
5343 b(syn)o(t)o(ax)g(of)f Fs(graphtype)f Fw(d)o(eclara)o(t)o(ions)i(i)q(s)g
5344 (as)f(follo)o(ws:)129 1506 y Fo(Gr)n(aph)p 243 1506 13
5345 2 v 15 w(T)m(yp)n(e)62 b Fu(::=)50 b Fs(graphtype)12
5346 b Fo(Id)557 1555 y([)i Fs(:)19 b Fo(Inherit)p 752 1555
5347 V 15 w(List)14 b(])557 1605 y([)g Fs(::)19 b Fo(Gr)n(aph)p
5348 761 1605 V 15 w(Mo)n(de)d Ft(:)7 b(:)g(:)28 b Fo(Gr)n(aph)p
5349 1077 1605 V 15 w(Mo)n(de)16 b(])515 1655 y Fs(declare)557
5350 1705 y(node:)h Fo(No)n(de)p 777 1705 V 15 w(Def)d Fs(|)g
5351 Ft(:)7 b(:)g(:)12 b Fs(|)i Fo(No)n(de)p 1093 1705 V 16
5352 w(Def)557 1755 y Fs(edge:)j Fo(Edge)p 774 1755 V 16 w(Def)d
5353 Fs(|)f Ft(:)7 b(:)g(:)13 b Fs(|)g Fo(Edge)p 1087 1755
5354 V 16 w(Def)515 1805 y Fs(begin)557 1854 y Fo(Co)n(de)515
5355 1904 y Fs(end)g(graphtype)f(;)129 1954 y Fo(Gr)n(aph)p
5356 243 1954 V 15 w(Mo)n(de)51 b Fu(::=)129 2004 y Fo(No)n(de)p
5357 222 2004 V 15 w(Def)105 b Fu(::=)50 b Fo(Id)14 b([)h([)f
5358 Fs(of)h Fo(])f(T)m(yp)n(eExp)i(])129 2054 y(Edge)p 219
5359 2054 V 16 w(Def)107 b Fu(::=)50 b Fo(Id)14 b([)h Fs(of)f
5360 Fo(])g(T)m(yp)n(e)p 767 2054 V 15 w(Exp)g Fs(->)g Fo(T)m(yp)n(e)p
5361 1007 2054 V 15 w(Exp)435 2103 y Fi(j)68 b Fo(Id)14 b([)h
5362 Fs(of)f Fo(])g(T)m(yp)n(e)p 767 2103 V 15 w(Exp)g Fs(<->)f
5363 Fo(T)m(yp)n(e)p 1028 2103 V 16 w(Exp)435 2153 y Fi(j)68
5364 b Fo(Id)14 b([)h Fs(of)f Fo(])g(T)m(yp)n(e)p 767 2153
5365 V 15 w(Exp)g Fs(<=>)f Fo(T)m(yp)n(e)p 1028 2153 V 16
5366 w(Exp)435 2203 y Fi(j)68 b Fo(Id)14 b([)h Fs(of)f Fo(])g(T)m(yp)n(e)p
5367 767 2203 V 15 w(Exp)g Fs(<=>*)f Fo(T)m(yp)n(e)p 1050
5368 2203 V 15 w(Exp)0 2325 y FF(8.2)56 b(Th)n(e)18 b(Graph)i(In)n(t)n(erf)q
5369 (ace)0 2414 y Fo(This)14 b(se)n(ction)h(is)g(inc)n(omplete.)0
5370 2540 y FF(8.3)56 b(Set)18 b(F)-5 b(orm)o(ali)q(sms)0
5371 2629 y Fo(This)14 b(se)n(ction)h(is)g(inc)n(omplete.)p
5373 %%Page: 55 56
5374 55 55 bop 0 -82 1981 3 v 0 -100 a Fq(8.)22 b Fp(Graph)c(Types)i(and)f
5375 (Graph)f(Rewriting)991 b Fw(55)0 45 y FF(8.4)56 b(Graph)19
5376 b(Rewr)q(it)n(in)o(g)0 134 y Fo(This)14 b(se)n(ction)h(is)g(inc)n
5377 (omplete.)p eop
5378 %%Page: 56 57
5379 56 56 bop 0 -82 1981 3 v 0 -100 a Fq(9.)22 b Fp(R)o(unning)c(the)h
5380 (Transla)m(tor)1257 b Fw(56)0 45 y Fv(9)66 b(R)l(u)o(nnin)o(g)21
5381 b(t)m(h)n(e)g(T)-6 b(ransla)n(t)o(or)0 148 y Fw(Th)o(e)14
5382 b Fz(Pro)o(p)g Fw(transla)o(t)o(or)h(i)q(s)e(a)h(program)e(calle)q(d)i
5383 Fs(prop)p Fw(.)j(Th)o(e)d(transla)o(t)o(or)g(us)q(e)q(s)h(t)n(h)o(e)g
5384 (follo)o(win)o(g)c(comm)o(an)o(d)g(lin)o(e)i(syn)o(t)o(ax:)129
5385 243 y Fo(R)o(unning)p 284 243 13 2 v 16 w(Pr)n(op)50
5386 b Fw(::=)f Fs(prop)13 b Fo([)i Fw(pro)o(p)p 751 243 V
5387 15 w(o)o(pt)o(ions)f Fo(])g(\014le)27 b Ft(:)7 b(:)g(:)26
5388 b Fo(\014le)54 337 y Fw(Here,)14 b Fo(File)f Fw(i)q(s)g(a)g(\014le)g
5389 (wit)n(h)g(su\016x)h Fs(.p)p Fi(\003)p Fw(.)j(By)d(d)o(ef)q(a)n(ul)o
5390 (t,)f(t)n(h)o(e)h(ou)o(t)o(pu)o(t)h(\014le)e(will)f(h)o(a)o(v)o(e)h(t)n
5391 (h)o(e)h(sam)o(e)e(n)o(am)o(e)g(wit)n(h)i(t)n(h)o(e)g
5392 Fs(p)f Fw(ext)o(ens)q(ion)0 387 y(remo)o(v)o(e)q(d.)23
5393 b(F)m(or)15 b(example,)f(a)h(\014le)h(n)o(am)o(e)q(d)e(\\fo)q(o.pC")g
5394 (will)g(b)q(e)i(transla)o(t)o(e)q(d)g(in)o(t)o(o)f(t)n(h)o(e)i(\014le)e
5395 (\\fo)q(o.C")f(Similarly)m(,)e(a)j(\014le)h(n)o(am)o(e)q(d)0
5396 437 y(\\bar.ph")d(will)f(b)q(e)i(transla)o(t)o(e)q(d)h(in)o(t)o(o)e
5397 (\\bar.h")0 565 y FF(9.1)56 b(Opt)n(ions)0 654 y Fw(Th)o(e)14
5398 b(a)o(v)n(aila)o(ble)d(o)o(pt)o(ions)i(t)o(o)i(t)n(h)o(e)f(transla)o(t)
5399 o(or)g(are)h(as)f(follo)o(ws:)0 748 y Fs(-G)21 b(-GNU)f
5400 Fw(Us)q(e)15 b(GNU)f(st)o(yle)g(error)h(m)o(e)q(ssage)q(s.)0
5401 831 y Fs(-I)p Fc(path)20 b Fw(Us)q(e)e(t)n(h)o(e)g(s)q(earc)o(h)h(pa)o
5402 (t)n(h)e Fo(p)n(ath)p Fw(.)29 b Fz(Pro)o(p)18 b Fw(will)e(s)q(earc)o(h)
5403 j Fo(p)n(ath)e Fw(t)o(o)h(lo)q(ok)f(for)g Fz(Pro)o(p)h
5404 Fw(\014le)q(s)f(wit)n(h)h(t)n(h)o(e)g(su\016x)f Fs(.ph)g
5405 Fw(ins)q(id)o(e)g(a)104 881 y Fs(#include)12 b Fw(direct)o(iv)o(e.)18
5406 b(Mul)o(t)o(iple)13 b(pa)o(t)n(hs)i(can)f(b)q(e)g(sp)q(eci\014e)q(d)h
5407 (b)o(y)f(us)q(in)o(g)f(m)n(ul)o(t)o(iple)f Fs(-I)h Fw(o)o(pt)o(ions.)0
5408 964 y Fs(-l)21 b(-no)p 134 964 14 2 v 15 w(line)p 237
5409 964 V 15 w(directives)e Fw(By)d(d)o(ef)q(a)n(ul)o(t,)h
5410 Fz(Pro)o(p)f Fw(will)e(try)j(t)o(o)f(gen)o(era)o(t)o(e)h
5411 Fs(#line)e Fw(direct)o(iv)o(e)q(s)h(t)o(o)h(correla)o(t)o(e)f(t)n(h)o
5412 (e)h(source)g(an)o(d)104 1014 y(t)n(h)o(e)d(transla)o(t)o(e)q(d)h(ou)o
5413 (t)o(pu)o(t.)k(Thi)q(s)13 b(o)o(pt)o(ion)g(sup)o(pre)q(ss)q(e)q(s)k(t)n
5414 (hi)q(s)d(fea)o(t)o(ure.)0 1097 y Fs(-M)21 b(-make)p
5415 178 1097 V 15 w(depends)e Fw(Similarly)10 b(t)o(o)j(t)n(h)o(e)h
5416 Fs(-M)f Fw(o)o(pt)o(ion)f(in)g Fs(cc)h Fw(an)o(d)g Fs(cpp)p
5417 Fw(.)k(Thi)q(s)12 b(o)o(pt)o(ion)g(gen)o(era)o(t)o(e)q(s)j(a)e(suit)o
5418 (a)o(ble)f(d)o(ep)q(en)o(d)o(ency)j(li)q(st)104 1147
5419 y(for)e(Mak)o(e\014le)q(s.)0 1230 y Fs(-memory)p 157
5420 1230 V 14 w(usage)20 b Fw(Pr)q(in)o(t)13 b(m)o(emory)f(us)q(e)i(d)o(ur)
5421 q(in)o(g)g(transla)o(t)o(ion.)0 1313 y Fs(-n)21 b(-no)p
5422 134 1313 V 15 w(codegen)f Fw(Don't)13 b(ou)o(t)o(pu)o(t)i(an)o(y)e(co)q
5423 (d)o(e;)i(p)q(erform)d(s)q(em)o(an)o(t)o(ic)h(c)o(h)o(ec)o(kin)o(g)h
5424 (only)m(.)0 1396 y Fs(-N)21 b(-non)p 156 1396 V 15 w(linear)f
5425 Fw(Us)q(e)f(non-lin)o(ear)e(pa)o(t)n(t)o(er)q(ns)j(d)o(ur)q(in)o(g)e
5426 (pa)o(t)n(t)o(er)q(n)h(m)o(a)o(t)o(c)o(hin)o(g.)29 b(A)18
5427 b(non-lin)o(ear)g(pa)o(t)n(t)o(er)q(n)h(i)q(s)e(on)o(e)i(in)e(whic)o(h)
5428 h(a)104 1446 y(v)n(ar)q(ia)o(ble)12 b(o)q(ccurs)j(more)e(t)n(h)o(an)h
5429 (once.)19 b(By)14 b(d)o(ef)q(a)n(ul)o(t,)g Fz(Pro)o(p)g
5430 Fw(cons)q(id)o(er)h(t)n(hi)q(s)f(an)f(error.)0 1529 y
5431 Fs(-o)p Fc(outfile)19 b Fw(Sen)o(d)14 b(ou)o(t)o(pu)o(t)h(t)o(o)f
5432 Fo(out\014le)h Fw(inst)o(ead)f(of)f(t)n(h)o(e)i(d)o(ef)q(a)n(ul)o(t.)0
5433 1612 y Fs(-Ofast)p 135 1612 V 14 w(string)p 281 1612
5434 V 15 w(match)20 b Fw(Gen)o(era)o(t)o(e)13 b(\(p)q(ot)o(en)o(t)o
5435 (ially\))d(f)q(ast)o(er)j(str)q(in)o(g)f(m)o(a)o(t)o(c)o(hin)o(g)f(co)q
5436 (d)o(e)i(b)o(y)f(expan)o(din)o(g)g(str)q(in)o(g)g(lit)o(eral)f(t)o(e)q
5437 (st)o(s)j(in)o(t)o(o)104 1662 y(c)o(h)o(aract)o(er)h(t)o(e)q(st)o(s.)20
5438 b(By)14 b(d)o(ef)q(a)n(ul)o(t,)g Fz(Pro)o(p)g Fw(gen)o(era)o(t)o(e)q(s)
5439 i(str)q(in)o(g)e(t)o(e)q(st)o(s)i(us)q(in)o(g)d Fs(strcmp)g
5440 Fw(an)o(d)g(bin)o(ary)h(s)q(earc)o(h.)0 1745 y Fs(-Oadaptive)p
5441 223 1745 V 14 w(matching)19 b Fw(Us)q(e)14 b(t)n(h)o(e)h(ad)o(apt)o(iv)
5442 o(e)f(pa)o(t)n(t)o(er)q(n)g(m)o(a)o(t)o(c)o(hin)o(g)e(algor)q(it)n(hm)
5443 1243 1730 y Fn(12)1276 1745 y Fw(.)0 1828 y Fs(-Oinline)p
5444 179 1828 V 14 w(casts)20 b Fw(Gen)o(era)o(t)o(e)14 b(inlin)o(e)f(t)o
5445 (yp)q(e)h(cast)o(s)i(inst)o(ead)e(of)f(fu)o(nct)o(ion)h(calls)g(t)n(h)o
5446 (a)o(t)g(do)f(t)n(h)o(e)i(sam)o(e.)i(Thi)q(s)c(m)o(ay)f(b)q(e)i(f)q
5447 (ast)o(er)g(for)104 1878 y(compila)o(t)o(ion.)0 1961
5448 y Fs(-Orewriting)k Fw(En)o(a)o(ble)c(t)n(h)o(e)g(rewr)q(it)o(in)o(g)g
5449 (o)o(pt)o(imizer.)j(See)e(also)e(s)q(ect)o(ion)h(6.10)f(for)g(d)o(et)o
5450 (ails.)0 2044 y Fs(-Otagged)p 179 2044 V 14 w(pointer)19
5451 b Fw(Us)q(e)h(a)e(t)o(agge)q(d)g(p)q(oin)o(t)o(er)h(repre)q(s)q(en)o(t)
5452 o(a)o(t)o(ion)h(inst)o(ead)f(of)f(repre)q(s)q(en)o(t)o(in)o(g)i(v)n(ar)
5453 q(ian)o(t)d(t)o(ags)i(explicit)n(ly)e(in)h(a)104 2093
5454 y(stru)o(ct)o(ure)e(\014eld.)i(F)m(or)c(example,)e(if)h(t)n(h)o(ere)j
5455 (are)e(t)o(w)o(o)g(v)n(ar)q(ian)o(t)o(s)f(calle)q(d)h
5456 Fs(Foo)g Fw(an)o(d)f Fs(Bar)h Fw(in)f(a)h(d)o(a)o(t)o(a)o(t)o(yp)q(e.)
5457 19 b(Th)o(en)14 b(a)g(p)q(oin)o(t)o(er)104 2143 y(t)o(o)f
5458 Fs(Foo)g Fw(can)g(b)q(e)h(t)o(agge)q(d)f(wit)n(h)g(a)g(lo)o(w)f(ord)o
5459 (er)i(bit)f(0)g(while)g(a)g(p)q(oin)o(t)o(er)g(t)o(o)h
5460 Fs(Bar)e Fw(can)i(b)q(e)f(t)o(agge)q(d)g(wit)n(h)g(a)g(lo)o(w)f(ord)o
5461 (er)j(bit)e(1.)104 2193 y(Acce)q(ss)q(in)o(g)j(t)n(h)o(e)e(t)o(ag)g(t)n
5462 (h)n(us)h(b)q(ecom)o(e)q(s)e(just)i(a)e(s)q(imple)f(bit)h(t)o(e)q(st.)
5463 19 b(Thi)q(s)14 b(sh)o(ould)f(sa)o(v)o(e)h(space)h(an)o(d)f(m)o(ay)e(b)
5464 q(e)i(f)q(ast)o(er)1846 2178 y Fn(13)0 2276 y Fs(-r)21
5465 b(-report)f Fw(Gen)o(era)o(t)o(e)13 b(a)f(rep)q(ort)h(wh)o(en)o(ev)o
5466 (er)h(n)o(ece)q(ssary)m(.)19 b(P)o(ars)q(er,)14 b(str)q(in)o(g)e(m)o(a)
5467 o(t)o(c)o(hin)o(g,)f(an)o(d)h(rewr)q(it)o(in)o(g)g(constru)o(ct)o(s)j
5468 (pro)q(d)o(u)o(ce)104 2326 y(rep)q(ort)o(s.)0 2409 y
5469 Fs(-s)21 b(-strict)f Fw(Us)q(e)14 b(str)q(ict)h(s)q(em)o(an)o(t)o(ic)d
5470 (c)o(h)o(ec)o(kin)o(g)i(mo)q(d)o(e.)k(All)13 b(w)o(ar)q(nin)o(gs)g(are)
5471 i(cons)q(id)o(ere)q(d)g(t)o(o)f(b)q(e)g(errors.)p 0 2443
5472 792 2 v 31 2470 a Fm(12)64 2482 y Fl(Th)o(e)d(implem)o(en)o(t)n(a)o(t)o
5473 (io)o(n)e(m)o(ay)h(not)h(be)h(e\013ect)o(iv)o(e.)31 2510
5474 y Fm(13)64 2522 y Fl(Ho)o(w)o(ev)o(er,)f(t)o(his)f(fea)o(t)o(ure)h(h)o
5475 (as)f(not)h(been)g(fully)f(t)o(e)q(st)o(e)q(d.)p eop
5476 %%Page: 57 58
5477 57 57 bop 0 -82 1981 3 v 0 -100 a Fq(9.)22 b Fp(R)o(unning)c(the)h
5478 (Transla)m(tor)1257 b Fw(57)0 45 y Fs(-S)21 b(-save)p
5479 178 45 14 2 v 15 w(space)f Fw(Us)q(e)13 b(space)h(sa)o(vin)o(g)e(mo)q
5480 (d)o(e.)17 b(T)m(ry)12 b(not)g(t)o(o)h(us)q(e)g(inlin)o(e)f(fu)o(nct)o
5481 (ions)h(if)e(co)q(d)o(e)j(space)g(can)e(b)q(e)h(sa)o(v)o(e)q(d.)18
5482 b(Da)o(t)o(a)o(t)o(yp)q(e)104 95 y(constru)o(ct)o(ors)e(will)d(not)h(b)
5483 q(e)g(inlin)o(e)q(d)g(in)f(t)n(hi)q(s)h(mo)q(d)o(e.)k(Inst)o(ead,)d(d)o
5484 (a)o(t)o(a)o(t)o(yp)q(e)f(constru)o(ct)o(ors)j(will)12
5485 b(b)q(e)i(gen)o(era)o(t)o(e)q(d)i(a)o(t)e(wh)o(ere)104
5486 145 y(t)n(h)o(e)g(corre)q(sp)q(on)o(din)o(g)i Fs(instantiate)j
5487 (datatype)12 b Fw(d)o(eclara)o(t)o(ion)i(o)q(ccurs.)0
5488 228 y Fs(-t)21 b(-stdout)f Fw(Sen)o(d)14 b(transla)o(t)o(e)q(d)g
5489 (program)f(t)o(o)h(t)n(h)o(e)g(st)o(an)o(d)o(ard)h(ou)o(t)o(pu)o(t.)0
5490 311 y Fs(-use)p 91 311 V 15 w(global)p 238 311 V 14 w(pool)20
5491 b Fw(Us)q(e)15 b(global)d(m)o(emory)f(p)q(o)q(ol)i(for)h(allo)q(ca)o(t)
5492 o(ion.)0 394 y Fs(-v)p Fc(num)20 b Fw(Us)q(e)14 b(v)o(erb)q(os)q(e)i
5493 (mo)q(d)o(e)d(in)g(rep)q(ort)i(gen)o(era)o(t)o(ion.)j(Thi)q(s)c(will)e
5494 (pro)o(vid)o(e)i(more)f(d)o(et)o(aile)q(d)h(inform)o(a)o(t)o(ion.)0
5495 522 y FF(9.2)56 b(Error)18 b(M)o(e)r(s)q(sage)r(s)0 610
5496 y Fw(Th)o(e)h(follo)o(win)o(g)d(i)q(s)i(a)h(canonical)f(li)q(st)g(of)g
5497 (all)g(error)h(m)o(e)q(ssage)q(s)h(gen)o(era)o(t)o(e)q(d)g(b)o(y)f(t)n
5498 (h)o(e)g Fz(Pro)o(p)g Fw(transla)o(t)o(or.)33 b(Eac)o(h)20
5499 b(m)o(e)q(ssage)f(i)q(s)0 660 y(pre\014xe)q(d)f(b)o(y)d(t)n(h)o(e)i
5500 (\014le)f(n)o(am)o(e)f(an)o(d)h(lin)o(e)g(n)n(u)o(m)n(b)q(er)g(in)f
5501 (whic)o(h)h(t)n(h)o(e)h(error)g(o)q(ccurs.)27 b(Most)17
5502 b(of)e(t)n(h)o(e)q(s)q(e)j(errors)g(m)o(e)q(ssage)q(s)f(are)f(s)q(elf)0
5503 710 y(explan)o(a)o(t)o(ory;)d(more)g(d)o(et)o(aile)q(d)h(explan)o(a)o
5504 (t)o(ions)f(are)h(pro)o(vid)o(e)q(d)g(b)q(elo)o(w.)p
5506 %%Page: 58 59
5507 58 58 bop 0 -82 1981 3 v 0 -100 a Fq(9.)22 b Fp(R)o(unning)c(the)h
5508 (Transla)m(tor)1257 b Fw(58)65 38 y Fu(Error)835 b(Exp)o(lan)o(a)o(t)o
5509 (ion)p 40 55 1900 2 v 65 90 a Fs(unknown)20 b(option)h
5510 Fc(option)491 b Fw(Th)o(e)20 b(transla)o(t)o(or)g(do)q(e)q(s)g(not)g
5511 (recognize)h(t)n(h)o(e)g(comm)o(an)o(d)1015 140 y(lin)o(e)13
5512 b Fo(option)p Fw(.)19 b(T)o(yp)q(e)13 b Fo(pr)n(op)h
5513 Fw(t)o(o)g(s)q(ee)h(a)f(li)q(st)f(of)g(o)o(pt)o(ions.)p
5514 40 156 V 65 191 a Fs(Error)21 b(in)g(command:)42 b Fc(command)382
5515 b Fw(Th)o(e)12 b(transla)o(t)o(or)h(f)q(ails)d(wh)o(en)i(tryin)o(g)h(t)
5516 o(o)f(execu)o(t)o(ion)h Fo(c)n(om-)1015 241 y(mand)p
5517 Fw(.)19 b(Wh)o(en)13 b(m)n(ul)o(t)o(iple)f(\014le)q(s)i(are)g(sp)q
5518 (eci\014e)q(d)h(in)e(a)g(com-)1015 291 y(m)o(an)o(d)f(lin)o(e,)h
5519 Fo(pr)n(op)h Fw(in)o(v)o(ok)o(e)q(s)f(it)o(s)q(elf)h(on)g(eac)o(h)h(of)
5520 e(t)n(h)o(e)h(\014le.)p 40 307 V 65 342 a Fc(pat)21 b
5521 Fs(with)g(type)g Fc(type)g Fs(is)h(not)f(unifiable)185
5522 b Fw(P)o(a)o(t)n(t)o(er)q(n)21 b(h)o(as)f(not)g(b)q(een)h(d)o(eclare)q
5523 (d)g(t)o(o)g(b)q(e)f(a)g(u)o(ni\014a)o(ble)1015 392 y(t)o(yp)q(e.)p
5524 40 409 V 65 444 a Fs(Sorry:)42 b(pattern)21 b(not)g(supported)f(in)65
5525 493 y(rewriting:)42 b Fc(pat)1015 444 y Fw(P)o(a)o(t)n(t)o(er)q(n)20
5526 b Fo(p)n(at)g Fw(i)q(s)f(not)g(sup)o(p)q(ort)o(e)q(d.)36
5527 b(Curren)o(t)n(ly)m(,)21 b(logical)1015 493 y(pa)o(t)n(t)o(er)q(n)11
5528 b(conn)o(ect)o(iv)o(e)q(s)g(are)g(not)f(sup)o(p)q(ort)o(e)q(d)h(in)e
5529 (rewr)q(it)o(in)o(g.)1015 543 y(Y)m(ou'll)j(h)o(a)o(v)o(e)h(t)o(o)i
5530 (rewr)q(it)o(e)f(t)n(h)o(em)f(in)o(t)o(o)h(non-logical)d(form.)p
5531 40 560 V 65 595 a Fs(Unknown)20 b(complexity)g(operator:)42
5532 b Fc(op)p 40 611 V 65 646 a Fs(accessor)20 b(is)i(undefined)e(for)h
5533 (view)g(pattern:)65 696 y Fc(pat)1015 646 y Fw(An)16
5534 b(acce)q(ssor)j(fu)o(nct)o(ion)d(h)o(as)g(not)f(b)q(een)i(d)o(eclare)q
5535 (d)g(for)f(a)1015 696 y(constru)o(ct)o(or.)k(Wh)o(en)14
5536 b(us)q(in)o(g)g(d)o(a)o(t)o(a)o(t)o(yp)q(e)f(views)p
5537 40 713 V 65 747 a Fs(arity)21 b(mismatch)f(\(expecting)g
5538 Ft(n)p Fs(\))h(in)h(pattern:)65 797 y Fc(pat)1015 747
5539 y Fw(P)o(a)o(t)n(t)o(er)q(n)14 b Fo(p)n(at)g Fw(i)q(s)f(exp)q(ect)o(e)q
5540 (d)j(t)o(o)e(h)o(a)o(v)o(e)f(ar)q(it)o(y)g Ft(n)p Fw(.)18
5541 b(Th)o(e)c(ar)q(it)o(y)1015 797 y(i)q(s)f(t)n(h)o(e)i(n)n(u)o(m)n(b)q
5542 (er)f(of)f(expre)q(ss)q(ions)j(t)n(h)o(a)o(t)e(y)o(ou're)f(m)o(a)o(t)o
5543 (c)o(hin)o(g)1015 847 y(concurren)o(t)n(ly)m(.)27 b(If)16
5544 b(y)o(ou)g(are)h(m)o(a)o(t)o(c)o(hin)o(g)e Ft(n)i Fw(ob)r(ject)o(s)h(t)
5545 n(h)o(en)1015 897 y(t)n(h)o(ere)d(m)n(ust)f(b)q(e)g Ft(n)f
5546 Fw(pa)o(t)n(t)o(er)q(ns)i(for)f(eac)o(h)h(rule.)p 40
5547 914 V 65 948 a Fs(arity)21 b(mismatch)f(in)h(logical)g(pattern:)42
5548 b Fc(pat)99 b Fw(Logical)25 b(pa)o(t)n(t)o(er)q(ns)k(do)d(not)h(m)o(a)o
5549 (t)o(c)o(h)f(t)n(h)o(e)i(ar)q(it)o(y)e(of)g(a)1015 998
5550 y(pa)o(t)n(t)o(er)q(n.)p 40 1015 V 65 1050 a Fs(bad)21
5551 b(constructor)f(type)h Fc(type)p 40 1066 V 65 1101 a
5552 Fs(bad)g(view)g(constructor)f(pattern:)42 b Fc(pat)p
5553 40 1118 V 65 1153 a Fs(can't)21 b(find)g(include)f(file)h
5554 Fc(file)339 b Fw(Addit)o(ion)o(al)14 b(s)q(earc)o(h)i(pa)o(t)n(hs)g
5555 (can)g(b)q(e)f(sp)q(eci\014e)q(d)i(wit)n(h)e(t)n(h)o(e)1015
5556 1202 y Fs(-I)e Fw(o)o(pt)o(ion)p 40 1219 V 65 1254 a
5557 Fs(component)20 b(#)p Ft(i)i Fs(not)f(found)g(in)g(constructor)f
5558 Fc(con)63 b Fw(Da)o(t)o(a)o(t)o(yp)q(e)13 b(constru)o(ct)o(or)i
5559 Fo(c)n(on)f Fw(do)q(e)q(s)g(not)g(h)o(a)o(v)o(e)f(a)g(comp)q(o-)1015
5560 1304 y(n)o(en)o(t)h(n)o(am)o(e)q(d)g(#)p Ft(i)p Fw(.)19
5561 b(Thi)q(s)13 b(can)i(h)o(ap)o(p)q(en)f(wh)o(en)g(y)o(ou)g(wr)q(it)o(e)
5562 1015 1354 y(a)i(record)h(constru)o(ct)o(or)i(expre)q(ss)q(ion)e(an)o(d)
5563 f(mi)q(ssp)q(el)o(t)g(on)o(e)1015 1403 y(of)d(t)n(h)o(e)i(la)o(b)q
5564 (els.)p 40 1420 V 65 1455 a Fs(component)20 b Ft(l)j
5565 Fs(not)e(found)g(in)g(constructor)f Fc(con)86 b Fw(Da)o(t)o(a)o(t)o(yp)
5566 q(e)13 b(constru)o(ct)o(or)k Fo(c)n(on)e Fw(do)q(e)q(s)f(not)g(h)o(a)o
5567 (v)o(e)g(a)g(la)o(b)q(ele)q(d)1015 1505 y(comp)q(on)o(en)o(t)f
5568 Ft(l)q Fw(.)p 40 1521 V 65 1556 a Fs(constructor)20 b
5569 Fc(con)h Fs(already)f(has)h(print)g(formats)p 40 1573
5570 V 65 1608 a(constructor)f Fc(con)h Fs(is)g(not)g(a)h(class)p
5571 40 1624 V 65 1659 a(constructor)e Fc(con)h Fs(is)g(not)g(a)h(lexeme)273
5572 b Fw(A)16 b(constru)o(ct)o(or)i(i)q(s)d(us)q(e)q(d)i(as)f(a)g(t)o
5573 (ermin)o(al)e(in)i(t)n(h)o(e)h(pars)q(er)1015 1709 y(bu)o(t)d(it)g(h)o
5574 (as)g(not)g(b)q(een)g(d)o(eclare)q(d)h(t)o(o)g(b)q(e)e(a)h(lexem)o(e.)p
5575 40 1725 V 65 1760 a Fs(constructor)20 b Fc(con)h Fs(doesn't)f(take)h
5576 (labeled)65 1810 y(arguments)1015 1760 y Fw(Y)m(ou're)14
5577 b(tryin)o(g)g(t)o(o)h(us)q(e)f(record)i(constru)o(ct)o(or)g(syn)o(t)o
5578 (ax)e(on)1015 1810 y(a)c(constru)o(ct)o(or)j(t)o(ak)o(e)e(do)q(e)q(s)f
5579 (not)h(t)o(ak)o(e)g(record)g(argu)o(m)o(en)o(t)o(s.)p
5580 40 1827 V 65 1862 a Fs(constructor)20 b Fc(con)h Fs(is)g(undefined)p
5581 40 1878 V 65 1913 a(cyclic)g(type)g(definition)e(in)j(type)f
5582 Fc(id)g Fs(=)h Fc(type)77 b Fw(T)o(yp)q(e)10 b(a)o(bbrevia)o(t)o(ions)g
5583 (cannot)h(b)q(e)f(cyclic.)17 b(F)m(or)11 b(recurs)q(iv)o(e)1015
5584 1963 y(t)o(yp)q(e)q(s,)j(us)q(e)g Fs(datatype)e Fw(d)o(e\014nit)o
5585 (ions.)p 40 1980 V 65 2014 a Fs(datatype)20 b Fc(T)i
5586 Fs(is)f(not)g(a)h(lexeme)f(type)273 b Fo(T)15 b Fw(i)q(s)h(us)q(e)q(d)g
5587 (as)g(a)g(t)o(ermin)o(al)e(wit)n(hin)h(syn)o(t)o(ax)h(class)h(wh)o(en)
5588 1015 2064 y(it)i(h)o(as)h(not)g(b)q(een)g(d)o(eclare)q(d)i(as)d(a)h
5589 (lexem)o(e)f(t)o(yp)q(e.)36 b(All)1015 2114 y(non-t)o(ermin)o(als)12
5590 b(m)n(ust)g(b)q(e)i(a)f(d)o(e\014n)o(e)q(d)h(us)q(in)o(g)f(t)n(h)o(e)h
5591 Fs(lexeme)1015 2164 y Fw(quali\014er.)p 40 2180 V 65
5592 2215 a Fs(determinism)20 b Fc(det)h Fs(not)g(recognized)p
5593 40 2232 V eop
5594 %%Page: 59 60
5595 59 59 bop 0 -82 1981 3 v 0 -100 a Fq(9.)22 b Fp(R)o(unning)c(the)h
5596 (Transla)m(tor)1257 b Fw(59)65 38 y Fu(Error)835 b(Exp)o(lan)o(a)o(t)o
5597 (ion)p 40 55 1900 2 v 65 90 a Fs(duplicated)20 b(definition)g(of)h
5598 (pattern)65 140 y(constructor)f(')p Fc(con)p Fs(')1015
5599 90 y Fw(Th)o(e)d(constru)o(ct)o(or)i Fo(c)n(on)e Fw(h)o(as)g(already)g
5600 (b)q(een)h(in)e(anot)n(h)o(er)1015 140 y(d)o(a)o(t)o(a)o(t)o(yp)q(e.)i
5601 Fo(Pr)n(op)13 b Fw(do)q(e)q(s)g(not)g(allo)o(w)f(o)o(v)o(erloadin)o(g)g
5602 (of)h(con-)1015 190 y(stru)o(ct)o(or)j(n)o(am)o(e)q(s.)p
5603 40 206 V 65 241 a Fs(duplicated)k(label)h(')p Ft(l)q
5604 Fs(')g(in)h(expression:)41 b Fc(exp)86 b Fw(A)14 b(record)h(t)o(yp)q(e)
5605 f(h)o(as)g(on)o(e)g(of)f(it)o(s)h(la)o(b)q(els)f(d)o(uplica)o(t)o(e)q
5606 (d.)p 40 258 V 65 293 a Fs(duplicated)20 b(label)h(')p
5607 Ft(l)q Fs(')g(in)h(type)f Fc(type)p 40 309 V 65 344 a
5608 Fs(duplicated)f(pattern)g(variable)g(')p Fc(id)p Fs('.)43
5609 b(Use)65 394 y(option)21 b(-N)1015 344 y Fw(By)f(d)o(ef)q(a)n(ul)o(t,)i
5610 (pa)o(t)n(t)o(er)q(n)f(v)n(ar)q(ia)o(ble)q(s)d(m)o(ay)g(not)i(b)q(e)g
5611 (d)o(upli-)1015 394 y(ca)o(t)o(e)q(d)g(wit)n(hin)g(a)f(pa)o(t)n(t)o(er)
5612 q(n.)37 b(Non-lin)o(ear)19 b(pa)o(t)n(t)o(er)q(ns)i(are)1015
5613 444 y(allo)o(w)o(e)q(d)13 b(only)g(wh)o(en)h(t)n(h)o(e)h(o)o(pt)o(ion)d
5614 Fs(-N)i Fw(i)q(s)f(in)o(v)o(ok)o(e)q(d.)p 40 460 V 65
5615 495 a Fs(edge)21 b Ft(e)h Fs(is)g(not)f(defined)f(in)h(graphtype)f
5616 Fc(id)p 40 512 V 65 547 a Fs(empty)h(type)g(list)g(in)g(rewrite)g
5617 (\(...\))42 b(...)p 40 563 V 65 598 a(expecting)20 b
5618 Ft(c)301 604 y Fn(1)341 598 y Fs(...)43 b Ft(c)468 604
5619 y Fn(2)509 598 y Fs(\(from)21 b(line)f Ft(l)q Fs(\))i(but)65
5620 648 y(found)f Ft(c)214 654 y Fn(3)254 648 y Fs(...)43
5621 b Ft(c)381 654 y Fn(4)422 648 y Fs(instead)1015 598 y
5622 Fw(Quot)o(a)o(t)o(ion)13 b(sym)n(b)q(ols)f(are)i(not)g(pro)o(p)q(erly)g
5623 (balance)q(d.)p 40 664 V 65 699 a Fs(expecting)20 b(non-terminal)f
5624 Fc(nt)j Fs(to)f(have)g(type)g Ft(t)930 705 y Fn(1)65
5625 749 y Fs(but)g(found)g Ft(t)298 755 y Fn(2)1015 699 y
5626 Fw(Non-t)o(ermin)o(al)13 b Fo(nt)h Fw(h)o(as)h(already)g(b)q(een)g(d)o
5627 (e\014n)o(e)q(d)h(t)o(o)f(h)o(a)o(v)o(e)1015 749 y(a)g(syn)o(t)n(h)o(e)
5628 q(s)q(ize)q(d)h(a)o(t)n(tr)q(ibu)o(t)o(e)g(t)o(yp)q(e)e(of)h
5629 Ft(t)1601 755 y Fn(1)1634 749 y Fw(bu)o(t)h Ft(t)1726
5630 755 y Fn(2)1759 749 y Fw(i)q(s)e(fou)o(n)o(d.)1015 799
5631 y(Thi)q(s)i(can)g(h)o(ap)o(p)q(en)h(if)e(y)o(ou)h(h)o(a)o(v)o(e)g(rule)
5632 q(s)h(wit)n(h)g(t)n(h)o(e)g(sam)o(e)1015 849 y(lhs)d(non-t)o(ermin)o
5633 (al)e(previously)h(d)o(e\014n)o(e)q(d.)p 40 865 V 65
5634 900 a Fs(expecting)20 b(type)h Ft(t)407 906 y Fn(1)447
5635 900 y Fs(but)h(found)e Ft(t)680 906 y Fn(2)721 900 y
5636 Fs(in)h(pattern)65 950 y(variable)f(')p Fc(v)p Fs(')1015
5637 900 y Fo(Pr)n(op)9 b Fw(p)q(erforms)g(t)o(yp)q(e)g(inference)i(on)e
5638 (all)f(t)n(h)o(e)i(lhs)g(pa)o(t)n(t)o(er)q(ns)1015 950
5639 y(t)o(o)h(d)o(et)o(ermin)o(e)f(t)n(h)o(e)h(t)o(yp)q(e)q(s)g(of)f(all)g
5640 (v)n(ar)q(ia)o(ble)q(s.)15 b(T)o(yp)q(e)10 b(errors)1015
5641 1000 y(can)k(o)q(ccur)h(if)e(t)n(h)o(e)i(pa)o(t)n(t)o(er)q(ns)g(are)f
5642 (mi)q(swr)q(it)n(t)o(en.)p 40 1016 V 65 1051 a Fs(expecting)20
5643 b(type)h Ft(t)407 1057 y Fn(1)447 1051 y Fs(but)h(found)e
5644 Ft(t)680 1057 y Fn(2)p 40 1068 V 65 1103 a Fs(flexible)g(vector)h
5645 (pattern)f(currently)g(not)65 1153 y(supported)g(in)h(rewriting:)42
5646 b Fc(pat)p 40 1169 V 65 1204 a Fs(format)21 b(#)p Ft(i)h
5647 Fs(used)e(on)i(constructor)d Fc(con)p 40 1221 V 65 1256
5648 a Fs(format)i(#)p Ft(l)h Fs(used)f(on)h(non-record)e(constructor)65
5649 1305 y Fc(con)p 40 1322 V 65 1357 a Fs(function)g(name)h(mismatch:)42
5650 b(expecting)20 b Ft(f)26 b Fs(...)p 40 1373 V 65 1408
5651 a(illegal)20 b(character)g Ft(c)p 40 1425 V 65 1460 a
5652 Fs(illegal)g(context)h(type:)42 b Fc(type)361 b Fw(A)20
5653 b(con)o(t)o(ext)h(t)o(yp)q(e)g(in)f(a)g Fs(matchscan)f
5654 Fw(st)o(a)o(t)o(em)o(en)o(t)g(m)n(ust)1015 1510 y(b)q(e)h(previously)f
5655 (d)o(e\014n)o(e)q(d)j(t)o(o)e(b)q(e)g(d)o(a)o(t)o(a)o(t)o(yp)q(e.)36
5656 b(Th)o(e)20 b(u)o(nit)1015 1559 y(constru)o(ct)o(ors)12
5657 b(of)e(t)n(h)o(e)g(d)o(a)o(t)o(a)o(t)o(yp)q(e)g(can)g(b)q(e)g(us)q(e)q
5658 (d)h(as)e(con)o(t)o(ext)1015 1609 y(v)n(alue)q(s.)p 40
5659 1626 V 65 1661 a Fs(illegal)20 b(context\(s\))g(in)i(pattern)e
5660 Fc(pat)p 40 1677 V 65 1712 a Fs(illegal)g(format)h(')p
5661 417 1712 14 2 v 15 w(')h(on)f(constructor)f Fc(con)p
5662 40 1729 1900 2 v 65 1764 a Fs(illegal)g(incomplete)g(record)h(pattern:)
5663 42 b Fc(pat)p 40 1780 V 65 1815 a Fs(illegal)20 b(print)h(format)g(')p
5664 Ft(c)p Fs(')g(in)g(constructor)65 1865 y Fc(con)p 40
5665 1882 V 65 1916 a Fs(illegal)f(record)h(label)g(')p Ft(l)q
5666 Fs(')g(in)h(expression:)65 1966 y Fc(exp)p 40 1983 V
5667 65 2018 a Fs(illegal)e(width)h(in)h(bitfield)e(')p Fc(id)h
5668 Fs(\()p Ft(n)p Fs(\)')p 40 2034 V 65 2069 a(inherited)f(attribute)g(')p
5669 Fc(type)p Fs(')h(can)g(only)g(be)65 2119 y(used)g(in)g(treeparser)f
5670 (mode)h(in)h(rewrite)e(class)65 2169 y Fc(id)p 40 2185
5671 V eop
5672 %%Page: 60 61
5673 60 60 bop 0 -82 1981 3 v 0 -100 a Fq(9.)22 b Fp(R)o(unning)c(the)h
5674 (Transla)m(tor)1257 b Fw(60)65 38 y Fu(Error)835 b(Exp)o(lan)o(a)o(t)o
5675 (ion)p 40 55 1900 2 v 65 90 a Fs(law)21 b Fc(id)p Fs(\(...\))42
5676 b(=)22 b Fc(pat)f Fs(is)h(not)f(invertible)163 b Fw(P)o(a)o(t)n(t)o(er)
5677 q(n)13 b Fo(p)n(at)g Fw(cannot)g(b)q(e)f(trea)o(t)o(e)q(d)j(as)d(an)h
5678 (expre)q(ss)q(ion.)19 b(It)1015 140 y(m)o(ay)12 b(in)o(v)o(olv)o(e)g
5679 (logical)g(pa)o(t)n(t)o(er)q(ns)j(an)o(d)f(wild)f(cards.)p
5680 40 156 V 65 191 a Fs(law)21 b(')p Fc(id)p Fs(':)43 b(bound)21
5681 b(variable)f(')p Ft(v)q Fs(')i(is)f(absent)65 241 y(in)g(body)g
5682 Fc(exp)1015 191 y Fw(A)12 b(param)o(et)o(er)f(v)n(ar)q(ia)o(ble)e
5683 Ft(v)k Fw(m)n(ust)e(b)q(e)h(pre)q(s)q(en)o(t)h(wit)n(hin)e(t)n(h)o(e)
5684 1015 241 y(b)q(o)q(dy)j(of)f(a)h(law.)p 40 307 V 65 342
5685 a Fs(law)21 b(')p Fc(id)p Fs(':)43 b(type)21 b Fc(type)g
5686 Fs(cannot)f(be)i(used)f(in)65 392 y(parameter)f Fc(id)p
5687 40 409 V 65 444 a Fs(lexeme)h Fc(id)g Fs(is)g(undefined)p
5688 40 460 V 65 495 a(lexeme)g(class)f Fc(id)i Fs(is)f(undefined)p
5689 40 512 V 65 547 a(lexeme)g(pattern)f(is)h(undefined)f(for)65
5690 596 y(constructor)g Fc(con)p 40 613 V 65 648 a Fs(lexeme)h
5691 Fi(f)p Fc(id)p Fi(g)g Fs(already)f(defined)g(as)i Fc(regexp)p
5692 40 664 V 65 699 a Fs(lexeme)f Fi(f)p Fc(id)p Fi(g)g Fs(is)g(undefined)f
5693 (in)h Fc(regexp)p 40 716 V 65 751 a Fs(missing)f(')p
5694 Fi(g)p Fs(')i(in)f(regular)f(expression)g Fc(regexp)p
5695 40 767 V 65 802 a Fs(missing)g(label)h(')p Ft(l)q Fs(')h(in)f
5696 (expression:)41 b Fc(con)22 b(exp)p 40 819 V 65 854 a
5697 Fs(missing)e(non-terminal)g(in)h(tree)g(grammar)65 904
5698 y(rule:)43 b Fc(nt)p 40 920 V 65 955 a Fs(missing)20
5699 b(type)h Fc(type)g Fs(in)h(the)f(traversal)f(list)65
5700 1005 y(of)h(rewrite)g(class)g Fc(id)1015 955 y Fw(Wit)n(hin)9
5701 b(t)n(h)o(e)h(rewr)q(it)o(in)o(g)g(rule)q(s,)h(y)o(ou)e(h)o(a)o(v)o(e)g
5702 (us)q(e)q(d)i(a)e(pa)o(t)n(t)o(er)q(n)1015 1005 y(t)n(h)o(a)o(t)j(in)o
5703 (v)o(olv)o(e)e(a)i(constru)o(ct)o(or)i(of)e(t)o(yp)q(e)g
5704 Fo(typ)n(e)g Fw(direct)n(ly)g(bu)o(t)1015 1055 y(no)i(su)o(c)o(h)h(t)o
5705 (yp)q(e)q(s)g(are)g(d)o(e\014n)o(e)q(d)h(in)e(t)n(h)o(e)h(rewr)q(it)o
5706 (e)g(class)h(d)o(ef-)1015 1104 y(init)o(ion.)22 b(Y)m(ou)16
5707 b(sh)o(ould)f(add)h(t)n(h)o(e)h(t)o(yp)q(e)f(t)o(o)g(t)n(h)o(e)g(tra)o
5708 (v)o(ersal)1015 1154 y(li)q(st.)p 40 1221 V 65 1256 a
5709 Fs(missing)k(type)h(info)g(in)h(expression)d Fc(exp)j
5710 Fs(:)65 1305 y Fc(type)1015 1256 y Fw(Som)o(et)o(im)o(e)q(s)17
5711 b Fo(pr)n(op)i Fw(f)q(ails)e(t)o(o)j(infer)f(t)n(h)o(e)h(t)o(yp)q(e)f
5712 (of)g(an)g(ex-)1015 1305 y(pre)q(ss)q(ion)e(wit)n(hin)e(a)h
5713 Fo(match)g Fw(st)o(a)o(t)o(em)o(en)o(t.)24 b(It)16 b(su)o(c)o(h)h(cas)q
5714 (e)q(s)1015 1355 y(it)11 b(i)q(s)h(n)o(ece)q(ssary)i(t)o(o)e(h)o(elp)g
5715 (ou)o(t)g(t)n(h)o(e)g(transla)o(t)o(or)h(b)o(y)e(addin)o(g)1015
5716 1405 y(addit)o(ion)o(al)16 b(t)o(yp)q(e)j(inform)o(a)o(t)o(ion)c(in)j
5717 (t)n(h)o(e)h(pa)o(t)n(t)o(er)q(ns.)33 b(F)m(or)1015 1455
5718 y(example,)14 b(rewr)q(it)o(e)j(som)o(e)e(pa)o(t)n(t)o(er)q(n)i
5719 Ft(p)f Fw(as)g(\()p Ft(p)f Fw(:)g Ft(\034)5 b Fw(\))16
5720 b(wh)o(ere)1015 1505 y Ft(\034)j Fw(i)q(s)13 b(t)n(h)o(e)i(t)o(yp)q(e)e
5721 (of)h Ft(p)p Fw(.)p 40 1571 V 65 1606 a Fs(missing)20
5722 b(type)h(info)g(in)h(function)e Fc(f)h(type)165 b Fw(Similar)11
5723 b(t)o(o)j(a)o(b)q(o)o(v)o(e)p 40 1623 V 65 1657 a Fs(missing)20
5724 b(type)h(info)g(in)h(rule:)42 b Fc(f)22 b(pat)f Fs(:)43
5725 b Fc(type)56 b Fw(Similar)11 b(t)o(o)j(a)o(b)q(o)o(v)o(e.)p
5726 40 1674 V 65 1709 a Fs(missing)20 b(view)h(selector)g(for)g(pattern:)42
5727 b Fc(pat)p 40 1725 V 65 1760 a Fs(multiple)20 b(mixed)h(polarity)f
5728 (pattern)g(variable)65 1810 y(')p Fc(v)p Fs(')p 40 1827
5729 V 65 1862 a(multiple)g(unit)h(constructors)f(in)h(polymorphic)65
5730 1911 y(type)g Fc(id)g(arg)h Fs(is)f(not)g(supported)p
5731 40 1928 V 65 1963 a(negative)f(cost)h Fc(cost)g Fs(is)h(illegal)p
5732 40 1980 V 65 2014 a(node)f Fc(id)g Fs(is)h(not)f(defined)f(in)i
5733 (graphtype)e Fc(id)p 40 2031 V 65 2066 a Fs(non)h(lexeme)g(type)g
5734 Fc(type)g Fs(in)g(pattern)f Fc(pat)p 40 2082 V 65 2117
5735 a Fs(non-relation)f(type)i Fc(type)g Fs(in)h(pattern:)42
5736 b Fc(pat)p 40 2134 V 65 2169 a Fs(pattern)20 b(is)i(undefined)e(for)h
5737 (lexeme)f Fc(l)p 40 2185 V 65 2220 a Fs(pattern)g(scope)h(stack)g
5738 (overflows)p 40 2237 V 65 2272 a(pattern)f(scope)h(stack)g(underflows)p
5739 40 2288 V eop
5740 %%Page: 61 62
5741 61 61 bop 0 -82 1981 3 v 0 -100 a Fq(9.)22 b Fp(R)o(unning)c(the)h
5742 (Transla)m(tor)1257 b Fw(61)65 38 y Fu(Error)835 b(Exp)o(lan)o(a)o(t)o
5743 (ion)p 40 55 1900 2 v 65 90 a Fs(pattern)20 b(variable)h(')p
5744 Ft(v)q Fs(')h(has)f(no)g(binding)f(at)65 140 y(this)h(point)p
5745 40 156 V 65 191 a(persist)f(object)h(id)g(is)h(undefined)e(for)h
5746 Fc(con)p 40 208 V 65 243 a Fs(persistence)f(pid)h Fc(name)g
5747 Fs(already)f(allocated)65 293 y(for)h(type)g Fc(type)p
5748 40 309 V 65 344 a Fs(persistence)f(redefined)g(for)h(type)g
5749 Fc(type)p 40 361 V 65 395 a Fs(precedence)f(symbol)g(must)h(be)h
5750 (terminal:)41 b Fc(term)p 40 412 V 65 447 a Fs(predicate)20
5751 b Fc(p)p Fs(:)43 b(expecting)20 b(type)h Ft(t)712 453
5752 y Fn(1)752 447 y Fs(but)h(found)65 497 y Ft(t)80 503
5753 y Fn(2)p 40 513 V 65 548 a Fs(redefinition)d(of)j(bitfield)e(')p
5754 Fc(field)p Fs('.)p 40 565 V 65 600 a(redefinition)f(of)j(constructor)d
5755 (')p Fc(con)p Fs(')p 40 616 V 65 651 a(redefinition)g(of)j(datatype)e
5756 Fc(id)p 40 668 V 65 703 a Fs(redefinition)f(of)j(lexeme)e(class)h
5757 Fc(id)p 40 719 V 65 754 a Fs(replacement)f(not)h(in)g(rewrite)g(class:)
5758 65 804 y(rewrite)f Fc(exp)p 40 821 V 65 855 a Fs(rewrite)g(class)h
5759 Fc(id)h Fs(has)f(already)f(been)h(defined)p 40 872 V
5760 65 907 a(rewrite)f(class)h Fc(id)h Fs(is)f(undefined)p
5761 40 923 V 65 958 a(rule)g Ft(r)i Fs(has)e(incomplete)f(type)h
5762 Fc(type)p 40 975 V 65 1010 a Fs(rule)g Ft(r)i Fs(is)e(of)g(a)h(non)f
5763 (datatype:)42 b Fc(type)p 40 1026 V 65 1061 a Fs(syntax)21
5764 b(class)f Fc(id)i Fs(has)f(already)f(been)h(defined)p
5765 40 1078 V 65 1113 a(syntax)g(class)f Fc(id)i Fs(is)f(undefined)p
5766 40 1129 V 65 1164 a(synthesized)f(attribute)g(')p Fc(type)p
5767 Fs(')g(can)h(only)g(be)65 1214 y(used)g(in)g(treeparser)f(mode)h(in)h
5768 (rewrite)e(class)65 1264 y Fc(id)p 40 1280 V 65 1315
5769 a Fs(the)h(class)g(representation)e(of)i(constructor)65
5770 1365 y Fc(id)g Fs(has)h(been)f(elided)p 40 1382 V 65
5771 1417 a(this)g(rule)g(is)g(never)g(selected:)42 b Ft(r)p
5772 40 1433 V 65 1468 a Fs(this)21 b(rule)g(is)g(never)g(used:)43
5773 b Ft(r)p 40 1485 V 65 1520 a Fs(too)21 b(few)g(arguments)f
5774 Fc(arg)i Fs(in)f(instantiation)e(of)65 1569 y(type)i(scheme)g
5775 Fc(type)p 40 1586 V 65 1621 a Fs(too)g(many)g(arguments)f
5776 Fc(arg)h Fs(in)h(instantiation)65 1671 y(of)f(type)g(scheme)g
5777 Fc(type)p 40 1687 V 65 1722 a Fs(type)g Fc(type)g Fs(is)g(not)h(a)f
5778 (datatype)p 40 1739 V 65 1774 a(type)g Fc(type)g Fs(is)g(undefined)p
5779 40 1790 V eop
5780 %%Page: 62 63
5781 62 62 bop 0 -82 1981 3 v 0 -100 a Fq(9.)22 b Fp(R)o(unning)c(the)h
5782 (Transla)m(tor)1257 b Fw(62)65 38 y Fu(Error)835 b(Exp)o(lan)o(a)o(t)o
5783 (ion)p 40 55 1900 2 v 65 90 a Fs(type)21 b Fc(id)g Fs(=)h
5784 Fc(type)f Fs(is)g(not)h(a)f(datatype)p 40 107 V 65 141
5785 a(type)g Fc(id)g Fs(has)h(already)e(been)h(defined)f(as)i
5786 Fc(type)p 40 158 V 65 193 a Fs(type)f Fc(id)g Fs(has)h(unknown)e
5787 (class:)42 b Fc(C)p 40 209 V 65 244 a Fs(type)21 b(')p
5788 Fc(type)p Fs(')g(is)g(not)g(rewritable)f(in)65 294 y(treeparser)g(mode)
5789 h(rewrite)f(class)h Fc(id)1015 244 y Fw(All)i(d)o(a)o(t)o(a)o(t)o(yp)q
5790 (e)q(s)h(us)q(e)q(d)h(wit)n(hin)e(t)n(h)o(e)h(treepars)q(er)j(mo)q(d)o
5791 (e)1015 294 y(of)22 b(rewr)q(it)o(in)o(g)g(m)n(ust)h(b)q(e)f(d)o
5792 (e\014n)o(e)q(d)i(wit)n(h)f(t)n(h)o(e)g Fs(rewrite)1015
5793 344 y Fw(quali\014er.)p 40 361 V 65 395 a Fs(type)e(error)g(in)g
5794 (pattern)g Fc(pat)p Fs(:)42 b Fc(type)p 40 412 V 65 447
5795 a Fs(type)21 b(mismatch)f(between)h(nonterminal)e Fc(nt)p
5796 Fs(\(type)65 497 y Ft(t)80 503 y Fn(1)99 497 y Fs(\))i(and)g(rule)g
5797 Ft(r)q Fs(\(type)g Ft(t)504 503 y Fn(2)523 497 y Fs(\))p
5798 40 513 V 65 548 a(type)g(mismatch)f(in)i(pattern:)42
5799 b Fc(pat)p 40 565 V 65 600 a Fs(type)21 b(mismatch)f(in)i(rule)f
5800 Ft(r)p 40 616 V 65 651 a Fs(type)g(mismatch)f(in)i(rule)f
5801 Ft(r)h Fc(pat)p 40 668 V 65 703 a Fs(type)f(or)g(constructor)f
5802 Fc(con)h Fs(is)h(undefined)p 40 719 V 65 754 a(unable)f(to)g(apply)g
5803 (pattern)f(scheme)h Fc(pat)p 40 771 V 65 806 a Fs(unbalanced)f
5804 Ft(c)323 812 y Fn(1)363 806 y Fs(...)43 b Ft(c)490 812
5805 y Fn(2)531 806 y Fs(at)21 b(end)g(of)g(file)p 40 822
5806 V 65 857 a(undefined)f(non-terminal)f Fc(nt)p 40 874
5807 V 65 909 a Fs(unification)h(fails)g(occurs)h(check)g(with)g
5808 Ft(t)865 915 y Fn(1)65 958 y Fs(and)g Ft(t)167 964 y
5809 Fn(2)p 40 975 V 65 1010 a Fs(unmatched)f(ending)h(quote)f
5810 Ft(c)p 40 1026 V 65 1061 a Fs(unrecognized)f(quoted)i(expression)f(`)p
5811 Fc(exp)p Fs(`)p 40 1078 V 65 1113 a(unrecognized)f(quoted)i(pattern)f
5812 (`)p Fc(pat)p Fs(`)p 40 1129 V eop
5813 %%Page: 63 64
5814 63 63 bop 0 -82 1981 3 v 0 -100 a Fq(A.)15 b Fp(Garba)o(ge)j
5815 (Collection)j(in)e(the)g Fb(Pro)o(p)f Fp(Librar)m(y)857
5816 b Fw(63)0 45 y Fv(A)66 b(Garbage)21 b(Co)o(llect)n(ion)f(in)h(t)m(h)n
5817 (e)h Fa(Pro)n(p)f Fv(Library)0 148 y Fw(In)14 b(t)n(hi)q(s)f(ap)o(p)q
5818 (en)o(dix)g(w)o(e)h(d)o(e)q(scr)q(ib)q(e)g(t)n(h)o(e)h(d)o(e)q(s)q(ign)
5819 e(an)o(d)h(implem)n(en)o(t)o(a)o(t)o(i)o(on)d(of)i(a)g(garbage)g
5820 (collect)o(or)h(bas)q(e)q(d)g(on)g(t)n(h)o(e)g(Cust)o(omi)q(sa)o(ble)0
5821 198 y(M)o(emory)h(Man)o(agem)o(en)o(t)g(f)q(ram)o(ew)o(or)o
5822 (k\(CMM\)[AF)n(])h(in)f(our)h Fz(Pro)o(p)g Fw(C)p Fs(++)f
5823 Fw(class)i(library)m(.)23 b(Lik)o(e)15 b(t)n(h)o(e)i(previous)f(ap)o
5824 (proac)o(h,)g(w)o(e)0 247 y(h)o(a)o(v)o(e)h(implem)n(en)o(t)o(e)q(d)e
5825 (a)h(most)n(ly)h(co)o(p)o(yin)o(g)f(cons)q(erv)n(a)o(t)o(iv)o(e)h
5826 (collect)o(or)h(bas)q(e)q(d)f(on)g(t)n(h)o(e)h(w)o(or)o(k)f(of)g(Bart)n
5827 (let)n(t[Bar88)q(].)26 b(Similar)15 b(t)o(o)0 297 y(CMM,)g(our)g(arc)o
5828 (hit)o(ect)o(ure)i(pro)o(vid)o(e)q(s)f(a)f(prot)o(o)q(col)g(t)o(o)g
5829 (allo)o(w)f(m)n(ul)o(t)o(iple)f(garbage)i(collect)o(ors)h(us)q(in)o(g)f
5830 (di\013eren)o(t)i(algor)q(it)n(hms)c(t)o(o)0 347 y(co)q(exi)q(st)h(in)g
5831 (t)n(h)o(e)h(sam)o(e)f(m)o(emory)e(space.)20 b(A)15 b(few)f(impro)o(v)o
5832 (em)o(en)o(t)o(s)f(are)i(m)o(ad)o(e)e(t)o(o)i(impro)o(v)o(e)e(t)n(h)o
5833 (e)i(p)q(erform)o(ance,)e(t)n(h)o(e)i(\015exibilit)o(y)0
5834 397 y(an)o(d)f(t)n(h)o(e)i(fu)o(nct)o(ion)o(alit)o(y)d(of)h(our)h
5835 (collect)o(or:)20 b(t)o(o)14 b(re)q(d)o(u)o(ce)j(ret)o(en)o(t)o(ion)d
5836 (d)o(ue)h(t)o(o)g(f)q(als)q(e)f(ro)q(ot)o(s)i(id)o(en)o(t)o(i\014ca)o
5837 (t)o(ion,)d(blac)o(kli)q(st)o(in)o(g[Bo)q(e93)m(])0 447
5838 y(i)q(s)k(us)q(e)q(d)h(t)o(o)g(id)o(en)o(t)o(ify)e(trou)n(ble)q(som)o
5839 (e)h(h)o(eap)h(addre)q(ss)q(e)q(s;)j(t)n(h)o(e)d(arc)o(hit)o(ect)o(ure)
5840 h(of)e(t)n(h)o(e)h(syst)o(em)f(h)o(as)g(b)q(een)h(gen)o(eralize)q(d)g
5841 (so)g(t)n(h)o(a)o(t)0 497 y(it)d(i)q(s)g(no)o(w)g(p)q(oss)q(ible)h(t)o
5842 (o)g(h)o(a)o(v)o(e)f(m)n(ul)o(t)o(iple)f(inst)o(an)o(t)o(ia)o(t)o(ions)
5843 g(of)h(Bart)n(let)n(t-st)o(yle)i(h)o(eaps;)g(\014n)o(ally)m(,)d(ob)r
5844 (ject)i(\014n)o(aliza)o(t)o(ion)e(an)o(d)i(w)o(eak)0
5845 546 y(p)q(oin)o(t)o(er)e(sup)o(p)q(ort)g(are)h(add)o(e)q(d.)k(Our)14
5846 b(collect)o(or)g(h)o(as)g(b)q(een)h(t)o(e)q(st)o(e)q(d)g(on)f(gcc)g
5847 (2.5.8)e(u)o(n)o(d)o(er)k(Lin)n(ux,)d(an)o(d)g(Su)o(nOS)i(4.1.x)1824
5848 531 y Fn(14)0 674 y FF(A.1)56 b(In)n(tro)r(d)n(u)n(ct)n(ion)0
5849 763 y Fw(Th)o(e)13 b Fz(Pro)o(p)h Fw(pro)r(ject)g(in)o(v)o(olv)o(e)q(s)
5850 e(t)n(h)o(e)i(d)o(e)q(s)q(ign)f(an)o(d)g(implem)n(en)o(t)o(a)o(t)o(i)o
5851 (on)d(of)j(an)f(en)o(vironm)o(en)o(t)g(an)o(d)h(an)g(ext)o(ens)q(ion)g
5852 (lan)o(guage)f(bas)q(e)q(d)0 812 y(on)19 b(C)p Fs(++)g
5853 Fw(for)g(compiler)f(constru)o(ct)o(ion)i(an)o(d)e(program)g(transform)o
5854 (a)o(t)o(ion.)32 b(An)19 b(ou)o(tgro)o(wt)n(h)h(of)f(t)n(hi)q(s)g(pro)r
5855 (ject)h(i)q(s)f(t)n(h)o(e)h Fz(Pro)o(p)0 862 y Fw(C)p
5856 Fs(++)14 b Fw(class)i(library)m(,)e(whic)o(h)h(con)o(t)o(ains)f(an)h
5857 (ext)o(ens)q(iv)o(e)g(s)q(et)h(of)e(sup)o(p)q(ort)i(algor)q(it)n(hms)d
5858 (an)o(d)h(d)o(a)o(t)o(a)h(stru)o(ct)o(ure)q(s.)24 b(Since)15
5859 b(a)g(t)o(ypical)0 912 y(compiler)c(m)o(anipula)o(t)o(e)q(s)f(m)o(an)o
5860 (y)g(complex)g(tree,)j(d)o(ag)f(an)o(d)g(graph)g(ob)r(ject)o(s)h(wit)n
5861 (h)f(ext)o(en)o(d)o(e)q(d)i(lifet)o(im)o(e,)9 b(m)o(an)n(ual)h(m)o
5862 (emory)g(m)o(an-)0 962 y(agem)o(en)o(t)h(us)q(in)o(g)g(C)p
5863 Fs(++)p Fw('s)h(constru)o(ct)o(ors)i(an)o(d)e(d)o(e)q(stru)o(ct)o(ors,)
5864 j(reference)f(cou)o(n)o(t)o(in)o(g)f(sm)o(art)e(p)q(oin)o(t)o(ers,)h
5865 (or)g(som)o(e)f(ot)n(h)o(er)i(t)o(ec)o(hnique)q(s)0 1012
5866 y(i)q(s)f(f)q(requen)o(t)n(ly)i(complex)d(an)o(d)i(error)h(pron)o(e.)k
5867 (F)m(urt)n(h)o(ermore,)13 b(wit)n(h)g(t)n(h)o(e)h(adv)o(en)o(t)e(of)h
5868 (n)o(ew)g(algor)q(it)n(hms)e(for)i(garbage)f(collect)o(ion,)0
5869 1061 y(m)o(an)n(ual)j(m)o(emory)f(m)o(an)o(agem)o(en)o(t)g(t)o(ec)o
5870 (hnique)q(s)k(do)f(not)g(n)o(ece)q(ssar)q(ily)h(pro)o(vid)o(e)f(b)q(et)
5871 n(t)o(er)h(p)q(erform)o(ance)e(or)h(space)h(u)o(t)o(iliza)o(t)o(ion.)0
5872 1111 y(T)m(o)h(m)o(ak)o(e)e(it)i(p)q(oss)q(ible)h(t)o(o)f(m)o(ak)o(e)f
5873 (us)q(e)i(of)f(garbage)g(collect)o(ion)f(as)i(a)f(via)o(ble)e(al)o(t)o
5874 (er)q(n)o(a)o(t)o(iv)o(e)i(for)g(m)o(emory)e(m)o(an)o(agem)o(en)o(t)f
5875 (in)0 1161 y(C)p Fs(++)p Fw([ED93)o(],)e(w)o(e)i(h)o(a)o(v)o(e)f
5876 (implem)o(en)o(t)o(e)q(d)e(a)i(garbage)g(collect)o(ion)g(class)h
5877 (hierarc)o(h)o(y)g(as)g(part)g(of)e(t)n(h)o(e)j Fz(Pro)o(p)f
5878 Fw(library)m(.)21 b(Th)o(e)16 b(class)0 1211 y(library)h(can)g(b)q(e)g
5879 (us)q(e)q(d)i(direct)n(ly)f(b)o(y)f(t)n(h)o(e)h(us)q(ers)h(wh)o(o'd)d
5880 (lik)o(e)h(t)o(o)g(program)f(in)h(C)p Fs(++)p Fw(;)h(it)f(can)g(also)g
5881 (b)q(e)g(us)q(e)q(d)i(as)e(part)h(of)e(t)n(h)o(e)0 1261
5882 y(ru)o(n)o(t)o(im)o(e)d(syst)o(em)g(of)h(a)f(highly)g(lev)o(el)g(lan)o
5883 (guage)h(implem)n(en)o(t)o(e)q(d)e(in)h(C)p Fs(++)p Fw(,)g(as)h(w)o(e)g
5884 (h)o(a)o(v)o(e)g(don)o(e)g(for)f Fz(Pro)o(p)p Fw(.)54
5885 1322 y(W)m(e)j(h)o(a)o(v)o(e)g(s)q(ev)o(eral)i(go)q(o)q(d)e(reasons)i
5886 (t)o(o)f(prefer)h(garbage)e(collect)o(ion)g(o)o(v)o(er)h(m)o(an)n(ual)e
5887 (m)o(emory)f(m)o(an)o(agem)o(en)o(t.)24 b(Th)o(e)17 b
5888 Fz(Pro)o(p)0 1372 y Fw(lan)o(guage)e(con)o(t)o(ains)f(m)o(an)o(y)f(d)o
5889 (eclara)o(t)o(iv)o(e)j(constru)o(ct)o(s)h(an)o(d)e(ext)o(ens)q(ions)g
5890 (su)o(c)o(h)h(as)f(alge)o(braic)g(d)o(a)o(t)o(a)o(t)o(yp)q(e)q(s,)g(pa)
5891 o(t)n(t)o(er)q(n)h(m)o(a)o(t)o(c)o(hin)o(g,)0 1422 y(rewr)q(it)o(in)o
5892 (g,)d(an)o(d)h(logical)d(inference.)20 b(Wh)o(en)14 b(a)f(us)q(er)i
5893 (programs)d(in)i Fz(Pro)o(p)g Fw(us)q(in)o(g)f(t)n(h)o(e)q(s)q(e)j
5894 (constru)o(ct)o(s,)f(an)f(ap)o(plica)o(t)o(iv)o(e)e(st)o(yle)i(of)0
5895 1472 y(programmin)o(g)d(i)q(s)i(t)n(h)o(e)i(most)e(n)o(a)o(t)o(ural)g
5896 (paradigm.)0 1600 y FF(A.2)56 b(Th)n(e)19 b(F)-5 b(ram)n(ew)n(or)o(k)0
5897 1688 y Fw(W)m(e)12 b(bas)q(e)h(our)f(d)o(e)q(s)q(ign)g(on)g(t)n(h)o(e)h
5898 (w)o(or)o(k)g(on)f(t)n(h)o(e)h(Cust)o(omi)q(sa)o(ble)d(M)o(emory)i(Man)
5899 o(agem)o(en)o(t\(CMM\))f(syst)o(em[AF)o(].)17 b(In)c(t)n(hi)q(s)f(f)q
5900 (ram)o(e-)0 1738 y(w)o(or)o(k,)21 b(m)n(ul)o(t)o(iple)c(in)o(d)o(ep)q
5901 (en)o(d)o(en)o(t)k(h)o(eaps\(includin)o(g)f(t)n(h)o(e)g(usually)f
5902 (non-collect)o(a)o(ble)f(h)o(eap\))i(can)g(co)q(exi)q(st)g(wit)n(h)f
5903 (eac)o(h)i(ot)n(h)o(er.)0 1788 y(Bart)n(let)n(t's)i(most)n(ly)d(co)o(p)
5904 o(yin)o(g)g(garbage)h(collect)o(or)h(i)q(s)e(us)q(e)q(d)i(as)f(t)n(h)o
5905 (e)h(pr)q(im)o(ary)d(collect)o(or.)40 b(CMM)21 b(ext)o(en)o(ds)h(t)n(h)
5906 o(e)g(w)o(or)o(k)g(of)0 1837 y(Bart)n(let)n(t[Bar88)q(])13
5907 b(b)o(y)h(allo)o(win)o(g)e(cross)k(h)o(eap)e(p)q(oin)o(t)o(ers)h(an)o
5908 (d)e(u)o(nre)q(str)q(ict)o(e)q(d)k(in)o(t)o(er)q(ior)c(p)q(oin)o(t)o
5909 (ers.)54 1899 y(Ho)o(w)o(ev)o(er,)g(all)e(collect)o(a)o(ble)h(ob)r
5910 (ject)o(s)i(are)f(require)q(d)h(t)o(o)f(d)o(er)q(iv)o(e)g(f)q(rom)d(a)j
5911 (bas)q(e)g(class)g(an)o(d)g(re)q(implem)o(en)o(t)d(a)i(tracin)o(g)h(m)o
5912 (et)n(h)o(o)q(d,)0 1949 y(whic)o(h)19 b(id)o(en)o(t)o(i\014e)q(s)g(t)n
5913 (h)o(e)h(in)o(t)o(er)q(n)o(al)e(p)q(oin)o(t)o(ers)i(of)e(an)h(ob)r
5914 (ject.)34 b(Thi)q(s)18 b(burd)o(en)j(i)q(s)d(usually)g(quit)o(e)h(sm)o
5915 (all)e(an)o(d)i(in)f(f)q(act)h(can)g(b)q(e)0 1999 y(a)n(u)o(t)o(om)o(a)
5916 o(t)o(e)q(d)14 b(f)q(rom)e(t)n(h)o(e)i(t)o(yp)q(e)g(d)o(e\014nit)o(ion)
5917 632 1984 y Fn(15)54 2060 y Fw(On)o(e)g(of)e(t)n(h)o(e)j(m)o(a)r(jor)c
5918 (adv)n(an)o(t)o(age)q(s)i(of)g(t)n(h)o(e)h(CMM)g(f)q(ram)o(ew)o(or)o(k)
5919 e(i)q(s)g(t)n(h)o(a)o(t)i(m)n(ul)o(t)o(iple)d(co)q(orp)q(era)o(t)o(in)o
5920 (g)j(collect)o(ors)g(can)g(co)q(exi)q(st)f(a)o(t)0 2110
5921 y(t)n(h)o(e)h(sam)o(e)f(t)o(im)o(e,)e(whic)o(h)i(m)o(ak)o(e)q(s)g(it)g
5922 (p)q(oss)q(ible)g(t)o(o)h(cust)o(omize)g(t)n(h)o(e)g(b)q(e)o(h)o(a)o
5923 (vior)f(of)g(eac)o(h)h(collect)o(or)g(wit)n(h)f(re)q(sp)q(ect)i(t)o(o)f
5924 (t)n(h)o(e)g(lifet)o(im)o(e)0 2160 y(b)q(e)o(h)o(a)o(vior)h(of)h(t)n(h)
5925 o(e)h(ob)r(ject)o(s.)26 b(In)16 b([AF],)f(example)q(s)g(are)i(giv)o(en)
5926 e(in)h(whic)o(h)g(t)n(h)o(e)g(lifet)o(im)o(e)e(of)h(cert)o(ain)i(class)
5927 g(of)f(ob)r(ject)o(s)h(exhibit)0 2210 y(\014rst-in/\014rst-ou)o(t)d(b)q
5928 (e)o(h)o(a)o(vior.)i(In)c(t)n(hi)q(s)g(cas)q(e)h(a)f(sp)q(ecial)g
5929 (collect)o(or)g(can)g(b)q(e)g(wr)q(it)n(t)o(en)h(t)o(o)f(t)o(ak)o(e)g
5930 (full)f(adv)n(an)o(t)o(age)g(of)h(t)n(hi)q(s)g(pro)o(p)q(ert)o(y)m(.)0
5931 2338 y FF(A.3)56 b(Our)19 b(F)-5 b(ram)n(ew)n(or)o(k)0
5932 2426 y Fw(Our)14 b(f)q(ram)o(ew)o(or)o(k)d(ret)o(ains)j(all)e(t)n(h)o
5933 (e)h(b)q(en)o(e\014t)o(s)i(an)o(d)e(\015exibilit)o(ie)q(s)f(of)g(CMM,)h
5934 (while)g(ext)o(en)o(din)o(g)g(it)g(in)f(s)q(ev)o(eral)i(minor)d(bu)o(t)
5935 j(us)q(eful)0 2476 y(w)o(ays:)p 0 2510 792 2 v 31 2537
5936 a Fm(14)64 2548 y Fl(An)d(alph)o(a)f(v)o(ersion)h(also)g(w)o(orks)f(un)
5937 o(d)o(er)h(Solar)q(is.)i(Th)o(anks)e(to)f(P)o(a)o(ul)h(Dietz)f(for)h(t)
5938 o(h)o(e)f(pa)o(t)o(c)o(h.)31 2577 y Fm(15)64 2589 y Fl(In)i
5939 Fz(Pro)o(p)p Fl(,)h(a)f(special)g(k)o(eyw)o(ord)f Fk(collectabl)o(e)f
5940 Fl(is)j(us)q(e)q(d)e(to)h(id)o(en)o(t)o(ify)e(garbage)h(collect)o(e)q
5941 (d)e(class)q(e)q(s)j(an)o(d)f(t)o(ype)q(s.)18 b(Th)o(e)12
5942 b Fz(Pro)o(p)i Fl(transla)o(tor)9 b(us)q(e)q(s)0 2629
5943 y(t)o(his)i(t)o(ype)g(annot)o(a)o(t)o(ion)d(to)j(d)o(er)q(iv)o(e)f(t)o
5944 (h)o(e)g(ap)o(pro)o(pr)q(ia)o(t)o(e)e(tracing)h(m)o(et)o(h)o(o)q(ds.)p
5946 %%Page: 64 65
5947 64 64 bop 0 -82 1981 3 v 0 -100 a Fq(A.)15 b Fp(Garba)o(ge)j
5948 (Collection)j(in)e(the)g Fb(Pro)o(p)f Fp(Librar)m(y)857
5949 b Fw(64)62 45 y Fi(\017)21 b Fw(Lik)o(e)10 b(CMM,)g(in)o(t)o(er)q(ior)g
5950 (p)q(oin)o(t)o(ers\(i.e.)17 b(p)q(oin)o(t)o(ers)11 b(t)o(o)g(t)n(h)o(e)
5951 g(middle)e(of)h(an)g(ob)r(ject\))i(an)o(d)e(crossh)o(eap)j(p)q(oin)o(t)
5952 o(ers)e(\(i.e.)17 b(complex)104 95 y(d)o(a)o(t)o(a)e(stru)o(ct)o(ure)q
5953 (s)i(linkin)o(g)d(no)q(d)o(e)q(s)j(lo)q(ca)o(t)o(in)o(g)d(in)h(m)n(ul)o
5954 (t)o(iple)e(logical)g(h)o(eaps.\))23 b(are)15 b(sup)o(p)q(ort)o(e)q(d.)
5955 23 b(P)o(oin)o(t)o(ers)16 b(t)o(o)f(collect)o(a)o(ble)104
5956 145 y(ob)r(ject)o(s)g(are)g(non-in)o(trus)q(iv)o(e:)i(i.e.)g(t)n(h)o
5957 (ey)e(are)f(norm)o(al)e(C)p Fs(++)h Fw(p)q(oin)o(t)o(ers)i(an)o(d)e
5958 (not)h(encapsula)o(t)o(e)q(d)h(in)f(t)o(empla)o(t)o(e)q(s.)62
5959 226 y Fi(\017)21 b Fw(Also)12 b(lik)o(e)g(CMM,)g(w)o(e)g(allo)o(w)f(m)n
5960 (ul)o(t)o(iple)f(garbage)j(collect)o(ors)g(us)q(in)o(g)f(di\013eren)o
5961 (t)h(algor)q(it)n(hms)d(t)o(o)j(co)q(exi)q(st.)18 b(Unlik)o(e)11
5962 b(CMM,)104 275 y(h)o(o)o(w)o(ev)o(er,)i(w)o(e)f(allo)o(w)f(m)n(ul)o(t)o
5963 (iple)g(Bart)n(let)n(t-st)o(yle)j(collect)o(ors)f(t)o(o)g(b)q(e)g(inst)
5964 o(an)o(t)o(ia)o(t)o(e)q(d.)k(Most)c(of)f(t)n(h)o(e)h(s)q(ervice)q(s)i
5965 (in)o(v)o(olvin)o(g)10 b(lo)o(w)104 325 y(lev)o(el)j(page)h(m)o(an)o
5966 (agem)o(en)o(t)d(an)o(d)j(ob)r(ject)h(m)o(ar)o(kin)o(g)d(h)o(a)o(v)o(e)
5967 i(b)q(een)g(relega)o(t)o(e)q(d)h(t)o(o)f(a)f(s)q(epara)o(t)o(e)i(h)o
5968 (eap)g(m)o(an)o(ager.)62 406 y Fi(\017)21 b Fw(W)m(e)13
5969 b(pro)o(vid)o(e)h(sup)o(p)q(ort)h(for)e(\014n)o(aliza)o(t)o(ion)g(an)o
5970 (d)g(w)o(eakp)q(oin)o(t)o(ers.)62 487 y Fi(\017)21 b
5971 Fw(W)m(e)13 b(h)o(a)o(v)o(e)h(implem)n(en)o(t)o(e)q(d)e(blac)o(kli)q
5972 (st)o(in)o(g[Bo)q(e93)m(])h(t)o(o)h(re)q(d)o(u)o(ce)i(t)n(h)o(e)e(c)o
5973 (h)o(ance)h(of)e(f)q(als)q(e)g(ro)q(ot)o(s)i(id)o(en)o(t)o(i\014ca)o(t)
5974 o(ion.)0 614 y FF(A.4)56 b(Th)n(e)19 b(Imp)o(lem)n(en)n(t)n(a)o(t)n
5975 (ion)0 703 y Fw(Our)f(implem)n(en)o(t)o(a)o(t)o(i)o(on)c(h)o(as)j(b)q
5976 (een)g(complet)o(ely)f(wr)q(it)n(t)o(en)h(f)q(rom)e(scra)o(t)o(c)o(h)j
5977 (s)q(ince)f(w)o(e)g(do)g(not)g(d)o(e)q(s)q(ire)h(t)o(o)f(u)o(t)o(ilize)
5978 g(co)o(p)o(yr)q(igh)o(t)o(e)q(d)0 752 y(co)q(d)o(e)h(an)o(d,)e(more)f
5979 (imp)q(ort)o(an)o(t)n(ly)m(,)f(w)o(e)j(h)o(a)o(v)o(e)f(t)o(o)h(m)o(ak)o
5980 (e)d(a)j(few)f(imp)q(ort)o(an)o(t)f(arc)o(hit)o(ect)o(ural)h(c)o(h)o
5981 (an)o(ge)q(s:)24 b(All)16 b(lo)o(w)g(lev)o(el)g(m)o(emory)0
5982 802 y(m)o(an)o(agem)o(en)o(t)d(s)q(ervice)q(s,)18 b(su)o(c)o(h)f(as)g
5983 (m)o(an)o(agem)n(en)o(t)d(of)i(t)n(h)o(e)h(page)f(t)o(a)o(ble)f(an)o(d)
5984 h(t)n(h)o(e)h(ob)r(ject)g(bit)o(m)o(ap,)d(i)q(s)i(no)o(w)g(relega)o(t)o
5985 (e)q(d)h(t)o(o)f(t)n(h)o(e)0 852 y(class)f Fs(GCHeapManager)p
5986 Fw(.)g(Collect)o(ors)f(no)o(w)g(act)g(as)g(clien)o(t)o(s)g(as)g(of)g(t)
5987 n(h)o(e)g(h)o(eap)h(m)o(an)o(ager)d(an)o(d)i(t)n(h)o(e)g(Bart)n(let)n
5988 (t-st)o(yle)i(collect)o(or)e(no)0 902 y(lon)o(ger)g(h)o(as)g(an)o(y)g
5989 (sp)q(ecial)f(st)o(a)o(t)o(us.)0 1029 y FF(A.5)56 b(Arc)n(hit)n(ect)n
5990 (ure)0 1117 y Fw(Th)o(e)18 b(arc)o(hit)o(ect)o(ure)i(of)d(t)n(h)o(e)i
5991 (m)o(emory)d(m)o(an)o(agem)o(en)o(t)f(syst)o(em)j(i)q(s)f(part)o(it)o
5992 (ion)o(e)q(d)h(in)o(t)o(o)g(a)f(few)h(class)q(e)q(s,)j(eac)o(h)e(re)q
5993 (sp)q(ons)q(ible)f(for)0 1167 y(pro)o(vidin)o(g)13 b(di)q(st)o(inct)h
5994 (s)q(ervice)q(s:)62 1265 y Fi(\017)21 b Fs(GCHeapManager)12
5995 b Fw(|)i(Th)o(e)g(h)o(eap)i(m)o(an)o(ager.)i(Th)o(e)d(h)o(eap)g(m)o(an)
5996 o(ager)f(m)o(an)o(age)q(s)f(t)n(h)o(e)j(h)o(eap)f(t)o(a)o(ble,)e(p)q
5997 (erforms)h(page)g(lev)o(el)104 1315 y(allo)q(ca)o(t)o(ion)h(an)o(d)j(d)
5998 o(eallo)q(ca)o(t)o(ion,)f(an)o(d)g(pro)o(vid)o(e)q(s)h(mi)q(scellan)o
5999 (eous)e(s)q(ervice)q(s)j(lik)o(e)e(blac)o(kli)q(st)o(in)o(g.)26
6000 b(It)18 b(also)f(m)o(an)o(age)q(s)f(t)n(h)o(e)104 1365
6001 y(ob)r(ject)e(bit)o(m)o(aps.)62 1446 y Fi(\017)21 b Fs(GC)16
6002 b Fw(|)g(Th)o(e)h(bas)q(e)g(class)g(for)f(all)f(garbage)i(collect)o
6003 (ors.)26 b(Thi)q(s)16 b(bas)q(e)h(class)h(d)o(e)q(scr)q(ib)q(e)q(s)g(t)
6004 n(h)o(e)f(prot)o(o)q(col)f(us)q(e)q(d)i(b)o(y)e(all)f(t)n(h)o(e)104
6005 1495 y(collect)o(or)f(class)q(e)q(s)388 1480 y Fn(16)62
6006 1576 y Fi(\017)21 b Fs(CGC)14 b Fw(|)h(Th)o(e)g(bas)q(e)h(class)g(for)f
6007 (cons)q(erv)n(a)o(t)o(iv)o(e)g(collect)o(ors.)23 b(Thi)q(s)15
6008 b(class)h(i)q(s)e(inh)o(er)q(it)o(e)q(d)i(f)q(rom)d(class)j
6009 Fs(GC)f Fw(an)o(d)g(implem)n(en)o(t)o(s)104 1626 y(som)o(e)e(m)o(et)n
6010 (h)o(o)q(ds)g(for)h(lo)q(ca)o(t)o(in)o(g)f(t)n(h)o(e)i(st)o(ac)o(k,)e
6011 (h)o(eap,)h(an)o(d)g(st)o(a)o(t)o(ic)g(d)o(a)o(t)o(a)f(areas.)62
6012 1707 y Fi(\017)21 b Fs(BGC)12 b Fw(|)g(Bart)n(let)n(t-st)o(yle)j(most)n
6013 (ly)d(co)o(p)o(yin)o(g)g(collect)o(or.)18 b(Thi)q(s)12
6014 b(class)i(i)q(s)e(inh)o(er)q(it)o(e)q(d)h(f)q(rom)e(class)i
6015 Fs(CGC)g Fw(an)o(d)f(implem)n(en)o(t)o(s)f(t)n(h)o(e)104
6016 1757 y(Bart)n(let)n(t)k(most)n(ly)e(co)o(p)o(yin)o(g)h(algor)q(it)n
6017 (hm.)62 1838 y Fi(\017)21 b Fs(MarkSweepGC)16 b Fw(|)i(Mar)o(k/sw)o
6018 (eep)h(st)o(yle)g(cons)q(erv)n(a)o(t)o(iv)o(e)g(collect)o(or.)32
6019 b(Thi)q(s)17 b(class)j(i)q(s)d(inh)o(er)q(it)o(e)q(d)i(f)q(rom)d(class)
6020 k Fs(CGC)d Fw(an)o(d)104 1888 y(implem)n(en)o(t)o(s)12
6021 b(a)i(m)o(ar)o(k/sw)o(eep)f(collect)o(ion)g(algor)q(it)n(hm.)62
6022 1969 y Fi(\017)21 b Fs(WeakPointerManag)o(er)16 b Fw(|)j(Th)o(e)g(w)o
6023 (eakp)q(oin)o(t)o(er)h(m)o(an)o(ager.)32 b(Thi)q(s)19
6024 b(class)h(m)o(an)o(age)q(s)e(t)n(h)o(e)h(w)o(eak)h(p)q(oin)o(t)o(er)f
6025 (t)o(a)o(ble)f(an)o(d)104 2018 y(pro)o(vid)o(e)q(s)c(a)g(few)g(w)o(eak)
6026 g(p)q(oin)o(t)o(er)g(sca)o(v)o(en)o(gin)o(g)g(s)q(ervice)q(s)i(for)d(t)
6027 n(h)o(e)i(collect)o(ors.)0 2146 y FF(A.6)56 b(Th)n(e)19
6028 b(Programm)o(a)o(t)n(i)o(c)d(In)n(t)n(erf)q(ace)0 2234
6029 y Fw(Th)o(e)h(programm)o(a)o(t)o(i)o(c)d(in)o(t)o(erf)q(ace)i(t)o(o)h
6030 (t)n(h)o(e)g(garbage)g(collect)o(or)f(in)o(v)o(olv)o(e)q(s)g(t)o(w)o(o)
6031 g(bas)q(e)h(class)q(e)q(s,)h Fs(GC)e Fw(an)o(d)g Fs(GCObject)p
6032 Fw(.)25 b(Th)o(e)17 b(bas)q(e)0 2284 y(class)g Fs(GC)f
6033 Fw(pro)o(vid)o(e)q(s)g(an)g(u)o(niform)f(in)o(t)o(erf)q(ace)h(t)o(o)g
6034 (all)f(t)o(yp)q(e)q(s)h(of)g(collect)o(ors)h(an)o(d)e(m)o(emory)f(m)o
6035 (an)o(agers)h(while)h(class)h Fr(GCObject)0 2334 y Fw(pro)o(vid)o(e)q
6036 (s)e(t)n(h)o(e)f(in)o(t)o(erf)q(ace)g(t)o(o)g(all)f(collect)o(a)o(ble)g
6037 (class)q(e)q(s.)19 b(T)m(a)o(ble)13 b(1)g(con)o(t)o(ains)h(a)g(li)q(st)
6038 o(in)o(g)e(of)i(t)n(h)o(e)g(class)q(e)q(s)i(in)d(our)h(hierarc)o(h)o(y)
6039 m(.)54 2395 y(Class)i Fs(GCObject)f Fw(i)q(s)h(extrem)o(ely)g(s)q
6040 (imple:)k(it)c(re)q(d)o(e\014n)o(e)q(s)j(t)n(h)o(e)e(o)o(p)q(era)o(t)o
6041 (ors)g Fs(new)f Fw(an)o(d)g Fs(delete)f Fw(t)o(o)i(allo)q(ca)o(t)o(e)e
6042 (m)o(emory)f(f)q(rom)0 2445 y(t)n(h)o(e)h(d)o(ef)q(a)n(ul)o(t)f
6043 (collect)o(or,)g(an)o(d)f(d)o(eclare)q(s)j(a)d(virt)o(ual)g(m)o(et)n(h)
6044 o(o)q(d)g(\\)p Fs(trace)p Fw(")g(t)o(o)h(b)q(e)g(d)o(e\014n)o(e)q(d)h
6045 (b)o(y)f(su)n(b)q(class)q(e)q(s)i(\(more)d(on)h(t)n(hi)q(s)g(la)o(t)o
6046 (er.\))54 2507 y(M)o(emory)j(for)g(a)h Fs(GCObject)e
6047 Fw(i)q(s)h(allo)q(ca)o(t)o(e)q(d)g(an)o(d)h(f)q(ree)q(d)g(us)q(in)o(g)g
6048 (t)n(h)o(e)h(usually)e Fs(new)g Fw(an)o(d)g Fs(delete)g
6049 Fw(o)o(p)q(era)o(t)o(ors.)30 b(Of)18 b(cours)q(e,)0 2556
6050 y(f)q(ree)q(in)o(g)c(m)o(emory)e(explicit)n(ly)g(us)q(in)o(g)i
6051 Fs(delete)e Fw(i)q(s)i(o)o(pt)o(ion)o(al)e(for)h(m)o(an)o(y)f(su)n(b)q
6052 (class)q(e)q(s)17 b(of)c Fs(GC)p Fw(.)p 0 2589 792 2
6053 v 31 2617 a Fm(16)64 2629 y Fl(This)f(bas)q(e)e(class)h(is)h(also)f
6054 (inh)o(er)q(it)o(e)q(d)d(f)q(rom)i(class)h Fk(Mem)p Fl(,)g(so)g(t)o(h)o
6055 (a)o(t)f(it)i(adh)o(ere)q(s)d(to)i(t)o(h)o(e)f Fz(Pro)o(p)j
6056 Fl(m)o(emory)c(m)o(an)o(agem)o(en)o(t)f(proto)q(col.)p
6058 %%Page: 65 66
6059 65 65 bop 0 -82 1981 3 v 0 -100 a Fq(A.)15 b Fp(Garba)o(ge)j
6060 (Collection)j(in)e(the)g Fb(Pro)o(p)f Fp(Librar)m(y)857
6061 b Fw(65)p 324 47 1332 2 v 323 97 2 50 v 349 82 a(Class)p
6062 625 97 V 207 w(Purp)q(os)q(e)p 1655 97 V 324 98 1332
6063 2 v 324 107 V 323 156 2 50 v 349 141 a Fr(GCObject)p
6064 625 156 V 133 w Fw(Collect)o(a)o(ble)12 b(ob)r(ject)j(bas)q(e)f(class)p
6065 1655 156 V 323 206 V 349 191 a Fr(GC)p 625 206 V 247
6066 w Fw(Garbage)f(collect)o(or)h(bas)q(e)h(class)p 1655
6067 206 V 323 256 V 349 241 a Fr(CGC)p 625 256 V 220 w Fw(Cons)q(erv)n(a)o
6068 (t)o(iv)o(e)f(garbage)f(collect)o(or)h(bas)q(e)h(class)p
6069 1655 256 V 323 306 V 349 291 a Fr(BGC)p 625 306 V 219
6070 w Fw(Bart)n(let)n(t)g(st)o(yle)f(most)n(ly)f(co)o(p)o(yin)o(g)h
6071 (collect)o(or)p 1655 306 V 323 356 V 349 341 a Fr(Ma)o(r)o(kSw)o(eepGC)
6072 p 625 356 V 52 w Fw(A)g(m)o(ar)o(k-sw)o(eep)g(collect)o(or)p
6073 1655 356 V 323 405 V 349 390 a Fr(Us)q(erHeap)p 625 405
6074 V 136 w Fw(A)g(h)o(eap)g(for)g(p)q(oin)o(t)o(erle)q(ss)h(ob)r(ject)p
6075 1655 405 V 323 455 V 349 440 a Fr(GCV)o(er)q(i\014er)p
6076 625 455 V 123 w Fw(A)f(h)o(eap)g(w)o(alk)o(er)g(t)n(h)o(a)o(t)g(v)o(er)
6077 q(i\014e)q(s)h(t)n(h)o(e)f(in)o(t)o(egr)q(it)o(y)f(of)g(a)h(stru)o(ct)o
6078 (ure)p 1655 455 V 324 457 1332 2 v 656 573 a(T)m(a)o(ble)f(1:)k
6079 (Garbage)d(Collect)o(ion)e(Class)q(e)q(s.)65 705 y Fs(class)21
6080 b(GCObject)f({)65 755 y(public:)131 805 y(inline)g(void)h(*)h(operator)
6081 e(new\(size_t)g(n,)h(GC&)g(gc)h(=)f(*GC::default_gc\))196
6082 855 y({)h(return)e(gc.m_alloc\(n\);)f(})131 905 y(inline)h(void)h(*)h
6083 (operator)e(new\(size_t)g(n,)h(size_t)g(N,)g(GC&)g(gc)h(=)f
6084 (*GC::default_gc\))196 955 y({)h(return)e(gc.m_alloc\(n)g(>)h(N)h(?)f
6085 (n)h(:)g(N\);)f(})131 1004 y(inline)f(void)65 b(operator)20
6086 b(delete\(void)g(*\);)131 1054 y(virtual)g(void)h(trace\(GC)f(*\))i(=)f
6087 (0;)65 1104 y(};)0 1232 y FF(A.7)56 b(M)o(emory)17 b(Allo)r(ca)o(t)n
6088 (ion)0 1320 y Fw(Th)o(e)j(bas)q(e)f(class)h Fs(GC)f Fw(i)q(s)g(sligh)o
6089 (t)n(ly)f(more)g(complex,)h(as)g(it)g(h)o(as)g(t)o(o)h(pro)o(vid)o(e)f
6090 (a)g(few)h(di\013eren)o(t)g(fu)o(nct)o(ion)o(alit)o(ie)q(s.)33
6091 b(Th)o(e)20 b(\014rst)0 1370 y(s)q(ervice)d(t)n(h)o(a)o(t)f(class)h
6092 Fs(GC)e Fw(m)n(ust)h(pro)o(vid)o(e)g(i)q(s)f(of)g(cours)q(e)i(m)o
6093 (emory)c(allo)q(ca)o(t)o(ion)h(an)o(d)i(d)o(eallo)q(ca)o(t)o(ion.)23
6094 b(As)17 b(a)e(t)o(im)o(e)g(sa)o(vin)o(g)g(d)o(evice)0
6095 1420 y(w)o(e)e(can)f(sp)q(ecify)g(wh)o(a)o(t)g(t)n(h)o(e)h(d)o(ef)q(a)n
6096 (ul)o(t)g(collect)o(or)g(i)q(s)f(us)q(in)o(g)g(t)n(h)o(e)h(m)o(et)n(h)o
6097 (o)q(ds)f Fs(get_default_gc)d Fw(an)o(d)j Fs(set_default_gc)p
6098 Fw(.)j(M)o(et)n(h)o(o)q(d)0 1470 y Fs(GCObject::new)8
6099 b Fw(will)h(us)q(e)j(t)n(hi)q(s)f(collect)o(or)g(b)o(y)f(d)o(ef)q(a)n
6100 (ul)o(t,)i(u)o(nle)q(ss)g(placem)o(en)o(t)e(syn)o(t)o(ax)g(i)q(s)h(us)q
6101 (e)q(d.)18 b(M)o(et)n(h)o(o)q(d)12 b Fs(GCObject::delete)o
6102 Fw(,)0 1520 y(on)i(t)n(h)o(e)g(ot)n(h)o(er)h(h)o(an)o(d,)e(can)h
6103 (correct)n(ly)h(infer)f(t)n(h)o(e)h(pro)o(p)q(er)f(collect)o(or)g(t)o
6104 (o)h(us)q(e)f(b)o(y)g(t)n(h)o(e)g(addre)q(ss)i(of)d(t)n(h)o(e)i(ob)r
6105 (ject.)54 1581 y(Th)o(e)d(lo)o(w)f(lev)o(el)g(m)o(et)n(h)o(o)q(ds)h(t)o
6106 (o)g(allo)q(ca)o(t)o(e)f(an)o(d)h(d)o(eallo)q(ca)o(t)o(e)g(m)o(emory)d
6107 (are)k Fs(m_alloc)d Fw(an)o(d)i Fs(free)f Fw(re)q(sp)q(ect)o(iv)o(ely)m
6108 (.)18 b(Th)o(e)12 b(program-)0 1631 y(m)o(ers)i(usually)f(do)g(not)h(h)
6109 o(a)o(v)o(e)g(t)o(o)g(us)q(e)g(t)n(h)o(e)q(s)q(e)i(m)o(et)n(h)o(o)q(ds)
6110 d(direct)n(ly)m(.)54 1693 y(Th)o(e)e(m)o(et)n(h)o(o)q(d)f(t)o(o)i(in)o
6111 (v)o(ok)o(e)e(a)h(garbage)g(collect)o(ion)f(of)g(a)h(sp)q(eci\014c)h
6112 (lev)o(el)f(i)q(s)f Fs(collect\(int)20 b(level\))p Fw(.)c(Thi)q(s)10
6113 b(force)q(s)i(an)f(explicit)0 1743 y(collect)o(ion.)27
6114 b(M)o(et)n(h)o(o)q(d)19 b Fs(grow_heap\(size_)o(t\))14
6115 b Fw(can)k(also)e(b)q(e)h(us)q(e)q(d)h(t)o(o)g(explicit)n(ly)e(increas)
6116 q(e)i(t)n(h)o(e)g(h)o(eap)g(s)q(ize)g(of)e(a)h(collect)o(or.)0
6117 1792 y(Dep)q(en)o(din)o(g)d(of)f(t)n(h)o(e)i(act)o(ual)e(b)q(e)o(h)o(a)
6118 o(vior)g(of)h(t)n(h)o(e)g(su)n(b)q(class)q(e)q(s,)i(t)n(h)o(e)q(s)q(e)g
6119 (m)o(et)n(h)o(o)q(ds)d(m)o(ay)f(h)o(a)o(v)o(e)i(di\013eren)o(t)h
6120 (e\013ect)o(s.)65 1896 y Fs(class)21 b(GC)h({)65 1945
6121 y(protected:)131 1995 y(static)e(GC)i(*)f(default_gc;)65
6122 2045 y(public:)131 2095 y(static)f(GC&)43 b(get_default_gc\(\))150
6123 b({)21 b(return)g(*default_gc;)e(})131 2145 y(static)h(void)h
6124 (set_default_gc\(GC&)d(gc\))k({)f(default_gc)f(=)h(&gc;)g(})131
6125 2194 y(virtual)f(void)h(*)h(m_alloc)64 b(\(size_t\))20
6126 b(=)h(0;)131 2244 y(virtual)f(void)65 b(free)130 b(\(void)20
6127 b(*\);)131 2294 y(virtual)g(void)65 b(collect)f(\(int)21
6128 b(level)f(=)i(0\))f(=)h(0;)131 2344 y(virtual)e(void)65
6129 b(grow_heap)20 b(\(size_t\))g(=)h(0;)131 2394 y(static)42
6130 b(void)21 b(garbage_collect\(\))d({)k(default_gc->colle)o(ct\(\);)c(})
6131 131 2443 y(virtual)i(void)h(set_gc_ratio\(int\);)131
6132 2493 y(virtual)f(void)h(set_initial_heap_s)o(ize)e(\(size_t\);)131
6133 2543 y(virtual)h(void)h(set_min_heap_growt)o(h)63 b(\(size_t\);)65
6134 2593 y(};)p eop
6135 %%Page: 66 67
6136 66 66 bop 0 -82 1981 3 v 0 -100 a Fq(A.)15 b Fp(Garba)o(ge)j
6137 (Collection)j(in)e(the)g Fb(Pro)o(p)f Fp(Librar)m(y)857
6138 b Fw(66)0 45 y FF(A.8)56 b(Th)n(e)19 b(GC)g(Prot)o(o)r(co)o(l)0
6139 134 y Fw(Th)o(e)14 b(collect)o(or)g(an)o(d)g(collect)o(a)o(ble)f(ob)r
6140 (ject)o(s)i(m)n(ust)f(co)q(o)o(p)q(era)o(t)o(e)g(wit)n(h)g(eac)o(h)h
6141 (ot)n(h)o(er)f(b)o(y)g(a)o(bidin)o(g)f(t)o(o)h(a)g(s)q(imple)d(prot)o
6142 (o)q(col:)62 228 y Fi(\017)21 b Fw(All)10 b(ob)r(ject)o(s)i(t)n(h)o(a)o
6143 (t)f(are)h(t)o(o)f(b)q(e)g(garbage)f(collect)o(e)q(d)h(m)n(ust)g(b)q(e)
6144 g(d)o(er)q(iv)o(e)q(d)h(f)q(rom)c Fs(GCObject)p Fw(.)16
6145 b(Th)o(e)11 b(ap)o(plica)o(t)o(ion)d(programm)o(er)104
6146 278 y(m)n(ust)16 b(also)g(sup)o(ply)g(a)g(\\)p Fu(tracin)o(g)p
6147 Fw(")f(m)o(et)n(h)o(o)q(d.)25 b(Th)o(e)17 b(purp)q(os)q(e)h(of)e(t)n
6148 (hi)q(s)h(m)o(et)n(h)o(o)q(d)f(i)q(s)g(t)o(o)h(id)o(en)o(t)o(ify)e(all)
6149 h(in)o(t)o(er)q(n)o(al)f(p)q(oin)o(t)o(ers)104 328 y(t)o(o)j(ot)n(h)o
6150 (er)g Fs(GCObject)p Fw('s.)27 b(Thi)q(s)17 b(m)o(et)n(h)o(o)q(d)g(i)q
6151 (s)g(not)h(us)q(e)q(d)g(b)o(y)f(t)n(h)o(e)i(ap)o(plica)o(t)o(ion)c
6152 (programm)o(er)g(direct)n(ly)j(bu)o(t)g(only)f(us)q(e)q(d)104
6153 378 y(in)o(t)o(er)q(n)o(ally)12 b(b)o(y)i(t)n(h)o(e)g(garbage)g
6154 (collect)o(ors.)62 461 y Fi(\017)21 b Fw(Th)o(e)16 b(tracin)o(g)h(m)o
6155 (et)n(h)o(o)q(d)f(of)f(eac)o(h)j(collect)o(a)o(ble)d(m)n(ust)h(in)g(t)o
6156 (ur)q(n)g(call)f(t)n(h)o(e)i(tracin)o(g)g(m)o(et)n(h)o(o)q(d)f(in)g(t)n
6157 (h)o(e)h(class)g Fs(GC)f Fw(wit)n(h)g(eac)o(h)104 511
6158 y(p)q(oin)o(t)o(er)e(t)o(o)g(a)f(collect)o(a)o(ble)g(ob)r(ject)i(t)n(h)
6159 o(a)o(t)f(t)n(h)o(e)h(ob)r(ject)f(o)o(wns:)169 610 y
6160 Fs(class)21 b(GC)g({)169 660 y(public:)235 710 y(virtual)f(GCObject)g
6161 (*)i(trace)e(\(GCObject)g(*\))i(=)f(0;)235 760 y(inline)42
6162 b(void)21 b(trace)g(\(GCObject&)e(obj\);)169 810 y(};)104
6163 909 y Fw(Br)q(ie\015y)m(,)13 b(t)n(h)o(e)i(rule)q(s)f(are)h(as)f(follo)
6164 o(ws:)142 992 y(1.)20 b(Th)o(e)14 b(tracin)o(g)g(m)o(et)n(h)o(o)q(d)g
6165 (of)f(a)h(collect)o(a)o(ble)e Fs(Foo)h Fw(h)o(as)h(t)n(h)o(e)h(follo)o
6166 (win)o(g)c(gen)o(eral)j(form:)478 1067 y Fs(void)21 b(Foo::trace\(GC)e
6167 (*)j(gc\))478 1117 y({)544 1167 y(...)478 1216 y(})142
6168 1341 y Fw(2.)e(If)14 b(class)g Fs(Foo)g Fw(h)o(as)f(a)h(m)o(em)n(b)q
6169 (er)e(t)n(h)o(a)o(t)i(i)q(s)f(a)h(p)q(oin)o(t)o(er)g
6170 Fs(p)f Fw(t)o(o)h(a)g(collect)o(a)o(ble)f(ob)r(ject)h(of)g(t)o(yp)q(e)g
6171 Fs(Bar)p Fw(,)e(t)n(h)o(en)j(add:)522 1416 y Fs(p)22
6172 b(=)f(\(Bar\)gc->trace\(p\);)195 1540 y Fw(t)o(o)14 b(t)n(h)o(e)h(b)q
6173 (o)q(dy)f(of)f Fs(Foo::trace)p Fw(.)142 1607 y(3.)20
6174 b(If)14 b(class)g Fs(Foo)g Fw(h)o(as)f(a)h(m)o(em)n(b)q(er)e(ob)r(ject)
6175 i Fs(x)g Fw(t)n(h)o(a)o(t)g(i)q(s)f(a)h(su)n(b)q(class)i(of)d
6176 Fs(GCObject)p Fw(,)f(also)h(add:)522 1681 y Fs(gc->trace\(x\);)195
6177 1806 y Fw(t)o(o)h(t)n(h)o(e)h(b)q(o)q(dy)f(of)f Fs(Foo::trace)p
6178 Fw(.)142 1872 y(4.)20 b(If)14 b(class)g Fs(Foo)g Fw(i)q(s)f(d)o(er)q
6179 (iv)o(e)q(d)i(f)q(rom)c(a)j(class)h Fs(Bar)e Fw(t)n(h)o(a)o(t)h(i)q(s)f
6180 (a)h(su)n(b)q(class)i(of)d Fs(GCObject)p Fw(,)f(add:)522
6181 1947 y Fs(Bar::trace\(gc\);)195 2071 y Fw(t)o(o)i(t)n(h)o(e)h(b)q(o)q
6182 (dy)f(of)f Fs(Foo::trace)p Fw(.)104 2154 y(Not)o(ice)h(t)n(h)o(a)o(t)g
6183 (t)n(h)o(e)q(s)q(e)h(m)o(et)n(h)o(o)q(ds)f(can)g(b)q(e)g(arran)o(ge)q
6184 (d)g(in)g(an)o(y)f(ord)o(er.)54 2249 y(Thi)q(s)h(prot)o(o)q(col)h(can)g
6185 (b)q(e)g(us)q(e)q(d)g(b)o(y)g(b)q(ot)n(h)g(co)o(p)o(yin)o(g)g(an)o(d)f
6186 (non-co)o(p)o(yin)o(g)h(collect)o(ors.)21 b(In)15 b(addit)o(ion,)f(t)n
6187 (h)o(e)h(class)h Fs(GCVerifier)0 2299 y Fw(also)d(us)q(e)q(s)i(t)n(hi)q
6188 (s)f(prot)o(o)q(col)g(t)o(o)g(w)o(alk)f(t)n(h)o(e)h(h)o(eap)h(in)e(ord)
6189 o(er)i(t)o(o)g(v)o(er)q(ify)e(t)n(h)o(e)h(in)o(t)o(egr)q(it)o(y)f(of)g
6190 (a)h(garbage)g(collect)o(e)q(d)g(d)o(a)o(t)o(a)g(stru)o(ct)o(ure.)0
6191 2427 y FF(A.9)56 b(M)o(e)r(s)q(sage)r(s)17 b(an)n(d)j(St)n(a)o(t)n(i)q
6192 (st)n(ics)0 2516 y Fw(All)13 b(garbage)h(collect)o(ors)g(us)q(e)h(t)n
6193 (h)o(e)f(follo)o(win)o(g)e(prot)o(o)q(cols)i(for)f(st)o(a)o(t)o(us)i
6194 (rep)q(ort)o(in)o(g)f(an)o(d)g(st)o(a)o(t)o(i)q(st)o(ics)g(ga)o(t)n(h)o
6195 (er)q(in)o(g.)p eop
6196 %%Page: 67 68
6197 67 67 bop 0 -82 1981 3 v 0 -100 a Fq(A.)15 b Fp(Garba)o(ge)j
6198 (Collection)j(in)e(the)g Fb(Pro)o(p)f Fp(Librar)m(y)857
6199 b Fw(67)65 45 y Fs(class)21 b(GC)h({)65 95 y(public:)131
6200 145 y(enum)f(GCNotify)f({)196 195 y(gc_no_notify,)196
6201 244 y(gc_notify_minor_co)o(llect)o(ion,)196 294 y(gc_notify_major_co)o
6202 (llect)o(ion,)196 344 y(gc_notify_weak_poi)o(nter_)o(colle)o(ction)o(,)
6203 196 394 y(gc_print_collectio)o(n_tim)o(e,)196 444 y(gc_print_debugging)
6204 o(_info)131 493 y(})131 543 y(virtual)g(int)130 b(verbosity\(\))20
6205 b(const;)131 593 y(virtual)g(void)108 b(set_verbosity\(int\);)131
6206 643 y(virtual)20 b(ostream&)g(get_console\(\))f(const;)131
6207 693 y(virtual)h(void)108 b(set_console\(ostream)o(&\);)65
6208 742 y(};)65 825 y(class)21 b(GC)h({)65 875 y(public:)131
6209 925 y(struct)e(Statistics)g({)196 975 y(const)h(char)g(*)65
6210 b(algorithm;)196 1025 y(const)21 b(char)g(*)65 b(version;)196
6211 1075 y(size_t)195 b(bytes_used;)196 1124 y(size_t)g(bytes_managed;)196
6212 1174 y(size_t)g(bytes_free;)196 1224 y(struct)21 b(timeval)f
6213 (gc_user_time;)196 1274 y(struct)h(timeval)f(gc_system_time;)196
6214 1324 y(struct)h(timeval)f(total_gc_user_time)o(;)196
6215 1373 y(struct)h(timeval)f(total_gc_system_ti)o(me;)131
6216 1423 y(})131 1473 y(virtual)g(Statistics)g(statistics\(\);)65
6217 1523 y(};)54 1606 y Fw(Eac)o(h)9 b(collect)o(or)h(h)o(as)f(a)g(curren)o
6218 (t)i(v)o(erb)q(os)q(it)o(y)e(lev)o(el,)h(whic)o(h)f(can)g(b)q(e)g(s)q
6219 (et)h(an)o(d)f(re)q(s)q(et)i(us)q(in)o(g)e(t)n(h)o(e)h(m)o(et)n(h)o(o)q
6220 (ds)f Fs(set_verbosity\(int\))0 1656 y Fw(an)o(d)14 b
6221 Fs(verbosity\(\))19 b(const)p Fw(.)e(Th)o(e)d(v)o(erb)q(os)q(it)o(y)h
6222 (lev)o(el)e(i)q(s)h(act)o(ually)e(a)i(bit)g(s)q(et)g(con)o(t)o(ainin)o
6223 (g)f(\015ags)h(of)f(t)n(h)o(e)i(t)o(yp)q(e)f Fs(GC::GCNotify)p
6224 Fw(.)0 1705 y(A)g(com)n(bin)o(a)o(t)o(ion)d(of)i(t)n(h)o(e)q(s)q(e)j(o)
6225 o(pt)o(ions)d(can)h(b)q(e)g(us)q(e)q(d.)62 1784 y Fi(\017)21
6226 b Fs(gc_no_notify)11 b Fw(|)i(no)h(m)o(e)q(ssage)q(s)h(a)o(t)e(all.)62
6227 1859 y Fi(\017)21 b Fs(gc_notify_minor_)o(colle)o(ction)15
6228 b Fw(|)i(all)h(minor)e(collect)o(ions)i(will)f(b)q(e)h(not)o(i\014e)q
6229 (d)g(b)o(y)g(pr)q(in)o(t)o(in)o(g)g(a)g(m)o(e)q(ssage)g(on)g(t)n(h)o(e)
6230 104 1909 y(curren)o(t)d(console.)62 1984 y Fi(\017)21
6231 b Fs(gc_notify_major_)o(colle)o(ction)10 b Fw(|)k(s)q(imila)o(rly)d
6232 (for)j(all)e(m)o(a)r(jor)g(collect)o(ions.)62 2059 y
6233 Fi(\017)21 b Fs(gc_notify_weak_p)o(ointe)o(r_col)o(lecti)o(on)11
6234 b Fw(|)i(not)o(ify)g(t)n(h)o(e)i(us)q(er)f(wh)o(en)h(w)o(eak)f(p)q(oin)
6235 o(t)o(ers)g(are)h(b)q(e)q(in)o(g)f(collect)o(e)q(d.)62
6236 2134 y Fi(\017)21 b Fs(gc_print_collect)o(ion_t)o(ime)9
6237 b Fw(|)j(t)n(hi)q(s)h(o)o(pt)o(ion)e(will)g(let)i(t)n(h)o(e)g(collect)o
6238 (or)g(t)o(o)g(pr)q(in)o(t)f(t)n(h)o(e)h(t)o(im)o(e)e(sp)q(en)o(t)i(d)o
6239 (ur)q(in)o(g)f(collect)o(ion)104 2184 y(\(an)o(d)h(\014n)o(aliza)o(t)o
6240 (ion\).)62 2258 y Fi(\017)21 b Fs(gc_print_debuggi)o(ng_in)o(fo)12
6241 b Fw(|)j(t)n(hi)q(s)g(o)o(pt)o(ion)f(will)g(pr)q(in)o(t)h(addit)o(ion)o
6242 (al)e(inform)o(a)o(t)o(ion)f(su)o(c)o(h)k(as)f(st)o(ac)o(k)h(an)o(d)f
6243 (h)o(eap)g(ad-)104 2308 y(dre)q(ss)q(e)q(s)i(d)o(ur)q(in)o(g)c(garbage)
6244 h(collect)o(ion.)54 2387 y(Th)o(e)i(curren)o(t)h(console)f(of)f(a)h
6245 (collect)o(or)g(i)q(s)f(d)o(ef)q(a)n(ul)o(t)o(e)q(d)i(t)o(o)f(t)n(h)o
6246 (e)h(C)p Fs(++)e Fw(stream)h Fs(cerr)p Fw(.)24 b(It)16
6247 b(can)g(b)q(e)g(s)q(et)g(an)o(d)g(insp)q(ect)o(e)q(d)h(wit)n(h)0
6248 2437 y(t)n(h)o(e)d(m)o(et)n(h)o(o)q(ds)g Fs(set_console\(ost)o(ream&)o
6249 (\))d Fw(an)o(d)i Fs(ostream&)20 b(get_console\(\))11
6250 b Fw(re)q(sp)q(ect)o(iv)o(ely)m(.)18 b(F)m(or)13 b(example,)f(t)n(h)o
6251 (e)i(us)q(er)h(can)0 2487 y(re)q(direct)g(all)e(garbage)g(collect)o
6252 (ion)g(m)o(e)q(ssage)q(s)h(t)o(o)g(a)f(log)g(\014le)h
6253 Fs("gc.log")d Fw(b)o(y)j(execu)o(t)o(in)o(g)h(t)n(h)o(e)f(follo)o(win)o
6254 (g)d(d)o(ur)q(in)o(g)j(init)o(ializa)o(t)o(io)o(n:)65
6255 2570 y Fs(ofstream)21 b(gc_log\("gc.log")o(\);)65 2619
6256 y(GC::get_default_gc\()o(\).set)o(_cons)o(ole\(g)o(c_log)o(\);)p
6258 %%Page: 68 69
6259 68 68 bop 0 -82 1981 3 v 0 -100 a Fq(A.)15 b Fp(Garba)o(ge)j
6260 (Collection)j(in)e(the)g Fb(Pro)o(p)f Fp(Librar)m(y)857
6261 b Fw(68)0 45 y FF(A.10)56 b(Th)n(e)19 b(Bart)n(let)n(t)d(st)n(yle)i(mo)
6262 q(st)n(ly)e(co)n(p)n(yin)o(g)j(co)o(llect)o(or)0 134
6263 y Fw(Curren)o(t)n(ly)10 b(a)f(Bart)n(let)n(t-st)o(yle)i(most)n(ly)d(co)
6264 o(p)o(yin)o(g)h(collect)o(or)h(h)o(as)f(b)q(een)h(implem)n(en)o(t)o(e)q
6265 (d.)k(Th)o(e)c(curren)o(t)g(v)o(ers)q(ion)g(i)q(s)e(non-gen)o(era)o(t)o
6266 (ion)o(al)0 183 y(bu)o(t)15 b(w)o(e)f(exp)q(ect)h(t)n(h)o(a)o(t)f(a)f
6267 (gen)o(era)o(t)o(ion)o(al)g(v)o(ers)q(ion)h(will)f(b)q(e)h(a)o(v)n
6268 (aila)o(bl)o(e)e(in)h(t)n(h)o(e)i(n)o(ear)f(fu)o(t)o(ure.)54
6269 245 y(Th)o(e)h(Bart)n(let)n(t-st)o(yle)i(collect)o(or)e(i)q(s)f(implem)
6270 o(en)o(t)o(e)q(d)e(as)k(t)n(h)o(e)f(concret)o(e)i(class)f
6271 Fs(BGC)p Fw(.)e(As)q(id)o(e)h(f)q(rom)e(all)h(t)n(h)o(e)i(s)q(ervice)q
6272 (s)h(pro)o(vid)o(e)q(d)0 295 y(b)o(y)d(class)g Fs(GC)p
6273 Fw(,)f Fs(BGC)h Fw(also)f(pro)o(vid)o(e)q(s)h(t)n(h)o(e)h(follo)o(win)o
6274 (g)c(m)o(et)n(h)o(o)q(d:)65 397 y Fs(class)21 b(BGC)g(:)h(public)e(CGC)
6275 i({)65 447 y(public:)131 497 y(virtual)e(void)h(set_gc_ratio\(int\);)
6276 131 547 y(virtual)f(void)h(set_initial_heap_s)o(ize)e(\(size_t\);)131
6277 596 y(virtual)h(void)h(set_min_heap_growt)o(h)63 b(\(size_t\);)65
6278 646 y(})54 749 y Fw(Th)o(e)12 b(gc)f(ra)o(t)o(io)g(refers)j(t)o(o)e(t)n
6279 (h)o(e)g(ra)o(t)o(io)f(of)g(us)q(e)q(d)i(h)o(eap)f(space)h(v)o(ersus)g
6280 (t)o(ot)o(al)e(h)o(eap)h(space.)19 b(Class)12 b Fs(BGC)f
6281 Fw(will)f(in)o(v)o(ok)o(e)h(t)n(h)o(e)h(garbage)0 798
6282 y(collect)o(ion)h(if)g(t)n(hi)q(s)h(i)q(s)f(excee)q(d)o(e)q(d.)21
6283 b(Th)o(e)14 b(d)o(ef)q(a)n(ul)o(t)g(gc)g(ra)o(t)o(io)f(for)h
6284 Fs(BGC)f Fw(i)q(s)h(75\045.)54 860 y(Th)o(e)g(init)o(ial)d(s)q(ize)k
6285 (of)e(t)n(h)o(e)h(h)o(eap)h(an)o(d)e(t)n(h)o(e)i(minim)n(al)10
6286 b(n)n(u)o(m)n(b)q(er)k(of)f(b)o(yt)o(e)q(s)i(t)o(o)f(reque)q(st)h(f)q
6287 (rom)d(t)n(h)o(e)j(syst)o(em)e(d)o(ur)q(in)o(g)h(a)f(h)o(eap)i(ex-)0
6288 910 y(pans)q(ion)d(can)h(b)q(e)f(adjust)o(e)q(d)i(us)q(in)o(g)e(t)n(h)o
6289 (e)h(m)o(et)n(h)o(o)q(ds)g Fs(set_initial_heap)o(_size)c
6290 Fw(an)o(d)j Fs(set_min_heap_growth)d Fw(re)q(sp)q(ect)o(iv)o(ely)m(.)0
6291 960 y(Th)o(e)q(s)q(e)15 b(m)o(et)n(h)o(o)q(ds)f(are)h(d)o(eclare)q(d)g
6292 (in)f(t)n(h)o(e)h Fs(GC)e Fw(prot)o(o)q(col.)19 b(By)c(d)o(ef)q(a)n(ul)
6293 o(t,)f(t)n(h)o(e)h(init)o(ial)d(h)o(eap)i(s)q(ize)h(for)f(t)n(hi)q(s)g
6294 (collect)o(or)g(i)q(s)g(128K)f(an)o(d)0 1009 y(eac)o(h)i(h)o(eap)f
6295 (expans)q(ion)g(will)e(increas)q(e)k(t)n(h)o(e)e(h)o(eap)h(b)o(y)e
6296 (512K.)54 1071 y(If)f(an)g(ap)o(plica)o(t)o(ion)f(us)q(e)q(s)i(a)g(lot)
6297 f(garbage)g(collect)o(e)q(d)h(st)o(orage)h(it)e(i)q(s)g(a)h(go)q(o)q(d)
6298 f(id)o(ea)h(t)o(o)g(s)q(et)h(t)n(h)o(e)f(h)o(eap)g(s)q(ize)g(t)o(o)g
6299 (larger)g(capacit)o(y)0 1121 y(d)o(ur)q(in)o(g)d(init)o(ializa)o(t)o
6300 (ion.)k(Ot)n(h)o(erwi)q(s)q(e,)e(t)n(h)o(e)g(collect)o(or)f(will)e(h)o
6301 (a)o(v)o(e)i(t)o(o)g(p)q(erform)e(more)h(garbage)h(collect)o(ion)e(an)o
6302 (d)i(h)o(eap)g(expans)q(ions)0 1171 y(t)o(o)j(reac)o(h)h(a)f(st)o(a)o
6303 (ble)f(st)o(a)o(t)o(e.)0 1299 y FF(A.11)56 b(Th)n(e)19
6304 b(Mar)o(k)g(Sw)n(eep)g(co)o(llect)o(or)0 1387 y Fw(An)11
6305 b(al)o(t)o(er)q(n)o(a)o(t)o(iv)o(e)g(t)o(o)h(t)n(h)o(e)f(co)o(p)o(yin)o
6306 (g)g(collect)o(or)h(i)q(s)e(t)n(h)o(e)i(t)n(h)o(e)g(m)o(ar)o(k)e(sw)o
6307 (eep)j(collect)o(or.)k(Lik)o(e)11 b(t)n(h)o(e)h(previous)f(collect)o
6308 (or,)h(t)n(hi)q(s)f(collect)o(or)0 1437 y(also)k(us)q(e)q(s)h(cons)q
6309 (erv)n(a)o(t)o(iv)o(e)f(scannin)o(g)h(t)o(o)f(lo)q(ca)o(t)o(e)g(ro)q
6310 (ot)o(s.)23 b(Unlik)o(ely)14 b(t)n(h)o(e)i(Bo)q(e)o(hm)e(collect)o(or,)
6311 h(t)o(yp)q(e)g(accura)o(t)o(e)i(m)o(ar)o(kin)o(g)d(i)q(s)g(us)q(e)q(d)0
6312 1487 y(t)n(hrough)g(t)n(h)o(e)h(us)q(er)g(sup)o(plie)q(d)e(tracin)o(g)h
6313 (m)o(et)n(h)o(o)q(d.)54 1548 y(Since)e(t)n(h)o(e)h(d)o(ef)q(a)n(ul)o(t)
6314 f(collect)o(or)h(i)q(s)e(of)g(t)n(h)o(e)i Fs(BGC)f Fw(v)n(ar)q(iet)o(y)
6315 m(,)e(t)n(h)o(e)j(us)q(er)g(m)n(ust)f(crea)o(t)o(e)h(an)f(inst)o(ance)h
6316 (of)e Fs(MarkSweepGC)f Fw(if)h(t)n(h)o(e)i(m)o(ar)o(k)0
6317 1598 y(sw)o(eep)i(collect)o(or)f(i)q(s)f(t)o(o)i(b)q(e)f(us)q(e)q(d.)65
6318 1700 y Fs(class)21 b(MarkSweepGC)f(:)h(public)g(CGC)g({)65
6319 1750 y(public:)131 1800 y(virtual)f(void)h(set_gc_ratio\(int\);)131
6320 1850 y(virtual)f(void)h(set_initial_heap_s)o(ize)e(\(size_t\);)131
6321 1900 y(virtual)h(void)h(set_min_heap_growt)o(h)63 b(\(size_t\);)65
6322 1949 y(})54 2052 y Fw(Th)o(e)12 b(gc)h(ra)o(t)o(io)f(in)g(class)h
6323 Fs(MarkSweepGC)d Fw(d)o(et)o(ermin)o(e)q(s)j(wh)o(et)n(h)o(er)h(h)o
6324 (eap)g(expans)q(ion)e(i)q(s)f(t)o(o)i(b)q(e)g(p)q(erform)o(e)q(d)f(aft)
6325 o(er)g(a)g(collect)o(ion.)0 2102 y(Th)o(e)j(d)o(ef)q(a)n(ul)o(t)h(gc)f
6326 (ra)o(t)o(io)g(i)q(s)f(50\045,)g(t)n(h)n(us)j(if)d(aft)o(er)h(garbage)g
6327 (collect)o(ion)f(t)n(h)o(e)i(ra)o(t)o(io)f(of)f(us)q(e)q(d)i(v)o(ersus)
6328 h(t)o(ot)o(al)e(h)o(eap)g(space)i(excee)q(ds)0 2151 y(on)o(e)d(h)o
6329 (alf,)e(t)n(h)o(e)j(h)o(eap)f(will)f(b)q(e)h(expan)o(d)o(e)q(d.)54
6330 2213 y(F)m(or)h(most)g(purp)q(os)q(e)q(s)j(t)n(h)o(e)f(t)o(w)o(o)e
6331 (collect)o(ors)i(are)f(in)o(t)o(erc)o(h)o(an)o(gea)o(ble.)25
6332 b(Since)16 b(all)f(t)o(yp)q(e)q(s)h(of)f(garbage)h(collect)o(ors)g(u)o
6333 (n)o(d)o(er)i(our)0 2263 y(f)q(ram)o(ew)o(or)o(k)h(us)q(e)i(t)n(h)o(e)g
6334 (sam)o(e)e(prot)o(o)q(col,)i(ap)o(plica)o(t)o(ions)d(can)i(b)q(e)h(wr)q
6335 (it)n(t)o(en)f(wit)n(h)o(ou)o(t)h(\014xin)o(g)f(a)g(sp)q(eci\014c)h
6336 (garbage)f(collect)o(ion)0 2313 y(algor)q(it)n(hm)11
6337 b(b)q(efore)j(h)o(an)o(d.)0 2441 y FF(A.12)56 b(Fin)o(aliza)o(t)n(ion)0
6338 2529 y Fw(On)o(e)13 b(common)e(C)p Fs(++)h Fw(idiom)e(us)q(e)q(s)k
6339 (constru)o(ct)o(or)h(an)o(d)e(d)o(e)q(stru)o(ct)o(or)i(for)e(re)q
6340 (source)i(allo)q(ca)o(t)o(ion:)h(re)q(source)q(s)f(\(includin)o(g)e(m)o
6341 (emory)0 2579 y(bu)o(t)k(m)o(ay)d(includ)o(e)i(ot)n(h)o(ers,)h(su)o(c)o
6342 (h)g(as)f(\014le)g(h)o(an)o(dle)q(s,)g(graphical)f(widget)o(s,)h(et)o
6343 (c\))h(t)n(h)o(a)o(t)f(are)h(acquire)q(d)f(in)f(a)h(class)h(constru)o
6344 (ct)o(or)0 2629 y(are)d(releas)q(e)q(d\(\014n)o(alize)q(d\))i(in)e(t)n
6345 (h)o(e)g(class'e)q(s)i(d)o(e)q(stru)o(ct)o(or.)p eop
6346 %%Page: 69 70
6347 69 69 bop 0 -82 1981 3 v 0 -100 a Fq(A.)15 b Fp(Garba)o(ge)j
6348 (Collection)j(in)e(the)g Fb(Pro)o(p)f Fp(Librar)m(y)857
6349 b Fw(69)54 45 y(Th)o(ere)16 b(are,)f(h)o(o)o(w)o(ev)o(er,)g(t)o(w)o(o)f
6350 (o)o(p)o(p)q(os)q(in)o(g)g(views)h(in)g(h)o(o)o(w)f(\014n)o(aliza)o(t)o
6351 (ion)f(sh)o(ould)i(b)q(e)g(h)o(an)o(dle)q(d)f(in)h(a)f(garbage)h
6352 (collect)o(or.)21 b(Th)o(e)0 95 y(\014rst)e(assu)o(m)o(e)q(s)g(t)n(h)o
6353 (a)o(t)f(garbage)g(collect)o(ion)f(s)q(im)n(ula)o(t)o(e)q(s)g(an)g
6354 (in\014nit)o(e)h(amou)o(n)o(t)f(of)g(m)o(emory)f(an)o(d)h(so)h(a)n(u)o
6355 (t)o(om)o(a)o(t)o(ic)g(\014n)o(aliza)o(t)o(ion)0 145
6356 y(i)q(s)d(in)o(ap)o(pror)q(ia)o(t)o(e.)22 b(Th)o(e)15
6357 b(s)q(econ)o(d)i(t)o(ak)o(e)q(s)f(a)f(more)f(pragm)o(a)o(t)o(ic)g
6358 (view,)h(an)o(d)g(assu)o(m)o(e)q(s)i(t)n(h)o(a)o(t)e(a)n(u)o(t)o(om)o
6359 (a)o(t)o(ic)g(\014n)o(aliza)o(t)o(ion)f(sh)o(ould)h(b)q(e)0
6360 195 y(pro)o(vid)o(e)q(d)k(s)q(ince)f(ot)n(h)o(erwi)q(s)q(e)h(explicit)e
6361 (re)q(source)j(trac)o(kin)o(g)f(m)n(ust)e(b)q(e)i(pro)o(vid)o(e)q(d)f
6362 (b)o(y)g(t)n(h)o(e)h(us)q(er)g(for)f(collect)o(a)o(ble)f(d)o(a)o(t)o(a)
6363 o(t)o(yp)q(e)q(s,)0 244 y(m)o(akin)o(g)12 b(garbage)i(collect)o(ion)e
6364 (m)n(u)o(c)o(h)h(le)q(ss)j(us)q(eful)d(t)n(h)o(an)h(it)g(can)g(b)q(e.)
6365 54 306 y(W)m(e)e(will)f(ref)q(rain)h(f)q(rom)e(part)o(icipa)o(t)o(in)o
6366 (g)h(in)h(an)o(y)g(religious)g(an)o(d)g(philoso)o(phical)f(w)o(ars)h
6367 (on)h(whic)o(h)f(dogm)o(a)e(i)q(s)i(t)n(h)o(e)h(\\On)o(e)g(T)m(rue)0
6368 356 y(W)m(ay".)k(nst)o(ead,)d(b)q(ot)n(h)g(t)o(yp)q(e)q(s)h(of)e
6369 (collect)o(ors)i(are)f(pro)o(vid)o(e)q(d.)54 417 y(By)f(d)o(ef)q(a)n
6370 (ul)o(t,)g(all)f(garbage)h(collect)o(ion)f(class)q(e)q(s)j(do)e(not)g
6371 (p)q(erform)f(\014n)o(aliza)o(t)o(ion)g(on)h(garbage)f(collect)o(e)q(d)
6372 i(ob)r(ject)o(s.)19 b(If)13 b(ob)r(ject)0 467 y(\014n)o(aliza)o(t)o
6373 (ion)f(i)q(s)i(d)o(e)q(s)q(ire)q(d)h(t)n(h)o(en)g(t)n(h)o(e)f(us)q(er)h
6374 (can)f(do)g(on)o(e)g(of)f(t)o(w)o(o)g(t)n(hin)o(gs:)62
6375 550 y Fi(\017)21 b Fw(En)o(a)o(ble)13 b(t)n(h)o(e)i(\014n)o(aliza)o(t)o
6376 (ion)d(of)h(t)n(h)o(e)i(d)o(ef)q(a)n(ul)o(t)f(h)o(eap)h(b)o(y)e(pu)o(t)
6377 n(t)o(in)o(g)169 634 y Fs(GC::get_default_gc)o(\(\).se)o(t_fin)o(aliza)
6378 o(tion\()o(true)o(\);)104 719 y Fw(in)g(t)n(h)o(e)i(init)o(ializa)o(t)o
6379 (ion)c(co)q(d)o(e,)j(or)62 796 y Fi(\017)21 b Fw(Inst)o(an)o(t)o(ia)o
6380 (t)o(e)12 b(a)f(di\013eren)o(t)j(inst)o(ance)f(of)e(t)n(h)o(e)i
6381 (garbage)f(collect)o(or)g(an)o(d)g(allo)q(ca)o(t)o(e)g(ob)r(ject)o(s)h
6382 (n)o(ee)q(din)o(g)g(\014n)o(aliza)o(t)o(ion)e(f)q(rom)f(t)n(hi)q(s)104
6383 846 y(collect)o(or.)18 b(Thi)q(s)c(m)o(ay)e(b)q(e)i(a)g(b)q(et)n(t)o
6384 (er)h(m)o(et)n(h)o(o)q(d)e(s)q(ince)i(not)e(all)g(ob)r(ject)o(s)j(n)o
6385 (ee)q(d)f(\014n)o(aliza)o(t)o(ion)d(an)o(d)i(t)n(h)o(os)q(e)h(t)n(h)o
6386 (a)o(t)f(do)g(not)g(can)104 895 y(st)o(ill)g(b)q(e)h(allo)q(ca)o(t)o(e)
6387 q(d)f(f)q(rom)f(t)n(h)o(e)j(d)o(ef)q(a)n(ul)o(t)f(collect)o(or.)22
6388 b(Thi)q(s)14 b(w)o(ay)h(w)o(e)g(only)f(h)o(a)o(v)o(e)h(t)o(o)g(pay)f
6389 (for)h(t)n(h)o(e)h(p)q(erform)o(ance)e(p)q(en)o(al)o(t)o(y)104
6390 945 y(\(if)f(an)o(y\))h(pro)o(p)q(ort)o(ion)o(al)e(t)o(o)i(t)n(h)o(e)h
6391 (usage)f(of)f(\014n)o(aliza)o(t)o(ion.)54 1028 y(F)m(or)f(example,)f
6392 (if)h(a)h(collect)o(a)o(ble)f(class)i(n)o(am)o(e)q(d)e
6393 Fs(Foo)g Fw(sh)o(ould)h(b)q(e)g(pro)o(p)q(erly)g(\014n)o(alize)q(d)g(w)
6394 o(e)g(can)g(d)o(eclare)i(it)d(in)h(t)n(h)o(e)h(follo)o(win)o(g)0
6395 1078 y(m)o(ann)o(er:)65 1166 y Fs(extern)21 b(BGC)g(bgc_f;)42
6396 b(//)22 b(somewhere)e(an)h(instance)f(is)i(defined)65
6397 1265 y(class)f(Foo)g(:)h(public)e(GCObject)h({)131 1315
6398 y(Resource)f(r;)65 1365 y(public:)131 1415 y(Foo\(\))h({)g
6399 (r.allocate\(\);)e(/*)j(allocate)e(resource)g(*/)h(})109
6400 1465 y(~Foo\(\))g({)g(r.release\(\);)e(/*)j(release)e(all)h(resource)f
6401 (*/)i(})131 1564 y(//)f(Make)g(object)g(allocate)f(from)h(bgc_f)g
6402 (instead)131 1614 y(//)g(of)h(the)f(default)f(non-collectable)f(gc.)131
6403 1664 y(void)i(*)g(operator)f(new)i(\(size_t)e(n\))h({)h(return)e
6404 (bgc_f.m_alloc\(n\);)f(})65 1714 y(};)54 1802 y Fw(Wh)o(en)13
6405 b(an)g(inst)o(ance)i(of)e(class)h Fs(Foo)f Fw(i)q(s)g(id)o(en)o(t)o
6406 (i\014e)q(d)g(as)h(garbage,)f(it)o(s)h(d)o(e)q(stru)o(ct)o(or)i(will)c
6407 (b)q(e)i(calle)q(d.)j([As)q(id)o(e:)h Fo(curr)n(ently)c(issue)0
6408 1851 y(such)19 b(as)h(\014nalization)f(synchr)n(onization)h(is)e(not)h
6409 (hand)r(le)n(d)h(dir)n(e)n(ctly)e(by)h(the)g(c)n(ol)r(le)n(ctor.)30
6410 b(So)20 b(if)e(ther)n(e)h(is)f(synchr)n(onization)0 1901
6411 y(c)n(onstr)n(aints)12 b(during)h(\014nalization)g(it)f(must)h(b)n(e)g
6412 (hand)r(le)n(d)g(by)g(the)g(obje)n(ct)g(destructor.)k(F)m(utur)n(e)12
6413 b(versions)h(of)g Fz(Pro)o(p)g Fo(wil)r(l)e(pr)n(ovide)0
6414 1951 y(sub)n(classes)k(with)f(mor)n(e)h(sophistic)n(ate)n(d)g
6415 (\014nalization)g(me)n(chanisms.)j Fw(])54 2013 y(Not)o(ice)g(t)n(h)o
6416 (a)o(t)h(t)n(h)o(e)g(d)o(ef)q(a)n(ul)o(t)g Fs(delete)e
6417 Fw(o)o(p)q(era)o(t)o(or)i(of)f(all)g(garbage)g(collect)o(a)o(ble)f
6418 (class)q(e)q(s)k(will)c(call)h(t)n(h)o(e)h(ob)r(ject)g(d)o(e)q(stru)o
6419 (ct)o(or)0 2063 y(explicit)n(ly)m(.)30 b(It)19 b(i)q(s)e(a)i(go)q(o)q
6420 (d)f(id)o(ea)h(t)o(o)f(us)q(e)i(explicit)d Fs(delete)g
6421 Fw(if)h(\014n)o(aliza)o(t)o(ion)f(i)q(s)h(a)g(rare)h(n)o(ee)q(d)g(s)q
6422 (ince)g(t)n(hi)q(s)g(s)q(ervice)g(in)o(v)o(olv)o(e)q(s)0
6423 2112 y(an)f(explicit)f(scan)i(of)f(t)n(h)o(e)h(garbage)f(m)o(emory)m(,)
6424 e(whic)o(h)i(m)o(ay)f(d)o(egrad)o(e)j(p)q(erform)o(ace)d(wit)n(h)i
6425 (exce)q(ss)q(iv)o(e)h(sw)o(ap)o(pin)o(g:)27 b(wit)n(h)o(ou)o(t)0
6426 2162 y(\014n)o(aliza)o(t)o(ion)12 b(t)n(h)o(e)j(garbage)f(page)q(s)g
6427 (will)e(not)i(h)o(a)o(v)o(e)g(t)o(o)g(b)q(e)g(reference)q(d)j(wit)n(h)c
6428 (a)h(co)o(p)o(yin)o(g)f(collect)o(or.)54 2224 y(It)i(sh)o(ould)h(also)f
6429 (b)q(e)h(not)o(e)q(d)g(t)n(h)o(a)o(t)g(s)q(ince)g(t)n(h)o(e)g(collect)o
6430 (or)g(i)q(s)f(cons)q(erv)n(a)o(t)o(iv)o(e,)h(t)n(h)o(ere)i(i)q(s)d(no)g
6431 (guaran)o(t)o(ee)h(t)n(h)o(a)o(t)g(garbage)g(will)e(b)q(e)0
6432 2274 y(id)o(en)o(t)o(i\014e)q(d)i(as)f(su)o(c)o(h:)21
6433 b(t)n(h)o(ere)c(i)q(s)e(no)g(guaran)o(t)o(ee)g(t)n(h)o(a)o(t)h(all)e
6434 (garbage)h(re)q(source)q(s)j(will)c(b)q(e)h(releas)q(e)q(d.)24
6435 b(In)15 b(gen)o(eral,)h(h)o(o)o(w)o(ev)o(er,)f(t)n(h)o(e)0
6436 2323 y(e\016cacy)f(of)f(t)n(h)o(e)h(collect)o(or)g(i)q(s)f(quit)o(e)g
6437 (go)q(o)q(d)g(an)o(d)g(so)h(non-cr)q(it)o(ical)e(or)h(plen)o(t)o(iful)f
6438 (re)q(source)q(s)k(can)e(b)q(e)f(safely)g(\014n)o(alize)q(d)h(wit)n(h)f
6439 (t)n(hi)q(s)0 2373 y(collect)o(or.)0 2490 y Fu(A.12.1)48
6440 b(W)l(e)q(ak)16 b(P)o(oin)o(t)o(er)o(s)0 2579 y Fw(It)g(i)q(s)f(f)q
6441 (requen)o(t)n(ly)g(v)o(ery)h(us)q(eful)g(t)o(o)g(b)q(e)f(a)o(ble)g(t)o
6442 (o)h(k)o(eep)g(trac)o(k)g(of)f(garbage)g(collect)o(a)o(ble)g(ob)r(ject)
6443 o(s)i(t)n(hrough)f(t)n(h)o(e)g(us)q(e)g(of)f(\\)p Fu(w)o(e)q(ak)0
6444 2629 y(p)q(oin)o(t)o(ers)p Fw(.)o(")f(Collect)o(ors)d(ignore)f(t)n(h)o
6445 (e)g(pre)q(s)q(ence)j(of)d(w)o(eak)g(p)q(oin)o(t)o(ers)h(t)o(o)f
6446 (garbage)g(collect)o(e)q(d)g(ob)r(ject)o(s;)j(ob)r(ject)o(s)f(wit)n(h)e
6447 (only)f(refer-)p eop
6448 %%Page: 70 71
6449 70 70 bop 0 -82 1981 3 v 0 -100 a Fq(A.)15 b Fp(Garba)o(ge)j
6450 (Collection)j(in)e(the)g Fb(Pro)o(p)f Fp(Librar)m(y)857
6451 b Fw(70)0 45 y(encin)o(g)12 b(w)o(eak)g(p)q(oin)o(t)o(ers)f(will)f(st)o
6452 (ill)g(b)q(e)i(collect)o(e)q(d.)17 b(W)m(eak)11 b(p)q(oin)o(t)o(ers)h
6453 (t)o(o)f(ob)r(ject)o(s)i(t)n(h)o(a)o(t)f(b)q(ecom)o(e)e(garbage)h(will)
6454 f(b)q(e)h(a)n(u)o(t)o(om)o(a)o(t)o(ically)0 95 y(re)q(s)q(et)k(t)o(o)g
6455 (n)n(ull.)54 157 y(W)m(eak)k(p)q(oin)o(t)o(ers)g(are)h(pro)o(vid)o(e)q
6456 (d)g(t)n(hrough)f(a)g(sm)o(art)g(p)q(oin)o(t)o(er)g(t)o(empla)o(t)o(e)e
6457 Fs(WeakPointer)p Fw(,)h(wh)o(os)q(e)i(d)o(e\014nit)o(ion)f(i)q(s)g(sh)o
6458 (o)o(wn)0 206 y(b)q(elo)o(w:)0 304 y Fs(template)h(<class)h(T>)g(class)
6459 g(WeakPointer)e({)65 354 y(public:)131 404 y(inline)h(WeakPointer\(\);)
6460 131 453 y(inline)g(WeakPointer\(const)f(WeakPointer<T>&)f(wp\);)131
6461 503 y(inline)i(WeakPointer\(T)f(*)j(ptr\);)131 553 y(inline)e
6462 (WeakPointer<T>&)f(operator)h(=)i(\(const)e(WeakPointer<T>&)f(wp\);)131
6463 603 y(inline)h(WeakPointer<T>&)f(operator)h(=)i(\(T)f(*)h(ptr\);)131
6464 653 y(inline)e(bool)h(is_null\(\))f(const;)131 702 y(inline)g(operator)
6465 g(const)h(T)h(*)f(\(\))h(const;)131 752 y(inline)e(operator)151
6466 b(T)22 b(*)f(\(\);)131 802 y(inline)f(const)h(T)h(*)f(operator)f(->)i
6467 (\(\))f(const;)131 852 y(inline)151 b(T)22 b(*)f(operator)f(->)i(\(\);)
6468 131 902 y(inline)e(const)h(T&)43 b(operator)20 b(*)44
6469 b(\(\))21 b(const;)131 951 y(inline)151 b(T&)43 b(operator)20
6470 b(*)44 b(\(\);)65 1001 y(};)54 1099 y Fw(A)12 b(w)o(eakp)q(oin)o(t)o
6471 (er)h(t)o(o)f(a)g(garbage)g(collect)o(a)o(ble)f(class)j
6472 Fs(A)e Fw(can)g(b)q(e)h(d)o(e\014n)o(e)q(d)g(as)g Fs(WeakPointer<A>)p
6473 Fw(.)h(If)e(a)g Fz(Pro)o(p)h Fw(d)o(a)o(t)o(a)o(t)o(yp)q(e)f
6474 Fs(T)g Fw(h)o(as)0 1149 y(b)q(een)i(d)o(e\014n)o(e)q(d,)h(a)f(w)o(eakp)
6475 q(oin)o(t)o(er)g(t)o(o)g(t)o(yp)q(e)g Fs(T)g Fw(can)g(d)o(e\014n)o(e)q
6476 (d)h(us)q(in)o(g)f(t)n(h)o(e)g Fs(classof)f Fw(k)o(eyw)o(ord.)18
6477 b(F)m(or)13 b(example:)65 1246 y Fs(datatype)21 b(Wff)g(::)g
6478 (collectable)f(=)h(True)g(|)h(False)e(|)i(And\(...\))42
6479 b(|)22 b(...;)65 1346 y(WeakPointer<classof)c(Wff>)j(a)h(=)f
6480 (And\(True,False\);)0 1465 y Fu(A.12.2)48 b(Th)o(e)15
6481 b(He)q(ap)h(W)l(alk)o(er)0 1553 y Fw(Th)o(ere)h(i)q(s)e(a)h(s)q(imple)d
6482 (class)k(calle)q(d)e Fs(GCVerify)f Fw(t)n(h)o(a)o(t)i(can)g(b)q(e)g(us)
6483 q(e)q(d)h(t)o(o)f(v)o(er)q(ify)f(t)n(h)o(e)i(in)o(t)o(egr)q(it)o(y)d
6484 (of)h(a)h(complex)e(allo)q(ca)o(t)o(e)q(d)h(d)o(a)o(t)o(a)0
6485 1603 y(stru)o(ct)o(ure.)21 b(Thi)q(s)13 b(i)q(s)h(f)q(requen)o(t)n(ly)g
6486 (us)q(eful)g(d)o(ur)q(in)o(g)g(t)n(h)o(e)g(d)o(ev)o(elo)o(pm)o(en)o(t)g
6487 (of)f(a)h(n)o(ew)g(collect)o(or,)g(or)g(a)g(complex)e(class)j(d)o(er)q
6488 (iv)o(e)g(class)0 1653 y(of)e Fs(GCObject)p Fw(.)54 1714
6489 y(Th)o(e)h(in)o(t)o(erf)q(ace)g(of)f(t)n(hi)q(s)h(class)h(i)q(s)e(sh)o
6490 (o)o(wn)h(b)q(elo)o(w.)65 1812 y Fs(class)21 b(GCVerifier)f(:)h
6491 (protected)f(GC)i({)65 1862 y(public:)131 1912 y(virtual)e(bool)h
6492 (is_valid_pointer)215 b(\(GCObject)20 b(*\);)131 1961
6493 y(virtual)g(bool)h(is_valid_interior_)o(point)o(er)e(\(GCObject)h(*\);)
6494 131 2011 y(virtual)g(bool)h(is_valid_structure)171 b(\(GCObject)20
6495 b(*\);)131 2061 y(virtual)g(bool)h(is_valid_pointer)215
6496 b(\(GCObject)20 b(*,)h(GC)g(*\);)131 2111 y(virtual)f(bool)h
6497 (is_valid_interior_)o(point)o(er)e(\(GCObject)h(*,)h(GC)g(*\);)131
6498 2161 y(virtual)f(bool)h(is_valid_structure)171 b(\(GCObject)20
6499 b(*,)h(GC)g(*\);)131 2210 y(size_t)f(number_of_nodes\(\))f(const;)65
6500 2260 y(};)54 2358 y Fw(Class)12 b Fs(GCVerify)f Fw(i)q(s)g(d)o(er)q(iv)
6501 o(e)q(d)i(f)q(rom)e(class)i Fs(GC)e Fw(so)i(t)n(h)o(a)o(t)f(t)n(h)o(e)h
6502 (sam)o(e)e(ob)r(ject)i(tracin)o(g)g(prot)o(o)q(col)f(can)g(b)q(e)g(us)q
6503 (e)q(d.)19 b(Br)q(ie\015y)m(,)11 b(t)n(hree)0 2408 y(di\013eren)o(t)k
6504 (m)o(et)n(h)o(o)q(ds)e(are)i(pro)o(vid)o(e)q(d)f(for)g(v)o(er)q
6505 (i\014ca)o(t)o(ion:)62 2498 y Fi(\017)21 b Fw(Call)12
6506 b(t)o(o)j Fs(is_valid_pointe)o(r\(p,g)o(c\))c Fw(v)o(er)q(i\014e)q(s)k
6507 (t)n(h)o(a)o(t)f Fs(p)f Fw(i)q(s)h(a)f(v)n(alid)f(p)q(oin)o(t)o(er)i(t)
6508 o(o)h(an)e(ob)r(ject)i(wit)n(hin)e(t)n(h)o(e)i(collect)o(or)f
6509 Fs(gc)p Fw(.)62 2579 y Fi(\017)21 b Fw(Call)8 b(t)o(o)j
6510 Fs(is_valid_pointer)o(\(p,gc)o(\))c Fw(v)o(er)q(i\014e)q(s)k(t)n(h)o(a)
6511 o(t)f Fs(p)f Fw(i)q(s)h(a)f(v)n(alid)g(in)o(t)o(er)q(ior)g(p)q(oin)o(t)
6512 o(er)h(t)o(o)g(an)g(ob)r(ject)h(wit)n(hin)e(t)n(h)o(e)i(collect)o(or)
6513 104 2629 y Fs(gc)p Fw(.)p eop
6514 %%Page: 71 72
6515 71 71 bop 0 -82 1981 3 v 0 -100 a Fq(A.)15 b Fp(Garba)o(ge)j
6516 (Collection)j(in)e(the)g Fb(Pro)o(p)f Fp(Librar)m(y)857
6517 b Fw(71)62 45 y Fi(\017)21 b Fw(Call)15 b(t)o(o)i Fs(is_valid_structu)o
6518 (re\(p,)o(gc\))c Fw(v)o(er)q(i\014e)q(s)18 b(t)n(h)o(e)f(en)o(t)o(ire)g
6519 (stru)o(ct)o(ure)h(reac)o(h)o(a)o(ble)f(b)o(y)f Fs(p)g
6520 Fw(i)q(s)g(v)n(alid.)25 b(Thi)q(s)16 b(m)o(et)n(h)o(o)q(d)104
6521 95 y(us)q(e)q(s)f Fs(GCObject::trace)c Fw(t)o(o)j(lo)q(ca)o(t)o(e)g(t)n
6522 (h)o(e)g(correct)i(su)n(b-stru)o(ct)o(ure)q(s.)54 185
6523 y(Th)o(ere)f(are)f(al)o(t)o(er)q(n)o(a)o(t)o(iv)o(e)f(v)o(ers)q(ions)h
6524 (of)f(t)n(h)o(e)i(sam)o(e)d(m)o(et)n(h)o(o)q(ds)i(t)n(h)o(a)o(t)g(assu)
6525 o(m)o(e)q(s)g(t)n(h)o(e)h(d)o(ef)q(a)n(ul)o(t)f(collect)o(or)g(i)q(s)f
6526 (us)q(e)q(d.)19 b(F)m(urt)n(h)o(ermore)62 275 y Fi(\017)i
6527 Fw(M)o(et)n(h)o(o)q(d)10 b Fs(number_of_nodes\(\))c Fw(ret)o(ur)q(ns)k
6528 (t)n(h)o(e)g(no)q(d)o(e)g(cou)o(n)o(t)g(of)f(t)n(h)o(e)h(last)f(stru)o
6529 (ct)o(ure)i(trace)q(d)g(us)q(in)o(g)e Fs(is_valid_structu)o(re)p
6530 Fw(,)104 325 y(an)o(d)62 406 y Fi(\017)21 b Fw(If)13
6531 b Fs(set_verbosity\(GC::g)o(c_pr)o(int_d)o(ebugg)o(ing_i)o(nfo\))d
6532 Fw(i)q(s)k(us)q(e)q(d)g(t)n(h)o(en)h(error)g(m)o(e)q(ssage)q(s)f(will)f
6533 (b)q(e)h(pr)q(in)o(t)o(e)q(d)f(d)o(ur)q(in)o(g)104 455
6534 y(stru)o(ct)o(ure)j(tracin)o(g.)0 603 y Fv(Reference)r(s)0
6535 706 y Fw([AF])119 b(Gui)q(s)q(ep)o(p)q(e)16 b(A)o(t)n(t)o(ardi)g(an)o
6536 (d)g(Tit)o(o)g(Flagella.)23 b(A)16 b(cust)o(omi)q(sa)o(ble)f(m)o(emory)
6537 e(m)o(an)o(agem)o(en)o(t)g(f)q(ram)o(ew)o(or)o(k.)24
6538 b(T)m(ec)o(hnical)201 756 y(rep)q(ort,)15 b(Univ)o(ers)q(it)o(y)e(of)h
6539 (Pi)q(sa.)0 837 y([A)o(GT89])42 b(Alf)q(re)q(d)20 b(V.)f(Ah)o(o,)i(Ma)o
6540 (h)o(ad)o(ev)n(an)f(Gan)o(apa)o(t)n(hi,)g(an)o(d)f(St)o(ev)o(en)i(W.)e
6541 (K.)g(Tjian)o(g.)35 b(Co)q(d)o(e)20 b(gen)o(era)o(t)o(ion)g(us)q(in)o
6542 (g)g(tree)201 886 y(m)o(a)o(t)o(c)o(hin)o(g)10 b(an)o(d)h(dyn)o(amic)e
6543 (programmin)o(g.)h Fo(A)o(CM)i(T)m(r)n(ansactions)h(on)g(Pr)n(o)n(gr)n
6544 (amming)e(L)n(anguages)j(and)f(Systems)p Fw(,)201 936
6545 y(11\(4\):491{516,)e(Oct)o(ob)q(er)k(1989.)0 1017 y([Bar88])69
6546 b(Jo)q(el)18 b(F.)f(Bart)n(let)n(t.)32 b(Compact)o(in)o(g)16
6547 b(garbage)i(collect)o(ion)f(wit)n(h)h(am)n(biguous)e(ro)q(ot)o(s.)31
6548 b(T)m(ec)o(hnical)17 b(Rep)q(ort)h(88/2,)201 1067 y(DEC)c(W)m(e)q(st)o
6549 (er)q(n)g(Re)q(s)q(earc)o(h)i(La)o(b)q(ora)o(t)o(ory)m(,)d(P)o(alo)g
6550 (Al)o(t)o(o,)h(Califor)q(nia,)c(F)m(e)o(brarry)15 b(1988.)0
6551 1147 y([Bar89])69 b(Jo)q(el)11 b(F.)f(Bart)n(let)n(t.)15
6552 b(Most)n(ly-co)o(p)o(yin)o(g)c(collect)o(ion)f(pic)o(ks)h(up)g(gen)o
6553 (era)o(t)o(ions)g(an)o(d)g(C++.)i(T)m(ec)o(hnical)e(Rep)q(ort)g(TN-12,)
6554 201 1197 y(DEC)j(W)m(e)q(st)o(er)q(n)g(Re)q(s)q(earc)o(h)i(La)o(b)q
6555 (ora)o(t)o(ory)m(,)d(P)o(alo)g(Al)o(t)o(o,)h(Califor)q(nia,)c(Oct)o(ob)
6556 q(er)16 b(1989.)0 1278 y([Bo)q(e93])66 b(Hans-Juergen)12
6557 b(Bo)q(e)o(hm.)g(Space)f(e\016cien)o(t)g(cons)q(erv)n(a)o(t)o(iv)o(e)g
6558 (garbage)g(collect)o(ion.)g Fo(A)o(CM)h(SIGPLAN)g(PLDI)p
6559 Fw(,)e(page)q(s)201 1328 y(197{206,)i(1993.)0 1408 y([CFH)100
6560 1393 y Fn(+)127 1408 y Fw(91])20 b(J.)12 b(Cai,)g(P)m(.)g(F)m(acon,)g
6561 (F.)g(Hen)o(gle)q(in,)g(R.)g(P)o(aige,)g(an)o(d)g(E.)g(Sc)o(h)o(on)n(b)
6562 q(erg.)k(T)o(yp)q(e)c(transof)q(rm)o(a)o(t)o(ion)e(an)o(d)j(d)o(a)o(t)o
6563 (a)f(stru)o(ct)o(ure)201 1458 y(c)o(h)o(oice.)18 b Fo(In)e(B.)e(Mo)n
6564 (el)r(ler,)g(e)n(ditor,)g(Constructing)h(Pr)n(o)n(gr)n(ams)f(F)m(r)n
6565 (om)g(Sp)n(e)n(ci\014c)n(ations)p Fw(,)h(page)q(s)f(126{164,)e(1991.)0
6566 1539 y([ED93])75 b(J.R.)12 b(Elli)q(s)f(an)o(d)i(D.L.)e(Det)n(lefs.)17
6567 b(Safe,)c(e\016cien)o(t)g(garbage)f(collect)o(ion)g(for)h(C++.)j(T)m
6568 (ec)o(hnical)c(Rep)q(ort)i(CSL-93-4,)201 1589 y(Xero)o(x)g(P)o(arc,)g
6569 (1993.)0 1669 y([HMM86])28 b(Rob)q(ert)11 b(Harp)q(er,)h(Da)o(vid)d
6570 (MacQueen,)k(an)o(d)e(Robin)f(Miln)o(er.)j(St)o(an)o(d)o(ard)e(ML.)i
6571 (Rep)q(ort)f(ECS-LF)o(CS-86-2,)e(La)o(b)q(o-)201 1719
6572 y(ra)o(t)o(ory)j(for)e(F)m(ou)o(n)o(d)o(a)o(t)o(ions)h(of)f(Compu)o(t)o
6573 (er)h(Science,)h(Compu)o(t)o(er)f(Science)h(Depart)o(m)o(en)o(t,)e
6574 (Edin)n(burgh)h(Univ)o(ers)q(it)o(y)m(,)201 1769 y(1986.)0
6575 1850 y([Le)q(s75])74 b(M.)17 b(E.)h(Le)q(sk.)29 b(LEX:)18
6576 b(a)f(lexical)g(an)o(alyzer)h(gen)o(era)o(t)o(or.)30
6577 b(T)m(ec)o(hnical)17 b(Rep)q(ort)h(39,)f(A)m(T&T)h(Bell)f(La)o(b)q(ora)
6578 o(t)o(or)q(ie)q(s,)201 1899 y(Murray)d(Hill,)e(N.J.,)h(1975.)0
6579 1980 y([P)o(ai89])75 b(R.)17 b(P)o(aige.)29 b(Real-t)o(im)o(e)16
6580 b(s)q(im)n(ula)o(t)o(ion)f(of)i(a)g(s)q(et)i(m)o(ac)o(hin)o(e)d(on)i(a)
6581 f(RAM.)30 b Fo(In)18 b(N.)h(Janicki)f(and)h(W.)g(Ko)n(czko)n(daj,)201
6582 2030 y(e)n(ditor,)14 b(Computing)h(and)h(Information)p
6583 Fw(,)d(I)q(I:69{73,)f(May)i(1989.)0 2111 y([P)o(ax90])65
6584 b(V.)15 b(P)o(axson.)22 b(Us)q(in)o(g)15 b(\015ex)g(|)g(a)g(f)q(ast)g
6585 (lexical)f(an)o(alyzer.)22 b(T)m(ec)o(hnical)15 b(rep)q(ort,)h(Th)o(e)f
6586 (Regen)o(t)o(s)i(of)d(t)n(h)o(e)i(Univ)o(ers)q(it)o(y)201
6587 2160 y(of)d(Califor)q(nia,)e(May)j(1990.)0 2241 y([San94])68
6588 b(Georg)17 b(San)o(d)o(er.)30 b(Graph)17 b(lay)o(ou)o(t)g(t)n(hrough)h
6589 (t)n(h)o(e)g(V)o(CG)f(t)o(o)q(ol.)28 b(T)m(ec)o(hnical)17
6590 b(Rep)q(ort)g(A03/94,)g(Univ)o(ers)q(it\177)-21 b(at)18
6591 b(d)o(e)q(s)201 2291 y(Saarlan)o(d)o(e)q(s,)c(Oct)o(ob)q(er)h(1994.)0
6592 2371 y([San95])68 b(Georg)14 b(San)o(d)o(er.)19 b Fo(V)o(CG:)14
6593 b(Visualization)g(of)h(Compiler)f(Gr)n(aphs)h(\(v.1.30\))p
6594 Fw(,)f(1995.)0 2452 y([SDDS86])25 b(J.)14 b(Sc)o(h)o(w)o(artz,)h(R.)f
6595 (Dew)o(ar,)g(D.)g(Du)n(binsky)m(,)f(an)o(d)h(E.)g(Sc)o(h)o(on)n(b)q
6596 (erg.)21 b Fo(Pr)n(o)n(gr)n(amming)14 b(with)h(Sets:)20
6597 b(A)o(n)c(Intr)n(o)n(duction)201 2502 y(to)f(SETL)p Fw(.)j(Spr)q(in)o
6598 (ger-V)m(erlag,)c(1986.)0 2583 y([Str91])80 b(Bjar)q(n)o(e)14
6599 b(Stroustrup.)19 b Fo(The)c(C++)f(Pr)n(o)n(gr)n(amming)h(L)n(anguage.)g
6600 (Se)n(c)n(ond)h(Edition)p Fw(.)i(Addi)q(son-W)m(els)q(ey)m(,)12
6601 b(1991.)p eop
6602 %%Page: 72 73
6603 72 72 bop 0 108 a Fv(In)n(d)o(ex)0 190 y Fs(PROP)p 91
6604 190 14 2 v 15 w(EXPLICIT)p 282 190 V 14 w(TEMPLATE)p
6605 472 190 V 14 w(INSTANTIATION)p Fw(,)11 b(25)0 282 y(Class)q(e)q(s)83
6606 331 y Fs(BGC)p Fw(,)i(64,)g(68)83 381 y Fs(CGC)p Fw(,)g(64)83
6607 431 y Fs(GCHeapManager)p Fw(,)e(64)83 481 y Fs(GCObject)p
6608 Fw(,)h(64,)h(66)83 531 y Fs(GCRewriteCache)p Fw(,)d(44)83
6609 580 y Fs(GCVerifier)p Fw(,)h(66)83 630 y Fs(GCVerify)p
6610 Fw(,)h(70)83 680 y Fs(GC)p Fw(,)h(64{66,)f(68,)h(70)83
6611 730 y Fs(IOLexerBuffer)p Fw(,)e(12)83 780 y Fs(IOLexerStack)p
6612 Fw(,)g(12)83 830 y Fs(LexerBuffer)p Fw(,)g(11)83 879
6613 y Fs(MarkSweepGC)p Fw(,)g(64)83 929 y Fs(Mem)p Fw(,)i(64)83
6614 979 y Fs(RewriteCache)p Fw(,)e(44)83 1029 y Fs(WeakPointerManager)o
6615 Fw(,)g(64)83 1079 y Fs(WeakPointer)p Fw(,)g(70)0 1128
6616 y(Comm)o(an)o(d)g(lin)o(e)i(o)o(pt)o(ions)83 1178 y Fs(-G)21
6617 b(-GNU)p Fw(,)13 b(56)83 1228 y Fs(-I)p Fc(path)p Fw(,)f(56)83
6618 1278 y Fs(-M)21 b(-make)p 261 1278 V 15 w(depends)p Fw(,)12
6619 b(56)83 1328 y Fs(-N)21 b(-non)p 239 1328 V 15 w(linear)p
6620 Fw(,)12 b(56)83 1377 y Fs(-Oadaptive)p 306 1377 V 14
6621 w(matching)p Fw(,)f(56)83 1427 y Fs(-Ofast)p 218 1427
6622 V 14 w(string)p 364 1427 V 15 w(match)p Fw(,)h(56)83
6623 1477 y Fs(-Oinline)p 262 1477 V 14 w(casts)p Fw(,)g(56)83
6624 1527 y Fs(-Orewriting)p Fw(,)f(47,)i(56)83 1577 y Fs(-Otagged)p
6625 262 1577 V 14 w(pointer)p Fw(,)f(56)83 1627 y Fs(-S)21
6626 b(-save)p 261 1627 V 15 w(space)p Fw(,)12 b(57)83 1676
6627 y Fs(-fno-implicit-temp)o(late)o(s)p Fw(,)f(25)83 1726
6628 y Fs(-l)21 b(-no)p 217 1726 V 15 w(line)p 320 1726 V
6629 15 w(directives)p Fw(,)12 b(56)83 1776 y Fs(-memory)p
6630 240 1776 V 14 w(usage)p Fw(,)h(56)83 1826 y Fs(-n)21
6631 b(-no)p 217 1826 V 15 w(codegen)p Fw(,)12 b(56)83 1876
6632 y Fs(-o)p Fc(outfile)p Fw(,)g(56)83 1925 y Fs(-r)21 b(-report)p
6633 Fw(,)12 b(56)83 1975 y Fs(-r)p Fw(,)h(16)83 2025 y Fs(-s)21
6634 b(-strict)p Fw(,)12 b(56)83 2075 y Fs(-save)p 196 2075
6635 V 15 w(space)p Fw(,)g(25)83 2125 y Fs(-t)21 b(-stdout)p
6636 Fw(,)12 b(57)83 2175 y Fs(-use)p 174 2175 V 15 w(global)p
6637 321 2175 V 14 w(pool)p Fw(,)h(57)83 2224 y Fs(-v)p Fc(num)p
6638 Fw(,)f(57)83 2274 y Fs(-v)p Fw(,)h(16)0 2365 y(graph)h(t)o(yp)q(e,)f
6639 (54)0 2457 y(st)o(a)o(t)o(e)h(cac)o(hin)o(g,)g(42)0 2507
6640 y(Syn)o(t)o(ax)83 2556 y(K)o(eyw)o(ords)125 2606 y Fs($)o
6641 Ft(n)p Fw(,)g(16)1187 190 y Fs($$)p Fw(,)f(16)1187 240
6642 y Fs(applicative)p Fw(,)e(37)1187 290 y Fs(before:)p
6643 Fw(,)h(38)1187 340 y Fs(bottomup:)p Fw(,)g(38)1187 390
6644 y Fs(classof)p Fw(,)g(28,)h(70)1187 439 y Fs(collectable)p
6645 Fw(,)e(23,)i(29)1187 489 y Fs(cutrewrite)p Fw(,)e(45)1187
6646 539 y Fs(datatype)20 b(view)p Fw(,)13 b(49)1187 589 y
6647 Fs(datatype)p Fw(,)f(9,)h(23)1187 639 y Fs(edge:)p Fw(,)g(54)1187
6648 688 y Fs(expect:)p Fw(,)f(14)1187 738 y Fs(extern)p Fw(,)g(23,)h(25,)g
6649 (42)1187 788 y Fs(failrewrite)p Fw(,)e(46)1187 838 y
6650 Fs(graphtype)p Fw(,)h(54)1187 888 y Fs(index:)p Fw(,)g(42)1187
6651 937 y Fs(inline)p Fw(,)g(23,)h(25)1187 987 y Fs(instantiate)20
6652 b(datatype)p Fw(,)11 b(25,)i(30,)g(57)1187 1037 y Fs(instantiate)p
6653 Fw(,)e(25)1187 1087 y Fs(law)p Fw(,)i(23)1187 1137 y
6654 Fs(left:)p Fw(,)g(14)1187 1187 y Fs(lexeme)21 b(class)p
6655 Fw(,)12 b(8,)h(9)1187 1236 y Fs(lexeme)p Fw(,)f(8,)h(9,)h(23)1187
6656 1286 y Fs(matchall)p Fw(,)e(25)1187 1336 y Fs(matchscan*)p
6657 Fw(,)f(10)1187 1386 y Fs(matchscan)p Fw(,)h(10)1187 1436
6658 y Fs(match)p Fw(,)h(25,)f(50)1187 1485 y Fs(node:)p Fw(,)h(54)1187
6659 1535 y Fs(persistent)p Fw(,)e(23,)i(30)1187 1585 y Fs(postorder:)p
6660 Fw(,)e(38)1187 1635 y Fs(preorder:)p Fw(,)h(38)1187 1685
6661 y Fs(refine)21 b(persistent)p Fw(,)11 b(30)1187 1734
6662 y Fs(refine)p Fw(,)h(28)1187 1784 y Fs(relation)p Fw(,)g(32)1187
6663 1834 y Fs(rewrite)21 b(class)p Fw(,)12 b(37)1187 1884
6664 y Fs(rewrite)p Fw(,)g(23,)h(37,)g(41,)g(42)1187 1934
6665 y Fs(right:)p Fw(,)f(14)1187 1984 y Fs(syntax)21 b(class)p
6666 Fw(,)12 b(13)1187 2033 y Fs(syntax)p Fw(,)g(14)1187 2083
6667 y Fs(this)p Fw(,)h(50)1187 2133 y Fs(topdown:)p Fw(,)f(38)1187
6668 2183 y Fs(topdown)p Fw(,)g(37)1187 2233 y Fs(treeparser)p
6669 Fw(,)f(37)1187 2282 y Fs(type)p Fw(,)i(41)1187 2332 y
6670 Fs(view)p Fw(,)g(50,)g(53)1187 2382 y Fs(where)21 b(type)p
6671 Fw(,)12 b(23)1187 2432 y Fs(while)p Fw(,)h(26)1187 2482
6672 y Fs(with)p Fw(,)g(27)1146 2531 y(Non{t)o(ermin)o(als)1187
6673 2581 y Fo(Char)p Fw(,)g(5)969 2753 y(72)p eop
6674 %%Page: 73 74
6675 73 73 bop 0 -82 1981 3 v 0 -100 a Fq(A.)15 b Fp(Garba)o(ge)j
6676 (Collection)j(in)e(the)g Fb(Pro)o(p)f Fp(Librar)m(y)857
6677 b Fw(73)125 45 y Fo(Cons)p 219 45 13 2 v 15 w(Sp)n(e)n(cs)p
6678 Fw(,)14 b(23)125 95 y Fo(Cons)p 219 95 V 15 w(Sp)n(e)n(c)p
6679 Fw(,)g(23)125 145 y Fo(Context)p 268 145 V 15 w(Sp)n(e)n(c)p
6680 Fw(,)g(10)125 195 y Fo(Cost)p Fw(,)f(25)125 244 y Fo(Datatyp)n(e)p
6681 287 244 V 16 w(De)n(cl)p Fw(,)g(23)125 294 y Fo(Datatyp)n(e)p
6682 287 294 V 16 w(Quali\014ers)p Fw(,)f(23)125 344 y Fo(Datatyp)n(e)p
6683 287 344 V 16 w(Quali\014er)p Fw(,)g(23)125 394 y Fo(Datatyp)n(e)p
6684 287 394 V 16 w(Sp)n(e)n(c)p Fw(,)h(23,)g(53)125 444 y
6685 Fo(Datatyp)n(e)p 287 444 V 16 w(View)p 394 444 V 14 w(Sp)n(e)n(c)p
6686 Fw(,)h(53)125 493 y Fo(Edge)p 215 493 V 15 w(Def)p Fw(,)g(54)125
6687 543 y Fo(Exp)n(e)n(ct)p 244 543 V 15 w(De)n(cl)p Fw(,)g(14)125
6688 593 y Fo(Gr)n(aph)p 239 593 V 15 w(Mo)n(de)p Fw(,)g(54)125
6689 643 y Fo(Gr)n(aph)p 239 643 V 15 w(T)m(yp)n(e)p Fw(,)f(54)125
6690 693 y Fo(Guar)n(d)p Fw(,)g(25)125 742 y Fo(Id)p Fw(,)g(5)125
6691 792 y Fo(Index)p 226 792 V 16 w(De)n(cl)p Fw(,)g(42)125
6692 842 y Fo(Index)p 226 842 V 16 w(Sp)n(e)n(c)p Fw(,)h(42)125
6693 892 y Fo(Instantiate)p 323 892 V 15 w(De)n(cl)p Fw(,)f(25)125
6694 942 y Fo(Inte)n(ger)p Fw(,)g(5)125 992 y Fo(L)n(ab)p
6695 192 992 V 15 w(Pat)p Fw(,)h(27)125 1041 y Fo(L)n(ab)p
6696 192 1041 V 15 w(T)m(yp)n(e)p 292 1041 V 15 w(Exp)p Fw(,)g(24)125
6697 1091 y Fo(L)n(aw)p 201 1091 V 15 w(A)o(r)n(g)p Fw(,)e(24)125
6698 1141 y Fo(L)n(aw)p 201 1141 V 15 w(Sp)n(e)n(c)p Fw(,)h(24)125
6699 1191 y Fo(L)n(exeme)p 262 1191 V 15 w(Class)p 373 1191
6700 V 15 w(De)n(cl)p Fw(,)g(8)125 1241 y Fo(L)n(exeme)p 262
6701 1241 V 15 w(Class)p 373 1241 V 15 w(Eq)p Fw(,)h(8)125
6702 1290 y Fo(L)n(exeme)p 262 1290 V 15 w(De)n(cl)p Fw(,)g(8)125
6703 1340 y Fo(L)n(exeme)p 262 1340 V 15 w(Eq)p Fw(,)g(8)125
6704 1390 y Fo(L)n(exeme)p 262 1390 V 15 w(Sp)n(e)n(c)p Fw(,)g(8)125
6705 1440 y Fo(Match)p 240 1440 V 15 w(A)n(ction)p Fw(,)g(25)125
6706 1490 y Fo(Match)p 240 1490 V 15 w(Mo)n(de)p Fw(,)g(25)125
6707 1539 y Fo(Match)p 240 1539 V 15 w(R)o(ule)p Fw(,)g(25)125
6708 1589 y Fo(Matchsc)n(an)p 318 1589 V 16 w(A)n(ction)p
6709 Fw(,)f(10)125 1639 y Fo(Matchsc)n(an)p 318 1639 V 16
6710 w(Mo)n(de)p Fw(,)h(10)125 1689 y Fo(Matchsc)n(an)p 318
6711 1689 V 16 w(R)o(ule)p Fw(,)f(10)125 1739 y Fo(Matchsc)n(an)p
6712 Fw(,)h(10)125 1789 y Fo(Match)p Fw(,)f(25)125 1838 y
6713 Fo(No)n(de)p 218 1838 V 15 w(Def)p Fw(,)h(54)125 1888
6714 y Fo(One)p 202 1888 V 15 w(A)o(lt)p Fw(,)f(15)125 1938
6715 y Fo(Op)n(er)n(ator)p Fw(,)f(14)125 1988 y Fo(PatA)o(r)n(g)p
6716 Fw(,)g(27)125 2038 y Fo(Pat)p 191 2038 V 15 w(V)m(ar)p
6717 Fw(,)h(27)125 2087 y Fo(Pat)p Fw(,)g(27)125 2137 y Fo(Plac)n(ement)p
6718 314 2137 V 15 w(Cons)p Fw(,)h(29)125 2187 y Fo(Pr)n(e)n(c)n(e)n(denc)n
6719 (e)p 322 2187 V 15 w(De)n(cl)p Fw(,)f(14)125 2237 y Fo(Pr)n(o)n
6720 (duction)p 324 2237 V 15 w(R)o(ule)p Fw(,)h(15)125 2287
6721 y Fo(Quark)p Fw(,)f(5)125 2337 y Fo(R)n(e)n(al)p Fw(,)g(5)125
6722 2386 y Fo(R)n(e\014ne)p 240 2386 V 16 w(De)n(cl)p Fw(,)g(29)125
6723 2436 y Fo(R)n(e\014ne)p 240 2436 V 16 w(Sp)n(e)n(c)p
6724 Fw(,)h(29)125 2486 y Fo(R)n(ewrite)p 267 2486 V 14 w(A)n(ction)p
6725 Fw(,)f(37)125 2536 y Fo(R)n(ewrite)p 267 2536 V 14 w(Class)p
6726 377 2536 V 15 w(De)n(cl)p Fw(,)g(37)125 2586 y Fo(R)n(ewrite)p
6727 267 2586 V 14 w(De)n(cl)p Fw(,)g(37)1187 45 y Fo(R)n(ewrite)p
6728 1329 45 V 14 w(Mo)n(de)p Fw(,)h(37)1187 95 y Fo(R)n(ewrite)p
6729 1329 95 V 14 w(Mo)n(di\014er)p Fw(,)g(37)1187 145 y Fo(R)n(ewrite)p
6730 1329 145 V 14 w(R)o(ule)p Fw(,)g(37)1187 195 y Fo(R)n(ewrite)p
6731 1329 195 V 14 w(Stmt)p Fw(,)g(41)1187 244 y Fo(R)o(unning)p
6732 1342 244 V 17 w(Pr)n(op)p Fw(,)f(56)1187 294 y Fo(Simple)p
6733 1311 294 V 15 w(Cons)p 1417 294 V 16 w(Sp)n(e)n(c)p Fw(,)h(23)1187
6734 344 y Fo(Stmt)p Fw(,)f(5)1187 394 y Fo(String)p Fw(,)g(5)1187
6735 444 y Fo(Symb)n(ol)p Fw(,)h(15)1187 493 y Fo(Syntax)p
6736 1310 493 V 17 w(Class)p 1423 493 V 14 w(De)n(cl)p Fw(,)g(13)1187
6737 543 y Fo(Syntax)p 1310 543 V 17 w(De)n(cl)p Fw(,)f(14)1187
6738 593 y Fo(T)m(oken)p 1299 593 V 16 w(Sp)n(e)n(c)p Fw(,)h(9)1187
6739 643 y Fo(T)m(okens)p 1316 643 V 16 w(De)n(cl)p Fw(,)f(9)1187
6740 693 y Fo(T)m(yp)n(e)p 1275 693 V 15 w(Exp)p Fw(,)h(24)1187
6741 742 y Fo(T)m(yp)n(e)p 1275 742 V 15 w(Quali\014er)p Fw(,)f(24)1187
6742 792 y Fo(T)m(yp)n(e)p 1275 792 V 15 w(Sp)n(e)n(c)p Fw(,)h(24,)f(25)1187
6743 842 y Fo(View)p 1281 842 V 15 w(Cons)p 1387 842 V 15
6744 w(Sp)n(e)n(cs)p Fw(,)h(53)p eop
6745 %%Trailer
6747 userdict /end-hook known{end-hook}if
6748 %%EOF