TheMesaProgrammingEnvironmentRichardE.Sweet1.IntroductionPeopleeverywherearedevelopingmulti-window,integratedprogrammingenvironmentsfortheirfavoritecomputersandlanguages.ThispaperdescribestheMesaprogrammingenvironment,alsoknownastheXeroxDevelopmentEnvironment(XDE).Itisinterestingforseveralreasons.Ithasexistedinsomethingsimilartoitscurrentformforabout4years.Ithasmorethan500users,manyinteractingwithit8ormorehoursaday.Severalmillionlinesofcodehavebeenwrittenbytheseusers,includinglarge,multi-authorsystems.PreviouspapershavedealtwiththeMesalanguage[2][12],theoperatingsystem[13][9]andtheprocessorarchitectureonwhichitruns[4][15].Thispaperdescribestheprogrammingenvironment:theuserillusion,thesetofprogrammingtools,andthefacilitiesavailableforaugmentingtheenvironment.2.HistoryMuchoftheearlyhistoryanddesignmotivationbehindtheMesaprojectwasreportedearlier[2].Belowisalistoflanguagefeaturesanddesigngoalsthathaveenabledordirectedourdevelopment:Mesasupportsmodularprogrammingwithstrongcompile-timetypechecking.In1977,weintroducedstrongintermoduletypecheckingbymeansofinterfaces.Proceduresarefirstclassvalues;theycanbepassedasparametersorstoredindatastructures.Wehaveacommitmenttosourceleveldebugging.Thereissufficientruntimeefficiencyandaccesstounderlyingarchitecturethatalllevelsofthesystemmaybewritteninahighlevellanguage.MesawasfirstimplementedontheAlto[17]in1976.Around1978,a"Tools"projectwasstartedtodesignasoftwaredevelopmentenvironment.ThisprojectwaslatermergedintotheMesaproject,andtheuserinterfaceportionwasnamedTajo(pronouncedTAH-hoe).ItsdesignwasinfluencedsignificantlybypreviousworkofKay[5][6]andofSwinehart[16].Severalbasicpreceptsfromthe1980TajoFunctionalSpecificationwere:Clientprogramsshallnotpreempttheuser.Theusershouldneverbeforcedintoasituationwheretheonlythinghecandoisinteractwithonlyonetool.Don'tcallus,we'llcallyou.AtoolshouldarrangeforTajotonotifyitwhentheuserwishestocommunicatesomeeventtothetool,ratherthanadoptan"asktheuserforacommandandexecuteit"model.pau n * q[ rVm Vm sS c   ( / 7y ?B E3P M _o"F($*y. 6 >AF:GN  q $&/' .0@49;,=BCL 5H!l"' (*.14T8-; BEGBHzJK !%2'*-16b8<>@?F~H D z "&,.2 4;?BDGB '  p#%)k,069 A @^  1 B5 #-&)9+o 0698L ?A r: :s7  :!r (?,/2709?=CiF5V  g Nz2#&)-2?49Q; 2 \2 g{ %((,V 47/ \/ *R Dt q// s/'*026t8//9 s- \- "+!$'m)^-/r 6x8<<`>A * \* H k"& ( \( y  %X(7,k.A 5X =?B EG% 8<-!%#" t_ !L$w'5(-:2l67X<ADDH ` Nz ) '*7.149<>BG,  6 D!,$6 ,,3l5B9l; B   %r"$+Z/<4=7=zACG  t \tt E"f$s' tt(d+8.-26j8V<?j@F&? 6GM#&), \t HyZsl!$r).0Y35]9r:>AD"H ;! $1(*+</ 03659;CDX:   , #')@+/5:<=[? BDFV  tVVc sV $&(-2\57#: ?FA S `fItSSsS #&)+ 367;#=tB rNM NMsJ   hM$*K,.1m69? E_H  #y% ,O027: BGF  $~%*,^13>47<: A7D_HD` 3 I["^'|*-=/ 3769;>A HB, \ >   < $),~-3.6!:@D'( t'('(,s}'('(z!$) 1!37{: ?AG$ E@b ! W` t!!#s!'+-35'6h;I?Yt@!!AEsIb!p  O "%' -06;uAC; It;;s;#:&C',239 :=BE  p&(,P.k28<?mCF;  +K " *+1379t>D>sCDHO `uGOOsOOq "!&(t,OO-.1ns6OO7=A>D]G  /D !&),.G48:;B;CF< xjsKm  7 :#'').48?CG# \TVm$THEMESAPROGRAMMINGENVIRONMENT3itsownruntimemanagementroutines.Thethreemostpopulartypesforincorporatingintoolsarethefollowing:Amessagesubwindowisusedforlimitedfeedbacktotheuser,suchaserrorconditions.Ittypicallyhasonlyafewlines,andasinformationscrollsoffthetopitisdiscarded.Afilesubwindowisusedbytoolsthatwanttocreatealogoftheiroperations.Theclientprogramwritestothelogwithstreamoperations.Ascharactersarewrittentothelog,theyappearonthescreenandalsogointothefile.Built-inmanagementroutinestakecareoflinebreaking,scrolling,windowsplitting,andselection.Aformsubwindowisthemajorworkhorsefortheinteractiveportionofatool'suserinterface.Thesewindowscancontainformfieldstobefilledin(witheithertextornumbers),choicestobemade(eitherbymenusorone-of-manyselectiononthescreen),andcommandbuttonstobeinvokedwiththemouse.3.2ToolstateWhenatoolhasitsfull-sizedwindowopenonthescreen,itissaidtobeinanactivestate.Toolsthatwillnotbeneededforawhilecanbeshrunktoaniconicformonthescreen;suchtinywindowtypicallyretainallwindowstate,suchasparametersthattheuserhasgiventhetool,optionsselected,ormessagespostedbytheprogram.Thethirdstatefortoolsisinactive.Whentoolsareinactive,theydisappearfromthescreenentirely.Byconvention,theyfreeupanysystemresourcesthattheyareusing.Thetooldatacontainsaclientsuppliedtransitionprocedurethatgetscalledwheneverthetoolchangesstate.System-definedsubwindowtypessuchasformsubwindowshavesystemsuppliedtransitionstrategiesthat"dotherightthing."3.3SelectionTwomousebuttonsareusedforselection.Theleftbutton,calledpoint,isusedtobegintheselection.Whenpointisdepressed,theclosestcharacterisselected(videoinverted),andtheselectiontracksthemouseuntilthebuttonisreleased.Unitslargerthanasinglecharacterareselectedbymultipleclicking.Iftheleftbuttonispressedtwiceinrapidsuccession,theselectionmodebecomesword-selection.Threeclicksgetlines,andfourclicksselectstheentiredocument.Multipleclickscyclethroughtheselectionmodes,soa5-clickisequivalenttoasingleclick.Therightmousebutton,calledadjust,isusedtoextendorcontracttheselection.Pressingadjustcausestheclosestendofthecurrentselectiontomovetothecursorposition,subjecttoselectionmodeconstraints(e.g.,totheendofthecurrentwordifinwordmode).Aswithpoint,theselectiontracksthecursorand"commits"ontheuptransition.Otherselectionschemeshavebeentriedanddiscarded.Theyincludedraw-throughselectionandseparatecharacterandwordselectbuttons.Otherindicationsofselectionweretriedaswell,includingunderlineandbox-around.sg'ug'g'sg' u!tg'g'"-sg'$$u$g'g'%sg'.#u/ g'g'/vg'IDsb)   #&w)-N2h58+ @BHEG_ ]y \]y t@]y]yVps]y.!&,h. 0b368w; CKD[D 2Lva &*,/X13$4 X \tX >sXV"E%(m*./D13M6 >@DV Nt ') 0&27C8;h>A:EGT` jU'!& .479;>_Db R+  F O \O tqOOsOW!%)|+t.gOO. sO5:;=OA DA M{  t"}M{M{"sM{&')-h/"269;OtAM{M{BxsM{FHMKG a| %z+,/14 t6KGKG7Ws [ N"z%'*S.0<146/8 9t;AAE3  ! $(Z*M- 59>JD 1Z s%w-} -}s*- vk1 %(*/v3*-*-4s6*-*-794ADA ' v''s'\ ~!')K.2 9;>.CG% KB $j(J+e,0d6A8=t?%%@DsIb%#  r/[ $ +vt-##.N3<s#6*@FF:  [A&,!  2?!%a(X /38 AG YG U&1*- 1"28;?,@D* 1  TVm$THEMESAPROGRAMMINGENVIRONMENT43.4KeyboardThekeyboardoftheDandelionisnon-encoded;thereisaregionofmemoryfromwhichaprogramcanreadthecurrentup/downstateofeachkey.Veryfewapplicationsdealwiththekeyboardatthislevel;theyuseafacilitycalledTIP(forterminalinterfacepackage).AttheheartofthispackageisacollectionofTIPtables,usereditabledescriptionsofdesiredoperationsforspecifieduseractions.Thesetablesareassociatedwithwindowsinatreestructure.Everytimeauseraction(keytransition,buttontransition,ormousemovement)occurs,theTIPsoftwaredetermineswhichwindowthatevent"isfor"andlooksuptheeventinthechainoftablesassociatedwiththatwindow.Ifitfindstheevent,itpassesthecorrespondingoperationstothatwindow'sassociatednotifyprocedure.3.5MenusAnothermeansforuserinteractionisviamenus.Ratherthanhaveasinglelargemenu,thereareseveralmenusavailableatanytime,determinedbythesubwindowthatcontainsthecursor.Systemsuppliedsubwindowtypeshavetheirownsetsofmenus,suchasatextoperationsmenuforatypescriptsubwindow.Thesetofavailablemenusisobtainedbydepressingthemiddlemousebutton.Menusarestackedinsuchawaythattheusercaneitherinvokeamenuitemfromthetopmenuorcauseanothermenutocomeontop.Fromtheprogrammer'sstandpoint,menusareeasytoconstruct.Asystemprocedureisgivenawindowhandleandanarrayofpairs.Thestringsbecomethemenuitems,andthecorrespondingprocedureiscalledwhenevertheuserselectsthatitem.Menuscanprovidemanycommandswithoutrequiringtheusertoremembertheexactcommandnames.Forfrequentlyusedoperations,itiscumbersometorememberwhichmenucontainsthedesiredcommand,bringittothefront,andselecttheitem.Onesolutiontothisproblemissymbiotesubwindows.Theyappearatthetopofotherwindowsandcontainalistofidentifiers,typicallycommandnames.Whentheuserclicksthemousebuttonononeoftheseidentifiers,thesymbiote'snotifyproceduresearchesthroughalltheitemnamesfromthecollectionofmenusontheothersubwindowsoftheirwindow.Ifitfindsamatch,itcallsthecorrespondingprocedure.4.ProgrammingToolsTheprevioussectiondescribedtheuserillusionofXDE;thissectiondescribessomeoftheMesaprogramdevelopmenttoolsthatmadeitpossibletodevelopsuchanenvironment.Themajorthrustofthissectionisthatthevarioustoolsarehighlyinterrelated;eachoneeitherproducesextrainformationforusebyothersormakesuseofsuchinformation.4.1RuntimeloaderTheruntimeloaderistechnicallynotaprogrammingtool,butratherapartofthePilotoperatingsystemkernel.Nevertheless,inordertounderstandtheotherprogrammingtools,someknowledgeoftheruntimeloaderisneeded.sg'ug'g'sg' u!tg'g'"-sg'$$u$g'g'%sg'.#u/ g'g'/vg'IDwb& b&s^  nx (+-Z.v24Y9=AB1G\  d%%M#%&),p 36:ApE,GPQ  48/  "q&O ,/2y8d9;>@DFOh  [ R !}' tOh-1s7sOhOhwK KsH> T Q!#(-_0o348;?CoEF l1 $\&b(028[:?DC f #%*.V0Q14 ;?B|C A G#%*, 3\5:Q>CbG?l k #?'&+,0379x;?AE3=8 5;9   %"'f*Z+ 248>@TCE7 juP77sJ77u T77 s7(-\0b4:-<@DG5 u& (l+f/2y21 x!k&b,K.1z39;?VE/  z !y#6 +-4~8=BEu- )d< $.&s*>-'2N36h;t="--=B s+ Bq%\(.-).n02 9?&E)` ?c$&)+q/% 68 ?C'+ j"%( .s0L469z=: EF$ NxJ!Y# , rt t s% !!$*,0Q308 >0BCF  "~#) */34 =@DH  P !9t#$T' s.[/d25V9N?6B   9>#) w Js]   f /!" +).<0458:5<?E ) t  (*.w 7<;>EG 3l TVm$vTHEMESAPROGRAMMINGENVIRONMENT5AMesaobjectprogramhas,inadditiontocode,aheaderthatspecifiesalistofinterfacesthatareimportedorexported.Theseinterfacesarethe"glue"thatholdsmodulestogetherintolargerprograms,asdescribedindetailelsewhere[12][10].Theruntimeloadermaintainsadatabaseofallinterfacesimportedandexportedbyprogramsnowloaded(eitherpartoftheoriginalbootfileorpreviouslyruntime-loaded).Loadinganewmoduleisathreestepprocess:1.Movethecodefromtheobjectfileintovirtualmemory.2.Forallinterfacesimportedbythisprogram,seeifthereissomethingalreadyloadedthatexportsthedesireditems.3.Forallinterfacesexportedbythisprogram,seeifthereissomethingalreadyloadedthatwishestoimportanyitemsexported.Notethattheloaderiscapableofmanyofthetaskstypicallyassociatedwiththelinkageeditorofamorebatchorientedsystem.Whenrun,mostprogramseithercreatewindowsforinteractionorregistercommandswiththeExecutive(orboth)andthensimplyreturn.Onceaprogramisloaded,itusuallystaysaroundforever(oruntilthenextboot,whichmaybeaweekortwoaway).Thereis,however,anunloaderthatgoesthroughthethreestepsinthereverseorder.Thusisitpossibletoloadtwohighlyinterconnectedmodules,decidethatoneisbuggy,unloadit,makerepairs,loadthenewone,andhavetheinterconnectionsnowproperlymadetothenewmodule.4.2CompilerTheMesacompilergeneratescodeforastackarchitecture[4]thatisemulatedinmicrocodeontheDandelion.Thereisnoseparateassembler;allportionsofthesystem,downtothe512bytebootstraploader,arewritteninMesa.TheunitofcompilationistheMesaMODULE.Thisistypicallyacollectionofproceduredeclarations,togetherwithglobalvariabledeclarations,andsometimesasmallamountofmainlinecode.Atthebeginningofthesourceprogram,thereisadeclarationofthoseinterfacesthatareimportedorexportedbythismodule.Asmentionedin:4.1,thecompilermustproduceaheaderontheobjectfilethatprovidesthisimport/exportinformationtotheloader.Thecodeandthebindinginformationareallthatarereallyneededforexecutionofamodule.However,additionalinformationisneededtosupportsource-leveldebugging.Thecompilerwritesoutmostofthecompile-timesymboltableforusebythedebuggerandperformancetools.Unlikesomesymboltablestructures[3],Mesasymboltablesareorganizedinsuchawaythatnoinformationusefultodebuggingisdestroyedinthecompilationprocess.Thecompileralsoprovidesasource-to-objectmappingfacilityusedbythedebuggerandvariousperformancemeasuringtools.Whataboutoptimization?Inanutshell,theMesacompilerdoesn'tdoalotofoptimizationthatrearrangestheorderofexecution;whenitdoesdestroytheabilitytodosource/objectmapping,ittriessg'ug'g'sg' u!tg'g'"-sg'$$u$g'g'%sg'.#u/ g'g'/vg'IDsb& ~tK$&*+03}9:r<t>b&b&?sb&DGt_ s_tQ__sS__ "%'l+.2A7=?C]  R"#%(.N29:`@ AD [  ""f%*H.136o;? AC YT f~$~%'*-V \V iv"$',+T^ \T^ tT^T^EsT^!{$*,V-1@29N>!BEjR* O \O tOOsO!$?*/,-129>C EMz l=J+ wE $&v(,h2 8;>@C"G@IG PD "(u* 1`37>ACBs  H  $Z%+0,127;?DF@?  i:LK"#&+/1w7at9`@?@?:s@??AE>  + "&Y')b.036: Da; Q'4 $)e,o.147b:<G:9 KYGw5 5s2w  !G#$( 0<2^5R6= >EG0B { &M(@-/b16:i<>~AD). A*   'u!**"s&**(^+,23 9;BO ( r %(g/G04^9;rAIEG&V f{#6$% ,.t2-&V&V2s&V8:;t=X&V&V=s&VBtD&V&VERs$"  tZ$"s$"53x!$"s$"!$',067Q;>%@DGo! , . #%g'   ",$c&8(+".3~5;=V>dD j  $!B&a - 58>vBEH5  t @ #%%9'-0 8= AEv   r o$'-/x24;7G:J< DCH !ao $~ %1N.t~~-s~(.379c<BmEvI    %(v,\2S7N9:=E?: Go \ #% (7-/c35C7F ?EG9 TVm$THEMESAPROGRAMMINGENVIRONMENT6toarrangethingssothatthedebuggercangivetheuserfeedbackthatthishashappened.Thisisanexampleofa"90%solution."4.3BinderTheoutputofthecompilerisanobjectfilecontainingthecodeforasinglemodule.Formanyreasons,interestingprogramsaremadeupofmorethanonemodule.Whiletheruntimeloaderiscapableoflinkingtogetherseparatelyloadedmodules,mostmediumtolargesystemsaredistributedasasingleobjectfileputtogetherbyaseparateprogramcalledtheBinder.Thisisdoneforseveralreasons:Itiseasiertokeeptrackofonefileinsteadof50.Resolvingthelinkagebetweenmodulesisatimeconsumingprocess;withaboundconfiguration,theloaderneedonlytaketimetoresolveexternallinkagerequirements.Interfacescanbeobscuredfromotherprogramsbybindingtheprogramsexportingthemintoaconfigurationthatdoesnotexportthatinterface.Thesymboltableanddebugginginformationproducedbythecompileroccupyalotofspace.TheBinderneednotcopythisintothenewobjectfile,butneedonlychangetheheaderofthenewobjectfiletopointtothefileorfilescontainingthisinformation.Theinputtothebinderisaconfigurationdescriptionthatcontainsalistofobjectfilenames,alistofinterfacestobeimportedandexported,andoptionalinformationdirectinghowtheinternalbindingsaretobedone.Experiencehasshownthatelaborateschemesforprogrammerdirectedbindingarealmostneverused.4.4DebuggerMesahasafull-functionsource-leveldebuggerthatisusedfordebuggingalllevelsofthesystem,includingtheoperatingsystemkernel.Thedebuggerusesthesymboltableandstatementmappinginformationproducedbythecompiler.Itsfeaturesincludethefollowing:Theabilitytosetbreakpoints.Tosetabreakpoint,theuserloadsthesourcefileintoawindow,selectsaplaceinthefile,andexecutesaSetBreakmenucommand.Asfeedback,thedebuggerchangestheselectiontobethefirstcharacterofthestatementwherethebreakpointisset.Theabilitytointerruptarunningprogramandfindtheexecutionstateofanyprocess.Equallyimportant,itispossibletoresumeexecutionofaprograminterruptedinthisfashion.Theabilitytowalkupthelinksofthedynamiccallchain,answeringthequestion"Whocalledwhom."Theabilitytoexamineandmodifydataintheclientprogram.SinceMesaisstronglytyped,thedebuggercanusetypeinformationtoprintoutthevaluesinamoreunderstandablefashion.Numerictypesprintasnumbers,enumeratedonesasthepropernamedvalue,andrecordsprintoutasalistoffieldnames,eachwithitsvalueprintedaccordingtotype.Theabilitytocallproceduresintheclientprogram,typecheckingtheactualargumentsagainstthetypesoftheformalparameters.sg'ug'g'sg' u!tg'g'"-sg'$$u$g'g'%sg'.#u/ g'g'/vg'IDsb)  ~"%(*-369[;CFHM_ u.W w\ \sX  ,+8#(% ,1.135 8>AJEV < $!%(+n168|=BCyHT` ?  _&W)/Z1%49<4 CBE FRR+ ~c^!'o+ft-R+R+.s1R+R+3 6$7;=@AO \O 5/!X#(u*.M5 \M5 *j &v')%,W3T8;= As K V "'@,1I H \H *tHHsH"$%,.73n5<$BoFIFP 0."% C \C DJ! )u/1w39x>?=AABGfA [\~!n#&+-0473;>jCDGP?l ?; !$ +o. <  F %> ,X//4589=@hE F?H9 ?$&,f 4 9<?tD7  tG\ 5$B'5-L256 ==BG5 a+w1 1s.T  " ")(,0-1J3:<@BEj, 5#&-+0J27;J>'D) #%*/1 'p \'p  !F#|%& .9037S9>!@CD%; R- &Zv'%;%;(~s%;. 19`;AD5# I #)+g-38:s AdB \ #5(+.1)7v:<?HE(W w9{)")'*, 1 8:z= \ Dv"g$@&,o/3H9<^BFF , \, 1#&(+.5Y9<>PCG  $&*?,/457`;4 E A" *J-/X16c;?AF 3 H1!%&*/r57` \ j !#'-06J8<CHG Q j  dTVm$iTHEMESAPROGRAMMINGENVIRONMENT7TheMesadebuggerevolvedfromtheAltoimplementationandstillusestheworldswapprinciple[8]forinsulatingthedebuggerfromtheclientcode.Asthesizeofphysicalmemoryhasgrown,thetimenecessaryforthedisktransferhasbecomeannoyinglylong;onesolutiontothisproblemisteledebugging.Theroutinesthatreadthememoryfromtheworld"swapped"onthediskcanbereplacedwithonesthattalktoothermachinesontheEthernet.Thedebugeecomputerneednotbegeographicallynearby,either;animplementorinPaloAltocandebugaprogramrunningonamachineinLondon.4.5PackagerThePilotoperatingsystemsupportsademandpagedvirtualmemory.Italsoallowstheprogrammertospecifyswapunitssothatwhenaparticularpagemustbeswappedin,aneffortismadetobringinitsentireswapunit.Whenthecompilergeneratescodeforamodule,itputsthecodeforthevariousproceduresintoacontiguoussetofpagesintheoutputfile(interspersedwithreadonlyconstants).Whentheprogramisloadedbytheruntimeloader,thesefilepagesaremappedintovirtualmemory.Thedefaultswapunitforcodeistoswaptheentiremoduleasaunit.Proceduresareoftencollectedinthesamemodulebecausetheyworkonthesameabstraction,orbecausetheysharecommonprivatedefinitionsanddata.Itisoftenthecasethatsomeoftheproceduresareusedonlyforinitialization,orthatsomeprocedureinmoduleAistightlycoupledwithanotherprocedureinmoduleB.ThePackagerisatoolthatallowstheprogrammertoassociateproceduresofacollectionofmodulesintoexplicitswapunits.ItcorrespondsverymuchtotheChineserestaurantstereotypeof"onefromcolumnA,twofromcolumnB."4.6PerformanceToolsThepackagerdiscussedaboveistheeasierhalfofanimportantproblem,thatofreducingworkingsetsize;themoredifficulthalfistodeterminewhattheswapunitsshouldbe.WehaveanumberoftoolsinXDEtoaidinansweringthisandotherinterestingquestions.Indeed,theprincipalconclusionofKnuth'sFORTRANstudy[7]wasthatprogrammersshouldhaveandusemoredataabouttheruntimeperformanceoftheirprograms.Thesetofperformancetoolsincludesthefollowing:Spyaprogramthatwakesupperiodically(atinterruptlevel)andrecordstheexecutioncontextofagivenprocess(orsetofprocesses).[11]PerfPackageatoolthatallowstheprogrammertodefineasetofnodesinarunningprogram,usingthestandardmachineryforsettingbreakpoints.Asetoflegs,definedbypairsofnodescanalsobedefined.ThePerfPackagereplacesthebreakpointhandlerwithonethatcountsthenumberoftimesthateachnodeisvisited,aswellastheaveragetimespentoneachofthelegs.Transfercountingtoolsseveraltoolstonoteallinterestingcontroltransfers(procedurecallsandreturns),andpresentvariousstatisticsaboutthem.Pagefaultanalysistoolstoolstorecordandpresentdataaboutpagefaultbehavior.Thesetoolsusethesource-leveldebugginginformationproducedbythecompilertopresenttheirresultssg'ug'g'sg' u!tg'g'"-sg'$$u$g'g'%sg'.#u/ g'g'/vg'IDsb!   |"&& 0258t;.b!b!<>sb!BdHC_  A  {!%)+.]128&=@DG] [.y$t +i.1r68-:@tAn]]A sIb][  AI!6$'+2/4E69NCGYO  i &R).47:d!X#()<.4672<>dwS> S>sO  !"8'|+/6 7x:;>`@ HM  v:  & )h,.4i6p8b<-=A[C FHcK ZH7 :!?#$*r+/157r9> FIF  D"$ ,/5z <@CAHC vq!#'Q).16"K G |#&,1_48^:=6@ Hz< % 'e*-/0s36;9;?J@C7 9  sq #'_./v49s968%<AE37 3v67s7)tj77Rs7#k$&(+/2; : ;Az H5y > ]!%b)+g 3!6H:8;>wC 3E B #&+w/i /i s,  @t!,,"Ds,%(_*",28l;D=BH!) r0[%~(+-.16o9.;>@E:F'  o6i"&9 - 4,9E;A H%} Ru9%}%}s%}Z": */?25`7;>BE#H j!B#_% -0m581 \ } (@*I036l;7=CH o $P \ !$\ ,b.3236t78s;=>DW ii %"d& /"02t44s67<>ACG |_  "'*% 169;>rBE v "$^'L(+Y0Y3~7(9/<`>@x \ Q !%C'*-,. 27=Z DgG B $(U \U J_ "&).g1l5N8;  * Q$ ,p2}4g6<\=BE ATVm$THEMESAPROGRAMMINGENVIRONMENT8inthemostusableformat.TheSpyisaninterestingexample.Onecanfirstseeinwhichmodulesaprogramisspendingitstime.Thenforasetofmodules,onecangetstatisticsaboutthemosttime-consumingprocedures.Finally,statisticscanbecollectedatthestatementlevel.SincetheSpyworksonasamplingprinciple,itissometimesusefultoswitchtothePerfPackagetoobtainexactstatisticsatthestatementlevel.4.7ConsistentCompilationToolsIfproceduresinprogrammodulesXandYbothreferencearecordtypefrominterfaceA,thenXandYneedtoberecompiledwheneverAis.Thisleadstocompilationdependenciesdeterminedbytheincluderelationshipsofacollectionofprograms.AtoolcalledtheIncludeCheckercanbepointedatthecurrentversionofaprogramandtoldtocreatethesequenceofCompilerandBindercommandlinesnecessarytomakeanewone.ItissimilartotheUNIXTMprogramMake[1],butdiffersinatleasttwoways:itonlycaresaboutcompilationandbindingdependencies,anditdeterminesthesedependenciesautomaticallyfrominformationintheobjectfile.Othertoolshavebeenbuilttoapproachthisproblem,withvaryingdegreesofsuccess.5.OtherusefultoolsThetoolsdescribedin:4arearepresentativesampleofthosethatareheavilyintegratedwiththeMesalanguage.Thereareanumberofothertoolsthatrunintheenvironmentthatarevaluableforprogramdevelopment,butarenotaslanguagespecific.Asamplecollectionofthesetoolsfollows:ProgramLibrariantoeliminateconflictsfrommultipleimplementorsofasystem.DFsoftware,likeSchmidt'swork[14]butwithlibrarianextensions.Adobeasystemfortrackingactionrequests.built-ins:FileTool,abbreviationexpansion,etc.ChatforTTYaccesstoothersystems.Mailreadingprograms.Tooldrivertobatchoperationsonwindowinterfaces.6.Usersupplied"Hacks"Thereisadefinitepositivefeedbackeffectfromhavingthedevelopersofasystemrelyonitfortheirday-to-dayexistence,particularlyinasystemasopenandextensibleasXDE.Intheearlydays,therewasanaturaltendencytosharesmallprogramsthatenhancedprogrammerproductivity.Such"neathacks"oftenwereincludedinthenextofficialreleaseofthesystem.Thesymbiotepackagedescribedin:3.5startedlifethisway.Theproducersandusersofthisancillarysoftwarewereeventuallynolongerhousedinthesamecornerofasinglebuilding,butwerespreadacrossthecontinent.Inthissituation,adegreeoforderwascalledsg'ug'g'sg' u!tg'g'"-sg'$$u$g'g'%sg'.#u/ g'g'/vg'IDsb)  %T:" #% ,I258c;I=?fCI_ v#`%'_)+147:X @D6F]  8"\ '*,2`46<A2EG{[ 2m 1 "\)J-/{358a @XB;FYW `XwU{ U{ ~ !>sR+  Fv fR+sR+!v$R+sR+&)W/[047;evAR+sR+BBvFR+sR+GvO sO  ]v!OsO#X%)0,t.OO/G 6" sO>J EGM   !M#*)+.2t5MM5 sM>ACHK  yaGf "%'+.I4P6'F6 #\&)j+-/ 7:= BzD4f Y|"B().< 4q6*9=1 \1 W !'`*0A 8:;/o \/o H"%9'*0c , \, ? D$]*x \*x } " (' \' 4K % \% # \# \ " $)< r s3  !%)-0 689>mA:CLDF   o!&"Y&(,. 5E6;}=V?C.F  :")+2A :; BF ~p 8#O',~.>068>Da x asa DN  *T$,), 3~5~9>u@BwE  f!u%t' .0]2 89>V@CFFTVm$ THEMESAPROGRAMMINGENVIRONMENT9for.ThedirectoryononeofthefileserverswaschangedfromaprivateMesagroupdirectoryintoapublicone,andasetofruleswasestablishedtogoverntheuseofthisdirectory.Atlastcounttherewereover200programsstoredonthedirectory.Theprogramscanberoughlydividedintofourcategories:Modifiedversionsofofficialtools,withaddedfunctionality.Thesenewfeaturesareoftenincorporatedintotheofficialversionsatthenextrelease.Extensionstotheenvironment.Theseincludeaddingnewkeyboardcommands(madeeasierbytheTIPmechanism),changingtheappearanceoftinywindows,andchangingthesemanticsofscrollbars.Generallyusefultools.Forexample,thereisacalendarprogram,severalgraphicseditors,aspreadsheet,atoolforbrowsingfilesonremotedirectories,etc.Perhapsthemostusefulisaformsubwindoweditorfordesigninguserinterfacesofothertools.Funandgames.Thisincludesaprogramtoplaymusiconthetonegeneratorofthekeyboard,severalarcade-likegames,andMazeWar,amulti-playerseek-and-destroygameplayedoverthenetwork.7.ConclusionsThissectiondiscussesthemajorsuccessesandtheareaswherewefellshortofourgoalsanddesires.GoodpointsConsistentuserinterface(byseduction,notfiat)Balanceofnovice/expertusability(accelerators&2Dvs.1D)Sourceleveldebugging"personaltimesharing"(filesystemsophisticationnecessary)homogeneousenvironment(selectionbetweentools)Adequateperformance(cyclesofaddfeatures/tuneperformance)Extensibility(TIP,proceduralinterfacetotools)BadpointsThinkingsmall,tryingtosqueezetoomuchintolimitedresourcesLimitedabilitytoincorporatecodefromoutside(littleexistedwhenwestarted)NeededSameworlddebuggerOtherlanguagecapabilitiesReferences[1]Feldman,S.I.,MakeAProgramforMaintainingComputerPrograms,SoftwarePractices&sg'ug'g'sg' u!tg'g'"-sg'$$u$g'g'%sg'.#u/ g'g'/vg'IDsb)  vb)b)<sb)YS "$'M+.p37-8J<@vDl_  Uc$X~A!$] +n-&14*68l; ACFg] !#v&2]]&s], 25;>>@1EH[   Y \Y ) %(- 6;>dCFV $&(+Ta \Ta  "&/+'/28?DIHBR, N@ u!$ +w-a0_69?BHO M} \M} cx i&*O,-o399e><CIKH s!$&+, 215=:s<@-DDEFI ;!d$] *,@/F \F !"(*Q-p1369U?AbCDd } ]!C()m 1j<?DGB0 r< < s9] y$'c)-@1X359g; =A(C6 3 \3 vp & (1 \1  W" *,Vt.11/Es/110. \. O,! \,!  #t , ) \) q  $* '* \'*   s",$ -b $ \$ > $%'x!`   \ V"w$(+0Bj \j - %#k&+/F379  \ }i$ \$ { r s U  Un $'i /d6+t< U U=BHTVm$ THEMESAPROGRAMMINGENVIRONMENT10Experience94(April1979)255-265[2]Geschke,C.M.,Morris,J.H.,andSatterthwaite,E.H.,EarlyexperiencewithMesa,CommunicationsoftheACM208(August1977)540-553.[3]Graham,S.L.,Joy,W.N.,andRoubine,O.,HashedSymbolTablesforLanguageswithExplicitScopeControl,ProceedingsoftheSymbosiumonCompilerConstruction,SIGPLANNotices148(August1979)50-57.[4]Johnsson,R.K.andWick,J.D.,AnOverviewoftheMesaProcessorArchitecture,ProceedingsoftheSymbosiumonArchitecturalSupportforProgrammingLanguagesandOperatingSystems,SIGPLANNotices174(March1982)20-29.[5]Kay,A.C.,TheReactiveEngine(thesis),UniversityofUtah,DepartmentofComputerScience,SaltLakeCity(August1969).[6]Kay,A.C.andtheLearningResearchGroup,PersonalDynamicMedia,XeroxPaloAltoResearchCenterReportSSL-76-1(1976).[7]Knuth,D.E.,AnEmpiricalStudyofFORTRANPrograms,SoftwarePracticeandExperience1(1971)105-133.[8]Lampson,B.W.andSproull,R.F.,AnOpenOperatingSystemforaSingle-UserMachine,SeventhSymposiumonOperatingSystemsPrinciples,OperatingSystemsReview135(December1979)98-105.[9]Lampson,B.W.andRedell,D.D.,ExperiencewithProcessesandMonitorsinMesa,CommunicationsoftheACM232(February1980)105-117.[10]Lauer,H.C.,Satterthwaite,E.H.,TheImpactofMesaonSystemDesign,ProceedingoftheFourthInternationalConferenceonSoftwareEngineering,Munich(September1979)174-182[11]McDaniel,G.,TheMesaSpy:AnInteractiveToolforPerformanceDebugging,PerformanceEvaluationReview114(Winter1982-83)68-76.[12]Mitchell,J.G.,MayburyW.,andSweet,R.E.,MesaLanguageManual,XeroxPaloAltoResearchCenterReportCSL-79-3(April1979).[13]Redell,D.D.,Dalal,Y.K.,Horsley,T.R.,Lauer,H.C.,Lynch,W.C.,McJones,P.R.,Murray,H.G.,Purcell,S.C.,Pilot:AnOperatingSystemforaPersonalComputer,CommunicationsoftheACM232(February1980)81-92.[14]Schmidt,E.E.,ControllingLargeSoftwareDevelopmentinaDistributedEnvironment,XeroxPaloAltoResearchCenterReportCSL-82-7(December1982).[15]Sweet,R.E.andSandman,J.G.,EmpiricalAnalysisoftheMesaInstructionSet,ProceedingsoftheSymbosiumonArchitecturalSupportforProgrammingLanguagesandOperatingSystems,SigPLANNotices174(March1982)158-166.[16]Swinehart,D.C.,Copilot:AMultipleProcessApproachtoInteractiveProgrammingSystems,StanfordArtificialIntelligenceLaboratoryMemoAIM-230(July1974).[17]Thacker,C.P.,Alto:apersonalcomputer,inComputerStructures:ReadingsandExamples,SecondEdition,Sieworek,Bell,andNewellEds.,McGraw-Hill(1981).sg'ug'g'}sg'u!g'g'!sg'#u$g'g'%fsg'-u.g'g'/vg'H~tb!n wb!nsb!_ _n8LP |# +.2p 9#<t?__@ ]qn]w]q1s]qK"AZ Zn7 y"3(4*/48;8B E(XntXX !A#*,2 ;<B0wXGsXI VndT Tn- "%+<,/C28 tA,TTB HQn #F(++ 3;>DOnSw(OOsO B"!%M- M-ntM-M-lsM-#"(K / 04 <>ODJn0H} H}n~D4%t*H}H}+y05s:9H}H};B>IAODVFInC CnG[ `$r&Du',CC(sC,t3RCC4.?3A wCI sAn? ?n  v!$ &b(,38;< D5t<n#n( . .nv3 "%7 ,J/2U : tBU..C< ,n Cw,,s,"'** **n- ?"',(t+****,[.4s9m****:7>GANDV'n!%z %zn-)~r%C')G-/16r8:@BD#En]7\!U',q./5@t<#E#E= F[G!nw!Bs!'[ Vteb #p) 1 23 : sCG$ano &- L1 !#*6/1f37o >ktA#B Hn #F(++ 3;>D}nw}}Ts}!%[ n tEC!'`,24 ; Dsn  !C (_,26(Q Qn+<!(t)QQ*/ 6sQEi n)$' 0 $TVm$zMATH TIMESROMAN HELVETICA TIMESROMAN TIMESROMAN TIMESROMAN TIMESROMANY HELVETICAY HELVETICA  l & 0 : D MT ^j/a _w][]<>MesaSummary.tioga%Monday, December 3, 1984 12:17 pm PST