Inter-OfficeMemorandumToCedarInterestDateOctober12,1982FromPaulRovnerLocationPaloAltoSubjectTheCedarRuntimeTypeSystemOrganizationPARC/CSLXEROXFiledon:[Indigo]Documentation>RTTypes.tiogaINTRODUCTIONTheCedarruntimetypesystemprovidesproceduresforexaminingarbitraryCedarvaluesandTYPEsatruntimeandforcreatingnewvaluesandmodifyingvariables.Usingitsinterfaces,onecanwriteaprogramthatdealswithanygivenCedarvalueorTYPEwithoutanticipatingthespecificTYPEwhentheprogramiswritten.Thenaturalclientforsuchfeaturesinaprogrammingsystemthatemploystypecheckingatcompiletimeisthedebugger.TheprimarymotivationforthecurrentimplementationwastoprovideafoundationfortheCedardebugger,basedontheconceptsoftheCedarAbstractMachineforinterpretingvaluesandtypes.ThekeyconceptsoftheCedarAbstractMachineforthepurposeofthismemoarethatatypecarrieswithitasetofoperationsandthatavariablecarrieswithititstype.Foramorecompletetreatmentoftheseandrelatedissues,see,on[Ivy],CedarAM.press,SAM.pressandRTT>AMFundamentals.press.Thecurrentimplementationistooslowtobeusedeffectivelybyclientprogramsasasubstitutefortruepolymorphisminthelanguage,butissuitableforexaminingandchangingvariablesinteractivelywiththeCedardebugger.Itisourintentiontoimprovetheimplementation(butretainthespiritofitsdefinition)whenthelanguageispreparedtodealadequatelywithpolymorphism.Weexpectthatitwillthenbemorenaturalforrun-of-the-millCedarprogramstomakeuseoftheseorsimilarfacilities.TheimplementationoftheruntimetypesystemisincludedintheCedarbootfiles.TheinterfacesreferencedinthismemoareRTBasic,RTTBridge,RTTRemoteBridge,RTTypesandRTSymbols.TheseareexportedbyRTT.bcd,whichisacomponentofCedarCore.bcd.Allfilesthatconstitutetheruntimetypesystemareaccessiblevia[Indigo]Top>Runtime.df.1.0ConceptsandPerspectiveCedarisastrongly-typedlanguage.Everyvariable(includingonesthatareimmutableaftercompile-time)hasanassociatedbundleofinformationthatcanbeusedtodeterminethemeaningofthebitsofitsvalue.IntheCedarAbstractMachineformulation,thisbundleiscalledaType.EachTypecorrespondstoaCedarTYPE,andisrepresentedatruntimeasaninstanceofRTBasic.Type(formoredetailabouttheCedarruntimesystemsee[Indigo]Documentation>Runtime.tioga).FortheCedartypesystem,itisconvenienttocategorizeTypesbywhatwecalltheirClass.Forexample,thisisusefulfordecidinghowtodisplayavalueofagivenType.1p a  q _trn_tq#_tr+_t03:q \rn\q#\r+\.q Z~rnZ~F^!$q+Z~ r3oZ~s{Rr I L* D oAMl#@( /2&8>BFo?@N% %(-30 6 <AC o>L(K!%(+X/3?68=B o< &'o:*f8t &')& 16r9`>BGo8s"\%H* 136P;. E!Go6 &"&W,035;i=K?Do54 ] # %o2Fu-"(-02e79_;@7BEVFo1  #P%().3$6)7i9.<?@)Co/j4"'-038o-!o+H< "-$')H+-.^ 46:@B:CX o) "O(+(,14=;=Co' Ak!'s(*u-24:7< Fo&RS',S %c)d,2!39;?7 Fto$ l"#&~)+/36?gC|o#GM" o # r$',-I24U6:=@Ce o 9!j$i* 3<@/Fo9 ;2z#+%+E/H018: DYFo=  #%') 042q  oM &(*K/ 6i9<?AFSo 9n $ ) + 258:>u@hG/oM. X6 5$\&P(-28 @CVH#ogtyrthOr r!  ()*/36F7 ?@EGou/tN4r"3"%*6.36;AG:oW,o + "/# *,v 279<>A]tD E rH o 5 "N'*,1C2m678<v) TVm$EveryCedarvariablethatcanaffecttheoutcomeofacomputationcanbeviewedasacomponentoftheCedarAbstractMachine.WecalladescriptionofsuchaCedarvariableaTypedVariable.WeusethetermStatusforthemutabilitypropertyofTypedVariables.ATypedVariabledescribes:theTypeofitsvaluewhetherthevalueisaconstant(i.e.immutableaftercompile-time)ifso,theactualbitsofthevalue(statusconst)ifnot,theaddressesofthememorycellsthatcontainthebitsofthevalueandwhetherthevariablemaybechanged(statusreadOnlyormutable)Notethatframes(bothlocalandglobal)areviewedasTypedVariablesintheCedarAbstractMachine.Asyouwillseebelow,theimplementationprovidesproceduresfordealingwithframesandcontrollinks.Aclientoftheruntimetypesystemapproachesitviathe"Bridge"interfaces(RTTBridgeandRTTRemoteBridge)fromeitheralocalorremoteCedarworldwithoneofthefollowing:aREFaLONGPOINTERandaRTBasic.TypeanATOMaROPEaPrincOps.FrameHandleaPrincOps.GlobalFrameHandleaPROCANYRETURNSANYanERRORANYRETURNSANYForREFs,LONGPOINTERs,FrameHandlesandGlobalFrameHandles,proceduresexistforcreatingTypedVariablesthatdescribethereferents.ForATOMs,ROPEs,PROCsandERRORs,proceduresexistforcreatingTypedVariablesthathavethespecifiedvalues.ProceduresoftheRTTypesinterfaceallowonetoexamineandmodifycomponentsofTypedVariablesandexaminethestructureofCedar/MesaTYPEs.Generally,theRTTypesproceduresareuniformlyapplicablebothtoTV'sforelementsofthelocalworldandTV'sforelementsofaremoteworld.Theonlyexceptiontothisinthecurrentimplementationistherestrictionthatassignment(viaRTTypes.Assign)ofaREF-containingvaluetoaTVinaremoteworldisnotallowed.2.0TheClassesofTypesType:TYPE=RTBasic.Type;RTTypes.Class:TYPE={definition,--e.g.TypeClass[CODE[T]]whereT:TYPE=...--cardinal,longCardinal,integer,longInteger,real,character,--basicatom,rope,list,ref,pointer,longPointer,descriptor,longDescriptor,basePointer,relativePointer--address--procedure,signal,error,program,port,--transfer--enumerated,subrange,union,sequence,record,structure,array,2rob)A5G!X$';,.F/K 7!9;U?AaBgo`u&0)W,.E 58I<=BHeto^ r^^l"_t%^&^r*^+n^-A/ 6W<=Ho]3  1Z1X$ %(A/'2c UJM "%(t-U-Ur0US "$*]-c0(47T9;=ADAQnR!}&t+E EfG/o+ED "O'*/. 6J7 ADo* E !2o' 0 %( . 58\:=c?EmG/o%R$&A'i,0O3%6=@BhDo$3 { $D'@ .~1b.? o"Z2#%1' 8to}9u}}t;} "}uotH xOF*s.V0;46drt\_ "( 15 r=>t?\? N & / 8rrt Hr&'r tg3#*r./N t7\7 yt     .v)TVm$countedZone,uncountedZone,nil,--e.g.TypeClass[TVType[NIL]]unspecified,process,type,opaque,any,--e.g.TypeClass[Range[CODE[REFANY]]]globalFrame,localFrame--frame--};3.0MutabilitystatusofTypedVariablesRTTypes.Status:TYPE={mutable,readOnly,const};4.0The"Bridge"interfaces:ConversionbetweenCedarvaluesandTypedVariables4.1TypesandconstantsdefinedinRTTRemoteBridgeWorld:TYPE=WorldVM.World;RemoteRef:TYPE=RECORD[world:World_,worldIncarnation:LONGCARDINAL,ref:WorldVM.Address];nilRemoteRef:RemoteRef=[world:NIL,ref:0,worldIncarnation:0];RemotePointer:TYPE=RECORD[world:World_,worldIncarnation:LONGCARDINAL,ptr:WorldVM.Address];nilRemotePointer:RemotePointer=[world:NIL,ptr:0,worldIncarnation:0];RemoteFrameHandle:TYPE=RECORD[world:World_,worldIncarnation:LONGCARDINAL,fh:WorldVM.ShortAddress];nilRemoteFrameHandle:RemoteFrameHandle=[world:NIL,fh:0,worldIncarnation:0];RemoteGlobalFrameHandle:TYPE=RECORD[world:World_,worldIncarnation:LONGCARDINAL,gfh:WorldVM.ShortAddress];nilRemoteGlobalFrameHandle:RemoteGlobalFrameHandle=[world:NIL,gfh:0,worldIncarnation:0];RemotePD:TYPE=RECORD[world:World_,worldIncarnation:LONGCARDINAL,pd:UNSPECIFIED];nilRemotePD:RemotePD=[world:NIL,pd:0,worldIncarnation:0];RemoteSED:TYPE=RECORD[world:World_,worldIncarnation:LONGCARDINAL,sed:UNSPECIFIED];nilRemoteSED:RemoteSED=[world:NIL,sed:0,worldIncarnation:0];4.2HowtoacquireaTypedVariablefromaCedarvalue3tb> _ `r`;`9t^g^ ],[|YXxXX+nrtVk\Vk v r$zVk$VktTr R. ? uoOtOO (8/r M 6 %~*/325 oJpc#c%y1GrGqGGr9GG y1ElrElqElElr'Elq ElElr#>C(,U-#B q.B /B 2r9B #@[&c> #c%Hq*>*>r,>,>/1%:n(,U-#8q.8/82r98#7 &z5\6 ')q._5\/G5\r0j5\1G5\35@y12r2q2 2r#.2q%2%2r#>1(,U-#/oq./o//o2r9/o#-&,"#!-*^#q'*^(*^r)*^**^-.9y1'r"'q#'$'r'$'q) ')'r#>& (,U-#$pq.$p/$p2r9$p#"&!&;!-_#q'_(_r)_*_-/>:ry1rqsrqr#>!(,U-#qq.q/q2r9q#q&N'4 r..v "$q)*r+,/0;y1rqPrq r#>(,U-#"q."/"2r9"#rq&r'r r.ur.r $&q+[ ,D r-g .C 122=o 5  &)v*.v)`TVm$ (a)FromalocalCedarREF(RTTBridge)TVForReferent:PROC[ref:REFANY,status:Status_mutable]RETURNS[TypedVariable];ThisyieldsaTypedVariablethatrepresentstheCedarvaluethatisthereferentofref.TVForReadOnlyReferent:PROC[ref:REFREADONLYANY]RETURNS[TypedVariable];ThisyieldsaTypedVariable,statusreadOnly,thatrepresentstheCedarvaluethatisthereferentofref.(b)FromaremoteCedarREF(RTTRemoteBridge)TVForRemoteReferent:PROC[remoteRef:RTTRemoteBridge.RemoteRef,status:Status_mutable]RETURNS[TypedVariable];ThisyieldsaTypedVariablethatrepresentstheCedarvaluethatisthereferentofref.(c)FromotherlocalCedarvalues(RTTBridge)TVForATOM:PROC[atom:ATOM]RETURNS[TypedVariable--atom--];TVForROPE:PROC[rope:Rope.ROPE]RETURNS[TypedVariable--rope--];--useTVToNametogettheROPEbackTVForProc:PROC[proc:PROCANYRETURNSANY]RETURNS[TypedVariable--procedure--];TVForSignal:PROC[signal:ERRORANYRETURNSANY]RETURNS[TypedVariable--signal,error--];TheseyieldTypedVariablesthatdescribetheindicatedprocedureorsignaldescriptor.TheClassofsuchaTypedVariableiseitherprocedure,signal,orerror.(NOTE:TheoperationsbelowandtheTypedVariablestheyproduceareunsafe)TVForPointerReferent:PROC[ptr:LONGPOINTER,type:Type,status:Status_mutable]RETURNS[TypedVariable];ThisyieldsaTypedVariablethatrepresentsthereferentofthespecifiedpointer.ThespecifiedTypeisacceptedasthevariable'sType.TVForFHReferent:PROC[fh:PrincOps.FrameHandle,evalStack:WordSequence_NIL]RETURNS[TypedVariable];ThisyieldsaTypedVariablethatrepresentstheindicatedlocalframe.ThestructureofnestedblocksandtheirlocalvariableswillbedeterminedfromthePCthatisstoredintheframe.BEWARE.ThisisUNSAFE.ReferencetothisTypedVariableafterthespecifiedframeisnolongervalidwillleadtomanifestationsofstrangeandwondrousphenomena(RTTypesfunctionsthatdealwithframevaluesvalidatethemwhereverpossible,butaccidentscanstillhappen.)TVForGFHReferent:PROC[gfh:PrincOps.GlobalFrameHandle]4r1b!M"L $ t_ ([+/5D:v<]r[i )+ 2?48<>?@aBGtYrYtW<'t/O2;-UrS  G *t.S .S r4S 5S 8 ?+AEQbM#yt%2Qb%Qbr'BQb1NoDm"-%tLW%u3BLW4LWt> LW?LW'J,203HrFx )+ 2?48<>?@aBGtDrD1BLC#'C t?  '>; 6 'E 9rx8:8:%j')O+0 t5  &+\/6m4$1  (.Z29k/1qr-Q% *=-{3M6<CqE+ !%q'Y*, 57,v;H+<+rA+vB+C+rF+G+v*r*'|nF #(*- 69?TAt$~#Jd"*\.38=?E!r )e,@ 25;:t<:>Dnq H#%<*,. 5t"nu)*zt/c0J $h> ,z 79}r w (+Y 139<ACes"$(+j1+35 ="@BEOH#U#*-/5< =@@ g#.'1(*/ 2}548:9 C DoK '.+4 69<@`Dn =!/&)J/314_t B#u+ B,h Bt1R B2d Bv)ATVm$RETURNS[TypedVariable];ThisyieldsaTypedVariablethatrepresentstheindicatedglobalframe.(d)FromotherremoteCedarvalues(RTTRemoteBridge)TVForRemotePointerReferent:PROC[remotePointer:RemotePointer,type:Type,status:Status_mutable]RETURNS[TypedVariable];TVForRemoteFHReferent:PROC[remoteFrameHandle:RemoteFrameHandle,evalStack:WordSequence_NIL]RETURNS[TypedVariable];ThisyieldsaTypedVariablethatrepresentstheindicatedlocalframe.ThestructureofnestedblocksandtheirlocalvariableswillbedeterminedfromthePCthatisstoredintheframe.BEWARE.ThisisUNSAFE.ReferencetothisTypedVariableafterthespecifiedframeisnolongervalidwillleadtomanifestationsofstrangeandwondrousphenomena(RTTypesfunctionsthatdealwithframevaluesvalidatethemwhereverpossible,butaccidentscanstillhappen.)TVForRemoteGFHReferent:PROC[remoteGlobalFrameHandle:RemoteGlobalFrameHandle]RETURNS[TypedVariable];TVForRemotePD:PROC[remotePD:RemotePD]RETURNS[TypedVariable--procedure--];TVForRemoteSED:PROC[remoteSED:RemoteSED]RETURNS[TypedVariable--signal,error--];4.3HowtoacquirealocalCedarvaluefromaTypedVariable(RTTBridge)RefFromTV:PROC[tv:TypedVariable]RETURNS[REFANY];Ifpossible,thisreturnstheREFthatpointstothevaluerepresentedbytv.ThisraisesInternalTViftvisembedded,NotMutableifTVStatus[tv]#mutable.SomeRefFromTV:PROC[tv:TypedVariable]RETURNS[REFANY];LikeRefFromTV,butcreatesacopyofthespecifiedvalueincollectiblestorageandreturnsaREFtothecopyinsteadofraisinganerror.ReadOnlyRefFromTV:PROC[tv:TypedVariable]RETURNS[REFREADONLYANY];Ifpossible,thisreturnsaREADONLYREFthatpointstothevaluerepresentedbytv.ThisraisesInternalTViftvisembedded.PointerFromTV:PROC[tv:TypedVariable]RETURNS[LONGPOINTER];TVToATOM:PROC[tv:TypedVariable]RETURNS[ATOM];TVToProc:PROC[tv:TypedVariable]RETURNS[PROCANYRETURNSANY];TVToSignal:PROC[tv:TypedVariable]RETURNS[ERRORANYRETURNSANY];ThesereturnthevaluerepresentedbythespecifiedTypedVariable.IftvisNIL,they5tb r_ )2, 24:>1]oD $(tZ+0;J +X/+W716P7US5*Q^) O 1 <> NrKw (+Y 139<ACIs"$(+j1+35 ="@BEOH#H0U#*-/5< =@@ Fg#.'1(*/ 2}548:9 C DDK '.+4 69<@`DnC:=!/&)J/314_t@?4 =\: ! . 9*$6"0\  40iro/  $'+/,Y 5 t1-g 5"a - 8r*au#%a(+d/t13[6 >Ht@0*@*rA*B*E): to):):rS):): ' /1 8:t1& 3&_ 1 <r$/- s#'(,%-0U69; BF"+"9%*>+0f2Wt1 "))U PV !)r/#$-13809<^@ Gt)rR)) %t')')r())O)*Xt1 %+ 0 <1*"U - 1.!Y P "&0-1g K"v P #b'.sr 5$#. *,.4 >v@` 5@ 5rB 5Bf 5vCp 5Dm 5rE 5F 5v)PTVm$returnnullsignalorprocedurevalues.FHFromTV:PROC[tv:TypedVariable]RETURNS[PrincOps.FrameHandle];GFHFromTV:PROC[tv:TypedVariable]RETURNS[PrincOps.GlobalFrameHandle];ThesereturnanappropriatekindofpointertothevaluerepresentedbythespecifiedTypedVariable.TVToLC:PROC[tv:TypedVariable]RETURNS[LONGCARDINAL];TVToInteger:PROC[tv:TypedVariable]RETURNS[INTEGER];TVToLI:PROC[tv:TypedVariable]RETURNS[LONGINTEGER];TVToCardinal:PROC[tv:TypedVariable]RETURNS[CARDINAL];TVToCharacter:PROC[tv:TypedVariable]RETURNS[CHARACTER];TVToReal:PROC[tv:TypedVariable]RETURNS[REAL];TheseproceduresPUNthespecifiedvalueintothespecifiedCedarbasicTYPE.TheyraiseRangeFaultifthesizeofthespecifiedTypedVariableisinappropriate.4.4HowtoacquirearemoteCedarvaluefromaTypedVariable(RTTRemoteBridge)RemoteRefFromTV:PROC[tv:TypedVariable]RETURNS[RemoteRef];RemotePointerFromTV:PROC[tv:TypedVariable]RETURNS[RemotePointer];RemoteFHFromTV:PROC[tv:TypedVariable]RETURNS[RemoteFrameHandle];RemoteGFHFromTV:PROC[tv:TypedVariable]RETURNS[RemoteGlobalFrameHandle];TVToRemotePD:PROC[tv:TypedVariable--procedure,program--]RETURNS[RemotePD];TVToRemoteSED:PROC[tv:TypedVariable]RETURNS[RemoteSED];4.5RemotenesspropertiesofTypedVariables(RTTRemoteBridge)IsRemote:PROC[tv:TypedVariable]RETURNS[BOOLEAN];GetWorld:PROC[tv:TypedVariable]RETURNS[World];GetWorldIncarnation:PROC[tv:TypedVariable]RETURNS[LONGCARDINAL];4.6RTTBridgefacilitiesofinterestonlytoWizardsThefollowingstuffisforusebyWizards.Ifyouneedit,chancesaregoodyou'redoingsomethingwrongWordSequence:TYPE=REFWordSequenceRecord;WordSequenceRecord:TYPE=RECORD[s:SEQUENCEsize:NATOFWORD];TVToWordSequence:PROC[tv:TypedVariable]RETURNS[s:WordSequence];ThisisusefulforTypedVariableswithsize>Size[CODE[LONGINTEGER]].ItwillproducewhatamountstoanuninterpretedbitstringforanyTypedVariable.Loophole:PROC[tv:TypedVariable,type:Type,tag:TypedVariable_NIL]RETURNS[TypedVariable];OctalRead:PROC[tv:TypedVariable,offset:INT]6rb)!!(+t1_! -tu4_5_t:_;_ 1] " P[tu[t[tt#[t$[trX* &)+s0?14U8 ?pApCWH t1T + 7 1S #' .1Qk)T * 71O $ /1N %A 01Lg!- , rI #~%+/-14W: >AFH;- !#b&'*&/ 91: oE !h%)),- 7 t1C1 ' 3k1@#N*U 51>(+x= 1<19!8(c H8P!15 W%9 H411 0&\ 1ro/ L !} +Pt1,! ,1* ! ,1'%/ =v 1% ro#] V $()1 ? "O$&t+ r, -I .Y1"46Q;z=AcE11t9 (#q%T(9T!K#/+47;z>1!( P#  r' : *)-_K]!#C'O)-/2W6<,t>'3>>3>r?3>to0I &o.6QB r1+v+&+rG++v++r+3+ `"&(^v*+++ r5`+6+7 >AkE0vG+G+r1* +v* * r!g* to',{ +2|r1%?w '+W,137O:^<>; EAF1#Z_g!$*&&(to @]! -B4r1RS_"&(k 1387:N<@:D|G;1 &~ +2?"%+tox q &rr.".48o=?T tE~F r(3(,).ft3P3v1qrq qY" #(!).1"2i608:v@]qA:qrCqD|qG/v1Pr|v>r%P%*q,1*toF * !#g* ; ')* Bmav)>TVm$ RETURNS[TypedVariable];Newcreatesandreturnsaclearedobject.DefaultInitialValue:PROC[type:Type]RETURNS[TypedVariable];DefaultInitialValueisimplementedonlyfortypeswithconstantinitialization.Atpresentitisnotavailableforprocedureparameterandresultrecordtypes;useIndexToDefaultInitialValuetoexamineeachfield.IndexToDefaultInitialValue:PROC[type:Type--recordorstructure--,index:Index]RETURNS[TypedVariable];Returnsthedefaultinitialvaluefortheindex'thfieldoftype.ObviouslynotinallcasesequivalenttoDefaultInitialValue[IndexToType[type,index]].N.B.ThereareatpresentnooperationsforobtainingaTypedescribingadefinitionsmoduleproceduredefinition;oneinsteadnormallyobtainstheTypeofaspecificexportedimplementation.ThedefaultinitialvaluesthatoneobtainsfromthisTypewillbethoseoftheimplementation,whichmaydifferfromthoseoftheimporteddefinition.TypeClass:PROC[type:Type]RETURNS[Class];IsPainted:PROC[type:Type]RETURNS[BOOL];TRUEiftyperepresentsapaintedtype.7.0ApplicableoperationsforeachClassofTypeThissectioncontainsalistforeachClassofTypeoftheoperationsthatareapplicabletoTypedVariablesandTypesofthatClass.YouwillnotethatsomeoperationsareapplicabletomorethanoneClass.AruntimetestismadeforeachoperationtoverifythatitisapplicabletothegivenTypedVariableorType.RTTypes.TypeFaultisraisedifthistestfails.Index:TYPE=NAT;Thisisanumerictypethatisusedforindexinginsomeoftheproceduresbelow.Generally,thevalidindexrangefortheseis[1..n].definitionThisclassappearstoconfusenewusersoftheRTTypesinterface.ATypehasdefinitionasitsclassIFFitwasdefinedasanidentifierthatisequatedtosomeotherType,asinT:TYPE=RECORD[...Forexample,tv:TV_TVForReferent[NEW[T]];...IFTypeClass[TVType[tv]]#definitionTHENERROR;...IFTypeClass[UnderType[TVType[tv]]]#recordTHENERROR;TypeToName:PROC[type:Type,moduleName:REFRope.ROPE_NIL,fileName:REFRope.ROPE_NIL]RETURNS[Rope.ROPE];IfmoduleNameand/orfileNamearesupplied,TypeNameattemptstodiscoverthemoduleandfilenamesforthemoduleinwhichtypewasdefined.Ifthesuppliedtypehasnoname(e.g.,ananonymousprocedureparameter),NILisreturned.Ground:PROC[type:Type]RETURNS[Type];Thispeelsoffonelayerofdefintion.8tb v1_r__!r"'Zto]% &+bv1Zr_ZZ (3+X-1@4f9BD1Y!p$,W37<AGt1WXr%WX&3WX'r,0toT#| ,ur0~T0T16D8 t>4T?1TDS2r1Pef"O%(/v*P*Pr.P.`P03Dv4P5gPr7P9 P?BD/F1O vO O $3r7O 1LpB#O% ,v.5Ev6L7Lr:L;RLA]B 1J' $[&+1m6-v8J9_Jr<"JC1I@ $(,/2|7T:v=|I@>XI@rA5I@B2I@CE1GI $'+].2c46{A Go9| N )!$(+.148. >AG Go7G#&z'+.1Q79H=C@ AC o6-}1 "Dw&$6-&6-r+6-+6-1378};=to3_r1121"#&) .0@35Y7 >B 1/!%S&xo- r1*Dmq$'*y,*.4y :n;?uxA*B*rG*H*1( ;i#$& ,/t067;Z>BDz'?hO r1%z#R!oz*+ 496uz3O4:?t1  %xN )Uu,N-tNt/N0N4l5&_u)*}t,-1u3Put!"$rvr 6v$L$r*}+",v23r:Q:?AG/h#&#(-/v34r789?AC0w} =#%,3^ :=?0t1 u !o& r 5  h#% v)"TVm$ UnderType:PUBLICPROC[type:Type]RETURNS[Type];Thisreturnsthefirstunderlyingnon-definitiontype.GroundStar:PUBLICPROC[type:Type]RETURNS[Type];Thisfindsthefirstnon-definitiontype,thenpeelsoffsubrangeorrelativeReflayerstoarriveatthe"ground"Type.cardinal,longCardinal,integer,longInteger,real,characterFirst,Last:PROC[type:Type]RETURNS[TypedVariable];Next:PROC[tv:TypedVariable]RETURNS[TypedVariable];Coerce:PROC[tv:TypedVariable,targetType:Type]RETURNS[TypedVariable];Seetheenumeratedsectionforacompletedescription.Coercionsbetweenintegersandcardinalsandtheirsubrangesaresupported.Nocoercionscurrentlyexistbetweenrealsorcharactersandanyothertypes,norarecoercionsto/fromlongnumerictypessupported,althoughthatwouldbeeasy.list,refRange:PROC[type:Type]RETURNS[Type];Thisreturnsthereferenttypeofthespecifiedreftype.Referent:PROC[ref:TypedVariable]RETURNS[TypedVariable];Thisisthedereferencingoperation.ReferentStatus:PROC[type:Type]RETURNS[Status];ThiswillreturnreadOnlyifthereftypeisREFREADONLY...,mutableotherwise.Coerce:PROC[tv:TypedVariable,targetType:Type]RETURNS[TypedVariable];CoercewillproduceaTypedVariable,statusreadOnly,ifappropriatetypeandrangetestsaresuccessful.ItwillproduceaTypedVariableforaREFANYfromaTypedVariableforsomeexplicitREFtype(i.e.,Widen).ItcanalsoproduceaTypedVariableforanexplicitREFtypefromaTypedVariableforaREFANYwhosecurrentreferentisofanacceptabletype(i.e.,Narrow).pointer,longPointerRange:PROC[type:Type]RETURNS[Type];Thisreturnsthereferenttypeofthespecifiedpointertype.Referent:PROC[ref:TypedVariable]RETURNS[TypedVariable];Thisisthedereferencingoperation.ReferentStatus:PROC[type:Type]RETURNS[Status];ThiswillreturnreadOnlyifthepointertypeis...POINTERTOREADONLY...,mutableotherwise.descriptor,longDescriptorRange:PROC[type:Type]RETURNS[Type];Thisreturnsthereferenttypeofthespecifieddescriptortype.ReferentStatus:PROC[type:Type]RETURNS[Status];9t1b ! *. r_ ! ( 1t1]& ! *~/! rZ!! *,-04w6<> EY$$xoV w"P ),t1T #(71Qq )41OU * 3PMfrJ}xJlJr!J!J%'(. 6<{xAJBAJrEJFJxIBrIBIB!6'*E 14:@D xGr%G/GxGGr[G eG#%)`-N/2.88={@EE !$M(|*lxoCvt1@ %L r>| $K'[)+s1/3Vt1;r!N ,r9 x $v t17! '+r4 v4k4r%;4%4&(+#.3v/4042r:4:4v^ "$'-/ 8;Q<@DHe* !%*%-104:<?BHe( 4 e"H'*^-a01 ;=J>gAEa'H S" # *-0xo$] t1"N %L r $K'[)+s1/5t1Tr!N ,r x $v t1Z! '+rL7v *r&:&'*z/2v4~46k=M@rGHv6r6Q6xo  t1< %L r  $K'[)+s1/ 7t1 B! '+v)MTVm$ThiswillreturnreadOnlyifthedescriptortypeis...DESCRIPTORFORREADONLY...,mutableotherwise.Apply:PROC[tv:TypedVariable,arg:TypedVariable]RETURNS[TypedVariable];ThisreturnsaTypedVariableforthespecifiedelementofthespecifiedarray.NOTE:Applyfordescriptorsisnotimplementedyet.procedureDomain:PROC[type:Type]RETURNS[Type];Range:PROC[type:Type]RETURNS[Type];TVToName:PROC[tv:TypedVariable]RETURNS[ans:Rope.ROPE];StaticParent:PROC[tv:TypedVariable]RETURNS[TypedVariable--proc--];--maybeNILGlobalParent:PROC[tv:TypedVariable]RETURNS[TypedVariable--globalFrame--];signalDomain:PROC[type:Type]RETURNS[Type];Range:PROC[type:Type]RETURNS[Type];TVToName:PROC[tv:TypedVariable]RETURNS[ans:Rope.ROPE];GlobalParent:PROC[tv:TypedVariable]RETURNS[TypedVariable--globalFrame--];errorDomain:PROC[type:Type]RETURNS[Type];TVToName:PROC[tv:TypedVariable]RETURNS[ans:Rope.ROPE];GlobalParent:PROC[tv:TypedVariable]RETURNS[TypedVariable--globalFrame--];programDomain:PROC[type:Type]RETURNS[Type];Range:PROC[type:Type]RETURNS[Type];TVToName:PROC[tv:TypedVariable]RETURNS[ans:Rope.ROPE];portNospecialoperations(yet).enumeratedNameToIndex:PROC[type:Type,name:Rope.ROPE]RETURNS[Index];Therangeofindexis[1..NValues[type]].NameToIndexraisesBadNameIndexToName:PROC[type:Type,index:Index]RETURNS[Rope.ROPE];RaisesBadIndex.TVToName:PROC[tv:TypedVariable]RETURNS[ans:Rope.ROPE];First,Last:PROC[type:Type]RETURNS[TypedVariable];Next:PROC[tv:TypedVariable]RETURNS[TypedVariable];NextreturnsNILifthereisnosuccessortotv.NValues:PROC[type:Type]RETURNS[Index];Value:PROC[type:Type,index:Index]RETURNS[TypedVariable];ThisreturnsaTypedVariablefortheindex'thelementoftheenumeratedtype.The10rb)v b)!Xb)r'b)(1b)), 37v9b):b); F(`r``v``r$#`$`t1]W )-S H\QrY '>)|+168:@DX% ] "N#&/ .xoUt1S !&2 1Qq %L 1O" - u8O9Ot;O=O1N =#h HLmr'BLm'Lmt+Lm,bLmr-Lm.]Lm/Z3t1J # HIr'BI'I t0I1@IxoFt1D  !&2 1B` %L 1@" - u8@9@t;@=@1? # H=\r'B=\'=\ t0=\1@=\xo:t18S !&2 16" - u8696t;6=614 # H3Or'B3O'3O t03O1@3Oxo0t1.F !&2 1, %L 1*" - u8*9*t;*=*xo(ir/(i $xo% t1#a  %*hu/M#a0 #at2#a3#a7r tN  r! " #&.;v/ 0 r8 9 AxEQG/&C $h&)v,-r;Y;@B{E-FL (t1  %*hu/M0 t237rP "$&,#04sv8P9Pr>Pt1  %*h/M4^u;<t?+@3rUv6U)UrHUt1 (r:; tCuD1Zk +-r='Z=ZtBZCqZr )v>  r( ( *o,28-==?EG/ 5 &$Z)+v-/W48:!mv>m>m r'O>m'>m)w+1g68-:w@F<"$%(v+<,<&t1:H ( 56r7v 77 r'7(I7*,0X368;AD6# $'8v(6#)6#r-6#.(6#v/h6#/6#r326#46#69G?PAWt13I *r1'v1'J1'$ r-1'.71'/2C6p8=?dEG//!* (*}+.47;AvC/D/rF/G}/v-r--$3%v'-(-r.-.-017u;?xo+[r1(r %9(b*,1[47aAE1'6  $2&)~+<x-='6-'6r1{'62f'65;h? Ao H.1%` ')+/1r 8:?D Fu1#$)-m39<@D1"@ #*I-0279?<1t c"(*-m/_0 9<> BG1^!%'D+/2S9:<=CF1sFR)-/2N 9 ;K>CG1f #@-z15D:';>CE1%|%'-t1"U +N/ 1) 9 &3*1 ! -i2NPr tN  r! " #&v r + "D%3+3o58=?F'He 5 v)eTVm$IndexToType:PROC[type:Type,index:Index]RETURNS[Type];Hereindexisusedtoselectoneofthetypesofthecomponentsofarecordorstructure.IndexToName:PROC[type:Type,index:Index]RETURNS[Rope.ROPE];Hereindexisusedtoselectoneofthenamesofthecomponentsofarecordorstructure.NameToIndex:PROC[type:Type,name:Rope.ROPE]RETURNS[Index];NameToIndexreturnstheindexofthecomponentintherecordorstructuretypethathasthespecifiedname.NameToIndexraisesBadNameifthegiventypehasnocomponentwiththespecifiedname.VariableType:PROC[type:Type]RETURNS[v:Type,c:Class];Iftyperepresents:Aunion-record:cisunion,andvisthetypeoftheunioncomponent.Asequence-record:cissequence,andvisthetypeofthesequencecomponent.Anythingelse:cisnil,andvisundefined.VariableTypemakesitpossibletodeterminewhetherrecordsofthistypecontainanyelementswithvariablestructure.Ifcisunionorsequence,nisNComponents[type],andtvisaTypedVariablesuchthatTVType[tv]=type,thenIndexToType[type,n]yieldsv,andIndexToTV[tv]yieldsaTypedVariabledescribingtheunionorsequence,foruseinthefunctionsdescribedinthesectionsbelow.Size:PROC[type:Type,length:CARDINAL_0]RETURNS[CARDINAL];IfVariableType[type].class=union,Sizereturnsthesizeofthelargestvariant.IfVariableType[type].class=sequence,thecallermustsupplyaproposedlength,andSizereturnsthesizeofasequence-recordwhosesequencecontainslengthelements.arrayIsPacked:PROC[type:Type]RETURNS[BOOL];Domain:PROC[type:Type]RETURNS[Type];ThisreturnstheindexTypethatisassociatedwiththespecifiedarrayType.Range:PROC[type:Type]RETURNS[Type];ThisreturnstheelementTypethatisassociatedwiththespecifiedarrayType.Apply:PROC[tv:TypedVariable,arg:TypedVariable]RETURNS[TypedVariable];ThisreturnsaTypedVariableforthespecifiedelementofthespecifiedarray.countedZoneNospecialoperations(yet).uncountedZoneNospecialoperations(yet).nilThisisTypeClass[RTBasic.nullType].Nospecialoperations(yet).unspecifiedThisisTypeClass[Range[CODE[POINTERTOUNSPECIFIED]]].Nospecialoperations(yet).13t1b i %b).3 r_t_ _rD__"^$F(?+$-/3|5n8 ?ACBG] t1[o  %*h/M4^u;[o<[ot?+[o@3[orXtXXr.XX"2$'*,/L3583 @ACMGWB t1T  %*hu/MT0 Tt2T3T7vR7 rSR7R7"%K) *-4"58CFPV Yv$P%P r.mP.P2s9*:=yAuDGN5!'Pt1Lc  %*\14.8:rIvtIIrI3I GY@ t!GYr#UGY{$GY%GYr(_GY)AD>"N i% ;to;r;1#t%;r&;v';(;r4;5;t8=;8;r:;:;;v<;=; rF];F;9v99 r"9#{9v&9&9r4*949t79r899v<-9<9 rE9FT98Nv8N8N r8N 8N&g(,.x469b; =iCd6!t14!: 3#)42o4~r1vt1\1{'1(^1r+*1v,1,1r/A1/136T8:=Ar/v//{'/(e/r-/./15\8=>D-ov-o-or-o-o #_&d(w)49 ?LvE -oEb-or+xo)Ct1& "'g 1$8 !&2 r! "&r)@* 1436@Eo] x '&xo[r [/[o !xoYr/YJ.03i5:G @xoV t1T" - u8T9Tt;T=T1R^ +cr=]R^=R^tC R^CR^xoO t1Md ! PKr(JK(K t0.K0KrI>*vAI>I> r(I>(I>*t,3t5I>6{I>r7I>8\I>:<5=|@EKvGrG.G,#$&)t1E *grxC!o ,1P<r:Rov:R:R r)1:R):R+.4;?=[@G8 ]tX88r8t16- *g/LP4r2v22 r'a2'2)+15B698?B% 0`t0`}0`rN0`t1- $ P,:r(J,:(,: t0,:1k,:v)r )!)'))-I2X8$=a@BHev( r((%(K.2 :=ADGv&o r&o&o%v&3&o'&o r/&o0{&o 7:@=AEmG$nV!#'j-<0v3$4Z$r8a$8$:,>v?$@$ r#  !b'-(,0Zt1# 2{# r3# 4# 8 ?WAEvv!y r!y!yv#!y$!yr%!yvx r !0"U'\)'t*m*r,n, 4b59Z=?9BYFGT \"` *[,05a9v=T>Tr?9T@pTCKDG Q _%'(+,1q 8 9 t1/ *r</=/tBH/B/rv r'(W*)+a1, 7:A>?BDE Ba" *t,  , r-m t1 # Pr(J( t12Hrh vhh r'h(h),A0d4Z =Qt?h?hr@_h@hAEt1 A%m P Br(J B( B/ 06 t7 B8e Bv)eTVm$2ThisreturnsaTypedVariablefortheframeofthecalleroftheframerepresentedbytv.ThiswillnormallybealocalFrameTypedVariable,butstrangethingshappenattherootofprocessesandwhenPORTsareused.Normally,therootlocalFrameofaprocessisaprogramTypedVariable.Morecanbesaidaboutallofthis,butthisisnottheplace.8.0ERRORsError:ERROR[reason:ErrorReason,msg:ROPE_NIL,type:Type_RTBasic.nullType,--usedwithTypeFault,IncompatibleTypesotherType:Type_RTBasic.nullType--usedwithIncompatibleTypes];ErrorReason:TYPE={noSymbols,--msghasmoduleNamenotImplemented,--mostlyDefaultInitialValuecasesincompatibleTypes,--raisedbyAssignrangeFault,--e.g.emptysubrange,ApplyboundschecknotMutable,--raisedby(e.g.)AssigninternalTV,--raisedby(e.g.)RefFromTVbadName,--raisedbyNameToIndexbadIndex,--raisedby(e.g.)IndexToTypetypeFault--generalapplicabilityviolation};9.0ExamplesTheexamplebelowcomesdirectlyfromoneofmytestprograms,andhasseveralstrangepropertiesanddependencies,noneofwhicharerelevanttoitsvaluehereasasourceofexamples.PrintTV:PROC[tv:RTTypes.TV,depth:CARDINAL_0]=BEGINOPENRTTypes;type:Type=TVType[tv];SELECTTypeClass[type]FROMunion=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteString["(aunion)Tag="];PrintTV[Tag[tv]];THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteString["Variant="];PrintTV[Variant[tv],depth+1];};definition=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteString["(adefinition)="];WriteString[TypeToName[type]];WriteLine[""];PrintTV[Coerce[tv,UnderType[type]],depth+1];};localFrame=>{pt:TV=Procedure[tv];THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;15rb)vb)b) r'b)($b)),J0B14^89BG^\T"$(-/3:! +`/13}6L:$< =@C EG[R VxTqT^TrRhRh 8PqPhPrPq P!Pr"P8OJ x,bO,O-03 :r8Mm U"$jx0Mm1Mm25.8)r/KxJ qJJrVJHs x)Hs*Hs+-0[ rFx*0F*F+/;rE!x*E!*}E!+{/g1ArCx x)RCx)Cx*-I1D7Q;<?rA x)A*QA+N/:14r@& x)@&*Z@&+X/D14r>}x*>>}*>}+/1z r<x*<*<+/q1K4 r;+x)H;+);+*/ 7rc9 7o4~.r &),.t1 3:o=]@ Do2 -* "G&',S.4u6j8<{?AC@Go17yo.rY.qW..rz..q .!.r"N.#+.q'.(\.r.2./.1Wqo-r-$-x+go qx((r0(( q((r&lw$q$w$r1$$q Z$!@$r"$#$q,y$-$r-$q.$/a$r4I$#9!$k&P!rqKrhq .!r"Z#q,M,r-q.|/5r4  "dw#%% |q|w|r1||q Z|!@|r"|#|q,y|-|r-|q.|/a|r4I|9 #%* J*.00  q  r  q 5K 5r 5h 5q . 5! 5r"Z 5# 5q,M 5, 5r- 5q.| 5/5 5r4 5v)e TVm$WriteString["(alocalframefor"];IFTypeClass[TVType[pt]]=programTHEN{WriteString["theprogramnamed"];WriteString[TVToName[pt]];WriteLine[")"];RETURN};WriteString[TVToName[pt]];WriteLine["):"];IFEnclosingBody[tv]=NILTHEN{domainType:Type=Domain[TVType[pt]];rangeType:Type=Range[TVType[pt]];IFdomainType#RTTypesBasic.nullTypeTHEN{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteLine["Arguments:"];FORi:CARDINALIN[1..NComponents[domainType]]DOTHROUGH[0..depth]DOWriteChar[Ascii.SP]ENDLOOP;WriteString[IndexToName[domainType,i]];WriteLine[":"];PrintTV[Argument[tv,i],depth+2];ENDLOOP};IFrangeType#RTTypesBasic.nullTypeTHEN{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteLine["Results:"];FORi:CARDINALIN[1..NComponents[rangeType]]DOTHROUGH[0..depth]DOWriteChar[Ascii.SP]ENDLOOP;WriteString[IndexToName[rangeType,i]];WriteLine[":"];PrintTV[Result[tv,i],depth+2];ENDLOOP};THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteLine["Locals:"];PrintTV[Locals[tv],depth+1]}ELSE{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteLine["EnclosingBody:"];PrintTV[EnclosingBody[tv],depth+1]};};globalFrame=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteString["(aglobalframefor"];WriteString[TVToName[tv]];WriteLine["):"];PrintTV[Globals[tv],depth+1];};nil=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteLine["(novalue)"];};countedZone=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteLine["(acountedZone)"];};uncountedZone=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteLine["(anuncountedZone)"];16rb!9 $u&q`x`xr`x`x#%q+Y`x,`xr^T!'Z+.?qo](rW](]([Y /qX.X.rX.X. hq"MX.#5X.$rVJ !P#5T f!qS4S4rS4rS4 qAQQrQqQr$Q$sQq*9Q+Qr,eQ-Qq6XQ6Qr7Qq8Q9?Qr>'QOqN:vN:rN:N:qN:N:#r%MN:%N:qcLILrqJJr!AJ!Jq'TJ(:Jr)J*Jq3sJ4Jr4Jq5J6[Jr;BJI?#3G "E(k*-/qIDEDErDE DEqBBrB/Bz_qA@@r@q@r$@$s@q*9@+@r,e@-@q6X@6@r7@q8@9?@r>'@?Kq=v=r==q==#r%M=%=qc;I;rq:Q:Qr!A:Q!:Qq'T:Q(::Qr):Q*:Qq3s:Q4:Qr4:Qq5:Q6[:Qr;B:Q8"2M7 "5W&.'+-qI33r3 3q22r22q!2"2r#2%H2q-2.y2r/!2q0202r520]. $&q- K- r- q- - rn- - q$- %}- r&- ($- q0- 1V- r1- q2- 3- r8- /+c/)(+-(&i $q$w$r1$$q Z$!@$r"$#$q,y$-$r-$q.$/a$r4I$#9![%R'!o / &$%t#q#w#r1##q Z#!@#r"###q,y#-#r-#q.#/a#r4I#z 8![ ) Wqwr1q Z!@r"#q,y-r-q./ar4I [ %' /  q w r1  q Z !@ r" # q,y - r- q. /a r4I  5 " '{v)eTVm$};procedure=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteString["(aprocedurenamed"];WriteString[TVToName[tv]];WriteLine[")"];THROUGH[0..depth+1]DOWriteChar[Ascii.SP]ENDLOOP;WriteString["Definedinthemodulenamed"];WriteLine[TVToName[GlobalParent[tv]]];THROUGH[0..depth+1]DOWriteChar[Ascii.SP]ENDLOOP;WriteString["ItsDomain..."];IFDomain[type]=RTTypesBasic.nullTypeTHENWriteLine["novalue"]ELSEIFTypeClass[Domain[type]]=structureTHENWriteLine["astructurevalue"]ELSEERROR;THROUGH[0..depth+1]DOWriteChar[Ascii.SP]ENDLOOP;WriteString["ItsRange..."];IFRange[type]=RTTypesBasic.nullTypeTHENWriteLine["novalue"]ELSEIFTypeClass[Range[type]]=structureTHENWriteLine["astructurevalue"]ELSEERROR;};signal=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteString["(asignalnamed"];WriteString[TVToName[tv]];WriteLine[")"];THROUGH[0..depth+1]DOWriteChar[Ascii.SP]ENDLOOP;WriteString["ItsDomain..."];IFDomain[type]=RTTypesBasic.nullTypeTHENWriteLine["novalue"]ELSEIFTypeClass[Domain[type]]=structureTHENWriteLine["astructurevalue"]ELSEERROR;THROUGH[0..depth+1]DOWriteChar[Ascii.SP]ENDLOOP;WriteLine["ItsRange..."];IFRange[type]=RTTypesBasic.nullTypeTHENWriteLine["novalue"]ELSEIFTypeClass[Range[type]]=structureTHENWriteLine["astructurevalue"]ELSEERROR;};error=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteString["(anerrornamed"];WriteString[TVToName[tv]];WriteLine[")"];THROUGH[0..depth+1]DOWriteChar[Ascii.SP]ENDLOOP;WriteString["ItsDomain..."];IFDomain[type]=RTTypesBasic.nullTypeTHENWriteLine["novalue"]ELSEIFTypeClass[Domain[type]]=structureTHENWriteLine["astructurevalue"]ELSEERROR;};structure=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteLine["(astructure)"];FORi:CARDINALIN[1..NComponents[type]]DOTHROUGH[0..depth]DOWriteChar[Ascii.SP]ENDLOOP;WriteString[IndexToName[type,i]];17r b!`x^q^w^r1^^q Z^!@^r"^#^q,y^-^r-^q.^/a^r4I^]'9#(B[~YqX-KX-rX-hX-!q#2X-$X-r%^X-&X-q/QX-/X-r0X-q1X-28X-r7 X-V "$).T&qQKQrQhQ!q#2Q$Qr%^Q&Qq/QQ/Qr0Qq1Q28Qr7 QO qN8N8rN8=N8 q.iN8/"N8r2N83uN8 ;AqLLJrLL(Z*?q/L0Lr3L5L ;AqJJJr\JqI>KI>rI>hI>!q#2I>$I>r%^I>&I>q/QI>/I>r0I>q1I>28I>r7 I>G qEErE'E q-`E.Er1 E2lE :8qDDDDJrDDDD'Q)6q.DD/DDr2DD3DD :@qBBJr\B @?Jl=q=w=r1==q Z=!@=r"=#=q,y=-=r-=q.=/a=r4I=;9!$%:P8q6K6r6h6!q#26$6r%^6&6q/Q6/6r06q16286r7 65V q33r3=3 q.i3/"3r233u3 ;Aq22Jr22(Z*?q/202r3252 ;Aq0\0\Jr\0\q.K.r.h.!q#2.$.r%^.&.q/Q./.r0.q1.28.r7 .-  q+b+br+b'+b q-`+b.+br1 +b2l+b :8q))Jr))'Q)6q.)/)r2)3) :@q((Jr\(&h$#q#w#r1##q Z#!@#r"###q,y#-#r-#q.#/a#r4I#!n!q%qtKtrtht!q#2t$tr%^t&tq/Qt/tr0tq1t28tr7 t q##r#=# q.i#/"#r2#3u# ;AqzzJrzz(Z*?q/z0zr3z5z ;AqJr\)=qwr1q Z!@r"#q,y-r-q./ar4I/ [ q K re  q  fr " q. / rq S r q q!! " r#M $ q-@ - r. q/n 0' r5  5([v)eTVm$WriteLine[":"];PrintTV[IndexToTV[tv,i],depth+2];ENDLOOP;};record=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteLine["(arecord)"];FORi:CARDINALIN[1..NComponents[type]]DOTHROUGH[0..depth]DOWriteChar[Ascii.SP]ENDLOOP;WriteString[IndexToName[type,i]];WriteLine[":"];PrintTV[IndexToTV[tv,i],depth+2];ENDLOOP;};ref=>{lc:LONGCARDINAL=TVToLC[tv];THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteString["(aref)="];IFlc=0THENWriteString["NIL"]ELSEWriteLongOctal[lc];WriteLine[""];--IFlc#0THENPrintTV[Referent[tv],depth+1];};list=>{lc:LONGCARDINAL=TVToLC[tv];THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteString["(alist)="];IFlc=0THENWriteString["NIL"]ELSEWriteLongOctal[lc];WriteLine[""];IFlc#0THENPrintTV[Referent[tv],depth+1];};pointer=>{lc:LONGCARDINAL=TVToLC[tv];THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteString["(aPOINTER)="];IFlc=0THENWriteString["NIL"]ELSEWriteLongOctal[lc];WriteLine[""];};longPointer=>{lc:LONGCARDINAL=TVToLC[tv];THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteString["(aLONGPOINTER)="];IFlc=0THENWriteString["NIL"]ELSEWriteLongOctal[lc];WriteLine[""];};character=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteString["(aCHAR)='"];WriteChar[TVToCharacter[tv]];WriteLine[""]};cardinal=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteString["(aCARDINAL)="];WriteLongOctal[TVToLC[tv]];18rb! `x#$(*q^^r^]'[~YqYwYr1YYq ZY!@Yr"Y#Yq,yY-Yr-Yq.Y/aYr4IYX- [ qVKVreVVqVVfr "V Vq.V/VrqTSTrTqTq!!T"Tr#MT$Tq-@T-Tr.Tq/nT0'Tr5TS3([Q O#$(*qN8N8rN8LJI>qI>rI>r 0I>"I> qGKGrGhGq .G!Gr"ZG#Gq,MG,Gr-Gq.|G/5Gr4GE9!qDDDDrDDDDqDDsDDreDDDDq)DD*IDDr,DD.%DDB xo@,0i2Nr?J=;q;r;r 0;"; q:PK:Pr:Ph:Pq .:P!:Pr"Z:P#:Pq,M:P,:Pr-:Pq.|:P/5:Pr4:P89!q66r66q6s6re66q)6*I6r,6.%65V q33r33q3s3re373*.w0]20\I.q.r.r 0.". q- K- r- h- q .- !- r"Z- #- q,M- ,- r-- q.|- /5- r4- +b9$&q))r))q)s)re))q))*I)r,).%)( &h$ #q#r#r 0#"# q!nK!nr!nh!nq .!n!!nr"Z!n#!nq,M!n,!nr-!nq.|!n/5!nr4!n9")f+Kqrqsreq)*Ir,.%t #izqzwzr1zzq Zz!@zr"z#zq,yz-zr-zq.z/azr4Iz9"e$J) / q w r1  q Z !@ r" # q,y - r- q. /a r4I  9%' 5v)e9TVm$WriteLine[""]};longCardinal=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteString["(aLONGCARDINAL)="];WriteLongOctal[TVToLC[tv]];WriteLine[""]};unspecified=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteString["(anUNSPECIFIED)="];WriteLongOctal[TVToLC[tv]];WriteLine[""]};type=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteLine["(ATYPE)"]};integer=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteString["(anINTEGER,writtenasoctal)="];WriteLongOctal[TVToLC[tv]];WriteLine[""]};enumerated=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteString["(anenumerationvalue)="];WriteString[TVToName[tv]];WriteLine[""]};array=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteLine["(anarray)"];FORsubscript:TV_First[Domain[type]],Next[subscript]UNTILsubscript=NILDOPrintTV[subscript,depth+1];PrintTV[Apply[tv,subscript],depth+2];ENDLOOP;};sequence=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteLine["(asequence).Length="];PrintTV[Length[tv],depth+2];--FORsubscript:TV_First[Domain[type]],Next[subscript]--UNTILTVToLC[subscript]=TVToLC[Length[tv]]DO--PrintTV[subscript,depth+1];--PrintTV[Apply[tv,subscript],depth+2];--ENDLOOP;};subrange=>PrintTV[Coerce[tv,Ground[TVType[tv]]],depth];opaque=>{THROUGH[0..depth)DOWriteChar[Ascii.SP]ENDLOOP;WriteLine["(opaque)"];};ENDCASE=>ERROR;19rb! `x^ ]%q]%w]%r1]%]%q Z]%!@]%r"]%#]%q,y]%-]%r-]%q.]%/a]%r4I]%[|9"*,YX* VT S/qS/wS/r1S/S/q ZS/!@S/r"S/#S/q,yS/-S/r-S/q.S//aS/r4IS/Q (*ON4 LJI9qI9wI9r1I9I9q ZI9!@I9r"I9#I9q,yI9-I9r-I9q.I9/aI9r4II9G ED>BqBwBr1BBq ZB!@Br"B#Bq,yB-Br-Bq.B/aBr4IB@%l*+/1}?C= ;:G  8q8w8r188q Z8!@8r"8#8q,y8-8r-8q.8/a8r4I86 &*&, 5L3 10Q.q.w.r1..q Z.!@.r".#.q,y.-.r-.q../a.r4I., "q+VK+Vre+V+Vq+Vj+Vr +V +V-q6+V7+Vr:+V;8+V@qBl+VCT+VDr)#%( &g*U,:q&[&[r&[$# i!`q!`w!`r1!`!`q Z!`!@!`r"!`#!`q,y!`-!`r-!`q.!`/a!`r4I!` [ #')#%xod   "g.o')6ao $&doi &*,orn]%3=`qwr1q Z!@r"#q,y-r-q./ar4I s q ! !r !E !qy !2 !r !v)eTVm$QEND;20qobfrbfv)eTVm$  HELVETICA GACHA  TIMESROMAN TIMESROMAN HELVETICA HELVETICA HELVETICA HELVETICALOGO TIMESROMAN TIMESROMAN TIMESROMANY OE%+@2 ;gBH Q Z:b k0r y D!j/6S RTTypes.tioga12-Oct-82 13:40:51