surroundinginheritanceandsubtypingandthedecisiontoexplicitlyseparatethemin Sather.
|
|
|
- Aleesha Wood
- 10 years ago
- Views:
Transcription
1 TheTypeandClassSystemof EngineeringaProgramming ClemensSzyperskyStephenOmohundroy Language: StephanMurerz November1993 Sather TR ofmanycriteria.itattemptstosupportapowerfulobject-orientedparadigmwithout sacricingeitherthecomputationalperformanceoftraditionalprocedurallanguagesor supportforsafetyandcorrectnesschecking.muchoftheengineeringeortwentintothe designoftheclassandtypesystem.thispaperdescribessomeofthesedesigndecisions andrelatesthemtoapproachestakeninotherlanguages.weparticularlyfocusonissues Sather1.0isaprogramminglanguagewhosedesignhasresultedfromtheinterplay Abstract surroundinginheritanceandsubtypingandthedecisiontoexplicitlyseparatethemin Sather.
2 ii
3 andhighcomputationaleciency. 1Introduction Satherisanobject-orientedlanguagedevelopedattheInternationalComputerScienceInstitute[22].It complex,performance-criticalapplications.suchapplicationsareinneedofbothreusablecomponents manceoftheeielimplementationsavailablein1990.eielintroducedanumberofimportantideas erfulobject-orientedparadigmwithoutsacricingeitherthecomputationalperformanceoftraditional typing,multiplesubtyping,multiplecodeinheritance,andgarbagecollection.itisespeciallyaimedat hasacleanandsimplesyntax,parameterizedclasses,object-orienteddispatch,statically-checkablestrong butalsomadecertaindesigndecisionswhichcompromisedeciency.satherattemptstosupportapow- procedurallanguagesorsupportforsafetyandcorrectnesschecking. madeavailablebyanonymousftp1inmay,1991anditwasquicklyretrievedbyseveralhundredsites. Thisversionachievedourdesiredeciencygoals[15]andwasusedforseveralprojects.Ourexperience withitandfeedbackfromotherusershasledtothedesignofsather1.0.thisimprovescertainaspects SatherwasinitiallybasedonEielandwasdevelopedtocorrectthepoorcomputationalperfor- oftheinitialversionandincorporatesanumberofnewlanguageconstructs. librariesandapplications.aparticularlydemandingapplicationistheextensibleicsiconnectionist networksimulator:icsim[24].theexamplesinthispaperaretakenfromtheactualcodeandstructure ofthesatherlibrariesandapplicationstomakethemrealistic.thedesigneortwascontinuallya Theinitial\0.1"releaseofthecompiler,debugger,classlibrary,anddevelopmentenvironmentwere balancebetweentheneedsofapplicationsandconstraintsonlanguagedesign,suchassimplicityand orthogonality. Thelanguagedesignprocesshasbeenintimatelycoupledwiththedesignandimplementationof Thispaperdescribesanumberoftheseissues.Wedonotdescribethewholelanguageherebutdo becomeincorrect. includetherelevantpartsofthegrammarinappendixa.thebulkofthepaperisdevotedtothe manylegalprogramsarerejected.addingnewclassestoasystemcancausepreviouslycorrectcodeto Thisisaconservativesystem-wideglobalcheck.Asystemwhichsatisesthecheckwillbetypesafebut Eielhasthesameproblem[5],andattemptstosolveitbyintroducingsystem-leveltype-checking[17]. thelanguagewerestronglytyped,butitwasnotpossibletostaticallycheckasystemfortypecorrectness. Sather1.0solvedthisandotherproblemsbycompletelyredesigningthetypeandclasssystem. OneofthemostfundamentalaspectsoftheSather1.0designisitstypesystem.Earlierversionsof object-orienteddispatch.italsodescribesthethreekindsofsatherobjects:referenceobjects,value functionswithinanobject-orientedcontext.section3describessomeofthesubtleissuesinvolvedin interplaybetweensubtypingandsubclassing.section2denestheseconceptsandmotivatesthedecision objects,andboundobjects.boundobjectsareaparticularlycleanwayofimplementinghigher-order codeinheritance.finally,section4describessomemoresystemlevelissues. 2SatherTypesandClasses toexplicitlyseparatetheminthelanguage.itdescribesthesatherversionofparameterizedclassesand Object-orientedterminologyisusedinavarietyofwaysintheprogramminglanguageliterature.Afew informaldenitionswillsuceforthepurposesofthispaper: ObjectsarethebuildingblocksofallSatherdatastructures.Objectsbothencapsulatestateand 2Thereissomeadditionalinformationinsignatureswhichareassociatedwithiterswhichwedonotdescribehere. 1Fromftp.icsi.berkeley.edu,directorypub/sather/ Atyperepresentsasetofobjects. Thesignatureofanoperationthatmaybeperformedonanobjectconsistsofitsname,apossibly supportaspeciedsetofoperations. emptytupleofitsargumenttypes,andanoptionalreturntype.sathersupportsbothroutines whichperformasingleoperationanditers[20]whichencapsulateiterationabstractions2. 1
4 Eachtypehasaninterfacewhichconsistsofthesignaturesoftheoperationsthatmaybeapplied TheSathertypegraphisadirectedacyclicgraphwhoseverticesaretypesandwhoseedgesdene Classesaretextualunitsthatdenetheinterfaceandimplementationoftypes. thesubtyperelationshipbetweenthem.wesaythatatypeaconformstoatypebifthereisa toobjectsofthetype.sathersupportsoverloadingwhichmeansthataninterfacemayhavemore directedpathfromatobinthetypegraph. presenceofareturntype. thanoneoperationwiththesamenameiftheydierinthenumberortypesofargumentsorinthe EveryobjectandeveryvariableinSatherhasauniquelyspeciedtype.ThefundamentalSathertyping 2.1SubtypingandMultipleSubtyping denedbyabstractclassesanddonotdirectlycorrespondtoobjects. ruleis:\avariablecanholdanobjectonlyiftheobject'stypeconformstothevariable'sdeclaredtype.". whichrepresentsetsofobjecttypesandarehowsatherdescribespolymorphism.abstracttypesare objectsitcanhold.wesaythatitisstaticallytype-safebecauseitisimpossibleforaprogramwhich compilestoassignanobjectofanincorrecttypetoavariable.thesathertypecorrectnesscheckingis canbedeclaredbyoneofthesetypes,butmayalsobedeclaredbyanabstracttype.thesearetypes signaturesintheinterfaceofthetypetowhichthecallisapplied.statically-checkedstrongtypingis purelylocalanddoesnotrequireasystem-wideanalysis.itisdonebycheckingcallsagainstthedeclared WesaythatSatherisstronglytypedbecauseeachvariablehasatypewhichspeciesexactlywhich Therearethreekindsofobjecttype:reference,value,andbound.Wedescribetheselater.Variables meansthatforeachsignatureinb'sinterfacethereisaconformingsignatureina'sinterface. typeaconformstothetypeb,thentheinterfaceofaisrequiredtoconformtotheinterfaceofb.this fundamentaltoachievingboththeperformanceandthesafetygoalsofsather. Typesafetyisensuredbecauseofaconformancerequirementontheinterfacesoftypes[3].Ifthe variable,thenitwillbetypecorrectwhenmadeonallpossibleobjectsthatmaybeheldbythatvariable. thisistypesafe3.allotherargumentsarecontravariantlytypedandthereturnvalueiscovariantlytyped. Together,theseconformancerequirementsensurethatifacallistypecorrectonthedeclaredtypeofa denedbytheclassthatimplementstheoperation. theroutine.withintheroutine,itisreferredtoasself.thetypeofself,denotedassame,isthetype ingtothetypeoftheobjectthecallismadeon.thisobjectmaybethoughtofastherstargumentof Satherallowsformultiplesubtyping:Atypecanbesubtypeofmorethanonetype.Thisisvery Underthesubtyperelation,theselfparameteriscovariantlytyped.Becauseofthedispatching, Object-orienteddispatchmeansthattheparticularimplementationforaroutinecallismadeaccord- oftenwantedtointroducemanyincrementallydierenttypes.ontheotherhand,hugetypehierarchies hierarchy,intermediateclassescanbeintroducedonlywhenneeded. anexistingclass.usingthisfacility,itispossibletointerposeanewtypebetweentwoexistingtypesina withmanysimilarclassesarehardtounderstandanduse.withtheabilitytoinsertnewtypesintoa hierarchy.thissolvesanolddilemmaofclasshierarchydesign.ontheonehand,forfutureexibilityone importantforusingsoftwaretypestomodeltypesintheworld.real-worldtypesareoftensubtypesof spurioussubtyperelationswhichcandestroytheconceptualintegrityofadesign. morethanonetype.inasystemwhichonlysupportssinglesubtyping,oneisoftenforcedtointroduce 2.2CodeInheritance,SubclassingandMultipleSubclassing AnewfeatureintroducedbySatheristhepossibilityforanewclasstodeclareitselfasasupertypeof Althoughoftenconfusedorcombinedwithsubtyping,anentirelydierentaspectofobject-oriented programmingiscodereusebymeansofcodeinheritance,alsocalledsubclassing.aclassaiscalleda sensediersfromtheuseoftraditionallibraryroutinesintwoimportantways.first,theinheritedcode subclassofaclassbifa'simplementationisbasedinpartonb'simplementation.codereuseinthis disadvantagesofmulti-methodsarediscussedinsection ThelanguageCecil[4]usesmulti-methodstoallowmultiplecovariantlytypedparametersinatype-safeway.Some
5 hasdirectaccesstotheinternalrepresentationofthereusingclass.second,theinheritedcodemaymake callsonself.suchcallsmaycallotherinheritedoperationsoroperationsexplicitlydenedinthenew class.thisintricatetanglingofnewandoldcodeispowerfulbutcomplexity-prone[16]. Aswithsubtyping,Satherallowsmultiplesubclassing:Aclasscanbesubclassofmultipleclasses,i.e. itcanreuseportionsoftheimplementationsofmultipleclasses.multiplesubclassingintroducesmany complicationsthatrequirecarefulattention.mostlanguagescombinemultiplesubtypingwithmultiple subclassingintomultipleinheritance.thecomplexityintroducedbymultiplesubclassinghasgivenrise towidespreadambivalentfeelingsaboutmultipleinheritance.aparticularlytrickysituationariseswhen thesamecodeisinheritedbyaclassalongmultiplepaths.theresultingconictsandsather'sconict resolutionmechanismsaredescribedbelowinsection3. Onecouldimagineintroducingaconstructforcodeinheritancewhichisanalogoustothesupertyping constructdescribedabove(cf.section2.1).thiswouldbeaformof\codeinjection"inwhichclasses couldaddimplementationtootherclasses.thispossibilitywasrejectedinthesatherdesignbecause itgivesrisetomanyambiguitiesanderrorswhichwouldbehardtond.onewouldnolongerbeable todeterminethesourcecodeofaclassbymerelylookingattheclasstextandthoseclassesreachable fromreferencesinit.whenusingclassesfromanothersystem,itwouldnotbeclearwhichsource lescontributedcodetothedesiredclasses.also,becauseoftheseparationbetweensubclassingfrom subtyping,codecanbeinheritedintheoppositedirectionfromsubtypingifdesired. 2.3SeparatingSubtypingandSubclassing Traditionally,object-orientedlanguagesareeitheruntyped{e.g.Smalltalk[10]orSelf[27]{ortightly bindclassesandtypes{e.g.c++[8],eiel[17]modula-3[21],oroberon-2[19].(incontrasttooberon-2, Oberon[23]keepsthedispatchingofimplementationvariantsseparatefromsubtypingissues,essentially bynotprovidingmethodsatall.instead,oberonreliesentirelyonprocedurevariablestoimplement latebinding.nevertheless,oberonstilldoesnotcompletelyseparatesubtypingfromsubclassing,cf.section2.6.) Thedecisiontohavestatictypesafetycausedustorejecttheuntypedvariants.Giventhatthere willbetypes,onemustdecidehowtightabindingthereshouldbebetweensubtypingandsubclassing. Thetypedobject-orientedlanguagesmentionedabovebindthesenotionscloselytogether.Notseparating theseconceptsproperlyleadstoseveralproblems,however. Oneapproachrequiresthateverysubclassrelationshipobeystherulesoftype-safesubtyping.This leadstocontravarianttypingofroutinearguments.ithasbeenarguedthatthiseliminatesseveral importantopportunitiesforcodereuse[18,14]. Anotherapproachintroducessubclasseswhicharesubtypesbydeclarationbutnotintermsofthe interfacewhichissupported.thisapproachisadoptedasacompromiseinmanylanguages,including theoriginalversionofsatherandeiel[17].thisviolatestherequirementoflocaltypecheckability.in theoriginaleieldesignthiswasasafetyloop-hole[5].thelatestversionofeielrequires\system-level typechecking",whichgivesuponlocaltypecheckabilityandsometimesrejectsdynamicallytype-safe programs. Becauseoftheseproblems,[6]suggestedthatsubtypingshouldbeclearlyseparatedfromsubclassing. Emerald[11]isoneofthefewlanguagesthatactuallyimplementedthisseparation.InEmerald,however, theresultisasignicantburdenontheprogrammer.often,subtypingandsubclassingdogoalongin parallel,andemeraldrequiresseparatespecicationevenforthiscommoncase. Laterlanguagedesigns,suchasSather1.0andCecil[4],attempttoprovidemoreconvenientways tosupportthecommoncase.sincececilisbasedonprototypeobjects,quitesimilartoself,itscode inheritanceisnotbasedonclasses.still,cecil'scounterparttosubclassinghasthedefaultbehaviorof alsointroducingasubtype.thisbehaviorcanbeexplicitlyprevented,however,anditisevenpossibleto havecodeinheritanceandsubtypinggoinoppositedirections.satherfollowsasimilarpathofoptimizing thecommoncase.however,insteadofintroducingdefaults,satherintroducesspecialkindsofclasses andanexplicitmeanstoimplementsubclassingandsubtypinggraphsovertheseclasses. 3
6 Asdescribedabove,Satherdistinguishesbetweenabstractandconcretetypes(thenamesofabstracttypes aredistinguishedbyaleading\$"tohelpdistinguishthem).abstractclassescanhavedescendantsin thetypegraph,butcannotbeinstantiatedasobjects.concreteclassesarealwaysleaf-nodesinthe subtypegraph,butcanbeinstantiated.thisapproachissimilartothetypesystemformallydenedin [7].Abstractclassesmayprovidepartialimplementationstobeinheritedbysubclasses,whileconcrete 2.4SatherTypes,Classes,andVariables ofexactlythattypecanbeheldbyit.asaresult,allcallsonsuchvariablesaremonomorphisms,i.e. theactualimplementationinvokedisstaticallydetermined.thisisanimportantsourceofeciencyfor Satherprograms.Ifavariableisdeclaredbyanabstracttype,thenitcanholdobjectsbelongingtoany ofthesubtypesofthedeclaredtype.callsmadeonsuch\abstractvariables"arepolymorphisms.this meansthattheactualimplementationinvokedisdeterminedatrun-timeaccordingtothetypeofthe objectboundtothevariableatthetimeofthecall. classesarerequiredtofullyimplementtheirtype.sathercodeinheritanceisexplainedinsection3. AllSathervariablesarestaticallytyped.Ifavariableisdeclaredasaconcretetype,thenonlyobjects Multiplesubtypingisimportantinsituationswherethereisnotanobvioushierarchyofobjectproperties. IntheSatherlibrarysomecontainerclassesareinternallybasedonhashtables,othersarenot.Not 2.5ExamplesofSeparateSubtypingandSubclassing everyobjectdenesacorrespondinghashfunction,however.wemakeobjectswhichdoprovideahash functionbedescendantsoftheabstractclass$hashablewhoseinterfacedenesthesingleroutine\hash": serveforsubtypingpurposes.theimplementationoftherequiredfeaturesislefttothedescendants. inaparameterized,hashtable-basedsetclass(cf.section2.8.infigure1,aswellasintheother Figure1showsatypicalinheritancegraphfordeninganelementclasstobeusedasatypeparameter abstractclass$hashableis thatworksforalltypes.abstractclasseswithoutimplementationinformation,suchas$hashable,only endhash:int; Notethat$HASHABLEdoesn'tprovideanimplementationofhash,becausethereisnogenerichashfunction namessetinaplaintypefacedenoteabstracttypesandthoseinaboldtypefacedenoteconcretetypes. inheritancegraphs,solidanddashedarcsareusedtorepresentsubtypeandsubclassrelationships.class usesthisstyletolettheusercongurethepropertiesofneuronsites.sitesaresubsetsofaneuron's therearesituationswhereapplicationprogrammersprefertousemultiplesubclassing.itisusedin MultiplesubclassingismuchlesscommoninSatherprogramsthanmultiplesubtyping.Nevertheless, connectionswithidenticalproperties.siteshaveconnection-orientedpropertiesrepresentedby$port descendantsandcomputation-orientedpropertiesrepresentedby$computationdescendants.$siteisa themixinprogrammingstyleusedextensivelyinclos[2].icsim,theicsineuralnetworksimulator, Figure1:Typicalinheritancegraphfor$HASHABLE subtypeofboth$portand$computation. alsosubtypesof$anyicsim.theserelationshipsareshownintheinheritancegraphinfigure2.itis classesthatprovidebuildingblocksforconnectionandcomputationcode.alltypesusedinicsimare Typically,ICSIMusersdonotprogramtheirownsites,butinsteadchoosethemfrombuilt-in 4 $HASHABLE $MY_ELEMENT $SET{T} (cf.section2.3).my_hashable_element HASH_SET{MY_HASHABLE_ELEMENT}
7 interestingtonotethatthemysiteclassusesmultiplesubclassingbutsinglesubtyping(theoppositeof theusualcase). languages.inparticular,routinesdierfrompascal-likeproceduresbyhavinganadditionalimplicit parameterboundtotheobjectthattheroutineiscalledon. eldsinpascal-likelanguages.routinesaretheequivalentof\methods"insomeotherobject-oriented 2.6FeaturesofaClass ThefeaturesofaSatherclassareeitherattributes,routines,oriters4.Attributesaretheanalogofrecord Figure2:MultipleSubclassingforProgrammingbyConguration \x.a"inclientsoftheclass. oftypeandstructuredenitioninpascal-likelanguages,includingoberon.itisusedinsomeearlier elds.thepricetopayfordoingsoisthelossoftheintuitiveandlightweightattributeaccessnotation mayjustprovideaccessorandmodierroutines.thisisadeparturefromthetraditionalcoincidence bynotintroducingpublicattributes,as,forexample,canbedoneinoberonbynotexportingrecord object-orientedlanguages,however,suchasself.onemightarguethatthesameeectcanbeachieved interfaceofatype.oneconcretedescendantofanabstractclassmaydeneanattributewhileanother Attributesmaybedeclaredtobesharedamongallinstancesofatype.Suchsharedattributes Whetheraparticularoperationisimplementedasanattributeorasaroutineisnotvisiblefromthe servethefunctionofglobalvariables(andtheratherdiculttouse\oncefunctions"ofeiel).shared maybedeclaredconstant,inwhichcasethebindingestablishedbytheinitializerispermanent. attributesmayspecifyaninitializationexpressionthatisevaluableatcompile-time.similarattributes Variablesdeclaredbyanabstracttypecanholdobjectsofanydescendanttype.Routinecallsmade fromwithincodeexternaltotheclass. 2.7Object-OrientedDispatch onsuchvariablesdispatchontheruntimetypeoftheobjecttodeterminethecodetoexecute.this accessthem,andonlyrelativetoself.forattributes,itispossibletodeclaretheaccessorandmodier routinesindividuallyasprivateorpublic.thisallowsattributestoberead-write,read-only,orinvisible ThefeaturesofaSatherclassmaybedeclaredprivate,allowingonlytheroutineswithintheclassto responsiblefortheencapsulationoffunctionalityintotypes.theinterfaceofatypeencapsulatesthe oraconcretetype,theprogrammermaydecidetopaythepriceforroutinedispatchortorestrictthe intoclassesaccordingtothetypeof\self".thisprovidesanaturalorganizationprincipleandis lookupaddsasmallamountofextraoverheadtosuchcalls.bydeclaringavariablewithanabstract doesnotadoptthisapproachforbothsemanticandperformancereasons.insatherroutinesaregrouped generalityofthecodebypreciselyspecifyingtheobjecttypethatthevariablecanhold. 4Wedonotdescribeitersherebecauseitwouldtakeustoofaraeldandtheyhavebeendescribedelsewhere[20]. Somelanguagessupport\multi-methods"whichcandispatchonalltheargumentsofacall.Sather 5 $PORT $ANY_ICSIM VECTOR_PORT UNIT_LIST_PORT VIRTUAL_PORT $SITE BP_LEARNING QP_LEARNING MY_SITE $COMPUTATION
8 argumenttype.unlikeasimple\case"statementappliedtothetype,a\typecase"statementcan type.satherdealswithmulti-methodsituationsbyusing\typecase"statements.theseappearinthe abstractiondenedbythattype.withmulti-methodscodedoesnotnaturallybelongtoaparticular bodyofaroutinewhichdispatchesontherstargumenttypeandmayexplicitlydispatchonthesecond branchonabstracttypes.thismeanstheycanbeusedinthesamesituationsthatmulti-methodswould behelpful.thisapproachalsomakestheperformanceconsequencesofamulti-methodorganization explicitratherthanhidingitbehindacomplexlanguageconstruct. onanunboundvariableofconcretetype(self=void).direct-calledroutinesaresather'sversionof plainproceduresinpascal,classmethodsinsmalltalk,andstaticmemberfunctionsinc++. Satherallowsthedenitionofafamilyofclassesparameterizedbytypes.Thisisasimilarmechanismto 2.8ParameterizedClasses Satherroutinescanalsobecalleddirectly.Adirectcallisequivalenttodispatchingtheroutinecall anappropriatesupertype. suchconstraints.aconstrainttyperepresentinganarbitraryunionoftypescanbeintroducedbyforming inheritedcode.satherallowssuchtypestobedeclaredassame,similartoeiel'slike-current.if aclassainheritscodewhichreferstothetypesame,itbehavesasifthetypewerereplacedbya.for oftheseconstrainttypes.thesupertypingfeatureintroducedinsection2.1isquiteusefulfordening haveassociatedtypeconstraints.thevaluesspeciedforthetypeparametersarerequiredtobesubtypes thegenericpackagesofada[28]andtemplatesinthenewerversionsofc++.sathertypeparameters Section2.1.ThisisverydierentfromEiel'slike-current,whereasubclassformedinthiswayis asubclasstobealsoasubtype,however,thisreplacementhastofollowthesubtypingrulesstatedin automaticallyconsideredasubtype,eventhoughitmightwellhaveintroducedaconformanceconict. AsecondformofgenericityinSatherisrelatedtothetypingofargumentsandreturnvaluesin undertwonames).morepureobject-orientedlanguagessuchassmalltalkandselftrytounifythese Thesearealwayspassedbyvalueanditisnotpossibletoaliasthem(i.e.toreferencethesameobject objects.thesearepassedbyreferenceasroutineargumentsandmaybealiased.thefundamentaltypes representingbooleanvalues,integers,characters,oatingpointvalues,etc.arecalledvalueobjects. Satherdistinguishesbetweenreference,value,andboundobjects.Mostuser-denedobjectsarereference 2.9ReferenceandValueClasses notions. Avariableofabstracttypecanbeusedtostoreeithervalueorreferenceobjects. objectshaveanidentityandthestateofareferenceobjectcanbemodiedbywritingtoitsattributes. Oncecreatedtheyneverchange,andthereisnosuchthingasa\reference"toavalueobject.Reference side-eects. ideaofanobjectidentityboundtoamodiablestateintroducesreferentialopaquenessandallowsfor hand,referenceobjectsarebestusedtomodelentitiesthathaveanidentityplusacurrentstate.the denedonlyovervaluetypesareside-eectfreeandthereforereferentiallytransparent.ontheother Satherdistinguishesbetweentheseattheleveloftypes.Instancesofvaluetypeshavevaluesemantics: Languagesthatonlyoperateovervaluesaretypicallycalledfunctionallanguages,andoperations thiscopyingwheneveritcandeducethattheinvokedoperationcannotmodifytheobject. operationisinvokedonthecopy(callbyvaluesemantics).ofcourse,thecompilerisfreetoeliminate conicts.logically,whenvalueobjectsarepassedasarguments,theirvalueisrstcopiedandthenthe techniques.mostimportant,avalueobjectcanbecopiedfreelywithoutthepossibilityofaliasing otherreferenceclasses. Anabstractclasscanonlybeasubclassofotherabstractclasses;avalueclasscanonlybeasubclassof abstractclassesandothervalueclasses;areferenceclasscanonlybeasubclassofabstractclassesand Thespecialpropertiesofvalueobjectsmakethemespeciallyamenabletocompileroptimization Theintroductionofseparatevalueandreferenceclassesimposescertainrestrictionsonsubclassing: 6
9 2.10BoundRoutines Acontroversialfeatureofnon-functionalprogramminglanguagesareclosuresorhigher-orderfunctions. Whileexpressiveandpowerful,certainformulationsarediculttoimplementeciently.Hence,many non-functionalprogramminglanguagesprovidemorelightweightbutmuchlesspowerfulfacilities. Pascal[12]introducedprocedureparameters,butnoprocedurevariables.Thisallowedimplementationstostrictlyadheretoastackdiscipline,butpreventedtheuseofproceduresasrst-classvaluesin datastructures.inmodula-2[29]thiswaschangedtoallowforprocedurevariables,buttherestriction wasaddedthatonlyglobalprocedurescanbeassigned.c[13]hasfunctionpointerswithasimilar semantics.whilethisallowsrst-classprocedurevalues,itrestrictssuchprocedurestooperateonthe globalstateonly,whileinpascalitwaspossibletopassanestedprocedurethatinturncouldoperate onthecurrentbindingsoflocalvariablesofthepassingprocedure. Sather,asinC,hasnonestedroutines,hencetheC/Modula-2solutionwouldworkwithoutany constraints.however,theconstraintthatroutinesboundtoavariablecanonlyoperateontheglobal stateismuchweakerthanmanyapplicationsneed.forexample,toimplementaroutinewhichproduces thecomplementofabooleanargumentroutineorthecompositionoftwoargumentroutinestheremust beinternalstateassociatedwiththeroutine. TheSathersolutionistointroduceboundroutines5toexpresshigher-orderfunctionsandclosure-like constructs.thekeyideaisthattheparametersofaroutine,includingtheimplicitself,canbebound toobjects.theresultingboundroutinecanthenbeassignedtoaroutinevariableoftheappropriate type.forexample,itispossibletotakearoutinewithtwointegerparameters,bindoneofthesetoan integervalue,andthenassigntheresultingboundroutinetoavariablethatasksforaroutinewitha singleintegerparameter.boundtypesdescribetheresultingsignatureofaboundroutine.conformance isdenedascontravariantconformanceofthetypesignature. 3CodeInheritance 3.1TheTextualInclusionModelforCodeInheritance ThesemanticsofcodeinheritanceinSatherisdenedbytextualinclusionoftheinheritedcode.So-called \include"clausesareusedtoincorporatesourcecodefromaspeciedclass.thechoiceofthekeyword \include"wasmadetoindicatethetextualsemanticsfortheinheritancemodel.referencestothe type\same"intheinheritedcoderepresentthetypeoftheinheritingclass.newlydenedfeaturesina classoverrideinheritedfeatureswithaconformingsignature(asdenedinsection2.1).thisapproach diersfromthatusedinsmalltalkandmostotherobject-orientedlanguages,inwhichacallconceptually climbsupintheclasshierarchyuntilacorrespondingmethodisfound.formostcommoncases,the twoapproachesproduceidenticalresults.incomplexsituations,however,thetextualinclusionapproach seemseasiertounderstandandtoreasonabout. Itissometimesconvenientforanewversionofafeaturetocalltheoldversionthatitoverrides. Smalltalksolvesthisproblembyprovidingthe\super"-call,whichbypassesanymatchingimplementationsintheobject'sclassandpassesthecalldirectlytothesuperclass.WefoundthatinSather,this approachwouldbeconfusingincertaincircumstances.theproblemariseswhencodewhichmakesa supercallisitselfinherited.theambiguityforprogrammerswaswhethertheinherited\super"call referstothe\super"classoftheoriginaldeningclassoroftheinheritingclass. Toeliminatethisproblem,Satherreplacesthe\super"-callapproachwithageneral\renaming" facilityintheincludeclauseswhichdenecodeinheritance.theincludeclausecomesintwoforms: oneisusedtoincludeandpossiblyrenameasinglefeaturefromanotherclassandtheotherincludes anentireclassbutmaycausefeaturestobeundenedorrenamed.renamingisshallow,i.e.renamingaectsonlythedenitionofthespeciedfeaturebutnotcallsonthatfeature6.appendixa.10 includesthesyntaxoftheconstruct.figure3usestheexampleofextendingasimpleunit(neuron) inicsimtoaunitwithback-propagationlearningtoshowhowthe\super"-callproblemissolvedin 5Satheralsointroducesbounditers. 6Thus,renamingorundeningafeaturemaybreakinheritedcode.Ifthisisthecasethecompilersignalsa\subclassing error"associatedwiththecorrespondingincludeclause.7
10 \SIMPLEUNITaccumulatedinput"inSIMPLEBPUNIT. Sather.TheroutineaccumulatedinputinheritedfromSIMPLEUNITisrenamedastheprivateroutine: classsimple_unitis end; classsimple_bp_unitis accumulated_input:realis end; includesimple_unit res:=input_values.dot_v(weights) input_port.get_outputs_into_vec(input_values); --Computethedotproductofinputvalues*weights end accumulated_input:realis end;... accumulated_input->privatesimple_unit_accumulated_input...; --Computethedotproductofweights*inputs+thebiasvalue res:=simple_unit_accumulated_input+bias.val Ourexperienceshowsthatweusethisstyleofprogramminginfrequently,andifweneeditwemake approach. therenamedversionoftheoldroutineprivateinordernottoaecttheexternalinterfaceofaclass. Becauseeveryroutinehasaspeciedname,theapproacheliminatesanyambiguityintheinterpretation ofcode.asshowninthenextsection,therenamingapproachisalsomoregeneralthanthe\super"-call Onemayarguethattherenamingsolutionfor\super"-callsunnecessarilycluttersthenamespace. Figure3:Usingrenaminginsteadofa\super"-call. class.sincemorethanoneofthesuperclassesmayprovideafeaturewiththesamesignature,multiple Sathersupportsmultiplesubclassing(multiplecodeinheritance)byallowingmultipleincludeclausesper 3.2MultipleSubclassingandConictResolution subclassingleadstoinheritanceconicts.tworoutinesoritersaresaidtoconictiftheyhavethesame name,thesamenumberandtypesofarguments,andbotheitherhaveordonothaveareturnvalue. Reference[9]describesfourwaystocopewithinheritanceconicts: 2.Resolveconictsbyexplicitselection:Requiretheusertomakeaselectionincaseofaconict. 1.Disallowconicts:Signalanerrorinthecaseofaconict. 3.Formdisjointunionoffeatures:Createaseparatefeatureforeachconictingfeature.Thisisthe approachofc++wherefeaturenamesofsub-andsuperclassesareindierentscopes.theuser ThisisSather'sapproach,asdescribedbelow. atestancebetween3.and4.byimposingonlyapartialorderingonclasses,andrequiringanyremaining 4.Formcompositeunionoffeatures:Createonesinglefeatureforeachconictingfeaturebyalgorithmicallyresolvingtheconict.CLOS[1]followsthisapproachbylinearizingtheclasshierarchy. 1.to3.areexplicitconictresolutionmethods,4.isanimplicitmethod.Cecil[4]takesanintermedi- selectsbetweenconictingfeaturesusingthescoperesolutionoperator\::". 8
11 conictstoberesolvedexplicitlybytheprogrammer.weagreewith[25]thatclos-stylelinearization oftheinheritancegraphsmayleadtounexpectedmethodlookups,andresultinfaultyandhardtodebug programs. Sather,therefore,adoptsanexplicitconictresolutionschemeinwhichtheprogrammerhasto explicitlychooseincaseofconicts.aclassmaynotexplicitlydenetwoconictingroutinesoriters. Aclassmaynotdenearoutinewhichconictswiththereaderorwriterroutineofanyofitsattributes (whetherexplicitlydenedorincludedfromotherclasses).ifaroutineoriterisexplicitlydenedina class,itoverridesallconictingroutinesoritersfromincludedclasses.thereaderandwriterroutines ofaclass'sattributesalsooverrideanyincludedroutinesandmustnotconictwitheachother.ifan includedroutineoriterisnotoverridden,thenitmustnotconictwithanotherincludedroutineoriter. Renamingorundeninginincludeclausesisusedtoresolvetheseconicts. Anylanguagewhichsupportscodeinheritancemustdealwiththeproblemofthesamecodeinherited alongtwodierentpaths.somelanguagesintroducecomplexmechanismstodealwiththiscase,butthese tendtobeconfusingtoprogrammersandrarelydoexactlywhatisdesired.sather'ssolutionisimplied bytherulesgivenabove.satherdoesnotconsidertheoriginofcodeandresolvesinheritancesolelybased onthebodyoftheclassitselfandthebodiesoftheclassesitincludes(aftertheirowncodeinheritance hasbeenresolved).thisbehaveslikethenon-virtualinheritanceofc++fordiamond-shapedinheritance graphs,i.e.featuresfromacommonsuperclassareincludedalongeachedge.thissometimesnecessitates explicitlychoosingasingleversionofaroutineinheritedalongmultiplepaths,butiteliminatescomplex ruleswhichdependonthestructureofthecodeinheritancegraph. OurexperiencewiththeSatherlibrariesisthatweusemultiplesubclassingonlyrarely.Wetherefore feltthatthesespecialcasesweretooweakajusticationtointroduceacomplexgraph-basedsubclassing schemeorastrategybasedonstructuralequalityoffeaturedenitions. 3.3SeparateCompilation Satherhasnoexplicitnotionofstructuralunitscomprisingmultipleclasses.TheSatherprogramming environmentisintendedtomanageandmaintainthesourcecodeofmultipleclasses.inparticular,when compilinganewclassitisoftenrequiredthatthesathercompilerhasaccesstothesourcecode(orat leastthetypeinterfaceanddependencyinformation)ofallclassesreferredtobyit. Forexample,thecompilerautomaticallyinlinesshortroutinestoimproveeciency.Theretendto bemanyshortroutinesinobject-orientedprogrammingbecausearoutinewhichisneededonlyforthe purposesofanabstractinterfaceoftenjustcallsanotherroutine.inadditiontoeliminatinganextra routinecall,inliningallowsmuchmoreoptimizationtobedonewithinaroutinewithinlinedcode.onthe onehand,compiler-controlledinliningrequiresthatthecodetobeinlinedisavailabletothecompilerand tothecompiler'sanalysisprocess,i.e.thatthesourceisathand.ontheotherhand,inliningintroduces hiddendependenciesbetweenimplementations. Forlargesystems,thereareargumentsforintroducinganotherlevelofmodularity.Insomecases, onedoesn'twanttorequirethatallsourcecodebeavailableorallowarbitrarydependenciesbetween compiledunits.suchlargesystemsareusuallycomposedofsubsystems.foralimitedsubsystemthe globalanalysisisacceptable.foracomposedsystem,however,itshouldbepossibletodenethe subsystemsinawaythatglobalanalysisisnotrequired. ForSather,itispossibletoformsubsystemswithstrictboundariesintermsofcompileranalysis. Suchasubsystemmustbelimitedbyaninterfacepresentingonlytypes,i.e.emptyabstractclasses,to subtypingclients,andallowingfordirectcallstoroutines(c.f.section2.7)denedbyclasseswithinthe subsystem. Themostprominentmechanismthatcannotbeallowedtocrosssubsystemsiscodeinheritance, whichofcourseisadirectconsequenceofspecifyingthesemanticsofcodeinheritancebaseduponthe actuallyinheritedsourcetext.alsotobeexcludedfromasubsystem'sinterfaceareparameterizedclasses: ThecurrentSathercompilercannotcompletelycheckaparameterizedclassbeforeitsparametersactually getspecied.thisdefectinthecheckabilityofsather'sparameterizedclassesisunfortunateandanissue ofongoingresearch.however,thisproblemisnotspecictosather,thesameholdsforc++,where sucherrorsmightbedetectedaslateasatlink-time(!),eiel,andada.possiblesolutionstendto eitherrestricttheusefulnessofparameterizedclasses,ortointroduceacomplicatedapparatustospecify 9
12 sucientlystrongboundsontheparameters. tensiontosather.inparticular,amoduleconstructwouldhelptopackagehelperclasses,toexplicitly 4Foundations limitationstobeplacedandhowmuchofasourceneedstoberevealedforpurposesofcompilation.the theseissuesatthelevelofthedevelopmentenvironmentratherthaninthelanguage. treatsubsysteminvariants,toreducetheprobabilityofconictsintheglobalclassnamespace,andallow bestformforsuchaconstructisnotyetclear,however,andsothecurrentversionofsatherwilladdress Explicitsupportforexpressingsubsystemboundaries,suchasmodules[26],mightbeausefulex- Thetypesystemdescribedsofarneedstobegroundedinexplicitbuilt-inclasses.Aclasscandono world.forexample,asatherprogramshouldbeabletocallnon-satherlibraries,includingfunctionsof theunderlyingoperatingsystemandgraphicaluserinterface.itisnotreasonabletoexpectthataxed oroperationswithpredenedsemantics.insather,certainpredenedclassesservethispurpose. morethandeneattributesoftypesintroducedbyitselforotherclasses,ordeneroutinesoperating overitsownorsharedattributes,orinvokingotheroperations.whatismissingarethefoundational entitiestostartwith.suchfoundationentitiesarepresentinalllanguages7intheformofbuilt-intypes MostclassesaredenedbyexplicitcodeinaSatherprogram,butthereareseveralclasseswhichare 4.1Built-inClasses hasexternalclasses.predenedandexternalclassesaredescribedinthenexttwosubsections. setofbuilt-inclasseswilleversucetoservethispurposeinfullgenerality.forthesepurposessather Alanguagethatclaimstobe\general-purpose"alsohastobeabletoexpressinterfacestotheoutside denedinanimplementationdependentway.ineachcase,thechoicesmadebytheimplementationare automaticallyconstructedbythecompiler.theseclasseshavecertainbuilt-infeaturesthatmaybe describedbyconstantswhichmaybeaccessedbyaprogram.thissectionprovidesashortdescriptionof someofthemostimportantbuilt-inclasses.thecompleteanddetailedsemanticsandpreciseinterface isspeciedinthesatherclasslibrarydocumentation. BOOLdenesvalueobjectswhichrepresentbooleanvalues. CHARdenesvalueobjectswhichrepresentcharacters. STRdenesreferenceobjectswhichrepresentstrings. INTdenesvalueobjectswhichrepresentmachine-dependentintegers.Thesizeisimplementation $OBisautomaticallyanancestorofeveryclass.Variablesdeclaredbythistypemayholdanyobject. INTINFdenesreferenceobjectswhichrepresentinniteprecisionintegers.Theysupportarithmetic FLT,FLTD,FLTE,andFLTDEdenevalueobjectswhichrepresentoatingpointvaluesaccordingto operationsbutdonotsupportbitoperations. thesingle,double,extended,anddoubleextendedrepresentationsdenedbytheieee dependent.classesrepresentingxed-sizedintegerswithadierentnumberbitsmaybedenedby inheritingfromintandredeningtheconstant\bsize".alltheroutinesworkwithanarbitrary problems,though! 7Intheory,the-calculus,e.g.withsyntaxE::=xjEEjx:E,issucient.Suchlanguagestendtohaveeciency ARR{T}isareferenceclassdeningdynamically-sizedarraysofelementsoftypeT.Classeswhich TYPEdenesthevalueobjectsreturnedbythetyperoutine. standard. inheritfromthisarecalledarrayclasses.theyallocatespaceforthearrayandtheattribute asize:intwhosevalueisthenumberofelementsinthearray. 10
13 Sather'sexternalclassescanbeusedtointerfacewithcodefromotherlanguages.Externalclassesare Satherprovidesafewspecialbuilt-inclassestointerfacetoexternalcode,aslistedbelow.Additionally, 4.2InterfacingtoExternalCode externalclasses).theexternalobjectlemustprovideaconformingfunctiondenitionwiththesame theseexternalroutinesusingaclasscallexpressionoftheformext_class::ext_rout(5).similarly, nameaseachroutinewhichdoesn'thaveanimplementationintheexternalclass.sathercodemaycall subtyperelationshipwithanyotherclass.itismerelyforthesakeofuniformityofthelanguagethat externalroutineinterfacesaregroupedintoexternal\classes". notclassesinthetraditionalsense.theycanneitherbeinstantiated,norcantheybeinasubclassor Fortran.Externalclassesmayonlycontainroutineswithdistinctnames(overloadingisnotallowedin theexternalcodemaycalloneofthenon-abstractsatherroutines8denedintheclassbyusinganame consistingoftheclassname,anunderscore,andtheroutinename(eg.ext_class_sather_rout). BITSmaybeinheritedbyvalueclasseswhichrepresentasingleeldofdata.Thedescendantmay EachexternalclassistypicallyassociatedwithanobjectlecompiledfromalanguagelikeCor 5Conclusions $EXTOBisusedtoreferto\foreignpointers".Thesemightbeused,forexample,toholdreferences whichdisallowarithmeticoperations.theymaybepassedtoexternalroutines. itsalignmentrequirements. tocstructures.suchpointersareneverfollowedbysatherandaretreatedessentiallyasintegers denethetwoconstantsbsize:intandbalign:inttospecifythesizeinbitsoftheobjectand ThedesignofSather1.0involvedtradingoaninterestingsetofconstraintsregardingeciency,clarity, reusabilityandsafety.wehavedescribedseveralimportantaspectsofthetypeandclasssystemand relevanttothetopicsdiscussedinthispaper. tunen,chu-cheowlim,heinzschmidt,anddavidstoutamiremadesuggestionswhichwereespecially comparedthemwiththesolutionschosenbyotherobject-orientedlanguages.thesegiverisetoalanguage ManypeoplewereinvolvedintheSather1.0designdiscussions.JerryFeldman,BenGomes,AriHut- withauniquecombinationofconceptualclarity,safetyandsupportforhighperformance. ASyntaxoftheSatherClassandTypeSystem Acknowledgements followclauseswhichmayappearzeroormoretimes,anditalicplussigns\:::+"followclauseswhich grammarrules.thegrammarrulesarepresentedinavariantofbackus-naurform.non-terminal \[:::]"encloseoptionalclauses,verticalbars\:::j:::"separatealternatives,italicasterisks\:::*" mayappearoneormoretimes. symbolsarerepresentedbystringsoflettersandunderscoresinitalictypefaceandbeginwithaletter. typesetinthetypewriterfont.italicparentheses\(:::)"areusedforgrouping,italicsquarebrackets ThefollowingsectionsgiveexamplesofactualSathercodefragmentstogetherwiththecorresponding A.1Classdenitionlists Thenonterminalsymbolonthelefthandsideofagrammarruleisfollowedbyanarrow\)"and classais...end;classbis...end right-handsideoftherule.theterminalsymbolsconsistofsatherkeywordsandspecialsymbolsandare classdeflist)[classdef]jclassdeflist;[classdef] 8Thecallingconventionsandthelayoutofobjectsaredescribedintheimplementationmanualofindividualversions. 11
14 A.2Classdenitions classinheritance)[<typespec(,typespec)*] paramdec)ident[<typespec][:=typespec] classa{s,t:=int,u<b}is...end valueclassb<$c,$dis...end classdef)[valuejabstractjexternal]classclassname abstractclass$e>g,his...end A.3Typespeciers [>typespec(,typespec)*] [{paramdec(,paramdec)*}]classinheritanceisclasseltlistend A{B,C{$D}} ROUT{A,B,C}:D ITER{A,B!,C} typespec)[classname][{typespeclist}]j typespeclist)typespec(,typespec)* classeltlist)[classelt]jclasseltlist;[classelt] A.4Features ITER[{typespec[!](,typespec[!])*}][:typespec] ROUT[{typespeclist}][:typespec]j classelt)constdefjshareddefjattrdefjroutdefjiterdefjincludeclause A.5Constantattributedenitions identlist)ident(,ident)* constr:flt:=45.6 privatesharedi,j:int privateconsta,b,c readonlysharedc:char:='x' shareds:str:="name" constdef)[private]constident(:typespec:=exprj[:=expr][,identlist]) shareddef)[privatejreadonly]shared A.6Sharedattributedenitions attrdef)[privatejreadonly]attr attra,b,c:int privateattrc:char:='a' readonlyattrs:str:="astring" A.7Objectattributedenitions (ident:typespec:=exprjidentlist:typespec) (ident:typespec:=exprjidentlist:typespec) 12
15 a(flt):fltprearg>1.2postres<4.3is...end A.8Routinedenitions privated:intis...end bis...end A.9Iterdenitions elts!(i:int,x:flt!):tis...end argdec)[identlist:]typespec c(s1,s2,s3:str) iterdef)[private]itername[(iterargdec(,iterargdec)*)][:typespec] routdef)[private]ident[(argdec(,argdec)*)][:typespec][preexpr][postexpr][isstmtlist end] iterargdec)[identlist:]typespec[!] privateincludede:str->readonlyf; includeaa:int->b,c(int)->,d:flt->privated; itername)ident! A.10includeclauses [preexpr][postexpr][isstmtlistend] References eltmod)ident[(typespeclist)][:typespec]-> includea::a(int)->b; includeclause)includetypespec::eltmodj [1]D.G.Bobrow,L.G.DeMichiel,R.P.Gabriel,S.Keene,G.Kiczales,andD.A.Moon.Thecommon [[privatejreadonly]ident] [private]includetypespec[eltmod(,eltmod)*] [3]LucaCardelli.Typefulprogramming.Technicalreport,DECSystemsResearchCenter,PaloAlto, [2]GiladBrachaandWilliamR.Cook.Mixin-basedinheritance.InProceedingsoftheConference Notices,25:10,Oct OrientedProgramming(OOPSLA/ECOOP'90),Ottawa,Canada,October1990.AlsoinSIGPLAN onobject-orientedprogramming,systems,andapplicationsandeuropeanconferanceonobject- ofsigplannotices23(sep.1988)andlispandsymboliccomputation(jan.1989). lispobjectsystemspecication.technicalreport88-002r,x3j13,june1988.alsoinspecialissue [4]CraigChambers.TheCecillanguage-specicationandrationale.TechnicalReport , CA,May1989. [6]WilliamR.Cook,WalterL.Hill,andPeterS.Canning.Inheritanceisnotsubtyping.InProceedings [5]WilliamR.Cook.Aproposalformakingeieltypesafe.InProceedingsoftheThirdEuropeanConferenceonObject-OrientedProgramming(ECOOP'89),pages57{70,Nottingham,England,1989. DepartmentofComputerScience,UniversityofWashington,Seattle,WA,March1993. oftheacmconferenceonprinciplesofprogramminglanguages(popl'90),pages125{135.acm CambridgeUniversityPress. Press.Addison-Wesley,
16 [9]RichardP.Gabriel,JonLWhite,andDanielG.Bobrow.CLOS:Integratingobject-orientedand [8]MargaretA.EllisandBjarneStroustrup.TheAnnotatedC++ReferenceManual.Addison-Wesley, [7]MaheshDodaniandChung-SinTsai.ACTS:Atypesystemforobject-orientedprogrammingbased Programming(ECOOP'92),pages309{328,Utrecht,Netherlands,1992. onabstractandconcreteclasses.inproceedingsofthesixtheuropeanconferenceonobject-oriented [11]NormanHutchinson.Emerald:AnObject-OrientedLanguageforDistributedProgramming.PhD [12]KathleenJensenandNiklausWirth.PASCAL:UserManualandReport.Springer-Verlag,2ded. [10]AdeleGoldbergandDavidRobson.Smalltalk-80,TheLanguageanditsImplementation.Addison- thesis,departmentofcomputerscienceandengineering,universityofwashington,seattle,wa, Wesley,1985. January1987. functionalprogramming.communicationsoftheacm,34(9):29{38,september1991. [14]B.B.Kristensen,O.L.Madsen,B.Moeller-Pedersen,andKristenNygaard.TheBETAprogramminglanguage.InB.D.ShriverandP.Wegner,editors,ResearchDirectionsinObject-Oriented ReportTR ,InternationalComputerScienceInstitute,May1991. Programming.MITPress,1987. corr.printedition,1978. [15]Chu-CheowLimandAndreasStolcke.Satherlanguagedesignandperformanceevaluation.Technical [13]BrianW.KernighanandDennisM.Ritchie.TheCProgrammingLanguage.Prentice-Hall,1978. [16]BorisMagnusson.Codereuseconsideredharmful.JournalofObjectOrientedProgramming,4(3), [18]BertrandMeyer.Object-orientedSoftwareConstruction.Prentice-Hall,1988. [17]BertrandMeyer.Eiel-TheLanguage.Prentice-Hall,1988. [19]HanspeterMossenbockandNiklausWirth.TheprogramminglanguageOberon-2.StructuredProgramming,12(4),1991. [20]StephanMurer,StephenOmohundro,andClemensA.Szyperski.Satheriters:Object-oriented November1991. [22]StephenOmohundro.Satherprovidesnonproprietaryaccesstoobject-orientedprogramming.ComputersinPhysics,6(5):444{449,1992. Addison-Wesley,1992. [21]GregNelson,editor.SystemsProgrammingwithModula-3.PrenticeHall,1991. iterationabstraction.technicalreporttr-92-xxx,internationalcomputerscienceinstitute,1993. [23]MartinReiserandNiklausWirth.ProgramminginOberon.StepsBeyondPascalandModula. [24]HeinzW.SchmidtandBenedictGomes.ICSIM:Anobject-orientedconnectionistsimulator.TechnicalReportTR ,InternationalComputerScienceInstitute,November1991. [26]ClemensA.Szyperski.ImportisnotInheritance{whyweneedboth:ModulesandClasses.InProceedingsoftheSixthEuropeanConferenceonObject-OrientedProgramming(ECOOP'92),Utrecht, [25]AlanSnyder.EncapsulationandInheritanceinobject-orientedprogramminglanguages.InPro- (OOPSLA'86),pages38{45,Portland,OR,November1986.AlsoinSIGPLANNotices,21:11,Nov. TheNetherlands,June1992. ceedingsofthefirstacmconferenceonobject-orientedprogramming,systems,andapplications 14
17 [28]U.S.DepartmentofDefence.AdaReferenceManual:ProposedStandardDocument,July1980. [27]DavidUngarandRandallB.Smith.Self:Thepowerofsimplicity.InProceedingsoftheSecondACM [29]NiklausWirth.ProgramminginModula-2.Springer-Verlag,1982. ConferenceonObject-OrientedProgramming,Systems,andApplications(OOPSLA'87),Orlando, FL,October1987.AlsoinSIGPLANNotices,22:12,Dec
The purpose of software configuration management (SCM) is to establish and
DonnaAlbino LIS489FinalProject SoftwareConfigurationManagement Thepurposeofsoftwareconfigurationmanagement(SCM)is toestablishand maintaintheintegrityoftheproductsofthesoftwareprojectthroughoutthe project
fire Utrymningsplan/Evacuation plan In case of fire or other emergency Vid brand eller annan fara Rescue Call Larma Warn Varna Extinguish Evacuate
genom telefon 2 In case of or other emergency telephone 2 the if possible and risk engineering Uppsala 08-8 58 00 205-02-25/JB Plan 3, tr genom telefon 2 In case of or other emergency telephone 2 the if
Practical Experiences of Agility in the Telecom Industry
Practical Experiences of Agility in the Telecom Industry Jari Vanhanen 1, Jouni Jartti 2, and Tuomo Kähkönen 2 1 Helsinki University of Technology, Software Business and Engineering Institute, P.O. Box
Windows Security Environment
Motivation Popularity, widespread use of Windows Big surface, big impact Protection via user/kernel architecture and CPU modes Multiple-users environment, same physical resources Easy to install < security
Risk Analysis: a Key Success Factor for Complex System Development
Risk Analysis: a Key Success Factor for Complex System Development MÁRCIO DE O. BARROS CLÁUDIA M. L. WERNER GUILHERME H. TRAVASSOS COPPE / UFRJ Computer Science Department Caixa Postal: 68511 - CEP 21945-970
An Architecture View of Softbank
An Architecture View of Softbank to IPv6 transition and packet transport for Mobile and Broadband Satoru Matsushima Softbank Telecom Softbank BB Softbank Mobile Introduction Introduction In the transition
1 one. uno. Number 1 Numero 1. Name. Trace the number 1. Write the word uno. The number one in Italian is uno. Trace the word uno.
Number 1 Numero 1 Trace the number 1. 1 Trace the word one. one The number one in Italian is uno. Trace the word uno. uno Write the word one. _ Write the word uno. _ Number 2 Numero 2 Trace the number
Towards an Agent Oriented approach to Software Engineering
Towards an Agent Oriented approach to Software Engineering Anna Perini and Paolo Bresciani ITC-IRST Via Sommarive 18, 38055 Povo, Trento, Italy perini,bresciani @irst.itc.it John Mylopoulos Department
Software Deterioration And Maintainability A Model Proposal
Software Deterioration And Maintainability A Model Proposal Rikard Land Mälardalen University Department of Computer Engineering Box 883 SE-721 23 Västerås, Sweden +46 (0)21 10 70 35 [email protected]
Tool Support for Software Variability Management and Product Derivation in Software Product Lines
Tool Support for Software Variability Management and Product Derivation in Software s Hassan Gomaa 1, Michael E. Shin 2 1 Dept. of Information and Software Engineering, George Mason University, Fairfax,
12.5 Equations of Lines and Planes
Instructor: Longfei Li Math 43 Lecture Notes.5 Equations of Lines and Planes What do we need to determine a line? D: a point on the line: P 0 (x 0, y 0 ) direction (slope): k 3D: a point on the line: P
The Unified Software Development Process
The Unified Software Development Process Technieche Universal Darmstadt FACHBEREICH IN-FORMAHK BLIOTHEK Ivar Jacobson Grady Booch James Rumbaugh Rational Software Corporation tnventar-nsr.: Sachgebiete:
CHAPTER 4: PATTERNS AND STYLES IN SOFTWARE ARCHITECTURE
CHAPTER 4: PATTERNS AND STYLES IN SOFTWARE ARCHITECTURE SESSION I: OVERVIEW AND HISTORY OF STYLES AND PATTERNS Software Engineering Design: Theory and Practice by Carlos E. Otero Slides copyright 2012
Development models. 1 Introduction. 2 Analyzing development models. R. Kuiper and E.J. Luit
Development models R. Kuiper and E.J. Luit 1 Introduction We reconsider the classical development models: the Waterfall Model [Bo76], the V-Model [Ro86], the Spiral Model [Bo88], together with the further
Applied Math 247 Exam#1: Summer 2008
AnswerthequestionsinthespacesprovidedonthequestionsheetsIfyourunoutofroomforan answercontinueonthebackofthepagenonotes,books,orotheraidsmaybeusedontheexam Student Id: Answer Key 1 (1 points) 2 (1 points)
Databases. DSIC. Academic Year 2010-2011
Databases DSIC. Academic Year 2010-2011 1 Lecturer José Hernández-Orallo Office 236, 2nd floor DSIC. Email: [email protected] http://www.dsic.upv.es/~jorallo/docent/bda/bdaeng.html Attention hours On
How To Understand The Architecture Of An Ulteo Virtual Desktop Server Farm
ULTEO OPEN VIRTUAL DESKTOP V4.0.2 ARCHITECTURE OVERVIEW Contents 1 Introduction 2 2 Servers Roles 3 2.1 Session Manager................................. 3 2.2 Application Server................................
Cycle Counting Optimization for Warehouse Management
Cycle Counting Optimization for Warehouse Management Wesley Dean MillerCoors Supported by: Produced by: Presentation Introduction & Overview Cycle Counting Issues Thorough Investigation Resolutions Reporting
TASPO-ATS-L Requirements Traceability Matrix
TASPO-ATS-L Requirements Traceability Matrix Targeting and Analysis Systems Program Office Automated Targeting System Document Number: TASPO_ATS-L_(WR_1941)_RTM_1.1 October 20, 2011 For Official Use Only
Software Product Lines
Software Product Lines Software Product Line Engineering and Architectures Bodo Igler and Burkhardt Renz Institut für SoftwareArchitektur der Technischen Hochschule Mittelhessen Sommersemester 2015 Questions:
A Typing System for an Optimizing Multiple-Backend Tcl Compiler
The following paper was originally published in the Proceedings of the Fifth Annual Tcl/Tk Workshop Boston, Massachusetts, July 1997 A Typing System for an Optimizing Multiple-Backend Tcl Compiler Forest
Product-Line Instantiation Guided By Subdomain Characterization: A Case Study
Product-Line Instantiation Guided By Subdomain Characterization: A Case Study Patricia Pernich and Agustina Buccella and Alejandra Cechich and Maximiliano Arias and Matias Pol la GIISCO Research Group
Core Issues Affecting Software Architecture in Enterprise Projects
Core Issues Affecting Software Architecture in Enterprise Projects Halûk Gümüşkaya Abstract In this paper we analyze the core issues affecting software architecture in enterprise projects where a large
The format this is requested in contains a. Users should provide the answer in DD/MM/YYYY. The Range for Historic Performance Data be DD/MM/YYYY
CMU The format this is requested in contains a Users should provide the answer in DD/MM/YYYY. The Range for Historic typographical error DD/MM/YYY. This should actually system actually applies the correct
Christina Wallin ABB Corporate Research Department of Industrial IT 721 78 Västerås +46 (0)21 34 50 74 [email protected].
Christina Wallin ABB Corporate Research Department of Industrial IT 721 78 Västerås +46 (0)21 34 50 74 [email protected] Software Development Lifecycle Models The Basic Types Rikard Land Mälardalens
About Me. #ccceu. @shapeblue. Software Architect with ShapeBlue Specialise in. 3 rd party integrations and features in CloudStack
Software Architect with ShapeBlue Specialise in. 3 rd party integrations and features in CloudStack About Me KVM, API, DB, Upgrades, SystemVM, Build system, various subsystems Contributor and Committer
UML Representation Proposal for XTT Rule Design Method
UML Representation Proposal for XTT Rule Design Method Grzegorz J. Nalepa 1 and Krzysztof Kluza 1 Institute of Automatics, AGH University of Science and Technology, Al. Mickiewicza 30, 30-059 Kraków, Poland
Property Taxes 101. Topics to discuss
Topics to discuss Definitions Statistics about Kitsap County property taxes in general The rules (laws) governing property tax levies Examples of how the rules apply Definitions Assessed Value The value
Part 1. MAX 525 12BIT DAC with an Arduino Board. MIDI to Voltage Converter Part1
MIDI to Voltage Converter Part 1 MAX 525 12BIT DAC with an Arduino Board 1 What you need: 2 What you need : Arduino Board (Arduino Mega 2560) 3 What you need : Arduino Board (Arduino Mega 2560) Digital
USB PC Adapter V4 Configuration
Programming PC adapter V4 USB PC Adapter V4 Configuration PC adapter with USB cable Flat Ribbon Cable Power Supply Unit Device Driver General The USB PC adapter V4 is used for communication between a PC
Updated: 7/10/2013 Author: Tim Unten
Office 365 Email Access Updated: 7/10/2013 Author: Tim Unten Contents Outlook 2010 Setup off DOP Network... 1 Outlook 2010 Setup on DOP Network... 2 Outlook 2010 Manual Setup... 2 Android Setup... 3 iphone/ipad
Net Present Value and Other Investment Criteria
Net Present Value and Other Investment Criteria Topics Covered Net Present Value Other Investment Criteria Mutually Exclusive Projects Capital Rationing Net Present Value Net Present Value - Present value
INSIDE SERVLETS. Server-Side Programming for the Java Platform. An Imprint of Addison Wesley Longman, Inc.
INSIDE SERVLETS Server-Side Programming for the Java Platform Dustin R. Callaway TT ADDISON-WESLEY An Imprint of Addison Wesley Longman, Inc. Reading, Massachusetts Harlow, England Menlo Park, California
1 Inner Products and Norms on Real Vector Spaces
Math 373: Principles Techniques of Applied Mathematics Spring 29 The 2 Inner Product 1 Inner Products Norms on Real Vector Spaces Recall that an inner product on a real vector space V is a function from
Génie Logiciel et Gestion de Projets. Project Management
Génie Logiciel et Gestion de Projets Project Management 1 Roadmap Project Management: Why and what? Risk management Scoping and estimation, planning and scheduling Dealing with delays Staffing, directing,
ICS 351: Today's plan
ICS 351: Today's plan routing protocols linux commands Routing protocols: overview maintaining the routing tables is very labor-intensive if done manually so routing tables are maintained automatically:
Introducing the Dezyne Modelling Language
Introducing the Dezyne Modelling Language Bits & Chips Smart Systems, 20 November 2014 Paul Hoogendijk. [email protected] Software Controlled Systems Software Controlled Systems Event driven Concurrent,
A i-1. A i+1. A i. alpha
AnArchitectureforMotionCaptureBasedAnimation FernandoWagnerSerpaVieiradaSilva1;2 LuizVelho1 PauloRomaCavalcanti2 JonasdeMirandaGomes1 1IMPA{InstitutodeMatematicaPuraeAplicada EstradaDonaCastorina,110,
Market Maker Transaction Data Technical Specification
Market Maker Transaction Data Technical Specification Version 1.0 1 Table of Contents Revision History... 4 1 Tick Size Pilot Market Maker Reporting File Format Specification... 5 1.1 File Submission Location
Red Condor Syslog Server Configurations
Red Condor Syslog Server Configurations May 2008 2 Red Condor Syslog Server Configurations This application note describes the configuration and setup of a syslog server for use with the Red Condor mail
PIM SOFTWARE TR50. Configuring the Syslog Feature TECHNICAL REFERENCE. www.panduit.com [email protected] 866-721-5302 page 1
PIM SOFTWARE Configuring the Syslog Feature TECHNICAL REFERENCE TR50 Published: 5/14/08 Syslogs are typically used for computer system management and security audits and are supported by a wide variety
Change Management: Modeling Software Product Lines Evolution
Change Management: Modeling Software Product Lines Evolution Samuel A. Ajila, Ph.D. MIEEE Department of Systems & Computer Engineering, Carleton University, 25 Colonel By Drive, Ottawa, Ontario, KS 5B6,
Secure Database Development
Secure Database Development Jan Jurjens () and Eduardo B. Fernandez (2) () Computing Department, The Open University, Milton Keynes, MK7 8LA GB http://www.jurjens.de/jan (2) Dept. of Computer Science,
Software Refactoring using New Architecture of Java Design Patterns
Software Refactoring using New Architecture of Java Design Patterns Norddin Habti, Prashant 1, 1 Departement d informatique et de recherche operationnelle, Universite de Montreal, Quebec, Canada (Dated:
Building a Flexible Software Factory Using Partial Domain Specific Models
Building a Flexible Software Factory Using Partial Domain Specific Models Jos Warmer 1, Anneke Kleppe 2 3 1 Ordina SI&D, The Netherlands [email protected] 2 University Twente, Netherlands [email protected]
Abstract. 1. Introduction. 2. The Web Technology Courses at UPE
Integrating Design Principles into Web Technology Courses J.L. Wesson, N.L.O. Cowley and R. Stoman Department of Computer Science & Information Systems University of Port Elizabeth [email protected], [email protected],
Sharing Files Over Internet With Thecus NAS Device. Thecus TME
Sharing Files Over Internet With Thecus NAS Device Thecus TME Thecus NAS Provides The Best Solution To Setup FTP Server The advantages are: Setup is easy: Just click to enable the FTP server function on
Kerio Connect. Kerio 4D Migration. Kerio Technologies
Kerio Connect Kerio 4D Migration Kerio Technologies Kerio Technologies. All rights reserved. This document provides brief instructions on how to migrate data from the 4D Mail server to Kerio Connect. For
UVic Department of Electrical and Computer Engineering
UVic Department of Electrical and Computer Engineering COURSE OUTLINE Elec 567 Advanced Network Security and Forensics Spring 2014 Instructor: Office Hours: Dr. Issa Traore Days: Monday, Thursday Phone:
Safety-Critical Systems: Processes, Standards and Certification
Fachbereich 17 - Mathematik/Informatik Arbeitsgruppe Softwaretechnik Warburger Straße 100 33098 Paderborn Safety-Critical Systems: Processes, Standards and Certification for the Seminar Analysis, Design
The WebShop E-Commerce Framework
The WebShop E-Commerce Framework Marcus Fontoura IBM Almaden Research Center 650 Harry Road, San Jose, CA 95120, U.S.A. e-mail: fontouraalmaden.ibm.com Wolfgang Pree Professor of Computer Science Software
1.1 SIP - No call possible
Read me System software 10.1.4 patch 2 and 10.1.5 patch 2 With system software 10.1.5 patch 2 there is a change in the FXO subsystem (POTS), which is not compatible with existing configurations. If you
Iterative Design and Testing within the Software Development Life Cycle
Software Quality Journal, 6(4), December 1997, 295-309 Iterative Design and Testing within the Software Development Life Cycle Bor-Yuan Tsai *, Simon Stobart, Norman Parrington and Barrie Thompson School
TOTAL RECALL MAX Potential Connection Diagrams CALL RECORDING. Product Specifications YOU NEED TOTAL RECALL MAX
Product Specifications TOTAL RECALL MAX Potential Connection Diagrams When your business depends on CALL RECORDING YOU NEED TOTAL RECALL MAX VoIP Connectivity Diagram 1 Port Mirroring In a VOIP telephony
ÇANKAYA UNIVERSITY Faculty of Engineering and Architecture
ÇANKAYA UNIVERSITY Faculty of Engineering and Architecture Course Definition Form This form should be used for both a new elective or compulsory course being proposed and curricula development processes
DISTRICT LOCATION ADDRESS St Pete Warehouse 4301 34 th St N Davenport Warehouse 220 Dean Still Rd
DISTRICT LOCATION ADDRESS St Pete Warehouse 4301 34 th St N Davenport Warehouse 220 Dean Still Rd EAST BRANDON 235 Brandon Town Center EAST LAKELAND 3954 US 98 N EAST LAKESIDE VILLAGE 1376 Town Center
Information systems modelling UML and service description languages
Internet Engineering Tomasz Babczyński, Zofia Kruczkiewicz Tomasz Kubik Information systems modelling UML and service description languages Student Contact Hours: 25.02.2015- Location: 325 C3 room 25.03.2015:
PUZZLES WITH POLYHEDRA AND PERMUTATION GROUPS
PUZZLES WITH POLYHEDRA AND PERMUTATION GROUPS JORGE REZENDE. Introduction Consider a polyhedron. For example, a platonic, an arquemidean, or a dual of an arquemidean polyhedron. Construct flat polygonal
How To Write A Freesmartphone.Org For Mobile Devices
Freesmartphone. Freesmartphone. for mobile devices 2009-12-01 Outline Freesmartphone. Freesmartphone. Started when Openmoko was still in phone business driven since then Fits into the existing linux eco
IRA 423/08. Designing the SRT control software: Notes to the UML schemes. Andrea Orlati 1 Simona Righini 2
Designing the SRT control software: Notes to the UML schemes Andrea Orlati 1 Simona Righini 2 1 - I.N.A.F. Istituto di Radioastronomia. 2 Dip. Astronomia - Università degli Studi di Bologna. Dicembre 2008
P-3202H-Bb. G-PON VoIP IAD DEFAULT LOGIN DETAILS. Firmware v1.0 Edition 1, 09/2009. IP Address: http://192.168.1.1. Password: 1234
P-3202H-Bb G-PON VoIP IAD Firmware v1.0 Edition 1, 09/2009 DEFAULT LOGIN DETAILS IP Address: http://192.168.1.1 User Name admin Password: 1234 Copyright 2009 Device Panels POWER PON ETHERNET 1~4 PHONE
Structuring Product-lines: A Layered Architectural Style
Structuring Product-lines: A Layered Architectural Style Tommi Myllymäki, Kai Koskimies, and Tommi Mikkonen Institute of Software Systems, Tampere University of Technology Box 553, FIN-33101 Tampere, Finland
Discuss the ethical, moral and professional issues relating to computer security, ethical hacking and incident response.
Unit Information Form (UIF) UIF1011 The UIF provides essential information to students, staff teams and others on a particular unit. Please refer to the University s Guidance notes on Unit Information
A Form-based Approach for Application Development By Web Service Integration
A Form-based Approach for Application Development By Web Service Integration Takeshi Chusho, Ryousuke Yuasa and Shinpei Nishida Department of Computer Science, Meiji University Kawasaki, 214-8571, Japan
SHAREPOINT ARCHITECTURE FUNDAMENTALS
CHAPTER 4 SHAREPOINT ARCHITECTURE FUNDAMENTALS Whether you re a business user, manager, architect, developer, or IT pro, you ll want to understand the fundamental structure and core terminology of SharePoint
w = COI EYE view direction vector u = w ( 010,, ) cross product with y-axis v = w u up vector
. w COI EYE view direction vector u w ( 00,, ) cross product with -ais v w u up vector (EQ ) Computer Animation: Algorithms and Techniques 29 up vector view vector observer center of interest 30 Computer
Applying Module System Research to Package Management
Applying Module System Research to Package Management David B. Tucker Brown University Box 1910 Computer Science Department Providence, RI 02912 +1 401 863 7687 [email protected] Shriram Krishnamurthi
P h o t o g r a p h y. Vá c l a v J i r á s e k 瓦 茨 拉 夫 伊 拉 塞 克 I n f e c t i o n. I n d u s t r i a. U p s y c h 蔓. 工 业. 痴
P h o t o g r a p h y Vá c l a v J i r á s e k 瓦 茨 拉 夫 伊 拉 塞 克 I n f e c t i o n. I n d u s t r i a. U p s y c h 蔓. 工 业. 痴 Vá c l a v J i r á s e k 瓦 茨 拉 夫 伊 拉 塞 克 I n f e c t i o n. I n d u s t r i a.
PART A. 1 Registered person's name. 2 Registration number. 3 Address. Postal code. 4 Consignee's name. 5 Address. Postal Code. 7 Consignor's name
The Secretariat South African Council for Non-proliferation Private Bag X84 PRETORIA, 0001 Tel +27 12 394-3030 Fax +27 12 394-0288 IMPORT PERMIT APPLICATION PART A Use this form only if you intend importing
Software testing. Objectives
Software testing cmsc435-1 Objectives To discuss the distinctions between validation testing and defect testing To describe the principles of system and component testing To describe strategies for generating
How To Set Up Isonas Crystal Matrix On A Pc Or Mac Or Ipa (For A Mac) On A Network With A Network Switch (For An Ipa) On An Ip Address) On Your Ipa Or Ip Address On
Introduction ISONAS Crystal Matrix Advanced Networking Checklist Because of the simple network topology used for most ISONAS installations, the only network configuration typically required is to set the
Decisions in IBM Websphere ILOG BRMS
Decisions in IBM Websphere ILOG BRMS Christian de Sainte Marie IBM WebSphere ILOG BRMS Business Rule Management Systems (BRMS) make the development and maintenance of an application that uses business
Component Based Development Methods - comparison
Component Based Development Methods - comparison Dan Laurenţiu Jişa Abstract: This paper realizes a comparison among three of the best known component based development methods, emphazing on the earlier
TR-3 Channel Editor. Software Manual
TR-3 Channel Editor Software Manual Trilithic Company Profile Trilithic is a privately held manufacturer founded in 1986 as an engineering and assembly company that built and designed customer-directed
CMMI Process Area Compliance with Formal Specification Based Software Development
CMMI Process Area Compliance with Formal Specification Based Software Development Satish Mishra Institute für Informatik Humboldt University, Berlin [email protected] Bernd-Holger Schlingloff
Luck or Skill? An Examination of the Ehrlich - Simon Bet
Luck or Skill? An Examination of the Ehrlich - Simon Bet Katherine A. Kiel, Victor A. Matheson, and Kevin Golembiewski July 2009 COLLEGE OF THE HOLY CROSS, DEPARTMENT OF ECONOMICS FACULTY RESEARCH SERIES,
City University of Hong Kong. Information on a Course offered by Department of Computer Science with effect from Semester A in 2014 / 2015
City University of Hong Kong Information on a Course offered by Department of Computer Science with effect from Semester A in 2014 / 2015 Part I Course Title: Topics on Computer Security Course Code: CS4293
Lizy Kurian John Electrical and Computer Engineering Department, The University of Texas as Austin
BUS ARCHITECTURES Lizy Kurian John Electrical and Computer Engineering Department, The University of Texas as Austin Keywords: Bus standards, PCI bus, ISA bus, Bus protocols, Serial Buses, USB, IEEE 1394
