A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://reports-archive.adm.cs.cmu.edu/anon/1999/CMU-CS-99-156.ps below:

%!PS-Adobe-2.0 %%Creator: dvipsk 5.58f Copyright 1986, 1994 Radical Eye Software %%Title: tr.dvi %%Pages: 22 %%PageOrder: Ascend %%BoundingBox: 0 0 612 792 %%EndComments %DVIPSCommandLine: dvips tr.dvi -f %DVIPSParameters: dpi=300, compressed, comments removed %DVIPSSource: TeX output 1999.07.11:0910 %%BeginProcSet: texc.pro /TeXDict 250 dict def TeXDict begin /N{def}def /B{bind def}N /S{exch}N /X{S N}B /TR{translate}N /isls false N /vsize 11 72 mul N /hsize 8.5 72 mul N /landplus90{false}def /@rigin{isls{[0 landplus90{1 -1}{-1 1} ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR matrix currentmatrix dup dup 4 get round 4 exch put dup dup 5 get round 5 exch put setmatrix}N /@landscape{/isls true N}B /@manualfeed{ statusdict /manualfeed true put}B /@copies{/#copies X}B /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{/nn 8 dict N nn begin /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N string /base X array /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N end dup{/foo setfont}2 array copy cvx N load 0 nn put /ctr 0 N[}B /df{/sf 1 N /fntrx FMat N df-tail}B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0]N df-tail}B /E{ pop nn dup definefont setfont}B /ch-width{ch-data dup length 5 sub get} B /ch-height{ch-data dup length 4 sub get}B /ch-xoff{128 ch-data dup length 3 sub get sub}B /ch-yoff{ch-data dup length 2 sub get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B /ch-image{ch-data dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0 N /rw 0 N /rc 0 N /gp 0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S dup /base get 2 index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx 0 ch-xoff ch-yoff ch-height sub ch-xoff ch-width add ch-yoff setcachedevice ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff .1 add]/id ch-image N /rw ch-width 7 add 8 idiv string N /rc 0 N /gp 0 N /cp 0 N{ rc 0 ne{rc 1 sub /rc X rw}{G}ifelse}imagemask restore}B /G{{id gp get /gp gp 1 add N dup 18 mod S 18 idiv pl S get exec}loop}B /adv{cp add /cp X}B /chg{rw cp id gp 4 index getinterval putinterval dup gp add /gp X adv}B /nd{/cp 0 N rw exit}B /lsh{rw cp 2 copy get dup 0 eq{pop 1}{dup 255 eq{pop 254}{dup dup add 255 and S 1 and or}ifelse}ifelse put 1 adv} B /rsh{rw cp 2 copy get dup 0 eq{pop 128}{dup 255 eq{pop 127}{dup 2 idiv S 128 and or}ifelse}ifelse put 1 adv}B /clr{rw cp 2 index string putinterval adv}B /set{rw cp fillstr 0 4 index getinterval putinterval adv}B /fillstr 18 string 0 1 17{2 copy 255 put pop}for N /pl[{adv 1 chg} {adv 1 chg nd}{1 add chg}{1 add chg nd}{adv lsh}{adv lsh nd}{adv rsh}{ adv rsh nd}{1 add adv}{/rc X nd}{1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]dup{bind pop}forall N /D{/cc X dup type /stringtype ne{] }if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup length 1 sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{ cc 1 add D}B /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin 0 0 moveto /V matrix currentmatrix dup 1 get dup mul exch 0 get dup mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N /eop{SI restore showpage userdict /eop-hook known{eop-hook}if}N /@start{userdict /start-hook known{start-hook}if pop /VResolution X /Resolution X 1000 div /DVImag X /IE 256 array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for 65781.76 div /vsize X 65781.76 div /hsize X}N /p{show}N /RMat[1 0 0 -1 0 0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X /rulex X V}B /V {}B /RV statusdict begin /product where{pop product dup length 7 ge{0 7 getinterval dup(Display)eq exch 0 4 getinterval(NeXT)eq or}{pop false} ifelse}{false}ifelse end{{gsave TR -.1 -.1 TR 1 1 scale rulex ruley false RMat{BDot}imagemask grestore}}{{gsave TR -.1 -.1 TR rulex ruley scale 1 1 false RMat{BDot}imagemask grestore}}ifelse B /QV{gsave transform round exch round exch itransform moveto rulex 0 rlineto 0 ruley neg rlineto rulex neg 0 rlineto fill grestore}B /a{moveto}B /delta 0 N /tail{dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{S p tail} B /c{-4 M}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{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{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 a}B /bos{/SS save N}B /eos{SS restore}B end %%EndProcSet %%BeginProcSet: special.pro TeXDict begin /SDict 200 dict N SDict begin /@SpecialDefaults{/hs 612 N /vs 792 N /ho 0 N /vo 0 N /hsc 1 N /vsc 1 N /ang 0 N /CLIP 0 N /rwiSeen false N /rhiSeen false N /letter{}N /note{}N /a4{}N /legal{}N}B /@scaleunit 100 N /@hscale{@scaleunit div /hsc X}B /@vscale{@scaleunit div /vsc X}B /@hsize{/hs X /CLIP 1 N}B /@vsize{/vs X /CLIP 1 N}B /@clip{ /CLIP 2 N}B /@hoffset{/ho X}B /@voffset{/vo X}B /@angle{/ang X}B /@rwi{ 10 div /rwi X /rwiSeen true N}B /@rhi{10 div /rhi X /rhiSeen true N}B /@llx{/llx X}B /@lly{/lly X}B /@urx{/urx X}B /@ury{/ury X}B /magscale true def end /@MacSetUp{userdict /md known{userdict /md get type /dicttype eq{userdict begin md length 10 add md maxlength ge{/md md dup length 20 add dict copy def}if end md begin /letter{}N /note{}N /legal{} N /od{txpose 1 0 mtx defaultmatrix dtransform S atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{itransform lineto} }{6 -2 roll transform 6 -2 roll transform 6 -2 roll transform{ itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll curveto}}{{ closepath}}pathforall newpath counttomark array astore /gc xdf pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}if}N /txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 -1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop 90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr 1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr 2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 -1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S TR}if}N /cp {pop pop showpage pm restore}N end}if}if}N /normalscale{Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale}if 0 setgray} N /psfts{S 65781.76 div N}N /startTexFig{/psf$SavedState save N userdict maxlength dict begin /magscale true def normalscale currentpoint TR /psf$ury psfts /psf$urx psfts /psf$lly psfts /psf$llx psfts /psf$y psfts /psf$x psfts currentpoint /psf$cy X /psf$cx X /psf$sx psf$x psf$urx psf$llx sub div N /psf$sy psf$y psf$ury psf$lly sub div N psf$sx psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub TR /setpagedevice{pop}N statusdict begin /letter{}N /lettertray{}N /legal{} N /legaltray{}N /a4{}N /a4tray{}N /b4{}N /b4tray{}N /b5{}N /b5tray{}N /showpage{}N /erasepage{}N /copypage{}N end /letter{}N /lettertray{}N /legal{}N /legaltray{}N /a4{}N /a4tray{}N /b4{}N /b4tray{}N /b5{}N /b5tray{}N /showpage{}N /erasepage{}N /copypage{}N /p 3 def @MacSetUp}N /doclip{psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath moveto}N /endTexFig{end psf$SavedState restore}N /@beginspecial{ SDict begin /SpecialSave save N gsave normalscale currentpoint TR @SpecialDefaults count /ocount X /dcount countdictstack N}N /@setspecial {CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR }{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury lineto closepath clip}if /setpagedevice{pop}N statusdict begin /letter{} N /lettertray{}N /legal{}N /legaltray{}N /a4{}N /a4tray{}N /b4{}N /b4tray{}N /b5{}N /b5tray{}N /showpage{}N /erasepage{}N /copypage{}N end /letter{}N /lettertray{}N /legal{}N /legaltray{}N /a4{}N /a4tray{}N /b4{ }N /b4tray{}N /b5{}N /b5tray{}N /showpage{}N /erasepage{}N /copypage{}N newpath}N /@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end}repeat grestore SpecialSave restore end}N /@defspecial{SDict begin}N /@fedspecial{end}B /li{lineto}B /rl{rlineto}B /rc{rcurveto}B /np {/SaveX currentpoint /SaveY X N 1 setlinecap newpath}N /st{stroke SaveX SaveY moveto}N /fil{fill SaveX SaveY moveto}N /ellipse{/endangle X /startangle X /yrad X /xrad X /savematrix matrix currentmatrix N TR xrad yrad scale 0 0 1 startangle endangle arc savematrix setmatrix}N end %%EndProcSet TeXDict begin 40258431 52099146 1000 300 300 (tr.dvi) @start /Fa 14 121 df<1310132013401380EA01005A12061204120C12081218121012 30A212201260A3124012C0AA1240A27EA27E0C227B980F>40 D<13801340A21320A21330 AA13201360A3134013C0A21380120113005A120212065A12085A5A5A5A0C227F980F>I< 1230127812F0126005047D830B>46 D 97 D 101 D<123E120CA41218A41230A41260A4 12C012C8A312D0126007177D9609>108 D 111 D I 114 D I<1206A25AA4EA FF80EA1800A35AA45A1261A212621264123809147D930C>I I I 120 D E /Fb 4 53 df<1218127812981218AC12FF08107D8F0F>49 D<121FEA6180EA40C0EA 806012C01200A213C0EA0180EA030012065AEA10201220EA7FC012FF0B107F8F0F>I<12 1FEA2180EA60C0A212001380EA0100121FEA00801340136012C0A2EA8040EA6080EA1F00 0B107F8F0F>I I E /Fc 37 122 df 12 D<1238127C12FEA3127C123807077C8610>46 D<13181378EA01F812FFA21201B3A7387F FFE0A213207C9F1C>49 D I<13FE3807FFC0380F07E0381E 03F0123FEB81F8A3EA1F0314F0120014E0EB07C0EB1F803801FE007F380007C0EB01F014 F8EB00FCA2003C13FE127EB4FCA314FCEA7E01007813F8381E07F0380FFFC03801FE0017 207E9F1C>I<14E013011303A21307130F131FA21337137713E7EA01C71387EA03071207 120E120C12181238127012E0B6FCA2380007E0A790B5FCA218207E9F1C>I<0030132038 3E01E0383FFFC0148014005B13F8EA33C00030C7FCA4EA31FCEA37FF383E0FC0383807E0 EA3003000013F0A214F8A21238127C12FEA200FC13F0A2387007E0003013C0383C1F8038 0FFF00EA03F815207D9F1C>I I<1470A214 F8A3497EA2497EA3EB067FA2010C7F143FA2496C7EA201307F140F01707FEB6007A201C0 7F90B5FC4880EB8001A2D803007F14004880000680A23AFFE007FFF8A225227EA12A>65 D 67 D I I 73 D 78 D<3801FE023807FF8638 1F01FE383C007E007C131E0078130EA200F81306A27E1400B4FC13E06CB4FC14C06C13F0 6C13F86C13FC000313FEEA003F1303EB007F143FA200C0131FA36C131EA26C133C12FCB4 13F838C7FFE00080138018227DA11F>83 D<007FB61280A2397E03F80F00781407007014 030060140100E015C0A200C01400A400001500B3A248B512F0A222227EA127>I 97 D I I I<13FE3807FF80380F87C0381E01E0003E13 F0EA7C0014F812FCA2B5FCA200FCC7FCA3127CA2127E003E13186C1330380FC0703803FF C0C6130015167E951A>I I<3801FE0F3907FFBF80380F87C7381F03E739 1E01E000003E7FA5001E5BEA1F03380F87C0EBFF80D809FEC7FC0018C8FCA2121C381FFF E06C13F86C13FE001F7F383C003F48EB0F80481307A40078EB0F006C131E001F137C6CB4 5A000113C019217F951C>I I<121C123E127FA3123E121CC7FCA7B4FCA2121FB2EAFF E0A20B247EA310>I 107 D I<38FF07E0EB1FF8381F307CEB403CEB803E A21300AE39FFE1FFC0A21A167E951F>110 D<13FE3807FFC0380F83E0381E00F0003E13 F848137CA300FC137EA7007C137CA26C13F8381F01F0380F83E03807FFC03800FE001716 7E951C>I<38FF0FE0EB3FF8381FE07CEB803E497E1580A2EC0FC0A8EC1F80A29038803F 00EBC03EEBE0FCEB3FF8EB0FC090C8FCA8EAFFE0A21A207E951F>I 114 D I<487EA412 03A21207A2120F123FB5FCA2EA0F80ABEB8180A5EB8300EA07C3EA03FEEA00F811207F9F 16>I<38FF01FEA2381F003EAF147E14FE380F81BE3907FF3FC0EA01FC1A167E951F>I<39 FFE01FE0A2391F800700000F1306EBC00E0007130C13E000035BA26C6C5AA26C6C5AA2EB 7CC0A2137F6D5AA26DC7FCA2130EA21B167F951E>I<39FFE07FC0A2390F801C006C6C5A 6C6C5AEBF0606C6C5A3800F980137F6DC7FC7F80497E1337EB63E0EBC1F03801C0F84848 7E3807007E000E133E39FF80FFE0A21B167F951E>120 D<39FFE01FE0A2391F80070000 0F1306EBC00E0007130C13E000035BA26C6C5AA26C6C5AA2EB7CC0A2137F6D5AA26DC7FC A2130EA2130CA25B1278EAFC3813305BEA69C0EA7F80001FC8FC1B207F951E>I E /Fd 2 49 df 0 D<1204120EA2121CA31238A212301270A212 60A212C0A2070F7F8F0A>48 D E /Fe 17 117 df 26 D I I<13045BA45BA200 381340004C13C0EB2040128C12981218134000301380EB4100A2EA1882EA0C8CEA07F0EA 008048C7FCA41202121A7F9316>32 D 97 D<123C120C5AA45AEA3380EA3C60EA3020EA6030A4 EAC060A2EA40C0EA6080EA2300121E0C147F930F>I I 101 D 103 D<1206120712061200A41238124CA2128C1298 1218A212301232A21264A2123808147F930C>105 D<121E12065AA45A1338135C139CEA 3118EA36001238EA3F80EA61C0EA60C8A3EAC0D013600E147F9312>107 D 110 D I I 114 D<1207EA1880EA19C0EA3180EA3800121E7EEA0380124112E1EAC1001282 127C0A0D7E8C10>I<1204120CA35AEAFF80EA1800A25AA45A1261A21262126412380912 7F910D>I E /Ff 22 107 df 0 D<0040132000C01360006013C0 3830018038180300EA0C066C5A6C5AEA01B0EA00E0A2EA01B0EA0318EA060C487E487E38 300180386000C04813600040132013147A9320>2 D<1203A4EAC30CEAE31CEA7338EA1F E0EA0780A2EA1FE0EA7338EAE31CEAC30CEA0300A40E127D9215>I 15 D<90387FFF8048B5FCD80780C7FC000EC8FC12185AA25AA25AA71260A27EA27E120E6C7E 0001B512806C7E90C8FCA7007FB51280A219227D9920>18 D 20 D<12C012F0123C120FEA03C0EA00F0133C130FEB03C0EB00F0143C140FEC0380EC0F 00143C14F0EB03C0010FC7FC133C13F0EA03C0000FC8FC123C127012C0C9FCA7007FB5FC B6128019227D9920>I<15801401A2EC0300A314065C143814F0EB03C0017FC7FCEAFFFC 7F38003FC0EB01F0EB0038140C8080A2EC0180A314001500A7B61280A219227D9920>I< 153081A381A281811680ED00C0B712F8A2C912C0ED0380160015065DA25DA35D25167E94 2A>33 D<1403A26E7E8114001560007FB512F0B67EC8120E81ED01E0ED0078ED01E0ED03 80ED06005DB612F86C5CC812605D4A5AA24AC7FCA225187E952A>41 D 50 D<1460A214C0A2EB0180A3EB0300A213 06A25BA25BA35BA25BA25BA2485AA248C7FCA31206A25AA25AA25AA35AA25A124013287A 9D00>54 D<0040130400C0130C00601318A36C1330A36C1360A2381FFFE06C13C0EA0C00 A238060180A238030300A3EA0186A3EA00CCA31378A31330A2161E809C17>56 D I<0040130200C01306B20060 130CA26C1318001C1370380F01E03803FF803800FE00171A7E981C>91 D<13101338A2136CA313C6A2EA0183A238030180A2380600C0A3481360A2481330A24813 18A348130CA24813061402171A7E981C>94 D<00C0130214060060130CA26C1318A36C13 30A26C1360A26C13C0A338030180A238018300A2EA00C6A2136CA31338A21310171A7E98 1C>I<133C13E0EA01C013801203AD13005A121C12F0121C12077E1380AD120113C0EA00 E0133C0E297D9E15>102 D<12F0121C12077E1380AD120113C0EA00E0133C13E0EA01C0 13801203AD13005A121C12F00E297D9E15>I<134013C0EA0180A3EA0300A21206A35AA2 5AA35AA25AA35AA21260A37EA27EA37EA27EA37EA2EA0180A3EA00C013400A2A7D9E10> I<12C0A21260A37EA27EA37EA27EA37EA2EA0180A3EA00C0A2EA0180A3EA0300A21206A3 5AA25AA35AA25AA35AA20A2A7E9E10>I<12C0B3B3A502297B9E0C>I E /Fg 48 122 df<13F8EA030C380E0604EA1C07383803080030138800701390A200E013 A0A214C01480A3EA6007EB0B8838307190380F80E016127E911B>11 D I<131EEB7180EBC0C0EA01801203EB00E05AA2380E01C0A3 1480EA1C0314001306EA1E0CEA3A18EA39E00038C7FCA25AA45AA25A131B7F9115>26 D<3801FFF85A120F381E1E00EA180EEA38061270A2EAE00EA3130C131C13185BEA60606C 5A001FC7FC15127E9118>I<380FFFE05A5A3860C0001240485A12001201A348C7FCA35A A3120E120613127E9112>I<5B1302A45BA45BA2137E3801C980380710E0000C13600018 137000381330EA7020A200E01370A2134014E0A2386041C0EB838038308600EA1C9CEA07 E00001C7FCA41202A414257E9C19>30 D<14401480A4EB0100A41302A2001C1306002713 0EEA4704140600871302A2EA0E08A2001C1304A2EB1008A214101420EB2040000C138038 072300EA01FCEA0040A45BA417257E9C1B>32 D<126012F0A2126004047C830C>58 D<126012F0A212701210A41220A212401280040C7C830C>I I<130113031306A3130CA31318A31330A3 1360A213C0A3EA0180A3EA0300A31206A25AA35AA35AA35AA35AA210297E9E15>I<12E0 1278121EEA0780EA01E0EA0078131EEB0780EB01E0EB0078141EEC0780A2EC1E001478EB 01E0EB0780011EC7FC1378EA01E0EA0780001EC8FC127812E019187D9520>I<140CA214 1CA2143C145CA2149E148EEB010E1302A21304A213081310A2497EEB3FFFEB40071380A2 EA0100A212025AA2001C148039FF803FF01C1D7F9C1F>65 D<48B5FC39003C01C0903838 00E015F01570A25B15F0A2EC01E09038E003C0EC0780EC1F00EBFFFC3801C00FEC0780EC 03C0A2EA0380A439070007801500140E5C000E1378B512C01C1C7E9B1F>I<903801F808 90380E0618903838013890386000F048481370485A48C71230481420120E5A123C15005A A35AA45CA300701302A200305B00385B6C5B6C136038070180D800FEC7FC1D1E7E9C1E> I<3801FFC038003C001338A45BA45BA4485AA4485AA448C7FCA45AEAFFE0121C7E9B12> 73 D<3801FFE038003C001338A45BA45BA4485AA438038002A31404EA0700140C141814 38000E13F0B5FC171C7E9B1C>76 D I I I<48B5FC39003C03C090383800E015F01570A24913F0 A315E0EBE001EC03C0EC0700141E3801FFF001C0C7FCA3485AA448C8FCA45AEAFFE01C1C 7E9B1B>I<3801FFFE39003C03C090383800E015F01570A24913F0A3EC01E001E013C0EC 0780EC1E00EBFFF03801C038140C140EA2EA0380A43807001E1508A2151048130FD8FFE0 1320C7EA03C01D1D7E9B20>82 D I<001FB512F0391C03807039300700 300020142012601240130E1280A2000014005BA45BA45BA45BA41201EA7FFF1C1C7F9B18 >I<39FFC00FF0391C00038015001402A25C5C121E000E5B143014205CA25C49C7FC120F EA07025BA25BA25B5BEA03A013C05BA290C8FCA21C1D7D9B18>86 D 97 D<123F1207A2120EA45AA4EA39E0EA3A30EA3C1812381270131CA3EA E038A313301370136013C01261EA2300121E0E1D7E9C12>I I I I I I I I 107 D I< 39381F81F0394E20C618394640E81CEB80F0EA8F00008E13E0120EA2391C01C038A31570 3938038071A215E115E23970070064D83003133820127E9124>I I<13F8EA030CEA0E06487E1218123000701380A238E00700A3130EA25B EA60185BEA30E0EA0F8011127E9114>I<380787803809C8603808D03013E0EA11C01438 1201A238038070A31460380700E014C0EB0180EB8300EA0E86137890C7FCA25AA4123CB4 FC151A819115>I I I I<13C01201A3EA0380A4EAFFF0EA0700A3120EA45AA4EA3820A21340 A2EA1880EA0F000C1A80990F>I<001C13C0EA27011247A238870380A2120EA2381C0700 A438180E20A3EA1C1E380C26403807C38013127E9118>I<001CEBC080392701C1C01247 14C03987038040A2120EA2391C070080A3EC0100EA1806A2381C0E02EB0F04380E130838 03E1F01A127E911E>119 D<380787803808C8403810F0C03820F1E0EBE3C03840E18038 00E000A2485AA43863808012F3EB810012E5EA84C6EA787813127E9118>I<001C13C0EA 27011247A238870380A2120EA2381C0700A4EA180EA3EA1C1EEA0C3CEA07DCEA001C1318 EA6038EAF0305B485AEA4180003EC7FC121A7E9114>I E /Fh 66 123 df<14FE90380301801306EB0C03EB1C0191C7FC13181338A43803FFFE3800700EA3 5CA213E0A25CA3EA01C01472A438038034141891C7FC90C8FCA25A12C612E65A12781925 819C17>12 D<1218123CA31204A21208A21210122012401280060C779C0D>39 D<13031306130813181330136013C0A2EA0180EA0300A21206A25AA2121C1218A2123812 30A21270A21260A412E0A51260A51220123012107EA2102A7B9E11>I<1310A21308130C 13041306A51307A51306A4130EA2130CA2131C1318A213381330A21360A213C0A2EA0180 EA0300A212065A5A121012605A102A809E11>I<5B5BA41306A45BA3B6FCA238001800A3 5BA45BA41340181A7A9620>43 D<12181238127812381208A21210A212201240A2128005 0C7D830D>I I<1230127812F0126005047C830D>I<14021406A2 140CA214181430A21460A214C0A2EB0180A2EB03001306A25BA25BA25BA25B5BA2485AA2 48C7FCA212065AA25AA25AA25AA25A5A17297F9E15>I<133EEBE180380181C0EA03005A 1206000E13E0120C001C13C0A2EA18011238A338700380A43860070012E01306130EA213 0C5BEA60385BEA30C0001FC7FC131D7C9B15>I<1304130C131813381378EA07B8EA0070 A413E0A4EA01C0A4EA0380A4EA0700A45AEAFFF00E1C7B9B15>I<133EEB4180EB80C0EA 0100000213E0EA0440A21208A3381081C0A238110380000E1300EA00065B5B1360138000 03C7FC12044813404813805AEB0100EA7F07EA43FEEA81FCEA8078131D7D9B15>I<131F EB60C013803801006012021340000413E0A3EB81C0EA030138000380EB070013FC131C13 06A21307A41270EAE00E12805BEA40185BEA20E0EA1F80131D7D9B15>I 54 D<131FEB60C0EBC060EA018038030030A200061360120714C013803803C10013E6EA 01FCEA0078EA01BCEA061E487E487E383003801220EA6001A238C00300A21306EA60045B EA3830EA0FC0141D7D9B15>56 D<133E13E138018180380300C01206120E120C121CA213 011238A31303001813801307EA080B380C3300EA03C7EA0007130E130C131C1318EAE030 5BEA80C0EAC180003EC7FC121D7C9B15>I<1206120FA212061200AA1230127812F01260 08127C910D>I<000FB512E04814F0C9FCA8B612806C14001C0C7C8F20>61 D<1418A21438A21478A214B8EB0138A2EB023C141C1304130C13081310A21320A2EB7FFC EBC01C1380EA0100141E0002130EA25A120C001C131EB4EBFFC01A1D7E9C1F>65 D<48B5FC39003C038090383801C0EC00E0A35B1401A2EC03C001E01380EC0F00141EEBFF FC3801C00E801580A2EA0380A43907000F00140E141E5C000E13F0B512C01B1C7E9B1D> I<903803F02090381E0C6090383002E09038E003C03801C001EA038048C7FC000E148012 1E121C123C15005AA35AA41404A35C12705C6C5B00185B6C485AD80706C7FCEA01F81B1E 7A9C1E>I<48B5FC39003C03C090383800E0A21570A24913781538A215785BA4484813F0 A315E03803800115C0140315803907000700140E5C5C000E13E0B512801D1C7E9B1F>I< 48B512F038003C00013813301520A35BA214081500495AA21430EBFFF03801C020A43903 8040801400A2EC0100EA07005C14021406000E133CB512FC1C1C7E9B1C>I<48B512F038 003C00013813301520A35BA214081500495AA21430EBFFF03801C020A448485A91C7FCA3 48C8FCA45AEAFFF01C1C7E9B1B>I<903803F02090381E0C6090383002E09038E003C038 01C001EA038048C7FC000E1480121E121C123C15005AA35AA2903801FF809038001E0014 1CA400705BA27E001813786C139038070710D801F8C7FC1B1E7A9C20>I<3A01FFC3FF80 3A003C00780001381370A4495BA449485AA390B5FC3901C00380A4484848C7FCA4380700 0EA448131E39FFE1FFC0211C7E9B1F>I I I<3801FFC0 38003C001338A45BA45BA4485AA438038002A31404EA0700140C14181438000E13F0B5FC 171C7E9B1A>76 D I I I<3801FFFE39003C038090383801C0EC00E0A3EB7001A315C0EBE0031580EC0700141C 3801FFF001C0C7FCA3485AA448C8FCA45AEAFFE01B1C7E9B1C>I<3801FFFE39003C0780 90383801C015E01400A2EB7001A3EC03C001E01380EC0700141CEBFFE03801C03080141C A2EA0380A43807003C1520A348144039FFE01E80C7EA0F001B1D7E9B1E>82 D I<001FB512C0381C070138300E0000201480126012405B1280A2000014005B A45BA45BA4485AA41203EA7FFE1A1C799B1E>I<39FF801FC0393C000700001C1304A25C 5CA25CA25C5CA26C48C7FCA213025BA25BA25B5B120F6C5AA25B90C8FCA21206A21A1D77 9B1F>86 D<3AFF83FF07F03A3C007001C00038158002F01300A290380170025D13025D13 045D13085D131001305B1320D81C405BA2D98071C7FCA2381D0072A2001E1374A2001C13 38A20018133014201210241D779B29>I<3901FF81FE39003E0078011C136015C0011E13 8090380E0100EB0F026D5A5C1490EB03A014E06D5AA28013021304497EEB10701320EB60 3813C0EB803C3801001C12020006131E121EB4EB7FC01F1C7E9B1F>I<48B512809038E0 07003803800EEB001E0002131C5C485B5C495A1200495A49C7FC130E5BA25B5BEBE00848 485AA2EA038048485A120E481360003C5BEA380138700780B5FC191C7D9B19>90 D 97 D<123F1207A2120EA45AA4EA39E0EA3A18EA3C0C12381270130EA3EAE0 1CA31318133813301360EA60C0EA3180EA1E000F1D7C9C13>I<13F8EA0304120EEA1C0E EA181CEA30001270A25AA51304EA60081310EA3060EA0F800F127C9113>I I<13F8EA0704120CEA1802EA38041230EA7008EA7FF0 EAE000A5EA60041308EA30101360EA0F800F127C9113>I I I I I<1303130713031300A7137813 8CEA010C1202131C12041200A21338A41370A413E0A4EA01C0A2EAC180EAE30012C61278 1024819B0D>I I< EA1F801203A2EA0700A4120EA45AA45AA45AA412E2A312E412641238091D7D9C0B>I<39 1C1E078039266318C0394683A0E0384703C0008E1380A2120EA2391C0701C0A3EC0380D8 380E1388A2EC0708151039701C032039300C01C01D127C9122>I I<13F8EA030CEA0E06487E1218123000701380A238E00700A3130EA25BEA60185B EA30E0EA0F8011127C9115>I<380387803804C860EBD03013E0EA09C014381201A23803 8070A31460380700E014C0EB0180EB8300EA0E86137890C7FCA25AA45AB4FC151A809115 >I I I I<12 035AA3120EA4EAFFE0EA1C00A35AA45AA4EAE080A2EAE100A2126612380B1A7C990E>I< 381C0180EA2E03124EA2388E0700A2121CA2EA380EA438301C80A3EA383C38184D00EA0F 8611127C9116>I I<381E0183382703871247148338870701A2120EA2 381C0E02A31404EA180C131C1408EA1C1E380C26303807C3C018127C911C>I<38038780 380CC840380870E012103820E0C014001200A2485AA4EA03811263EAE38212C5EA8584EA 787813127E9113>I<381C0180EA2E03124EA2388E0700A2121CA2EA380EA4EA301CA3EA 383CEA1878EA0FB8EA003813301370EAE0605BEA81800043C7FC123C111A7C9114>I I E /Fi 6 53 df<1360AAB512F0A238006000AA 14167E9119>43 D<120FEA30C0EA6060A2EA4020EAC030A9EA4020EA6060A2EA30C0EA0F 000C137E9211>48 D<120C121C12EC120CAFEAFFC00A137D9211>I<121FEA60C01360EA F07013301260EA0070A2136013C012011380EA02005AEA08101210EA2020EA7FE012FF0C 137E9211>I I<136013E0A2EA016012021206120C1208 12101220126012C0EAFFFCEA0060A5EA03FC0E137F9211>I E /Fj 38 122 df<49B4FC011F13C090387F81E0EBFC013901F807F01203EA07F0A4EC01C091C8 FCA3EC3FF8B6FCA33807F003B3A33A7FFF3FFF80A3212A7FA925>12 D<130E131E137EEA07FE12FFA212F81200B3ABB512FEA317277BA622>49 D I I<140FA25C5C5C5C5BA2EB03 BFEB073F130E131C133C1338137013E0EA01C0EA038012071300120E5A5A5A12F0B612F8 A3C7EA7F00A890381FFFF8A31D277EA622>I<00181303381F801FEBFFFE5C5C5C14C091 C7FC001CC8FCA7EB7FC0381DFFF8381F80FC381E003F1208C7EA1F8015C0A215E0A21218 127C12FEA315C05A0078EB3F80A26CEB7F00381F01FE6CB45A000313F0C613801B277DA6 22>I I<1238123E003FB512F0A34814E015C0158015003870000EA25C485B5C5CC6485AA249 5A130791C7FC5B5B131E133EA2137E137CA213FCA41201A76C5A13701C297CA822>I I<91387FE003903907FFFC07011FEBFF0F90397FF00F9F90 39FF0001FFD801FC7F4848147F4848143F4848141F485A160F485A1607127FA290C9FC5A A97E7F1607123FA26C7E160E6C7E6C6C141C6C6C143C6C6C14786CB4EB01F090397FF007 C0011FB512800107EBFE009038007FF028297CA831>67 D 72 D I 77 D 82 D<9038FF80600003EBF0E0000F13F8381F80FD383F 001F003E1307481303A200FC1301A214007EA26C140013C0EA7FFCEBFFE06C13F86C13FE 80000714806C14C0C6FC010F13E0EB007FEC1FF0140F140700E01303A46C14E0A26C1307 6C14C0B4EB0F80EBE03F39E3FFFE0000E15B38C01FF01C297CA825>I<007FB71280A390 39807F807FD87C00140F00781507A20070150300F016C0A2481501A5C791C7FCB3A490B6 12C0A32A287EA72F>I 87 D<3803FF80000F13F0381F01FC383F80FE147F8015 80EA1F00C7FCA4EB3FFF3801FC3FEA0FE0EA1F80EA3F00127E5AA4145F007E13DF393F83 9FFC381FFE0F3803FC031E1B7E9A21>97 D I I I I I<9038FF80F00003EBE3F8390FC1FE1C391F007C7C48137E003EEB3E10007E EB3F00A6003E133E003F137E6C137C380FC1F8380BFFE00018138090C8FC1238A2123C38 3FFFF814FF6C14C06C14E06C14F0121F383C0007007CEB01F8481300A4007CEB01F0A200 3FEB07E0390FC01F806CB5120038007FF01E287E9A22>I I<1207EA0F80EA1FC0EA3FE0A3EA1FC0EA0F80EA0700C7FCA7EAFFE0A3120FB3A3EAFFFE A30F2B7EAA12>I 107 D I<26FFC07FEB1FC090 3AC1FFC07FF0903AC307E0C1F8D80FC49038F101FC9039C803F20001D801FE7F01D05BA2 01E05BB03CFFFE3FFF8FFFE0A3331B7D9A38>I<38FFC07E9038C1FF809038C30FC0D80F C413E0EBC80701D813F013D0A213E0B039FFFE3FFFA3201B7D9A25>I I<38 FFE1FE9038EFFF809038FE0FE0390FF803F09038F001F801E013FC140015FEA2157FA815 7E15FEA215FC140101F013F89038F807F09038FC0FE09038EFFF809038E1FC0001E0C7FC A9EAFFFEA320277E9A25>I<38FFC1F0EBC7FCEBC63E380FCC7F13D813D0A2EBF03EEBE0 00B0B5FCA3181B7F9A1B>114 D<3803FE30380FFFF0EA3E03EA7800127000F01370A27E 00FE1300EAFFE06CB4FC14C06C13E06C13F0000713F8C6FCEB07FC130000E0137C143C7E 14387E6C137038FF01E038E7FFC000C11300161B7E9A1B>I<13E0A41201A31203A21207 120F381FFFE0B5FCA2380FE000AD1470A73807F0E0000313C03801FF8038007F0014267F A51A>I<39FFE07FF0A3000F1307B2140FA2000713173903F067FF3801FFC738007F8720 1B7D9A25>I<39FFFC03FFA3390FF000F0000714E07F0003EB01C0A2EBFC0300011480EB FE070000140013FFEB7F0EA2149EEB3F9C14FC6D5AA26D5AA36D5AA26D5AA2201B7F9A23 >I<39FFFC03FFA3390FF000F0000714E07F0003EB01C0A2EBFC0300011480EBFE070000 140013FFEB7F0EA2149EEB3F9C14FC6D5AA26D5AA36D5AA26D5AA25CA21307003890C7FC EA7C0FEAFE0E131E131C5BEA74F0EA3FE0EA0F8020277F9A23>121 D E /Fk 27 124 df 12 D<127812FCA412781200A6127812FCA4 127806127D910D>58 D 65 D<39FFFC07FFA2390FC000E04A5A4A5A0206C7FC5C14385C5CEBC1C013 C3EBC7E0EBCFF013FBEBF1F8EBE0FC497E147E806E7E81140F6E7E816E7E3AFFFC1FFF80 A2211C7E9B25>75 D 97 D I I I I<137F38 01E3803803C7C0EA0787120FEB8380EB8000A5EAFFF8A2EA0F80AEEA7FF0A2121D809C0F >I<3803F0F0380E1F38EA3C0F3838073000781380A400381300EA3C0FEA1E1CEA33F000 30C7FCA3EA3FFF14C06C13E014F0387801F838F00078A300701370007813F0381E03C038 07FF00151B7F9118>I I<121E123FA4121EC7FCA6127FA2121FAEEAFFC0A20A1E7F9D0E>I 108 D<39FF0FC07E903831E18F3A1F40F20780D980 FC13C0A2EB00F8AB3AFFE7FF3FF8A225127F9128>I<38FF0FC0EB31E0381F40F0EB80F8 A21300AB38FFE7FFA218127F911B>I I<38FF3F 80EBE1E0381F80F0EB0078147C143C143EA6143C147C1478EB80F0EBC1E0EB3F0090C7FC A6EAFFE0A2171A7F911B>I<3803F060380F0CE0EA1E07EA3C03127C127812F8A6127812 7C123CEA1C07EA0E0FEA03F3EA0003A6EB1FFCA2161A7E9119>I I I<1203A45AA25AA2EA3FFC12FFEA1F00A9130CA4EA0F08EA0798EA03F00E1A7F9913>I< 38FF07F8A2EA1F00AC1301120F380786FFEA01F818127F911B>I<38FFC1FCA2381F0060 1380000F13C0A23807C180A23803E300A213F7EA01F613FE6C5AA21378A2133016127F91 19>I<39FF8FF8FEA2391F03E030A3390F87F06013869038C6F8E03907CC78C0A23903FC 7D80EBF83D143F3901F01F00A20000131EEBE00EA21F127F9122>I<38FFC1FCA2381F00 601380000F13C0A23807C180A23803E300A213F7EA01F613FE6C5AA21378A21330A25B12 70EAF8E05BEAF9800073C7FC123E161A7F9119>121 D 123 D E /Fl 30 118 df 45 D<1206120F121E120C1200A81230 127812F0126008107C8F0C>58 D<1420146014E0A2130114F0EB0270A213041308A21310 A213201340A2EB8038EBFFF8380100381202A25AA25A121838FE01FF181A7E991D>65 D 67 D<3803FFF83800700E80809038E00180A315C0EA01C0A43903800380A3150048485AA214 0E140C000E131C5C5C5C381C0380D8FFFEC7FC1A1A7D991D>I<0003B5FC380070071403 140113E0A43801C080A313C13803FF001381A3EA070290C7FCA3120EA4121EEAFFC0181A 7D9919>70 D 76 D I 79 D<3803FFF83800701C1406140713 E0A43801C00EA2141C143838038060EBFF80EB8000A248C7FCA4120EA45AB47E181A7D99 1A>I 83 D<383FFFFC38381C0C00201304124013381280A338007000A45BA4485AA4485AA41207EA FFF8161A79991B>I 97 D<127E120EA35AA45AA2EA3BC0EA3C301278EA7018A3EAE0 38A4EAC070136013E0EA60C0EA6380EA1E000D1A7C9912>I I I I<13F338038B8038060700120E120C121CEA380EA4 EA301CA3EA183C5BEA07B8EA0038A25B1260EAE0E0EAC1C0007FC7FC11177E8F12>103 D I<1203120712061200A61238124C124E128E12 9CA2121C1238A212701272A212E212E41264123808197C980C>I<130C130E130C1300A6 13E0EA013812021204A3EA0070A413E0A4EA01C0A4EA03801263EAE70012CE12780F2081 980C>I<121F1207A3120EA4121CA41238A41270A412E4A412E81230081A7D990A>108 D<38307C1E38598663399E0783801403129CA239380E0700A3140ED8701C1340A2141C15 8038E0380C39601807001A107C8F1F>I I I I 114 D I<1206120EA45AA2EAFFC0EA1C005AA45AA412E1A312E2 12E412380A177C960D>I I E /Fm 59 122 df<90387E1F803901C17040390703 C0600006EB80E0000E14401500A5B612E0380E0380AE397F8FE3FC1E1A809920>14 D<126012F012F812681208A31210A212201240050B7D990B>39 D<1380EA010012025A12 0C120812185AA35AA412E0AA1260A47EA37E1208120C12047E7EEA008009267D9B0F>I< 7E12407E7E12181208120C7EA37EA41380AA1300A41206A35A1208121812105A5A5A0926 7E9B0F>I<126012F0A212701210A31220A21240A2040B7D830B>44 D I<126012F0A2126004047D830B>I 48 D<12035AB4FC1207B3A2EA7FF80D187D9713>I I I<1318A21338137813F813B8EA01381202A2120412081218121012201240 12C0B5FCEA0038A6EA03FF10187F9713>I I I<1240EA7F FF13FEA2EA4004EA80081310A2EA00201340A21380120113005AA25A1206A2120EA51204 10197E9813>I I I<126012F0 A212601200A8126012F0A212701210A31220A21240A204177D8F0B>59 D<130CA3131EA2132F1327A2EB4380A3EB81C0A200017F1300A248B47E38020070A2487F A3487FA2003C131EB4EBFFC01A1A7F991D>65 D I I I 70 D I<39FFE1FFC0390E001C00AB380FFFFC380E001CAC39FFE1FFC01A1A 7F991D>I 74 D 76 D<00FEEB7FC0000FEB0E001404EA0B80EA09C0A2EA08E01370A21338131CA2130E1307EB 0384A2EB01C4EB00E4A21474143CA2141C140C121C38FF80041A1A7F991D>78 D<137F3801C1C038070070000E7F487F003C131E0038130E0078130F00707F00F01480A8 0078EB0F00A20038130E003C131E001C131C6C5B6C5B3801C1C0D8007FC7FC191A7E991E >I I 82 D I<007FB5FC38 701C0700401301A200C0148000801300A300001400B13803FFE0191A7F991C>I<39FFE0 7FC0390E000E001404B200065B12076C5B6C6C5A3800E0C0013FC7FC1A1A7F991D>I<3A FF81FF07F03A3C007801C0001CEC0080A36C90389C0100A33907010E02A33903830F04EB 8207A2150C3901C40388A33900E801D0A390387000E0A301305B01201340241A7F9927> 87 D 92 D 97 D<12FC121CA913FCEA1D07381E0380381C01C0130014E0A6EB01C0 1480381E0300EA1906EA10F8131A809915>I I<133F1307A9EA03E7EA0C17EA180F487E1270 12E0A6126012706C5AEA1C373807C7E0131A7F9915>I I I I<12FC121CA9137CEA1D87381E0380A2121CAB38FF9F F0141A809915>I<1218123CA212181200A612FC121CAE12FF081A80990A>I I<12FC121CA9 EB1FC0EB0F00130C5B13205B13E0121DEA1E70EA1C7813387F131E7F148038FF9FE0131A 809914>I<12FC121CB3A6EAFF80091A80990A>I<38FC7C1F391D8E6380391E0781C0A200 1C1301AB39FF9FE7F81D107F8F20>I I I I 114 D I<1208A41218A21238EAFFC0EA 3800A81320A41218EA1C40EA07800B177F960F>I<38FC1F80EA1C03AB1307120CEA0E0B 3803F3F01410808F15>I<38FF0F80383C0700EA1C061304A26C5AA26C5AA3EA03A0A2EA 01C0A36C5A11107F8F14>I<39FE7F1F8039381C0700003C1306381C0C04130E380E1608 1317A238072310149013A33803C1A014E0380180C0A319107F8F1C>I<38FF0F80383C07 00EA1C061304A26C5AA26C5AA3EA03A0A2EA01C0A36C5AA248C7FCA212E112E212E41278 11177F8F14>121 D E /Fn 84 125 df 11 D<137E3801C180EA0301380703C0120EEB018090C7FCA5B512C0EA0E01B0387F87F8151D 809C17>I I< 90383F07E03901C09C18380380F0D80701133C000E13E00100131892C7FCA5B612FC390E 00E01CB03A7FC7FCFF80211D809C23>I<126012F0A71260AD1200A5126012F0A2126004 1E7C9D0C>33 D I<126012F012F812681208A31210A2122012401280050C7C9C0C>39 D<1380EA0100120212065AA25AA25AA35AA412E0AC1260A47EA37EA27EA27E12027EEA00 80092A7C9E10>I<7E12407E12307EA27EA27EA37EA41380AC1300A41206A35AA25AA25A 12205A5A092A7E9E10>I<1306ADB612E0A2D80006C7FCAD1B1C7E9720>43 D<126012F0A212701210A41220A212401280040C7C830C>I I<12 6012F0A2126004047C830C>I<130113031306A3130CA31318A31330A31360A213C0A3EA 0180A3EA0300A31206A25AA35AA35AA35AA35AA210297E9E15>I I<5A1207123F12C71207B3A5EAFFF80D1C7C9B15>I I I<130CA2131C133CA2135C13DC139C EA011C120312021204120C1208121012301220124012C0B512C038001C00A73801FFC012 1C7F9B15>I I<13F0EA03 0CEA0404EA0C0EEA181E1230130CEA7000A21260EAE3E0EAE430EAE818EAF00C130EEAE0 061307A51260A2EA7006EA300E130CEA1818EA0C30EA03E0101D7E9B15>I<1240387FFF 801400A2EA4002485AA25B485AA25B1360134013C0A212015BA21203A41207A66CC7FC11 1D7E9B15>I I I<126012F0A212601200AA126012F0A2126004127C910C>I<126012F0A2 12601200AA126012F0A212701210A41220A212401280041A7C910C>I<007FB512C0B612 E0C9FCA8B612E06C14C01B0C7E8F20>61 D 63 D<1306A3130FA3EB1780A2EB37C01323A2EB43E01341A2EB80F0A338010078A2EBFFF838 02003CA3487FA2000C131F80001E5BB4EBFFF01C1D7F9C1F>65 D I<90381F8080EBE0613801801938070007000E13035A14015A00781300A212 7000F01400A8007014801278A212386CEB0100A26C13026C5B380180083800E030EB1FC0 191E7E9C1E>I I I I<90381F8080EBE0613801801938070007000E13035A14015A007813 00A2127000F01400A6ECFFF0EC0F80007013071278A212387EA27E6C130B380180113800 E06090381F80001C1E7E9C21>I<39FFF0FFF0390F000F00AC90B5FCEB000FAD39FFF0FF F01C1C7F9B1F>I I<3807FF8038007C00133CB3 127012F8A21338EA7078EA4070EA30E0EA0F80111D7F9B15>I<39FFF01FE0390F000780 EC060014045C5C5C5C5C49C7FC13021306130FEB17801327EB43C0EB81E013016D7E1478 A280143E141E80158015C039FFF03FF01C1C7F9B20>I I I I I I I I<3807E080EA1C19EA30051303EA600112E01300A36C 13007E127CEA7FC0EA3FF8EA1FFEEA07FFC61380130FEB07C0130313011280A300C01380 A238E00300EAD002EACC0CEA83F8121E7E9C17>I<007FB512C038700F01006013000040 1440A200C014201280A300001400B1497E3803FFFC1B1C7F9B1E>I<39FFF01FF0390F00 0380EC0100B3A26C1302138000035BEA01C03800E018EB7060EB0F801C1D7F9B1F>I<39 FFE00FF0391F0003C0EC01806C1400A238078002A213C000035BA2EBE00C00011308A26C 6C5AA213F8EB7820A26D5AA36D5AA2131F6DC7FCA21306A31C1D7F9B1F>I<3AFFE1FFC0 FF3A1F003E003C001E013C13186C6D1310A32607801F1320A33A03C0278040A33A01E043 C080A33A00F081E100A39038F900F3017913F2A2017E137E013E137CA2013C133C011C13 38A20118131801081310281D7F9B2B>I<39FFF003FC390F8001E00007EB00C06D138000 03EB01006D5A000113026C6C5A13F8EB7808EB7C18EB3C10EB3E20131F6D5A14C06D5AAB EB7FF81E1C809B1F>89 D<387FFFF0EA7C01007013E0386003C0A238400780130F140013 1E12005B137C13785BA2485A1203EBC010EA0780A2EA0F00481330001E13205A14604813 E0EAF803B5FC141C7E9B19>I<12FEA212C0B3B312FEA207297C9E0C>I I<12FEA21206B3B3 12FEA20729809E0C>I 97 D<12FC121CAA137CEA1D8738 1E0180381C00C014E014601470A6146014E014C0381E018038190700EA10FC141D7F9C17 >I I I I<13 F8EA018CEA071E1206EA0E0C1300A6EAFFE0EA0E00B0EA7FE00F1D809C0D>I I<12FC121CAA137C1387EA1D03001E1380121CAD38FF9FF0141D7F9C17>I<121812 3CA21218C7FCA712FC121CB0EAFF80091D7F9C0C>I<13C0EA01E0A2EA00C01300A7EA07 E01200B3A21260EAF0C012F1EA6180EA3E000B25839C0D>I<12FC121CAAEB0FE0EB0780 EB06005B13105B5B13E0121DEA1E70EA1C781338133C131C7F130F148038FF9FE0131D7F 9C16>I<12FC121CB3A9EAFF80091D7F9C0C>I<39FC7E07E0391C838838391D019018001E EBE01C001C13C0AD3AFF8FF8FF8021127F9124>I I I I<3803E080EA0E19EA1805EA3807EA7003A212E0A61270A2EA38071218EA0E1B EA03E3EA0003A7EB1FF0141A7F9116>I I I<1204A4120CA2121C123CEA FFE0EA1C00A91310A5120CEA0E20EA03C00C1A7F9910>I<38FC1F80EA1C03AD1307120C EA0E1B3803E3F014127F9117>I<38FF07E0383C0380381C0100A2EA0E02A2EA0F06EA07 04A2EA0388A213C8EA01D0A2EA00E0A3134013127F9116>I<39FF3FC7E0393C0703C000 1CEB01801500130B000E1382A21311000713C4A213203803A0E8A2EBC06800011370A2EB 8030000013201B127F911E>I<38FF0FE0381E0700EA1C06EA0E046C5AEA039013B0EA01 E012007F12011338EA021C1204EA0C0E487E003C138038FE1FF014127F9116>I<38FF07 E0383C0380381C0100A2EA0E02A2EA0F06EA0704A2EA0388A213C8EA01D0A2EA00E0A313 40A25BA212F000F1C7FC12F312661238131A7F9116>I I I I E /Fo 51 122 df<13FCEA0782EA0E07121C130290C7FCA4B5FCEA1C07AC387F1FC01217809614>12 D 34 D<120112021204120C1218A21230A212701260A312E0AA1260A312701230A21218A2120C 12041202120108227D980E>40 D<12801240122012301218A2120CA2120E1206A31207AA 1206A3120E120CA21218A2123012201240128008227E980E>I<126012F0A212701210A2 1220A21240A2040A7D830A>44 D<126012F0A2126004047D830A>46 D 48 D<1206120E12FE120EB1EAFFE00B157D9412>I I I<1330 A2137013F012011370120212041208121812101220124012C0EAFFFEEA0070A5EA03FE0F 157F9412>I I 57 D<126012F0A212601200A6126012F0A212701210A21220A21240A20414 7D8D0A>59 D<13101338A3135CA3138EA3EA0107A238020380A33807FFC0EA0401A23808 00E0A2001813F0123838FE03FE17177F961A>65 D 67 D<38FF83FE381C0070AA381FFFF0381C0070AA38FF83FE1717 7F961A>72 D I I 76 D<00FEEB03F8001E14C000171305A338138009A23811C011A33810E021 A2EB7041A3EB3881A2EB1D01A2130EA2123839FE040FF81D177F9620>I<00FC13FE001E 1338001F13101217EA1380EA11C0A2EA10E013701338A2131C130E130F1307EB0390EB01 D0A2EB00F014701430123800FE131017177F961A>I 83 D<387FFFF83860381800401308A200801304A300001300AF38 03FF8016177F9619>I<3AFF07FC3F803A3C00E00E00001C1404A2EB0170000E5CA2EB02 3800075CA2EB041CD803845BA2EB880ED801C85BA2EBD007D800F05BA3EBE003016090C7 FCA221177F9624>87 D<12FCA212C0B3AB12FCA206217D980A>91 D I<12FCA2120CB3 AB12FCA2062180980A>I 97 D<12F81238A8EA39F0EA3E0CEA380613077F14 80A414005B1306EA361CEA21F011177F9614>I I<133E130EA8EA07CEEA1C3EEA300E12 70126012E0A412601270EA301EEA182E3807CF8011177F9614>I I I I<12F81238A813F8EA3B1CEA3C0E1238AA38FE3F801117 7F9614>I<12301278A212301200A512F81238AC12FE07177F960A>I<1203EA0780A2EA03 00C7FCA5EA1F801203AF1243EAE30012E7127C091D82960B>I<12F81238B3A312FE0717 7F960A>108 D<38F8F83E383B1CC7393C0F0380EA380EAA39FE3F8FE01B0E7F8D1E>I I I I I I I<1208A31218A21238 EAFFC0EA3800A71340A4EA1C80EA0F000A147F930E>I I I<38FEFE7C383838381410133C001C1320134C381E4E60380E CE401387000713801303A200031300EA0201160E7F8D19>I 121 D E /Fp 7 117 df 97 D 101 D 111 D I 114 D<120FEA10801221EA2000123E7EEA01801280EAC0001283127C090B7D8A0F>I<12 081218A312FF1230A41260A212621264A21238080F7E8E0C>I E /Fq 26 122 df<126012F0A212701210A41220A212401280040C7B830D>44 D I<12035A123F12C71207B3A4EA0F80EAFFF80D1C7B9B17>49 D 53 D<13F8EA0306EA0602EA0C07485A1238EA30060070C7FCA21260EAE3E0EAE418EAE80CEA F00613077F00E01380A41260A212701400EA3007EA18065B6C5AEA03E0111D7D9B17>I< EA03E0EA0C18487E487E1270EA6007EAE003A21480A5EA600712701230EA180BEA0C13EA 03E3380003005BA2EA300612785BEA7018EA2010EA1060EA0F80111D7D9B17>57 D<90380FE02090387018603801C00439030003E000061301000E13004814605A15201278 127000F01400A80070142012781238A26C14407E000614806CEB01003801C00638007018 EB0FE01B1E7D9C21>67 D I 77 D<3803F040380C0CC0EA1002EA3001EA600012E01440A36C13007E127EEA7FE0EA3FFC6C B4FC00071380EA007FEB07C0EB03E0130113007EA36C13C0A238E0018038D00300EACE06 EA81F8131E7D9C19>83 D<39FFF01FF0390F000380EC0100B3A26C1302138000035BEA01 C03800E018EB7060EB0F801C1D7D9B22>85 D<13201370A313B8A3EA011CA2EA031EEA02 0EA2487EEA07FFEA040738080380A2001813C01301123838FC07F815157F9419>97 D I 101 D I<38FF8FF8381C01C0A9EA1FFFEA1C01A938FF8FF815157F9419>104 D I 108 D<38FC03F8381E00E014401217EA138013C01211EA10E01370A213 38131CA2130E130714C0130313011300123800FE134015157F9419>110 D I I 114 D I<387FFFF038607030004013 10A200801308A300001300ADEA07FF15157F9419>I<38FF83F8381C00E01440AE000C13 C0000E138038060100EA0386EA00FC15157F9419>I<38FF80FE381E0038000E1320000F 13606C13403803808013C03801C10013E212001374137C1338A848B4FC1715809419> 121 D E /Fr 4 121 df 97 D<127C1218A45AA4EA6780EA68C0EA7040EA606012C0A4EA 80C0A2EA8180EAC1001246123C0B177E960F>I 115 D 120 D E /Fs 24 122 df<127012F8A3127005057C840E>46 D<13801203120F12F31203B3A9EA07C0EAFFFE0F217CA018>49 D 57 D 66 D<39FFFC3FFF390FC003F039078001E0AE90B5FCEB8001AF390F C003F039FFFC3FFF20227EA125>72 D<3803FFE038001F007FB3A6127012F8A2130EEAF0 1EEA401C6C5AEA1870EA07C013237EA119>74 D 76 D I<3BFFF0 3FFC03FE3B1F8007E000F86C486C48137017206E7ED807801540A24A7E2603C0021480A3 9039E004780100011600A2EC083CD800F01402A2EC101E01785CA2EC200F013C5CA20260 138890391E400790A216D090391F8003F0010F5CA2EC00016D5CA20106130001025C2F23 7FA132>87 D 97 D<120E12FE121E120EAB 131FEB61C0EB8060380F0030000E1338143C141C141EA7141C143C1438000F1370380C80 60EB41C038083F0017237FA21B>I 101 D<14703803F198380E1E18EA1C0E38380700A200781380A400381300A2EA1C0E EA1E1CEA33F00020C7FCA212301238EA3FFE381FFFC06C13E0383000F0481330481318A4 00601330A2003813E0380E03803803FE0015217F9518>103 D<121C123EA3121CC7FCA8 120E127E121E120EB1EAFFC00A227FA10E>105 D<120E12FE121E120EABEB03FCEB01F0 14C01480EB02005B5B5B133813F8EA0F1CEA0E1E130E7F1480EB03C0130114E0EB00F014 F838FFE3FE17237FA21A>107 D<120E12FE121E120EB3ADEAFFE00B237FA20E>I<380E1F 8038FE60C0381E80E0380F0070A2120EAF38FFE7FF18157F941B>110 D I 114 D I<1202A41206A3120E121E123EEAFFFCEA0E00AB1304A6EA070812 03EA01F00E1F7F9E13>I<000E137038FE07F0EA1E00000E1370AD14F0A2380601703803 82783800FC7F18157F941B>I<38FF80FE381E00781430000E1320A26C1340A2EB80C000 031380A23801C100A2EA00E2A31374A21338A3131017157F941A>I<38FF80FE381E0078 1430000E1320A26C1340A2EB80C000031380A23801C100A2EA00E2A31374A21338A31310 A25BA35B12F05B12F10043C7FC123C171F7F941A>121 D E /Ft 22 122 df 66 D<02FF13200107EBC06090381F807090397E0018 E001F813054848130348481301485A48481300A248C812605A123E007E1520A2127C1600 12FCA9127CA2007E1520A2123E123F6C15406C7EA26C6C14806C6CEB01006C6C5B6C6C13 06017E131C90381F8070903807FFE0010090C7FC232B7DA92A>I 73 D 83 D 85 D 97 D<120FB4FCA2121F7EACEB07E0EB1838EB600E EB8007158090380003C0A2EC01E0A215F0A715E0A2140315C01580EB8007000EEB0F00EB 401C380C303838080FC01C2A7EA921>I<140F14FFA2141F80AC133F3801C0CF3803802F 380F001F121E001C7F123C127C1278A212F8A71278A27EA26C5B000E132F6CEB4F803901 C18FF038007E0F1C2A7EA921>100 D<13FC38038780380701C0000E13E0EA1C00003C13 F0A2481378A212F8A2B512F800F8C7FCA51278A26C1308A26C1310000E13206C13403801 C18038007E00151A7E991A>I<140F3901FC308038070743380E03C3001EEBC100486C7E A2007C7FA5003C5BA26C485A000E5BD81707C7FCEA11FC0030C8FCA47E381FFF806C13F0 6C7F3818007C48131E0070130E00607F12E0A40070130EA26C5B6C5B380781E0C6B4C7FC 19287E9A1D>103 D<120FB4FCA2121F7EACEB07F0EB1838EB201C497E140F1380A21300 B139FFF0FFF0A21C2A7EA921>I<121E123FA4121EC7FCA9120FB4FCA2121F7EB3A2EAFF F0A20C297EA811>I<120FB4FCA2121F7EB3B2EAFFF0A20C2A7EA911>108 D<380F07F038FF1838EB201C381F400E000F130F1380A21300B139FFF0FFF0A21C1A7E99 21>110 D<137E3803C3C0380700E0000E1370481338003C133CA248131EA200F8131FA8 0078131EA26C133CA2001C13386C13706C13E03803C3C038007E00181A7E991D>I<380F 07E038FF1838EB601E380F800FEC0780010013C0140315E0A2EC01F0A715E01403A215C0 EC07801380EC0F00EB401CEB3078EB0FC090C8FCAAEAFFF0A21C267E9921>I<380F0F80 38FF11C0EB23E0EA1F43EA0F83EB81C0EB800090C7FCB07FEAFFFCA2131A7E9917>114 D<3807F080EA1C0DEA3003EA600112E01300A27E6C1300127EEA7FE0EA3FFC6C7EEA07FF 38003F801307388003C0A2130112C0A200E01380130300F01300EACC0EEA83F8121A7E99 17>I<7FA41201A31203A21207120F381FFF80B5FC38078000AD1440A73803C080120138 00E100133E12257FA417>I<000F130FB413FFA2001F131F6C7FB05CA26C132F3903804F 803901C08FF038007F0F1C1A7E9921>I<39FFF01FF0A2390F8007800007EB03001402A2 6C6C5AA2EBE00C00011308A26C6C5AA2EBF830EB7820A26D5AA2EB3EC0EB1E80A26DC7FC A31306A21C1A7F991F>I<39FFF01FF0A2390F8007800007EB03001402A26C6C5AA2EBE0 0C00011308A26C6C5AA2EBF830EB7820A26D5AA2EB3EC0EB1E80A26DC7FCA31306A21304 A2130C1308A2EA701012F85BA2485AEA6180001FC8FC1C267F991F>121 D E end %%EndProlog %%BeginSetup %%Feature: *Resolution 300dpi TeXDict begin %%EndSetup %%Page: 0 1 0 0 bop 266 556 a Ft(Beha)n(vioral)19 b(Subt)n(yping)d(Using)j(In)n(v)m (arian)n(ts)f(and)h(Constrain)n(ts)495 726 y Fs(Barbara)e(H.)f(Lisk)o (o)o(v)888 707 y Fr(a)1042 726 y Fs(Jeannette)g(M.)f(Wing)872 796 y(July)h(1999)811 858 y Fq(CMU-CS-99-156)307 1055 y Fp(a)326 1067 y Fo(MIT)c(Lab.)j(for)c(Computer)f(Science,)f(545)i(T)m (ec)o(hnology)e(Square,)g(Cam)o(bridge,)h(MA)i(02139)722 1278 y Fn(Sc)o(ho)q(ol)h(of)h(Computer)f(Science)727 1328 y(Carnegie)h(Mellon)f(Univ)o(ersit)o(y)778 1377 y(Pittsburgh,)h(P)m(A)g(15213)104 1552 y Fm(The)h(w)o(ork)h(describ)q (ed)h(in)f(this)g(pap)q(er)h(is)f(based)g(on)g(a)f(No)o(v)o(em)o(b)q (er)h(1994)g Fl(A)o(CM)g(TOPLAS)g Fm(pap)q(er,)g(\\A)f(Beha)o(vioral) 104 1602 y(Notion)k(of)e(Subt)o(yping,)k(b)o(y)d(the)g(same)g(authors.) 33 b(This)18 b(pap)q(er's)h(v)o(ersion)g(has)f(b)q(een)h(submitted)g (to)f(the)g(v)o(olume)104 1651 y Fl(F)m(ormal)c(Metho)n(ds)f(F)m(or)i (Distribute)n(d)d(Pr)n(o)n(c)n(essing:)k(A)o(n)e(Obje)n(ct-Oriente)n(d) e(Appr)n(o)n(ach)p Fm(,)f(edited)k(b)o(y)g(Ho)o(w)o(ard)f(Bo)o(wman)104 1701 y(and)f(John)h(Derric)o(k.)884 1883 y Fk(Abstract)0 1975 y Fn(W)m(e)j(presen)o(t)j(a)d(w)o(a)o(y)g(of)g(de\014ning)h(the)g (subt)o(yp)q(e)h(relation)e(that)h(ensures)i(that)e(subt)o(yp)q(e)g(ob) r(jects)h(preserv)o(e)h(b)q(eha)o(vioral)0 2025 y(prop)q(erties)12 b(of)f(their)g(sup)q(ert)o(yp)q(es.)19 b(The)12 b(subt)o(yp)q(e)g (relation)e(is)h(based)h(on)e(the)i(sp)q(eci\014cations)g(of)f(the)g (sub-)g(and)g(sup)q(ert)o(yp)q(es.)0 2074 y(Our)19 b(approac)o(h)g (handles)g(m)o(utable)e(t)o(yp)q(es)j(and)f(allo)o(ws)e(subt)o(yp)q(es) k(to)d(ha)o(v)o(e)h(more)f(metho)q(ds)g(than)h(their)g(sup)q(ert)o(yp)q (es.)0 2124 y(Dealing)13 b(with)g(m)o(utable)g(t)o(yp)q(es)i(and)e (subt)o(yp)q(es)j(that)e(extend)h(their)f(sup)q(ert)o(yp)q(es)i(has)f (surprising)f(consequences)j(on)c(ho)o(w)0 2174 y(to)k(sp)q(ecify)g (and)g(reason)h(ab)q(out)e(ob)r(jects.)29 b(In)17 b(our)g(approac)o(h,) g(w)o(e)g(discard)h(the)f(standard)h(data)e(t)o(yp)q(e)i(induction)e (rule,)0 2224 y(w)o(e)k(prohibit)f(the)h(use)g(of)f(an)g(analogous)f (\\history")h(rule,)i(and)e(w)o(e)h(mak)o(e)e(up)h(for)h(b)q(oth)f (losses)h(b)o(y)g(adding)e(explicit)0 2274 y(predicates|in)o(v)n(arian) o(ts)e(and)g(constrain)o(ts{to)g(our)g(t)o(yp)q(e)g(sp)q (eci\014cations.)26 b(W)m(e)15 b(also)h(discuss)h(the)f (rami\014cations)f(of)g(our)0 2323 y(approac)o(h)f(of)f(subt)o(yping)h (the)g(design)g(of)g(t)o(yp)q(e)g(families.)64 2487 y Fm(This)h(researc)o(h)h(w)o(as)f(supp)q(orted)h(for)f(Lisk)o(o)o(v)h (in)g(part)f(b)o(y)g(the)g(Adv)n(anced)h(Researc)o(h)g(Pro)r(jects)g (Agency)f(of)g(the)g(Departmen)o(t)0 2533 y(of)d(Defense,)h(monitored)h (b)o(y)f(the)g(O\016ce)f(of)g(Na)o(v)n(al)i(Researc)o(h)f(under)h(con)o (tract)f(N00014-91-J-4136)g(and)g(in)h(part)e(b)o(y)h(the)g(National)0 2579 y(Science)j(F)m(oundation)g(under)f(Gran)o(t)f(CCR-8822158;)h(for) f(Wing,)i(b)o(y)e(the)g(Avionics)i(Lab,)f(W)m(righ)o(t)g(Researc)o(h)g (and)g(Dev)o(elopmen)o(t)0 2624 y(Cen)o(ter,)20 b(Aeronautical)h (Systems)f(Division)i(\(AFSC\),)c(U.)g(S.)h(Air)g(F)m(orce,)h(W)m(righ) o(t-P)o(atterson)h(AFB,)d(OH)h(45433-6543)h(under)0 2670 y(Con)o(tract)13 b(F33615-90-C-1465,)h(ARP)m(A)f(Order)g(No.)j(7597.)p eop %%Page: 1 2 1 1 bop 0 2612 a Fk(Keyw)o(ords:)20 b Fn(subt)o(yp)q(e,)f(ob)r (ject-orien)o(ted)g(design,)f(abstraction)g(function,)f(m)o(utable)f(t) o(yp)q(es,)j(in)o(v)n(arian)o(ts,)e(constrain)o(ts,)0 2662 y(sp)q(eci\014cations)p eop %%Page: 1 3 1 2 bop 0 42 a Fj(1)67 b(In)n(tro)r(duction)0 132 y Fn(What)17 b(do)q(es)h(it)f(mean)f(for)i(one)f(t)o(yp)q(e)h(to)f(b)q(e)h(a)g(subt) o(yp)q(e)g(of)f(another?)29 b(W)m(e)17 b(argue)h(that)f(this)h(is)f(a)g (seman)o(tic)g(question)0 182 y(ha)o(ving)c(to)h(do)g(with)g(the)h(b)q (eha)o(vior)f(of)g(the)h(ob)r(jects)g(of)f(the)h(t)o(w)o(o)f(t)o(yp)q (es:)19 b(the)c(ob)r(jects)h(of)d(the)i(subt)o(yp)q(e)g(ough)o(t)f(to)g (b)q(eha)o(v)o(e)0 232 y(the)g(same)f(as)h(those)h(of)e(the)i(sup)q (ert)o(yp)q(e)h(as)e(far)f(as)h(an)o(y)o(one)g(or)f(an)o(y)h(program)e (using)i(sup)q(ert)o(yp)q(e)i(ob)r(jects)f(can)f(tell.)62 282 y(F)m(or)22 b(example,)h(in)f(strongly)g(t)o(yp)q(ed)h(ob)r (ject-orien)o(ted)h(languages)e(suc)o(h)h(as)f(Sim)o(ula)e(67[DMN70)n (],)k(C++[Str86],)0 332 y(Mo)q(dula-3[Nel91)n(],)17 b(and)g(T)m (rellis/Owl[SCB)714 317 y Fi(+)740 332 y Fn(86],)g(subt)o(yp)q(es)h (are)g(used)g(to)f(broaden)g(the)h(assignmen)o(t)e(statemen)o(t.)28 b(An)0 381 y(assignmen)o(t)104 455 y(x:)18 b(T)13 b(:=)h(E)0 529 y(is)19 b(legal)f(pro)o(vided)h(the)h(t)o(yp)q(e)g(of)e(expression) i(E)g(is)f(a)g(subt)o(yp)q(e)h(of)e(the)i(declared)g(t)o(yp)q(e)g(T)f (of)f(v)n(ariable)g(x.)34 b(Once)20 b(the)0 579 y(assignmen)o(t)12 b(has)h(o)q(ccurred,)h(x)f(will)e(b)q(e)i(used)h(according)f(to)f(its)h (\\apparen)o(t")g(t)o(yp)q(e)g(T,)f(with)h(the)g(exp)q(ectation)h(that) e(if)g(the)0 629 y(program)h(p)q(erforms)h(correctly)h(when)g(the)g (actual)f(t)o(yp)q(e)h(of)f(x's)g(ob)r(ject)h(is)g(T,)e(it)h(will)f (also)h(w)o(ork)g(correctly)i(if)d(the)i(actual)0 679 y(t)o(yp)q(e)f(of)g(the)g(ob)r(ject)h(denoted)g(b)o(y)e(x)h(is)g(a)f (subt)o(yp)q(e)i(of)f(T.)62 729 y(Clearly)e(subt)o(yp)q(es)h(m)o(ust)e (pro)o(vide)h(the)h(exp)q(ected)h(metho)q(ds)e(with)g(compatible)e (signatures.)18 b(This)13 b(consideration)f(has)0 779 y(led)17 b(to)f(the)h(form)o(ulation)d(of)i(the)h(con)o(tra/co)o(v)n (ariance)g(rules[BHJ)1065 763 y Fi(+)1093 779 y Fn(87,)f(SCB)1245 763 y Fi(+)1273 779 y Fn(86,)g(Car88)o(].)26 b(Ho)o(w)o(ev)o(er,)17 b(these)h(rules)g(are)0 828 y(not)d(strong)g(enough)f(to)h(ensure)h (that)f(the)g(program)f(con)o(taining)f(the)i(ab)q(o)o(v)o(e)g (assignmen)o(t)f(will)f(w)o(ork)h(correctly)i(for)e(an)o(y)0 878 y(subt)o(yp)q(e)h(of)e(T,)g(since)h(all)e(they)i(do)g(is)f(ensure)i (that)f(no)f(t)o(yp)q(e)h(errors)h(will)d(o)q(ccur.)19 b(It)14 b(is)f(w)o(ell)g(kno)o(wn)g(that)h(t)o(yp)q(e)g(c)o(hec)o (king,)0 928 y(while)j(v)o(ery)i(useful,)f(captures)i(only)d(a)h(small) d(part)j(of)g(what)g(it)f(means)g(for)h(a)g(program)e(to)i(b)q(e)g (correct;)j(the)e(same)e(is)0 978 y(true)e(for)e(the)i(con)o(tra/co)o (v)n(ariance)f(rules.)19 b(F)m(or)13 b(example,)g(stac)o(ks)h(and)g (queues)h(migh)o(t)d(b)q(oth)i(ha)o(v)o(e)g(a)g Fh(put)g Fn(metho)q(d)f(to)h(add)0 1028 y(an)h(elemen)o(t)g(and)g(a)g Fh(get)g Fn(metho)q(d)g(to)g(remo)o(v)o(e)f(one.)23 b(According)16 b(to)f(the)h(con)o(tra)o(v)n(ariance)f(rule,)h(either)g(could)f(b)q(e)h (a)f(legal)0 1077 y(subt)o(yp)q(e)i(of)e(the)h(other.)24 b(Ho)o(w)o(ev)o(er,)16 b(a)f(program)f(written)j(in)e(the)h(exp)q (ectation)h(that)e(x)h(is)f(a)h(stac)o(k)g(is)f(unlik)o(ely)g(to)g(w)o (ork)0 1127 y(correctly)g(if)e(x)h(actually)f(denotes)i(a)f(queue,)g (and)g(vice)g(v)o(ersa.)62 1177 y(What)g(is)h(needed)h(is)e(a)h (stronger)g(requiremen)o(t)g(that)f(constrains)i(the)f(b)q(eha)o(vior)f (of)g(subt)o(yp)q(es:)21 b(prop)q(erties)16 b(that)f(can)0 1227 y(b)q(e)d(pro)o(v)o(ed)g(using)f(the)h(sp)q(eci\014cation)h(of)e (an)g(ob)r(ject's)h(presumed)g(t)o(yp)q(e)g(should)f(hold)g(ev)o(en)i (though)e(the)h(ob)r(ject)g(is)g(actually)0 1277 y(a)i(mem)o(b)q(er)e (of)h(a)h(subt)o(yp)q(e)h(of)e(that)h(t)o(yp)q(e:)104 1351 y Fh(Subtyp)n(e)19 b(R)n(e)n(quir)n(ement)p Fn(:)26 b(Let)18 b Fg(\036)p Fn(\()p Fg(x)p Fn(\))f(b)q(e)i(a)e(prop)q(ert)o(y) i(pro)o(v)n(able)e(ab)q(out)g(ob)r(jects)i(x)f(of)f(t)o(yp)q(e)h(T.)f (Then)h Fg(\036)p Fn(\()p Fg(y)q Fn(\))104 1400 y(should)13 b(b)q(e)i(true)g(for)e(ob)r(jects)i(y)f(of)f(t)o(yp)q(e)i(S)f(where)h (S)f(is)f(a)h(subt)o(yp)q(e)h(of)e(T.)0 1474 y(A)h(t)o(yp)q(e's)g(sp)q (eci\014cation)h(determines)f(what)g(prop)q(erties)h(w)o(e)f(can)g(pro) o(v)o(e)g(ab)q(out)g(ob)r(jects.)62 1524 y(W)m(e)k(are)g(in)o(terested) i(only)d(in)g Fh(safety)h Fn(prop)q(erties)h(\(\\nothing)f(bad)f(happ)q (ens"\).)31 b(First,)19 b(prop)q(erties)g(of)f(an)f(ob)r(ject's)0 1574 y(b)q(eha)o(vior)11 b(in)f(a)h(particular)g(program)e(m)o(ust)h(b) q(e)h(preserv)o(ed:)19 b(to)11 b(ensure)h(that)f(a)g(program)e(con)o (tin)o(ues)j(to)f(w)o(ork)f(as)h(exp)q(ected,)0 1624 y(calls)k(of)g(metho)q(ds)g(made)f(in)h(the)h(program)e(that)i(assume)f (the)h(ob)r(ject)g(b)q(elongs)g(to)f(a)h(sup)q(ert)o(yp)q(e)h(m)o(ust)d (ha)o(v)o(e)i(the)g(same)0 1674 y(b)q(eha)o(vior)k(when)g(the)h(ob)r (ject)g(actually)e(b)q(elongs)h(to)g(a)g(subt)o(yp)q(e.)38 b(In)20 b(addition,)g(ho)o(w)o(ev)o(er,)h(prop)q(erties)h(indep)q (enden)o(t)0 1724 y(of)16 b(particular)h(programs)e(m)o(ust)h(b)q(e)h (preserv)o(ed)i(b)q(ecause)g(these)f(are)f(imp)q(ortan)o(t)e(when)i (indep)q(enden)o(t)i(programs)c(share)0 1773 y(ob)r(jects.)24 b(W)m(e)16 b(fo)q(cus)g(on)f(t)o(w)o(o)g(kinds)h(of)f(suc)o(h)h(prop)q (erties:)23 b Fh(invariants)p Fn(,)16 b(whic)o(h)f(are)h(prop)q(erties) h(true)g(of)e(all)f(states,)j(and)0 1823 y Fh(history)c(pr)n(op)n (erties)p Fn(,)f(whic)o(h)g(are)h(prop)q(erties)h(true)g(of)e(all)f (sequences)k(of)d(states.)19 b(W)m(e)12 b(form)o(ulate)f(in)o(v)n (arian)o(ts)g(as)h(predicates)0 1873 y(o)o(v)o(er)h(single)g(states)i (and)e(history)g(prop)q(erties,)h(o)o(v)o(er)g(pairs)f(of)f(states.)19 b(F)m(or)13 b(example,)f(an)h(in)o(v)n(arian)o(t)f(prop)q(ert)o(y)i(of) e(a)h(bag)g(is)0 1923 y(that)i(its)f(size)i(is)e(alw)o(a)o(ys)g(less)h (than)g(its)g(b)q(ound;)f(a)h(history)g(prop)q(ert)o(y)g(is)g(that)f (the)i(bag's)e(b)q(ound)h(do)q(es)g(not)g(c)o(hange.)20 b(W)m(e)0 1973 y(do)15 b(not)g(address)i(other)e(kinds)g(of)g(safet)o (y)g(prop)q(erties)i(of)e(computations,)e(e.g.,)i(the)g(existence)i(of) e(an)g(ob)r(ject)h(in)f(a)g(state,)0 2022 y(the)j(n)o(um)o(b)q(er)f(of) g(ob)r(jects)i(in)e(a)h(state,)g(or)g(the)g(relationship)f(b)q(et)o(w)o (een)i(ob)r(jects)g(in)e(a)h(state,)h(since)f(these)h(do)f(not)f(ha)o (v)o(e)0 2072 y(to)e(do)f(with)h(the)g(meanings)f(of)g(t)o(yp)q(es.)22 b(W)m(e)14 b(also)g(do)h(not)g(address)h Fh(liveness)e Fn(prop)q(erties)j(\(\\something)c(go)q(o)q(d)i(ev)o(en)o(tually)0 2122 y(happ)q(ens"\),)f(e.g.,)f(the)h(size)h(of)e(a)h(bag)f(will)g(ev)o (en)o(tually)g(reac)o(h)i(the)f(b)q(ound.)62 2172 y(This)19 b(c)o(hapter)h(pro)o(vides)f(a)g(general,)h(y)o(et)f(easy)h(to)f(use,)h (de\014nition)f(of)f(the)i(subt)o(yp)q(e)g(relation)e(that)h (satis\014es)h(the)0 2222 y(Subt)o(yp)q(e)f(Requiremen)o(t.)29 b(Our)19 b(approac)o(h)f(handles)g(m)o(utable)e(t)o(yp)q(es)j(and)f (allo)o(ws)f(subt)o(yp)q(es)i(to)f(ha)o(v)o(e)f(more)g(metho)q(ds)0 2271 y(than)12 b(their)h(sup)q(ert)o(yp)q(es.)19 b(Dealing)11 b(with)h(m)o(utable)e(t)o(yp)q(es)j(and)f(subt)o(yp)q(es)i(that)e (extend)h(their)f(sup)q(ert)o(yp)q(es)j(has)d(surprising)0 2321 y(consequences)19 b(on)c(ho)o(w)g(to)h(sp)q(ecify)g(and)g(reason)g (ab)q(out)g(ob)r(jects.)24 b(In)16 b(our)g(approac)o(h,)g(w)o(e)g (discard)g(the)g(standard)g(data)0 2371 y(t)o(yp)q(e)f(induction)f (rule,)h(w)o(e)f(prohibit)g(the)h(use)h(of)d(an)i(analogous)e (\\history")h(rule,)g(and)h(w)o(e)g(mak)o(e)e(up)h(for)g(b)q(oth)h (losses)g(b)o(y)0 2421 y(adding)f(explicit)h(predicates)h(to)f(our)g(t) o(yp)q(e)h(sp)q(eci\014cations.)23 b(Our)15 b(sp)q(eci\014cations)h (are)g(formal,)c(whic)o(h)j(means)f(that)h(they)0 2471 y(ha)o(v)o(e)f(a)f(precise)i(mathematical)c(meaning)h(that)i(serv)o(es) h(as)f(a)g(\014rm)e(foundation)h(for)g(reasoning.)18 b(Our)d(sp)q(eci\014cations)g(can)0 2521 y(also)e(b)q(e)i(used)g (informall)o(y)c(as)j(describ)q(ed)i(in)d([LG85)o(].)62 2570 y(Our)g(de\014nition)f(applies)g(in)g(a)g(v)o(ery)h(general)f (distributed)h(en)o(vironmen)o(t)e(in)h(whic)o(h)g(p)q(ossibly)g (concurren)o(t)i(users)g(share)0 2620 y(m)o(utable)i(ob)r(jects.)29 b(Our)18 b(approac)o(h)g(is)f(also)g(constructiv)o(e:)26 b(One)18 b(can)g(pro)o(v)o(e)f(whether)i(a)e(subt)o(yp)q(e)h(relation)f (holds)g(b)o(y)0 2670 y(pro)o(ving)c(a)h(small)d(n)o(um)o(b)q(er)i(of)h (simple)e(lemmas)f(based)k(on)e(the)i(sp)q(eci\014cations)g(of)e(the)i (t)o(w)o(o)e(t)o(yp)q(es.)965 2795 y(1)p eop %%Page: 2 4 2 3 bop 62 42 a Fn(The)11 b(c)o(hapter)g(also)e(explores)i(the)g (rami\014cations)d(of)h(the)i(subt)o(yp)q(e)g(relation)e(and)h(sho)o (ws)h(ho)o(w)e(in)o(teresting)i(t)o(yp)q(e)g(famili)o(es)0 91 y(can)j(b)q(e)g(de\014ned.)19 b(F)m(or)14 b(example,)e(arra)o(ys)i (are)g(not)g(a)f(subt)o(yp)q(e)i(of)e(sequences)j(\(b)q(ecause)g(the)f (user)f(of)g(a)f(sequence)j(exp)q(ects)0 141 y(it)d(not)h(to)f(c)o (hange)h(o)o(v)o(er)f(time\))g(and)g(32-bit)g(in)o(tegers)h(are)g(not)f (a)g(subt)o(yp)q(e)i(of)e(64-bit)f(in)o(tegers)j(\(b)q(ecause)g(a)e (user)i(of)e(64-bit)0 191 y(in)o(tegers)e(w)o(ould)f(exp)q(ect)i (certain)f(metho)q(d)e(calls)h(to)h(succeed)h(that)f(will)e(fail)g (when)i(applied)e(to)i(32-bit)e(in)o(tegers\).)18 b(Ho)o(w)o(ev)o(er,)0 241 y(t)o(yp)q(e)f(families)d(can)i(b)q(e)h(de\014ned)h(that)f(group)f (suc)o(h)h(related)g(t)o(yp)q(es)g(together)h(and)e(th)o(us)h(allo)o(w) e(generic)i(routines)g(to)f(b)q(e)0 291 y(written)f(that)g(w)o(ork)f (for)g(all)g(family)d(mem)o(b)q(ers.)19 b(Our)d(approac)o(h)e(mak)o(es) g(it)g(particularly)g(easy)h(to)f(de\014ne)i(t)o(yp)q(e)f(families:)0 340 y(it)d(emphasizes)g(the)h(prop)q(erties)h(that)f(all)e(family)e (mem)o(b)q(ers)i(m)o(ust)g(preserv)o(e,)k(and)d(it)g(do)q(es)h(not)f (require)h(the)g(in)o(tro)q(duction)0 390 y(of)g(unnecessary)j(metho)q (ds)e(\(i.e.,)e(metho)q(ds)i(that)g(the)g(sup)q(ert)o(yp)q(e)i(w)o (ould)d(not)h(naturally)f(ha)o(v)o(e\).)62 440 y(The)j(c)o(hapter)h(is) e(organized)h(as)g(follo)o(ws.)21 b(Section)16 b(2)f(discusses)j(in)d (more)g(detail)g(what)g(w)o(e)h(require)g(of)f(our)h(subt)o(yp)q(e)0 490 y(relation)e(and)g(pro)o(vides)g(the)h(motiv)n(ation)c(for)j(our)g (approac)o(h.)20 b(W)m(e)13 b(describ)q(e)j(our)f(mo)q(del)e(of)g (computation)g(in)h(Section)g(3)0 540 y(and)f(presen)o(t)i(our)e(sp)q (eci\014cation)h(metho)q(d)e(in)g(Section)i(4.)j(W)m(e)c(giv)o(e)g(a)f (formal)f(de\014nition)i(of)f(subt)o(yping)h(in)g(Section)g(5;)g(w)o(e) 0 589 y(discuss)k(its)f(rami\014cations)e(on)h(designing)h(t)o(yp)q(e)g (hierarc)o(hies)h(in)e(Section)h(6.)24 b(W)m(e)15 b(describ)q(e)j (related)e(w)o(ork)g(in)f(Section)h(7)0 639 y(and)e(summarize)e(our)i (con)o(tributions)f(in)h(Section)g(8.)0 776 y Fj(2)67 b(Motiv)l(ation)0 867 y Fn(T)m(o)15 b(motiv)n(ate)f(the)i(basic)g(idea) f(b)q(ehind)h(our)g(notion)f(of)g(subt)o(yping,)g(let's)h(lo)q(ok)f(at) g(an)h(example.)22 b(Consider)16 b(a)f(b)q(ounded)0 917 y(bag)h(t)o(yp)q(e)i(that)e(pro)o(vides)h(a)g Fh(put)g Fn(metho)q(d)f(that)g(inserts)i(elemen)o(ts)f(in)o(to)f(a)g(bag)h(and)f (a)h Fh(get)f Fn(metho)q(d)g(that)h(remo)o(v)o(es)f(an)0 966 y(arbitrary)g(elemen)o(t)f(from)f(a)i(bag.)24 b Fh(Put)16 b Fn(has)g(a)f(pre-condition)h(that)g(c)o(hec)o(ks)i(to)d(see)i(that)f (adding)g(an)f(elemen)o(t)h(will)e(not)0 1016 y(gro)o(w)f(the)i(bag)e (b)q(ey)o(ond)h(its)g(b)q(ound;)g Fh(get)g Fn(has)g(a)f(pre-condition)h (that)g(c)o(hec)o(ks)h(to)f(see)h(that)f(the)h(bag)e(is)h(non-empt)o(y) m(.)62 1066 y(Consider)h(also)f(a)h(b)q(ounded)g(stac)o(k)g(t)o(yp)q(e) h(that)e(has,)h(in)f(addition)g(to)g Fh(push)i Fn(and)e Fh(p)n(op)h Fn(metho)q(ds,)f(a)h Fh(swap)p 1730 1066 13 2 v 15 w(top)g Fn(metho)q(d)0 1116 y(that)h(tak)o(es)g(an)f(in)o (teger,)i(i,)e(and)g(mo)q(di\014es)g(the)h(stac)o(k)h(b)o(y)e (replacing)h(its)f(top)h(with)f(i.)23 b(Stac)o(k's)16 b Fh(push)h Fn(and)e Fh(p)n(op)h Fn(metho)q(ds)0 1166 y(ha)o(v)o(e)f(pre-conditions)g(similar)d(to)j(bag's)f Fh(put)h Fn(and)g Fh(get)p Fn(,)f(and)h Fh(swap)p 1068 1166 V 15 w(top)g Fn(has)g(a)g(pre-condition)g(requiring)f(that)h(the)h (stac)o(k)0 1215 y(is)e(non-empt)o(y)m(.)62 1265 y(In)o(tuitiv)o(ely)m (,)20 b(stac)o(k)h(is)f(a)f(subt)o(yp)q(e)j(of)d(bag)h(b)q(ecause)i(b)q (oth)e(kinds)g(of)f(collections)i(b)q(eha)o(v)o(e)f(similarly)m(.)33 b(The)21 b(main)0 1315 y(di\013erence)h(is)d(that)h(the)g Fh(get)g Fn(metho)q(d)f(for)g(bags)h(do)q(es)h(not)e(sp)q(ecify)i (precisely)f(what)g(elemen)o(t)f(is)h(remo)o(v)o(ed;)h(the)f Fh(p)n(op)0 1365 y Fn(metho)q(d)e(for)h(stac)o(k)h(is)f(more)f (constrained,)j(but)f(what)f(it)g(do)q(es)h(is)f(one)g(of)g(the)h(p)q (ermitted)f(b)q(eha)o(viors)g(for)g(bag's)g Fh(get)0 1415 y Fn(metho)q(d.)e(Let's)d(ignore)g Fh(swap)p 484 1415 V 15 w(top)g Fn(for)g(the)g(momen)o(t.)62 1465 y(Supp)q(ose)j(w)o (e)e(w)o(an)o(t)g(to)h(sho)o(w)f(stac)o(k)h(is)f(a)g(subt)o(yp)q(e)i (of)e(bag.)22 b(W)m(e)15 b(need)h(to)g(relate)g(the)g(v)n(alues)f(of)g (stac)o(ks)h(to)f(those)i(of)0 1514 y(bags.)24 b(This)16 b(can)h(b)q(e)f(done)h(b)o(y)f(means)f(of)g(an)h Fh(abstr)n(action)h (function)p Fn(,)g(lik)o(e)e(that)h(used)h(for)f(pro)o(ving)f(the)i (correctness)i(of)0 1564 y(implemen)o(tatio)o(ns)c([Hoa72)n(].)27 b(A)17 b(giv)o(en)f(stac)o(k)i(v)n(alue)e(maps)f(to)i(a)g(bag)f(v)n (alue)g(where)i(w)o(e)f(abstract)h(from)d(the)j(insertion)0 1614 y(order)d(on)e(the)i(elemen)o(ts.)62 1664 y(W)m(e)f(also)f(need)i (to)f(relate)h(stac)o(k's)f(metho)q(ds)g(to)f(bag's.)18 b(Clearly)c(there)h(is)f(a)g(corresp)q(ondence)j(b)q(et)o(w)o(een)e (stac)o(k's)f Fh(push)0 1714 y Fn(metho)q(d)c(and)h(bag's)f Fh(put)h Fn(and)f(similarly)e(for)j(the)g Fh(p)n(op)g Fn(and)g Fh(get)g Fn(metho)q(ds)f(\(ev)o(en)i(though)e(the)h(names)f (of)h(the)g(corresp)q(onding)0 1763 y(metho)q(ds)i(do)g(not)g(matc)o (h\).)k(The)c(pre-)h(and)f(p)q(ost-conditions)h(of)e(corresp)q(onding)i (metho)q(ds)f(will)f(need)i(to)f(relate)h(in)f(some)0 1813 y(precise)k(\(to)f(b)q(e)h(de\014ned\))g(w)o(a)o(y)m(.)22 b(In)16 b(sho)o(wing)f(this)h(relationship)f(w)o(e)h(need)h(to)f(app)q (eal)f(to)h(the)g(abstraction)g(function)g(so)0 1863 y(that)e(w)o(e)g(can)g(reason)h(ab)q(out)e(stac)o(k)i(v)n(alues)e(in)h (terms)f(of)h(their)g(corresp)q(onding)h(bag)e(v)n(alues.)62 1913 y(Finally)m(,)f(what)i(ab)q(out)g Fh(swap)p 525 1913 V 16 w(top)p Fn(?)19 b(Most)14 b(other)h(de\014nitions)f(of)g(the) h(subt)o(yp)q(e)g(relation)f(ha)o(v)o(e)g(ignored)g(suc)o(h)h(\\extra") 0 1963 y(metho)q(ds,)10 b(and)g(it)g(is)h(p)q(erfectly)g(adequate)g(do) f(so)h(when)f(programs)g(are)g(considered)i(in)e(isolation)f(and)h (there)i(is)e(no)g(aliasing.)0 2012 y(In)h(suc)o(h)h(a)f(constrained)h (situation,)e(a)h(program)f(that)h(uses)h(an)f(ob)r(ject)h(that)g(is)f (apparen)o(tly)f(a)h(bag)g(but)g(is)g(actually)g(a)g(stac)o(k)0 2062 y(will)f(nev)o(er)j(call)e(the)h(extra)g(metho)q(ds,)f(and)g (therefore)i(their)g(b)q(eha)o(vior)e(is)g(irrelev)n(an)o(t.)17 b(Ho)o(w)o(ev)o(er,)12 b(w)o(e)g(cannot)g(ignore)f(extra)0 2112 y(metho)q(ds)16 b(in)g(the)h(presence)i(of)d(aliasing,)f(and)h (also)g(in)g(a)g(general)g(computational)e(en)o(vironmen)o(t)i(that)g (allo)o(ws)f(sharing)0 2162 y(of)f(m)o(utable)e(ob)r(jects)k(b)o(y)e(m) o(ultiple)e(users)j(or)f(pro)q(cesses.)22 b(In)14 b(particular,)g(w)o (e)g(need)i(to)e(pa)o(y)f(atten)o(tion)h(to)h(extra)f Fh(mutator)0 2212 y Fn(metho)q(ds)f(\(lik)o(e)h Fh(swap)p 350 2212 V 15 w(top)p Fn(\))g(that)g(mo)q(dify)e(their)i(ob)r(ject.)62 2262 y(Consider)h(\014rst)f(the)h(case)g(of)e(aliasing.)k(The)d (problem)f(here)i(is)e(that)h(within)g(a)f(program)g(an)g(ob)r(ject)i (is)f(accessible)h(b)o(y)0 2311 y(more)f(than)i(one)g(name,)e(so)h (that)h(mo)q(di\014cations)e(using)h(one)h(of)e(the)j(names)d(are)i (visible)f(when)h(the)g(ob)r(ject)g(is)g(accessed)0 2361 y(using)e(the)g(other)h(name.)h(F)m(or)e(example,)e(supp)q(ose)j Fg(\033)g Fn(is)f(a)g(subt)o(yp)q(e)g(of)g Fg(\034)k Fn(and)c(that)g(v)n(ariables)104 2441 y(x:)k Fg(\034)104 2491 y Fn(y:)g Fg(\033)0 2570 y Fn(b)q(oth)d(denote)g(the)h(same)e(ob)r (ject)h(\(whic)o(h)g(m)o(ust,)e(of)i(course,)g(b)q(elong)g(to)f Fg(\033)i Fn(or)f(one)g(of)f(its)h(subt)o(yp)q(es\).)22 b(When)15 b(the)g(ob)r(ject)0 2620 y(is)e(accessed)j(through)d(x,)g (only)f Fg(\034)18 b Fn(metho)q(ds)13 b(can)g(b)q(e)h(called.)j(Ho)o(w) o(ev)o(er,)d(when)f(it)g(is)g(used)h(through)g(y)m(,)e Fg(\033)i Fn(metho)q(ds)f(can)g(b)q(e)0 2670 y(called)i(and)h(if)f (these)i(metho)q(ds)e(are)h(m)o(utators,)e(their)i(e\013ects)i(will)c (b)q(e)i(visible)f(later)h(when)g(the)g(ob)r(ject)g(is)g(accessed)i (via)965 2795 y(2)p eop %%Page: 3 5 3 4 bop 0 42 a Fn(x.)20 b(T)m(o)13 b(reason)i(ab)q(out)g(the)g(use)g (of)f(v)n(ariable)f(x)h(using)h(the)g(sp)q(eci\014cation)g(of)f(its)g (t)o(yp)q(e)h Fg(\034)5 b Fn(,)14 b(w)o(e)h(need)g(to)f(imp)q(ose)g (additional)0 91 y(constrain)o(ts)h(on)e(the)i(subt)o(yp)q(e)g (relation.)62 141 y(No)o(w)c(consider)g(the)g(case)h(of)e(an)g(en)o (vironmen)o(t)g(of)g(shared)h(m)o(utable)e(ob)r(jects,)j(suc)o(h)g(as)e (is)h(pro)o(vided)f(b)o(y)h(ob)r(ject-orien)o(ted)0 191 y(databases)j(\(e.g.,)e(Thor)h([Lis92)o(])f(and)h(Gemstone)f([MS90)o (]\).)18 b(In)13 b(suc)o(h)g(systems,)g(there)h(is)f(a)g(univ)o(erse)h (con)o(taining)e(shared,)0 241 y(m)o(utable)k(ob)r(jects)j(and)e(a)g(w) o(a)o(y)g(of)g(naming)f(those)i(ob)r(jects.)30 b(In)18 b(general,)g(lifetimes)e(of)h(ob)r(jects)i(ma)o(y)c(b)q(e)k(longer)e (than)0 291 y(the)f(programs)f(that)h(create)h(and)e(access)j(them)d (\(i.e.,)f(ob)r(jects)j(migh)o(t)d(b)q(e)i(p)q(ersisten)o(t\))i(and)d (users)i(\(or)f(programs\))f(ma)o(y)0 340 y(access)j(ob)r(jects)e (concurren)o(tly)h(and/or)f(ap)q(erio)q(dically)e(for)i(v)n(arying)e (lengths)i(of)f(time.)23 b(Of)15 b(course)i(there)h(is)d(a)h(need)g (for)0 390 y(some)f(form)g(of)g(concurrency)j(con)o(trol)e(in)g(suc)o (h)h(an)f(en)o(vironmen)o(t.)23 b(W)m(e)16 b(assume)g(suc)o(h)g(a)g (mec)o(hanism)e(is)i(in)g(place,)g(and)0 440 y(consider)d(a)f (computation)f(to)h(b)q(e)h(made)e(up)h(out)g(of)g(atomic)e(units)i (\(i.e.,)g(transactions\))h(that)f(exclude)h(one)g(another.)18 b(The)0 490 y(transactions)e(of)g(di\013eren)o(t)g(computations)f(can)h (b)q(e)g(in)o(terlea)o(v)o(ed)g(and)g(th)o(us)g(one)g(computation)e(is) h(able)h(to)g(observ)o(e)g(the)0 540 y(mo)q(di\014cations)c(made)h(b)o (y)g(another.)62 589 y(If)k(there)h(w)o(ere)g(subt)o(yping)e(in)g(suc)o (h)i(an)f(en)o(vironmen)o(t)e(the)j(follo)o(wing)c(situation)i(migh)o (t)f(o)q(ccur.)27 b(A)17 b(user)h(installs)e(a)0 639 y(directory)d(ob)r(ject)f(that)g(maps)f(string)g(names)g(to)h(bags.)17 b(Later,)c(a)e(second)i(user)g(en)o(ters)g(a)f(stac)o(k)g(in)o(to)f (the)i(directory)f(under)0 689 y(some)h(string)h(name;)e(suc)o(h)j(a)e (binding)g(is)h(analogous)f(to)g(assigning)g(a)h(subt)o(yp)q(e)h(ob)r (ject)g(to)e(a)h(v)n(ariable)f(of)g(the)i(sup)q(ert)o(yp)q(e.)0 739 y(After)f(this,)f(b)q(oth)h(users)h(o)q(ccasionally)d(access)j(the) g(stac)o(k)e(ob)r(ject.)19 b(The)14 b(second)h(user)f(kno)o(ws)g(it)f (is)g(a)g(stac)o(k)h(and)f(accesses)0 789 y(it)18 b(using)g(stac)o(k)g (metho)q(ds.)30 b(The)19 b(question)f(is:)26 b(What)18 b(do)q(es)h(the)f(\014rst)h(user)g(need)h(to)d(kno)o(w)h(in)g(order)g (for)g(his)g(or)g(her)0 839 y(programs)13 b(to)g(mak)o(e)g(sense?)62 888 y(W)m(e)i(think)f(it)g(ough)o(t)h(to)f(b)q(e)i(su\016cien)o(t)f (for)f(a)h(user)h(to)e(kno)o(w)g(only)g(ab)q(out)h(the)g(\\apparen)o (t")g(t)o(yp)q(e)g(of)f(the)i(ob)r(ject;)f(the)0 938 y(subt)o(yp)q(e)i(ough)o(t)e(to)h(preserv)o(e)i(an)o(y)e(prop)q(erties) h(that)f(can)g(b)q(e)h(pro)o(v)o(ed)f(ab)q(out)f(the)i(sup)q(ert)o(yp)q (e.)26 b(In)16 b(particular,)g(the)g(\014rst)0 988 y(user)d(ough)o(t)e (to)h(b)q(e)g(able)g(to)f(reason)h(ab)q(out)g(his)g(or)f(her)i(use)f (of)g(the)g(stac)o(k)g(ob)r(ject)h(using)e(in)o(v)n(arian)o(t)f(and)i (history)g(prop)q(erties)0 1038 y(of)h(bag.)62 1088 y(Our)j(approac)o (h)f(ac)o(hiev)o(es)g(this)g(goal)f(b)o(y)h(adding)f(information)e(to)j (t)o(yp)q(e)h(sp)q(eci\014cations.)22 b(T)m(o)14 b(handle)h(in)o(v)n (arian)o(ts,)f(w)o(e)0 1137 y(add)d(an)g Fk(in)o(v)m(arian)o(t)d Fn(clause;)13 b(to)e(handle)g(history)g(prop)q(erties,)i(a)e Fk(constrain)o(t)d Fn(clause.)18 b(Sho)o(wing)10 b(that)i Fg(\033)g Fn(is)f(a)g(subt)o(yp)q(e)h(of)f Fg(\034)0 1187 y Fn(requires)k(sho)o(wing)e(that)g(\(under)i(the)f(abstraction)f (function\))h Fg(\033)q Fn('s)f(in)o(v)n(arian)o(t)f(implies)g Fg(\034)5 b Fn('s)13 b(in)o(v)n(arian)o(t)f(and)h Fg(\033)q Fn('s)h(constrain)o(t)0 1237 y(implies)e Fg(\034)5 b Fn('s)13 b(constrain)o(t.)62 1287 y(F)m(or)h(example,)e(for)h(the)h (bag)g(and)f(stac)o(k)i(example,)d(the)i(t)o(w)o(o)f(in)o(v)n(arian)o (ts)g(are)h(iden)o(tical:)j(b)q(oth)d(state)h(that)f(the)g(size)h(of)0 1337 y(the)d(bag)f(\(stac)o(k\))h(is)g(less)g(than)g(or)f(equal)g(to)h (its)f(b)q(ound.)18 b(Similarl)o(y)m(,)8 b(the)k(t)o(w)o(o)g(constrain) o(ts)g(are)g(iden)o(tical:)k(b)q(oth)c(state)g(that)0 1386 y(the)i(b)q(ound)f(of)g(the)h(bag)f(\(or)g(stac)o(k\))h(do)q(es)g (not)f(c)o(hange.)19 b(Sho)o(wing)12 b(that)h(stac)o(k's)h(in)o(v)n (arian)o(t)e(and)h(constrain)o(t)g(resp)q(ectiv)o(ely)0 1436 y(imply)c(bag's)j(in)o(v)n(arian)o(t)e(and)h(constrain)o(t)i(is)e (trivial.)16 b(The)c(extra)h(metho)q(d)e Fh(swap)p 1269 1436 13 2 v 15 w(top)h Fn(is)g(p)q(ermitted)f(b)q(ecause)j(ev)o(en)e (though)0 1486 y(it)i(c)o(hanges)g(the)h(stac)o(k's)f(con)o(ten)o(ts,)g (it)g(preserv)o(es)i(stac)o(k's)e(in)o(v)n(arian)o(t)f(and)g(constrain) o(t.)62 1536 y(In)20 b(Section)g(5)f(w)o(e)h(presen)o(t)h(and)e (discuss)i(our)f(subt)o(yp)q(e)g(de\014nition.)35 b(First,)21 b(ho)o(w)o(ev)o(er,)g(w)o(e)e(de\014ne)i(our)f(mo)q(del)e(of)0 1586 y(computation,)c(and)h(then)i(discuss)g(sp)q(eci\014cations,)f (since)h(these)g(de\014ne)g(the)f(ob)r(jects,)h(v)n(alues,)e(and)h (metho)q(ds)f(that)g(will)0 1636 y(b)q(e)g(related)f(b)o(y)g(the)g (subt)o(yp)q(e)h(relation.)0 1772 y Fj(3)67 b(Mo)r(del)22 b(of)g(Computation)0 1863 y Fn(W)m(e)16 b(assume)g(a)h(set)g(of)f(all)g (p)q(oten)o(tially)f(existing)h(ob)r(jects,)i Fh(Obj)p Fn(,)f(partitioned)f(in)o(to)g(disjoin)o(t)g(t)o(yp)q(ed)h(sets.)27 b(Eac)o(h)17 b(ob)r(ject)0 1913 y(has)c(a)g(unique)g(iden)o(tit)o(y)m (.)k(A)c Fh(typ)n(e)g Fn(de\014nes)i(a)e(set)h(of)e Fh(values)i Fn(for)e(an)h(ob)r(ject)h(and)f(a)g(set)h(of)f Fh(metho)n(ds)g Fn(that)g(pro)o(vide)g(the)h(only)0 1963 y(means)d(to)h(manipulate)e (that)i(ob)r(ject.)18 b(E\013ectiv)o(ely)13 b Fh(Obj)e Fn(is)h(a)g(set)h(of)e(unique)h(iden)o(ti\014ers)h(for)e(all)g(ob)r (jects)i(that)f(can)g(con)o(tain)0 2012 y(v)n(alues.)62 2062 y(Ob)r(jects)k(can)e(b)q(e)h(created)g(and)f(manipulated)e(in)h (the)i(course)g(of)f(program)e(execution.)19 b(A)14 b Fh(state)g Fn(de\014nes)h(a)f(v)n(alue)f(for)0 2112 y(eac)o(h)i (existing)f(ob)r(ject.)21 b(It)14 b(is)h(a)f(pair)g(of)g(mappings,)e (an)j Fh(envir)n(onment)f Fn(and)h(a)f Fh(stor)n(e)p Fn(.)19 b(An)c(en)o(vironmen)o(t)e(maps)h(program)0 2162 y(v)n(ariables)f(to)h(ob)r(jects;)g(a)g(store)h(maps)e(ob)r(jects)i(to) e(v)n(alues.)104 2242 y Fh(State)h Fn(=)g Fh(Env)g Ff(\002)h Fh(Stor)n(e)104 2291 y(Env)f Fn(=)g Fh(V)m(ar)g Ff(!)f Fh(Obj)104 2341 y(Stor)n(e)g Fn(=)i Fh(Obj)e Ff(!)g Fh(V)m(al)0 2421 y Fn(Giv)o(en)e(a)g(v)n(ariable,)f Fg(x)p Fn(,)i(and)f(a)g(state,) h Fg(\032)p Fn(,)g(with)f(an)h(en)o(vironmen)o(t,)e Fg(\032:e)p Fn(,)i(and)f(store,)i Fg(\032:s)p Fn(,)f(w)o(e)f(use)i(the)f(notation)e Fg(x)1751 2427 y Fe(\032)1782 2421 y Fn(to)h(denote)0 2471 y(the)16 b(v)n(alue)e(of)h Fg(x)f Fn(in)h(state)h Fg(\032)p Fn(;)f(i.e.,)f Fg(x)573 2477 y Fe(\032)606 2471 y Fn(=)g Fg(\032:s)p Fn(\()p Fg(\032:e)p Fn(\()p Fg(x)p Fn(\)\).)22 b(When)15 b(w)o(e)h(refer)g(to)f(the)g(domain)e(of)i (a)f(state,)i Fg(dom)p Fn(\()p Fg(\032)p Fn(\),)g(w)o(e)f(mean)0 2521 y(more)e(precisely)i(the)f(domain)e(of)h(the)i(store)f(in)g(that)g (state.)62 2570 y(W)m(e)i(mo)q(del)e(a)h(t)o(yp)q(e)h(as)g(a)f(triple,) h Ff(h)p Fg(O)q(;)7 b(V)r(;)g(M)e Ff(i)p Fn(,)15 b(where)i Fg(O)e Ff(\022)g Fh(Obj)21 b Fn(is)15 b(a)h(set)g(of)f(ob)r(jects,)i Fg(V)24 b Ff(\022)15 b Fh(V)m(al)k Fn(is)d(a)f(set)i(of)e(v)n(alues,)0 2620 y(and)f Fg(M)19 b Fn(is)14 b(a)g(set)h(of)f(metho)q(ds.)19 b(Eac)o(h)14 b(metho)q(d)g(for)g(an)g(ob)r(ject)h(is)f(a)g Fh(pr)n(o)n(duc)n(er)p Fn(,)f(an)h Fh(observer)p Fn(,)g(or)g(a)g Fh(mutator)p Fn(.)19 b(Pro)q(ducers)0 2670 y(of)12 b(an)h(ob)r(ject)g (of)f(t)o(yp)q(e)i Fg(\034)j Fn(return)d(new)f(ob)r(jects)h(of)f(t)o (yp)q(e)g Fg(\034)5 b Fn(;)12 b(observ)o(ers)j(return)f(results)g(of)e (other)h(t)o(yp)q(es;)h(m)o(utators)d(mo)q(dify)965 2795 y(3)p eop %%Page: 4 6 4 5 bop 0 42 a Fn(ob)r(jects)16 b(of)f(t)o(yp)q(e)h Fg(\034)5 b Fn(.)22 b(An)16 b(ob)r(ject)g(is)f Fh(immutable)g Fn(if)f(its)i(v)n (alue)e(cannot)i(c)o(hange)f(and)g(otherwise)i(it)e(is)g Fh(mutable)p Fn(;)g(a)g(t)o(yp)q(e)h(is)0 91 y(imm)o(utabl)o(e)c(if)i (its)h(ob)r(jects)h(are)g(and)e(otherwise)i(it)f(is)f(m)o(utable.)20 b(Clearly)14 b(a)g(t)o(yp)q(e)i(can)f(b)q(e)g(m)o(utable)f(only)g(if)g (some)g(of)g(its)0 141 y(metho)q(ds)i(are)h(m)o(utators.)26 b(W)m(e)16 b(allo)o(w)f Fh(mixe)n(d)j(metho)n(ds)f Fn(where)g(a)g(pro)q (ducer)h(or)f(an)f(observ)o(er)i(can)f(also)f(b)q(e)i(a)e(m)o(utator.)0 191 y(W)m(e)d(also)g(allo)o(w)e(metho)q(ds)i(to)g(signal)f(exceptions;) j(w)o(e)e(assume)g(termination)e(exceptions,)j(i.e.,)e(eac)o(h)i(metho) q(d)f(call)f(either)0 241 y(terminates)k(normally)e(or)j(in)f(one)h(of) f(a)g(n)o(um)o(b)q(er)g(of)g(named)g(exception)h(conditions.)26 b(T)m(o)16 b(b)q(e)h(consisten)o(t)h(with)e(ob)r(ject-)0 291 y(orien)o(ted)f(language)f(notation,)f(w)o(e)i(write)f Fh(x.m\(a\))h Fn(to)f(denote)i(the)f(call)e(of)h(metho)q(d)g Fg(m)h Fn(on)f(ob)r(ject)h Fg(x)g Fn(with)f(the)h(sequence)0 340 y(of)e(argumen)o(ts)g Fg(a)p Fn(.)62 390 y(Ob)r(jects)18 b(come)e(in)o(to)f(existence)j(and)f(get)f(their)h(initial)d(v)n(alues) i(through)g Fh(cr)n(e)n(ators)p Fn(.)25 b(\(These)18 b(are)e(often)h(called)f Fh(c)n(on-)0 440 y(structors)c Fn(in)h(the)g(literature.\))19 b(Unlik)o(e)12 b(other)i(kinds)f(of)g (metho)q(ds,)f(creators)i(do)f(not)g(b)q(elong)g(to)g(particular)g(ob)r (jects,)h(but)0 490 y(rather)h(are)f(indep)q(enden)o(t)h(op)q (erations.)62 540 y(A)j Fh(c)n(omputation)p Fn(,)g(i.e.,)f(program)f (execution,)i(is)g(a)f(sequence)i(of)e(alternating)g(states)h(and)g (transitions)f(starting)g(in)0 589 y(some)c(initial)f(state,)i Fg(\032)358 595 y Fi(0)377 589 y Fn(:)104 672 y Fg(\032)125 678 y Fi(0)172 672 y Fg(T)6 b(r)221 678 y Fi(1)267 672 y Fg(\032)288 678 y Fi(1)334 672 y Fg(:::)27 b(\032)418 678 y Fe(n)p Fd(\000)p Fi(1)511 672 y Fg(T)6 b(r)560 678 y Fe(n)610 672 y Fg(\032)631 678 y Fe(n)0 756 y Fn(Eac)o(h)15 b(transition,)e Fg(T)6 b(r)354 762 y Fe(i)368 756 y Fn(,)13 b(of)h(a)g(computation)f(sequence)j(is)e(a)g(partial)f(function)h(on)g (states;)h(w)o(e)g(assume)f(the)h(execution)g(of)0 805 y(eac)o(h)f(transition)g(is)g(atomic.)i(A)e Fh(history)g Fn(is)f(the)i(subsequence)h(of)e(states)h(of)e(a)h(computation;)e(w)o (e)i(use)g Fg(\032)h Fn(and)f Fg( )h Fn(to)f(range)0 855 y(o)o(v)o(er)f(states)i(in)e(an)o(y)f(computation,)f Fg(c)p Fn(,)i(where)i Fg(\032)e Fn(precedes)j Fg( )f Fn(in)e Fg(c)p Fn(.)k(The)d(v)n(alue)f(of)f(an)h(ob)r(ject)h(can)g(c)o (hange)f(only)g(through)0 905 y(the)g(in)o(v)o(o)q(cation)f(of)g(a)h(m) o(utator;)e(in)i(addition)e(the)j(en)o(vironmen)o(t)e(can)h(c)o(hange)g (through)g(assignmen)o(t)f(and)g(the)i(domain)d(of)0 955 y(the)j(store)h(can)f(c)o(hange)h(through)f(the)g(in)o(v)o(o)q (cation)f(of)g(a)h(creator)g(or)g(pro)q(ducer.)62 1005 y(Ob)r(jects)i(are)e(nev)o(er)h(destro)o(y)o(ed:)104 1088 y Ff(8)f Fn(1)d Ff(\024)h Fg(i)g Ff(\024)f Fg(n)j(:)g(dom)p Fn(\()p Fg(\032)466 1094 y Fe(i)p Fd(\000)p Fi(1)523 1088 y Fn(\))25 b Ff(\022)h Fg(dom)p Fn(\()p Fg(\032)737 1094 y Fe(i)751 1088 y Fn(\).)0 1225 y Fj(4)67 b(Sp)r(eci\014cations)0 1324 y Fc(4.1)56 b(T)n(yp)r(e)18 b(Sp)r(eci\014cations)0 1401 y Fn(A)c(t)o(yp)q(e)g(sp)q(eci\014cation)h(includes)f(the)h(follo) o(wing)c(information:)62 1484 y Ff(\017)21 b Fn(The)14 b(t)o(yp)q(e's)g(name;)62 1567 y Ff(\017)21 b Fn(A)14 b(description)g(of)g(the)g(t)o(yp)q(e's)g(v)n(alue)g(space;)62 1650 y Ff(\017)21 b Fn(A)14 b(de\014nition)f(of)h(the)g(t)o(yp)q(e's)g (in)o(v)n(arian)o(t)f(and)g(history)h(prop)q(erties;)62 1733 y Ff(\017)21 b Fn(F)m(or)13 b(eac)o(h)i(of)e(the)h(t)o(yp)q(e's)h (metho)q(ds:)150 1816 y Fk({)21 b Fn(Its)14 b(name;)150 1882 y Fk({)21 b Fn(Its)14 b(signature)h(\(including)e(signaled)g (exceptions\);)150 1949 y Fk({)21 b Fn(Its)14 b(b)q(eha)o(vior)g(in)f (terms)h(of)f(pre-conditions)i(and)e(p)q(ost-conditions.)0 2032 y(Note)18 b(that)g(the)g(creators)h(are)g(missing.)27 b(Omitting)16 b(creators)j(allo)o(ws)e(subt)o(yp)q(es)i(to)f(pro)o (vide)f(di\013eren)o(t)i(creators)g(than)0 2081 y(their)c(sup)q(ert)o (yp)q(es.)21 b(In)14 b(addition,)f(omitting)e(creators)16 b(mak)o(es)d(it)h(easy)g(for)g(a)g(t)o(yp)q(e)h(to)f(ha)o(v)o(e)g(m)o (ultiple)e(implem)o(en)o(tations,)0 2131 y(allo)o(ws)h(new)i(creators)h (to)e(b)q(e)h(added)g(later,)f(and)g(re\015ects)j(common)11 b(usage:)20 b(for)14 b(example,)f(Ja)o(v)n(a)g(in)o(terfaces)j(and)e (virtual)0 2181 y(t)o(yp)q(es)f(pro)o(vide)g(no)f(w)o(a)o(y)g(for)g (users)i(to)f(create)h(ob)r(jects)g(of)e(the)h(t)o(yp)q(e.)18 b(W)m(e)12 b(sho)o(w)h(ho)o(w)f(to)g(sp)q(ecify)h(creators)h(in)e (Section)h(4.2.)62 2231 y(In)h(our)g(w)o(ork)f(w)o(e)h(use)g(formal)d (sp)q(eci\014cations)k(in)e(the)i(t)o(w)o(o-tiered)e(st)o(yle)h(of)f (Larc)o(h)h([GHW85)o(].)j(The)d(\014rst)h(tier)f(de\014nes)0 2281 y Fh(sorts)p Fn(,)g(whic)o(h)h(are)g(used)h(to)f(de\014ne)h(the)f (v)n(alue)g(spaces)h(of)e(ob)r(jects.)23 b(In)15 b(the)g(second)h (tier,)f(Larc)o(h)h Fh(interfac)n(es)e Fn(are)h(used)h(to)0 2331 y(de\014ne)f(t)o(yp)q(es.)62 2380 y(F)m(or)i(example,)f(Figure)h (1)g(giv)o(es)g(a)g(sp)q(eci\014cation)h(for)e(a)h(bag)g(t)o(yp)q(e)g (whose)h(ob)r(jects)g(ha)o(v)o(e)f(metho)q(ds)g Fh(put)p Fn(,)g Fh(get)p Fn(,)h Fh(c)n(ar)n(d)p Fn(,)0 2430 y(and)f Fh(e)n(qual)p Fn(.)28 b(The)18 b Fk(uses)e Fn(clause)h(de\014nes)i(the) f(v)n(alue)e(space)i(for)f(the)h(t)o(yp)q(e)g(b)o(y)f(iden)o(tifying)e (a)i(sort.)28 b(The)18 b(clause)g(in)e(the)0 2480 y(\014gure)f (indicates)f(that)g(v)n(alues)g(of)f(ob)r(jects)i(of)e(t)o(yp)q(e)i (bag)e(are)i(denotable)f(b)o(y)g(terms)f(of)h(sort)g Fg(B)j Fn(in)o(tro)q(duced)e(in)e(the)i(BBag)0 2530 y(sp)q (eci\014cation;)e(a)e(v)n(alue)g(of)g(this)h(sort)g(is)g(a)f(pair,)h Ff(h)p Fg(el)q(ems;)7 b(bound)p Ff(i)p Fn(,)12 b(where)h Fh(elems)e Fn(is)h(a)f(mathematical)e(m)o(ultiset)h(of)h(in)o(tegers)0 2580 y(and)20 b Fh(b)n(ound)h Fn(is)f(a)g(natural)f(n)o(um)o(b)q(er.)36 b(The)21 b(notation)e Ff(f)h(g)f Fn(stands)i(for)f(the)h(empt)o(y)e(m)o (ultiset,)h Ff([)f Fn(is)h(a)g(comm)o(utativ)o(e)0 2629 y(op)q(eration)f(on)h(m)o(ultisets)e(that)i(do)q(es)g(not)g(discard)f (duplicates,)i Ff(2)e Fn(is)h(the)g(mem)o(b)q(ership)e(op)q(eration,)i (and)g Ff(j)f Fg(x)g Ff(j)g Fn(is)g(a)965 2795 y(4)p eop %%Page: 5 7 5 6 bop 0 42 a Fn(cardinalit)o(y)13 b(op)q(eration)h(that)g(returns)i (the)f(total)f(n)o(um)o(b)q(er)f(of)h(elemen)o(ts)g(in)g(the)h(m)o (ultiset)d Fg(x)p Fn(.)19 b(These)d(op)q(erations)e(as)h(w)o(ell)0 91 y(as)f(equalit)o(y)f(\(=\))h(and)g(inequalit)o(y)f(\()p Ff(6)p Fn(=\))h(are)g(all)f(de\014ned)i(in)e(BBag.)62 141 y(The)i Fk(in)o(v)m(arian)o(t)d Fn(clause)j(con)o(tains)g(a)f (single-state)h(predicate)h(that)f(de\014nes)h(the)f(t)o(yp)q(e's)g(in) o(v)n(arian)o(t)e(prop)q(erties.)22 b(The)0 191 y Fk(constrain)o(t)11 b Fn(clause)j(con)o(tains)g(a)g(t)o(w)o(o-state)g(predicate)h(that)f (de\014nes)i(the)e(t)o(yp)q(e's)h(history)f(prop)q(erties.)20 b(W)m(e)13 b(will)g(discuss)0 241 y(these)i(clauses)g(in)f(more)e (detail)i(in)f(subsequen)o(t)j(sections.)p 0 299 1950 1 v 104 368 a(bag)d(=)h Fk(t)o(yp)q(e)104 459 y(uses)f Fn(BBag)h(\(bag)f Fk(for)g Fh(B)p Fn(\))104 509 y Fk(for)i(all)d Fg(b)p Fn(:)18 b(bag)104 617 y Fk(in)o(v)m(arian)o(t)11 b Ff(j)i Fg(b)345 623 y Fe(\032)364 617 y Fg(:el)q(ems)i Ff(j)c(\024)h Fg(b)582 623 y Fe(\032)601 617 y Fg(:bound)104 667 y Fk(constrain)o(t)f Fg(b)345 673 y Fe(\032)364 667 y Fg(:bound)f Fn(=)i Fg(b)557 673 y Fe( )582 667 y Fg(:bound)104 766 y Fh(put)i Fn(=)g Fk(pro)q(c)f Fn(\()p Fh(i:)19 b Fn(in)o(t\))221 816 y Fk(requires)12 b Ff(j)h Fg(b)445 822 y Fe(pr)q(e)496 816 y Fg(:el)q(ems)i Ff(j)c Fg(<)h(b)714 822 y Fe(pr)q(e)765 816 y Fg(:bound)221 866 y Fk(mo)q(di\014es)7 b Fg(b)221 916 y Fk(ensures)25 b Fg(b)420 922 y Fe(post)483 916 y Fg(:el)q(ems)13 b Fn(=)f Fg(b)676 922 y Fe(pr)q(e)727 916 y Fg(:el)q(ems)f Ff([)d(f)p Fg(i)p Ff(g)23 b(^)g Fg(b)1040 922 y Fe(post)1104 916 y Fg(:bound)10 b Fn(=)i Fg(b)1297 922 y Fe(pr)q(e)1348 916 y Fg(:bound)104 1015 y Fh(get)i Fn(=)g Fk(pro)q(c)f Fn(\()h(\))g Fk(returns)e Fn(\(in)o(t\))216 1065 y Fk(requires)f Fg(b)414 1071 y Fe(pr)q(e)465 1065 y Fg(:el)q(ems)i Ff(6)p Fn(=)f Ff(fg)216 1115 y Fk(mo)q(di\014es)6 b Fg(b)216 1165 y Fk(ensures)24 b Fg(b)414 1171 y Fe(post)478 1165 y Fg(:el)q(ems)13 b Fn(=)f Fg(b)671 1171 y Fe(pr)q(e)722 1165 y Fg(:el)q(ems)e Ff(\000)g(f)p Fg(r)q(esul)q(t)p Ff(g)f(^)g Fg(r)q(esul)q(t)j Ff(2)f Fg(b)1269 1171 y Fe(pr)q(e)1320 1165 y Fg(:el)q(ems)16 b Ff(^)396 1215 y Fg(b)414 1221 y Fe(post)478 1215 y Fg(:bound)10 b Fn(=)i Fg(b)671 1221 y Fe(pr)q(e)722 1215 y Fg(:bound)104 1314 y Fh(c)n(ar)n(d)h Fn(=)i Fk(pro)q(c)e Fn(\()h(\))g Fk(returns)d Fn(\(in)o(t\))216 1364 y Fk(ensures)24 b Fg(r)q(esul)q(t)13 b Fn(=)e Ff(j)j Fg(b)606 1370 y Fe(pr)q(e)657 1364 y Fg(:el)q(ems)h Ff(j)104 1464 y Fh(e)n(qual)f Fn(=)g Fk(pro)q(c)f Fn(\()p Fh(a:)19 b Fn(bag\))13 b Fk(returns)f Fn(\(b)q(o)q(ol\))216 1514 y Fk(ensures)24 b Fg(r)q(esul)q(t)13 b Fn(=)e(\()p Fg(a)h Fn(=)g Fg(b)p Fn(\))104 1622 y Fk(end)h Fn(bag)611 1704 y(Figure)h(1:)k(A)c(T)o(yp)q (e)g(Sp)q(eci\014cation)g(for)g(Bags)p 0 1754 V 62 1845 a(The)f(b)q(o)q(dy)g(of)f(a)g(t)o(yp)q(e)h(sp)q(eci\014cation)h(pro)o (vides)e(a)h(sp)q(eci\014cation)g(for)f(eac)o(h)h(metho)q(d.)k(Since)c (a)g(metho)q(d's)e(sp)q(eci\014cation)0 1895 y(needs)k(to)e(refer)h(to) f(the)h(metho)q(d's)f(ob)r(ject,)g(w)o(e)h(in)o(tro)q(duce)g(a)f(name)f (for)h(that)g(ob)r(ject)h(in)f(the)h Fk(for)g(all)e Fn(line.)18 b(W)m(e)13 b(use)h Fh(r)n(esult)0 1945 y Fn(to)f(name)f(a)h(metho)q (d's)f(result)i(parameter.)k(In)13 b(the)h Fk(requires)d Fn(and)i Fk(ensures)e Fn(clauses)k Fg(x)e Fn(stands)h(for)e(an)h(ob)r (ject,)h Fg(x)1836 1951 y Fe(pr)q(e)1900 1945 y Fn(for)0 1995 y(its)i(v)n(alue)g(in)g(the)h(initial)e(state,)i(and)f Fg(x)641 2001 y Fe(post)721 1995 y Fn(for)g(its)h(v)n(alue)e(in)h(the)h (\014nal)f(state.)1276 1980 y Fi(1)1321 1995 y Fn(Distinguishing)f(b)q (et)o(w)o(een)j(initial)c(and)0 2045 y(\014nal)g(v)n(alues)g(is)g (necessary)j(only)c(for)h(m)o(utable)f(t)o(yp)q(es,)i(so)g(w)o(e)f (suppress)j(the)e(subscripts)h(for)e(parameters)h(of)e(imm)o(utable)0 2095 y(t)o(yp)q(es)19 b(\(lik)o(e)e(in)o(tegers\).)31 b(W)m(e)17 b(need)i(to)f(distinguish)f(b)q(et)o(w)o(een)i(an)f(ob)r (ject,)h Fg(x)p Fn(,)f(and)f(its)h(v)n(alue,)g Fg(x)1569 2101 y Fe(pr)q(e)1638 2095 y Fn(or)f Fg(x)1716 2101 y Fe(post)1780 2095 y Fn(,)h(b)q(ecause)0 2144 y(w)o(e)f(sometimes)f (need)i(to)f(refer)h(to)f(the)h(ob)r(ject)f(itself,)h(e.g.,)e(in)h(the) h Fh(e)n(qual)f Fn(metho)q(d,)g(whic)o(h)g(determines)g(whether)h(t)o (w)o(o)0 2194 y(\(m)o(utable\))13 b(bags)g(are)i(the)f(same)f(ob)r (ject.)62 2244 y(A)j(metho)q(d)g Fg(m)p Fn('s)g Fh(pr)n(e-c)n(ondition) p Fn(,)g(denoted)h Fh(m.pr)n(e)p Fn(,)f(is)g(the)g(predicate)h(that)g (app)q(ears)f(in)g(its)g Fk(requires)e Fn(clause;)j(e.g.,)0 2294 y Fh(put)p Fn('s)e(pre-condition)g(c)o(hec)o(ks)i(to)d(see)j(that) e(adding)f(an)h(elemen)o(t)g(will)e(not)i(enlarge)g(the)h(bag)f(b)q(ey) o(ond)g(its)g(b)q(ound.)22 b(If)14 b(the)0 2344 y(clause)g(is)g (missing,)e(the)i(pre-condition)g(is)g(trivially)e(\\true.")62 2393 y(A)h(metho)q(d)f Fg(m)p Fn('s)i Fh(p)n(ost-c)n(ondition)p Fn(,)f(denoted)h Fh(m.p)n(ost)p Fn(,)e(is)h(the)h(conjunction)e(of)h (the)g(predicates)i(giv)o(en)d(b)o(y)h(its)g Fk(mo)q(di\014es)0 2443 y Fn(and)h Fk(ensures)e Fn(clauses.)19 b(A)14 b Fk(mo)q(di\014es)d Fg(x)658 2449 y Fi(1)677 2443 y Fg(;)c(:)g(:)g(:)e (;)i(x)794 2449 y Fe(n)829 2443 y Fn(clause)15 b(is)e(shorthand)i(for)e (the)i(predicate:)104 2526 y Ff(8)f Fg(x)d Ff(2)g Fn(\()p Fg(dom)p Fn(\()p Fg(pr)q(e)p Fn(\))f Ff(\000)g(f)p Fg(x)498 2532 y Fi(1)516 2526 y Fg(;)d(:)g(:)g(:)t(;)g(x)632 2532 y Fe(n)654 2526 y Ff(g)p Fn(\))14 b Fg(:)f(x)754 2532 y Fe(pr)q(e)817 2526 y Fn(=)f Fg(x)885 2532 y Fe(post)p 0 2565 780 2 v 46 2592 a Fb(1)64 2603 y Fo(Note)j(that)f Fa(pr)n(e)i Fo(and)e Fa(p)n(ost)i Fo(are)f(implicitly)d(univ)o(ersally) h(quan)o(ti\014ed)f(v)n(ariables)h(o)o(v)o(er)h(states.)26 b(Also,)16 b(more)e(formally)m(,)g Fr(x)1731 2607 y Fp(pr)q(e)1794 2603 y Fo(stands)g(for)0 2643 y Fa(pr)n(e.s\(pr)n(e.e\(x\)\))p Fo(;)e Fr(x)265 2647 y Fp(post)336 2643 y Fo(stands)e(for)h Fa(p)n(ost.s\(p)n(ost.e\(x\)\))p Fo(.)965 2795 y Fn(5)p eop %%Page: 6 8 6 7 bop 0 42 a Fn(whic)o(h)18 b(sa)o(ys)h(only)f(ob)r(jects)i(listed)e (ma)o(y)f(c)o(hange)i(in)f(v)n(alue.)31 b(A)18 b Fk(mo)q(di\014es)f Fn(clause)i(is)f(a)h(strong)f(statemen)o(t)h(ab)q(out)f(all)0 91 y(ob)r(jects)f(not)f(explicitly)e(listed,)i(i.e.,)f(their)h(v)n (alues)f(ma)o(y)f(not)i(c)o(hange;)g(if)f(there)i(is)f(no)f Fk(mo)q(di\014es)f Fn(clause)i(then)h(nothing)0 141 y(ma)o(y)g(c)o (hange.)32 b(F)m(or)18 b(example,)h Fh(c)n(ar)n(d)p Fn('s)f(p)q (ost-condition)g(sa)o(ys)h(that)g(it)f(returns)i(the)f(size)h(of)e(the) h(bag)f(and)g(no)h(ob)r(jects)0 191 y(\(including)12 b(the)i(bag\))e(c)o(hange,)h(and)g Fh(put)p Fn('s)g(p)q(ost-condition)g (sa)o(ys)g(that)g(the)h(bag's)e(v)n(alue)h(c)o(hanges)g(b)o(y)g(the)h (addition)e(of)g(its)0 241 y(in)o(teger)i(argumen)o(t,)f(and)g(no)h (other)h(ob)r(jects)g(c)o(hange.)62 291 y(Metho)q(ds)i(ma)o(y)d (terminate)i(normally)d(or)j(exceptionally;)g(the)h(exceptions)g(are)f (listed)g(in)g(a)g Fk(signals)d Fn(clause)k(in)e(the)0 340 y(metho)q(d's)e(header.)19 b(F)m(or)13 b(example,)g(instead)h(of)f (the)i Fh(get)e Fn(metho)q(d)g(w)o(e)i(migh)o(t)c(ha)o(v)o(e)j(had)104 419 y Fh(get)160 403 y Fd(0)185 419 y Fn(=)g Fk(pro)q(c)g Fn(\()g(\))g Fk(returns)d Fn(\(in)o(t\))j Fk(signals)d Fn(\(empt)o(y\))231 468 y Fk(mo)q(di\014es)h Fg(b)231 518 y Fk(ensures)26 b(if)31 b Fg(b)491 524 y Fe(pr)q(e)542 518 y Fg(:el)q(ems)13 b Fn(=)f Ff(f)h(g)28 b Fk(then)12 b(signal)g Fn(empt)o(y)398 568 y Fk(else)26 b Fg(b)519 574 y Fe(post)583 568 y Fg(:el)q(ems)13 b Fn(=)e Fg(b)775 574 y Fe(pr)q(e)827 568 y Fg(:el)q(ems)f Ff(\000)g(f)p Fg(r)q(esul)q(t)p Ff(g)k(^)504 618 y Fg(r)q(esul)q(t)e Ff(2)f Fg(b)683 624 y Fe(pr)q(e)734 618 y Fg(:el)q(ems)25 b Ff(^)d Fg(b)945 624 y Fe(post)1009 618 y Fg(:bound)10 b Fn(=)i Fg(b)1202 624 y Fe(pr)q(e)1253 618 y Fg(:bound)0 733 y Fc(4.2)56 b(Sp)r(ecifying)17 b(Creators)0 810 y Fn(Ob)r(jects)c(are)f(created)g(and)f(initialized)f(through)h (creators.)19 b(Figure)11 b(2)g(sho)o(ws)h(sp)q(eci\014cations)g(for)f (three)h(di\013eren)o(t)h(creators)0 860 y(for)i(bags.)21 b(The)15 b(\014rst)h(creator)g(creates)h(a)e(new)g(empt)o(y)f(bag)g (whose)i(b)q(ound)f(is)g(its)g(in)o(teger)g(argumen)o(t.)21 b(The)15 b(second)h(and)0 909 y(third)c(creators)g(\014x)g(the)g(bag's) f(b)q(ound)g(to)h(b)q(e)g(100.)k(The)c(third)g(creator)g(uses)h(its)f (in)o(teger)f(argumen)o(t)g(to)g(create)i(a)e(singleton)0 959 y(bag.)18 b(The)c(assertion)g Fk(new)p Fn(\()p Fg(x)p Fn(\))g(stands)h(for)e(the)i(predicate:)104 1037 y Fg(x)c Ff(2)g Fg(dom)p Fn(\()p Fg(post)p Fn(\))f Ff(\000)g Fg(dom)p Fn(\()p Fg(pr)q(e)p Fn(\))0 1116 y(Recall)j(that)h(ob)r(jects)h(are)f (nev)o(er)h(destro)o(y)o(ed)g(so)f(that)g Fg(dom)p Fn(\()p Fg(pr)q(e)p Fn(\))e Ff(\022)g Fg(dom)p Fn(\()p Fg(post)p Fn(\).)p 0 1174 1950 1 v 0 1249 a Fh(b)n(ag)p 60 1249 13 2 v 16 w(cr)n(e)n(ate)p Fn(=)h Fk(pro)q(c)h Fn(\()p Fh(n:)k Fn(in)o(t\))c Fk(returns)d Fn(\(bag\))178 1299 y Fk(requires)h Fg(n)f Ff(\025)h Fn(0)178 1348 y Fk(ensures)25 b(new)p Fh(\(r)n(esult\))13 b Ff(^)g Fg(r)q(esul)q(t)739 1354 y Fe(post)815 1348 y Fn(=)26 b Ff(hfg)p Fg(;)7 b(n)p Ff(i)0 1448 y Fh(b)n(ag)p 60 1448 V 16 w(cr)n(e)n(ate)p 182 1448 V 14 w(smal)r(l)14 b Fn(=)g Fk(pro)q(c)f Fn(\()h(\))g Fk(returns)e Fn(\(bag\))178 1498 y Fk(ensures)25 b(new)p Fh(\(r)n(esult\))13 b Ff(^)g Fg(r)q(esul)q(t)739 1504 y Fe(post)815 1498 y Fn(=)26 b Ff(hfg)p Fg(;)7 b Fn(100)p Ff(i)0 1597 y Fh(b)n(ag)p 60 1597 V 16 w(cr)n(e)n(ate)p 182 1597 V 14 w(single)14 b Fn(=)g Fk(pro)q(c)g Fn(\()p Fh(i:)k Fn(in)o(t\))13 b Fk(returns)f Fn(\(bag\))178 1647 y Fk(ensures)25 b(new)p Fh(\(r)n(esult\))13 b Ff(^)g Fg(r)q(esul)q(t)739 1653 y Fe(post)815 1647 y Fn(=)26 b Ff(hf)p Fg(i)p Ff(g)p Fg(;)7 b Fn(100)p Ff(i)603 1737 y Fn(Figure)14 b(2:)j(Creator)e(Sp)q(eci\014cations)g(for)e(Bags)p 0 1786 1950 1 v 0 1939 a Fc(4.3)56 b(T)n(yp)r(e)18 b(Sp)r (eci\014cations)f(Need)h(Explicit)e(In)n(v)m(arian)n(ts)0 2015 y Fn(By)11 b(not)g(including)f(creators)i(in)e(t)o(yp)q(e)i(sp)q (eci\014cations)g(and)e(b)o(y)h(allo)o(wing)e(subt)o(yp)q(es)j(to)f (extend)g(sup)q(ert)o(yp)q(es)j(with)c(m)o(utators)0 2065 y(w)o(e)i(lose)g(a)g(p)q(o)o(w)o(erful)f(reasoning)h(to)q(ol:)17 b(data)11 b(t)o(yp)q(e)i(induction.)k(Data)11 b(t)o(yp)q(e)h(induction) g(is)g(used)g(to)g(pro)o(v)o(e)g(t)o(yp)q(e)h(in)o(v)n(arian)o(ts.)0 2115 y(The)j(base)h(case)g(of)e(the)h(rule)g(requires)h(that)f(eac)o(h) h(creator)f(of)g(the)g(t)o(yp)q(e)g(establish)h(the)f(in)o(v)n(arian)o (t;)f(the)h(inductiv)o(e)g(case)0 2165 y(requires)c(that)f(eac)o(h)h (metho)q(d)e(\(in)h(particular)f(eac)o(h)i(m)o(utator\))e(preserv)o(e)j (the)e(in)o(v)n(arian)o(t.)16 b(Without)10 b(the)h(creators,)i(w)o(e)e (ha)o(v)o(e)0 2215 y(no)k(base)h(case.)24 b(Without)15 b(kno)o(wing)f(all)g(m)o(utators)g(of)h(t)o(yp)q(e)h Fg(\034)k Fn(\(as)c(added)g(b)o(y)f Fg(\034)5 b Fn('s)15 b(subt)o(yp)q(es\),)i(w)o(e)f(ha)o(v)o(e)f(an)g(incomplete)0 2264 y(inductiv)o(e)f(case.)19 b(With)13 b(no)h(data)f(t)o(yp)q(e)i (induction)e(rule,)h(w)o(e)g(cannot)g(pro)o(v)o(e)g(t)o(yp)q(e)g(in)o (v)n(arian)o(ts!)62 2314 y(T)m(o)i(comp)q(ensate)g(for)g(the)h(lac)o(k) f(of)g(a)g(data)g(t)o(yp)q(e)g(induction)g(rule,)h(w)o(e)g(state)g(the) g(in)o(v)n(arian)o(t)d(explicitly)i(in)g(the)g(t)o(yp)q(e)0 2364 y(sp)q(eci\014cation)e(through)g(an)f Fk(in)o(v)m(arian)o(t)d Fn(clause;)k(if)e(the)i(in)o(v)n(arian)o(t)e(is)h(trivial)f(\(i.e.,)g (iden)o(tical)h(to)g(\\true"\),)h(the)g(clause)g(can)0 2414 y(b)q(e)h(omitted.)h(The)e(in)o(v)n(arian)o(t)f(de\014nes)i(the)g Fh(le)n(gal)e Fn(v)n(alues)g(of)h(its)g(t)o(yp)q(e)g Fg(\034)5 b Fn(.)18 b(F)m(or)13 b(example,)f(w)o(e)j(include)104 2492 y Fk(in)o(v)m(arian)o(t)c Ff(j)i Fg(b)345 2498 y Fe(\032)364 2492 y Fg(:el)q(ems)i Ff(j)c(\024)h Fg(b)582 2498 y Fe(\032)601 2492 y Fg(:bound)0 2570 y Fn(in)j(the)h(t)o(yp)q(e)g (sp)q(eci\014cation)g(of)e(Figure)i(1)f(to)g(state)h(that)g(the)f(size) i(of)d(a)h(b)q(ounded)h(bag)f(nev)o(er)h(exceeds)i(its)d(b)q(ound.)23 b(The)0 2620 y(predicate)15 b Fg(\036)p Fn(\()p Fg(x)245 2626 y Fe(\032)264 2620 y Fn(\))e(app)q(earing)g(in)g(an)h Fk(in)o(v)m(arian)o(t)c Fn(clause)k(for)g(t)o(yp)q(e)g Fg(\034)k Fn(stands)c(for)f(the)h(predicate:)19 b(F)m(or)14 b(all)e(computations,)0 2670 y Fg(c)p Fn(,)h(and)h(all)f(states)i Fg(\032)f Fn(in)g Fg(c)p Fn(,)965 2795 y(6)p eop %%Page: 7 9 7 8 bop 104 42 a Ff(8)p Fg(x)11 b Fn(:)g Fg(\034)19 b(:)13 b(x)e Ff(2)h Fg(dom)p Fn(\()p Fg(\032)p Fn(\))g Ff(\))f Fg(\036)p Fn(\()p Fg(x)583 48 y Fe(\032)602 42 y Fn(\))0 125 y(An)o(y)16 b(additional)e(in)o(v)n(arian)o(t)h(prop)q(ert)o(y)i(m) o(ust)e(follo)o(w)f(from)h(the)i(conjunction)f(of)f(the)i(t)o(yp)q(e's) g(in)o(v)n(arian)o(t)d(and)i(in)o(v)n(arian)o(ts)0 174 y(that)11 b(hold)g(for)f(the)i(en)o(tire)g(v)n(alue)e(space.)18 b(F)m(or)11 b(example,)f(w)o(e)h(could)g(sho)o(w)g(that)g(the)h(size)g (of)e(a)h(bag)g(is)f(nonnegativ)o(e)h(b)q(ecause)0 224 y(this)j(is)g(true)g(for)g(all)f(mathematical)d(m)o(ultiset)j(v)n (alues.)62 274 y(As)h(part)g(of)f(sp)q(ecifying)g(a)h(t)o(yp)q(e)g(and) f(its)h(creators)h(w)o(e)e(m)o(ust)g(sho)o(w)g(that)h(the)g(in)o(v)n (arian)o(t)e(holds)h(for)g(all)g(ob)r(jects)h(of)f(the)0 324 y(t)o(yp)q(e.)19 b(All)13 b(creators)i(for)e(a)h(t)o(yp)q(e)g Fg(\034)19 b Fn(m)o(ust)13 b Fh(establish)g Fg(\034)5 b Fn('s)14 b Fh(invariant)p Fn(,)f Fg(I)1104 330 y Fe(\034)1125 324 y Fn(:)104 407 y(F)m(or)g(eac)o(h)i(creator)g(for)e(t)o(yp)q(e)i Fg(\034)5 b Fn(,)13 b(sho)o(w)h(for)f(all)g Fg(x)5 b Fn(:)g Fg(\034)17 b Fn(that)d Fg(I)1031 413 y Fe(\034)1052 407 y Fn([)p Fg(r)q(esul)q(t)1174 413 y Fe(post)1238 407 y Fg(=x)1283 413 y Fe(\032)1302 407 y Fn(].)0 490 y(where)g Fg(P)6 b Fn([)p Fg(a=b)p Fn(])k(stands)j(for)f(predicate)i Fg(P)j Fn(with)12 b(ev)o(ery)i(o)q(ccurrence)h(of)d Fg(b)g Fn(replaced)h(b)o(y)f Fg(a)p Fn(.)18 b(Similarly)l(,)9 b(eac)o(h)k(pro)q(ducer)h(m)o(ust)0 540 y(establish)g(the)h(in)o(v)n (arian)o(t)d(on)h(its)h(newly-created)h(ob)r(ject.)k(In)14 b(addition,)e(eac)o(h)i(m)o(utator)f(of)g(the)h(t)o(yp)q(e)h(m)o(ust)e Fh(pr)n(eserve)h(the)0 589 y(invariant)p Fn(.)24 b(T)m(o)15 b(pro)o(v)o(e)g(this,)h(w)o(e)g(assume)g(eac)o(h)g(m)o(utator)e(is)i (called)f(on)h(an)f(ob)r(ject)i(of)e(t)o(yp)q(e)h Fg(\034)21 b Fn(with)15 b(a)h(legal)e(v)n(alue)i(\(one)0 639 y(that)e(satis\014es) h(the)f(in)o(v)n(arian)o(t\),)e(and)i(sho)o(w)g(that)g(an)o(y)f(v)n (alue)g(of)h(a)f Fg(\034)19 b Fn(ob)r(ject)c(it)e(mo)q(di\014es)g(is)h (legal:)104 722 y(F)m(or)f(eac)o(h)i(m)o(utator)d Fg(m)i Fn(of)g Fg(\034)5 b Fn(,)13 b(for)g(all)g Fg(x)5 b Fn(:)g Fg(\034)17 b Fn(assume)d Fg(I)942 728 y Fe(\034)963 722 y Fn([)p Fg(x)999 728 y Fe(pr)q(e)1049 722 y Fg(=x)1094 728 y Fe(\032)1113 722 y Fn(])f(and)h(sho)o(w)g Fg(I)1340 728 y Fe(\034)1361 722 y Fn([)p Fg(x)1397 728 y Fe(post)1460 722 y Fg(=x)1505 728 y Fe(\032)1524 722 y Fn(].)62 805 y(F)m(or)j(example,)f(w)o(e)h(w)o(ould)f(need)i(to)f(sho)o(w)g(that)g (the)h(three)g(creators)g(for)f(bag)g(establish)g(the)g(in)o(v)n(arian) o(t,)f(and)h(that)0 855 y Fh(put)i Fn(and)g Fh(get)g Fn(preserv)o(e)h(the)g(in)o(v)n(arian)o(t)d(for)i(bag.)32 b(\(W)m(e)19 b(can)g(ignore)f Fh(c)n(ar)n(d)h Fn(and)f Fh(e)n(qual)h Fn(b)q(ecause)i(they)e(are)h(observ)o(ers.\))0 905 y(Informally)14 b(the)j(in)o(v)n(arian)o(t)f(holds)g(b)q(ecause)j (eac)o(h)e(creator)h(guaran)o(tees)g(that)f(the)g(size)h(is)f(no)f (larger)h(than)g(the)g(b)q(ound;)0 955 y Fh(put)p Fn('s)12 b(pre-condition)g(c)o(hec)o(ks)i(that)e(there)h(is)f(enough)h(ro)q(om)d (in)i(the)h(bag)e(for)h(another)h(elemen)o(t;)e(and)h Fh(get)g Fn(either)h(decreases)0 1005 y(the)h(size)h(of)e(the)i(bag)e (or)h(lea)o(v)o(es)g(it)g(the)g(same.)62 1054 y(The)d(loss)f(of)g(data) g(t)o(yp)q(e)h(induction)f(means)g(that)g(additional)f(in)o(v)n(arian)o (ts)g(cannot)i(b)q(e)g(pro)o(v)o(ed.)17 b(Therefore)11 b(the)g(sp)q(eci\014er)0 1104 y(m)o(ust)i(b)q(e)h(careful)g(to)g (de\014ne)h(an)f(in)o(v)n(arian)o(t)e(that)i(is)g(strong)g(enough)g (that)g(all)e(desired)j(in)o(v)n(arian)o(ts)e(follo)o(w)f(from)g(it.)0 1220 y Fc(4.4)56 b(T)n(yp)r(e)18 b(Sp)r(eci\014cations)f(Need)h (Explicit)e(Constrain)n(ts)0 1297 y Fn(W)m(e)j(are)g(in)o(terested)i (in)d(the)i(history)f(prop)q(erties)h(of)f(ob)r(jects)h(in)f(addition)f (to)g(their)i(in)o(v)n(arian)o(t)d(prop)q(erties.)35 b(W)m(e)19 b(can)0 1347 y(form)o(ulate)12 b(history)i(prop)q(erties)h (as)f(predicates)h(o)o(v)o(er)f(state)h(pairs,)e(and)h(pro)o(v)o(e)g (them)f(using)h(the)g Fh(history)h(rule)p Fn(:)104 1430 y Fh(History)f(R)o(ule)p Fn(:)k(F)m(or)c(eac)o(h)g(of)f(the)i Fg(i)f Fn(m)o(utators)f Fg(m)h Fn(of)f Fg(\034)5 b Fn(,)13 b(for)h(all)f Fg(x)e Fn(:)g Fg(\034)5 b Fn(:)609 1521 y Fg(m)645 1527 y Fe(i)659 1521 y Fg(:pr)q(e)k Ff(^)g Fg(m)813 1527 y Fe(i)827 1521 y Fg(:post)j Ff(\))f Fg(\036)p Fn([)p Fg(x)1040 1527 y Fe(pr)q(e)1090 1521 y Fg(=x)1135 1527 y Fe(\032)1154 1521 y Fg(;)c(x)1197 1527 y Fe(post)1260 1521 y Fg(=x)1305 1527 y Fe( )1329 1521 y Fn(])p 609 1540 732 2 v 891 1577 a Fg(\036)p Fn(\()p Fg(x)956 1583 y Fe(\032)975 1577 y Fg(;)g(x)1018 1583 y Fe( )1043 1577 y Fn(\))0 1668 y(W)m(e)18 b(cannot)g(use)g(this)g(history)g(rule)g (directly)m(,)h(ho)o(w)o(ev)o(er.)30 b(It)18 b(is)g(incomplete)f(since) i(subt)o(yp)q(es)g(ma)o(y)d(de\014ne)j(additional)0 1718 y(m)o(utators.)d(If)c(w)o(e)h(use)g(it)f(without)f(considering)i(the)g (extra)f(m)o(utators,)f(it)h(is)g(easy)h(to)f(pro)o(v)o(e)g(prop)q (erties)i(that)e(do)g(not)h(hold)0 1768 y(for)h(subt)o(yp)q(e)g(ob)r (jects!)62 1817 y(T)m(o)h(comp)q(ensate)h(for)g(the)g(lac)o(k)g(of)f (the)h(history)g(rule,)g(w)o(e)g(state)h(history)f(prop)q(erties)h (explicitly)e(in)g(the)i(t)o(yp)q(e)f(sp)q(eci-)0 1867 y(\014cation)f(through)g(a)g Fk(constrain)o(t)d Fn(clause)675 1852 y Fi(2)694 1867 y Fn(;)j(if)f(the)i(constrain)o(t)f(is)g(trivial,) f(the)h(clause)h(can)f(b)q(e)h(omitted.)k(F)m(or)15 b(example,)0 1917 y(the)f(constrain)o(t)104 2008 y Fk(constrain)o(t)d Fg(b)345 2014 y Fe(\032)364 2008 y Fg(:bound)f Fn(=)i Fg(b)557 2014 y Fe( )582 2008 y Fg(:bound)0 2100 y Fn(in)g(the)g(sp)q (eci\014cation)h(of)f(bag)f(declares)j(that)e(a)g(bag's)f(b)q(ound)i (nev)o(er)g(c)o(hanges.)18 b(As)12 b(another)h(example,)e(consider)i(a) f(fat)p 1887 2100 13 2 v 14 w(set)0 2149 y(ob)r(ject)j(that)g(has)f(an) h Fh(insert)e Fn(but)i(no)f Fh(delete)g Fn(metho)q(d;)g(fat)p 935 2149 V 14 w(sets)i(only)e(gro)o(w)g(in)g(size.)20 b(The)15 b(constrain)o(t)g(for)f(fat)p 1765 2149 V 14 w(set)i(w)o(ould)0 2199 y(b)q(e:)104 2282 y Fk(constrain)o(t)11 b Ff(8)i Fg(i)f Fn(:)f Fg(int)j(:)g(i)e Ff(2)f Fg(s)590 2288 y Fe(\032)621 2282 y Ff(\))g Fg(i)h Ff(2)f Fg(s)758 2288 y Fe( )62 2365 y Fn(The)17 b(predicate)h Fg(\036)p Fn(\()p Fg(x)398 2371 y Fe(\032)417 2365 y Fg(;)7 b(x)460 2371 y Fe( )484 2365 y Fn(\))17 b(app)q(earing)g(in)f(a)g Fk(constrain)o(t)e Fn(clause)j(for)f(t)o(yp)q(e)i Fg(\034)j Fn(stands)d(for)e(the)h(predicate:)25 b(F)m(or)16 b(all)0 2415 y(computations,)c Fg(c)p Fn(,)h(and)h(all)f(states)i Fg(\032)f Fn(and)g Fg( )h Fn(in)f Fg(c)f Fn(suc)o(h)i(that)f Fg(\032)g Fn(precedes)j Fg( )q Fn(,)104 2498 y Ff(8)p Fg(x)11 b Fn(:)g Fg(\034)19 b(:)13 b(x)e Ff(2)h Fg(dom)p Fn(\()p Fg(\032)p Fn(\))g Ff(\))f Fg(\036)p Fn(\()p Fg(x)583 2504 y Fe(\032)602 2498 y Fg(;)c(x)645 2504 y Fe( )669 2498 y Fn(\))p 0 2537 780 2 v 46 2563 a Fb(2)64 2575 y Fo(The)j(use)g(of)f(the)h(term)f(\\constrain)o(t")e(is)j(b)q(orro)o (w)o(ed)f(from)g(the)h(Ina)f(Jo)h(sp)q(eci\014cation)d(language)h ([SH92)o(],)j(whic)o(h)e(also)h(includes)e(constrain)o(ts)0 2615 y(in)j(sp)q(eci\014cations)o(.)965 2795 y Fn(7)p eop %%Page: 8 10 8 9 bop 0 42 a Fn(Note)14 b(that)g(w)o(e)g(do)g(not)g(require)h(that)f Fg( )h Fn(b)q(e)f(the)h(immedia)o(te)d(successor)k(of)d Fg(\032)i Fn(in)e Fg(c)p Fn(.)62 91 y(Just)e(as)f(w)o(e)g(had)f(to)h (pro)o(v)o(e)f(that)h(metho)q(ds)f(preserv)o(e)j(the)e(in)o(v)n(arian)o (t,)f(w)o(e)h(m)o(ust)e(sho)o(w)i(that)g(they)g Fh(satisfy)h(the)g(c)n (onstr)n(aint)p Fn(.)0 141 y(This)j(is)g(done)g(b)o(y)f(using)h(the)g (history)g(rule)g(for)g(eac)o(h)g(m)o(utator.)62 191 y(The)e(loss)g(of)f(the)h(history)g(rule)f(is)h(analogous)e(to)h(the)i (loss)e(of)g(a)g(data)h(t)o(yp)q(e)g(induction)f(rule.)17 b(A)12 b(practical)g(consequence)0 241 y(of)h(not)h(ha)o(ving)f(a)g (history)h(rule)g(is)g(that)g(the)h(sp)q(eci\014er)g(m)o(ust)e(mak)o(e) f(the)j(constrain)o(t)f(strong)g(enough)g(so)g(that)g(all)f(desired)0 291 y(history)h(prop)q(erties)h(follo)o(w)d(from)g(it.)0 428 y Fj(5)67 b(The)22 b(Meaning)h(of)e(Subt)n(yp)r(e)0 527 y Fc(5.1)56 b(Sp)r(ecifying)17 b(Subt)n(yp)r(es)0 604 y Fn(T)m(o)11 b(state)h(that)g(a)f(t)o(yp)q(e)h(is)g(a)f(subt)o(yp) q(e)h(of)f(some)g(other)h(t)o(yp)q(e,)g(w)o(e)g(simply)e(app)q(end)i(a) f Fk(subt)o(yp)q(e)f Fn(clause)i(to)f(its)h(sp)q(eci\014cation.)0 654 y(W)m(e)i(allo)o(w)g(m)o(ultiple)e(sup)q(ert)o(yp)q(es;)17 b(there)f(w)o(ould)e(b)q(e)i(a)e(separate)i Fk(subt)o(yp)q(e)d Fn(clause)i(for)g(eac)o(h.)21 b(An)15 b(example)e(is)i(giv)o(en)f(in)0 703 y(Figure)g(3.)62 753 y(A)j(subt)o(yp)q(e's)h(v)n(alue)e(space)h(ma) o(y)e(b)q(e)i(di\013eren)o(t)h(from)d(its)h(sup)q(ert)o(yp)q(e's.)28 b(F)m(or)17 b(example,)e(in)h(the)i(\014gure)f(the)g(sort,)g(S,)0 803 y(for)c(b)q(ounded)h(stac)o(k)g(v)n(alues)e(is)i(de\014ned)g(in)f (BStac)o(k)h(as)f(a)g(pair,)f Ff(h)p Fg(items;)7 b(l)q(imit)p Ff(i)p Fn(,)16 b(where)e Fh(items)f Fn(is)g(a)g(sequence)i(of)e(in)o (tegers)0 853 y(and)g Fh(limit)g Fn(is)g(a)h(natural)f(n)o(um)o(b)q (er.)k(The)d(in)o(v)n(arian)o(t)e(indicates)i(that)g(the)g(length)g(of) f(the)h(stac)o(k's)g(sequence)i(comp)q(onen)o(t)d(is)0 903 y(less)j(than)f(or)g(equal)g(to)g(its)g(limit.)k(The)c(constrain)o (t)h(indicates)f(that)g(the)h(stac)o(k's)f(limit)e(do)q(es)j(not)f(c)o (hange.)22 b(In)15 b(the)g(pre-)0 952 y(and)f(p)q(ost-conditions,)g([)g (])g(stands)h(for)g(the)g(empt)o(y)e(sequence,)j Ff(jj)e Fn(is)g(concatenation,)g Fh(last)g Fn(pic)o(ks)h(o\013)f(the)h(last)g (elemen)o(t)f(of)0 1002 y(a)g(sequence,)h(and)f Fh(al)r(lButL)n(ast)f Fn(returns)j(a)d(new)i(sequence)h(with)d(all)g(but)h(the)h(last)e (elemen)o(t)h(of)f(its)h(argumen)o(t.)62 1052 y(Under)i(the)g Fk(subt)o(yp)q(e)d Fn(clause)i(w)o(e)g(de\014ne)h(an)f Fh(abstr)n(action)h(function)p Fn(,)f Fg(A)p Fn(,)g(that)g(relates)h (stac)o(k)f(v)n(alues)g(to)g(bag)f(v)n(alues)0 1102 y(b)o(y)e(relying)g (on)g(the)g(helping)g(function,)g Fg(mk)p 696 1102 13 2 v 16 w(el)q(ems)p Fn(,)i(that)e(maps)f(sequences)k(to)d(m)o(ultisets) f(in)g(the)i(ob)o(vious)f(manner.)k(\(W)m(e)0 1152 y(will)d(revisit)i (this)g(abstraction)f(function)h(in)f(Section)h(5.3.\))k(The)c Fk(subt)o(yp)q(e)e Fn(clause)i(also)f(lets)h(sp)q(eci\014ers)i(relate)e (subt)o(yp)q(e)0 1201 y(metho)q(ds)d(to)g(those)h(of)e(the)i(sup)q(ert) o(yp)q(e.)19 b(The)13 b(subt)o(yp)q(e)g(m)o(ust)e(pro)o(vide)h(all)f (metho)q(ds)h(of)g(its)g(sup)q(ert)o(yp)q(e;)i(w)o(e)e(refer)h(to)g (these)0 1251 y(as)i(the)h Fh(inherite)n(d)f Fn(metho)q(ds.)465 1236 y Fi(3)505 1251 y Fn(Inherited)h(metho)q(ds)f(can)g(b)q(e)h (renamed,)f(e.g.,)f Fh(push)i Fn(for)f Fh(put)p Fn(;)g(all)f(other)i (metho)q(ds)f(of)f(the)0 1301 y(sup)q(ert)o(yp)q(e)19 b(are)e(inherited)h(without)e(renaming,)g(e.g.,)g Fh(e)n(qual)p Fn(.)28 b(In)17 b(addition)f(to)h(the)g(inherited)h(metho)q(ds,)e(the)i (subt)o(yp)q(e)0 1351 y(ma)o(y)13 b(also)h(ha)o(v)o(e)h(some)f Fh(extr)n(a)h Fn(metho)q(ds,)f(e.g.,)g Fh(swap)p 840 1351 V 15 w(top)p Fn(.)22 b(\(Stac)o(k's)15 b Fh(e)n(qual)g Fn(metho)q(d)f(m)o(ust)g(tak)o(e)h(a)g(bag)f(as)h(an)g(argumen)o(t)0 1401 y(to)f(satisfy)f(the)i(con)o(tra)o(v)n(ariance)f(requiremen)o(t.)k (W)m(e)13 b(discuss)i(this)f(issue)h(further)g(in)e(Section)h(6.1.\))0 1517 y Fc(5.2)56 b(De\014nition)17 b(of)i(Subt)n(yp)r(e)0 1594 y Fn(The)14 b(formal)e(de\014nition)h(of)h(the)g(subt)o(yp)q(e)h (relation,)e Ff(\026)p Fn(,)h(is)g(giv)o(en)f(in)h(Figure)g(4.)k(It)c (relates)h(t)o(w)o(o)e(t)o(yp)q(es,)i Fg(\033)g Fn(and)f Fg(\034)5 b Fn(,)13 b(eac)o(h)i(of)0 1643 y(whose)h(sp)q (eci\014cations)g(resp)q(ectiv)o(ely)h(preserv)o(es)g(its)e(in)o(v)n (arian)o(t,)f Fg(I)1050 1649 y Fe(\033)1087 1643 y Fn(and)h Fg(I)1187 1649 y Fe(\034)1208 1643 y Fn(,)g(and)g(satis\014es)h(its)g (constrain)o(t,)f Fg(C)1769 1649 y Fe(\033)1806 1643 y Fn(and)g Fg(C)1918 1649 y Fe(\034)1938 1643 y Fn(.)0 1693 y(In)d(the)h(rules,)g(since)g Fg(x)f Fn(is)g(an)g(ob)r(ject)i(of)d (t)o(yp)q(e)i Fg(\033)q Fn(,)g(its)f(v)n(alue)g(\()p Fg(x)976 1699 y Fe(pr)q(e)1039 1693 y Fn(or)g Fg(x)1112 1699 y Fe(post)1176 1693 y Fn(\))g(is)g(a)g(mem)o(b)q(er)f(of)h Fg(S)j Fn(and)d(therefore)i(cannot)e(b)q(e)0 1743 y(used)h(directly)g (in)f(the)h(predicates)h(ab)q(out)e Fg(\034)18 b Fn(ob)r(jects)13 b(\(whic)o(h)g(are)g(in)f(terms)g(of)g(v)n(alues)g(in)g Fg(T)6 b Fn(\).)18 b(The)13 b(abstraction)f(function)0 1793 y Fg(A)17 b Fn(is)f(used)h(to)g(translate)f(these)i(v)n(alues)f (so)f(that)h(the)g(predicates)h(ab)q(out)e Fg(\034)21 b Fn(ob)r(jects)d(mak)o(e)d(sense.)27 b Fg(A)17 b Fn(ma)o(y)d(b)q(e)j (partial,)0 1843 y(need)e(not)g(b)q(e)g(on)o(to,)e(but)i(can)g(b)q(e)g (man)o(y-to-one.)i(W)m(e)d(require)i(that)e(an)g(abstraction)h (function)f(b)q(e)h(de\014ned)h(for)e(all)f(legal)0 1892 y(v)n(alues)g(of)h(the)g(subt)o(yp)q(e)h(\(although)e(it)g(need)i(not)e (b)q(e)i(de\014ned)g(for)e(v)n(alues)g(that)h(do)g(not)f(satisfy)h(the) g(subt)o(yp)q(e)h(in)o(v)n(arian)o(t\).)0 1942 y(Moreo)o(v)o(er,)f(it)f (m)o(ust)g(map)g(legal)f(v)n(alues)i(of)f(the)i(subt)o(yp)q(e)g(to)e (legal)g(v)n(alues)h(of)f(the)i(sup)q(ert)o(yp)q(e.)62 1992 y(The)e(\014rst)f(clause)h(addresses)h(the)e(need)h(to)f(relate)g (inherited)h(metho)q(ds)e(of)g(the)i(subt)o(yp)q(e.)18 b(Our)13 b(form)o(ulation)c(is)i(similar)0 2042 y(to)h(America's)f ([Ame90)n(].)17 b(The)12 b(\014rst)h(t)o(w)o(o)f(signature)g(rules)h (are)f(the)g(standard)h(con)o(tra/co)o(v)n(ariance)f(rules.)18 b(The)12 b(exception)0 2092 y(rule)h(sa)o(ys)f(that)h Fg(m)293 2098 y Fe(\033)328 2092 y Fn(ma)o(y)e(not)h(signal)f(more)h (than)g Fg(m)839 2098 y Fe(\034)860 2092 y Fn(,)h(since)g(a)f(caller)g (of)g(a)g(metho)q(d)g(on)g(a)g(sup)q(ert)o(yp)q(e)j(ob)r(ject)e(should) f(not)0 2141 y(exp)q(ect)j(to)e(handle)g(an)f(unkno)o(wn)h(exception.) 19 b(The)13 b(pre-)h(and)f(p)q(ost-condition)f(rules)i(are)g(the)f(in)o (tuitiv)o(e)f(coun)o(terparts)j(to)0 2191 y(the)h(con)o(tra)o(v)n (arian)o(t)f(and)h(co)o(v)n(arian)o(t)f(rules)h(for)f(signatures.)25 b(The)16 b(pre-condition)g(rule)g(ensures)i(the)e(subt)o(yp)q(e's)h (metho)q(d)0 2241 y(can)d(b)q(e)f(called)g(at)h(least)f(in)g(an)o(y)g (state)h(required)g(b)o(y)f(the)h(sup)q(ert)o(yp)q(e.)20 b(The)14 b(p)q(ost-condition)f(rule)g(sa)o(ys)h(that)f(the)h(subt)o(yp) q(e)0 2291 y(metho)q(d's)g(p)q(ost-condition)h(can)h(b)q(e)g(stronger)g (than)f(the)h(sup)q(ert)o(yp)q(e)h(metho)q(d's)e(p)q(ost-condition;)g (hence,)h(an)o(y)f(prop)q(ert)o(y)0 2341 y(that)d(can)f(b)q(e)i(pro)o (v)o(ed)e(based)i(on)e(the)h(sup)q(ert)o(yp)q(e)i(metho)q(d's)c(p)q (ost-condition)h(also)g(follo)o(ws)f(from)g(the)i(subt)o(yp)q(e's)h (metho)q(d's)0 2391 y(p)q(ost-condition.)62 2440 y(The)20 b(second)g(clause)g(addresses)h(preserving)g(program-indep)q(enden)o(t) d(prop)q(erties.)36 b(The)19 b(in)o(v)n(arian)o(t)f(rule)h(and)g(the)0 2490 y(assumption)11 b(that)i(the)g(t)o(yp)q(e)h(sp)q(eci\014cation)f (preserv)o(es)i(the)f(in)o(v)n(arian)o(t)d(su\016ces)j(to)e(argue)h (that)g(in)o(v)n(arian)o(t)e(prop)q(erties)j(of)e(a)0 2540 y(sup)q(ert)o(yp)q(e)k(are)f(preserv)o(ed)i(b)o(y)d(the)h(subt)o (yp)q(e.)21 b(The)15 b(argumen)o(t)e(for)h(the)i(preserv)n(ation)f(of)f (subt)o(yp)q(e's)h(history)g(prop)q(erties)p 0 2575 780 2 v 46 2601 a Fb(3)64 2613 y Fo(W)m(e)d(do)g(not)g(mean)f(that)g(the)h (subt)o(yp)q(e)e(inherits)h(the)g(co)q(de)g(of)i(these)e(metho)q(ds)f (but)i(simply)e(that)i(it)g(pro)o(vides)e(metho)q(ds)g(with)j(the)e (same)0 2653 y(b)q(eha)o(vior)e(\(as)i(de\014ned)f(b)q(elo)o(w\))g(as)i (the)e(corresp)q(onding)e(sup)q(ert)o(yp)q(e)h(metho)q(ds.)965 2795 y Fn(8)p eop %%Page: 9 11 9 10 bop 0 297 1950 1 v 104 365 a Fn(stac)o(k)14 b(=)g Fk(t)o(yp)q(e)104 456 y(uses)f Fn(BStac)o(k)h(\(stac)o(k)h Fk(for)d Fh(S)p Fn(\))104 506 y Fk(for)j(all)d Fg(s)p Fn(:)19 b(stac)o(k)104 606 y Fk(in)o(v)m(arian)o(t)11 b Fg(l)q(eng)q(th)p Fn(\()p Fg(s)454 612 y Fe(\032)474 606 y Fg(:items)p Fn(\))i Ff(\024)f Fg(s)681 612 y Fe(\032)701 606 y Fg(:l)q(imit)104 656 y Fk(constrain)o(t)f Fg(s)346 662 y Fe(\032)365 656 y Fg(:l)q(imit)i Fn(=)e Fg(s)544 662 y Fe( )570 656 y Fg(:l)q(imit)104 755 y Fh(push)j Fn(=)g Fk(pro)q(c)g Fn(\()p Fh(i:)k Fn(in)o(t\))245 805 y Fk(requires)12 b Fg(l)q(eng)q(th)p Fn(\()p Fg(s)578 811 y Fe(pr)q(e)631 805 y Fg(:items)p Fn(\))g Fg(<)g(s)837 811 y Fe(pr)q(e)889 805 y Fg(:l)q(imit)245 855 y Fk(mo)q(di\014es)7 b Fg(s)245 905 y Fk(ensures)25 b Fg(s)445 911 y Fe(post)509 905 y Fg(:items)13 b Fn(=)f Fg(s)700 911 y Fe(pr)q(e)751 905 y Fg(:items)j Ff(jj)e Fn([)h Fg(i)g Fn(])22 b Ff(^)h Fg(s)1076 911 y Fe(post)1140 905 y Fg(:l)q(imit)13 b Fn(=)e Fg(s)1319 911 y Fe(pr)q(e)1371 905 y Fg(:l)q(imit)104 1004 y Fh(p)n(op)j Fn(=)g Fk(pro)q(c)g Fn(\(\))g Fk(returns)d Fn(\(in)o(t\))225 1054 y Fk(requires)h Fg(s)425 1060 y Fe(pr)q(e)477 1054 y Fg(:items)g Ff(6)p Fn(=)g([)h(])225 1104 y Fk(mo)q(di\014es)7 b Fg(s)225 1154 y Fk(ensures)25 b Fg(r)q(esul)q(t)12 b Fn(=)g Fg(l)q(ast)p Fn(\()p Fg(s)676 1160 y Fe(pr)q(e)728 1154 y Fg(:items)p Fn(\))f Ff(^)e Fg(s)926 1160 y Fe(post)990 1154 y Fg(:items)k Fn(=)e Fg(al)q(l)q(B)r(utLast)p Fn(\()p Fg(s)1400 1160 y Fe(pr)q(e)1454 1154 y Fg(:items)p Fn(\))k Ff(^)406 1204 y Fg(s)425 1210 y Fe(post)489 1204 y Fg(:l)q(imit)e Fn(=)e Fg(s)668 1210 y Fe(pr)q(e)720 1204 y Fg(:l)q(imit)104 1303 y Fh(swap)p 194 1303 13 2 v 15 w(top)j Fn(=)g Fk(pro)q(c)g Fn(\()p Fh(i:)k Fn(in)o(t\))225 1353 y Fk(requires)12 b Fg(s)425 1359 y Fe(pr)q(e)477 1353 y Fg(:items)g Ff(6)p Fn(=)g([)h(])225 1403 y Fk(mo)q(di\014es)7 b Fg(s)225 1453 y Fk(ensures)25 b Fg(s)425 1459 y Fe(post)489 1453 y Fg(:items)13 b Fn(=)f Fg(al)q(l)q(B)r(utLast)p Fn(\()p Fg(s)900 1459 y Fe(pr)q(e)953 1453 y Fg(:items)p Fn(\))j Ff(jj)e Fn([)g Fg(i)h Fn(])23 b Ff(^)g Fg(s)1294 1459 y Fe(post)1358 1453 y Fg(:l)q(imit)12 b Fn(=)g Fg(s)1537 1459 y Fe(pr)q(e)1589 1453 y Fg(:l)q(imit)104 1552 y Fh(height)i Fn(=)g Fk(pro)q(c)f Fn(\()h(\))g Fk(returns)e Fn(\(in)o(t\))225 1602 y Fk(ensures)25 b Fg(r)q(esul)q(t)12 b Fn(=)g Fg(l)q(eng)q(th)p Fn(\()p Fg(s)724 1608 y Fe(pr)q(e)776 1602 y Fg(:items)p Fn(\))104 1702 y Fh(e)n(qual)i Fn(=)g Fk(pro)q(c)f Fn(\()p Fh(t:)18 b Fn(bag\))c Fk(returns)d Fn(\(b)q(o)q(ol\))225 1752 y Fk(ensures)25 b Fg(r)q(esul)q(t)12 b Fn(=)g(\()p Fg(s)g Fn(=)g Fg(t)p Fn(\))166 1851 y Fk(subt)o(yp)q(e)g (of)h Fn(bag)h(\()p Fh(push)g Fk(for)f Fh(put)p Fn(,)h Fh(p)n(op)g Fk(for)f Fh(get)p Fn(,)h Fh(height)g Fk(for)e Fh(c)n(ar)n(d)p Fn(\))344 1901 y Ff(8)p Fg(st)g Fn(:)f Fg(S)17 b(:)c(A)p Fn(\()p Fg(st)p Fn(\))f(=)g Ff(h)p Fg(mk)p 734 1901 V 17 w(el)q(ems)p Fn(\()p Fg(st:items)p Fn(\))p Fg(;)7 b(st:l)q(im)q(it)p Ff(i)396 1951 y Fk(where)13 b Fg(mk)p 596 1951 V 17 w(el)q(ems)g Fn(:)e Fg(S)r(eq)j Ff(!)d Fg(M)475 2001 y Ff(8)p Fg(i)h Fn(:)f Fg(I)s(nt;)c(sq)12 b Fn(:)g Fg(S)r(eq)586 2051 y(mk)p 648 2051 V 17 w(el)q(ems)p Fn(\([)j(]\))c(=)h Ff(f)h(g)586 2100 y Fg(mk)p 648 2100 V 17 w(el)q(ems)p Fn(\()p Fg(sq)k Ff(jj)c Fn([)g Fg(i)h Fn(]\))d(=)h Fg(mk)p 1073 2100 V 17 w(el)q(ems)p Fn(\()p Fg(sq)q Fn(\))f Ff([)e(f)p Fg(i)p Ff(g)166 2200 y Fk(end)k Fn(stac)o(k)781 2274 y(Figure)h(3:)k(Stac)o(k)c(T)o(yp)q(e)p 0 2324 1950 1 v 965 2795 a(9)p eop %%Page: 10 12 10 11 bop 0 1 1950 1 v 0 72 a Fq(Definition)18 b(of)g(the)g(subtype)g (rela)m(tion,)i Ff(\026)p Fn(:)i Fg(\033)31 b Fn(=)g Ff(h)p Fg(O)1021 78 y Fe(\033)1043 72 y Fg(;)7 b(S;)g(M)e Ff(i)15 b Fn(is)h(a)f Fh(subtyp)n(e)h Fn(of)f Fg(\034)35 b Fn(=)c Ff(h)p Fg(O)1621 78 y Fe(\034)1641 72 y Fg(;)7 b(T)s(;)g(N)e Ff(i)16 b Fn(if)0 121 y(there)f(exists)g(an)e (abstraction)i(function,)e Fg(A)e Fn(:)g Fg(S)k Ff(!)c Fg(T)6 b Fn(,)13 b(and)h(a)g(renaming)e(map,)g Fg(R)f Fn(:)g Fg(M)16 b Ff(!)11 b Fg(N)5 b Fn(,)14 b(suc)o(h)g(that:)51 213 y(1.)20 b(Subt)o(yp)q(e)15 b(metho)q(ds)g(preserv)o(e)h(the)g(sup)q (ert)o(yp)q(e)g(metho)q(ds')e(b)q(eha)o(vior.)21 b(If)14 b Fg(m)1310 219 y Fe(\034)1346 213 y Fn(of)g Fg(\034)20 b Fn(is)15 b(the)g(corresp)q(onding)104 262 y(renamed)e(metho)q(d)g Fg(m)459 268 y Fe(\033)496 262 y Fn(of)g Fg(\033)q Fn(,)h(the)g(follo)o (wing)e(rules)i(m)o(ust)f(hold:)154 346 y Ff(\017)20 b Fh(Signatur)n(e)15 b(rule.)228 412 y Fk({)21 b Fh(Contr)n(avarianc)n (e)16 b(of)h(ar)n(guments.)24 b Fg(m)874 418 y Fe(\034)911 412 y Fn(and)16 b Fg(m)1030 418 y Fe(\033)1068 412 y Fn(ha)o(v)o(e)g(the)h(same)e(n)o(um)o(b)q(er)g(of)g(argumen)o(ts.)23 b(If)273 462 y(the)14 b(list)g(of)f(argumen)o(t)g(t)o(yp)q(es)h(of)g Fg(m)840 468 y Fe(\034)875 462 y Fn(is)f Fg(\013)943 468 y Fe(i)971 462 y Fn(and)g(that)h(of)g Fg(m)1225 468 y Fe(\033)1261 462 y Fn(is)g Fg(\014)1326 468 y Fe(i)1340 462 y Fn(,)g(then)g Ff(8)p Fg(i)g(:)g(\013)1564 468 y Fe(i)1589 462 y Ff(\026)e Fg(\014)1656 468 y Fe(i)1670 462 y Fn(.)228 520 y Fk({)21 b Fh(Covarianc)n(e)16 b(of)f(r)n(esult.)21 b Fn(Either)16 b(b)q(oth)f Fg(m)937 526 y Fe(\034)973 520 y Fn(and)g Fg(m)1091 526 y Fe(\033)1128 520 y Fn(ha)o(v)o(e)g(a)g (result)h(or)f(neither)h(has.)21 b(If)15 b(there)273 570 y(is)e(a)h(result,)g(let)g Fg(m)572 576 y Fe(\034)593 570 y Fn('s)g(result)h(t)o(yp)q(e)f(b)q(e)h Fg(\013)e Fn(and)h Fg(m)1058 576 y Fe(\033)1081 570 y Fn('s)f(b)q(e)i Fg(\014)r Fn(.)k(Then)14 b Fg(\014)g Ff(\026)e Fg(\013)p Fn(.)228 628 y Fk({)21 b Fh(Exc)n(eption)14 b(rule.)j Fn(The)c(exceptions)g(signaled)f(b)o(y)g Fg(m)1096 634 y Fe(\033)1132 628 y Fn(are)g(con)o(tained)h(in)f(the)h(set)g(of)f (exceptions)273 678 y(signaled)h(b)o(y)h Fg(m)526 684 y Fe(\034)547 678 y Fn(.)154 744 y Ff(\017)20 b Fh(Metho)n(ds)c(rule.)h Fn(F)m(or)d(all)e Fg(x)g Fn(:)f Fg(\033)q Fn(:)228 810 y Fk({)21 b Fh(Pr)n(e-c)n(ondition)15 b(rule.)i Fg(m)668 816 y Fe(\034)689 810 y Fg(:pr)q(e)p Fn([)p Fg(A)p Fn(\()p Fg(x)844 816 y Fe(pr)q(e)895 810 y Fn(\))p Fg(=x)956 816 y Fe(pr)q(e)1007 810 y Fn(])11 b Ff(\))g Fg(m)1119 816 y Fe(\033)1142 810 y Fg(:pr)q(e:)228 869 y Fk({)21 b Fh(Post-c)n(ondition)15 b(rule.)j Fg(m)686 875 y Fe(\033)709 869 y Fg(:post)11 b Ff(\))g Fg(m)896 875 y Fe(\034)917 869 y Fg(:post)p Fn([)p Fg(A)p Fn(\()p Fg(x)1087 875 y Fe(pr)q(e)1138 869 y Fn(\))p Fg(=x)1199 875 y Fe(pr)q(e)1250 869 y Fg(;)c(A)p Fn(\()p Fg(x)1340 875 y Fe(post)1403 869 y Fn(\))p Fg(=x)1464 875 y Fe(post)1528 869 y Fn(])51 952 y(2.)20 b(Subt)o(yp)q(es)c(preserv)o(e)i(sup)q(ert)o(yp)q(e)f(prop) q(erties.)24 b(F)m(or)15 b(all)f(computations,)f Fg(c)p Fn(,)j(and)f(all)f(states)i Fg(\032)g Fn(and)f Fg( )i Fn(in)e Fg(c)104 1001 y Fn(suc)o(h)f(that)g Fg(\032)h Fn(precedes)h Fg( )q Fn(,)e(for)f(all)g Fg(x)e Fn(:)g Fg(\033)q Fn(:)154 1084 y Ff(\017)20 b Fh(Invariant)15 b(R)o(ule)p Fn(.)j(Subt)o(yp)q(e)d(in)o(v)n(arian)o(ts)e(ensure)i(sup)q (ert)o(yp)q(e)h(in)o(v)n(arian)o(ts.)273 1151 y Fg(I)291 1157 y Fe(\033)325 1151 y Ff(\))11 b Fg(I)396 1157 y Fe(\034)417 1151 y Fn([)p Fg(A)p Fn(\()p Fg(x)500 1157 y Fe(\032)519 1151 y Fn(\))p Fg(=x)580 1157 y Fe(\032)599 1151 y Fn(])154 1217 y Ff(\017)20 b Fh(Constr)n(aint)14 b(R)o(ule)p Fn(.)19 b(Subt)o(yp)q(e)14 b(constrain)o(ts)h(ensure)g(sup) q(ert)o(yp)q(e)h(constrain)o(ts.)273 1284 y Fg(C)303 1290 y Fe(\033)336 1284 y Ff(\))11 b Fg(C)419 1290 y Fe(\034)440 1284 y Fn([)p Fg(A)p Fn(\()p Fg(x)523 1290 y Fe(\032)542 1284 y Fn(\))p Fg(=x)603 1290 y Fe(\032)621 1284 y Fg(;)c(A)p Fn(\()p Fg(x)711 1290 y Fe( )736 1284 y Fn(\))p Fg(=x)797 1290 y Fe( )822 1284 y Fn(])570 1370 y(Figure)14 b(4:)k(De\014nition)13 b(of)h(the)g(Subt)o(yp)q(e)h (Relation)p 0 1420 V 0 1535 a(is)d(completely)f(analogous,)g(using)i (the)g(constrain)o(t)f(rule)h(and)f(the)h(assumption)e(that)i(the)g(t)o (yp)q(e)f(sp)q(eci\014cation)i(satis\014es)f(its)0 1585 y(constrain)o(t.)62 1635 y(W)m(e)19 b(do)f(not)h(include)g(the)h(in)o (v)n(arian)o(t)d(in)i(the)g(metho)q(ds)f(\(or)h(constrain)o(t\))h(rule) f(directly)m(.)33 b(F)m(or)18 b(example,)h(the)g(pre-)0 1685 y(condition)13 b(rule)h(could)g(ha)o(v)o(e)g(b)q(een)104 1759 y(\()p Fg(m)156 1765 y Fe(\034)177 1759 y Fg(:pr)q(e)p Fn([)p Fg(A)p Fn(\()p Fg(x)332 1765 y Fe(pr)q(e)383 1759 y Fn(\))p Fg(=x)444 1765 y Fe(pr)q(e)494 1759 y Fn(])9 b Ff(^)g Fg(I)570 1765 y Fe(\034)591 1759 y Fn([)p Fg(A)p Fn(\()p Fg(x)674 1765 y Fe(pr)q(e)725 1759 y Fn(\))p Fg(=x)786 1765 y Fe(pr)q(e)837 1759 y Fn(]\))i Ff(\))g Fg(m)965 1765 y Fe(\033)988 1759 y Fg(:pr)q(e)0 1833 y Fn(W)m(e)k(omit)e(adding)h(the)i(in)o(v)n(arian)o(t)d(b)q(ecause)k (if)d(it)h(is)g(needed)i(in)d(doing)g(a)h(pro)q(of)g(it)g(can)g(alw)o (a)o(ys)f(b)q(e)i(assumed,)e(since)i(it)f(is)0 1883 y(kno)o(wn)e(to)h (b)q(e)h(true)f(for)g(all)f(ob)r(jects)i(of)e(its)h(t)o(yp)q(e.)62 1933 y(Note)h(that)f(in)f(the)i(v)n(arious)e(rules)i(w)o(e)f(require)h Fg(x)d Fn(:)f Fg(\033)q Fn(,)j(y)o(et)g(x)g(app)q(ears)h(in)f (predicates)h(concerning)g Fg(\034)k Fn(ob)r(jects)c(as)f(w)o(ell.)0 1982 y(This)g(mak)o(es)f(sense)i(b)q(ecause)h Fg(\033)c Ff(\026)g Fg(\034)5 b Fn(.)0 2097 y Fc(5.3)56 b(Applying)18 b(the)g(De\014nition)f(of)i(Subt)n(yping)g(as)g(a)g(Chec)n(klist)0 2173 y Fn(Pro)q(ofs)11 b(of)e(the)j(subt)o(yp)q(e)f(relation)f(are)h (usually)e(ob)o(vious)h(and)g(can)h(b)q(e)g(done)g(b)o(y)f(insp)q (ection.)18 b(T)o(ypically)m(,)8 b(the)j(only)f(in)o(terest-)0 2223 y(ing)h(part)h(is)g(the)h(de\014nition)e(of)h(the)g(abstraction)g (function;)g(the)h(other)f(parts)h(of)e(the)i(pro)q(of)e(are)i(usually) e(straigh)o(tforw)o(ard.)0 2273 y(Ho)o(w)o(ev)o(er,)18 b(this)f(section)g(go)q(es)h(through)f(the)g(steps)i(of)d(an)h (informal)d(pro)q(of)j(just)g(to)g(sho)o(w)f(what)h(kind)g(of)f (reasoning)h(is)0 2323 y(in)o(v)o(olv)o(ed.)g(F)m(ormal)11 b(v)o(ersions)j(of)g(these)h(informal)c(pro)q(ofs)j(are)g(giv)o(en)g (in)f([L)-5 b(W92)o(].)62 2372 y(Let's)15 b(revisit)f(the)g(stac)o(k)g (and)g(bag)g(example)e(using)i(our)g(de\014nition)f(as)h(a)g(c)o(hec)o (klist.)k(Here)104 2447 y Fg(\033)13 b Fn(=)25 b Ff(h)p Fg(O)246 2453 y Fe(stack)327 2447 y Fg(;)7 b(S;)g Ff(f)p Fg(push;)g(pop;)g(sw)q(ap)p 694 2447 13 2 v 14 w(top;)g(heig)q(ht;)g (eq)q(ual)q Ff(gi)104 2496 y Fg(\034)16 b Fn(=)26 b Ff(h)p Fg(O)244 2502 y Fe(bag)296 2496 y Fg(;)7 b(B)r(;)13 b Ff(f)p Fg(put;)g(g)q(et;)h(car)q(d;)7 b(eq)q(ual)q Ff(gi)0 2570 y Fn(Recall)k(that)g(w)o(e)h(represen)o(t)i(a)d(b)q(ounded)i (bag's)e(v)n(alue)g(as)g(a)h(pair,)f Ff(h)p Fg(el)q(ems;)c(bound)p Ff(i)p Fn(,)12 b(of)f(a)g(m)o(ultiset)f(of)h(in)o(tegers)i(and)e(a)h (\014xed)0 2620 y(b)q(ound,)h(and)f(a)h(b)q(ounded)g(stac)o(k's)h(v)n (alue)e(as)h(a)f(pair,)h Ff(h)p Fg(items;)7 b(l)q(imit)p Ff(i)p Fn(,)15 b(of)d(a)h(sequence)i(of)d(in)o(tegers)h(and)g(a)g (\014xed)g(b)q(ound.)18 b(It)0 2670 y(can)c(easily)f(b)q(e)i(sho)o(wn)f (that)g(eac)o(h)g(sp)q(eci\014cation)h(preserv)o(es)h(its)e(in)o(v)n (arian)o(t)e(and)i(satis\014es)h(its)f(constrain)o(t.)954 2795 y(10)p eop %%Page: 11 13 11 12 bop 62 42 a Fn(W)m(e)15 b(use)h(the)g(abstraction)f(function)g (and)f(the)i(renaming)e(map)f(giv)o(en)i(in)f(the)i(sp)q(eci\014cation) g(for)e(stac)o(k)i(in)f(Figure)g(3.)0 91 y(The)f(abstraction)g (function)g(states)h(that)f(for)g(all)e Fg(st)g Fn(:)f Fg(S)104 174 y(A)p Fn(\()p Fg(st)p Fn(\))h(=)26 b Ff(h)p Fg(mk)p 349 174 13 2 v 16 w(el)q(ems)p Fn(\()p Fg(st:items)q Fn(\))p Fg(;)7 b(st:l)q(imi)q(t)p Ff(i)0 257 y Fn(where)14 b(the)f(helping)e(function,)h Fg(mk)p 567 257 V 17 w(el)q(ems)h Fn(:)e Fg(S)r(eq)j Ff(!)d Fg(M)5 b Fn(,)12 b(maps)f(sequences)k(to)d(m) o(ultisets)g(suc)o(h)h(that)f(for)g(all)g Fg(sq)h Fn(:)e Fg(S)r(eq)q(;)20 b(i)11 b Fn(:)0 307 y Fg(I)s(nt)p Fn(:)104 390 y Fg(mk)p 166 390 V 16 w(el)q(ems)p Fn(\([)k(]\))d(=)f Ff(f)j(g)104 440 y Fg(mk)p 166 440 V 16 w(el)q(ems)p Fn(\()p Fg(sq)j Ff(jj)c Fn([)h Fg(i)g Fn(]\))d(=)h Fg(mk)p 591 440 V 16 w(el)q(ems)p Fn(\()p Fg(sq)q Fn(\))g Ff([)d(f)p Fg(i)p Ff(g)0 523 y Fh(A)j Fn(is)g(partial;)f(it)h(is)g(de\014ned)i (only)d(for)h(sequence{natural)i(n)o(um)o(b)q(ers)e(pairs,)g Ff(h)p Fg(items;)7 b(l)q(imit)p Ff(i)p Fn(,)14 b(where)g Fh(limit)d Fn(is)h(greater)h(than)0 573 y(or)h(equal)f(to)h(the)h(size) f(of)g Fh(items)p Fn(.)62 623 y(The)h(renaming)d(map)g Fh(R)i Fn(is)104 706 y Fh(R\(push\))i(=)e(put)104 756 y(R\(p)n(op\))h(=)g(get)104 805 y(R\(height\))g(=)g(c)n(ar)n(d)104 855 y(R\(e)n(qual\))g(=)g(e)n(qual)0 938 y Fn(Chec)o(king)f(the)g (signature)h(and)e(exception)i(rules)f(is)g(easy)h(and)e(could)h(b)q(e) g(done)h(b)o(y)e(the)i(compiler.)62 988 y(Next,)d(w)o(e)f(sho)o(w)g (the)h(corresp)q(ondences)i(b)q(et)o(w)o(een)e Fh(push)g Fn(and)f Fh(put)p Fn(,)g(b)q(et)o(w)o(een)h Fh(p)n(op)g Fn(and)f Fh(get)p Fn(,)g(etc.)18 b(Let's)11 b(lo)q(ok)f(at)h(the)g (pre-)0 1038 y(and)j(p)q(ost-condition)g(rules)g(for)g(just)g(one)g (metho)q(d,)f Fh(push)p Fn(.)19 b(Informally)m(,)10 b(the)15 b(pre-condition)f(rule)g(for)g Fh(put)p Fn(/)p Fh(push)h Fn(requires)0 1088 y(that)f(w)o(e)g(sho)o(w)240 1073 y Fi(4)259 1088 y Fn(:)104 1171 y Ff(j)f Fg(A)p Fn(\()p Fg(s)195 1177 y Fe(pr)q(e)247 1171 y Fn(\))p Fg(:el)q(ems)i Ff(j)c Fg(<)h(A)p Fn(\()p Fg(s)529 1177 y Fe(pr)q(e)581 1171 y Fn(\))p Fg(:bound)160 1220 y Ff(\))104 1270 y Fg(l)q(eng)q(th)p Fn(\()p Fg(s)256 1276 y Fe(pr)q(e)308 1270 y Fg(:items)p Fn(\))h Fg(<)f(s)515 1276 y Fe(pr)q(e)567 1270 y Fg(:l)q(imit)0 1353 y Fn(In)o(tuitiv)o(ely)m(,)d(the)h (pre-condition)g(rule)g(holds)f(b)q(ecause)j(the)e(length)g(of)f(stac)o (k)h(is)g(the)h(same)e(as)g(the)i(size)f(of)g(the)g(corresp)q(onding)0 1403 y(bag)j(and)h(the)h(limit)c(of)i(the)i(stac)o(k)f(is)g(the)g(same) f(as)h(the)h(b)q(ound)f(for)f(the)i(bag.)j(Here)d(is)e(an)h(informal)d (pro)q(of)j(with)f(sligh)o(tly)0 1453 y(more)g(detail:)51 1536 y(1.)20 b Fg(A)14 b Fn(maps)f(the)i(stac)o(k's)f(sequence)i(comp)q (onen)o(t)e(to)g(the)h(bag's)e(m)o(ultiset)g(b)o(y)h(putting)g(all)f (elemen)o(ts)h(of)f(the)i(sequence)104 1586 y(in)o(to)f(the)h(m)o (ultiset.)20 b(Therefore)c(the)g(length)e(of)h(the)g(sequence)i Fg(s)1143 1592 y Fe(pr)q(e)1195 1586 y Fg(:items)f Fn(is)e(equal)h(to)g (the)g(size)h(of)e(the)h(m)o(ultiset)104 1636 y Fg(A)p Fn(\()p Fg(s)170 1642 y Fe(pr)q(e)222 1636 y Fn(\))p Fg(:el)q(ems)p Fn(.)51 1719 y(2.)20 b(Also,)13 b Fg(A)h Fn(maps)f(the)h(limit)d(of)i(the)i(stac)o(k)f(to)g(the)g(b)q(ound)g(of) g(the)g(bag)g(so)g(that)g Fg(s)1366 1725 y Fe(pr)q(e)1417 1719 y Fg(:l)q(imit)f Fn(=)e Fg(A)p Fn(\()p Fg(s)1643 1725 y Fe(pr)q(e)1695 1719 y Fn(\))p Fg(:bound)p Fn(.)51 1802 y(3.)20 b(F)m(rom)12 b Fh(put)p Fn('s)i(pre-condition)g(w)o(e)g (kno)o(w)f Ff(j)h Fg(A)p Fn(\()p Fg(s)827 1808 y Fe(pr)q(e)879 1802 y Fn(\))p Fg(:el)q(ems)h Ff(j)c Fg(<)h(A)p Fn(\()p Fg(s)1161 1808 y Fe(pr)q(e)1213 1802 y Fn(\))p Fg(:bound)p Fn(.)51 1885 y(4.)20 b Fh(push)p Fn('s)14 b(pre-condition)g(holds)g(b)o (y)f(substituting)h(equals)g(for)g(equals.)62 1968 y(Note)i(the)g(role) f(of)f(the)i(abstraction)f(function)g(in)g(this)g(pro)q(of.)22 b(It)15 b(allo)o(ws)f(us)h(to)g(relate)h(stac)o(k)g(and)f(bag)f(v)n (alues,)h(and)0 2017 y(therefore)i(w)o(e)e(can)h(relate)g(predicates)g (ab)q(out)f(bag)g(v)n(alues)g(to)g(those)h(ab)q(out)g(stac)o(k)f(v)n (alues)g(and)g(vice)h(v)o(ersa.)23 b(Also,)15 b(note)0 2067 y(ho)o(w)e(w)o(e)i(dep)q(end)g(on)e Fg(A)h Fn(b)q(eing)g(a)g (function)f(\(in)h(step)h(\(4\))f(where)h(w)o(e)f(use)h(the)f (substitutivit)o(y)g(prop)q(ert)o(y)g(of)g(equalit)o(y\).)62 2117 y(The)g(p)q(ost-condition)f(rule)h(requires)h(that)f(w)o(e)f(sho)o (w)h Fh(push)p Fn('s)g(p)q(ost-condition)f(implies)f Fh(put)p Fn('s.)18 b(W)m(e)13 b(can)h(deal)f(with)g(the)0 2167 y Fk(mo)q(di\014es)f Fn(and)h Fk(ensures)f Fn(parts)i(separately)m (.)k(The)c Fk(mo)q(di\014es)e Fn(part)h(holds)h(b)q(ecause)h(the)f (same)f(ob)r(ject)h(is)g(men)o(tioned)e(in)0 2217 y(b)q(oth)i(sp)q (eci\014cations.)19 b(The)14 b Fk(ensures)e Fn(part)i(follo)o(ws)f (from)f(the)i(de\014nition)g(of)f(the)i(abstraction)f(function.)62 2267 y(The)h(in)o(v)n(arian)o(t)d(rule)i(requires)h(that)f(w)o(e)g(sho) o(w)g(that)g(the)g(in)o(v)n(arian)o(t)f(on)g(stac)o(ks:)104 2350 y Fg(l)q(eng)q(th)p Fn(\()p Fg(s)256 2356 y Fe(\032)276 2350 y Fg(:items)p Fn(\))g Ff(\024)f Fg(s)483 2356 y Fe(\032)503 2350 y Fg(:l)q(imit)0 2433 y Fn(implies)g(that)i(on)g (bags:)104 2516 y Ff(j)f Fg(A)p Fn(\()p Fg(s)195 2522 y Fe(\032)215 2516 y Fn(\))p Fg(:el)q(ems)i Ff(j)d(\024)f Fg(A)p Fn(\()p Fg(s)497 2522 y Fe(\032)517 2516 y Fn(\))p Fg(:bound)p 0 2554 780 2 v 46 2581 a Fb(4)64 2593 y Fo(Note)g(that)g(w) o(e)h(are)f(reasoning)e(in)j(terms)e(of)h(the)g Fa(values)i Fo(of)f(the)f(ob)r(ject,)e Fr(s)p Fo(,)k(and)d(that)h Fr(b)h Fo(and)f Fr(s)h Fo(refer)f(to)g(the)g(same)g(ob)r(ject)f(\()p Fr(b)i Fo(app)q(ears)e(in)0 2632 y(the)h(bag)f(sp)q(eci\014cation\).) 954 2795 y Fn(11)p eop %%Page: 12 14 12 13 bop 0 42 a Fn(W)m(e)13 b(can)i(sho)o(w)e(this)h(b)o(y)g(a)g (simple)e(pro)q(of)i(of)f(induction)g(on)h(the)g(length)g(of)g(the)g (sequence)i(of)d(a)h(b)q(ounded)g(stac)o(k.)62 91 y(The)h(constrain)o (t)f(rule)g(requires)h(that)f(w)o(e)g(sho)o(w)g(that)g(the)g(constrain) o(t)h(on)e(stac)o(ks:)104 170 y Fg(s)123 176 y Fe(\032)143 170 y Fg(:l)q(imit)f Fn(=)g Fg(s)322 176 y Fe( )347 170 y Fg(:l)q(imit)0 249 y Fn(implies)g(that)i(on)g(bags:)104 329 y Fg(A)p Fn(\()p Fg(s)170 335 y Fe(\032)190 329 y Fn(\))p Fg(:bound)c Fn(=)i Fg(A)p Fn(\()p Fg(s)447 335 y Fe( )473 329 y Fn(\))p Fg(:bound)0 408 y Fn(This)i(is)f(true)i(b)q (ecause)h(the)e(length)g(of)f(the)i(sequence)h(comp)q(onen)o(t)d(of)g (a)g(stac)o(k)i(is)e(the)i(same)e(as)h(the)g(size)h(of)e(the)h(m)o (ultiset)0 457 y(comp)q(onen)o(t)f(of)g(its)h(bag)g(coun)o(terpart.)62 507 y(Note)h(that)f(w)o(e)h(do)f(not)g(ha)o(v)o(e)g(to)g(sa)o(y)h(an)o (ything)e(sp)q(eci\014c)j(for)e Fh(swap)p 1139 507 13 2 v 15 w(top)p Fn(;)g(it)g(is)g(tak)o(en)h(care)g(of)e(just)i(lik)o(e)e (all)g(the)i(other)0 557 y(metho)q(ds)e(when)i(w)o(e)f(sho)o(w)g(that)g (the)g(sp)q(eci\014cation)h(of)e(stac)o(k)h(satis\014es)h(its)f(in)o(v) n(arian)o(t)e(and)i(constrain)o(t.)0 693 y Fj(6)67 b(T)n(yp)r(e)23 b(Hierarc)n(hies)0 784 y Fn(The)17 b(requiremen)o(t)g(w)o(e)h(imp)q (ose)d(on)i(subt)o(yp)q(es)h(is)f(v)o(ery)h(strong)f(and)g(raises)g(a)g (concern)h(that)f(it)g(migh)o(t)e(rule)i(out)g(man)o(y)0 834 y(useful)f(subt)o(yp)q(e)h(relations.)23 b(T)m(o)15 b(address)i(this)f(concern)h(w)o(e)f(lo)q(ok)o(ed)f(at)h(a)f(n)o(um)o (b)q(er)h(of)f(examples.)22 b(W)m(e)16 b(found)f(that)h(our)0 884 y(tec)o(hnique)f(captures)g(what)f(p)q(eople)g(w)o(an)o(t)g(from)e (a)h(hierarc)o(h)o(y)i(mec)o(hanism,)c(but)j(w)o(e)g(also)f(disco)o(v)o (ered)i(some)e(surprises.)62 934 y(The)18 b(examples)e(led)h(us)g(to)g (classify)f(subt)o(yp)q(e)i(relationships)f(in)o(to)f(t)o(w)o(o)g (broad)h(categories.)28 b(In)17 b(the)h(\014rst)f(category)m(,)0 984 y(the)i(subt)o(yp)q(e)h(extends)f(the)g(sup)q(ert)o(yp)q(e)i(b)o(y) d(pro)o(viding)f(additional)g(metho)q(ds)h(and)g(p)q(ossibly)g (additional)f(\\state.")32 b(In)0 1033 y(the)16 b(second,)h(the)f(subt) o(yp)q(e)g(is)f(more)g(constrained)h(than)g(the)g(sup)q(ert)o(yp)q(e.) 24 b(W)m(e)16 b(discuss)g(these)h(relationships)e(b)q(elo)o(w.)23 b(In)0 1083 y(practice,)14 b(man)o(y)e(t)o(yp)q(e)j(famili)o(es)d(will) h(exhibit)g(b)q(oth)h(kinds)g(of)f(relationships.)0 1199 y Fc(6.1)56 b(Extension)17 b(Subt)n(yp)r(es)0 1275 y Fn(A)g(subt)o(yp)q(e)i(extends)g(its)e(sup)q(ert)o(yp)q(e)i(if)e(its)g (ob)r(jects)i(ha)o(v)o(e)e(extra)h(metho)q(ds)f(in)g(addition)f(to)i (those)g(of)f(the)h(sup)q(ert)o(yp)q(e.)0 1325 y(Abstraction)13 b(functions)g(for)f(extension)h(subt)o(yp)q(es)h(are)f(on)o(to,)f (i.e.,)f(the)i(range)g(of)f(the)h(abstraction)f(function)h(is)f(the)h (set)h(of)0 1375 y(all)e(legal)f(v)n(alues)i(of)f(the)h(sup)q(ert)o(yp) q(e.)20 b(The)13 b(subt)o(yp)q(e)h(migh)o(t)c(simply)h(ha)o(v)o(e)i (more)e(metho)q(ds;)i(in)f(this)h(case)g(the)h(abstraction)0 1425 y(function)f(is)g(one-to-one.)18 b(Or)13 b(its)h(ob)r(jects)g (migh)o(t)d(also)h(ha)o(v)o(e)h(more)g(\\state,")g(i.e.,)f(they)h(migh) o(t)e(record)k(information)10 b(that)0 1474 y(is)k(not)g(presen)o(t)h (in)e(ob)r(jects)j(of)d(the)h(sup)q(ert)o(yp)q(e;)i(in)d(this)h(case)h (the)f(abstraction)g(function)g(is)g(man)o(y-to-one.)62 1524 y(As)h(an)f(example)e(of)i(the)g(one-to-one)h(case,)f(consider)h (a)f(t)o(yp)q(e)g(in)o(tset)h(\(for)f(set)h(of)e(in)o(tegers\))i(with)f (metho)q(ds)g(to)g Fh(insert)0 1574 y Fn(and)i Fh(delete)f Fn(elemen)o(ts,)h(to)f Fh(sele)n(ct)h Fn(elemen)o(ts,)f(and)h(to)f(pro) o(vide)h(the)g Fh(size)g Fn(of)f(the)h(set.)25 b(A)16 b(subt)o(yp)q(e,)g(in)o(tset2,)g(migh)o(t)e(ha)o(v)o(e)0 1624 y(more)j(metho)q(ds,)h(e.g.,)f Fh(union)p Fn(,)j Fh(is)p 551 1624 V 15 w(empty)p Fn(.)30 b(Here)19 b(there)g(is)f(no)f (extra)i(state,)g(just)f(extra)g(metho)q(ds.)30 b(Supp)q(ose)19 b(in)o(tset's)0 1674 y(in)o(v)n(arian)o(t)14 b(and)i(constrain)o(ts)g (are)g(b)q(oth)g(trivial;)f(in)o(tset2's)h(w)o(ould)f(b)q(e)h(as)g(w)o (ell.)23 b(Th)o(us,)16 b(pro)o(ving)f(that)h(in)o(tset2)g(preserv)o(es) 0 1724 y(in)o(tset's)e(in)o(v)n(arian)o(t)f(and)g(constrain)o(t)h(is)g (trivial.)62 1773 y(It)g(is)f(easy)h(to)f(disco)o(v)o(er)h(when)g(a)g (prop)q(osed)g(subt)o(yp)q(e)h(really)d(is)i(not)f(one.)18 b(F)m(or)13 b(example,)f(the)i(fat)p 1613 1773 V 15 w(set)g(t)o(yp)q(e) g(discussed)0 1823 y(earlier)h(has)h(an)f Fh(insert)g Fn(metho)q(d)f(but)i(no)f Fh(delete)g Fn(metho)q(d.)21 b(In)o(tset)c(is)e(not)g(a)g(subt)o(yp)q(e)h(of)f(fat)p 1492 1823 V 14 w(set)i(b)q(ecause)g(fat)p 1778 1823 V 14 w(sets)g(only)0 1873 y(gro)o(w)10 b(while)g(in)o(tsets)h(gro)o(w)f (and)g(shrink;)h(in)o(tset)g(do)q(es)g(not)f(preserv)o(e)i(v)n(arious)e (history)g(prop)q(erties)i(of)e(fat)p 1630 1873 V 14 w(set,)i(in)e(particular,)0 1923 y(the)15 b(constrain)o(t)g(that)g (once)h(some)e(in)o(teger)h(is)g(in)f(the)h(fat)p 914 1923 V 15 w(set,)g(it)g(remains)e(in)i(the)g(fat)p 1376 1923 V 15 w(set.)21 b(The)15 b(attempt)g(to)f(sho)o(w)h(that)0 1973 y(the)f(in)o(tset)h(constrain)o(t)f(\(whic)o(h)g(is)g(trivial\))e (implies)g(that)i(of)g(fat)p 1028 1973 V 14 w(set)h(w)o(ould)e(fail.)62 2022 y(As)i(a)e(simple)f(example)h(of)g(a)h(man)o(y-to-one)d(case,)k (consider)g(imm)n(utable)c(pairs)j(and)f(triples)h(\(Figure)g(5\).)k(P) o(airs)c(ha)o(v)o(e)0 2072 y(metho)q(ds)f(that)g(fetc)o(h)g(the)h (\014rst)g(and)e(second)j(elemen)o(ts;)d(triples)i(ha)o(v)o(e)e(these)j (metho)q(ds)d(plus)h(an)g(additional)e(one)j(to)e(fetc)o(h)0 2122 y(the)j(third)f(elemen)o(t.)19 b(T)m(riple)14 b(is)g(a)g(subt)o (yp)q(e)i(of)e(pair)g(and)g(so)g(is)h(semi-m)o(utabl)o(e)d(triple)i (with)g(metho)q(ds)g(to)h(fetc)o(h)g(the)g(\014rst,)0 2172 y(second,)i(and)f(third)g(elemen)o(ts)g(and)g(to)g(replace)h(the)g (third)f(elemen)o(t)f(b)q(ecause)j(replacing)e(the)h(third)f(elemen)o (t)f(do)q(es)i(not)0 2222 y(a\013ect)f(the)g(\014rst)h(or)e(second)i (elemen)o(t.)22 b(This)15 b(example)f(sho)o(ws)i(that)f(it)g(is)h(p)q (ossible)f(to)h(ha)o(v)o(e)f(a)g(m)o(utable)f(subt)o(yp)q(e)i(of)f(an)0 2271 y(imm)o(utabl)o(e)c(sup)q(ert)o(yp)q(e,)16 b(pro)o(vided)d(the)i (m)o(utations)d(are)i(in)o(visible)f(to)h(users)h(of)e(the)i(sup)q(ert) o(yp)q(e.)62 2321 y(Mutations)f(of)e(a)i(subt)o(yp)q(e)g(that)g(w)o (ould)e(b)q(e)j(visible)d(through)i(the)g(metho)q(ds)f(of)g(an)g(imm)o (utabl)o(e)e(sup)q(ert)o(yp)q(e)16 b(are)e(ruled)0 2371 y(out.)k(F)m(or)12 b(example,)f(an)i(imm)n(utable)d(sequence,)k(whose)g (elemen)o(ts)e(can)h(b)q(e)h(fetc)o(hed)f(but)g(not)g(stored,)g(is)g (not)g(a)f(sup)q(ert)o(yp)q(e)0 2421 y(of)g(m)o(utable)f(arra)o(y)m(,)h (whic)o(h)g(pro)o(vides)h(a)g Fh(stor)n(e)f Fn(metho)q(d)g(in)g (addition)f(to)i(the)g(sequence)i(metho)q(ds.)i(F)m(or)c(sequences)i(w) o(e)e(can)0 2471 y(pro)o(v)o(e)g(elemen)o(ts)f(do)g(not)h(c)o(hange;)g (this)f(is)h(not)f(true)i(for)e(arra)o(ys.)17 b(The)c(attempt)f(to)h (construct)h(the)f(subt)o(yp)q(e)g(relation)f(will)0 2521 y(fail)g(b)q(ecause)k(the)e(constrain)o(t)h(for)e(sequences)k(do)q (es)d(not)g(follo)o(w)e(from)g(that)i(for)g(arra)o(ys.)62 2570 y(Man)o(y)c(examples)g(of)f(extension)i(subt)o(yp)q(es)h(are)f (found)f(in)g(the)h(literature.)17 b(One)11 b(common)d(example)h (concerns)j(p)q(ersons,)0 2620 y(emplo)o(y)o(ees,)f(and)g(studen)o(ts)h (\(Figure)g(6\).)17 b(A)11 b(p)q(erson)i(ob)r(ject)f(has)f(metho)q(ds)g (that)h(rep)q(ort)g(its)f(prop)q(erties)i(suc)o(h)f(as)f(its)h(name,)0 2670 y(age,)i(and)g(p)q(ossibly)h(its)f(relationship)g(to)g(other)i(p)q (ersons)f(\(e.g.,)f(its)h(paren)o(ts)g(or)f(c)o(hildren\).)21 b(Studen)o(t)15 b(and)f(emplo)o(y)o(ee)g(are)954 2795 y(12)p eop %%Page: 13 15 13 14 bop 0 1 1950 1 v 608 245 a @beginspecial 23 @llx 652 @lly 199 @urx 701 @ury 1760 @rwi @setspecial %%BeginDocument: fig7.ps 50 dict begin /arrowHeight 8 def /arrowWidth 4 def /none null def /numGraphicParameters 17 def /stringLimit 65535 def /Begin { save numGraphicParameters dict begin } def /End { end restore } def /SetB { dup type /nulltype eq { pop false /brushRightArrow idef false /brushLeftArrow idef true /brushNone idef } { /brushDashOffset idef /brushDashArray idef 0 ne /brushRightArrow idef 0 ne /brushLeftArrow idef /brushWidth idef false /brushNone idef } ifelse } def /SetCFg { /fgblue idef /fggreen idef /fgred idef } def /SetCBg { /bgblue idef /bggreen idef /bgred idef } def /SetF { /printSize idef /printFont idef } def /SetP { dup type /nulltype eq { pop true /patternNone idef } { /patternGrayLevel idef patternGrayLevel -1 eq { /patternString idef } if false /patternNone idef } ifelse } def /BSpl { 0 begin storexyn newpath n 1 gt { 0 0 0 0 0 0 1 1 true subspline n 2 gt { 0 0 0 0 1 1 2 2 false subspline 1 1 n 3 sub { /i exch def i 1 sub dup i dup i 1 add dup i 2 add dup false subspline } for n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline } if n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if brushNone not { istroke } if 0 0 1 1 leftarrow n 2 sub dup n 1 sub dup rightarrow } if end } dup 0 4 dict put def /Circ { newpath 0 360 arc patternNone not { ifill } if brushNone not { istroke } if } def /CBSpl { 0 begin dup 2 gt { storexyn newpath n 1 sub dup 0 0 1 1 2 2 true subspline 1 1 n 3 sub { /i exch def i 1 sub dup i dup i 1 add dup i 2 add dup false subspline } for n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline n 2 sub dup n 1 sub dup 0 0 1 1 false subspline patternNone not { ifill } if brushNone not { istroke } if } { Poly } ifelse end } dup 0 4 dict put def /Elli { 0 begin newpath 4 2 roll translate scale 0 0 1 0 360 arc patternNone not { ifill } if brushNone not { istroke } if end } dup 0 1 dict put def /Line { 0 begin 2 storexyn newpath x 0 get y 0 get moveto x 1 get y 1 get lineto brushNone not { istroke } if 0 0 1 1 leftarrow 0 0 1 1 rightarrow end } dup 0 4 dict put def /MLine { 0 begin storexyn newpath n 1 gt { x 0 get y 0 get moveto 1 1 n 1 sub { /i exch def x i get y i get lineto } for patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if brushNone not { istroke } if 0 0 1 1 leftarrow n 2 sub dup n 1 sub dup rightarrow } if end } dup 0 4 dict put def /Poly { 3 1 roll newpath moveto -1 add { lineto } repeat closepath patternNone not { ifill } if brushNone not { istroke } if } def /Rect { 0 begin /t exch def /r exch def /b exch def /l exch def newpath l b moveto l t lineto r t lineto r b lineto closepath patternNone not { ifill } if brushNone not { istroke } if end } dup 0 4 dict put def /Text { ishow } def /idef { dup where { pop pop pop } { exch def } ifelse } def /ifill { 0 begin gsave patternGrayLevel -1 ne { fgred bgred fgred sub patternGrayLevel mul add fggreen bggreen fggreen sub patternGrayLevel mul add fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor eofill } { eoclip originalCTM setmatrix pathbbox /t exch def /r exch def /b exch def /l exch def /w r l sub ceiling cvi def /h t b sub ceiling cvi def /imageByteWidth w 8 div ceiling cvi def /imageHeight h def bgred bggreen bgblue setrgbcolor eofill fgred fggreen fgblue setrgbcolor w 0 gt h 0 gt and { l b translate w h scale w h true [w 0 0 h neg 0 h] { patternproc } imagemask } if } ifelse grestore end } dup 0 8 dict put def /istroke { gsave brushDashOffset -1 eq { [] 0 setdash 1 setgray } { brushDashArray brushDashOffset setdash fgred fggreen fgblue setrgbcolor } ifelse brushWidth setlinewidth originalCTM setmatrix stroke grestore } def /ishow { 0 begin gsave fgred fggreen fgblue setrgbcolor /fontDict printFont findfont printSize scalefont dup setfont def /descender fontDict begin 0 [FontBBox] 1 get FontMatrix end transform exch pop def /vertoffset 0 descender sub printSize sub printFont /Courier ne printFont /Courier-Bold ne and { 1 add } if def { 0 vertoffset moveto show /vertoffset vertoffset printSize sub def } forall grestore end } dup 0 3 dict put def /patternproc { 0 begin /patternByteLength patternString length def /patternHeight patternByteLength 8 mul sqrt cvi def /patternWidth patternHeight def /patternByteWidth patternWidth 8 idiv def /imageByteMaxLength imageByteWidth imageHeight mul stringLimit patternByteWidth sub min def /imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv patternHeight mul patternHeight max def /imageHeight imageHeight imageMaxHeight sub store /imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def 0 1 imageMaxHeight 1 sub { /y exch def /patternRow y patternByteWidth mul patternByteLength mod def /patternRowString patternString patternRow patternByteWidth getinterval def /imageRow y imageByteWidth mul def 0 patternByteWidth imageByteWidth 1 sub { /x exch def imageString imageRow x add patternRowString putinterval } for } for imageString end } dup 0 12 dict put def /min { dup 3 2 roll dup 4 3 roll lt { exch } if pop } def /max { dup 3 2 roll dup 4 3 roll gt { exch } if pop } def /arrowhead { 0 begin transform originalCTM itransform /taily exch def /tailx exch def transform originalCTM itransform /tipy exch def /tipx exch def /dy tipy taily sub def /dx tipx tailx sub def /angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def gsave originalCTM setmatrix tipx tipy translate angle rotate newpath 0 0 moveto arrowHeight neg arrowWidth 2 div lineto arrowHeight neg arrowWidth 2 div neg lineto closepath patternNone not { originalCTM setmatrix /padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul arrowWidth div def /padtail brushWidth 2 div def tipx tipy translate angle rotate padtip 0 translate arrowHeight padtip add padtail add arrowHeight div dup scale arrowheadpath ifill } if brushNone not { originalCTM setmatrix tipx tipy translate angle rotate arrowheadpath istroke } if grestore end } dup 0 9 dict put def /arrowheadpath { newpath 0 0 moveto arrowHeight neg arrowWidth 2 div lineto arrowHeight neg arrowWidth 2 div neg lineto closepath } def /leftarrow { 0 begin y exch get /taily exch def x exch get /tailx exch def y exch get /tipy exch def x exch get /tipx exch def brushLeftArrow { tipx tipy tailx taily arrowhead } if end } dup 0 4 dict put def /rightarrow { 0 begin y exch get /tipy exch def x exch get /tipx exch def y exch get /taily exch def x exch get /tailx exch def brushRightArrow { tipx tipy tailx taily arrowhead } if end } dup 0 4 dict put def /midpoint { 0 begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def x0 x1 add 2 div y0 y1 add 2 div end } dup 0 4 dict put def /thirdpoint { 0 begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def x0 2 mul x1 add 3 div y0 2 mul y1 add 3 div end } dup 0 4 dict put def /subspline { 0 begin /movetoNeeded exch def y exch get /y3 exch def x exch get /x3 exch def y exch get /y2 exch def x exch get /x2 exch def y exch get /y1 exch def x exch get /x1 exch def y exch get /y0 exch def x exch get /x0 exch def x1 y1 x2 y2 thirdpoint /p1y exch def /p1x exch def x2 y2 x1 y1 thirdpoint /p2y exch def /p2x exch def x1 y1 x0 y0 thirdpoint p1x p1y midpoint /p0y exch def /p0x exch def x2 y2 x3 y3 thirdpoint p2x p2y midpoint /p3y exch def /p3x exch def movetoNeeded { p0x p0y moveto } if p1x p1y p2x p2y p3x p3y curveto end } dup 0 17 dict put def /storexyn { /n exch def /y n array def /x n array def n 1 sub -1 0 { /i exch def y i 3 2 roll put x i 3 2 roll put } for } def %I Idraw 7 Grid 8 Begin %I b u %I cfg u %I cbg u %I f u %I p u %I t [ 0.923077 0 0 0.923077 0 0 ] concat /originalCTM matrix currentmatrix def Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 /Times-Roman 10 SetF %I t [ 1 0 0 1 86 756 ] concat %I [ (immutable pair) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 /Times-Roman 10 SetF %I t [ 1 0 0 1 26 717 ] concat %I [ (immutable triple) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 /Times-Roman 10 SetF %I t [ 1 0 0 1 129 717 ] concat %I [ (semi-mutable triple) ] Text End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -87 52 ] concat %I 199 691 165 673 Line End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -87 52 ] concat %I 199 691 234 673 Line End End %I eop showpage end %%EndDocument @endspecial 729 336 a Fn(Figure)14 b(5:)k(P)o(airs)c(and)f(T)m(riples) p 0 386 V 0 560 a(subt)o(yp)q(es)19 b(of)d(p)q(erson;)k(in)d(eac)o(h)h (case)g(they)g(ha)o(v)o(e)f(additional)f(prop)q(erties,)j(e.g.,)e(a)g (studen)o(t)h(id)f(n)o(um)o(b)q(er,)g(an)g(emplo)o(y)o(ee)0 610 y(emplo)o(y)o(er)e(and)h(salary)m(.)24 b(In)16 b(addition,)f(t)o (yp)q(e)i(studen)o(t)p 867 610 13 2 v 16 w(emplo)o(y)o(ee)e(is)h(a)g (subt)o(yp)q(e)i(of)d(b)q(oth)i(studen)o(t)g(and)f(emplo)o(y)o(ee)f (\(and)0 660 y(also)f(p)q(erson,)i(since)g(the)f(subt)o(yp)q(e)h (relation)e(is)h(transitiv)o(e\).)21 b(In)15 b(this)g(example,)e(the)j (subt)o(yp)q(e)g(ob)r(jects)g(ha)o(v)o(e)e(more)g(state)0 710 y(than)g(those)g(of)g(the)g(sup)q(ert)o(yp)q(e)i(as)e(w)o(ell)f(as) h(more)f(metho)q(ds.)p 0 768 1950 1 v 679 1224 a @beginspecial 35 @llx 468 @lly 177 @urx 568 @ury 1420 @rwi @setspecial %%BeginDocument: fig8.ps 50 dict begin /arrowHeight 8 def /arrowWidth 4 def /none null def /numGraphicParameters 17 def /stringLimit 65535 def /Begin { save numGraphicParameters dict begin } def /End { end restore } def /SetB { dup type /nulltype eq { pop false /brushRightArrow idef false /brushLeftArrow idef true /brushNone idef } { /brushDashOffset idef /brushDashArray idef 0 ne /brushRightArrow idef 0 ne /brushLeftArrow idef /brushWidth idef false /brushNone idef } ifelse } def /SetCFg { /fgblue idef /fggreen idef /fgred idef } def /SetCBg { /bgblue idef /bggreen idef /bgred idef } def /SetF { /printSize idef /printFont idef } def /SetP { dup type /nulltype eq { pop true /patternNone idef } { /patternGrayLevel idef patternGrayLevel -1 eq { /patternString idef } if false /patternNone idef } ifelse } def /BSpl { 0 begin storexyn newpath n 1 gt { 0 0 0 0 0 0 1 1 true subspline n 2 gt { 0 0 0 0 1 1 2 2 false subspline 1 1 n 3 sub { /i exch def i 1 sub dup i dup i 1 add dup i 2 add dup false subspline } for n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline } if n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if brushNone not { istroke } if 0 0 1 1 leftarrow n 2 sub dup n 1 sub dup rightarrow } if end } dup 0 4 dict put def /Circ { newpath 0 360 arc patternNone not { ifill } if brushNone not { istroke } if } def /CBSpl { 0 begin dup 2 gt { storexyn newpath n 1 sub dup 0 0 1 1 2 2 true subspline 1 1 n 3 sub { /i exch def i 1 sub dup i dup i 1 add dup i 2 add dup false subspline } for n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline n 2 sub dup n 1 sub dup 0 0 1 1 false subspline patternNone not { ifill } if brushNone not { istroke } if } { Poly } ifelse end } dup 0 4 dict put def /Elli { 0 begin newpath 4 2 roll translate scale 0 0 1 0 360 arc patternNone not { ifill } if brushNone not { istroke } if end } dup 0 1 dict put def /Line { 0 begin 2 storexyn newpath x 0 get y 0 get moveto x 1 get y 1 get lineto brushNone not { istroke } if 0 0 1 1 leftarrow 0 0 1 1 rightarrow end } dup 0 4 dict put def /MLine { 0 begin storexyn newpath n 1 gt { x 0 get y 0 get moveto 1 1 n 1 sub { /i exch def x i get y i get lineto } for patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if brushNone not { istroke } if 0 0 1 1 leftarrow n 2 sub dup n 1 sub dup rightarrow } if end } dup 0 4 dict put def /Poly { 3 1 roll newpath moveto -1 add { lineto } repeat closepath patternNone not { ifill } if brushNone not { istroke } if } def /Rect { 0 begin /t exch def /r exch def /b exch def /l exch def newpath l b moveto l t lineto r t lineto r b lineto closepath patternNone not { ifill } if brushNone not { istroke } if end } dup 0 4 dict put def /Text { ishow } def /idef { dup where { pop pop pop } { exch def } ifelse } def /ifill { 0 begin gsave patternGrayLevel -1 ne { fgred bgred fgred sub patternGrayLevel mul add fggreen bggreen fggreen sub patternGrayLevel mul add fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor eofill } { eoclip originalCTM setmatrix pathbbox /t exch def /r exch def /b exch def /l exch def /w r l sub ceiling cvi def /h t b sub ceiling cvi def /imageByteWidth w 8 div ceiling cvi def /imageHeight h def bgred bggreen bgblue setrgbcolor eofill fgred fggreen fgblue setrgbcolor w 0 gt h 0 gt and { l b translate w h scale w h true [w 0 0 h neg 0 h] { patternproc } imagemask } if } ifelse grestore end } dup 0 8 dict put def /istroke { gsave brushDashOffset -1 eq { [] 0 setdash 1 setgray } { brushDashArray brushDashOffset setdash fgred fggreen fgblue setrgbcolor } ifelse brushWidth setlinewidth originalCTM setmatrix stroke grestore } def /ishow { 0 begin gsave fgred fggreen fgblue setrgbcolor /fontDict printFont findfont printSize scalefont dup setfont def /descender fontDict begin 0 [FontBBox] 1 get FontMatrix end transform exch pop def /vertoffset 0 descender sub printSize sub printFont /Courier ne printFont /Courier-Bold ne and { 1 add } if def { 0 vertoffset moveto show /vertoffset vertoffset printSize sub def } forall grestore end } dup 0 3 dict put def /patternproc { 0 begin /patternByteLength patternString length def /patternHeight patternByteLength 8 mul sqrt cvi def /patternWidth patternHeight def /patternByteWidth patternWidth 8 idiv def /imageByteMaxLength imageByteWidth imageHeight mul stringLimit patternByteWidth sub min def /imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv patternHeight mul patternHeight max def /imageHeight imageHeight imageMaxHeight sub store /imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def 0 1 imageMaxHeight 1 sub { /y exch def /patternRow y patternByteWidth mul patternByteLength mod def /patternRowString patternString patternRow patternByteWidth getinterval def /imageRow y imageByteWidth mul def 0 patternByteWidth imageByteWidth 1 sub { /x exch def imageString imageRow x add patternRowString putinterval } for } for imageString end } dup 0 12 dict put def /min { dup 3 2 roll dup 4 3 roll lt { exch } if pop } def /max { dup 3 2 roll dup 4 3 roll gt { exch } if pop } def /arrowhead { 0 begin transform originalCTM itransform /taily exch def /tailx exch def transform originalCTM itransform /tipy exch def /tipx exch def /dy tipy taily sub def /dx tipx tailx sub def /angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def gsave originalCTM setmatrix tipx tipy translate angle rotate newpath 0 0 moveto arrowHeight neg arrowWidth 2 div lineto arrowHeight neg arrowWidth 2 div neg lineto closepath patternNone not { originalCTM setmatrix /padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul arrowWidth div def /padtail brushWidth 2 div def tipx tipy translate angle rotate padtip 0 translate arrowHeight padtip add padtail add arrowHeight div dup scale arrowheadpath ifill } if brushNone not { originalCTM setmatrix tipx tipy translate angle rotate arrowheadpath istroke } if grestore end } dup 0 9 dict put def /arrowheadpath { newpath 0 0 moveto arrowHeight neg arrowWidth 2 div lineto arrowHeight neg arrowWidth 2 div neg lineto closepath } def /leftarrow { 0 begin y exch get /taily exch def x exch get /tailx exch def y exch get /tipy exch def x exch get /tipx exch def brushLeftArrow { tipx tipy tailx taily arrowhead } if end } dup 0 4 dict put def /rightarrow { 0 begin y exch get /tipy exch def x exch get /tipx exch def y exch get /taily exch def x exch get /tailx exch def brushRightArrow { tipx tipy tailx taily arrowhead } if end } dup 0 4 dict put def /midpoint { 0 begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def x0 x1 add 2 div y0 y1 add 2 div end } dup 0 4 dict put def /thirdpoint { 0 begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def x0 2 mul x1 add 3 div y0 2 mul y1 add 3 div end } dup 0 4 dict put def /subspline { 0 begin /movetoNeeded exch def y exch get /y3 exch def x exch get /x3 exch def y exch get /y2 exch def x exch get /x2 exch def y exch get /y1 exch def x exch get /x1 exch def y exch get /y0 exch def x exch get /x0 exch def x1 y1 x2 y2 thirdpoint /p1y exch def /p1x exch def x2 y2 x1 y1 thirdpoint /p2y exch def /p2x exch def x1 y1 x0 y0 thirdpoint p1x p1y midpoint /p0y exch def /p0x exch def x2 y2 x3 y3 thirdpoint p2x p2y midpoint /p3y exch def /p3x exch def movetoNeeded { p0x p0y moveto } if p1x p1y p2x p2y p3x p3y curveto end } dup 0 17 dict put def /storexyn { /n exch def /y n array def /x n array def n 1 sub -1 0 { /i exch def y i 3 2 roll put x i 3 2 roll put } for } def %I Idraw 7 Grid 8 Begin %I b u %I cfg u %I cbg u %I f u %I p u %I t [ 0.923077 0 0 0.923077 0 0 ] concat /originalCTM matrix currentmatrix def Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 /Times-Roman 10 SetF %I t [ 1 0 0 1 100 612 ] concat %I [ (person) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 /Times-Roman 10 SetF %I t [ 1 0 0 1 40 564 ] concat %I [ (student) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 /Times-Roman 10 SetF %I t [ 1 0 0 1 152 565 ] concat %I [ (employee) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 /Times-Roman 10 SetF %I t [ 1 0 0 1 75 518 ] concat %I [ (student_employee) ] Text End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -87 52 ] concat %I 199 544 165 509 Line End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -87 52 ] concat %I 199 544 234 509 Line End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -87 52 ] concat %I 165 509 199 475 Line End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -87 52 ] concat %I 234 509 199 475 Line End End %I eop showpage end %%EndDocument @endspecial 599 1316 a(Figure)h(6:)k(P)o(erson,)c(Studen)o(t,)g(and)g (Emplo)o(y)o(ee)p 0 1366 V 62 1507 a(Another)f(example)e(from)f(the)j (database)f(literature)g(concerns)i(di\013eren)o(t)f(kinds)f(of)f (ships)i([HM81)o(].)k(The)12 b(sup)q(ert)o(yp)q(e)i(is)0 1557 y(generic)g(ships)g(with)f(metho)q(ds)g(to)g(determine)h(suc)o(h)g (things)f(as)h(who)f(is)g(the)h(captain)f(and)g(where)i(the)f(ship)f (is)h(registered.)0 1607 y(Subt)o(yp)q(es)k(con)o(tain)f(more)f(sp)q (ecialized)i(ships)g(suc)o(h)g(as)f(tank)o(ers)h(and)g(freigh)o(ters.) 29 b(There)18 b(can)f(b)q(e)h(quite)g(an)f(elab)q(orate)0 1656 y(hierarc)o(h)o(y)f(\(e.g.,)e(tank)o(ers)i(are)g(a)f(sp)q(ecial)g (kind)g(of)f(freigh)o(ter\).)23 b(Windo)o(ws)14 b(are)i(another)g(w)o (ell-kno)o(wn)e(example)f([HO87];)0 1706 y(subt)o(yp)q(es)i(include)f (b)q(ordered)i(windo)o(ws,)d(colored)h(windo)o(ws,)f(and)g(scrollable)h (windo)o(ws.)62 1756 y(Common)9 b(examples)i(of)g(subt)o(yp)q(e)i (relationships)f(are)g(allo)o(w)o(ed)f(b)o(y)g(our)h(de\014nition)g (pro)o(vided)f(the)i Fh(e)n(qual)f Fn(metho)q(d)f(\(and)0 1806 y(other)j(similar)d(metho)q(ds\))j(are)g(de\014ned)h(prop)q(erly)f (in)f(the)h(subt)o(yp)q(e.)19 b(Supp)q(ose)c(sup)q(ert)o(yp)q(e)g Fg(\034)k Fn(pro)o(vides)14 b(an)f Fh(e)n(qual)h Fn(metho)q(d)0 1856 y(and)f(consider)i(a)e(particular)h(call)f Fh(x.e)n(qual\(y\))p Fn(.)18 b(The)c(di\016cult)o(y)f(arises)h(when)g Fg(x)g Fn(and)f Fg(y)j Fn(actually)c(b)q(elong)i(to)f Fg(\033)q Fn(,)h(a)f(subt)o(yp)q(e)0 1905 y(of)g Fg(\034)5 b Fn(.)17 b(If)c(ob)r(jects)i(of)d(the)i(subt)o(yp)q(e)g(ha)o(v)o(e)f(additional) f(state,)i Fg(x)f Fn(and)g Fg(y)i Fn(ma)o(y)c(di\013er)j(when)f (considered)i(as)f(subt)o(yp)q(e)g(ob)r(jects)0 1955 y(but)g(ough)o(t)g(to)f(b)q(e)i(considered)g(equal)f(when)g(considered) h(as)f(sup)q(ert)o(yp)q(e)i(ob)r(jects.)62 2005 y(F)m(or)f(example,)e (consider)j(imm)o(utable)c(triples)j Fg(x)e Fn(=)h Ff(h)p Fn(0)p Fg(;)7 b Fn(0)p Fg(;)g Fn(0)p Ff(i)14 b Fn(and)h Fg(y)g Fn(=)f Ff(h)p Fn(0)p Fg(;)7 b Fn(0)p Fg(;)g Fn(1)p Ff(i)p Fn(.)20 b(Supp)q(ose)15 b(the)h(sp)q(eci\014cation)g(of)e(the)0 2055 y Fh(e)n(qual)g Fn(metho)q(d)f(for)h(pairs)f(sa)o(ys:)104 2138 y Fh(e)n(qual)h Fn(=)g Fk(pro)q(c)f Fn(\()p Fh(q:)19 b Fn(pair\))13 b Fk(returns)f Fn(\(b)q(o)q(ol\))254 2188 y Fk(ensures)g Fg(r)q(esul)q(t)g Fn(=)g(\()p Fg(p:f)t(ir)q(st)g Fn(=)g Fg(q)q(:f)t(ir)q(st)e Ff(^)f Fg(p:second)j Fn(=)f Fg(q)q(:second)p Fn(\))0 2271 y(\(W)m(e)j(are)h(using)f Fg(p)h Fn(to)f(refer)i(to)e(the)h(metho)q(d's)f(ob)r(ject.\))21 b(Ho)o(w)o(ev)o(er,)14 b(w)o(e)h(w)o(ould)f(exp)q(ect)i(t)o(w)o(o)e (triples)g(to)h(b)q(e)g(equal)f(only)g(if)0 2321 y(their)e(\014rst,)h (second,)g(and)f(third)g(comp)q(onen)o(ts)f(w)o(ere)i(equal.)k(If)12 b(a)f(program)g(using)g(triples)i(had)e(just)h(observ)o(ed)i(that)e Fg(x)f Fn(and)0 2370 y Fg(y)17 b Fn(di\013er)e(in)g(their)g(third)g (elemen)o(t,)f(w)o(e)h(w)o(ould)g(exp)q(ect)h Fh(x.e)n(qual\(y\))f Fn(to)g(return)h(\\false,")e(but)h(if)f(the)i(program)d(w)o(ere)j (using)0 2420 y(them)d(as)h(pairs,)f(and)g(had)h(just)f(observ)o(ed)i (that)f(their)g(\014rst)g(and)g(second)h(elemen)o(ts)e(w)o(ere)i (equal,)e(it)g(w)o(ould)g(b)q(e)h(wrong)f(for)0 2470 y(the)h Fh(e)n(qual)g Fn(metho)q(d)g(to)f(return)i(false.)62 2520 y(The)g(w)o(a)o(y)e(to)h(resolv)o(e)g(this)g(dilemma)c(is)k(to)g (ha)o(v)o(e)f(t)o(w)o(o)h(equal)f(metho)q(ds)h(in)f(triple:)104 2603 y Fh(p)n(air)p 178 2603 13 2 v 15 w(e)n(qual)h Fn(=)g Fk(pro)q(c)f Fn(\()p Fh(p:)19 b Fn(pair\))13 b Fk(returns)f Fn(\(b)q(o)q(ol\))248 2653 y Fk(ensures)g Fg(r)q(esul)q(t)g Fn(=)g(\()p Fg(p:f)t(ir)q(st)g Fn(=)g Fg(q)q(:f)t(ir)q(st)e Ff(^)f Fg(p:second)j Fn(=)f Fg(q)q(:second)p Fn(\))954 2795 y(13)p eop %%Page: 14 16 14 15 bop 104 91 a Fh(triple)p 203 91 13 2 v 14 w(equal)14 b Fn(=)g Fk(pro)q(c)g Fn(\()p Fh(p:)k Fn(triple\))c Fk(returns)e Fn(\(b)q(o)q(ol\))233 141 y Fk(ensures)g Fg(r)q(esul)q(t)g Fn(=)g(\()p Fg(p:f)t(ir)q(st)h Fn(=)e Fg(q)q(:f)t(ir)q(st)g Ff(^)d Fg(p:second)k Fn(=)g Fg(q)q(:second)564 191 y Ff(^)23 b Fg(p:thir)q(d)11 b Fn(=)g Fg(q)q(:thir)q(d)p Fn(\))0 270 y(One)71 b(of)f(them)g(\()p Fh(p)n(air)p 501 270 V 15 w(e)n(qual)p Fn(\))h(sim)o(ulates)e(the)i Fh(e)n(qual)g Fn(metho)q(d)f(for)g(pair;)98 b(the)71 b(other)0 320 y(\()p Fh(triple)p 115 320 V 14 w(e)n(qual)p Fn(\))16 b(is)g(a)f(metho)q(d)g(just)g(on)h(triples.)23 b(\(In)16 b(some)e(ob)r(ject-orien)o(ted)j(languages,)e(suc)o(h)h(as)g (Ja)o(v)n(a,)f(the)h(additional)0 369 y(equal)e(metho)q(ds)f(are)h (obtained)g(b)o(y)g(o)o(v)o(erloading.\))62 419 y(The)f(problem)f(is)g (not)h(limited)d(to)j(equalit)o(y)f(metho)q(ds.)17 b(It)c(also)f (a\013ects)i(metho)q(ds)e(that)h(\\exp)q(ose")g(the)h(abstract)f(state) 0 469 y(of)i(ob)r(jects,)i(e.g.,)e(an)g Fh(unp)n(arse)h Fn(metho)q(d)f(that)h(returns)h(a)f(string)f(represen)o(tation)i(of)f (the)g(abstract)g(state)h(of)e(its)h(ob)r(ject.)0 519 y Fh(x.unp)n(arse\(\))e Fn(ough)o(t)g(to)f(return)i(a)f(represen)o (tation)h(of)f(a)f(pair)g(if)g(called)h(in)f(a)h(con)o(text)h(in)e (whic)o(h)h Fg(x)f Fn(is)h(considered)h(to)f(b)q(e)g(a)0 569 y(pair,)g(but)i(it)f(ough)o(t)f(to)h(return)h(a)f(represen)o (tation)i(of)d(a)h(triple)g(in)g(a)g(con)o(text)g(in)g(whic)o(h)g Fg(x)g Fn(is)g(kno)o(wn)f(to)h(b)q(e)h(a)f(triple)g(\(or)0 618 y(some)e(subt)o(yp)q(e)i(of)e(triple\).)62 668 y(The)g(need)h(for)e (sev)o(eral)h(equalit)o(y)e(metho)q(ds)h(seems)h(natural)f(for)g (realistic)g(examples.)17 b(F)m(or)12 b(example,)f(asking)h(whether)0 718 y Fh(e1)h Fn(and)f Fh(e2)h Fn(are)f(the)h(same)f(p)q(erson)h(is)f (di\013eren)o(t)i(from)c(asking)i(if)g(they)h(are)f(the)h(same)f(emplo) o(y)o(ee.)k(In)d(the)g(case)g(of)f(a)g(p)q(erson)0 768 y(holding)i(t)o(w)o(o)h(jobs,)g(the)h(answ)o(er)g(migh)o(t)d(b)q(e)j (true)h(for)e(the)h(question)f(ab)q(out)g(p)q(erson)i(but)e(false)g (for)g(the)h(question)g(ab)q(out)0 818 y(emplo)o(y)o(ee.)0 933 y Fc(6.2)56 b(Constrained)18 b(Subt)n(yp)r(es)0 1010 y Fn(The)12 b(second)g(kind)e(of)h(subt)o(yp)q(e)h(relation)f(o)q (ccurs)h(when)g(the)g(subt)o(yp)q(e)g(is)f(more)f(constrained)i(than)f (the)h(sup)q(ert)o(yp)q(e.)19 b(In)11 b(this)0 1059 y(case,)17 b(the)f(sup)q(ert)o(yp)q(e)h(sp)q(eci\014cation)g(is)e(written)i(in)e (a)g(w)o(a)o(y)g(that)h(allo)o(ws)e(v)n(ariation)g(in)h(b)q(eha)o(vior) h(among)d(its)j(subt)o(yp)q(es.)0 1109 y(Subt)o(yp)q(es)d(constrain)g (the)f(sup)q(ert)o(yp)q(e)i(b)o(y)e(reducing)h(the)f(v)n(ariabilit)o(y) m(.)j(The)d(abstraction)h(function)e(is)h(usually)g(in)o(to)f(rather)0 1159 y(than)20 b(on)o(to.)36 b(The)20 b(subt)o(yp)q(e)h(ma)o(y)d (extend)j(those)g(sup)q(ert)o(yp)q(e)h(ob)r(jects)f(that)f(it)g(sim)o (ulates)e(b)o(y)i(pro)o(viding)f(additional)0 1209 y(metho)q(ds)13 b(and/or)h(state.)62 1259 y(Since)k(constrained)g(subt)o(yp)q(es)h (reduce)g(v)n(ariation,)d(it)h(is)g(crucial)h(when)f(de\014ning)h(this) f(kind)g(of)g(t)o(yp)q(e)g(hierarc)o(h)o(y)h(to)0 1309 y(think)f(carefully)g(ab)q(out)h(what)f(v)n(ariabilit)o(y)e(is)i(p)q (ermitted)g(for)g(the)h(subt)o(yp)q(es.)31 b(The)18 b(v)n(ariabilit)o (y)c(will)i(sho)o(w)i(up)f(in)g(the)0 1358 y(sup)q(ert)o(yp)q(e)h(sp)q (eci\014cations)f(in)f(t)o(w)o(o)f(w)o(a)o(ys:)23 b(in)15 b(the)i(in)o(v)n(arian)o(t)d(and)i(constrain)o(t,)h(and)f(also)f(in)h (the)h(sp)q(eci\014cations)g(of)e(the)0 1408 y(individual)e(metho)q (ds.)21 b(In)14 b(b)q(oth)h(cases)i(the)e(sup)q(ert)o(yp)q(e)i (de\014nitions)e(will)e(b)q(e)j(nondeterministic)e(in)h(those)g(places) h(where)0 1458 y(di\013eren)o(t)f(subt)o(yp)q(es)g(are)f(exp)q(ected)i (to)e(pro)o(vide)g(di\013eren)o(t)h(b)q(eha)o(vior.)62 1508 y(A)f(v)o(ery)f(simple)f(example)g(concerns)j(elephan)o(ts.)k (Elephan)o(ts)14 b(come)e(in)h(man)o(y)f(colors)h(\(realistically)f (grey)i(and)f(white,)0 1558 y(but)j(w)o(e)f(will)f(also)h(allo)o(w)f (blue)i(ones\).)23 b(Ho)o(w)o(ev)o(er)16 b(all)e(albino)h(elephan)o(ts) h(are)g(white)f(and)h(all)e(ro)o(y)o(al)g(elephan)o(ts)i(are)g(blue.)0 1607 y(Figure)g(7)g(sho)o(ws)g(the)h(elephan)o(t)g(hierarc)o(h)o(y)m(.) 24 b(The)17 b(set)g(of)e(legal)g(v)n(alues)h(for)g(regular)g(elephan)o (ts)h(includes)f(all)f(elephan)o(ts)0 1657 y(whose)f(color)g(is)g(grey) g(or)g(blue)g(or)g(white:)104 1736 y Fk(in)o(v)m(arian)o(t)d Fg(e)321 1742 y Fe(\032)340 1736 y Fg(:col)q(or)i Fn(=)e Fg(w)q(hite)f Ff(_)f Fg(e)667 1742 y Fe(\032)687 1736 y Fg(:col)q(or)j Fn(=)g Fg(g)q(r)q(ey)f Ff(_)e Fg(e)992 1742 y Fe(\032)1012 1736 y Fg(:col)q(or)j Fn(=)g Fg(bl)q(ue)0 1815 y Fn(The)i(set)h(of)e(legal)g(v)n(alues)h(for)f(ro)o(y)o(al)g (elephan)o(ts)i(is)e(a)h(subset)h(of)f(those)g(for)g(regular)g(elephan) o(ts:)104 1894 y Fk(in)o(v)m(arian)o(t)d Fg(e)321 1900 y Fe(\032)340 1894 y Fg(:col)q(or)i Fn(=)e Fg(bl)q(ue)0 1973 y Fn(and)k(hence)i(the)f(abstraction)f(function)g(is)g(in)o(to.)22 b(The)15 b(situation)g(for)g(albino)f(elephan)o(ts)i(is)f(similar.)k(F) m(urthermore,)c(the)0 2022 y(elephan)o(t)i(metho)q(d)f(that)g(returns)j (the)e(color)f(\(if)g(there)i(is)e(suc)o(h)i(a)e(metho)q(d\))g(can)h (return)h(grey)f(or)f(blue)h(or)f(white,)h(i.e.,)0 2072 y(it)e(is)g(nondeterministic;)g(the)h(subt)o(yp)q(es)h(restrict)g(the)f (nondeterminism)e(for)h(this)g(metho)q(d)g(b)o(y)g(de\014ning)g(it)g (to)h(return)g(a)0 2122 y(sp)q(ecifc)f(color.)62 2172 y(This)e(simple)e(example)h(has)h(led)g(others)g(to)g(de\014ne)h(a)f (subt)o(yping)f(relation)g(that)h(requires)h(non-monotonic)d(reasoning) 0 2222 y([Lip92)o(],)20 b(but)g(w)o(e)g(b)q(eliev)o(e)g(it)g(is)g(b)q (etter)h(to)f(use)g(v)n(ariabilit)o(y)e(in)h(the)i(sup)q(ert)o(yp)q(e)g (sp)q(eci\014cation)g(and)f(straigh)o(tforw)o(ard)0 2271 y(reasoning)13 b(metho)q(ds.)k(Ho)o(w)o(ev)o(er,)c(the)h(example)e(sho) o(ws)h(that)g(a)g(sp)q(eci\014er)h(of)f(a)f(t)o(yp)q(e)i(family)c(has)j (to)g(an)o(ticipate)g(subt)o(yp)q(es)0 2321 y(and)h(capture)h(the)f(v)n (ariation)e(among)g(them)h(in)h(the)g(sp)q(eci\014cation)h(of)e(the)i (sup)q(ert)o(yp)q(e.)62 2371 y(The)g(bag)f(t)o(yp)q(e)h(discussed)i(in) d(Section)h(4.1)e(has)i(t)o(w)o(o)f(kinds)g(of)g(v)n(ariabilit)o(y)m(.) j(First,)e(as)f(discussed)j(earlier,)d(the)h(sp)q(eci-)0 2421 y(\014cation)f(of)g Fh(get)h Fn(is)g(nondeterministic)f(b)q (ecause)i(it)e(do)q(es)i(not)f(constrain)g(whic)o(h)f(elemen)o(t)g(of)g (the)i(bag)e(is)g(remo)o(v)o(ed.)20 b(This)0 2471 y(nondeterminism)14 b(allo)o(ws)h(stac)o(k)h(to)g(b)q(e)h(a)f(subt)o(yp)q(e)h(of)e(bag:)22 b(the)17 b(sp)q(eci\014cation)f(of)g Fh(p)n(op)g Fn(constrains)h(the)g (nondetermin-)0 2521 y(ism.)24 b(W)m(e)16 b(could)g(also)g(de\014ne)i (a)e(queue)h(that)f(is)h(a)f(subt)o(yp)q(e)h(of)f(bag;)h(its)f Fh(de)n(queue)i Fn(metho)q(d)d(w)o(ould)h(also)g(constrain)g(the)0 2570 y(nondeterminism)c(of)h Fh(get)h Fn(but)g(in)f(a)h(w)o(a)o(y)f (di\013eren)o(t)i(from)d Fh(p)n(op)p Fn(.)62 2620 y(In)k(addition,)f (the)i(actual)f(v)n(alue)f(of)h(the)g(b)q(ound)h(for)e(bags)h(is)g(not) g(de\014ned;)i(it)e(can)g(b)q(e)h(an)o(y)e(natural)h(n)o(um)o(b)q(er,)g (th)o(us)0 2670 y(allo)o(wing)d(subt)o(yp)q(es)j(to)f(ha)o(v)o(e)g (di\013eren)o(t)g(b)q(ounds.)22 b(This)15 b(v)n(ariabilit)o(y)d(sho)o (ws)k(up)f(in)f(the)i(sp)q(eci\014cation)f(of)g Fh(put)p Fn(,)g(where)h(w)o(e)954 2795 y(14)p eop %%Page: 15 17 15 16 bop 0 1 1950 1 v 750 215 a @beginspecial 52 @llx 373 @lly 160 @urx 415 @ury 1080 @rwi @setspecial %%BeginDocument: fig9.ps 50 dict begin /arrowHeight 8 def /arrowWidth 4 def /none null def /numGraphicParameters 17 def /stringLimit 65535 def /Begin { save numGraphicParameters dict begin } def /End { end restore } def /SetB { dup type /nulltype eq { pop false /brushRightArrow idef false /brushLeftArrow idef true /brushNone idef } { /brushDashOffset idef /brushDashArray idef 0 ne /brushRightArrow idef 0 ne /brushLeftArrow idef /brushWidth idef false /brushNone idef } ifelse } def /SetCFg { /fgblue idef /fggreen idef /fgred idef } def /SetCBg { /bgblue idef /bggreen idef /bgred idef } def /SetF { /printSize idef /printFont idef } def /SetP { dup type /nulltype eq { pop true /patternNone idef } { /patternGrayLevel idef patternGrayLevel -1 eq { /patternString idef } if false /patternNone idef } ifelse } def /BSpl { 0 begin storexyn newpath n 1 gt { 0 0 0 0 0 0 1 1 true subspline n 2 gt { 0 0 0 0 1 1 2 2 false subspline 1 1 n 3 sub { /i exch def i 1 sub dup i dup i 1 add dup i 2 add dup false subspline } for n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline } if n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if brushNone not { istroke } if 0 0 1 1 leftarrow n 2 sub dup n 1 sub dup rightarrow } if end } dup 0 4 dict put def /Circ { newpath 0 360 arc patternNone not { ifill } if brushNone not { istroke } if } def /CBSpl { 0 begin dup 2 gt { storexyn newpath n 1 sub dup 0 0 1 1 2 2 true subspline 1 1 n 3 sub { /i exch def i 1 sub dup i dup i 1 add dup i 2 add dup false subspline } for n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline n 2 sub dup n 1 sub dup 0 0 1 1 false subspline patternNone not { ifill } if brushNone not { istroke } if } { Poly } ifelse end } dup 0 4 dict put def /Elli { 0 begin newpath 4 2 roll translate scale 0 0 1 0 360 arc patternNone not { ifill } if brushNone not { istroke } if end } dup 0 1 dict put def /Line { 0 begin 2 storexyn newpath x 0 get y 0 get moveto x 1 get y 1 get lineto brushNone not { istroke } if 0 0 1 1 leftarrow 0 0 1 1 rightarrow end } dup 0 4 dict put def /MLine { 0 begin storexyn newpath n 1 gt { x 0 get y 0 get moveto 1 1 n 1 sub { /i exch def x i get y i get lineto } for patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if brushNone not { istroke } if 0 0 1 1 leftarrow n 2 sub dup n 1 sub dup rightarrow } if end } dup 0 4 dict put def /Poly { 3 1 roll newpath moveto -1 add { lineto } repeat closepath patternNone not { ifill } if brushNone not { istroke } if } def /Rect { 0 begin /t exch def /r exch def /b exch def /l exch def newpath l b moveto l t lineto r t lineto r b lineto closepath patternNone not { ifill } if brushNone not { istroke } if end } dup 0 4 dict put def /Text { ishow } def /idef { dup where { pop pop pop } { exch def } ifelse } def /ifill { 0 begin gsave patternGrayLevel -1 ne { fgred bgred fgred sub patternGrayLevel mul add fggreen bggreen fggreen sub patternGrayLevel mul add fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor eofill } { eoclip originalCTM setmatrix pathbbox /t exch def /r exch def /b exch def /l exch def /w r l sub ceiling cvi def /h t b sub ceiling cvi def /imageByteWidth w 8 div ceiling cvi def /imageHeight h def bgred bggreen bgblue setrgbcolor eofill fgred fggreen fgblue setrgbcolor w 0 gt h 0 gt and { l b translate w h scale w h true [w 0 0 h neg 0 h] { patternproc } imagemask } if } ifelse grestore end } dup 0 8 dict put def /istroke { gsave brushDashOffset -1 eq { [] 0 setdash 1 setgray } { brushDashArray brushDashOffset setdash fgred fggreen fgblue setrgbcolor } ifelse brushWidth setlinewidth originalCTM setmatrix stroke grestore } def /ishow { 0 begin gsave fgred fggreen fgblue setrgbcolor /fontDict printFont findfont printSize scalefont dup setfont def /descender fontDict begin 0 [FontBBox] 1 get FontMatrix end transform exch pop def /vertoffset 0 descender sub printSize sub printFont /Courier ne printFont /Courier-Bold ne and { 1 add } if def { 0 vertoffset moveto show /vertoffset vertoffset printSize sub def } forall grestore end } dup 0 3 dict put def /patternproc { 0 begin /patternByteLength patternString length def /patternHeight patternByteLength 8 mul sqrt cvi def /patternWidth patternHeight def /patternByteWidth patternWidth 8 idiv def /imageByteMaxLength imageByteWidth imageHeight mul stringLimit patternByteWidth sub min def /imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv patternHeight mul patternHeight max def /imageHeight imageHeight imageMaxHeight sub store /imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def 0 1 imageMaxHeight 1 sub { /y exch def /patternRow y patternByteWidth mul patternByteLength mod def /patternRowString patternString patternRow patternByteWidth getinterval def /imageRow y imageByteWidth mul def 0 patternByteWidth imageByteWidth 1 sub { /x exch def imageString imageRow x add patternRowString putinterval } for } for imageString end } dup 0 12 dict put def /min { dup 3 2 roll dup 4 3 roll lt { exch } if pop } def /max { dup 3 2 roll dup 4 3 roll gt { exch } if pop } def /arrowhead { 0 begin transform originalCTM itransform /taily exch def /tailx exch def transform originalCTM itransform /tipy exch def /tipx exch def /dy tipy taily sub def /dx tipx tailx sub def /angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def gsave originalCTM setmatrix tipx tipy translate angle rotate newpath 0 0 moveto arrowHeight neg arrowWidth 2 div lineto arrowHeight neg arrowWidth 2 div neg lineto closepath patternNone not { originalCTM setmatrix /padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul arrowWidth div def /padtail brushWidth 2 div def tipx tipy translate angle rotate padtip 0 translate arrowHeight padtip add padtail add arrowHeight div dup scale arrowheadpath ifill } if brushNone not { originalCTM setmatrix tipx tipy translate angle rotate arrowheadpath istroke } if grestore end } dup 0 9 dict put def /arrowheadpath { newpath 0 0 moveto arrowHeight neg arrowWidth 2 div lineto arrowHeight neg arrowWidth 2 div neg lineto closepath } def /leftarrow { 0 begin y exch get /taily exch def x exch get /tailx exch def y exch get /tipy exch def x exch get /tipx exch def brushLeftArrow { tipx tipy tailx taily arrowhead } if end } dup 0 4 dict put def /rightarrow { 0 begin y exch get /tipy exch def x exch get /tipx exch def y exch get /taily exch def x exch get /tailx exch def brushRightArrow { tipx tipy tailx taily arrowhead } if end } dup 0 4 dict put def /midpoint { 0 begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def x0 x1 add 2 div y0 y1 add 2 div end } dup 0 4 dict put def /thirdpoint { 0 begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def x0 2 mul x1 add 3 div y0 2 mul y1 add 3 div end } dup 0 4 dict put def /subspline { 0 begin /movetoNeeded exch def y exch get /y3 exch def x exch get /x3 exch def y exch get /y2 exch def x exch get /x2 exch def y exch get /y1 exch def x exch get /x1 exch def y exch get /y0 exch def x exch get /x0 exch def x1 y1 x2 y2 thirdpoint /p1y exch def /p1x exch def x2 y2 x1 y1 thirdpoint /p2y exch def /p2x exch def x1 y1 x0 y0 thirdpoint p1x p1y midpoint /p0y exch def /p0x exch def x2 y2 x3 y3 thirdpoint p2x p2y midpoint /p3y exch def /p3x exch def movetoNeeded { p0x p0y moveto } if p1x p1y p2x p2y p3x p3y curveto end } dup 0 17 dict put def /storexyn { /n exch def /y n array def /x n array def n 1 sub -1 0 { /i exch def y i 3 2 roll put x i 3 2 roll put } for } def %I Idraw 7 Grid 8 Begin %I b u %I cfg u %I cbg u %I f u %I p u %I t [ 0.923077 0 0 0.923077 0 0 ] concat /originalCTM matrix currentmatrix def Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 /Times-Roman 10 SetF %I t [ 1 0 0 1 97 446 ] concat %I [ (elephant) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 /Times-Roman 10 SetF %I t [ 1 0 0 1 58 415 ] concat %I [ (royal) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 /Times-Roman 10 SetF %I t [ 1 0 0 1 147 416 ] concat %I [ (albino) ] Text End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -87 52 ] concat %I 199 380 173 362 Line End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -87 52 ] concat %I 199 380 225 362 Line End End %I eop showpage end %%EndDocument @endspecial 708 307 a Fn(Figure)14 b(7:)k(Elephan)o(t)c(Hierarc)o(h)o (y)p 0 357 V 0 531 a(do)f(not)h(sa)o(y)f(what)h(sp)q(eci\014c)h(b)q (ound)e(v)n(alue)g(causes)i(the)g(call)d(to)i(fail.)i(Therefore,)f(a)e (user)i(of)e Fh(put)g Fn(m)o(ust)g(b)q(e)h(prepared)h(for)e(a)0 581 y(failure.)k(\(Of)c(course)h(the)g(user)g(could)f(deduce)h(that)f (a)g(particular)g(call)f(will)f(succeed,)k(based)f(on)e(a)h(previous)g (sequence)j(of)0 631 y(metho)q(d)c(calls)f(and)i(the)g(constrain)o(t)f (that)h(the)g(b)q(ound)f(of)g(a)g(bag)g(do)q(es)h(not)f(c)o(hange.\))18 b(A)13 b(subt)o(yp)q(e)g(of)f(bag)f(migh)o(t)g(limit)e(the)0 680 y(b)q(ound)15 b(to)g(a)f(\014xed)i(v)n(alue,)e(or)h(to)f(a)h (smaller)e(range.)22 b(Sev)o(eral)15 b(subt)o(yp)q(es)h(of)e(bag)h(are) g(sho)o(wn)g(in)f(Figure)h(8;)g(medium)o(bags)0 730 y(ha)o(v)o(e)f(v)n (arious)f(b)q(ounds,)h(so)g(that)g(this)g(t)o(yp)q(e)g(migh)o(t)e(ha)o (v)o(e)i(its)f(o)o(wn)h(subt)o(yp)q(es,)h(e.g.,)d(bag)p 1406 730 13 2 v 15 w(150.)p 0 789 1950 1 v 344 1412 a @beginspecial 256 @llx 493 @lly 559 @urx 633 @ury 3030 @rwi @setspecial %%BeginDocument: fig10.ps /arrowHeight 10 def /arrowWidth 5 def /IdrawDict 52 dict def IdrawDict begin /reencodeISO { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall /Encoding ISOLatin1Encoding def currentdict end definefont } def /ISOLatin1Encoding [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright /parenleft/parenright/asterisk/plus/comma/minus/period/slash /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N /O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright /asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m /n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve /dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut /ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar /section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot /hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior /acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine /guillemotright/onequarter/onehalf/threequarters/questiondown /Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla /Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute /Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis /aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave /iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex /otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis /yacute/thorn/ydieresis ] def /Times-Roman reencodeISO def /Times-Italic reencodeISO def /none null def /numGraphicParameters 17 def /stringLimit 65535 def /Begin { save numGraphicParameters dict begin } def /End { end restore } def /SetB { dup type /nulltype eq { pop false /brushRightArrow idef false /brushLeftArrow idef true /brushNone idef } { /brushDashOffset idef /brushDashArray idef 0 ne /brushRightArrow idef 0 ne /brushLeftArrow idef /brushWidth idef false /brushNone idef } ifelse } def /SetCFg { /fgblue idef /fggreen idef /fgred idef } def /SetCBg { /bgblue idef /bggreen idef /bgred idef } def /SetF { /printSize idef /printFont idef } def /SetP { dup type /nulltype eq { pop true /patternNone idef } { dup -1 eq { /patternGrayLevel idef /patternString idef } { /patternGrayLevel idef } ifelse false /patternNone idef } ifelse } def /BSpl { 0 begin storexyn newpath n 1 gt { 0 0 0 0 0 0 1 1 true subspline n 2 gt { 0 0 0 0 1 1 2 2 false subspline 1 1 n 3 sub { /i exch def i 1 sub dup i dup i 1 add dup i 2 add dup false subspline } for n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline } if n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if brushNone not { istroke } if 0 0 1 1 leftarrow n 2 sub dup n 1 sub dup rightarrow } if end } dup 0 4 dict put def /Circ { newpath 0 360 arc patternNone not { ifill } if brushNone not { istroke } if } def /CBSpl { 0 begin dup 2 gt { storexyn newpath n 1 sub dup 0 0 1 1 2 2 true subspline 1 1 n 3 sub { /i exch def i 1 sub dup i dup i 1 add dup i 2 add dup false subspline } for n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline n 2 sub dup n 1 sub dup 0 0 1 1 false subspline patternNone not { ifill } if brushNone not { istroke } if } { Poly } ifelse end } dup 0 4 dict put def /Elli { 0 begin newpath 4 2 roll translate scale 0 0 1 0 360 arc patternNone not { ifill } if brushNone not { istroke } if end } dup 0 1 dict put def /Line { 0 begin 2 storexyn newpath x 0 get y 0 get moveto x 1 get y 1 get lineto brushNone not { istroke } if 0 0 1 1 leftarrow 0 0 1 1 rightarrow end } dup 0 4 dict put def /MLine { 0 begin storexyn newpath n 1 gt { x 0 get y 0 get moveto 1 1 n 1 sub { /i exch def x i get y i get lineto } for patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if brushNone not { istroke } if 0 0 1 1 leftarrow n 2 sub dup n 1 sub dup rightarrow } if end } dup 0 4 dict put def /Poly { 3 1 roll newpath moveto -1 add { lineto } repeat closepath patternNone not { ifill } if brushNone not { istroke } if } def /Rect { 0 begin /t exch def /r exch def /b exch def /l exch def newpath l b moveto l t lineto r t lineto r b lineto closepath patternNone not { ifill } if brushNone not { istroke } if end } dup 0 4 dict put def /Text { ishow } def /idef { dup where { pop pop pop } { exch def } ifelse } def /ifill { 0 begin gsave patternGrayLevel -1 ne { fgred bgred fgred sub patternGrayLevel mul add fggreen bggreen fggreen sub patternGrayLevel mul add fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor eofill } { eoclip originalCTM setmatrix pathbbox /t exch def /r exch def /b exch def /l exch def /w r l sub ceiling cvi def /h t b sub ceiling cvi def /imageByteWidth w 8 div ceiling cvi def /imageHeight h def bgred bggreen bgblue setrgbcolor eofill fgred fggreen fgblue setrgbcolor w 0 gt h 0 gt and { l b translate w h scale w h true [w 0 0 h neg 0 h] { patternproc } imagemask } if } ifelse grestore end } dup 0 8 dict put def /istroke { gsave brushDashOffset -1 eq { [] 0 setdash 1 setgray } { brushDashArray brushDashOffset setdash fgred fggreen fgblue setrgbcolor } ifelse brushWidth setlinewidth originalCTM setmatrix stroke grestore } def /ishow { 0 begin gsave fgred fggreen fgblue setrgbcolor /fontDict printFont printSize scalefont dup setfont def /descender fontDict begin 0 [FontBBox] 1 get FontMatrix end transform exch pop def /vertoffset 1 printSize sub descender sub def { 0 vertoffset moveto show /vertoffset vertoffset printSize sub def } forall grestore end } dup 0 3 dict put def /patternproc { 0 begin /patternByteLength patternString length def /patternHeight patternByteLength 8 mul sqrt cvi def /patternWidth patternHeight def /patternByteWidth patternWidth 8 idiv def /imageByteMaxLength imageByteWidth imageHeight mul stringLimit patternByteWidth sub min def /imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv patternHeight mul patternHeight max def /imageHeight imageHeight imageMaxHeight sub store /imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def 0 1 imageMaxHeight 1 sub { /y exch def /patternRow y patternByteWidth mul patternByteLength mod def /patternRowString patternString patternRow patternByteWidth getinterval def /imageRow y imageByteWidth mul def 0 patternByteWidth imageByteWidth 1 sub { /x exch def imageString imageRow x add patternRowString putinterval } for } for imageString end } dup 0 12 dict put def /min { dup 3 2 roll dup 4 3 roll lt { exch } if pop } def /max { dup 3 2 roll dup 4 3 roll gt { exch } if pop } def /midpoint { 0 begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def x0 x1 add 2 div y0 y1 add 2 div end } dup 0 4 dict put def /thirdpoint { 0 begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def x0 2 mul x1 add 3 div y0 2 mul y1 add 3 div end } dup 0 4 dict put def /subspline { 0 begin /movetoNeeded exch def y exch get /y3 exch def x exch get /x3 exch def y exch get /y2 exch def x exch get /x2 exch def y exch get /y1 exch def x exch get /x1 exch def y exch get /y0 exch def x exch get /x0 exch def x1 y1 x2 y2 thirdpoint /p1y exch def /p1x exch def x2 y2 x1 y1 thirdpoint /p2y exch def /p2x exch def x1 y1 x0 y0 thirdpoint p1x p1y midpoint /p0y exch def /p0x exch def x2 y2 x3 y3 thirdpoint p2x p2y midpoint /p3y exch def /p3x exch def movetoNeeded { p0x p0y moveto } if p1x p1y p2x p2y p3x p3y curveto end } dup 0 17 dict put def /storexyn { /n exch def /y n array def /x n array def n 1 sub -1 0 { /i exch def y i 3 2 roll put x i 3 2 roll put } for } def /SSten { fgred fggreen fgblue setrgbcolor dup true exch 1 0 0 -1 0 6 -1 roll matrix astore } def /FSten { dup 3 -1 roll dup 4 1 roll exch newpath 0 0 moveto dup 0 exch lineto exch dup 3 1 roll exch lineto 0 lineto closepath bgred bggreen bgblue setrgbcolor eofill SSten } def /Rast { exch dup 3 1 roll 1 0 0 -1 0 6 -1 roll matrix astore } def /arrowhead { 0 begin transform originalCTM itransform /taily exch def /tailx exch def transform originalCTM itransform /tipy exch def /tipx exch def /dy tipy taily sub def /dx tipx tailx sub def /angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def gsave originalCTM setmatrix tipx tipy translate angle rotate newpath arrowHeight neg arrowWidth 2 div moveto 0 0 lineto arrowHeight neg arrowWidth 2 div neg lineto patternNone not { originalCTM setmatrix /padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul arrowWidth div def /padtail brushWidth 2 div def tipx tipy translate angle rotate padtip 0 translate arrowHeight padtip add padtail add arrowHeight div dup scale arrowheadpath ifill } if brushNone not { originalCTM setmatrix tipx tipy translate angle rotate arrowheadpath istroke } if grestore end } dup 0 9 dict put def /arrowheadpath { newpath arrowHeight neg arrowWidth 2 div moveto 0 0 lineto arrowHeight neg arrowWidth 2 div neg lineto } def /leftarrow { 0 begin y exch get /taily exch def x exch get /tailx exch def y exch get /tipy exch def x exch get /tipx exch def brushLeftArrow { tipx tipy tailx taily arrowhead } if end } dup 0 4 dict put def /rightarrow { 0 begin y exch get /tipy exch def x exch get /tipx exch def y exch get /taily exch def x exch get /tailx exch def brushRightArrow { tipx tipy tailx taily arrowhead } if end } dup 0 4 dict put def %I Idraw 10 Grid 8 8 Begin %I b u %I cfg u %I cbg u %I f u %I p u %I t [ 0.923077 0 0 0.923077 0 0 ] concat /originalCTM matrix currentmatrix def Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 Times-Roman 10 SetF %I t [ 1 0 0 1 444 682 ] concat %I [ (bag) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 Times-Roman 10 SetF %I t [ 1 0 0 1 293 630 ] concat %I [ (largebag) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 Times-Roman 10 SetF %I t [ 1 0 0 1 423 630 ] concat %I [ (mediumbag) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 Times-Roman 10 SetF %I t [ 1 0 0 1 561 630 ] concat %I [ (smallbag) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-i-normal--10-100-75-75-p-52-iso8859-1 Times-Italic 10 SetF %I t [ 1 0 0 1 431 563 ] concat %I [ (bag_150) ] Text End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -87 52 ] concat %I 536 613 536 587 Line %I 1 End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -87 52 ] concat %I 536 613 665 587 Line %I 1 End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -87 52 ] concat %I 536 613 406 587 Line %I 1 End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -87 52 ] concat %I 536 544 536 518 Line %I 1 End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-i-normal--10-100-75-75-p-52-iso8859-1 Times-Italic 10 SetF %I t [ 1 0 0 1 327.737 619.733 ] concat %I [ (32) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-i-normal--10-100-75-75-p-52-iso8859-1 Times-Italic 10 SetF %I t [ 1 0 0 1 403.335 613 ] concat %I [ (\(100 <= bound <= 1000\)) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-i-normal--10-100-75-75-p-52-iso8859-1 Times-Italic 10 SetF %I t [ 1 0 0 1 421.064 545.134 ] concat %I [ (\(bound = 150\)) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-i-normal--10-100-75-75-p-52-iso8859-1 Times-Italic 10 SetF %I t [ 1 0 0 1 552.624 613.134 ] concat %I [ (\(bound = 20\)) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-i-normal--10-100-75-75-p-52-iso8859-1 Times-Italic 10 SetF %I t [ 1 0 0 1 279.268 613 ] concat %I [ (\(bound = 2 \)) ] Text End End %I eop showpage end %%EndDocument @endspecial 664 1503 a(Figure)i(8:)j(A)d(T)o(yp)q(e)h(F)m(amily)10 b(for)k(Bags)p 0 1553 V 62 1694 a(The)20 b(bag)e(hierarc)o(h)o(y)i(ma)o (y)d(seem)i(coun)o(terin)o(tuitiv)o(e,)h(since)f(w)o(e)h(migh)o(t)d (exp)q(ect)j(that)f(bags)g(with)g(smaller)e(b)q(ounds)0 1744 y(should)g(b)q(e)g(subt)o(yp)q(es)h(of)f(bags)f(with)h(larger)g(b) q(ounds.)27 b(F)m(or)17 b(example,)f(w)o(e)h(migh)o(t)e(exp)q(ect)j (smallbag)c(to)j(b)q(e)g(a)g(subt)o(yp)q(e)0 1794 y(of)d(largebag.)19 b(Ho)o(w)o(ev)o(er,)14 b(the)i(sp)q(eci\014cations)f(for)f(the)h(t)o(w) o(o)f(t)o(yp)q(es)i(are)f(incompatible:)i(the)e(b)q(ound)f(of)g(ev)o (ery)h(largebag)f(is)0 1844 y(2)21 1829 y Fi(32)56 1844 y Fn(,)f(whic)o(h)f(is)h(clearly)g(not)g(true)h(for)e(smallbags.)k(F)m (urthermore,)c(this)h(di\013erence)i(is)e(observ)n(able)g(via)f(the)i (metho)q(ds:)j(It)c(is)0 1894 y(legal)g(to)g(call)g(the)h Fh(put)g Fn(metho)q(d)f(on)g(a)g(largebag)g(whose)h(size)h(is)e (greater)i(than)e(or)h(equal)f(to)h(20,)e(but)i(the)g(call)f(is)g(not)h (legal)0 1943 y(for)g(a)f(smallbag.)i(Therefore)h(the)e(pre-condition)g (rule)g(is)g(not)g(satis\014ed.)62 1993 y(Although)19 b(the)h(bag)e(t)o(yp)q(e)i(can)f(ha)o(v)o(e)g(subt)o(yp)q(es)h(with)f (di\013eren)o(t)h(b)q(ounds,)h(it)d(cannot)i(ha)o(v)o(e)f(subt)o(yp)q (es)h(where)g(the)0 2043 y(b)q(ounds)c(of)g(the)g(bags)g(can)g(c)o (hange)g(dynamically)m(.)21 b(If)15 b(w)o(e)h(w)o(an)o(ted)g(a)g(t)o (yp)q(e)g(family)d(that)j(included)g(b)q(oth)g(bag)g(and)f(suc)o(h)0 2093 y(dynamic)h(bags,)i(w)o(e)g(w)o(ould)f(need)i(to)e(de\014ne)i(a)e (sup)q(ert)o(yp)q(e)j(in)d(whic)o(h)h(the)g(b)q(ound)g(is)g(allo)o(w)o (ed,)e(but)i(not)g(required,)h(to)0 2143 y(v)n(ary)m(.)e(Figure)12 b(9)g(sho)o(ws)h(the)g(new)g(t)o(yp)q(e)f(hierarc)o(h)o(y)m(.)18 b(Dynamic)p 990 2143 13 2 v 13 w(bags)12 b(ha)o(v)o(e)g(a)g(b)q(ound)h (that)f(trac)o(ks)h(the)g(size:)18 b(eac)o(h)13 b(time)e(an)0 2192 y(elemen)o(t)j(is)g(added)g(or)g(remo)o(v)o(ed)g(from)e(a)i (dynamic)p 825 2192 V 13 w(bag,)g(the)g(b)q(ound)h(c)o(hanges)f(to)h (matc)o(h)d(the)j(new)g(size.)20 b(Flexible)p 1857 2192 V 14 w(bags)0 2242 y(ha)o(v)o(e)14 b(an)f(additional)f(m)o(utator,)g Fh(change)p 646 2242 V 17 w(b)n(ound)p Fn(:)104 2325 y Fh(change)p 229 2325 V 16 w(b)n(ound)j Fn(=)f Fk(pro)q(c)g Fn(\()p Fh(n:)k Fn(in)o(t\))227 2375 y Fk(requires)12 b Fg(n)f Ff(\025)h(j)p Fg(b)518 2381 y Fe(pr)q(e)568 2375 y Fg(:el)q(ems)p Ff(j)227 2425 y Fk(mo)q(di\014es)7 b Fg(b)227 2475 y Fk(ensures)25 b Fg(b)426 2481 y Fe(post)489 2475 y Fg(:el)q(ems)13 b Fn(=)f Fg(b)682 2481 y Fe(pr)q(e)733 2475 y Fg(:el)q(ems)e Ff(^)f Fg(b)916 2481 y Fe(post)980 2475 y Fg(:bound)h Fn(=)i Fg(n)0 2558 y Fn(Notice)i(that)g(other)h(t)o (yp)q(es)g(in)e(the)h(family)d(need)k(not)f(ha)o(v)o(e)g(a)f Fh(change)p 1111 2558 V 17 w(b)n(ound)h Fn(metho)q(d.)62 2608 y(This)j(example)f(illustrates)h(the)h(di\013eren)o(t)g(w)o(a)o (ys)f(that)g(subt)o(yp)q(es)h(reduce)h(v)n(ariabilit)o(y)m(.)25 b(All)16 b(v)n(arying)p 1698 2608 V 14 w(bag)h(subt)o(yp)q(es)0 2657 y(reduce)i(v)n(ariabilit)o(y)c(in)i(the)h(sp)q(eci\014cation)h (for)e(the)h Fh(put)g Fn(metho)q(d;)g(v)n(arying)p 1226 2657 V 13 w(bag's)f Fh(put)h Fn(metho)q(d)f(is)g(non-deterministic,)954 2795 y(15)p eop %%Page: 16 18 16 17 bop 0 1 1950 1 v 442 686 a @beginspecial 93 @llx 516 @lly 349 @urx 671 @ury 2560 @rwi @setspecial %%BeginDocument: fig11.ps /arrowHeight 10 def /arrowWidth 5 def /IdrawDict 52 dict def IdrawDict begin /reencodeISO { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall /Encoding ISOLatin1Encoding def currentdict end definefont } def /ISOLatin1Encoding [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright /parenleft/parenright/asterisk/plus/comma/minus/period/slash /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N /O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright /asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m /n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve /dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut /ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar /section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot /hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior /acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine /guillemotright/onequarter/onehalf/threequarters/questiondown /Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla /Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute /Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis /aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave /iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex /otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis /yacute/thorn/ydieresis ] def /Times-Roman reencodeISO def /Times-Italic reencodeISO def /none null def /numGraphicParameters 17 def /stringLimit 65535 def /Begin { save numGraphicParameters dict begin } def /End { end restore } def /SetB { dup type /nulltype eq { pop false /brushRightArrow idef false /brushLeftArrow idef true /brushNone idef } { /brushDashOffset idef /brushDashArray idef 0 ne /brushRightArrow idef 0 ne /brushLeftArrow idef /brushWidth idef false /brushNone idef } ifelse } def /SetCFg { /fgblue idef /fggreen idef /fgred idef } def /SetCBg { /bgblue idef /bggreen idef /bgred idef } def /SetF { /printSize idef /printFont idef } def /SetP { dup type /nulltype eq { pop true /patternNone idef } { dup -1 eq { /patternGrayLevel idef /patternString idef } { /patternGrayLevel idef } ifelse false /patternNone idef } ifelse } def /BSpl { 0 begin storexyn newpath n 1 gt { 0 0 0 0 0 0 1 1 true subspline n 2 gt { 0 0 0 0 1 1 2 2 false subspline 1 1 n 3 sub { /i exch def i 1 sub dup i dup i 1 add dup i 2 add dup false subspline } for n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline } if n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if brushNone not { istroke } if 0 0 1 1 leftarrow n 2 sub dup n 1 sub dup rightarrow } if end } dup 0 4 dict put def /Circ { newpath 0 360 arc patternNone not { ifill } if brushNone not { istroke } if } def /CBSpl { 0 begin dup 2 gt { storexyn newpath n 1 sub dup 0 0 1 1 2 2 true subspline 1 1 n 3 sub { /i exch def i 1 sub dup i dup i 1 add dup i 2 add dup false subspline } for n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline n 2 sub dup n 1 sub dup 0 0 1 1 false subspline patternNone not { ifill } if brushNone not { istroke } if } { Poly } ifelse end } dup 0 4 dict put def /Elli { 0 begin newpath 4 2 roll translate scale 0 0 1 0 360 arc patternNone not { ifill } if brushNone not { istroke } if end } dup 0 1 dict put def /Line { 0 begin 2 storexyn newpath x 0 get y 0 get moveto x 1 get y 1 get lineto brushNone not { istroke } if 0 0 1 1 leftarrow 0 0 1 1 rightarrow end } dup 0 4 dict put def /MLine { 0 begin storexyn newpath n 1 gt { x 0 get y 0 get moveto 1 1 n 1 sub { /i exch def x i get y i get lineto } for patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if brushNone not { istroke } if 0 0 1 1 leftarrow n 2 sub dup n 1 sub dup rightarrow } if end } dup 0 4 dict put def /Poly { 3 1 roll newpath moveto -1 add { lineto } repeat closepath patternNone not { ifill } if brushNone not { istroke } if } def /Rect { 0 begin /t exch def /r exch def /b exch def /l exch def newpath l b moveto l t lineto r t lineto r b lineto closepath patternNone not { ifill } if brushNone not { istroke } if end } dup 0 4 dict put def /Text { ishow } def /idef { dup where { pop pop pop } { exch def } ifelse } def /ifill { 0 begin gsave patternGrayLevel -1 ne { fgred bgred fgred sub patternGrayLevel mul add fggreen bggreen fggreen sub patternGrayLevel mul add fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor eofill } { eoclip originalCTM setmatrix pathbbox /t exch def /r exch def /b exch def /l exch def /w r l sub ceiling cvi def /h t b sub ceiling cvi def /imageByteWidth w 8 div ceiling cvi def /imageHeight h def bgred bggreen bgblue setrgbcolor eofill fgred fggreen fgblue setrgbcolor w 0 gt h 0 gt and { l b translate w h scale w h true [w 0 0 h neg 0 h] { patternproc } imagemask } if } ifelse grestore end } dup 0 8 dict put def /istroke { gsave brushDashOffset -1 eq { [] 0 setdash 1 setgray } { brushDashArray brushDashOffset setdash fgred fggreen fgblue setrgbcolor } ifelse brushWidth setlinewidth originalCTM setmatrix stroke grestore } def /ishow { 0 begin gsave fgred fggreen fgblue setrgbcolor /fontDict printFont printSize scalefont dup setfont def /descender fontDict begin 0 [FontBBox] 1 get FontMatrix end transform exch pop def /vertoffset 1 printSize sub descender sub def { 0 vertoffset moveto show /vertoffset vertoffset printSize sub def } forall grestore end } dup 0 3 dict put def /patternproc { 0 begin /patternByteLength patternString length def /patternHeight patternByteLength 8 mul sqrt cvi def /patternWidth patternHeight def /patternByteWidth patternWidth 8 idiv def /imageByteMaxLength imageByteWidth imageHeight mul stringLimit patternByteWidth sub min def /imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv patternHeight mul patternHeight max def /imageHeight imageHeight imageMaxHeight sub store /imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def 0 1 imageMaxHeight 1 sub { /y exch def /patternRow y patternByteWidth mul patternByteLength mod def /patternRowString patternString patternRow patternByteWidth getinterval def /imageRow y imageByteWidth mul def 0 patternByteWidth imageByteWidth 1 sub { /x exch def imageString imageRow x add patternRowString putinterval } for } for imageString end } dup 0 12 dict put def /min { dup 3 2 roll dup 4 3 roll lt { exch } if pop } def /max { dup 3 2 roll dup 4 3 roll gt { exch } if pop } def /midpoint { 0 begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def x0 x1 add 2 div y0 y1 add 2 div end } dup 0 4 dict put def /thirdpoint { 0 begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def x0 2 mul x1 add 3 div y0 2 mul y1 add 3 div end } dup 0 4 dict put def /subspline { 0 begin /movetoNeeded exch def y exch get /y3 exch def x exch get /x3 exch def y exch get /y2 exch def x exch get /x2 exch def y exch get /y1 exch def x exch get /x1 exch def y exch get /y0 exch def x exch get /x0 exch def x1 y1 x2 y2 thirdpoint /p1y exch def /p1x exch def x2 y2 x1 y1 thirdpoint /p2y exch def /p2x exch def x1 y1 x0 y0 thirdpoint p1x p1y midpoint /p0y exch def /p0x exch def x2 y2 x3 y3 thirdpoint p2x p2y midpoint /p3y exch def /p3x exch def movetoNeeded { p0x p0y moveto } if p1x p1y p2x p2y p3x p3y curveto end } dup 0 17 dict put def /storexyn { /n exch def /y n array def /x n array def n 1 sub -1 0 { /i exch def y i 3 2 roll put x i 3 2 roll put } for } def /SSten { fgred fggreen fgblue setrgbcolor dup true exch 1 0 0 -1 0 6 -1 roll matrix astore } def /FSten { dup 3 -1 roll dup 4 1 roll exch newpath 0 0 moveto dup 0 exch lineto exch dup 3 1 roll exch lineto 0 lineto closepath bgred bggreen bgblue setrgbcolor eofill SSten } def /Rast { exch dup 3 1 roll 1 0 0 -1 0 6 -1 roll matrix astore } def /arrowhead { 0 begin transform originalCTM itransform /taily exch def /tailx exch def transform originalCTM itransform /tipy exch def /tipx exch def /dy tipy taily sub def /dx tipx tailx sub def /angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def gsave originalCTM setmatrix tipx tipy translate angle rotate newpath arrowHeight neg arrowWidth 2 div moveto 0 0 lineto arrowHeight neg arrowWidth 2 div neg lineto patternNone not { originalCTM setmatrix /padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul arrowWidth div def /padtail brushWidth 2 div def tipx tipy translate angle rotate padtip 0 translate arrowHeight padtip add padtail add arrowHeight div dup scale arrowheadpath ifill } if brushNone not { originalCTM setmatrix tipx tipy translate angle rotate arrowheadpath istroke } if grestore end } dup 0 9 dict put def /arrowheadpath { newpath arrowHeight neg arrowWidth 2 div moveto 0 0 lineto arrowHeight neg arrowWidth 2 div neg lineto } def /leftarrow { 0 begin y exch get /taily exch def x exch get /tailx exch def y exch get /tipy exch def x exch get /tipx exch def brushLeftArrow { tipx tipy tailx taily arrowhead } if end } dup 0 4 dict put def /rightarrow { 0 begin y exch get /tipy exch def x exch get /tipx exch def y exch get /taily exch def x exch get /tailx exch def brushRightArrow { tipx tipy tailx taily arrowhead } if end } dup 0 4 dict put def %I Idraw 10 Grid 8 8 Begin %I b u %I cfg u %I cbg u %I f u %I p u %I t [ 0.923077 0 0 0.923077 0 0 ] concat /originalCTM matrix currentmatrix def Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 Times-Roman 10 SetF %I t [ 1 0 0 1 201.284 723.701 ] concat %I [ (varying_bag) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 Times-Roman 10 SetF %I t [ 1 0 0 1 199.784 647.641 ] concat %I [ (dynamic_bag) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 Times-Roman 10 SetF %I t [ 1 0 0 1 306.017 647.641 ] concat %I [ (bag) ] Text End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -303.587 292.508 ] concat %I 622 311 622 285 Line %I 1 End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -303.587 292.508 ] concat %I 622 311 579 285 Line %I 1 End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -303.587 292.508 ] concat %I 622 311 665 285 Line %I 1 End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 Times-Roman 10 SetF %I t [ 1 0 0 1 109.647 649.641 ] concat %I [ (flexible_bag) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -*-times-medium-i-normal-*-10-*-*-*-*-*-*-* Times-Italic 10 SetF %I t [ 1 0 0 1 193.784 705.949 ] concat %I [ (I: size <= bound) (C: true) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -*-times-medium-i-normal-*-10-*-*-*-*-*-*-* Times-Italic 10 SetF %I t [ 1 0 0 1 102.654 632.337 ] concat %I [ (I: size <= bound) (C: true) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -*-times-medium-i-normal-*-10-*-*-*-*-*-*-* Times-Italic 10 SetF %I t [ 1 0 0 1 280.478 632.337 ] concat %I [ (I: size <= bound) (C: bound stays the same) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -*-times-medium-i-normal-*-10-*-*-*-*-*-*-* Times-Italic 10 SetF %I t [ 1 0 0 1 196.284 632.337 ] concat %I [ (I: size = bound) (C: true) ] Text End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 0.960396 0 0 0.90625 -299.686 342.813 ] concat %I 536 371 622 345 Line %I 1 End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ -0.724846 -0.515783 0.516428 -0.723941 412.008 1224.19 ] concat %I 536 371 622 345 Line %I 1 End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 0.263055 -0.270926 0.88107 0.136294 -252.752 773.59 ] concat %I 536 371 622 345 Line %I 1 End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 Times-Roman 10 SetF %I t [ 1 0 0 1 284.28 570.107 ] concat %I [ ([...as in Fig. 8...]) ] Text End End %I eop showpage end %%EndDocument @endspecial 605 778 a Fn(Figure)14 b(9:)k(Another)c(T)o(yp)q(e)h(F)m (amily)10 b(for)k(Bags)p 0 827 V 0 990 a(since)k(it)f(migh)o(t)e(add)i (the)g(elemen)o(t)g(\(and)g(c)o(hange)g(the)h(b)q(ound\))f(if)g(the)g (size)h(is)f(the)h(same)e(as)h(the)h(b)q(ound,)f(or)g(it)g(migh)o(t)0 1040 y(not.)32 b(Bag)18 b(and)h(\015exible)p 409 1040 13 2 v 15 w(bag)f(reduce)i(this)f(v)n(ariabilit)o(y)d(b)o(y)i(not)g (adding)g(the)h(elemen)o(t,)g(whereas)h(dynamic)p 1776 1040 V 13 w(bag)e(do)q(es)0 1090 y(add)f(the)h(elemen)o(t.)29 b(In)17 b(addition,)g(bag)g(reduces)i(v)n(ariabilit)o(y)c(b)o(y)i (restricting)i(the)f(constrain)o(t:)25 b(the)19 b(trivial)d(constrain)o (t)0 1139 y(for)f(v)n(arying)p 202 1139 V 14 w(bag)h(can)g(b)q(e)g (though)o(t)g(of)f(as)h(stating)f(\\either)i(a)e(bag's)g(b)q(ound)h(ma) o(y)e(c)o(hange)i(or)g(it)g(sta)o(ys)g(the)g(same;")f(the)0 1189 y(constrain)o(t)f(for)f(bag)g(reduces)j(this)d(v)n(ariabilit)o(y)e (b)o(y)j(making)d(a)i(c)o(hoice)h(\(\\the)g(bag's)f(b)q(ound)h(sta)o (ys)f(the)i(same"\))d(and)h(users)0 1239 y(can)18 b(then)g(rely)f(on)h (this)f(prop)q(ert)o(y)h(for)f(bags)h(and)f(its)g(subt)o(yp)q(es.)31 b(Dynamic)p 1259 1239 V 13 w(bag)16 b(reduces)k(v)n(ariabilit)o(y)15 b(b)o(y)i(restricting)0 1289 y(v)n(arying)p 137 1289 V 14 w(bag's)e(in)o(v)n(arian)o(t)e(so)j(that)f(it)g(no)g(longer)h (allo)o(ws)e(the)i(size)g(to)f(b)q(e)h(less)g(than)g(the)g(b)q(ound.)22 b(Finally)m(,)13 b(\015exible)p 1872 1289 V 15 w(bag)0 1339 y(reduces)h(v)n(ariabilit)o(y)9 b(b)q(ecause)k(of)e(the)h(extra)g (m)o(utator,)e Fh(change)p 1006 1339 V 17 w(b)n(ound)p Fn(;)i(all)f(its)g(subt)o(yp)q(es)i(m)o(ust)e(allo)o(w)f(explicit)h (re-setting)0 1389 y(of)i(the)i(b)q(ound.)62 1438 y(Another)i(example)e (is)i(a)f(family)d(of)i(in)o(teger)i(coun)o(ters)h(sho)o(wn)e(in)g (Figure)g(10.)25 b(When)17 b(a)f(coun)o(ter)h(is)f(adv)n(anced,)h(w)o (e)0 1488 y(only)c(kno)o(w)g(that)h(its)g(v)n(alue)g(gets)g(bigger,)f (so)h(that)g(the)h(constrain)o(t)f(is)g(simply)104 1559 y Fk(constrain)o(t)d Fg(c)345 1565 y Fe(\032)375 1559 y Ff(\024)h Fg(c)437 1565 y Fe( )0 1631 y Fn(The)18 b(doubler)g(and)g (m)o(ultipli)o(er)e(subt)o(yp)q(es)j(ha)o(v)o(e)e(stronger)i(constrain) o(ts.)30 b(F)m(or)18 b(example,)e(a)i(m)o(ultiplier's)d(v)n(alue)i(alw) o(a)o(ys)0 1681 y(increases)f(b)o(y)d(a)h(m)o(ultiple,)d(so)j(that)g (its)g(constrain)o(t)g(is:)104 1752 y Fk(constrain)o(t)d Ff(9)i Fg(n)f Fn(:)f Fg(int)j(:)f Fn([)h Fg(n)d(>)h Fn(0)d Ff(^)g Fg(c)707 1758 y Fe(\032)738 1752 y Fn(=)i Fg(n)f Ff(\003)f Fg(c)864 1758 y Fe( )902 1752 y Fn(])0 1823 y(F)m(or)i(a)h(family)c(lik)o(e)j(this,)h(w)o(e)g(migh)o(t)e(c)o(ho)q (ose)i(to)g(ha)o(v)o(e)f(an)h Fh(advanc)n(e)g Fn(metho)q(d)f(for)h (coun)o(ter)g(\(so)g(that)g(eac)o(h)g(of)f(its)h(subt)o(yp)q(es)h(is)0 1873 y(constrained)g(to)f(ha)o(v)o(e)g(this)g(metho)q(d\))f(or)h(w)o(e) g(migh)o(t)e(not.)17 b(If)12 b(w)o(e)g(do)g(pro)o(vide)g(an)g(adv)n (ance)g(metho)q(d,)f(its)h(sp)q(eci\014cation)g(will)0 1923 y(ha)o(v)o(e)h(to)f(b)q(e)i(nondeterministic)e(\(i.e.,)g(it)g (merely)g(states)i(the)g(the)f(size)h(of)e(the)i(coun)o(ter)g(gro)o (ws\))e(to)h(allo)o(w)e(the)j(subt)o(yp)q(es)g(to)0 1973 y(pro)o(vide)g(the)g(de\014nitions)g(that)g(are)g(appropriate)g(for)g (them.)62 2022 y(In)e(the)g(case)g(of)f(the)h(bag)f(family)d (illustrated)k(in)f(Figure)g(8,)g(all)g(t)o(yp)q(es)h(in)f(the)h (hierarc)o(h)o(y)g(migh)o(t)d(b)q(e)j(\\real")f(in)g(the)h(sense)0 2072 y(that)j(they)g(ha)o(v)o(e)g(ob)r(jects.)22 b(Ho)o(w)o(ev)o(er,)15 b(sometimes)e(sup)q(ert)o(yp)q(es)k(are)f Fh(virtual)p Fn(;)e(they)h(de\014ne)h(the)g(prop)q(erties)g(all)e(subt)o(yp)q(es)0 2122 y(ha)o(v)o(e)g(in)f(common)e(but)j(ha)o(v)o(e)g(no)g(ob)r(jects)h (of)e(their)h(o)o(wn.)k(V)m(arying)p 1076 2122 V 14 w(bag)13 b(of)g(Figure)h(9)g(migh)o(t)e(b)q(e)i(suc)o(h)h(a)f(t)o(yp)q(e.)62 2172 y(Virtual)19 b(t)o(yp)q(es)i(are)f(useful)g(in)f(man)o(y)f(t)o(yp) q(e)i(hierarc)o(hies.)36 b(F)m(or)19 b(example,)g(w)o(e)h(w)o(ould)f (use)i(them)d(to)i(construct)h(a)0 2222 y(hierarc)o(h)o(y)10 b(for)f(in)o(tegers.)18 b(Smaller)7 b(in)o(tegers)k(cannot)f(b)q(e)g(a) f(subt)o(yp)q(e)i(of)e(larger)g(in)o(tegers)i(b)q(ecause)g(of)e(observ) n(able)h(di\013erences)0 2271 y(in)17 b(b)q(eha)o(vior;)h(for)e (example,)h(an)g(o)o(v)o(er\015o)o(w)f(exception)i(that)f(w)o(ould)g(o) q(ccur)h(when)g(adding)e(t)o(w)o(o)h(32-bit)f(in)o(tegers)i(w)o(ould)0 2321 y(not)f(o)q(ccur)h(if)f(they)h(w)o(ere)g(64-bit)e(in)o(tegers.)29 b(Also,)17 b(larger)h(in)o(tegers)g(cannot)f(b)q(e)h(a)f(subt)o(yp)q(e) h(of)f(smaller)e(ones)j(b)q(ecause)0 2371 y(exceptions)i(do)e(not)g(o)q (ccur)i(when)f(exp)q(ected.)34 b(Ho)o(w)o(ev)o(er,)19 b(w)o(e)g(clearly)f(w)o(ould)g(lik)o(e)g(in)o(tegers)h(of)f(di\013eren) o(t)h(sizes)h(to)e(b)q(e)0 2421 y(related.)33 b(This)18 b(is)g(accomplished)g(b)o(y)g(designing)g(a)g(virtual)g(sup)q(ert)o(yp) q(e)i(that)f(includes)g(them.)31 b(Suc)o(h)19 b(a)f(hierarc)o(h)o(y)h (is)0 2471 y(sho)o(wn)13 b(in)g(Figure)g(11,)g(where)h(in)o(teger)g(is) f(a)g(virtual)g(t)o(yp)q(e)g(whose)h(in)o(v)n(arian)o(t)e(simply)f(sa)o (ys)i(that)h(the)g(size)g(of)e(an)h(in)o(teger)h(is)0 2521 y(greater)g(than)g(zero.)19 b(In)o(teger)14 b(t)o(yp)q(es)g(with)f (di\013eren)o(t)i(sizes)f(are)g(subt)o(yp)q(es)h(of)d(in)o(teger.)19 b(In)13 b(addition,)f(small)f(in)o(teger)j(t)o(yp)q(es)0 2570 y(are)f(subt)o(yp)q(es)i(of)d(regular)p 415 2570 V 15 w(in)o(t,)g(another)i(virtual)e(t)o(yp)q(e;)h(the)h(in)o(v)n (arian)o(t)d(in)h(the)i(sp)q(eci\014cation)g(for)e(regular)p 1681 2570 V 15 w(in)o(t)h(states)h(that)0 2620 y(the)j(size)f(of)g(an)g (in)o(teger)g(is)g(either)h(16)e(bits)i(or)f(32)f(bits.)25 b(An)16 b(in)o(teger)g(family)d(migh)o(t)h(ha)o(v)o(e)i(a)g(structure)i (lik)o(e)d(this,)h(or)g(it)0 2670 y(migh)o(t)c(b)q(e)i(\015atter)h(b)o (y)f(ha)o(ving)e(all)h(in)o(teger)h(t)o(yp)q(es)h(b)q(e)g(direct)f (subt)o(yp)q(es)i(of)d(in)o(teger.)954 2795 y(16)p eop %%Page: 17 19 17 18 bop 0 1 1950 1 v 469 390 a @beginspecial 49 @llx 615 @lly 292 @urx 699 @ury 2430 @rwi @setspecial %%BeginDocument: fig12.ps 50 dict begin /arrowHeight 8 def /arrowWidth 4 def /none null def /numGraphicParameters 17 def /stringLimit 65535 def /Begin { save numGraphicParameters dict begin } def /End { end restore } def /SetB { dup type /nulltype eq { pop false /brushRightArrow idef false /brushLeftArrow idef true /brushNone idef } { /brushDashOffset idef /brushDashArray idef 0 ne /brushRightArrow idef 0 ne /brushLeftArrow idef /brushWidth idef false /brushNone idef } ifelse } def /SetCFg { /fgblue idef /fggreen idef /fgred idef } def /SetCBg { /bgblue idef /bggreen idef /bgred idef } def /SetF { /printSize idef /printFont idef } def /SetP { dup type /nulltype eq { pop true /patternNone idef } { /patternGrayLevel idef patternGrayLevel -1 eq { /patternString idef } if false /patternNone idef } ifelse } def /BSpl { 0 begin storexyn newpath n 1 gt { 0 0 0 0 0 0 1 1 true subspline n 2 gt { 0 0 0 0 1 1 2 2 false subspline 1 1 n 3 sub { /i exch def i 1 sub dup i dup i 1 add dup i 2 add dup false subspline } for n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline } if n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if brushNone not { istroke } if 0 0 1 1 leftarrow n 2 sub dup n 1 sub dup rightarrow } if end } dup 0 4 dict put def /Circ { newpath 0 360 arc patternNone not { ifill } if brushNone not { istroke } if } def /CBSpl { 0 begin dup 2 gt { storexyn newpath n 1 sub dup 0 0 1 1 2 2 true subspline 1 1 n 3 sub { /i exch def i 1 sub dup i dup i 1 add dup i 2 add dup false subspline } for n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline n 2 sub dup n 1 sub dup 0 0 1 1 false subspline patternNone not { ifill } if brushNone not { istroke } if } { Poly } ifelse end } dup 0 4 dict put def /Elli { 0 begin newpath 4 2 roll translate scale 0 0 1 0 360 arc patternNone not { ifill } if brushNone not { istroke } if end } dup 0 1 dict put def /Line { 0 begin 2 storexyn newpath x 0 get y 0 get moveto x 1 get y 1 get lineto brushNone not { istroke } if 0 0 1 1 leftarrow 0 0 1 1 rightarrow end } dup 0 4 dict put def /MLine { 0 begin storexyn newpath n 1 gt { x 0 get y 0 get moveto 1 1 n 1 sub { /i exch def x i get y i get lineto } for patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if brushNone not { istroke } if 0 0 1 1 leftarrow n 2 sub dup n 1 sub dup rightarrow } if end } dup 0 4 dict put def /Poly { 3 1 roll newpath moveto -1 add { lineto } repeat closepath patternNone not { ifill } if brushNone not { istroke } if } def /Rect { 0 begin /t exch def /r exch def /b exch def /l exch def newpath l b moveto l t lineto r t lineto r b lineto closepath patternNone not { ifill } if brushNone not { istroke } if end } dup 0 4 dict put def /Text { ishow } def /idef { dup where { pop pop pop } { exch def } ifelse } def /ifill { 0 begin gsave patternGrayLevel -1 ne { fgred bgred fgred sub patternGrayLevel mul add fggreen bggreen fggreen sub patternGrayLevel mul add fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor eofill } { eoclip originalCTM setmatrix pathbbox /t exch def /r exch def /b exch def /l exch def /w r l sub ceiling cvi def /h t b sub ceiling cvi def /imageByteWidth w 8 div ceiling cvi def /imageHeight h def bgred bggreen bgblue setrgbcolor eofill fgred fggreen fgblue setrgbcolor w 0 gt h 0 gt and { l b translate w h scale w h true [w 0 0 h neg 0 h] { patternproc } imagemask } if } ifelse grestore end } dup 0 8 dict put def /istroke { gsave brushDashOffset -1 eq { [] 0 setdash 1 setgray } { brushDashArray brushDashOffset setdash fgred fggreen fgblue setrgbcolor } ifelse brushWidth setlinewidth originalCTM setmatrix stroke grestore } def /ishow { 0 begin gsave fgred fggreen fgblue setrgbcolor /fontDict printFont findfont printSize scalefont dup setfont def /descender fontDict begin 0 [FontBBox] 1 get FontMatrix end transform exch pop def /vertoffset 0 descender sub printSize sub printFont /Courier ne printFont /Courier-Bold ne and { 1 add } if def { 0 vertoffset moveto show /vertoffset vertoffset printSize sub def } forall grestore end } dup 0 3 dict put def /patternproc { 0 begin /patternByteLength patternString length def /patternHeight patternByteLength 8 mul sqrt cvi def /patternWidth patternHeight def /patternByteWidth patternWidth 8 idiv def /imageByteMaxLength imageByteWidth imageHeight mul stringLimit patternByteWidth sub min def /imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv patternHeight mul patternHeight max def /imageHeight imageHeight imageMaxHeight sub store /imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def 0 1 imageMaxHeight 1 sub { /y exch def /patternRow y patternByteWidth mul patternByteLength mod def /patternRowString patternString patternRow patternByteWidth getinterval def /imageRow y imageByteWidth mul def 0 patternByteWidth imageByteWidth 1 sub { /x exch def imageString imageRow x add patternRowString putinterval } for } for imageString end } dup 0 12 dict put def /min { dup 3 2 roll dup 4 3 roll lt { exch } if pop } def /max { dup 3 2 roll dup 4 3 roll gt { exch } if pop } def /arrowhead { 0 begin transform originalCTM itransform /taily exch def /tailx exch def transform originalCTM itransform /tipy exch def /tipx exch def /dy tipy taily sub def /dx tipx tailx sub def /angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def gsave originalCTM setmatrix tipx tipy translate angle rotate newpath 0 0 moveto arrowHeight neg arrowWidth 2 div lineto arrowHeight neg arrowWidth 2 div neg lineto closepath patternNone not { originalCTM setmatrix /padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul arrowWidth div def /padtail brushWidth 2 div def tipx tipy translate angle rotate padtip 0 translate arrowHeight padtip add padtail add arrowHeight div dup scale arrowheadpath ifill } if brushNone not { originalCTM setmatrix tipx tipy translate angle rotate arrowheadpath istroke } if grestore end } dup 0 9 dict put def /arrowheadpath { newpath 0 0 moveto arrowHeight neg arrowWidth 2 div lineto arrowHeight neg arrowWidth 2 div neg lineto closepath } def /leftarrow { 0 begin y exch get /taily exch def x exch get /tailx exch def y exch get /tipy exch def x exch get /tipx exch def brushLeftArrow { tipx tipy tailx taily arrowhead } if end } dup 0 4 dict put def /rightarrow { 0 begin y exch get /tipy exch def x exch get /tipx exch def y exch get /taily exch def x exch get /tailx exch def brushRightArrow { tipx tipy tailx taily arrowhead } if end } dup 0 4 dict put def /midpoint { 0 begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def x0 x1 add 2 div y0 y1 add 2 div end } dup 0 4 dict put def /thirdpoint { 0 begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def x0 2 mul x1 add 3 div y0 2 mul y1 add 3 div end } dup 0 4 dict put def /subspline { 0 begin /movetoNeeded exch def y exch get /y3 exch def x exch get /x3 exch def y exch get /y2 exch def x exch get /x2 exch def y exch get /y1 exch def x exch get /x1 exch def y exch get /y0 exch def x exch get /x0 exch def x1 y1 x2 y2 thirdpoint /p1y exch def /p1x exch def x2 y2 x1 y1 thirdpoint /p2y exch def /p2x exch def x1 y1 x0 y0 thirdpoint p1x p1y midpoint /p0y exch def /p0x exch def x2 y2 x3 y3 thirdpoint p2x p2y midpoint /p3y exch def /p3x exch def movetoNeeded { p0x p0y moveto } if p1x p1y p2x p2y p3x p3y curveto end } dup 0 17 dict put def /storexyn { /n exch def /y n array def /x n array def n 1 sub -1 0 { /i exch def y i 3 2 roll put x i 3 2 roll put } for } def %I Idraw 7 Grid 8 Begin %I b u %I cfg u %I cbg u %I f u %I p u %I t [ 0.923077 0 0 0.923077 0 0 ] concat /originalCTM matrix currentmatrix def Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 /Times-Roman 10 SetF %I t [ 1 0 0 1 184.5 754 ] concat %I [ (counter) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-i-normal--10-100-75-75-p-52-iso8859-1 /Times-Italic 10 SetF %I t [ 1 0 0 1 151.5 739 ] concat %I [ (\(value never decreases\)) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 /Times-Roman 10 SetF %I t [ 1 0 0 1 105.5 695 ] concat %I [ (incrementer) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-i-normal--10-100-75-75-p-52-iso8859-1 /Times-Italic 10 SetF %I t [ 1 0 0 1 54.5 677 ] concat %I [ (\(value never decreases\)) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 /Times-Roman 10 SetF %I t [ 1 0 0 1 182.5 694 ] concat %I [ (doubler) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-i-normal--10-100-75-75-p-52-iso8859-1 /Times-Italic 10 SetF %I t [ 1 0 0 1 167.5 677 ] concat %I [ (\(value doubles\)) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 /Times-Roman 10 SetF %I t [ 1 0 0 1 244 694 ] concat %I [ (multiplier) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-i-normal--10-100-75-75-p-52-iso8859-1 /Times-Italic 10 SetF %I t [ 1 0 0 1 243 678 ] concat %I [ (\(value multiplies\)) ] Text End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -31 51 ] concat %I 230 673 230 649 Line End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -29 51 ] concat %I 229 674 168 648 Line End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -31 52 ] concat %I 231 674 280 648 Line End End %I eop showpage end %%EndDocument @endspecial 638 482 a Fn(Figure)14 b(10:)j(T)o(yp)q(e)e(F)m(amily)c (for)i(Coun)o(ters)p 0 532 V 0 632 V 608 997 a @beginspecial 330 @llx 161 @lly 506 @urx 239 @ury 1760 @rwi @setspecial %%BeginDocument: fig13.ps 50 dict begin /arrowHeight 8 def /arrowWidth 4 def /none null def /numGraphicParameters 17 def /stringLimit 65535 def /Begin { save numGraphicParameters dict begin } def /End { end restore } def /SetB { dup type /nulltype eq { pop false /brushRightArrow idef false /brushLeftArrow idef true /brushNone idef } { /brushDashOffset idef /brushDashArray idef 0 ne /brushRightArrow idef 0 ne /brushLeftArrow idef /brushWidth idef false /brushNone idef } ifelse } def /SetCFg { /fgblue idef /fggreen idef /fgred idef } def /SetCBg { /bgblue idef /bggreen idef /bgred idef } def /SetF { /printSize idef /printFont idef } def /SetP { dup type /nulltype eq { pop true /patternNone idef } { /patternGrayLevel idef patternGrayLevel -1 eq { /patternString idef } if false /patternNone idef } ifelse } def /BSpl { 0 begin storexyn newpath n 1 gt { 0 0 0 0 0 0 1 1 true subspline n 2 gt { 0 0 0 0 1 1 2 2 false subspline 1 1 n 3 sub { /i exch def i 1 sub dup i dup i 1 add dup i 2 add dup false subspline } for n 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline } if n 2 sub dup n 1 sub dup 2 copy 2 copy false subspline patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if brushNone not { istroke } if 0 0 1 1 leftarrow n 2 sub dup n 1 sub dup rightarrow } if end } dup 0 4 dict put def /Circ { newpath 0 360 arc patternNone not { ifill } if brushNone not { istroke } if } def /CBSpl { 0 begin dup 2 gt { storexyn newpath n 1 sub dup 0 0 1 1 2 2 true subspline 1 1 n 3 sub { /i exch def i 1 sub dup i dup i 1 add dup i 2 add dup false subspline } for n 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline n 2 sub dup n 1 sub dup 0 0 1 1 false subspline patternNone not { ifill } if brushNone not { istroke } if } { Poly } ifelse end } dup 0 4 dict put def /Elli { 0 begin newpath 4 2 roll translate scale 0 0 1 0 360 arc patternNone not { ifill } if brushNone not { istroke } if end } dup 0 1 dict put def /Line { 0 begin 2 storexyn newpath x 0 get y 0 get moveto x 1 get y 1 get lineto brushNone not { istroke } if 0 0 1 1 leftarrow 0 0 1 1 rightarrow end } dup 0 4 dict put def /MLine { 0 begin storexyn newpath n 1 gt { x 0 get y 0 get moveto 1 1 n 1 sub { /i exch def x i get y i get lineto } for patternNone not brushLeftArrow not brushRightArrow not and and { ifill } if brushNone not { istroke } if 0 0 1 1 leftarrow n 2 sub dup n 1 sub dup rightarrow } if end } dup 0 4 dict put def /Poly { 3 1 roll newpath moveto -1 add { lineto } repeat closepath patternNone not { ifill } if brushNone not { istroke } if } def /Rect { 0 begin /t exch def /r exch def /b exch def /l exch def newpath l b moveto l t lineto r t lineto r b lineto closepath patternNone not { ifill } if brushNone not { istroke } if end } dup 0 4 dict put def /Text { ishow } def /idef { dup where { pop pop pop } { exch def } ifelse } def /ifill { 0 begin gsave patternGrayLevel -1 ne { fgred bgred fgred sub patternGrayLevel mul add fggreen bggreen fggreen sub patternGrayLevel mul add fgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor eofill } { eoclip originalCTM setmatrix pathbbox /t exch def /r exch def /b exch def /l exch def /w r l sub ceiling cvi def /h t b sub ceiling cvi def /imageByteWidth w 8 div ceiling cvi def /imageHeight h def bgred bggreen bgblue setrgbcolor eofill fgred fggreen fgblue setrgbcolor w 0 gt h 0 gt and { l b translate w h scale w h true [w 0 0 h neg 0 h] { patternproc } imagemask } if } ifelse grestore end } dup 0 8 dict put def /istroke { gsave brushDashOffset -1 eq { [] 0 setdash 1 setgray } { brushDashArray brushDashOffset setdash fgred fggreen fgblue setrgbcolor } ifelse brushWidth setlinewidth originalCTM setmatrix stroke grestore } def /ishow { 0 begin gsave fgred fggreen fgblue setrgbcolor /fontDict printFont findfont printSize scalefont dup setfont def /descender fontDict begin 0 [FontBBox] 1 get FontMatrix end transform exch pop def /vertoffset 0 descender sub printSize sub printFont /Courier ne printFont /Courier-Bold ne and { 1 add } if def { 0 vertoffset moveto show /vertoffset vertoffset printSize sub def } forall grestore end } dup 0 3 dict put def /patternproc { 0 begin /patternByteLength patternString length def /patternHeight patternByteLength 8 mul sqrt cvi def /patternWidth patternHeight def /patternByteWidth patternWidth 8 idiv def /imageByteMaxLength imageByteWidth imageHeight mul stringLimit patternByteWidth sub min def /imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv patternHeight mul patternHeight max def /imageHeight imageHeight imageMaxHeight sub store /imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def 0 1 imageMaxHeight 1 sub { /y exch def /patternRow y patternByteWidth mul patternByteLength mod def /patternRowString patternString patternRow patternByteWidth getinterval def /imageRow y imageByteWidth mul def 0 patternByteWidth imageByteWidth 1 sub { /x exch def imageString imageRow x add patternRowString putinterval } for } for imageString end } dup 0 12 dict put def /min { dup 3 2 roll dup 4 3 roll lt { exch } if pop } def /max { dup 3 2 roll dup 4 3 roll gt { exch } if pop } def /arrowhead { 0 begin transform originalCTM itransform /taily exch def /tailx exch def transform originalCTM itransform /tipy exch def /tipx exch def /dy tipy taily sub def /dx tipx tailx sub def /angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def gsave originalCTM setmatrix tipx tipy translate angle rotate newpath 0 0 moveto arrowHeight neg arrowWidth 2 div lineto arrowHeight neg arrowWidth 2 div neg lineto closepath patternNone not { originalCTM setmatrix /padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul arrowWidth div def /padtail brushWidth 2 div def tipx tipy translate angle rotate padtip 0 translate arrowHeight padtip add padtail add arrowHeight div dup scale arrowheadpath ifill } if brushNone not { originalCTM setmatrix tipx tipy translate angle rotate arrowheadpath istroke } if grestore end } dup 0 9 dict put def /arrowheadpath { newpath 0 0 moveto arrowHeight neg arrowWidth 2 div lineto arrowHeight neg arrowWidth 2 div neg lineto closepath } def /leftarrow { 0 begin y exch get /taily exch def x exch get /tailx exch def y exch get /tipy exch def x exch get /tipx exch def brushLeftArrow { tipx tipy tailx taily arrowhead } if end } dup 0 4 dict put def /rightarrow { 0 begin y exch get /tipy exch def x exch get /tipx exch def y exch get /taily exch def x exch get /tailx exch def brushRightArrow { tipx tipy tailx taily arrowhead } if end } dup 0 4 dict put def /midpoint { 0 begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def x0 x1 add 2 div y0 y1 add 2 div end } dup 0 4 dict put def /thirdpoint { 0 begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def x0 2 mul x1 add 3 div y0 2 mul y1 add 3 div end } dup 0 4 dict put def /subspline { 0 begin /movetoNeeded exch def y exch get /y3 exch def x exch get /x3 exch def y exch get /y2 exch def x exch get /x2 exch def y exch get /y1 exch def x exch get /x1 exch def y exch get /y0 exch def x exch get /x0 exch def x1 y1 x2 y2 thirdpoint /p1y exch def /p1x exch def x2 y2 x1 y1 thirdpoint /p2y exch def /p2x exch def x1 y1 x0 y0 thirdpoint p1x p1y midpoint /p0y exch def /p0x exch def x2 y2 x3 y3 thirdpoint p2x p2y midpoint /p3y exch def /p3x exch def movetoNeeded { p0x p0y moveto } if p1x p1y p2x p2y p3x p3y curveto end } dup 0 17 dict put def /storexyn { /n exch def /y n array def /x n array def n 1 sub -1 0 { /i exch def y i 3 2 roll put x i 3 2 roll put } for } def %I Idraw 7 Grid 8 Begin %I b u %I cfg u %I cbg u %I f u %I p u %I t [ 0.923077 0 0 0.923077 0 0 ] concat /originalCTM matrix currentmatrix def Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 /Times-Roman 10 SetF %I t [ 1 0 0 1 428 255 ] concat %I [ (integer) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 /Times-Roman 10 SetF %I t [ 1 0 0 1 359 220 ] concat %I [ (64-bit-int) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 /Times-Roman 10 SetF %I t [ 1 0 0 1 460 219 ] concat %I [ (regular_int) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 /Times-Roman 10 SetF %I t [ 1 0 0 1 422 185 ] concat %I [ (32-bit-int) ] Text End Begin %I Text %I cfg Black 0 0 0 SetCFg %I f -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 /Times-Roman 10 SetF %I t [ 1 0 0 1 500 185 ] concat %I [ (16-bit-int) ] Text End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -117 49 ] concat %I 558 193 524 175 Line End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -117 49 ] concat %I 559 192 594 173 Line End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -117 49 ] concat %I 602 158 568 142 Line End Begin %I Line %I b 65535 1 0 0 [] 0 SetB %I cfg Black 0 0 0 SetCFg %I cbg White 1 1 1 SetCBg %I p 0 SetP %I t [ 1 0 0 1 -117 49 ] concat %I 604 158 636 140 Line End End %I eop showpage end %%EndDocument @endspecial 741 1088 a(Figure)h(11:)k(In)o(teger)d(F)m(amily)p 0 1138 V 0 1312 a Fj(7)67 b(Related)23 b(W)-6 b(ork)0 1403 y Fn(Some)9 b(researc)o(h)j(on)f(de\014ning)f(subt)o(yp)q(e)h (relations)g(is)f(concerned)i(with)e(capturing)h(constrain)o(ts)g(on)f (metho)q(d)g(signatures)h(via)0 1453 y(the)k(con)o(tra/co)o(v)n (ariance)g(rules,)g(suc)o(h)h(as)e(those)i(used)g(in)e(languages)g(lik) o(e)g(T)m(rellis/Owl)g([SCB)1505 1438 y Fi(+)1532 1453 y Fn(86],)g(Emerald[BHJ)1859 1438 y Fi(+)1885 1453 y Fn(87],)0 1503 y(Quest)j([Car88)o(],)f(Ei\013el)g([Mey88)o(],)g(POOL)g ([Ame90)n(],)g(and)g(to)g(a)f(limited)f(exten)o(t)j(Mo)q(dula-3)e ([Nel91)o(].)24 b(Our)16 b(rules)h(place)0 1552 y(constrain)o(ts)e(not) e(just)h(on)g(the)h(signatures)f(of)g(an)f(ob)r(ject's)i(metho)q(ds,)e (but)h(also)f(on)h(their)g(b)q(eha)o(vior.)62 1602 y(Our)k(w)o(ork)g (is)f(most)f(similar)g(to)h(that)h(of)f(America)f([Ame91)n(],)i(who)f (has)h(prop)q(osed)g(rules)h(for)e(determining)f(based)0 1652 y(on)h(t)o(yp)q(e)g(sp)q(eci\014cations)h(whether)g(one)g(t)o(yp)q (e)f(is)g(a)f(subt)o(yp)q(e)i(of)f(another.)27 b(Mey)o(er)18 b([Mey88])e(also)g(uses)i(pre-)g(and)f(p)q(ost-)0 1702 y(condition)h(rules)h(similar)d(to)j(America's)e(and)i(ours.)33 b(Cusac)o(k's)18 b([Cus91])g(approac)o(h)h(of)f(relating)g(t)o(yp)q(e)h (sp)q(eci\014cations)0 1752 y(de\014nes)12 b(subt)o(yping)e(in)g(terms) g(of)g(strengthening)h(state)h(in)o(v)n(arian)o(ts.)j(Ho)o(w)o(ev)o (er,)c(none)g(of)f(these)i(authors)e(considers)i(neither)0 1801 y(the)h(problems)f(in)o(tro)q(duced)i(b)o(y)e(extra)i(m)o(utators) d(nor)i(the)h(preserv)n(ation)f(of)f(history)h(prop)q(erties.)19 b(Therefore,)14 b(they)g(allo)o(w)0 1851 y(certain)g(subt)o(yp)q(e)h (relations)f(that)g(w)o(e)g(forbid)f(\(e.g.,)g(in)o(tset)h(could)g(b)q (e)h(a)e(subt)o(yp)q(e)i(of)e(fat)p 1410 1851 13 2 v 15 w(set)i(in)e(these)j(approac)o(hes\).)62 1901 y(Our)h(use)h(of)d (constrain)o(ts)j(in)e(place)g(of)g(the)h(history)f(rule)h(is)f(one)h (of)f(t)o(w)o(o)g(tec)o(hniques)i(discussed)g(in)e([L)-5 b(W94)o(].)25 b(That)0 1951 y(pap)q(er)16 b(prop)q(oses)g(a)f(second)i (tec)o(hnique)f(in)e(whic)o(h)h(there)i(is)e(no)g(constrain)o(t;)h (instead,)f(extra)h(metho)q(ds)f(are)g(not)g(allo)o(w)o(ed)0 2001 y(to)g(in)o(tro)q(duce)h(new)f(b)q(eha)o(vior.)21 b(It)15 b(requires)i(that)e(the)g(b)q(eha)o(vior)g(of)g(eac)o(h)g (extra)h(m)o(utator)d(b)q(e)j(\\explained")e(in)h(terms)g(of)0 2051 y(existing)c(b)q(eha)o(vior,)g(through)g(existing)g(metho)q(ds.)17 b(W)m(e)11 b(b)q(eliev)o(e)g(the)h(use)g(of)f(constrain)o(ts)h(is)f (simpler)f(and)h(easier)h(to)f(reason)0 2100 y(ab)q(out)j(than)g(this)g (\\explanation")e(approac)o(h.)62 2150 y(The)h(emphasis)e(on)h(seman)o (tics)g(of)f(abstract)j(t)o(yp)q(es)f(is)f(a)g(prominen)o(t)e(feature)j (of)f(the)h(w)o(ork)f(b)o(y)g(Lea)o(v)o(ens.)18 b(In)12 b(his)g(Ph.D.)0 2200 y(thesis)18 b(Lea)o(v)o(ens)g([Lea89)o(])f (de\014nes)i(t)o(yp)q(es)f(in)f(terms)g(of)g(algebras)g(and)h(subt)o (yping)f(in)g(terms)g(of)g(a)g Fh(simulation)h(r)n(elation)0 2250 y Fn(b)q(et)o(w)o(een)j(them.)33 b(His)20 b(sim)o(ulation)c (relations)k(are)f(a)g(more)g(general)g(form)f(of)h(our)g(abstraction)h (functions.)34 b(Lea)o(v)o(ens)0 2300 y(considered)18 b(only)d(imm)o(utabl)o(e)f(t)o(yp)q(es.)26 b(Dhara)16 b([Dha92)n(,)g(DL92)o(,)g(LD92)o(])g(extends)i(Lea)o(v)o(ens')e(thesis) h(w)o(ork)f(to)g(deal)g(with)0 2349 y(m)o(utable)c(t)o(yp)q(es,)j(but)f (rules)h(out)f(the)g(cases)i(where)f(extra)f(metho)q(ds)g(cause)h (problems,)e(e.g.,)g(aliasing.)j(Because)g(of)e(their)0 2399 y(restrictions)j(they)g(allo)o(w)d(some)h(subt)o(yp)q(e)i (relations)f(to)g(hold)f(where)i(w)o(e)f(do)g(not.)24 b(F)m(or)16 b(example,)f(they)h(allo)o(w)f(m)o(utable)0 2449 y(pairs)f(to)g(b)q(e)g(a)g(subt)o(yp)q(e)h(of)e(imm)n(utable)e (pairs)j(whereas)h(w)o(e)f(do)g(not.)62 2499 y(Others)i(ha)o(v)o(e)f(w) o(ork)o(ed)f(on)g(the)i(sp)q(eci\014cation)f(of)f(t)o(yp)q(es)h(and)f (subt)o(yp)q(es.)22 b(F)m(or)14 b(example,)f(man)o(y)f(ha)o(v)o(e)j (prop)q(osed)g(Z)g(as)0 2549 y(the)d(basis)f(of)g(sp)q(eci\014cations)h (of)f(ob)r(ject)h(t)o(yp)q(es[CL91,)e(DD90)o(,)h(CDD)1080 2534 y Fi(+)1107 2549 y Fn(89)o(];)g(Goguen)g(and)g(Meseguer[GM87)q(])g (use)h(F)o(OOPS;)0 2599 y(Lea)o(v)o(ens)h(and)g(his)g(colleagues)g(use) g(Larc)o(h[Lea91,)f(L)-5 b(W90,)12 b(DL92)o(].)17 b(Though)c(sev)o (eral)g(of)f(these)j(researc)o(hers)g(separate)f(the)0 2648 y(sp)q(eci\014cation)j(of)e(an)h(ob)r(ject's)h(creators)g(from)d (its)i(other)h(metho)q(ds,)f(none)g(has)g(iden)o(ti\014ed)g(the)h (problem)e(p)q(osed)i(b)o(y)e(the)954 2795 y(17)p eop %%Page: 18 20 18 19 bop 0 42 a Fn(missing)12 b(creators,)j(and)f(th)o(us)g(none)g (has)g(pro)o(vided)g(an)g(explicit)f(solution)g(to)h(this)g(problem.)0 179 y Fj(8)67 b(Summary)0 270 y Fn(W)m(e)20 b(de\014ned)h(a)f(new)g (notion)g(of)f(the)i(subt)o(yp)q(e)g(relation)f(based)g(on)g(the)h (seman)o(tic)e(prop)q(erties)j(of)d(the)i(subt)o(yp)q(e)g(and)0 320 y(sup)q(ert)o(yp)q(e.)31 b(An)18 b(ob)r(ject's)g(t)o(yp)q(e)g (determines)g(b)q(oth)g(a)f(set)i(of)e(legal)g(v)n(alues)g(and)g(an)h (in)o(terface)g(with)f(its)h(en)o(vironmen)o(t)0 369 y(\(through)g(calls)g(on)g(its)g(metho)q(ds\).)30 b(Th)o(us,)19 b(w)o(e)f(are)g(in)o(terested)i(in)e(preserving)h(prop)q(erties)g(ab)q (out)f(sup)q(ert)o(yp)q(e)i(v)n(alues)0 419 y(and)14 b(metho)q(ds)h(when)g(designing)f(a)g(subt)o(yp)q(e.)21 b(W)m(e)15 b(require)g(that)g(a)f(subt)o(yp)q(e)i(preserv)o(e)g(the)g (b)q(eha)o(vior)e(of)g(the)h(sup)q(ert)o(yp)q(e)0 469 y(metho)q(ds)f(and)g(also)g(all)f(in)o(v)n(arian)o(t)g(and)h(history)g (prop)q(erties)i(of)e(its)g(sup)q(ert)o(yp)q(e.)22 b(W)m(e)14 b(are)h(particularly)e(in)o(terested)j(in)e(an)0 519 y(ob)r(ject's)e(observ)n(able)g(b)q(eha)o(vior)f(\(state)i(c)o (hanges\),)f(th)o(us)g(motiv)n(ating)d(our)i(fo)q(cus)h(on)f(history)h (prop)q(erties)h(and)e(on)h(m)o(utable)0 569 y(t)o(yp)q(es)j(and)e(m)o (utators.)62 618 y(W)m(e)j(also)g(presen)o(ted)i(a)e(w)o(a)o(y)f(to)h (sp)q(ecify)h(the)f(seman)o(tic)g(prop)q(erties)h(of)f(t)o(yp)q(es)h (formally)l(.)22 b(One)17 b(reason)g(w)o(e)f(c)o(hose)h(to)0 668 y(base)d(our)f(approac)o(h)g(on)f(Larc)o(h)i(is)e(that)h(Larc)o(h)h (allo)o(ws)d(formal)g(pro)q(ofs)i(to)g(b)q(e)g(done)h(en)o(tirely)f(in) f(terms)h(of)f(sp)q(eci\014cations.)0 718 y(In)g(fact,)f(once)i(the)f (theorems)g(corresp)q(onding)g(to)g(our)g(subt)o(yping)f(rules)h(are)g (formally)d(stated)k(in)e(Larc)o(h,)h(their)g(pro)q(ofs)g(are)0 768 y(almost)f(completely)h(mec)o(hanical|a)e(matter)i(of)g(sym)o(b)q (ol)f(manipulation|and)e(could)k(b)q(e)g(done)h(with)e(the)i (assistance)g(of)0 818 y(the)g(Larc)o(h)h(Pro)o(v)o(er[GG89)n(,)f(ZW97) o(].)62 867 y(In)j(dev)o(eloping)g(our)g(de\014nition,)g(w)o(e)g(w)o (ere)h(motiv)n(ated)d(primarily)g(b)o(y)i(pragmatics.)26 b(Our)17 b(in)o(ten)o(tion)g(is)g(to)g(capture)0 917 y(the)h(in)o(tuition)e(programmers)g(apply)h(when)h(designing)f(t)o(yp) q(e)h(hierarc)o(hies)g(in)f(ob)r(ject-orien)o(ted)i(languages.)28 b(Ho)o(w)o(ev)o(er,)0 967 y(in)o(tuition)11 b(in)h(the)g(absence)i(of)e (precision)h(can)f(often)g(go)g(astra)o(y)g(or)g(lead)g(to)g (confusion.)18 b(This)12 b(is)g(wh)o(y)g(it)g(has)g(b)q(een)h(unclear)0 1017 y(ho)o(w)18 b(to)g(organize)g(certain)h(t)o(yp)q(e)g(hierarc)o (hies)g(suc)o(h)g(as)g(in)o(tegers.)32 b(Our)18 b(de\014nition)g(sheds) i(ligh)o(t)d(on)h(suc)o(h)h(hierarc)o(hies)0 1067 y(and)d(helps)g(in)f (unco)o(v)o(ering)h(new)g(designs.)25 b(It)16 b(also)f(supp)q(orts)i (the)f(kind)g(of)f(reasoning)h(that)g(is)f(needed)j(to)d(ensure)j(that) 0 1117 y(programs)13 b(that)h(w)o(ork)f(correctly)i(using)f(the)g(sup)q (ert)o(yp)q(e)i(con)o(tin)o(ue)e(to)g(w)o(ork)f(correctly)i(with)f(the) h(subt)o(yp)q(e.)62 1166 y(Programmers)e(ha)o(v)o(e)h(found)f(our)h (approac)o(h)g(relativ)o(ely)g(easy)g(to)g(apply)g(and)g(use)h(it)e (primarily)f(in)h(an)h(informal)e(w)o(a)o(y)m(.)0 1216 y(The)e(essence)i(of)c(a)i(subt)o(yp)q(e)g(relationship)f(is)g (expressed)j(in)d(the)h(mappings.)k(These)d(mappings)c(can)j(b)q(e)g (de\014ned)g(informally)l(,)0 1266 y(in)k(m)o(uc)o(h)f(the)i(same)f(w)o (a)o(y)g(that)g(abstraction)h(functions)g(and)f(represen)o(tation)i(in) o(v)n(arian)o(ts)d(are)i(giv)o(en)f(as)h(commen)o(ts)d(in)i(a)0 1316 y(program)h(that)i(implem)o(en)o(ts)e(an)h(abstract)i(t)o(yp)q(e.) 27 b(The)17 b(pro)q(ofs)f(can)h(also)f(b)q(e)h(done)g(informally)l(,)d (in)i(the)h(st)o(yle)g(giv)o(en)f(in)0 1366 y(Section)e(5.3;)f(they)h (are)g(usually)f(straigh)o(tforw)o(ard)h(and)f(can)i(b)q(e)f(done)g(b)o (y)g(insp)q(ection.)62 1415 y(W)m(e)g(also)f(sho)o(w)o(ed)h(that)g(our) g(approac)o(h)g(is)g(useful)g(b)o(y)g(lo)q(oking)e(at)i(a)g(n)o(um)o(b) q(er)f(of)g(examples.)18 b(This)c(led)g(us)g(to)g(iden)o(tify)0 1465 y(t)o(w)o(o)g(kinds)h(of)f(subt)o(yp)q(es:)21 b(ones)16 b(that)f(extend)h(the)f(sup)q(ert)o(yp)q(e,)h(and)f(ones)g(that)g (constrain)g(it.)21 b(In)15 b(the)g(former)f(case,)h(the)0 1515 y(sup)q(ert)o(yp)q(e)h(can)e(b)q(e)h(de\014ned)g(without)f(a)g (great)h(deal)e(of)h(though)o(t)g(ab)q(out)g(the)h(subt)o(yp)q(es,)g (but)f(in)g(the)h(latter)f(case,)h(this)f(is)0 1565 y(not)g(p)q (ossible;)g(instead)g(the)g(sup)q(ert)o(yp)q(e)i(sp)q(eci\014cation)f (m)o(ust)e(b)q(e)h(done)g(carefully)g(so)g(that)g(it)f(allo)o(ws)g(all) g(of)g(the)h(in)o(tended)0 1615 y(subt)o(yp)q(es.)32 b(In)19 b(particular)f(the)g(sp)q(eci\014cation)h(of)f(the)h(sup)q(ert) o(yp)q(e)h(m)o(ust)d(con)o(tain)h(su\016cien)o(t)g(nondeterminism)f(in) g(the)0 1664 y(in)o(v)n(arian)o(t,)12 b(constrain)o(t,)i(and)f(metho)q (d)g(sp)q(eci\014cations.)62 1714 y(Our)21 b(analysis)f(raises)i(t)o(w) o(o)e(issues)i(ab)q(out)e(t)o(yp)q(e)h(hierarc)o(h)o(y)g(that)g(ha)o(v) o(e)f(b)q(een)i(ignored)f(previously)f(b)o(y)h(b)q(oth)f(the)0 1764 y(formal)10 b(metho)q(ds)j(and)f(ob)r(ject-orien)o(ted)i(comm)o (unities.)h(First,)e(subt)o(yp)q(es)h(can)f(ha)o(v)o(e)g(more)f(metho)q (ds,)g(sp)q(eci\014cally)h(more)0 1814 y(m)o(utators,)h(than)h(their)h (sup)q(ert)o(yp)q(es.)25 b(Second,)16 b(subt)o(yp)q(es)g(need)h(to)e (ha)o(v)o(e)g(di\013eren)o(t)h(creators)h(than)e(sup)q(ert)o(yp)q(es.) 25 b(These)0 1864 y(issues)16 b(forced)f(us)g(to)g(revisit)g(pro)q(of)f (rules)h(normally)d(asso)q(ciated)k(with)e(t)o(yp)q(e)i(sp)q (eci\014cations:)k(the)c(data)e(t)o(yp)q(e)h(induction)0 1914 y(rule)j(and)g(the)g(history)g(rule.)30 b(W)m(e)17 b(decided)i(to)f(preclude)h(the)f(use)h(of)e(these)i(rules,)g(and)f(to) f(ha)o(v)o(e)h(explicit)f(in)o(v)n(arian)o(ts)0 1963 y(and)g(constrain)o(ts)h(to)f(replace)h(them.)27 b(Although)17 b(it)g(is)g(p)q(ossible)g(to)g(de\014ne)h(a)f(subt)o(yp)q(e)h(relation) f(that)g(a)o(v)o(oids)f(explicit)0 2013 y(in)o(v)n(arian)o(ts)8 b(and)i(constrain)o(ts,)h(doing)e(so)h(is)f(a)o(wkw)o(ard)g(and)h (often)g(requires)h(in)o(v)o(en)o(tion)d(of)h(sup)q(er\015uous)j(sup)q (ert)o(yp)q(e)f(metho)q(ds)0 2063 y(and)k(creators.)23 b(W)m(e)14 b(prefer)i(to)f(use)h(explicit)f(in)o(v)n(arian)o(ts)e(and)i (constrain)o(ts)h(b)q(ecause)h(this)e(allo)o(ws)f(a)g(more)g(direct)i (w)o(a)o(y)f(of)0 2113 y(capturing)f(the)g(designer's)h(in)o(ten)o(t.)0 2250 y Fj(References)0 2341 y Fn([Ame90])55 b(America,)18 b(P)m(.)32 b(A)18 b(parallel)f(ob)r(ject-orien)o(ted)j(language)d(with) i(inheritance)g(and)f(subt)o(yping.)31 b Fh(SIGPLAN)p Fn(,)206 2391 y(25\(10\):161{168,)11 b(Octob)q(er)k(1990.)0 2474 y([Ame91])55 b(America,)12 b(P)m(.)j(Designing)c(an)i(ob)r (ject-orien)o(ted)g(programming)c(language)i(with)h(b)q(eha)o(vioural)g (subt)o(yping.)j(In)206 2524 y(de)f(Bakk)o(er,)f(J.)g(W.,)f(de)h(Ro)q (ev)o(er,)g(W.)f(P)m(.,)g(and)h(Rozen)o(b)q(erg,)h(G.,)e(editors,)h Fh(F)m(oundations)i(of)f(Obje)n(ct-Oriente)n(d)206 2573 y(L)n(anguages,)h(REX)f(Scho)n(ol/Workshop,)i(No)n(or)n(dwijkerhout,)c (The)i(Netherlands,)g(May/June)h(1990)p Fn(,)e(v)o(olume)206 2623 y(489)g(of)h Fh(LNCS)p Fn(,)f(pages)h(60{90.)e(Springer-V)m (erlag,)h(NY,)h(1991.)954 2795 y(18)p eop %%Page: 19 21 19 20 bop 0 42 a Fn([BHJ)93 26 y Fi(+)121 42 y Fn(87])31 b(Blac)o(k,)18 b(A.)f(P)m(.,)g(Hutc)o(hinson,)i(N.,)e(Jul,)h(E.,)g (Levy)m(,)f(H.)g(M.,)h(and)f(Carter,)i(L.)28 b(Distribution)17 b(and)g(abstract)206 91 y(t)o(yp)q(es)e(in)e(Emerald.)k Fh(IEEE)f(TSE)p Fn(,)d(13\(1\):65{76,)e(Jan)o(uary)j(1987.)0 174 y([Car88])73 b(Cardelli,)18 b(L.)31 b(A)19 b(seman)o(tics)f(of)f(m) o(ultiple)f(inheritance.)32 b Fh(Information)19 b(and)h(Computation)p Fn(,)f(76:138{164,)206 224 y(1988.)0 306 y([CDD)106 291 y Fi(+)132 306 y Fn(89])h(Carrington,)14 b(D.,)f(Duk)o(e,)h(D.,)f(Duk)o (e,)g(R.,)g(King,)h(P)m(.,)f(Rose,)h(G.,)f(and)h(Smith,)e(P)m(.)19 b(Ob)r(ject-Z:)c(An)g(ob)r(ject)g(ori-)206 356 y(en)o(ted)e(extension)f (to)g(Z.)i(In)e Fh(F)o(OR)m(TE89,)h(International)g(Confer)n(enc)n(e)g (on)g(F)m(ormal)f(Description)h(T)m(e)n(chniques)p Fn(,)206 406 y(Decem)o(b)q(er)i(1989.)0 488 y([CL91])84 b(Cusac)o(k,)12 b(E.)f(and)h(Lai,)e(M.)k(Ob)r(ject-orien)o(ted)f(sp)q(eci\014cation)g (in)e(LOTOS)h(and)f(Z,)g(or)h(m)o(y)d(cat)j(really)f(is)g(ob)r(ject-) 206 538 y(orien)o(ted!)37 b(In)17 b(de)g(Bakk)o(er,)g(J.)f(W.,)g(de)h (Ro)q(ev)o(er,)g(W.)f(P)m(.,)g(and)h(Rozen)o(b)q(erg,)g(G.,)f(editors,) h Fh(F)m(oundations)i(of)206 588 y(Obje)n(ct)c(Oriente)n(d)f(L)n (anguages)p Fn(,)h(pages)f(179{202.)d(Springer)k(V)m(erlag,)e(June)h (1991.)j(LNCS)d(489.)0 670 y([Cus91])71 b(Cusac)o(k,)19 b(E.)30 b(Inheritance)19 b(in)e(ob)r(ject)i(orien)o(ted)f(Z.)30 b(In)18 b Fh(Pr)n(o)n(c)n(e)n(e)n(dings)g(of)g(ECOOP)g('91)p Fn(.)g(Springer-V)m(erlag,)206 720 y(1991.)0 802 y([DD90])76 b(Duk)o(e,)18 b(D.)e(and)h(Duk)o(e,)h(R.)28 b(A)17 b(history)g(mo)q (del)f(for)h(classes)i(in)d(ob)r(ject-Z.)30 b(In)17 b Fh(Pr)n(o)n(c)n(e)n(e)n(dings)h(of)g(VDM)g('90:)206 852 y(VDM)e(and)f(Z)p Fn(.)f(Springer-V)m(erlag,)f(1990.)0 934 y([Dha92])64 b(Dhara,)13 b(K.)h(K.)k(Subt)o(yping)13 b(among)f(m)o(utable)g(t)o(yp)q(es)i(in)g(ob)r(ject-orien)o(ted)h (programmi)o(ng)c(languages.)17 b(Mas-)206 984 y(ter's)e(thesis,)f(Io)o (w)o(a)f(State)i(Univ)o(ersit)o(y)m(,)d(Ames,)h(Io)o(w)o(a,)g(1992.)k (Master's)e(Thesis.)0 1066 y([DL92])82 b(Dhara,)14 b(K.)h(K.)g(and)f (Lea)o(v)o(ens,)i(G.)e(T.)20 b(Subt)o(yping)15 b(for)f(m)o(utable)f(t)o (yp)q(es)j(in)f(ob)r(ject-orien)o(ted)h(programmi)o(ng)206 1116 y(languages.)32 b(T)m(ec)o(hnical)18 b(Rep)q(ort)h(92-36,)f (Departmen)o(t)g(of)g(Computer)g(Science,)j(Io)o(w)o(a)d(State)h(Univ)o (ersit)o(y)m(,)206 1166 y(Ames,)13 b(Io)o(w)o(a,)g(No)o(v)o(em)o(b)q (er)g(1992.)0 1248 y([DMN70])39 b(Dahl,)17 b(O.-J.,)h(Myrhaug,)g(B.,)g (and)f(Nygaard,)h(K.)29 b(SIMULA)18 b(common)d(base)j(language.)28 b(T)m(ec)o(hnical)17 b(Re-)206 1298 y(p)q(ort)d(22,)f(Norw)o(egian)h (Computing)e(Cen)o(ter,)i(Oslo,)f(Norw)o(a)o(y)m(,)g(1970.)0 1381 y([GG89])74 b(Garland,)15 b(S.)g(and)h(Guttag,)f(J.)25 b(An)16 b(o)o(v)o(erview)f(of)h(LP,)f(the)h(Larc)o(h)h(Pro)o(v)o(er.)24 b(In)16 b Fh(Pr)n(o)n(c)n(e)n(e)n(dings)g(of)h(the)g(Thir)n(d)206 1430 y(International)d(Confer)n(enc)n(e)f(on)h(R)n(ewriting)e(T)m(e)n (chniques)i(and)g(Applic)n(ations)p Fn(,)e(pages)g(137{151,)f(Chap)q (el)h(Hill,)206 1480 y(NC,)i(April)f(1989.)k(Lecture)f(Notes)e(in)g (Computer)f(Science)i(355.)0 1563 y([GHW85])33 b(Guttag,)11 b(J.)g(V.,)g(Horning,)g(J.)g(J.,)h(and)f(Wing,)f(J.)i(M.)h(The)f(Larc)o (h)g(family)c(of)j(sp)q(eci\014cation)h(languages.)i Fh(IEEE)206 1612 y(Softwar)n(e)p Fn(,)f(2\(5\):24{36,)e(Septem)o(b)q (er)k(1985.)0 1695 y([GM87])69 b(Goguen,)12 b(J.)g(A.)f(and)h (Meseguer,)i(J.)h(Unifying)c(functional,)g(ob)r(ject-orien)o(ted)i(and) f(relational)f(programmi)o(ng)206 1745 y(with)18 b(logical)e(seman)o (tics.)31 b(In)18 b(Shriv)o(er,)h(B.)f(and)g(W)m(egner,)g(P)m(.,)g (editors,)i Fh(R)n(ese)n(ar)n(ch)e(Dir)n(e)n(ctions)h(in)f(Obje)n(ct) 206 1794 y(Oriente)n(d)d(Pr)n(o)n(gr)n(amming)p Fn(.)d(MIT)i(Press,)h (1987.)0 1877 y([HM81])71 b(Hammer,)18 b(M.)g(and)h(McLeo)q(d,)h(D.)33 b(A)19 b(seman)o(tic)f(database)h(mo)q(del.)31 b Fh(A)o(CM)19 b(T)m(r)n(ans.)g(Datab)n(ase)h(Systems)p Fn(,)206 1927 y(6\(3\):351{386,)11 b(1981.)0 2009 y([HO87])77 b(Halb)q(ert,)14 b(D.)f(C.)g(and)g(O'Brien,)h(P)m(.)f(D.)k(Using)d(t)o(yp)q(es)g(and)g (inheritance)g(in)f(ob)r(ject-orien)o(ted)i(programming)o(.)206 2059 y Fh(IEEE)h(Softwar)n(e)p Fn(,)c(4\(5\):71{79,)g(Septem)o(b)q(er)i (1987.)0 2141 y([Hoa72])67 b(Hoare,)14 b(C.)k(Pro)q(of)c(of)f (correctness)k(of)c(data)h(represen)o(tations.)19 b Fh(A)n(cta)c (Informatic)n(a)p Fn(,)e(1\(1\):271{281,)e(1972.)0 2224 y([LD92])82 b(Lea)o(v)o(ens,)14 b(G.)e(T.)h(and)g(Dhara,)f(K.)h(K.)k(A) c(foundation)f(for)h(the)h(mo)q(del)d(theory)j(of)e(abstract)i(data)f (t)o(yp)q(es)h(with)206 2273 y(m)o(utation)f(and)i(aliasing)e (\(preliminary)g(v)o(ersion\).)22 b(T)m(ec)o(hnical)15 b(Rep)q(ort)g(92-35,)f(Departmen)o(t)g(of)h(Computer)206 2323 y(Science,)g(Io)o(w)o(a)e(State)i(Univ)o(ersit)o(y)m(,)d(Ames,)h (Io)o(w)o(a,)g(No)o(v)o(em)o(b)q(er)g(1992.)0 2406 y([Lea89])75 b(Lea)o(v)o(ens,)16 b(G.)22 b(V)m(erifying)14 b(ob)r(ject-orien)o(ted)i (prograsm)e(that)i(use)g(subt)o(yp)q(es.)23 b(T)m(ec)o(hnical)15 b(Rep)q(ort)h(439,)e(MIT)206 2455 y(Lab)q(oratory)g(for)f(Computer)h (Science,)g(F)m(ebruary)h(1989.)i(Ph.D.)12 b(thesis.)0 2538 y([Lea91])75 b(Lea)o(v)o(ens,)16 b(G.)f(T.)22 b(Mo)q(dular)16 b(sp)q(eci\014cation)g(and)f(v)o(eri\014cation)g(of)g(ob)r(ject-orien)o (ted)i(programs.)k Fh(IEEE)c(Soft-)206 2588 y(war)n(e)p Fn(,)c(8\(4\):72{80,)e(July)j(1991.)0 2670 y([LG85])81 b(Lisk)o(o)o(v,)13 b(B.)h(and)f(Guttag,)g(J.)18 b Fh(A)o(bstr)n(action) d(and)g(Sp)n(e)n(ci\014c)n(ation)h(in)f(Pr)n(o)n(gr)n(am)f(Design)p Fn(.)k(MIT)c(Press,)h(1985.)954 2795 y(19)p eop %%Page: 20 22 20 21 bop 0 42 a Fn([Lip92])79 b(Lip)q(ec)o(k,)20 b(U.)32 b(Seman)o(tics)17 b(and)i(usage)g(of)f(defaults)g(in)g(sp)q (eci\014cations.)33 b(In)19 b Fh(F)m(oundations)h(of)f(Information)206 91 y(Systems)c(Sp)n(e)n(ci\014c)n(ation)h(and)g(Design)p Fn(,)e(Marc)o(h)g(1992.)j(Dagstuhl)c(Seminar)g(9212)g(Rep)q(ort)h(35.)0 174 y([Lis92])86 b(Lisk)o(o)o(v,)19 b(B.)34 b(Preliminary)17 b(design)i(of)g(the)g(Thor)g(ob)r(ject-orien)o(ted)i(database)e (system.)33 b(In)19 b Fh(Pr)n(o)n(c.)g(of)h(the)206 224 y(Softwar)n(e)c(T)m(e)n(chnolo)n(gy)h(Confer)n(enc)n(e)p Fn(.)f(D)o(ARP)m(A,)e(April)i(1992.)23 b(Also)16 b(Programmi)o(ng)d (Metho)q(dology)i(Group)206 274 y(Memo)e(74,)g(MIT)h(Lab)q(oratory)f (for)h(Computer)f(Science,)i(Cam)o(bridge,)c(MA,)j(Marc)o(h)g(1992.)0 357 y([L)-5 b(W90])76 b(Lea)o(v)o(ens,)15 b(G.)e(T.)h(and)h(W)m(eihl,)d (W.)i(E.)20 b(Reasoning)13 b(ab)q(out)i(ob)r(ject-orien)o(ted)g (programs)e(that)i(use)g(subt)o(yp)q(es.)206 407 y(In)f Fh(ECOOP/OOPSLA)h('90)g(Pr)n(o)n(c)n(e)n(e)n(dings)p Fn(,)e(1990.)0 490 y([L)-5 b(W92])76 b(Lisk)o(o)o(v,)14 b(B.)g(and)h(Wing,)e(J.)21 b(F)m(amily)11 b(v)n(alues:)19 b(A)c(seman)o(tic)f(notion)g(of)g(subt)o(yping.)20 b(T)m(ec)o(hnical)14 b(Rep)q(ort)h(562,)206 540 y(MIT)f(Lab.)f(for)h(Computer)f(Science,)i (1992.)i(Also)c(a)o(v)n(ailable)f(as)i(CMU-CS-92-220.)0 623 y([L)-5 b(W94])76 b(Lisk)o(o)o(v,)17 b(B.)h(and)f(Wing,)g(J.)29 b(A)18 b(b)q(eha)o(vioral)e(notion)h(of)g(subt)o(yping.)28 b Fh(A)o(CM)18 b(T)m(r)n(ans.)f(on)i(Pr)n(o)n(g.)f(L)n(ang.)g(and)206 672 y(Systems)p Fn(,)c(pages)g(1811{1841,)d(No)o(v)o(em)o(b)q(er)i (1994.)0 756 y([Mey88])62 b(Mey)o(er,)15 b(B.)j Fh(Obje)n(ct-oriente)n (d)c(Softwar)n(e)g(Construction)p Fn(.)k(Pren)o(tice)d(Hall,)e(New)h(Y) m(ork,)f(1988.)0 839 y([MS90])79 b(Maier,)11 b(D.)e(and)h(Stein,)h(J.)h (Dev)o(elopmen)o(t)c(and)i(implemen)o(tation)d(of)i(an)h(ob)r (ject-orien)o(ted)i(DBMS.)g(In)e(Zdonik,)206 888 y(S.)h(and)g(Maier,)h (D.,)e(editors,)i Fh(R)n(e)n(adings)i(in)e(Obje)n(ct-Oriente)n(d)g (Datab)n(ase)h(Systems)p Fn(,)f(pages)f(167{185.)e(Morgan)206 938 y(Kaufmann,)j(1990.)0 1021 y([Nel91])79 b(Nelson,)14 b(G.)j Fh(Systems)f(Pr)n(o)n(gr)n(amming)e(with)g(Mo)n(dula-3)p Fn(.)19 b(Pren)o(tice)c(Hall,)d(1991.)0 1104 y([SCB)94 1089 y Fi(+)122 1104 y Fn(86])30 b(Sc)o(ha\013ert,)14 b(C.,)d(Co)q(op)q(er,)i(T.,)f(Bullis,)f(B.,)h(Kilian,)f(M.,)h(and)g (Wilp)q(olt,)e(C.)16 b(An)c(in)o(tro)q(duction)g(to)g(Trellis/Owl.)206 1154 y(In)i Fh(Pr)n(o)n(c)n(e)n(e)n(dings)h(of)g(OOPSLA)g('86)p Fn(,)e(pages)h(9{16,)f(Septem)o(b)q(er)h(1986.)0 1237 y([SH92])86 b(Sc)o(heid,)17 b(J.)f(and)f(Holtsb)q(erg,)i(S.)24 b(Ina)16 b(Jo)g(sp)q(eci\014cation)h(language)e(reference)j(man)o(ual.) k(T)m(ec)o(hnical)16 b(Rep)q(ort)206 1287 y(TM-6021/001/06,)11 b(P)o(aramax)h(Systems)i(Corp)q(oration,)e(A)i(Unisys)h(Compan)o(y)m(,) 10 b(June)15 b(1992.)0 1370 y([Str86])85 b(Stroustrup,)15 b(B.)j Fh(The)d(C++)f(Pr)n(o)n(gr)n(amming)g(L)n(anguage)p Fn(.)20 b(Addison-W)m(esley)m(,)12 b(1986.)0 1453 y([ZW97])72 b(Zaremski,)19 b(A.)f(and)g(Wing,)g(J.)32 b(Sp)q(eci\014cation)19 b(matc)o(hing)e(of)h(soft)o(w)o(are)g(comp)q(onen)o(ts.)31 b Fh(A)o(CM)19 b(T)m(r)n(ans.)f(on)206 1503 y(Softwar)n(e)c(Engine)n (ering)i(and)f(Metho)n(dolo)n(gy)p Fn(,)g(6\(4\):333{369,)c(Octob)q(er) k(1997.)954 2795 y(20)p eop %%Trailer end userdict /end-hook known{end-hook}if %%EOF

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4