Object-Oriented Technology: ECOOP ’97 Workshop Reader: ECOOP’97 Workshops Jyväskylä, Finland, June 9–13, 1997 Proceedings (Lecture Notes in Computer Science, 1357) 3540640398, 9783540640394

Jan Bosch Stuart Mitchell University of Karlskrona/Ronneby University of York Dept of Computer Science Dept of Computer

121 15 41MB

English Pages 569 [565] Year 1998

Report DMCA / Copyright

DOWNLOAD PDF FILE

Recommend Papers

Object-Oriented Technology: ECOOP ’97 Workshop Reader: ECOOP’97 Workshops Jyväskylä, Finland, June 9–13, 1997 Proceedings (Lecture Notes in Computer Science, 1357)
 3540640398, 9783540640394

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Citation preview

Lecture Notes in Computer Science Edited by G. Goos, J. Hartmanis and J. van Leeuwen

1357

Berlin Heidelberg New York Barcelona Budapest Hong Kong London Milan Paris Santa Clara Singapore Tokyo

Jan Bosch Stuart Mitchell (Eds.)

Object-Oriented Technology ECOOP’97 Workshop Reader ECOOP’97 Workshops Jyv¨askyl¨a, Finland, June 9-13, 1997 Proceedings

13

Series Editors Gerhard Goos, Karlsruhe University, Germany Juris Hartmanis, Cornell University, NY, USA Jan van Leeuwen, Utrecht University, The Netherlands

Volume Editors Jan Bosch Department of Computer Science and Business Administration University of Karlskrona/Ronneby S-372 25 Ronneby, Sweden E-mail: [email protected] Stuart Mitchell Department of Computer Science, University of York York, YO1 5DD, UK E-mail: [email protected]

Cataloging-in-Publication data applied for Die Deutsche Bibliothek - CIP-Einheitsaufnahme Object-oriented technology : ECOOP 97 workshop reader ; proceedings / ECOOP 97 workshops, Jyv¨askyl¨a, Finland, June 9 - 13, 1997. Jan Bosch ; Stuart Mitchell (ed.). - Berlin ; Heidelberg ; New York ; Barcelona ; Budapest ; Hong Kong ; London ; Milan ; Paris ; Santa Clara ; Singapore ; Tokyo : Springer, 1998 (Lecture notes in computer science ; Vol. 1357) ISBN 3-540-64039-8

CR Subject Classication (1991): D.1-3, H.2 ISSN 0302-9743 ISBN 3-540-64039-8 Springer-Verlag Berlin Heidelberg New York This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specically the rights of translation, reprinting, re-use of illustrations, recitation, broadcasting, reproduction on microlms or in any other way, and storage in data banks. Duplication of this publication or parts thereof is permitted only under the provisions of the German Copyright Law of September 9, 1965, in its current version, and permission for use must always be obtained from Springer-Verlag. Violations are liable for prosecution under the German Copyright Law. c Springer-Verlag Berlin Heidelberg 1998 Printed in Germany Typesetting: Camera-ready by author SPIN 10661353 06/3142 – 5 4 3 2 1 0

Printed on acid-free paper

ECOOP’97üWorkshopüReader Preface JanüBosch UniversityüofüKarlskrona/Ronneby DeptüofüComputerüScience SoftCenter,üS-372ü25,üRonneby,üSweden [email protected]

1

StuartüMitchell UniversityüofüYork DeptüofüComputerüScience York,üUnitedüKingdom [email protected]

Introduction

Althoughü becomingü moreü acceptedü inü softwareü industry,ü object-orientedü technology stillü isü anü activeü eldü ofü researchü withü manyü issuesü remainingü toü beü addressed.ü This workshopü reader,ü inü aü way,ü presentsü theü widthü ofü theü ongoingü researchü activitiesü in object-orientation.üHowever,üweüfeelüoneücanüclassifyütheseüactivitiesüintoüthreeücategories: • Domain-specic:üSeveralüactivitiesüfocusüonüaüsingleüapplication,üe.g.ütelecommunication,üorücomputer-science,üe.g.üreal-timeüandümobility,üdomain.üResearch triesütoüaddressütheüdomain-specicüproblemsüofüobject-orientedütechnology. • Designüissues:üObject-orientedüdesignühasübeenüanüissueüforüatüleastüaüdecade, butüoneücanüidentifyüanüincreasingüfocusüonüformalüapproachesüandüonütheüevolutionüandüre-engineeringüofüexistingüobject-orientedüsoftware. • Beyondü object-orientation:ü Theü object-orientedü paradigmü will,ü atü someü point, beüreplacedübyüaüsubsequentüparadigmüandüseveralüresearchüeffortsüinvestigate alternativeü orü extendedü approaches.ü Examplesü areü extendedü languageü expressivenessü for,ü e.g.ü designü patternsü andü frameworks,ü component-orientedü programmingüandüaspect-orientedüprogramming.

2

Contents

Theüremainderüofüthisübooküisüaüselectionüandüre-iterationüofütheücontributionsütoü12 workshopsü(ofüaütotalüofü15)üheldüduringütheüECOOP’97üconference.üTheüworkshops generallyürelateütoüoneüofütheüaboveücategories. PartüIüisüconcernedüwithütheüuseüofüobject-orientedütechnologyüforüinütelecommunicationsüdomain,üinüparticularüserviceüengineering.üDueütoütheübreakingüofütheümonopoly ofü traditionalü telecommunicationü providers,ücompetitionü hasüincreasedü rapidly.üSince theü competitiveü edgeü isü inü servicesü ratherü thanü connections,ü theü organisersü predictü a shiftü toü aü service-drivenü telecommunicationü market.ü Toü developü newü servicesü with shortütime-to-market,ülowücomplexity,ühighüreusability,üetc.,ütheüobject-orientedüparadigmüisüconsideredütoübeütheümostüsuitableücandidate.

Reectiveü real-timeü object-orientedü programmingü andü systemsü areü discussedü in PartüII.üReal-timeüsystemsühaveütraditionallyübeenüveryüstaticüwhichüresultsüinüchanges toüsystemübehaviourüduringütheüsoftwareülifecycleübeingüveryücostly.üAnüimportantüarea ofü real-timeü researchü isü howü toü makeü systemsü exibleü andü adaptiveü whilstü retaining guaranteesüaboutütheirütemporalüproperties.üReection,üi.e.ütheüabilityütoüperformücomputationü onü theü systemü itself,ü isü seenü asü aü potentialü mechanismü forü achievingü these goals. PartüIIIüdiscussedütheüproblemsüofüconventionalülanguagesüforütheüimplementation ofüdesignüpatternsüandüobject-orientedüframeworksüandünewüapproachesütoüdescribing andüimplementingüdesignüpatternsüandüframeworks.üOneücanüidentifyüthreeücategories ofü approaches,ü i.e.ü designü environmentü supportü visualizingü structuresü otherwise implicit,ü theü generativeü approach,ü i.e.ü aü toolü generatingü aü codeü skeletonü thatü canü be lledü inü withü application-specicü code,ü andü programmingü languageü extensionsü that provideürst-classürepresentationsüforüdesignüpatternsüorüframeworküconcepts. PartüIVüdiscussesütheüsemanticsüofüobject-orientedümodellingütechniques.üTheüparticipants,üamongüothers,üreactedüagainstütheütraditionalüsignature-basedüwayüofüdescribingü standards:ü Inü additionü toü aü preciseü syntax,ü alsoü preciseü semanticsü needsü toü be specied.üThisüwould,üamongüothers,üallowüforüdetectingüinconsistenciesüandüinaccuraciesüandüforücomparingüdescriptionsüforütheirüsemanticüequivalence. PartüVüisüconcernedüwithüdistributedüobject-orientedücomputing,üinüparticularümethodologicalüandüimplementation-orientedümodelsüandüformalümodellingütechniques.üThe participantsüconcludedüthatüenablingütechnologiesüsuchüasüCORBAüandüJavaüRMIüstill lacküaürmügroundüsinceünoüde-factoüstandardüofüdistributedüOOücomputingüexists.üOn theüotherühand,üitüisüunclearühowüformalünotationsüsuchüasüPetriüNets,üEstelleüandüLotos canü supportü theü object-orientedü paradigm.ü Finally,ü methodologicalü supportü forü these systemsüisüstillüinütheüearlyüstages. Partü VIü studiesü theü evolutionü andü re-engineeringü ofü existingü object-orientedü software.ü Evenü thoughü theü object-orientedü paradigmü isü oftenü thoughtü toü beü superiorü to olderüapproachesüwithürespectütoümaintenance,ütheülargeübodyüofücomplexüandüexpandingü object-orientedü softwareü isü placingü anü increasingü burdenü onü softwareü engineers. Theüevolutionüandüre-engineeringüofüobject-orientedüsoftwareüisüaücomplexüandümultifacetedüproblemüthatüneedsütoübeüstudiedüfromüseveralüperspectives. Theü modellingü ofü softwareü processesü andü artifactsü isü discussedü inü Partü VII.ü The relationütoüobject-orientedütechnologyüisütwofold.üFirst,üobject-orientedüsoftwareüdevelopmentürequiresü explicitü modellingüofüitsüprocessesü andüartifacts.ü Secondly,üsoftware processesüandüartifactsücanübeümodelledüusingüobject-orientedüprinciples. PartüVIIIüisüconcernedüwithücomponent-orientedüprogrammingü(COP).üCOPüisüoften referredütoü asütheü nextüstepü beyondüOOPüandüCOPüis,üamongüothers,üdifferentü inüthe focusü onü constructingü systemsü fromü independentlyü developedü components.ü Research issuesü includeü theü relationü toü softwareü architecture,ü theü non-functionalü requirements thatücomponentsüshouldüfullüandütheüglue-ingüofücomponentsüduringüapplicationüconstruction. Partü IXü presentsü theü doctoralü studentsü workshop.ü Differentü fromü theü otherü workshopsüthatüfocusüonüaütechnicalütopic,üthisüworkshopüpresentsüaüwideüvarietyüofüresearch topics.üInstead,ütheücommonüdenominatorüisütheücurrentüoccupationüofüitsüparticipants.

Nevertheless,ütheüpartüpresentsüanüexcellentüoverviewüofüongoingüresearchüactivitiesüin object-orientation. TheütopicüofüPartüXüisüobject-orientedüreal-timeüsystems.üDespiteüearlyüscepticism, object-orientedütechnologyühasübecomeümoreüwidelyüusedüinüreal-timeüsystems.üHowever,üthereüremainüseveralüresearchüissuesüsuchüasügeneratingücodeüfromüRTüspecications,ü validationü andü testingü ofü dynamicü behaviourü andü theü relationü betweenü objectorientedü real-timeüsoftwareüandü conventionalükernels.üInüthisüpartütheüfocusü isüonü the modellingüofüobject-orientedüreal-timeüsystemüandüonüimplementationütechniques. Aspect-orientedüprogrammingüisüdiscussedüinüPartüXI.üOneücanüidentifyüaügeneral awarenessüthatücodeütanglingüreducesütheüquality,üe.g.ümaintainabilityüandüreusability, ofü software.ü AOPü isü concernedü withü approachesü toü separatelyü describeü theü various aspectsüofüaücomponentüorüsoftwareüsystemüandütoücomposeüthemüatüaülaterüstage.üHowever,üvariousüapproachesütoüachievingüthisüseparationüofüconcernsücanübeüidentiedüand theüpartüdenesüaücharacterisationüofüAOPüandüidentiesüresearchüissues. PartüXIIüisüconcernedüwithüoperatingüsystems.üModernüoperatingüsystemsümust,üin additionütoütheütraditionalürequirementsüofüperformanceüandüusability,üfullüadditional requirementsüsuchüasüexibility,üadaptabilityüandüscalability.üTheüobject-orientedüparadigmü providesü propertiesü thatü helpü achieveü theseü requirements.ü Operatingü system issuesüdiscussedüinüthisüpartüare,üamongüothers,üreection,ücongurationüofüadaptable operatingüsystemsüandüvirtualümachines.

3

Aboutütheüdiversityüofütheüsubmissions

Aüworkshopüreaderüis,übyüitsünature,üveryüdiverseüinüitsücontributions.üThisüreaderüisüby noümeansüanüexceptionütoüthatürule.üTheücontributionsühaveüaüwideüdiversityüinütopicsüas wellüasütheüformüofüpresentation.üSomeüworkshopsüareürepresentedüonlyübyüaüworkshop reportü whereasü otherü workshopsü primarilyü presentü theü participantsü papersü andü spend limitedüeffortüonüsummarizingütheüworkshop.üAsüeditors,üweühaveügivenütheüorganisers muchüfreedomüinütheüpresentationüofütheirüworkshop.üWeüconsideredütheücontentsüofüthe partsü moreü importantü thanü theirü uniformityü andü weü doü notü believeü thatü thisü would decreaseüreadability.

4

Acknowledgements

Anüincredibleüamountüofüpeopleühasübeenüinvolvedüinücreatingüthisüworkshopüreader,üin particularüallüauthorsüandüworkshopüorganisers.üAsüeditors,üweümerelyücomposedütheir contributions.üThisüworkshopüreaderüpresentsüanüimportantücontributionütoüobject-orientedü researchü andü weü wouldü likeü toü expressü ourü sincereü appreciationü toü everyone involved.

                           

                            

                            

                              

                            

                                                                                                                                                                                              

                                                                                                                                                                  



  



                                              

                                                                                                                                         

                                                                                                          

                            



                                                                                                  



                                                                                                                                

                                                                                                                                      

   

  

        

                                                                                                                    





  

 

  

 







                                                     

                                                                                                                                        

 

 

   

   

    

  

 

 

 

    

   

 

   



  



                                                                                                       



 

 



                                       

                       

           

                                                                           

                  

                                                                                                                                                          

                              

                    

                                                                                                                                            

                                                                                   



                                                                                                                       

                                                                                                                            

                                                       

                                                                                                                                                                                                              

                                         

                                                                                               

                                                

                             ior model intended for the specication and the validation of distributed applications                                                                                          is an important requirement for a better specication of distributed application components. Indeed, without a precise, unambiguous and correct specications it is difcult                             available. The challenge is to provide effective specication and validation frameworks                                                                  [17]. A NMF-Ensenble denes a                       any behavior specication of involved managed objects. Object frameworks are a more                is to dene a suitable behavior model based on executable specications to allow the      In terms of expressiveness of the specication framework, nondeterminism and dy                                                                   

1

Specication Framework

                                                                              depending on the use of control abstractions to organize the specications of actions in  

            are dened. Putting this two notions together denes in its turn the concept of                                      coherent phase. The congurations of the system between its atomic transition steps dene naturally its states. The overall behavior of the system can be dened either by                   . This denes the concept of                                 ition systems are used by verication tools as a backend representation [2]. Because specication is a human activity the availability of higher level abstractions is mandatory to allow the specication of state                   



  

                                    calculi [9], or automatas as in automata based specication languages [16]. Processes                system into well identied and manageable pieces. Actions are typically organized on such control structures, i.e. actions are specied based on the local (control) states that are dened in each process / automata in the system. Because of the emphasis that is put on control issues in the conguration of the system such models are referenced as     An action is dened as in RM-ODP2 [15] very generally by anything happening in the system. One                        

1.4

Declarative Specication of Actions

                the sense that it contains both a specication of the conditions required for its activation, a specication of its effects, and a specication of any other constraint that it                 of the system. Effects are typically specied as data state changes, and constraints are assertional conditions on data states that have to be veried at well identied places,                                                            Since the conguration of the system is dened only w.r.t. data abstractions, such mod      





One of the rst models proposed for the specication of concurrent systems was Di                                        guarded commands is nondeterministically selected to be red. In general instead of                          contrast, control oriented models can be viewed as renements of data oriented models intended to model specic features of the real world. For instance, automata based            each step, the local control state in each automata / process denes the set of enabled                           knowledge is available and relevant at a give stage of specication. This implies that                 quencing within each process or automata. In ODP terms this implies that a signicant part of the engineering viewpoint issues are xed. A model of the actual distribution                                          specication of functional issues, an engineering viewpoint model is absolutely not re             framework, based on the declarative specication of actions, where control issues are specied minimally is more adapted for the purpose of functional modeling.



 

                          

where the contexts of utilization of objects has to reect the application requirements.             objects or object congurations. Each object is intended to fulll a well identied role in the conguration. The role can be used as an identier for objects [15] involved in specication of behavior, but this identier has a high level semantics value w.r.t. the                                                          A role denes a subtype for an object in the sense that an object fullling a role is still compatible with the core specication of the object itself, i.e. it still observes the interfaces dened on the core object. However, the behavior resu   interactions on such interfaces with other objects is dened w.r.t. the role. For instance specic state information may be associated to a role and updated                     with other objects are specied using object references based on the role identiers available in the object conguration, e.g. an object in the                      The advantages are that (i) much more expressive and readable behavior specications                                                                                                                              these variants need to be dynamically available. Note that the set of roles fullled may                                 modeling, they merely reect properties of real life systems. Interestingly, role model             used to model and analyze management policy conicts [10].

  The concept of relationship follows directly from the need to model conguration of                                                         

                            cations it turns out that the generic relationship model (GRM) [5] is suitable to dene                                         can not be dened precisely using GRM. In addition they are dened only using CMIS 



 

Validation of a specication consists to check the correspondence between informal requirements and the formal specication. Three techniques are commonly used :             specications.   consists to prove properties about a specication.                                                                                                     reasoning have been opposed for ages. Executable specications are often qualied                              than proving more general properties. However, with declarative specications it can               In addition, executable specications are much more prone to the involvement of users.               vides an excellent communication vehicle between users, speciers and developers. In                                        which is still a difcult problem in the currently available tools. Note that to allow for the executability of declarative specications of actions a precise execution semantics             





By deliberately limiting our ambitions to the specication and validation of functional               mation and computational viewpoint modeling. The declarative specication of actions

                                                 requirements. Roles dene object subtypes dynamically available, object congura              Finally, validation is based on the principle of executable specications. This is a prag                                      as telecom engineers both in terms of specication and validation.

                          (cæsar/aldebaran development package): A protocol validation and verication toolbox. In   3. Norbert E. Fuchs. Specications are (preferably) executable. Technical Report 92, Univer        ://ftp.i.unizh.ch/                            6. I.J. Hayes and Jones C.B. Specications are not (necessarily) executable. Technical Report         7. H. Jarvinen and R. Kurki-Suonio. DisCo Specication Language: Marriage of Action and        , 1991. Available at www.cs.tut..                 ior Specications                         10. Emil Lupu and Morris Sloman. Conict Analysis for Management Policies. In                                                                 16. C. C. I. T. T. Functional Specications and Description Language (SDL). Rec. z.100-z.104,                          

  

 



  

  

                              

                                                               

                       



                                                                                                                                                                                                                                                                                          

 

 

   

                                                                                                                                                                          

                               









                                                                          



























 























































    











                                



                                                                                                                   

 







              

                                                                          

                                          



    

  





                                                                 

                                                  

                    

                                                                                                                                                                                            

                             

                                                                                                                                                                                        

                            

                                                                                       

                                         

                                                                    

                                      

 

      

 

                                                                                  

    

    

                                                        

                                                                                                    

              

          

                

    



                                         

                                                       

                                                                                            

                                                                                         





                                                  

 



 

      



















                                      

                           

                                                                                  

 

            



                          



                     



                       



          



 

                                                                              

                                                                                                                                                                         

                          

                                                                                                     

                                                                                                                                                                                                               

                                                                

    





                                         



                                    

     













                                                                                              





  



  

                                                                                                                                                   

                                                                                                 

                                                                                           

               

                      

  

                



   



                 



        



        



                       



              



          



          





 





         

  

 





 







 

 

 

 

       



  



                                        

                                                                                                                                   

                                 





            

  



                



                 



         



       

               





                                       

                                                                    



                  

                       

               

                                        

      

   

                     

            

                                               





                                         





                                       

  

    

  

 

   

  

   

  

 

        

 

 

     

  





   













 



  





Weak Protection for Reective Operating Systems                     

           ple of the advantage of extensible operating systems. We have applied the reec                                                 ective operating system workable. We are currently developing this mechanism     

1 A Reective Operating System Although there are various denitions of reective systems, a typical reective system                                              . Also, (1) the reective systems should enable scope control by the users so that                             The two design criteria presented above are effective in most of reective systems such as the CLOS MOP [4] and OpenC++ [2], but they are not sufcient for designing reective operating systems. We need the third design criterion, which is               system from a malicious or wrong user program, a reective operating system also                                                                                                                                                                        

  To avoid serious performance overheads, our experimental reective operating system                                                                  signicantly reduced against the Mach’s approach. This is due to the fact that most of user-dened metaobjects are short programs and the costs of the interpretation is not  The operating system we developed is a preliminary version; the reective feature                                                                                     virtual memory status because our reective system allows the metaobject to access   To examine the benets of our customizable thread scheduler, we implemented three different scheduling policies on top of it. The rst policy uses time constraints and the                                                                                                           deadline-rst policy, which is the default policy of our scheduler. This policy is directly                                                                                                     default earliest-deadline-rst scheduler. The line marked “I/O” is by the scheduling with                                                                         

   



 



 







        

             default earliest-deadline-rst scheduler despite overheads by the interpretation. This is                            if the implemented scheduling policy is signicantly better than the default one, the    

                 real-time scheduling presented above, its inefciency due to interpretation limits the applicability of reection to operating system design. With an in-kernel interpreter, reection is effective only if the gain by customization is sufciently large. In fact, another                                                                                                            

                                                                                           ciency, the protection for metaobjects does not need to be as strict as that for user      Currently, we have two different implementations of the weak protection. The rst                          

    One of the reasons of the inefciency of the Mach’s approach is that a metaobject                                                                                                                                               local memory. It reads and modies this data structure and calls a library function again if it needs to write the modied data structure back to the shared memory. The coping                                                                                                         efcient than the library approach, but it restricts the kind of possible programming language. Another disadvantage is its less exibility; if the shared memory is protected by                                            metaobject more efciently after debugging is nished.



   

          

  

             64-bit address space is extremely large, a metaobject can be efciently isolated from                                                                                                   vantage is that it needs signicantly small runtime penalties. For inter-metaobject calls, it does not need TLB ush or a system trap but only a special calling convention. In                                                                                                                                                                                   

                                                                                                              signicant exibility to the users since they can customize the library and build their                                     

                                                                                4. Kiczales, G., J. des Rivi`                                                            

    







                                                         





                                                                                                                                                                                





                                      

             





                                                                                                                                                                                                                                                                                                                                    

                                                           

 

 

                                                                   





                                                                                                                            

                                                                                                                                                                                                                                                                        

 





                                                                                                                                                                                                                                   



                                                 





                                                                       





                                                                                                                         

     

                                                                                          





                                                                                                                        



                                                                              





                                                                                                                                                        

                                                            





                  

                                                                                    

                                                                



                            



                                                                                              

                                                     

                                         

                        



                                





                                                                                                                                                                                        

                                                                                                                                                                                                 

     

 

    



                                           





                                                                    





 



                               







                                                                                                                                                                                                





                                                     



                                                    





             





                                                               

Workshopüon LanguageüSupportüforüDesignüPatternsüandüFrameworks (LSDF’97) Introduction JanüBosch

GšrelüHedin

UniversityüofüKarlskrona/Ronneby DeptüofüComputerüScience SoftCenter,üS-372ü25,üRonneby,üSweden [email protected]

LundüUniversity DeptüofüComputerüScience Boxü118,üS-221ü00üLund,üSweden [email protected]

KaiüKoskimies UniversityüofüTampere DeptüofüComputerüScience Boxü607,üFIN-33101,üTampere,üFinland

ThereüisügrowingüinterestüinütheüroleüofülanguagesüinüemployingüreusableüOOüarchitectures.üInüparticular,üOOüframeworksüandüdesignüpatternsücanübeürelatedütoülanguagesüin variousü ways.ü Moreü concretely,ü weü recogniseü theü followingü topicsü whereü languages, patternsüandüframeworksücomeütogether: •

Languageüsupportüforüdesignüpatterns:üDesignüpatternsüareüprimarilyüusedüasüa designütechniqueüandüonlyülimitedüattentionüisüpaidütoütheirüimplementation.üA numberüofüresearchersühaveüinvestigatedüdifferentüwaysüofüprovidingülanguage supportüforüdesignüpatterns,üe.g.übyürepresentingüthemüasülanguageüconstructsüor byütemplateücodeügeneration.üHowever,ütheüissueüisüfarüfromüsolvedüandüshould beüinvestigatedüfurther.



Frameworküinstantiationülanguages:üLately,üsomeüauthorsühaveüproposedütheüuse ofüspecicüinstantiationülanguagesüforüframeworks.üEspeciallyüblack-boxüframeworksü inü wellü understoodü domainsü couldü benetü fromü suchü languages,ü since theyüsimplifyüinstantiationüofütheüframeworküconsiderably.üHowever,ütheüactual designüandüimplementationüofüsuchülanguagesüisünotüwellüunderstoodüandüneeds toü beü furtherü investigated.ü Also,ü whenü composingü frameworksü forü useü inü an application,ütheüinstantiationülanguagesümayüconictüwithüeachüother.



Frameworküextensionüsupport:ü Aü well-knownüproblemüwithüwhite-boxüframeworksüisüthatütheyüareüdifcultütoüextend.üOneümayüneedüquiteüdetailedüunderstandingüofütheüimplementationüofüframeworküclassesüinüorderütoüknowühowüthey shouldübeüsubclassed.üLanguageütechniquesümightübeüableütoülessenütheseüprob-

lemsübyügivingüsupportüforücheckingütheüextensionsüandügivingüframework-specicüeditingüsupportüforüdoingücorrectüextensions. •

Domainüspecicülanguageüextensionsütoüsupportüframeworks:üWhenüconstructingüorüusingüframeworküinüaüparticularüdomain,üthereümayübeüdomainüconcepts thatü areünotüeasilyüexpressedüasü classesü orüobjects.ü Suchüdomainüconceptsücan oftenü beü expressedü asü languageü constructsü andü reusedü asü such.ü Traditionally, softwareüengineersühaveüdealtüwithüthisüthrough,üforüexample,ütheüuseüofümacros andüpreprocessors,übutümoreüintegratedüandüstructuredüapproachesüareürequired.



Framework-basedü languageü implementation:ü Frameworksü provideü anü interestingü basisü forü implementingü domain-orientedü languages:ü generalü domainü concepts,üpresentedüasüabstractüclasses,ücanübeüspecializedüintoüconcreteülanguage structuresüandüreusedüinümanyülanguages,üallowingüfastüdevelopmentüofüdomainorientedü languages.ü Althoughü thereü areü toolsü supportingü this,ü theü processü of derivingülanguagesüfromüabstractüconceptsüisünotüwellüunderstood.

Theügoalüofüthisü workshopüwasü toü bringütogetherüresearchersüactiveüinütheüaforementionedüareasüandütoüprovideüanüinteractiveüforumüforütheüexchangeüofüideas,üresults,üand openü problemsü inü thisü area.ü 14ü submittedü papersü wereü selectedü forüpresentationü and, whenücombined,ütheyücoverümostüofütheüidentiedütopics. Toüobtainüaühighüdegreeüofüinteractionüatütheüworkshop,ütheüpresentationsüwereükept short,ü andü afterü eachü sessionü consistingü ofü 2-4ü papers,ü aü 15ü minuteü panelü discussion withütheüsessionüauthorsüwasüheld.üAtütheüendüofütheüworkshop,üanü“open-mike”üsession wasüheld,üallowingüalsoünon-authorüparticipantsütoüinitiateüaüdiscussionüonürelatedütopics.ü Thisü schemeü workedü outü veryü well,ü givingü goodü discussionsü andü anü interactive informalüatmosphere. InüthisüWorkshopüReaderü3-4üpagesüsummariesüofüallütheüpapersüareüpresented.üThe fullüpapersüareüavailableüelectronicallyüat http://www.ide.hk-r.se/~bosch/lsdf/. Theüpapersüwereüpresentedüinüveüsessions,übrieyüintroducedübelow. MessageüInterceptionüforüDesignüPatternüImplementation Thisüsessionü containedütwoüpapersü discussingü theüimplementationüofüdesignüpatterns. Boschü introducedü theü sessionü andü theü workshopü byü describingü theü problems, approachesüandürequirementsüofüprovidingülanguageüsupportüforüobject-orientedüframeworksüandüdesignüpatterns.üAsüexamples,ütheüsolutionsüdevelopedüinütheülayeredüobject modelüwereüdiscussed.üAlsoDucasseüintendsütoüdescribeüdesignüpatternsüasürst-class entities.üTheseüentitiesüareüspeciedüasütemplatesüandütheirüinstancesüinterceptümessages betweenüobjectsüinvolvedüinütheüdesignüpattern. RelationsüofüGeneral-PurposeüLanguages,üFrameworksüandüDesignüPatterns Thisüsessionüwasüintroducedübyüaüpaperüby GilüandLorenzüdiscussingütheürelationships betweenüdesignüpatternsüandüprogrammingülanguages,üandühowüfarüpatternsüinüdifferent categoriesüareüfromübeingüactualülanguageüfeatures.üTheüfollowingüpaperüby Agerboüand Cornilsümadeüthisüdiscussionümoreüconcreteübyülookingüinüdetailühowütheüprogramming languageüBETAüsupportsüparticularüdesignüpatterns.üTheünalüpaperüinüthisüsession,üby

DeüVolderüandDeüMeuter,üdiscussesühowütypeüsystemsüfromütheüfunctionalüprogrammingücommunityümightühelpüinüconstructingüreusableüOOüframeworks. Specication,üconsistencyüandüimplementationüofüdesignüpatterns Theürstüpaperüinüthisüsession,üby EdenüandYehudai,üpresentedüanüapproachüwhereüpatternüsolutions,ü“lattices”,ücanübeüspeciedübyütheüuseüofüaühierarchyüofü“tricks”,üdening lowerü levelü patternü solutions.Hedinü presentedü anüapproachübasedü onü attributeü grammarsü forü supportingü automaticü checkingü thatü theü patternsü areü appliedü consistentlyü in sourceücode,üwithütheüaimüofüsupportingüframeworküusageüandümaintenanceüofüsource codeüusingüpatterns.Jacobsenüproposedütheüuseüofüanü“extractülevel”ütoüviewüprogram codeüatüaümoreüabstractüconceptualülevel,üforüexampleütoüviewüdesignüpatternüapplications. Frameworküdenitionülanguages Matthijs, Joosen,üandRobbenüreportedüonüexperienceüfromüdeningüaüspecialülanguage forüaüframeworküforüconcurrentüdistributedüprogramming,üwithütheügoalüofüsimplifying frameworkü usage.ü Toü provideü anü openü implementation,ü theü frameworkü objectsü were madeüavailableüasümetaüobjectsüinütheünewülanguage. Bjarnasonüdiscussedüaütechnique forü supportingü framework-specicü languageü extensions,ü basedü onü APPLAB,ü anü integratedülanguage-designüenvironment.Peres, Malcolm, Vortman,üandZodiküpresentüan exampleüofüaüspecializationülanguage;ütheirülanguageüdenesüspecializationsüforüaüGUI framework. Nowacküproposesütheünotionüofüaüframeworkücomponent.üAüframeworkücan beü describedü asü aü setü ofü interrelatedü frameworkü components,ü eachü describingü an abstractionüoverüaü partü ofüaü framework.üAü frameworkü componentüorganizesü aüframeworküintoümoreüunderstandableü unitsü providingüexplicitü collectionsü ofüadaptableü hotspots. Languageüimplementationüframeworks Theülastüsessionüdiscussesütheürelationsüofüframeworksüandülanguagesüfromütheüperspectiveüofülanguages:ühowücouldütheüframeworküconceptübeüexploitedüinütheüimplementationüofütextualüorüvisualülanguages.üInütheüpaperüby Harsu,üHautamŠkiüandüKoskimies anüarchitectureüisüpresentedüforüaüframeworküsupportingüanalysisüofütextualülanguages. Theüframeworküandütheüaccompanyingügraphicalütoolü(TaLE)üisübasedüonüaüexibleütopdownüparsingüschemeüwhichüallowsütheüfreeücombinationüofüclassesürepresentingüvariousülanguageüstructures,üthusüfacilitatingühighüdegreeüofüreusabilityüofülanguageücomponents. Tuovinenü presentsü aü similarü frameworkü forü visualü languagesü basedü onü the atomicürelationalügrammarümodel.üThisüapproachümakesüuseüofüaügrammarüspecicationüofütheüvisualülanguageütoübeüimplemented.üTheüframeworküallowsüfastüdevelopment ofü variousü diagramü editorsü supportingü theüconstructionü ofüstructuresüfromüvisualü elements.üImplementingülanguagesüwithüframeworksüisüanüattractiveüapproachüespecially inüsituationsüwhereü theülanguageüisüconstantlyüevolvingüorügrowing.üThisümayübeü the caseüforüframeworküspecializationülanguages:üifüaüframeworküisüspecializedüintoüaümore narrowüframework,üitsüspecializationülanguageümayüalsoühaveütoüspecialized.





 

 











                                                                                                             

                                         

 

 





  



           

         

               

   

                                                                                                                                                   

  

 

                                                      

                                                                                                                              





                                                                                                                                                                         

                                                                                 

                                                                     

                

                                          

                                                    

Multi-levelüpatterns FranküMatthijs,üWouterüJoosenü(+),üBertüRobbenü(*), BartüVanhaute,üPierreüVerbaeten Dept.üofüComputerüScienceü-üK.U.Leuven,üBelgium E-mail:ü[email protected] (*)üResearchüAssistantüforütheüBelgianüNationalüFundüforüScientificüResearch (+)üResearcherüforütheüFlemishüI.W.T.

Abstract It’sünoüsecretüthatüinstantiatingüframeworksücanübeüaütediousüprocess.üInüthisüpositionüpaper, weüproposeüourüsolutionütoütheüproblem,üwhichüconsistsüofüprovidingüanüapplicationüprogrammer withü aü languageü thatü supportsü highü levelü abstractions,ü andü automaticallyü instantiatingü the underlyingüframeworksübasedüonütheücodeüwrittenüinüthatülanguage.üApplicationüprogrammers useü onlyü theü language,ü notü theü underlyingü frameworks.ü Whileü thisü hidesü theü frameworks’ abstractions,üweücanümaintainütheüopenüarchitectureüofütheüframeworksübyümakingütheüinteresting objectsüfromütheühiddenüframeworksüavailableüagainüasümeta-objectsüatütheülanguageülevel.üThis leadsü toü aü systemü whereü objectsü (e.g.ü patternü participants)ü liveü atü threeü differentü levelsü of abstraction:ütheüobjectsüthatüareühiddenüinütheüunderlyingüframeworks,ütheübase-levelülanguage objects,üandütheümeta-levelülanguageüobjectsüthatüareüincarnationsüofütheüinterestingüobjectsüfrom theüunderlyingüframeworks.

1.üIntroduction Frameworksüareüimportantütoüleverageütheübenefitsüofüobjectütechnology,üandüallow forüreuseünotüonlyüofücode,übutüalsoüofüanalysisüandüdesign.üHowever,ücomplexüframeworksüareüdifficultütoüuse,übecauseütheüprogrammerühasütoüknowütheüframeworküatühand veryü well.ü Moreover,ü followingü allü theü necessaryü stepsü forü usingütheü frameworkü can becomeütedious.üAüpossibleüsolutionüweüproposeüinüthisüpositionüpaperüisütoüprovideüthe programmerüwithüaülanguageüthatüsupportsühigherülevelüabstractions.üTheücodeüthatüis writtenüinüthisülanguageüisüautomaticallyütranslatedüintoüanüinstantiationüofütheüunderlyingüframeworks. Ourümainüareaüofüexpertiseüisüinüdevelopingüobjectüsupportüsystemsüforüdistributed computerüarchitecturesü(e.g.ü[Bijnens]).üInüourüdevelopmentüprototypes,ütheüunderlying objectüsupportüsystemüconsistsüofüaüsetüofüdifferentüframeworksüthatüareüwrittenüinüC++. Weü haveü currentlyü builtü aü prototypeü ofü theü objectü supportü systemü runningü onü Dec Alpha,üSunüSolarisüandüSGI. Thisüpositionüpaperüisüstructuredüasüfollows:üweüfirstühighlightüinüsectionü2üaütypical patternüusedüinütheüobjectüsupportüsystemü(theüActiveüObjectüpattern),üandüweüillustrate inüsectionü3ütheühigherülevelülanguageüinterfaceüweüuseütoüexploitütheüframework.üSectionü4üdiscussesühowüweücanümaintainütheüopenüarchitectureüofütheüframework,üdespite theüfactüthatüit’sühiddenüforüanüapplicationüprogrammer.üThisüapproachüleadsütoümultilevelüpatternsüwhereüsomeüparticipantsüliveüinütheüsupportüframework,ühiddenüforüthe programmer,üandütheüappealingüparticipantsüliveüatütheülanguage’sümeta-level,üavailable forücustomizationübyüanüapplicationüprogrammer.üWeüconcludeüinüsectionü5. Thisü paperü isü aü shorterü versionü ofü theü originalü paper,ü whichü canü beü foundü inü the LSDFüworkshopüproceedings.

2.üActiveüObjectsüasüanüExample Theüaimüofüourüobjectüsupportüsystemüisütoüsupportüconcurrent,üobjectüoriented,üdistributedü applications.ü Toü thisü end,ü theü systemü isü builtü asü aü frameworkü incorporating manyü patternsü commonlyü usedü inü suchü systems,ü suchü asü variationsü ofü Threadü Pool [Schmidt],üThreadüSpecificüStorageü[Schmidt],üProxyü[Gamma],üCommandü[Gamma], Stateü[Gamma],üandüActiveüObjectü[Schmidt]. Inüthisüsection,üweüwillüillustrateütheüuseüofütheüframework,üspecificallyürelatedüto theü Activeü Objectü pattern.ü Noteü thatü theü Activeü Objectü patternsü asü describedü in [Schmidt]üisüconcernedüonlyüwithünon-distributedüconcurrentüprogramming.üSinceüwe specificallyü targetü distributedü concurrentüprogramming,ümanyü ofü theü patternsü weüuse (includingütheüoneüweüillustrateühere)üareüvariationsüofü“offütheüshelf”üpatterns. TheüActiveüObjectüpatternüessentiallyüallowsüanüobjectütoüexecuteüaümethodüinüaüdifferentü threadü thanü theü oneü thatü invokedü theü method.ü Thisü isü achievedü byü givingü the activeüobjectüanüactivationüqueueüthatüstoresüpendingüinvocations,üandübyüsupplyingüthe activeüobjectüwithüaüthreadüofüitsüown,üthatücontinuouslyüretrievesüanüinvocationüfrom theüactivationüqueueüaccordingütoüsomeüsynchronizationüconstraints,üandüexecutesüits associatedümethod. Inüorderütoücreateüanüactiveüobjectüinüourüframework,ütheüuserühasütoügoüthroughüthe followingüstepsü(essentiallyüdictatedübyütheüpattern): 1. Forü eachümethodüXüinütheü activeüobject’süinterface,ü createüaüclassüsoüthatümethod objectsü thatü representsü theü invocationsü onü Xü canü beü instantiatedü fromü it.ü Each methodüobjectücontainsütheüparametersüofütheüinvocation. 2. Aümethodücallüonüanotherüobjectüisüimplementedübyücreatingüanüinstanceüofütheücorrespondingümethodüclassüandüputtingüitüinütheüdestinationüobject’süactivationüqueue. Itüisütheüclient’süresponsibilityütoüperformütheseüsteps. 3. UnlikeüSchmidt’süActiveüObjectüpattern,üwhereüsynchronizationücodeüspecicütoüan activeü objectü hasü toü beü incorporatedü inü theü activeü object’sü dedicatedü scheduler object,üourüactiveüobjectüpatternüusesüaügenericüSchedulerüobjectüthatüdefersütheütestingüofütheüpreconditionü(guard)ütoütheümethodüobjects.üOfücourse,ütheüspecicüsynchronizationücodeüstillühasütoübeüwritten. Weübelieveüthatüactiveüobjectsüareükeyüabstractionsüinüaüconcurrent,üobjectüoriented environment.üHowever,ütheüprocessüofüdefiningüactiveüobjectsüasüdescribedüaboveügets tediousü whenü theü applicationü programü usesü moreü thanü justü aü fewü activeü classesü and methods.üInütheünextüsection,üweüshowühowülanguageüfeaturesücanübeüusedütoüalleviate theüproblemüweühaveüillustratedüinüthisüsection.

3.üIntroducingütheüCORRELATEüLanguage CORRELATEü isütheülanguageüweüuseütoüexploitüourüobjectüsupportüsystem.üThis languageü emergedü asü aü naturalü successorü toü ourü earlyü purelyü framework-based approach.üKeyüabstractionsüfromütheüframeworkü(suchüasüactiveüobjects)üareüpresentüin theülanguage,üwhereütheyücanübeümanipulatedüandüusedüatüaühigherülevel. CORRELATEüisüaüclass-basedüconcurrentüobject-orientedülanguage.üWhileüCORRELATEülooksüaülotülikeüC++,üitsücomputationalümodel,üunlikeüthatüofüC++,üisübased onü concurrentü objects.ü Dueü toü spaceü constraints,ü weü don’tü coverü CORRELATEü featuresüsuchüasüautonomousümethodsüorüsynchronization,übutüinsteadüweüfocusüsolelyüon

supportü forü activeü objects.ü Weü referütoü [Joosen]ü forü aü moreü elaborateü CORRELATE overview. Aü CORRELATEü applicationü consistsü of activeü objectsü thatü interactü byü sendingü messagesü (invokingü operations).ü CORRELATE supportsü bothü synchronousü andü asynchronous messageü passing.ü Becauseü weü believeü that activeüobjectsüareükeyüabstractionsüinüaüconcurrent,ü objectü orientedü environmentü (exactlyü theü environmentü targetedü byü CORRELATE),üactiveüobjectsüareüavailableüatütheülanguageülevel.üTheüdeclarationüofüanüactive classüinüCORRELATEülooksülikeütheücodeüexampleütoütheüright. Anüimmediateübenefitüisüthatüthisüformümakesüitümuchüeasierüforüanüapplicationüprogrammerütoüactuallyüuseüactiveüobjects.üInütheüCORRELATEürun-time,üweüstillüuseüthe Activeü Objectü patternü toü implementü theseü activeü objects.ü Theü run-timeü containsü the “fixedüparticipants”üofütheüpattern,ünotablyüActivationüQueueüandüScheduler,üwhileüthe “variableüparts”üofütheüpatternü(suchüasütheüvariousümethodüobjectsüandütheüsynchronizationücode)üareüautomaticallyügeneratedüfromütheüaboveüCORRELATEücode. Atü theü client’sü side,ü invocationsü onü active objectsü noü longerü requireü creatingü method objects.ü Theü applicationüprogrammerücanüsimplyüwriteücodeülikeütheüfragmentüonütheürightüfor anüasynchronousüinvocationüofüMethod1üonü_my_server,üusingüxüasüparameter.üThisüis automaticallyütranslatedüinütheücreationüofüaümethodüobject,üasüinütheüpreviousüsection. ThanksütoütheülocationütransparencyüofferedübyüCORRELATE,ütheümethodüobjectüautomaticallyüreachesütheüdestinationüactiveüobject,üwhereüitüisüputüinütheülatter’süactivation queue. CORRELATEüprogramsüareüthusütranslatedüintoüanüinstantiationüofütheüunderlying supportü framework.ü Theü resultü isü thatü programmersü programmingü inü CORRELATE neverüuseütheübasicüabstractionsüofüourüframeworküdirectly.üTheyüevenüaren’tüawareüof theüframework,üandüdon’tüneedütoüknowüitsüinterface.üAsüfarüasütheüCORRELATEüprogrammersüareüconcerned,ütheülanguageüwithüitsüconcurrentüobjectsüisütheirüAPI.

4.üReopeningütheüSystem Oneü problemü withü automaticallyü generatingü anü instantiationü ofü aü frameworkü by translatingü CORRELATEü code,ü isü theü dangerü ofü losingü theü openü architectureü ofü the framework.üIndeed,üprogrammersüdon’tüevenügetütoüseeütheüframeworküinütheüapplication.üToüsolveüthisüproblem,üweüexposeütheüimportantüabstractionsüofütheüframeworküby introducingü themüasü concurrentü objectsüinü theüCORRELATEülanguage.ü Theüresultü is that,üwhileüinügeneralüCORRELATEüprogrammersüareünotüawareüofüallütheüabstractions ofütheüframework,ütheyüareüexplicitlyüawareüofütheüimportantüones,übecauseütheseüare availableüasüobjectsüwithüwhichütheyücanüinteractüandüwhoseübehaviourütheyücanüalter. TwoüsuchüimportantüabstractionsüareütheüSchedulerüandütheüActivationüQueueü(both participantsü ofü theü patternü describedü inü sectionü 2).ü Togetherü withü aü numberü ofü other importantüaspectsüofütheüunderlyingürun-timeüsystem,ütheyüareüavailableüinütheüCORRELATEü languageü asü MetaObjectü objects.ü Inü CORRELATE,ü eachü objectü canü haveü its

ownüindividualümetaobject.üAümetaobjectüisüresponsibleüforücreationüandüdestructionüof itsübase-levelüobject,üforümanagingütheüactivationüqueue,üforüdeterminingüwhichümethod willübeüexecuted,üandüforüforwardingüinvocations.üEachümetaobjectücanübeüspecialized inütheüCORRELATEülanguage. Usingü thisü approach,ü weü notü onlyü obtainü anü openü environment,ü butü weü canü very explicitlyücontrolütheüdegreeüofüopenness,übyüidentifyingütheücomponentsüweüwantüto expose.üInüourüActiveüObjectüpatternüexample,üweüonlyüexposeüpartüofütheüparticipants, namelyütheüactivationüqueueüandütheüscheduler. Anotherü exampleü ofü thisü approachü isü theü RoutingProtocolü classü inü theü I/Oü subframeworkü ofü ourü system.ü Thisü classü encapsulatesü theü protocolü thatü determinesü the routingütablesüthatüareüusedütoürouteütheüinvocationümessagesütoütheirüdestination.üThe applicationüprogrammerücanücustomizeüthisüprotocolütoücreateüaüroutingüprotocolüthatüis optimisedüforüaüspecificüapplicationü[Matthijs].

5.üDiscussion Aütrivialüadvantageüofüourüapproachüisüthatüitübecomesümuchüeasierüforüanüapplicationüprogrammerütoüuseüourüframework.üTheüprogrammerücanüconcentrateüonütheüdifficultiesü ofü theü applicationü domain,ü withoutü havingü toü rememberü howü toü useü the framework. Aü secondü advantageü isü thatü theü languageü levelü interfaceü canü remainü stableü even whileütheüunderlyingüframeworksüevolve.üThisüisümainlyüanüadvantageüinüenvironments suchüasüoursüwhereütheüframeworksüthemselvesüareüsubjectütoüstudy,üwhichüsometimes resultsüinüchangesütoüinterfacesüandüfunctionality. Aüpotentialüproblemüwithütheüapproachüisüthat,übyüexposingümoreüandümoreücomponentsüatütheülanguageülevel,üweümayüendüupüwithüaücomplexümeta-levelüframework:üthe baseülevelüframeworküisüconvenientlyühidden,übutüallüappealingüobjectsüareüexposedüat theülanguageülevel,üandütheyüthemselvesüinteractüandümayüformüaüframeworküofütheir own.üOurüexperienceüshowsüthatütheüframeworküatüthisülevelüwillünotübeüasücomplexüas theüoriginalüone,übutütheüaspectsüandüimplicationsüofüthisüapproachüareücertainlyüsubject toüfurtherüstudy.

6.üReferences [Bijnens] Stijnü Bijnens,ü Wouterü Joosen,ü andü Pierreü Verbaeten.ü Aü Reflectiveü Invocation SchemeütoüRealiseüAdvancedüObjectüManagement.üInüObject-BasedüDistributedüProgramming,üLectureüNotesüinüComputerüScienceü791,ü1994. [Gamma] ErichüGamma,üRichardüHelm,üRalphüJohnson,üJohnüVlissidesüDesignüPatterns,üElementsüofüReusableüObject-OrientedüSoftware.üAddisonüWesley,ü1994. [Johnson] Ralphü Johnson.ü Documentingü Frameworksü usingü Patterns.ü Inü Proceedingsü of OOPSLAü‘92. [Joosen] WouterüJoosen,üBertüRobben,üJohanüVanüOeyen,üFranküMatthijs,üStijnüBijnensüand Pierreü Verbaeten.ü Developingü Distributedü Applicationsü usingü theü CORRELATE MOP.üDept.üofüComp.üScience,üKULeuvenüBelgium,ütechnicalüreport. [Matthijs] FranküMatthijs,üYolandeü Berbers,üWouterü Joosen,üJohanüVanüOeyen,üBertüRobben andüPierreüVerbaeten.üTowardsüflexibleüI/Oüsypportüinüparallelüandüdistributedüsystems.üInüProceedingsüofüPDCSü‘96. [Schmidt] DouglasüSchmidt.üDesignüPatternsüforüConcurrent,üParallel,üandüDistributedüSystems. http://www.cs.wustl.edu/~schmidt/patterns-cpd.html



 



 

















  







 







 







   



 

 





 

 



   



 

 

    

                                                                             

                                                                                                                                                               

 

                                                                                                                                                                                                                                 









                                                                                                    

                                          

                                    

ToolüSupportüfor Framework-SpecicüLanguageüExtensions ElizabethüBjarnasonüandüGšrelüHedin DeptüofüComputerüScience,üLundüUniversity Boxü118,üSE-221ü00üLund,üSweden e-mail:ü{Elizabeth.Bjarnasonü|üGorel.Hedin}@dna.lth.se

Abstract.ü Theü conventionsü connectedü toü theü useü ofü object-oriented frameworksü canü beü describedü byü framework-specicü languageü extensions.üTheüprogrammerüisüthenüaidedüinüwritingümoreücorrectüprograms. Inü anü integratedü structure-orientedü language-designü environmentü such languageüextensionsücanübeüsupportedüinternally.

1

Introduction

Whiteü boxü frameworksü areü knownü forü beingü hardü toü useü sinceü theyü requireü detailed knowledgeüofütheüinternalüstructureüofütheüframework[Joh88],üandüthatüaünumberüofüprogrammingüconventions[Hed97]ümustübeüadheredütoüwhenüusingütheüframework.üFailure toüfollowütheseüconventionsümayüleadütoüunpredictableüerrorsüwhichüareüoftenüleftüundetectedü untilü run-time.ü Framework-specicü languageü extensionsü whichü captureü these conventionsüallowü suchüerrorsütoübeüdetectedüandüreportedütoütheüprogrammerü before theüprogramüisüexecuted.üThisüisüespeciallyüusefulüwhenüworkingüinüanüintegratedüprogrammingü environmentü sinceü editingü supportü forü theü framework-specicü syntaxü and semanticsücanüthenübeüsupplied.üAlso,üinüsuchüanüenvironmentüdebuggingücanübeüsupportedüinütermsüofütheüextendedülanguageüratherüthanüinütermsüofütheüinternalücodeüofüthe framework.üTheüdesignüandüimplementationüofüframework-specicüextensionsücanübe madeüeasierübyüsupplyingüsupportüforüsuchülanguageüextensionsüinüanüintegratedüstructure-orientedü language-designü environment.ü Theü syntax,ü static-semantics,ü andü code generationüforütheülanguageüextensionsüareüthenüdenedüinütermsüofüaübaseülanguage. Theü proposedü techniquesü forü handlingü suchü languageü extensionsü areü intendedü toü be usedüinüourülanguage-designüenvironment,üAPPLABü[Bja96,üBHN97],ütoüsupportüthe interactiveüdesign,üdevelopmentüandüuseüofüframework-specicülanguageüextensions. APPLABücurrentlyüsupportsütheüinteractiveüdevelopmentüofülanguages.üAülanguage canübeüdesignedübyüeditingüaügrammarüdescription,üandüanüexampleüprogramücanüsimultaneouslyübeüeditedüinütheünewü(changing)ülanguage.üTheüeditorüused,übothüforügrammarsüandüprograms,üisüstructure-orientedüandübasedüonügrammarüinterpretation.üThatüis, itü interpretsü theü currentü grammarü descriptionsü inü orderü toü supplyü language-specic behaviourütoütheüprogramüeditor.üEditingüisüperformedüonütheüabstractüsyntaxütreesüof theüprograms,üandünotüatütheütextülevel.üTextüeditingüofüsubtreesüisüsupportedübyüinvokingü aü grammar-interpretingü parser.ü Theü static-semanticsü andü codeü generationü is expressedübyüstandardüAGsüusingüanüobject-orientedüspecicationülanguage.

2

SupportüforüLanguageüExtensions

Figureü1üshowsühowütheügrammarüforüaübaseülanguage,üG BL,üisüextendedüforüaüframework,üFW.üTheüframeworküisüprogrammedüinütheübaseülanguage,üwhereasütheüapplicationüprogramüAPüisüprogrammedüinütheüextendedülanguageüG BL+FW.üTheügrammarüfor theüextensions,üGFW,ücanüaccessütheüframeworkütoüimplementütheücodeügenerationüofüthe newülanguageüconstructs.üBecauseütheüextendedülanguageüimportsütheübaseülanguage, ratherüthanücopyingüitsüdenition,üchangesümadeütoütheübaseülanguageücanübeüautomaticallyüincorporatedüintoütheüextendedülanguage.üSuchüchangesüofütheübaseülanguageümay beüfairlyüfrequentüinüanüinteractiveülanguage-designüenvironmentüsuchüasüAPPLAB.

GBL Extends GFW

Programmedüin FW Accesses

Programmedüin

Grammar Program

AP

Figureü 1. Theü dependenciesü betweenü theü languageü descriptionsü ofü theü baseü language,üGBL andüofütheüframework-specicülanguageüextensions,üG FW,ütheüframework, FW,üandüanüapplicationüprogram,üAP,üexpressedüinütheüextendedülanguage,üG BL+FW.

2.1

SubclassingüExistingüLanguageüConstructs

Whenüextendingüaülanguageüwithünewüconstructsüitüisüdesirableütoüreuseüasümuchüasüpossibleü ofütheüexistingüimplementation,ü asüwellüasübeingü ableütoüaddünewüfeatures.ü Inüa declarativeüsystemüusingüanüobject-orientedügrammarünotationüthisücanübeüdoneübyüsubclassingü existingü grammarü rules.ü Theü newü languageü constructü thenü inheritsü the attributesüandürulesüofütheüinheritedügrammarüspecication.üNewüfeaturesücanübeüadded byü deningü additionalü attributes,ü andü existingü featuresü canü beü modiedü byü reimplementingütheüexistingürulesüinütheügrammarüspecicationüofütheünewülanguageüconstruct. Considerü anü exampleü takenü fromü robotü programmingü whereü aü baseü languageü is extendedübyüaddingüaüconstructüforümovingütheürobotüarm.üTheünewüconstruct, MoveTo, isüdeclaredüasüaüsubclassüofütheüexisting Statementüdeclaration.üPartüofütheüspecication ofütheüextendedülanguage,GROBOT,üisüasüfollows: MoveTo::=Statementü(ü“move”ü“to”üExp) (*üStatementüforümovingütheürobotüarm.ü*) constructüinütermsüofütheüframeworkü*) (*üstaticüsemantics:

};

(1)

(3)

(*ücodeügeneration: (4) üwhichücomputeütheücodeütoügenerateübyüusingütheüexpansionütree*)

Theüabstractüandüconcreteüsyntaxü(1)üareüspecied,üintroducingütheünewükeywords move and to,üandüstatingüthatüa MoveTo-statementücontainsüanExp-part.üStatic-semanticürules thatüensureüthatütheüexpressionü( Exp)ürepresentsüaücoordinateüareüaddedü(3).üTheücode generationü forü theMoveTo-constructü (4)üinvolvesü generatingü aü callü toü theü framework usingütheüdenedüexpansionütreeü(2). 2.2

ExpansionüTrees

Aüprogrammerüusingü anü extendedü languageüisü onlyüinterestedüinü seeingü theünewülanguageüconstructsüandü theirüsyntax.ü Theüsystem,üonü theüotherühand,üneedsütoüconsider howütheünewüconstructsüareüimplementedüinütermsüofütheübaseülanguageüandütheüframework,üinüorderütoücorrectlyüperformücodeügenerationüandüstatic-semanticüchecking.üInüa systemü whoseü internalü representationü ofü programsü isü basedü onü abstractü syntaxü trees, ASTs, expansionütreesücanübeüusedüforürepresentingütheünewülanguageüconstructs.üSimilarlyütoü macrosüwhichüareü notü expandedü untilücompileü time,ü expansionü treesü areünot constructedü untilü anü attributedü syntaxü treeü isü evaluated.ü Thisü canü beü doneü byü using Higher-Orderü Attributeü Grammars[VSK89]ü whichü allowü aü nodeü inü theü treeü toü be denedübyütheüvalueüofüanüattribute.üWeüwantüsuchünodesütoübeüinvisibleütoütheüuser,übut usedübyütheüsystemütoüperformüattributeüevaluation,üandüthusücodeügenerationüandüstaticsemanticüchecking.üSinceütheüstructureüofüanüexpansionütreeüfollowsütheübaseülanguage theüsystemücanüevaluateüitsüattributesüinütheüsameüwayüasüforütheüotherüpartsüofütheüprogramütree. Partü ofütheü ASTü forü aü programü usingü theüextendedü language GROBOT ü isü shownü in Figureü2.üTheüexpansionütreeüconnectedütoüthe MoveTo-nodeücontainsüaüprocedureücall ofüthe MoveLinear-methodüofütheüframework.üNote,üthatüaüreferenceübacküintoütheüprogramüASTüisüusedütoüaccessütheüuser-denedücoordinates,üwhileütheüotherücoordinates areüdenedübyütheülanguageüextension. GBL+ROBOT üProgram MoveTo ProcCall

“MoveLinear”

CoordExp x

y

z

ActPars

Figureü2. Partüofütheüabstractüsyntaxütreeüforüaüprogramüexpressedüinütheüextended languageüGBL+ROBOT.

3

ConclusionsüandüFutureüWork

Framework-specicülanguageüextensionsüwhichüsupplyüframework-specicüsyntaxüand enforceütheüconventionsüofü theüframeworkümakeüitüsaferüandüeasierütoüuseüobject-orientedü frameworks.ü Anü object-orientedü grammarü notationü allowsü newü languageü constructsü toü beü addedü byü subclassingü existingü grammarü rules.ü Theü newü constructsü can eitherü reuseü theü properties,ü likeü syntaxü andü semantics,ü ofü theü existingü languageü constructs,üorüspecifyünewüsyntax,üsemanticsüetc..üWhenüworkingüinüaüprogrammingüenvironmentüwhichürepresentsüprogramsüasüabstractüsyntaxütrees, expansionütrees,übasedüon higher-orderüattributeügrammars,ücanübeüusedütoüimplementünewülanguageüconstructsüin termsüofüaüframework.üStatic-semanticücheckingüandücodeügeneration,üasüwellüasüsource codeüdebugging,ücanüthenübeüsuppliedüforütheüextendedülanguage.üSuchüsupportüforüthe designüandüimplementationüofüframework-specicülanguageüextensionsüisübeingüadded toüourülanguage-designüenvironment,üAPPLAB. Thereüareüseveralüinterestingüissuesütoülooküintoüconnectedütoütheüuseüandüimplementationüofüframework-specicülanguageüextensions.üForüexample,üwhenüaübaseülanguage isüchangedüthisüaffectsülanguagesüimplementedüasüanüextensionüofüthatübaseülanguage, andü programsü expressedü inü theü changedü language.ü Aü mechanismü isü thenü neededü for transformingütheüaffectedülanguagesüandüprogramsüintoüconsistentüversionsüaccording toütheünewüversionüofütheübaseülanguage,übyüforüexampleüusingütechniquesülikeüthoseüin theü TransformGenüsystemü [GKL94].ü Itü isü alsoüdesirableü toü beü ableü toüallowü multiple languageü extensions.ü Thatü is,ü toü combineü severalü languageü extensionsü intoü one extendedü language.ü Thereü mayü thenü beü combinationsü ofü languageü constructsü which contradictüeachüother.üCanüsuchüclashesübeüavoidedüorüresolvedüautomatically? Aülotüofüworküremainsütoübeüdoneüinüthisüarea.üBothüinüimplementingütheüproposed techniquesüandüinüdoingüfurtherüresearchüintoütheüarea.üDueütoüitsüdeclarativeünatureüwe believeüAPPLABüisüaüsuitableüplatformüforüperformingüsuchüresearch,üandütryingüout newüideasüinüpractice.

4

References

[BHN97] [Bja96] [GKL94] [Hed97] [Joh88] [VSK89]

E.üBjarnason,üG.üHedinüandüK.üNilsson.üAPPLAB-AnüApplicationüLanguage Laboratory.üTechnüReport,üDept.üComputerüScience,üLundüUniversity,ü1997. E.üBjarnason.üAPPLAB:üUser’süGuideü(versionü1.2).üTechn.üReportüLU-CSIR:96-01,üDepartmentüofüComputerüScience,üLundüUniversity,ü1996. D.üGarlan,üC. W.üKrueger,üandüB. StaudtüLerner.üTransformGen:üAutomating theü Maintenanceü ofü Structure-Orientedü Environments.ACMü TOPLAS, 16(3):727–774,üMayü1994. G.ü Hedin.ü Attributeü Extensionü -ü Aü Techniqueü forü Enforcingü Programming Conventions. NordicüJournalüofüComputing ü4(1997),ü93-122.ü1997. R.üE.üJohnssonüandüB.üFoote.üDesigningüReusableüClasses. JournalüofüObjectOrientedüProgramming,ü1(2):22-35,üJune/Julyü1988. H.ü H.ü Vogt,ü S.ü D.ü Swierstraü andü M.ü F.ü Kuiper.ü Higherü Orderü Attribute Grammars. Proceedingsü ofü theü ACMü SIGPLANü ‘89ü Conferenceü on ProgrammingüLanguageüDesignüandüImplementation ,üACMüSigplanüNotices, 24(7),ü1989.

LanguageüSupportüforüDesignüPatterns UsingüAttributeüExtension GšrelüHedin Dept.üofüComputerüScience,üLundüUniversity Boxü118,üS-221ü00üLund,üSweden [email protected] Abstract Thisüpaperüpresentsüaütechniqueübasedüonüattributeügrammarsüforüformalizingüdesignüpatternüsolutions.üTheütechniqueüallowsüdesignüpatternüapplicationsütoübeüidentiedüinütheüsourceücode,üandüsupportsüautomaticücheckingüthat theüpatternüisüappliedücorrectly.üWeüexpectütheütechniqueütoübeüparticularlyüuseful whenüspecializingüframeworksübuiltüusingüdesignüpatterns.

1

Introduction

Designü patternsü inü catalogsü likeü [Gammaü etü al.ü 1994]ü andü [Buschmannü etü al.ü 1996] describeürecurringüstructuresüofücollaboratingüobjects.üEachüpatternüinvolvesüaünumber ofüparticipatingüobjectsüplayingüdifferentürolesüinütheüpattern.üAlthoughütheüdesignüpatternüsolutionsüareübasedüonüsemi-formalüclassüdiagramsüwhichüallowüforümanyüimplementationüvariations,ü theyüareüsufcientlyüpreciseü soüthatüwhenüselectingü aüparticular implementation,ütheüpatternücanübeüformalizedüandüformütheübasisüofüprogrammingülanguageüsupport. Whenüaüdesignüpatternüisüapplied,üthisücanübeüviewedüasüaüintroducingüaünumberüof rules,üi.e.üsubsequentüupdatesütoütheüprogramüshouldübeüdoneüwithoutübreakingütheürules ofütheüpattern.üForüexample,ütheüDecoratorüpatternüusesüaücleverüwayüofüaddingüfunctionalityütoüComponentüobjects:üaüDecoratorüobjectü“wraps”üaüComponent,üi.e.,üallüclientsü ofü theü Componentü referü toü theü wrappingü Decoratorü insteadü ofü directlyü toü the Component.üTheüDecoratorüforwardsüallümessagesütoüitsüComponentüinüadditionütoüpossiblyüaddingüsomeübehaviorüofüitsüown.üAnüapplicationüofütheüDecoratorüpatternüimplies someürules,üforüexampleüthatüwheneverüaünewüoperationüinüintroducedüonüComponents, eachüDecoratorümustüimplementüthisüoperationüandüforwardüitütoüitsüComponent. Thus,üweücanüthinküofüaüpatternüapplicationüasüaükindüofülanguageüconstructüwhich identiesütheüobjectsüthatüplayütheüparticularürolesüinütheüpattern,üandüwhichüspecies someürulesüthatütheseüobjectsümustüfollow. Patternsüareüevolvingüconcepts.üNewüpatternsüandüvariationsüonühowütoüimplement specicüpatternsüareüreportedüeveryüyearüatüconferences,üinübooksüandüjournals,üandüin discussionügroupsüonütheünet.üForüthisüreason,üitüisünotüsufcientütoüsupportüaünumberüof predenedü patternsü byü built-inü languageü constructs.ü Instead,ü weü needü aü mechanism whichüallowsünewüpatternsütoübeübothüspeciedüandüapplied.üI.e.,üifüweüviewüeachüpatternüasüaülanguageüconstruct,üweüneedüaümechanismüforüextendingütheülanguage.

Inüthisüpaper,üweüproposeütheüuseüof attributeüextensionü[Hedinü1997üa]ütoüsupport theü specicationü andü applicationü ofü designü patterns.ü Attributeü extensionü allowsü the static-semanticsüofüaülanguageütoübeüextended,üallowingüprogrammingüconventionsüto beüenforced,übutükeepsütheüsyntaxüofütheübaseülanguage.üAükeyüadvantageüofüthisütechniqueüisüthatüitüisüeasyütoüintegrateüwithüexistingülanguagesüandüenvironments. Attributeü extensionü isü basedü onü attributeü grammars,ü describingü conventionsü by declarativeüsemanticürules.üAüconventionücheckerücanübeüautomaticallyügeneratedüfrom anüextensionügrammarüinüaüsimilarüwayüasüanüattributeüevaluatorücanübeügeneratedüfrom anüattributeügrammar.ü Theü techniqueümakesüuseüofü threeükindsüofü specication:ü 1)üA baseü grammarü interface,ü whichü isü aü context-freeü grammarü forü theü baseü language, extendedüwithüfunctionsüforübasicüstatic-semanticüinformationüsuchüasünameübindings andü typeü information.ü 2)ü Anextensionü grammar,ü whichü isü anü attributeü grammar describingütheüprogrammingüconventions,ümakingüuseüofütheübaseügrammarüinterfaceüto avoidüspecifyingübasicüinformationüfromüscratch.ü3) Attributeücomments,üwhichüareüspecialücommentsüusedütoüannotateüanüapplicationüprogram. Inütheü followingüweügiveü anü overviewüoverühowütheüattributeüextensionütechnique canübeüusedütoüformalizeüdesignüpatternüsolutions.üForüaüdetailedüexampleüandüaümore thoroughü discussionü ofü theü technique,ü theü readerü isü referredü toü theü fullü paperü [Hedin 1997üb].

2

Languageüsupportüforüaüpattern

Toüsupportüaüpatternüatütheülanguageülevel,üweüneedürstüofüallütoüidentifyütheüdifferent rolesüinütheüpatternüandüthenütoüformulateütheürulesüforütheseüpatternüroles. 2.1

Patternüroles

Theümostüimportantürolesüareüplayedübyüclasses,übutüsomeürolesümayüalsoübeüplayedüby methodsüorüvariables.üForüexample,üinütheüDecoratorüpatternü[Gammaüetüal.ü1994],üwe canü identifyü theü followingü roles: OMPONENT C (class), OPERATIONü (method), CONCRETECOMPONENT ü (class), DECORATORü (class), DECORATEDCOMPONENTü (variable), CONCRETEDECORATORü(class), DECORATINGIMPLEMENTATIONü(method). Toüsupportütheüidenticationüofüaüpatternüinütheüsourceücode,üweüannotateütheüsource codeüwithüpatternüroles,üusingüattributeücomments.üHowever,üitüisünotünecessaryütoümark allütheürolesüinütheüsourceüprogram,übecauseümanyüofütheürolesücanübeüderivedüfromüthe otherüroles.üForütheüdecorator,üitüisüsufcientütoüexplicitlyümarküthe OMPONENT C , DECORATOR,ü and DECORATEDCOMPONENTü roles.ü Weü callü theseü rolesü the deningü roles. Otherürolesüareücalledderivedüroles.üItüisüpossibleütoüformalizeütheüpatternüusingümore orüfewerüdeningüroles,übutütooüfewüdeningürolesümayügiveüaütooürestrictiveüimplementationü(forüexampleürelyingüonünamingüconventionsüofüclasses),üandütooümanyüdening rolesü mayü putü anü unnecessaryü burdenü onü theü programmerü toü explicitlyü identifyü the roles. Patternüapplicationsüoftenücrossümoduleüboundaries.üInüparticular,üitüisücommonüthat aüframeworküimplementsüsomeüofütheürolesüinüaüpatternüapplicationüandüthatütheüapplica-

tionüprogramüusingütheüframeworküsuppliesütheüotherüroles.üForüexample,üthe OMPOC NENTüandüthe D ECORATORümayübeüpartüofüaüwindow-systemüframework,üwhereasüthe CONCRETECOMPONENTSüandüthe CONCRETEDECORATORSümayübeüpartü ofüanüapplicationüusingütheüframework.üWeüexpectülanguageüsupportüforüdesignüpatternsütoübeüparticularlyübenecialüforüframeworksüsinceüitüallowsürulesüforühowütoüuseütheüframeworküto beüformalizedüandücheckedüautomatically. 2.2

Patternürules

Theü rulesü forü applyingü aü patternü canü beü expressedü inü termsü ofü theü patternü roles.üThe identiedü rolesü mustü beü consistentü withü eachü other.ü Weü referü toü rulesü whichü express suchüconsistencyüasroleürules.üForüexample,üinüourüformalizationüofütheüDecoratorüpatternüweüwillühaveüaüroleüruleüstatingüthatüa ECORATOR D ümustübeüaüsubclassüofüa OMPOC NENT. Ifü theü roleü rulesü areü satised,ü theü patternü applicationü isü sufcientlyü completeü to makeüitüpossibleütoügoüonüwithüchecking collaborationürules.üForüexample,ütoüformalize theüDecoratorüpatternüweücouldühaveüaücollaborationüruleüstatingüthatüa ONCRETE C DECORATORümustühaveü a E DCORATINGIMPLEMENTATIONüforüeach OPERATIONüdeclaredü in the COMPONENT.üThe DECORATINGIMPLEMENTATIONümayübeüdeclaredüinONCRETEC DECORATORüorüinüanyüofüitsüsuperclasses. Theücollaborationürulesüareüusuallyümoreüinterestingüthanütheüroleürulesüinüthatüthey areü moreü easilyü brokenü byü mistake,ü andü thereforeü moreü interestingü toü enforce.ü For example,üifüweüareüworkingüwithüaüwindowüsystemüapplyingütheüDecoratorüpattern,üitüis easyütoüforgetütoüupdateütheONCRETE C DECORATORüclassesüwithüdelegatingüoperations eachütimeüaünew POERATIONüinüthe COMPONENTüisüadded.üThisüerrorümightünotüshowüup immediately,üsinceüapplicationsüwhichüdoünotümakeüuseüofütheüdecoratingüobjectsüwill worküne.üAüsystemüwhichüenforcesütheüpatternürulesüwouldüdetectüsuchüerrorsüatücompile-time. 2.3

Specifyingüaüpattern

Toü specifyü theü rolesü andü rulesü forü aü pattern,ü anü extensionü grammarü isü writtenü which extendsütheübaseügrammarüinterfaceüwithüattributeüdeclarationsüandüequationsüdening theü attributeü values.ü Forü eachü deningü role,ü aü specialü “program-dened”ü attributeü is declared,ü whoseü defaultü denitionü canü beü overriddenü byü anü attributeü comment.ü A derivedüroleüisürepresentedübyüaüsynthesizedüattribute.üFinally,ütheüroleürulesüandücollaborationürulesüareürepresentedübyüspecialüstring-valuedü“error”üattributes.üTheüvalueüof anüerrorüattributeüisüdenedüasüanüerrorümessageüifütheüruleüisüviolated,üandütheüempty stringüifütheüruleüisüsatised.üToüallowütheüdenitionüofütheseüattributes,üadditionalüsynthesizedüandüinheritedüattributesümayübeüintroduced.

3

Conclusion

Theülanguageüsupportüforüdesignüpatternsüweühaveüoutlinedühereüsupportsübothütheüidenticationüofüpatternsüinüsourceücodeü(traceability),üandüautomaticücheckabilityüthatüthe patternsüareüappliedüconsistently,üaccordingütoügivenürules.üTheütechniqueürequiresüthat theüprogrammerüannotatesütheüsourceücodeüwithüsomeüdeningüpatternüroles. Theüuseüofüformalizedüpatternsünaturallyühasüaücostüinüexibility:üAnyüpatternüformalizationüwillüpinüdownüpreciseürulesüforütheüpattern,üandüitümightübeüdifcultütoüforeseeü allü reasonableü implementationü variationsü ofü theü pattern.ü However,ü justü as standardizedülibrariesüandüframeworksüareüdevelopedüforüaügivenüimplementationülanguage,üweüexpectüstandardizedüpatternüspecicationsütoübeüdevelopedüforüaügivenülanguage. Weüexpectüoneüofütheümostübenecialüusesüofüformalizedüpatternsütoübeüforüframeworksüwhereütheüframeworküsuppliesüsomeüroles,üandütheüapplicationüprogramütheüother roles.üItüisüthenüveryüimportantüthatütheüapplicationüprogramüfollowsütheüpatternürules, becauseüotherwiseütheücompleteüsystemümayüfail.üItüisüwellüknownüthatüframeworksüare difcultütoüuseüandüthatüapplicationüprogrammersüneedütoühaveüdetailedüknowledgeüof theüframeworküimplementationüinüorderütoübeüableütoüuseüitücorrectly.üAnüaidüinüsolving thisüproblemücouldübeütoüformulateütheürequirementsüonüusingütheüframeworküinüterms ofüpatterns,üandütoüformalizeüandüenforceütheseüpatternürulesüasüdiscussedüinüthisüpaper.

References [Buschmannüetüal.ü1996] Buschmann,ü F.,ü Meunier,ü R.,ü Rohnert,ü H.,ü Sommerlad,ü P.,ü andü Stal,ü M. Pattern-OrientedüSoftwareüArchitecture.üAüSystemüofüPatterns .üWiley.ü1996. [Gammaüetüal.ü1994] Gamma,ü E.,ü Helm,ü R.,ü Johnson,ü R.,ü andü Vlissides,üDesignü J. Patterns. ElementsüofüReusableüObject-OrientedüSoftware ,üAddison-Wesley,ü1994. [Hedinü1997üa] Hedin,ü G.ü Attributeü Extensionü -ü aü Techniqueü forü Enforcingü Programming Conventions. NordicüJournalüofüComputing ü4ü(1997),ü93-122. [Hedinü1997üb] Hedin,üG.üLanguageüSupportüforüDesignüPatternsüusingüAttributeüExtension.üIn Proceedingsü ofü LSDF’97, Workshopü onü Languageü Supportü forü Design Patternsü andü Frameworks,ü heldü inü connectionü toü ECOOP’97.ü Fullü paper availableüelectronicallyüathttp://www.ide.hk-r.se/~bosch/lsdf/.

    

                                

                                                                                           

                  



     



             



                     

                  

                                                                                                                                    

                                                                                                 

                                                                      

                                                                                          

 

 



 



 



                             

                    

                                

                      

                                                                                                                                                               

       

                                                     

                                                                             

                                                                     

                              



                                                                                                                                             





                                    

 



                          

                                                                                                                     

                                                               

   

     

                                                                     

                                                                         

   

                                                                           

   





 

  

 

 

  





  

  





 





 

  





  





                                                         



 

  

 







 



  









 



   

  

  



                                       

                                                                                                                

                                                        

  

  

 

 







 

 





 



 

 

                                                                             

                                                                                                                    

            



                                                                                                                                                                                                                                                    

                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                                                                       

                                                                                                                                                                                                                                                                                                                                         

                                                                                                                                                                                                                                                                            

                                                   

           





                                                              





                        

 

           

 

       



                   



                  

   

                                   

  





    





                                                       





                         







         



 



            



  



        



             





























   

















  

  



  

 



 



  

  





  

 





 



  



    



 





 

       

                              





                                        





       





                               



                 



                    

  



                                                                                                   



                                                           



    

   





                                



                                                          

               







            

                                                                     

                                                        

                    

                                                                

     

                                              

                                                                                                                                                                

                      

                                                          

                                                                                                                                

    



                                                     

                                                                                                                            

                                                                                          

         





                                                                                       

                                                  

  

                                            

                                                                     

  

                                                       

                               

                                                                                                                             

                                                                                                  

                                                                                                                                                                   

          

                                                                                                                                                                                                                            

                                                                                                                                                                                                                                  

             











 



                                                                                        

                                                                                             

FormalüDefinitionüandüRefinementüof UML’süModule/PackageüConcept AndyüSchŸrr,üAndreasüJ.üWinter LehrstuhlüfŸrüInformatiküIII,üRWTHüAachen,üD-52056üAachen [andy|winter]@i3.informatik.rwth-aachen.de

Abstract. UMLüisütheüfirstüOOümodelingülanguageüwithüaüusefulümodularizationüand informationühidingüconceptüwhichüsupportsünesting,üimport,üandürefinement.üThisüpaper translatesüUML’süinformalüpackageüdefinitionüintoüpredicateülogicüformulasüandüsolves someüopenüproblemsüconcerningütheüvisibilityüofüexportedüandüimportedüelements.

1 Introduction Afterüaboutü20üyearsüofüdevelopment,üobject-orientedü(OO)ümodelingümethodsüandünotationsüareüwidelyüacceptedüforütheüanalysisüandüdesignüofüsoftwareüsystems.üPopularüOO methodsü-ülikeüBoochü[1],üOMTü[9],üorüOOSEü[4]ü-üareüusedütoüdevelopüsystemsüofücontinuouslyüincreasingüsizeüandücomplexity.üKeepingüanalysisüandüdesignüdocumentsüconsistentüorüreusingügenericüpartsüisüaünightmareüwithoutüanyümoduleüconcept. Theseüproblemsüareüfamiliarüforü softwareüdevelopersüofütheülateü60ies.üWell-known softwareü engineeringü conceptsü likeü “abstractü dataü types”ü andü “programming-in-thelarge”ühaveübeenüinventedütoüovercomeüthem.üTheyühaveüleadütoümodularüprogramming languagesü likeü Modula-2ü orü Adaü andü softwareü designü languagesü likeü HOODü [8]ü or EMILü[2].üForüaülongütimeütheseüideasüdidünotühaveüanyüsignificantüimpactüontoütheüdevelopmentüofüOOA/OODünotations.üTheirüapproachesüofferedüadühocüsolutionsüforüpartitioningüdiagramsüintoüsurveyableüpieces.üOMTü[9]üoffersüso-calledü“modules”,üwhich allowütoüdecomposeüunmanageableüdiagramsüintoüaünumberüofürelatedüdiagrams.üBut thereüareünoümeansütoüconstructüexportüorüimportüofümodules.üAsüaüconsequenceüanyütwo elementsüinüdifferentüdiagramsüwithütheüsameünameühaveütoübeüidentified.üEvenümore elaborateüconceptsülikeücategoriesüinüBoochü[1]üorücollaboratingüsubsystemsüwithücontractsüinWirfs-Brockü[13]üdoünotüstudyüinteractionsübetweenüinformationühiding,ümodule boundaryücrossingüassociations,üandüinheritance. The UnifiedüModelingüLanguageü[7]üasüaüsuccessorüofüBooch,üOMT,üandüOOSE,üisüthe firstüOOünotationüaddressingüallüfacetsüofüaüstate-of-the-artümoduleüconcept.üIts packages buildüshellsüaroundüarbitraryütypesüofüdiagramsü(staticüstructureüdiagrams,ücollaboration diagramsüetc.).üTheirüinformationühidingüconceptüisüstronglyüinfluencedübyüC++: (1) Explicitüimportürelationshipsühaveütoübeüusedütoüaccess publicüelementsüofüoneüpackageüwithinüanotherüpackage, (2) refinementü(generalization)ürelationshipsüprovideüaccessüto protectedüelements,üand (3) friendürelationshipsürevealüevenprivateü(butünotimplementation)üelementsüofüone packageütoüanotherüpackage. Furthermore,üUMLüsupportsünestingüofüpackagesüwithüvisibilityürulesüderivedüfromünestedüscopeürulesüofüprogrammingülanguagesüˆülaüModula-2üorüAda. OurümainüproblemsüwithüUML’sümoduleüconceptüareüasüfollows: (1) Allüconceptsüareüdefinedüinünaturalülanguageüonly.üThisümakesüitüdifficultütoüdetermineütheüpreciseüsemanticsüofüintroducedüterms. (2) Import,ürefines,üandüfriendürelationshipsübetweenüpackagesüareüindirectüsubclasses of ElementüandüinheritüaVisibleüattributeüwithüvaluesüfromütheüorderedüsetü{ public > protectedü>privateü>implementation}.üButüweüdidünotüfindüaüsingleülineüthatüex-

plainsü theü consequencesü ofü dependencyü visibilitiesü forü connectedü packages,ü althoughütheüusageüofüimportüandürefinesürelationshipsüwithüvaryingüvisibilityüvalues makesüsenseüfromütheüsoftwareüengineeringüpointüofüview. (3) Manyü strictlyü necessaryü constraintsü likeü “aü client Aü ofü anotherü (imported/referenced)üpackageBüshouldünotüaddü(own)üanüimportürelationshipüfrom Bütoüanother package C”üareünotüpartüofütheüUMLüsemanticsüdefinition. ThisüpaperüisüanüattemptütoütranslateütheünaturalülanguageüdefinitionüofüUML’süpackages intoü elevenü predicateü logicü formulasü thatü giveü preciseü answersü toü pointsü (1)ü andü (2) above.üWeüwillüsuggestümoreüformulasüaddressingüpointü(3)üaboveüinüaüforthcomingüpublication.üWithinüallüformulasütheüfollowingü(all-quantified)üvariablesüareüused: P,üP’,üP”üPackageüis_aüElement,üE üElement,üdep {exp_imports,ürefines,üfriend} , ’, ”  {public >üprotected>üprivate>üimplementation}

2 AggregationüofüElementsüandüPackages AnyüUMLüdocumentücontainsüaünumberüofütop-levelüpackagesüwhichürepresentütheüregardedüsystemümodel.üEachüpackageüdefinesüaüvisibilityüshellüaroundüaünumberüofüelements, whichüareüeitherü(a)übasicüconstructsüofüaücertainütypeüofüdiagramsüorü(b)ünested packagesüorü(c)üdependenciesübetweenünestedüpackages.üAüpackage Pücontainsüanüelement E ifüitüownsüorüreferencesü(uses) E,üwhichübelongsütoüanotherüpackage P’.üInüthe latterücase,üwherePüreferencesE, Eümustübeüvisibleüinside P. Thisüsituationüisücaptured byütheüfollowingüpredicateülogicüformulas.üNoteüthatüformulaü(5a)üconsidersüonly visibilityüofünestedüpackageüelements .üTheüinteractionsübetweenüvisibleüelementsüandü(explicit)üimportürelationshipsüasüwellüasürefinementüareüsubjectüofüsectionsü3üandü4. Theüfollowingüformulasücannotübeüexplainedüinüdetail.üWeüdoühopeüthatüalmostüallüof themüareüself-explanatoryüasüsoonüasütheüroleüof üvariablesüisüclear.üTermsülike Püowns E or Püreferences E or Pücontains E or … haveütoübeüinterpretedüasü“package Püowns/references/contains/…element Eüwithüassociatedüvisibility ü{public >üprotected>üprivate>üimplementation}”.üPleaseünoteüthat theüconceptsowns, references,üandseesü(visibility)üareüdefinedüinüUML,üwhereas containsüandoffersüareüourüownüinventionsüinüorderütoükeepüformulasüasüsimpleüasüpossible. (1) Ownerüofüelementüisüunique: Püowns E üP’üowns’ E üP=üP’  = ’ (2) Elementsü(fromüotherüpackages)ümayübeüreferencedüifüvisible: Püreferences E üPüsees’ E   ’ (3) Containsürelationshipüisüunionüofüownsüandüreferenceürelationship: Pücontains E üPüowns E üPüreferences E (4) Offersürelationshipüisütransitiveüclosureüofücontainsürelationship: Püoffers E üPücontains E  üP’:üPücontainsüP’üP’üoffersüpublic E (5a) Visibilityüofüelementsü(ofünestedüpackages)üisüdeterminedüasüfollows: Püsees E üPüoffers E ü… Theümostüimportantüconsequenceüofütheüdefinitionsüaboveüisüthatüaüpackageüseesüall publicüelementsüofünestedüpackagesü(visibilityüisütransitive),üwhereünestedüpackagesüare eitherülocallyüdefinedüpackagesüorüimportedü(referenced)üpackages.üAüsurroundingüpackageühasünoüpossibilityütoühideüpublicüelementsüofünestedüpackagesüatüitsüownüinterface, exceptübyüowningüorüreferencingünestedüpackagesüthemselvesüwithürestrictedüvisibility.

3 Export/ImportüofüPackages Weühaveüseenüthatünestingüofüpackagesügivesüsurroundingüpackagesüaccessütoütheüpublic elementsüofüenclosedüpackages.üTherefore,üUMLüsaysüthatüownsüandüreferenceürelationshipsüestablishüaükindüof implicitüimport.üUsingüimplicitüimportsüonly,üpackagesüwould neverü beüableütoü referenceüelementsü ofü siblingü packages.üTherefore,ü UMLü hasüintroducedütheüconceptüofexplicitüimportü asüaüdependencyürelationshipübetweenüpackages thatübelongütoütheücommonüsurroundingüpackageüofütheürelatedüclientü(target)üandüserver (source)üpackage.üTheseüimportüdependenciesühaveütheirüownüvisibilityüattributes. Publicüimportürepresents,üforüinstance,üaükindüofüinterfaceüimport,üwhichüisüvisibleüforüallüclientsüofütheüsurroundingüpackage.üAn implementationüimport,üonütheüotherühand,üisüan alwaysühiddenüimport,üwhichürepresentsülocalüanalysisüorüdesignüdecisions. Theüfollowingüformulasüareüourüattemptütoüformalizeüimportsüandüexportsüofüpackages. Pleaseünoteüthatüpackagesüdoünotühaveüanyümeansütoüdefineüsetsüofüexportedüelements explicitely.üTheirpublic/protected/…üexportsüareüalwaysüimplicitelyüdeterminedüasütheir setsüofüpublic/protected/…üvisibleüofferedüelements.üAsüaüconsequence,üpackagesüdoünot onlyüexportüownüelements,übutüalsoüreferencedüelementsüfromüotherüpackages.üThisütakes fromü clientü packagesü theü cumbersomeü burdenü toü importü allü thoseü elementsü ofü other packagesüwhichüareüusedüinütheüinterfacesüofüalreadyüimportedüpackages. (6) Implicitüimportüareüallüindirectlyüownedüorüreferencedüelements: Püimp_imports E   P’:üPücontainsüP’üP’üoffersüpublic E (7) Importüisütheüunionüofüexplicitüandüimplicitüimport: Püimports E üPüexp_imports E üPüimp_imports E (8) Exportüisüsetüofüallüofferedünonimplementationüelements: Püexports E üPüoffersüE   implementation (5b)Visibilityüofüelementsüacrossüpackagesüisüextendedüasüfollows: PüseesüEüPüoffersüE P’:üPüexp_importsüP’üP’üexportsüE)

4 RefinementüofüPackages Theüpreviousütwoüsectionsüintroducedütheü“classical”ümodularizationüconceptsüofüprogrammingülanguagesülikeüModula-2,üi.e.ütheüconstructionüofüexportüinterfacesüforüpackagesü (withü varyingü degreesü ofü visibilityü inheritedü fromü C++),ü nestingü ofü (local) packages,üandütheüestablishmentüofüvisibleüorühiddenüimportürelationshipsübetweenüpackages.üTheseüimportürelationshipsüpermitüaccessütoüpublicüinterfaceüelementsüofüserver packages,üonly.üTheüremainingütwoüvisibilityüvaluesü(forüinterfaceüelements)  protectedüandprivate üareüonlyüusefulüinücombinationüwithürefinementü(generalization)üand friendürelationshipsübetweenüpackages.üTheüconceptüofüfriendsüisünotüdiscussedüinüthis paper,üwhereasütheüconceptüofürefining/generalizingüpackagesüwillübeüexplainedühere. Theümainümotivationüforüintroducingüthe refinementü (subtype) relationshipübetween packagesüisüthatütheüimportantüOOüconceptüof inheritance shouldünotüonlyübeüavailable forüdefiningüsingleüclasses,ütheübasicüelementsüofüstaticüstructureüdiagrams,übutüalsoüfor definingüandürefiningüarbitrarilyücomplexüsubdiagrams. Itüisünotüatüallüdifficultütoücomeüupüwithüaüpreciseüdefinitionüofütheüconsequencesüofürefinementü(generaliziation)ürelationshipsüforütheüvisibilityüofüpackageüelementsüasüwellüas withüaüformalüdefinitionüofütheüconstraintü“ generalizationürelationshipsüdoünotübuildücycles”.üItüisüfarümoreüdifficultütoütranslateütheümeaningüofüsentencesülikeü“ …üanüinstance

ofütheüsubtypeüisüsubstitutableüforüanüinstanceüofütheüsupertype ”.üTheülatterüconstraint cannotübeüdefinedüforüpackagesüinügeneral,übutümustübeüstudiedüforüeachülanguageüof UMLüdiagrams,üseparately.üSuchüaüpreciseüdefinitionüofütheütermü“substitutability”üisünot partüofüUML.üTherefore,üourüformulasüwillüonlyütakeütheüconsequencesüofüpublicürefinementürelationshipsüforütheüvisibilityüofü(public)üinterfaceüelementsüofürelatedüpackages intoüaccount.üForüfurtherüdetailsüconcerningütheüformalütreatmentüofüsubtypingüfromüan algebraicüpointüofüviewütheüreaderüisüreferredütoü[3]üandüfromüaütype-theoreticüpointüof viewütoü[6].üItüisüanüopenüquestionüwhetherüsimiliarüconstraintsühaveütoübeüaddedüforüthe caseüofünon-publicürefinementürelationshipsüandüinterfaceüelements. (9) SubtypeOfürelationshipüisütransitiveüclosureüofürenesürelationship: PüsubtypeOfüP’ üP”,:üPürenesüP”üP”ü=üP’üP”üsubtypeOfüP’) (10)Renesü(generalization)ürelationshipüisüacyclic: (PüsubtypeOfüP) (11)Publicüexportüofüreningüpackageühasürenedüpackage’süexport: PürenesüpublicüP’üP’üexportsüpublicüE üPüexportsüpublicüE (5c) Visibilityüacrossüpackageüboundariesüisüextendedüasüfollows: PüseesüEü…ü(*üseeüDef.ü(5b)ü*)   P’, ’, ” üprotected:üPürenes’üP’üP’üexports”üE  =ümin(’,”) Pleaseünoteüthatüformulaü(5c)üaboveüisüjustüanüextensionüofüformulaü(5b)üofütheüprevious section.ü Itü takesü refinementü relationshipsüwithü differentü degreesü ofü visibilityü intoü account,ürangingüfromüaükindüof publicüsubtypeüinheritanceütoüpureimplementationüinheritance.üItüsaysüthatüaürefiningü(subtype)üpackageüseesüallüpublicüelementsüofütheürefined (supertype)üpackageüasüpublicüelementsü(ifütheürefinementürelationshipüisüpublic,ütoo).üIt statesü furthermoreü thatü aü refiningü packageü seesü allü protectedü elementsü ofü theü refined packageüas  protected visibleüelementsü(ifütheürefinementürelationshipüis üvisible, too).üItüisüanüopenüquestion,üwhetherüitümakesüsenseütoühaveüfourüdifferentüvisibilityücases forürefinementürelationships,üinsteadüofütheüusualüdistinctionübetweenüinterfaceüpreservingüsubtypeüinheritanceüandütheühiddenüinheritanceüofüimplementations.

5 Summary ThisüpaperüpresentedüaücompactüdefinitionüofütheüUMLünotation’sümodularizationüconcept.üTogetherüwithüaünumberüofüusefulüextensionsüweücouldüavoidüobviousüincompletenessesüinüitsünaturalülanguageüdefinitionüorürepresentüadditionalüpoliciesüforütheüdefinitionüofüimport,ürefinement,üandüfriendürelationshipübetweenüpackages. Weühaveüomitted theüconsiderationüofütheüfriendsüconceptühere,ütheüvalueüofüwhichüisüdoubtfulüforüobjectorientedüanalysisüandüdesign.üTheüpreciseüdefinitionüofüaüOOA/OODümoduleüconceptüis notüanüisolatedüactivityüatüourüdepartment,übutüanüintegralüpartüofütheüfollowingüprojects: (1) TheümoduleüinterconnectionülanguageüEMILühasübeenüdevelopedüatüourüdepartment offeringüdifferentütypesüofümodules,ünestedü(sub-)systems,üimport/exportürelationshipsübetweenümodulesüandü(sub-)systems,üinheritanceüforüabstractüdataütypeümodulesüasüwellüasügenericityüinütheüsenseüofügenericüAdaüpackagesü[5,2]. (2) Ourü formalü backgroundü areü logic-basedü graphü rewritingü systemsü [10].ü Theyü are usedinütheüformüofütheüvisualüspecificationülanguageüandüenvironmentüPROGRES [12]toüdefineügraphicalüsoftwareüengineeringülanguagesüandütoüprototypeütoolsüfor them.üWeüareüaboutütoüspecifyüaüsignificantüsubsetüofüUMLüinüPROGRES.

(3) Graphü rewritingü specificationsü forü complexü languagesü likeü UMLü tendü toü beü too largeütoübeüwrittenüdownüasüaüsingleüunstructuredüdocument.üTherefore,üweühave startedütoüdevelopüaümoduleüconceptüforüPROGRESüsimiliarüEMILüandüUMLü[11]. Toüsummarize,üneitherüUML’sümoduleüconceptüitselfünorütheüconsiderationsüpresented hereüconcerningüitsüformalüdefinitionüandünecessaryümodificationsüareürestrictedütoüaüsingleüobject-orientedüanalysisüandüdesignümethod.üOnütheücontrary,ütheüpresented module conceptümayübeüaddedütoüotherüanalysis,üdesign,üorüspecificationülanguages üorüitümay evenübuildütheübasisüforüaüseparateümoduleüinterconnectionülanguage.üThisüisüdueütoüthe factüthatüpresentedüformulasümakeünoüassumptionsüaboutütheüsemanticsüofübasicüelements inüpackages.üItüisütheirüexclusiveüpurposeütoüexplainütheüimpactüofüpackagesüandürelationshipsübetweenüpackagesüonütheüvisibilityüofüpackageüelements.üAsüaüconsequence,üthis paperücomplementsütheürapidlyügrowingünumberüofüpublicationsüwhichühaveüeitherüthe formalüdefinitionüofümoduleüinterconnectionülanguagesü(architectureüstyles)üorücertain OOüdiagramütypesüasü theirümainütopic.üBothücategoriesüofü papersü assumeüeitherüvery simpleüvisibilityürulesüorüneglectüthisüaspectüdueütoütheüabsenseüofüaümoduleüconcept.

References [1] Booch G.: Object-OrientedüAnalysisüandüDesign .üSeriesüinüObject-OrientedüSoftwareüEngineering.üBenjaminüCummings,üRedwoodüCity,üCA,ü1994. [2] Bšrstler J.: Programmieren-im-Großen:üSprachen,üWerkzeuge,üWiederverwendung.üDissertationü(RWTHüAachen),üTRüUMINFü94.10,üDepartmentüofüComputer Science,üUmeŒüUniversity,üSweden,ü1994. [3] Breu R.: Algebraicü Specificationü Techniquesü inü Object-Orientedü Programming Environments,üLNCSü562.üSpringer-Verlag,ü1991. [4] Jacobson I.: Object-Orientedü Softwareü Engineering:ü Aü Useü Caseü Drivenü Approach.üAddison-Wesley,üReading,üMA,üfourthüedition,ü1994. [5] Nagl M.: Softwaretechnik:üMethodischesüProgrammierenüimüGroßen .üSpringerVerlag,ü1990. [6] Palsberg J.,ü Schwartzbach M. I.: Object-Orientedü Typeü Systems.ü Johnü Wiley, NewüYork,üNY,ü1994. [7] RationalüSoftwareüCorporation:UMLüSemantics,üVersionü1.0 .ühttp://www.rational.com,ü1997. [8] Robinson P. J.: HierarchicalüObject-OrientedüDesign.üPrenticeüHall,üEnglewood Cliffs,üMA,ü1992. [9] Rumbaugh J.,üBlaha M.,üEddy W.üP. F.,üLorensen W.: Object-OrientedüModeling andüDesign.üPrenticeüHall,üEnglewoodüCliffs,üNJ,ü1991. [10] SchŸrr A.: LogicüBasedüProgrammedüStructureüRewritingüSystems .üFundamenta Informaticae,üXXVI(3/4),ü1996. [11] SchŸrr A.,üWinter A. J.:ModulesüandüUpdatableüGraphüViewsüforüPROgrammed GraphüREwritingüSystems.üTRüAIBü97-3,üRWTHüAachen,üGermany,ü1997. [12] SchŸrr A.,ü Winter A. J.,ü ZŸndorf A.: Graphü Grammarü Engineeringü withü PROGRES.üInüSchŠfer W.,üBotella P.ü(eds.):üProc.ü5thüEuropeanüSoftwareüEngineering Conf.ü(ESEC’95),üLNCSü989,üpp.ü219–234.üSpringerüVerlag,üBerlin,ü1995. [13] Wirfs-Brock R.,üWilkerson B.,üWiener L.:DesigningüObject-OrientedüSoftware. PrenticeüHall,üEnglewoodüCliffs,üNJ,ü1990.

    

                                 

                                                                                                                                                                           

                                                                                                                                                                                                             

                                                                                  

                                                                                                                                                                                                    

                                

                                  

                                                                                                                         

                                       

   

                              

                           





 

 



 

 

 

 









   







   



  





 



 



 





 







  

    

 





  

  

   



   

 

 

  











 





 









 

 



 





 

 





 

              

                                                                                                                      

                  

                             

                                                                                                                                                                                                                     

                                                                                                      

                                                                                                        

                                                                                                                                                                               

                                

                                                                                                                                                                                                                                              

                                                                                                                                                                                                                               

                                                                                          

 

          



            



               



   



  



        

    

                                                                                                                                                                                                         

                                                                                                                                                                                                                                                     

 

        



 

    

                                                                                                                                                                                                                                                                

                                                                                                                                                                                                                                          

    

                                                                                                                                                                                                                                                                    

                                                                                                                                                                                                                   

                                                

 



           

    

                                                                                                                                                                                                  

                                                                                                                                                                       

 

                 

    

                                                                                                                                                                                                                                        

                                                                                                                                                                                               

                           

          



            

     

                                                                                                  

 



                                           

                                         

 

     



         



          

                        

                       



                     

           

   

              

          

       

                          

                                                                          

                                                         

                                                                           

                                            

 

                                                                

                                               

                                                             

                    

                                                                                                                      

  



 

   



 

 



  

 

  

 



  

 

TowardsüaüDedicatedüObjectüOriented SoftwareüProcessüModellingüLanguage WiebkeüReimer,üWilhelmüSchŠfer,üThomasüSchmal {wiebke|wilhelm|schmal}@uni-paderborn.de Dep.üofüComputerüScience,üSoftwareüEngineeringüGroup UniversityüofüPaderborn,üD-33095üPaderborn

Abstract Thisüpaperüreportsüourüexperienceüinüdesigningütheüexecutableüobject-orientedüsoftwareüprocess modellingülanguageESCAPE+.üStartingüwithüaüflexible,üOMT-likeülanguage,üweüextendedüthe run-timeü systemü withü specificü processü andü softwareü configurationü managementü functionality whichüisüaccessibleütoüprocessüengineersüthroughüparticularüpre-definedüclasses.

Motivation Theüenormousüincreaseüinücomplexityüandüsizeüofüsoftwareüproductsüleadsütoüincreasing problemsüofümanagementüofülargeüsetsüofüdocuments,üconsistencyüpreservationüofüfrequentlyüchangingüdocumentüversions,üandücoordinationüofüteamüwork.üSoftwareüconfigurationü managementü (SCM)ü andü Softwareü Processü Managementü areü complementary methodicalüapproachesütoükeepütheseüproblemsüunderücontrol.üTheyücanübeü exploited bestüinütheüformüofüaüprocessümodellingülanguageü(PML)üwhichüencompassesüSCMüaspects,üinsteadüofübasingüoneüofütheüapproachesüonütopüofütheüother.üExecutableüPMLsüenableütheüconstructionüofüprocess-centredüsoftwareüdevelopmentüenvironments.üThatüis, theürun-timeüsystemüofütheüPMLüprovidesüprocessüsupportüinüaccordanceüwithütheüspecifiedüprocessümodelü(PM). Likeüwithüanyülanguage,üitüisüimportantüthatüthereübeücommonüunderstandingüofüaüPML amongüitsüdesigners,üimplementorsüandüusers. DesignersüdefineütheüPML. Implementors developütoolsüforütheüPML,üsuchüasüprocessümodelüeditors,üstaticüandüdynamicüanalysers ofü(executable)üPMs,üand,ünotütoüforget,ütheürun-timeüsystemüitself. UsersüofütheüPML, called processüengineers,üspecifyüPMs.üTheüsyntaxüandüsemanticsüdefinitionüthatüdesignersüprovideüforüimplementorsüandüprocessüengineersümustübeüasüpreciseüasüpossibleüin orderütoüavoidütheüambiguitiesüandüsubtletiesücommonütoünaturalülanguage.üOnlyüthisüenablesütheüeffectiveüuseüofütheüPML:ücreating,üunderstanding,üreusing,ümodifyingüandüanalysingüPMs.üItücanüevenüenableüaü(partly)ügenerationüofüPMLütoolüimplementations. Weüdistinguishübetweenüthestaticüandüthedynamicüsemanticsofüaülanguage.üTheülatter isü theümeaning üofüaüphraseüinüthatülanguage.üTheüformer,üalsoücalledücontext-sensitive syntax,üdefinesüconstraintsüonütheüwell-formednessüofüaüphraseüwhichügoübeyondücontext-freeügrammar. Object-orientedülanguagesüallowüforüreusabilityüthroughüclassülibraries.üSpecialization andüinstantiationüareüexamplesüforüre-useümechanisms.üOftenüitüisünotüeasyütoüproperly useüaülibraryüclass:üThereüareü(notüexplicitlyüstated)ürestrictionsüonübothüthe staticüpropertiesüandüthedynamicübehaviourüofüaüusingüclass.üThatüis,ütheüpre-definedülibraryüelementsü carryü aü specificü semantics.ü Weü argueü forü promotingü theseü elementsü intoü the languageüinüorderütoübeüableütoüdefineüandüautomaticallyücontrolüsuchüstaticüandüdynamic semanticsüconstraints.

InüthisüpaperüweüinvestigateütheüPML ESCAPE+.üWeüstartübyüdescribingüitsüpredecessor ESCAPEüwhichüisüveryüflexibleübutüprovidesüonlyüaüfewüdedicatedüconceptsütoüdefine processümanagement. ESCAPE+üisü anüextensionüof ESCAPEüwhichüincludesüpre-definedülibraryüclassesüthatühaveüaüparticular,ücomplexüsemantics.üForüexample,üaünumber ofüclassesüdefineüaügeneralümodelüforüSCM.üThisüisücomparableütoü OO-Frameworks (whichüare,üunlikeüDesignüPatterns,üexecutable).üInüorderütoüensureütheücorrectüusageüof theseü pre-definedü elementsü weü definedü aü dedicated,ü veryü rigorousü inheritanceü model whichübecameüanüintegralüpartüofütheünewülanguage,ünamely ESCAPE+.

Whereüweüstarted ESCAPEü[Jun95]üisüanüexecutableüobject-orientedüPMLüwhichüenablesütheüconstruction ofüaüflexibleüprocess-centredüsoftwareüdevelopmentüenvironment.üAsüaümodificationüof OMTü[RBP+91]üitüincorporatesütheüflexibilityüandüpowerüofüobjectüorientedüspecification.üSeveralüreal-worldüPMsühaveübeenüspecifiedüin ESCAPE,ülikeüe.g.ütheüconfigurationümanagementüprocessüofüaülargeülocalücomputerüvendor. AüPMüinESCAPE consistsüofüthreeüparts:üTheüObjectüModelüdefinesüstaticüproperties suchüasüinheritanceühierarchiesüofüdocumentüclasses,üassociationütypes,üattributesüand methodsü applicableü toü instancesü ofü aü class.ü Theü Coordinationü Modelü containsü a statechartüforüeachüdocumentüclass.üTheüOrganisationüModelüdefinesüroleütypesüandütheir responsibilities.üInücontrastütoüOMT, ESCAPE definesüinüdetailütheüstaticüsemanticüconstraintsübetweenüallütheseüpartsüandüthusümakesüthemüamendableütoüautomaticücontrol. LookingüatütheüPMsüspecifiedüin ESCAPE weühaveümadeütheüfollowingüobservations: • Weüidentifiedüsub-modelsüwhichüareüpartüofüalmostüeveryüPM,üwithüveryüfewüvariationsübetweenütheüdifferentüoccurrences.üEspecially,üsoftwareüconfigurationümanagementühadübeenüspecifiedüinüaüveryüsimilarümannerüinütheseüPMs. • Thereüwereümanyüconstraintsüonühowütoücorrectlyüre-useüpre-definedüclasses.

Whereüweüareünow TheüdesignüofESCAPE+üwasüorientedütowardsütheüfollowingüobjectivesüwhichüemerged fromütheüaboveüobservations: • WeüwantedütoümakeüSCMüandüotherürecurrentüprocessümanagementüconceptsüanüintegralüpartüofütheürun-timeüsystem.üThisürelievesüprocessüengineersüfromümodelling theseücomplex,übutüapparentlyürelativelyüfixedüpartsüofüaüPM.üFurther,üitüenablesüto provideümoreüsophisticatedüandüefficientlyüimplementedüsupportüwithoutüintroducingülow-level,üproceduralüprogrammingülanguageüconstructsüintoütheüPML. • Theüpre-definedüfunctionalityüshouldübeücustomizeable. • Theüconstraintsüonühowütoücorrectlyücustomizeüshouldübeüautomaticallyücontrollable. Toüattainütheseüaims,üweütookütheüfollowingüapproach:üWeüpre-definedüseveralüclasses whichühaveüaüparticularüprocess-üorüSCM-relatedüdynamicüsemantics.üThisüsemanticsüis notümodelledüinütheüPMLübutühard-codedüinütheürun-timeüsystem. Fig.ü1üshowsüanüexcerptüofütheüObjectüModelüwhereüpre-definedüclassesüareüshaded. Asü anü exampleü forü pre-defined process-relatedü semanticsü takeü class .üAtürun-time,üanüinstanceüofüthisüclassüisüautomaticallyücreatedüwhen üisüexecutedüonüanüinstanceüofüaüclassütoüwhichütheüformerühasüanüassociationüedge ofütype .üForütheüspecializedüclassesüthisümeansüthatücompilingü(

Document attributes: .ü.ü.

depend-on

activities: Move(...),üCopy(...) Derive(...),üMerge(...) Freeze(...),üModify(...) Use(...),üGenerate(...) PropagateChanges(...)

generated-from

EditableDoc .ü.ü. .ü.ü.

FullyEditableDoc .ü.ü. .ü.ü.

FullyEditableDoc .ü.ü. .ü.ü.

Specification .ü.ü. .ü.ü.

C-Module .ü.ü. print(...)::Use review(...)::Use compile(...)::Generate

imports:: depend-on

System attributes: .ü.ü. activities: Move(...),üCopy(...) Derive(...),üMerge(...) Freeze(...), Use(...), ZoomIn(...),ü.ü.ü.

part-of part-of

FullyGeneratedDoc .ü.ü. Modify(...) PropagateChanges(...)

DesignSystem .ü.ü. .ü.ü. part-of-design:: part-of

ObjectüFile .ü.ü. .ü.ü.

Implementation .ü.ü. .ü.ü.

part-of-impl:: part-of

compiled-from:: generated-from

part-of-impl:: part-of

includes::depend-on

specified-in::generated-from

part-of-design::part-of

Figureü1:AnüObjectüModelüwithüpre-definedüandüspecializedüclasses

)üa ücreatesüanüinstanceüof üandürelatesütheütwoüinstancesüby a -edge.üClass üimplementsüanüaggregateütype.üSomeüactivities in üand üperformüaggregate-relatedüfunctionality,üsuchüasümovingüa componentüfromüoneüaggregateütoüanotherü( ). Activities üand ümanipulateüversionühistories,üi.e.ütheyüimplementüpredefined SCM-relatedüsemantics.üTheüstatechartsüofüpre-definedüclassesürestrictütheirüinstances’übehaviourütoüanüorderüofüactivityücallsüwhichüisüsensibleüw.r.t.üSCM.üE.g.üderivingüaünewüversionüfromüaüdocumentücanüonlyübeüdoneüafterüitühasübeenüfrozen,üandüonce itühasübeenüfrozen,üitücanünoülongerübeümodified.üVersioningüisüalsoüprovidedüforüclass ,üwhichüenablesütoübuildühierarchicalüconfigurations. Inüorderütoüprovideüthisücomplexübuilt-inüfunctionality,üweümustüensureüthatüanyüclass, anyüactivityüa.s.o.üspecifiedübyütheüuserücanübeüclassifiedüw.r.tüthisübaseüfunctionality. Weüachieveüthisüby (a) requiringüthatüclassesüdefinedübyütheüprocessüengineerübeüderived (directlyüorüindirectly)üfromüaüpre-definedüclass,üandüby (b)üdefiningüaürigorousüinheritanceümodel.üByüdoingüso,ütheüpre-definedüclassesühaveübecomeüanüindispensableüpartüof theürun-timeüsystemüandüareüthusüpartüofütheüPML. Briefly,üthisüinheritanceümodelüallowsüfor specializingüordeletingümodelüelements,übut notüforaddingünewüones.üThisüholdsüforüObjectüModelüelementsüsuchüasüactivities,üattributes,üassociationüroles,üandüforüelementsüofütheüCoordinationüModelüsuchüasüstates,

transitions,ütransitionülabelsüetc.üRequiringüthatüuser-definedüelementsübe specializations ofüpre-definedüonesüallowsüusütoüassociateüaüpre-definedüsemanticsüwithüthem. Anüexampleüforüthisücanübeüseenüinüclass .üTheüinheritedüpre-definedüactivity ühasübeenüspecializedüintoütwoüactivities üand üThisümeansüthatüwith regardütoütheüpre-definedüprocess-semantics,übothüactivitiesübehaveülike.üYetüin ’süstatechart,ütheüprocessüengineerücanüdistinguishübetweenüthemüandüspecify, forüinstance,üthatüprintingüaüC-Moduleüisüallowedüatüanyütime,üwhereasüaüreviewücannot beümadeüuntilüeditingüisüfinished. Onütheüotherühand,üweümustüalsoüallowüfor deletingüinheritedüproperties:üSinceüweüprohibitüextensionsütoüaüPM,ütheüpre-definedüPMümustüincludeüwhateverücanümakeüsenseüin aüuser-definedüPM.üNotüallütheseüpre-definedüelementsümustüappearüinüaüuser-defined PM,übutüsomeüofüthemüdo.üThereforeümostüPMüelementsüareüattributedüeither üor ü(whichüisünotüalwaysüshownüinüFig.1). üelementsümustünot beüdeleted.üNoteüthatüunlikeütheümultiplicityüofüassociationürolesüinüOMT,üthisüisüaütypelevelüconstraint.üWhenüspecializingüsuchüanüelement,ütheüconstraintücanübeüstrengthened from üto ,übutünotütheüotherüwayüround. InüFig.ü1,ütheüshortülineücrossingüoneüsideüofüanüassociationüedgeüdefinesüthatüthisüassociationüroleüisüoptional. ,üforüinstance,üisüpre-definedüinüclassüDocumentü withü bothü rolesü beingü optional.ü Forü class ,ü the outgoingüassociationüedgeüisüdeleted. -üand s,üinücontrast, mustühaveüanüoutgoingüassociationüedgeüofütypeügeneratedüfrom,üthereforeütheücorrespondingüdocumentütypesüredefineütheüoutgoingüassociationüroleüasübeingümandatory. Theüotherüassociationüroleüremainsüoptional,ümeaningüthatünotüeveryüclassüderivedüfrom ümustübeütargetüofüanüassociateüedgeüderivedüfrom .üAssociation üinüclass üisüaüuser-definedüspecializationüof . ESCAPE+ isüsubjectüofüaüforthcomingüdissertationü[Sac97].üInü[NSS96]üweüpresented anüearlierüversionüofESCAPE+üwhichüdidünotüyetüfullyüincorporateütheürigorousüinheritanceümodel,üthusüstillüimposingüimplicitüspecializationürestrictions. References [Jun95]

G. Junkermann.ü Aü Dedicatedü Processü Designü Languageü basedü onü EERthüInt.üConf.üonüSoftwareüEnmodels,üStatechartsüandüTables.üIn Proc.üofütheü7 gineeringüandüKnowledgeüEngineering ,üRockville,üMaryland,üUSA.ü1995

[NSS96]

O. Neumann,ü S. Sachweh,ü W. SchŠfer.ü Aü High-Levelü Object-Oriented SpecificationüLanguageüforüConfigurationüManagementüandüToolüIntegrathüEuropeanüWorkshopüonüSofttion.üInüC. Montangero,üed.,Proc.üofütheü5 wareü Processü Technology,p.ü 137–143.ü Springerü Verlag,ü Nancy,ü France, Oct.ü1996.

[RBP+91] J. Rumbaugh,ü M. Blaha,ü W. Premerlani,ü F. Eddy,ü W. Lorensen.Object– Orientedü Modelingü andü Design .ü Prenticeü Hall,ü Englewoodü Cliffs,ü N.ü J. 07632,ü1991. [Sac97]

S. Sachweh. üKoKoSü–üEinükooperativesüKonfigurationsmanagementsystem . PhDüthesis,üUniv.üofüPaderborn,üGermany,ütoüappearüinü1997.

 

  

                                                                             

                                                                               



                                                                                                

                                                                                                                   

              

                        

                                                                   

  

                                                                

                                                                                             

               

                        

                                            

                                                                                                                               

                                                                                                                                                            

                                       

 



 

 

  

  

 

  

 

 

 

   



                                                                                                         

                                                                                                                                                                                           

                                            

  

   



                                                     





                                                                                                                 

                              

 

 







 

  













 

 

  



                                 



 



 

 

                                                                              

                               





                                                                                                          

 

   

                                                             

                                                                                                                                   



 

                      

                                                   

   

                                                                                                                                                                                                                                  

                                                                                

   

                     

                                                                                                                                      

                                                                                                                                                                                                                                                                                                                   

                                                                                                                   

                                                                                                    

2ndüWorkshopüon Component-OrientedüProgramming (WCOP’97)1 Summary JanüBosch

WolfgangüWeck

UniversityüofüKarlskrona/Ronneby DeptüofüComputerüScience Ronneby,üSweden [email protected]

•boüAcademy DeptüofüComputerüScience •bo,üFinland

ClemensüSzyperski QueenslandüUniversityüofüTechnology SchoolüofüComputingüScience Brisbane,üAustralia

WCOP'97,üheldütogetherüwithüECOOP'97üinüJyvŠskylŠ,üwasüaüfollow-upüworkshopüto theü successfulü WCOP'96,ü whichü hadü takenü placeü inü conjunctionü withü ECOOP'96. WhereüWCOP'96ühadüfocusedüonütheüprincipalüideaüofüsoftwareücomponentsüandütheir goals,ü WCOP'97ü wasü moreü directedü towardsü compositionü andü otherü topics,ü suchü as architectures,ü glue-ing,ü componentü substitutability,ü evolutionü ofü interfaces,ü andü nonfunctionalürequirements. WCOP'97ühadübeenüannouncedüasüfollows: COPühasübeenüdescribedüasütheünaturalüextensionüofüobject-orientedüprogramming toütheürealmüofüindependentlyüextensibleüsystems.üTheümostüprominentüexamplesüofüsuch systemsüareüconstructedüaroundücompoundüdocumentümodelsüsuchüasüOLE,üOpenDoc, JavaBeans,üorüNetscapeüONEüandürestüonüobjectümodelsüsuchüasüSOM/CORBA,üCOM orüJava'süvirtualümachine.üWCOP'97üintendsütoüaddressütheirümethodologicalüandütheoreticalüunderpinnings. üCOPüaimsüatüproducingüsoftwareücomponentsüforüaücomponentümarketüandüforülate composition.üComposersüareüthirdüparties,üpossiblyütheüendüuser,üwhoüareünotüableüor willingütoüchangeücomponents.üThisürequiresüstandardsütoüallowüindependentlyücreated componentsütoüinteroperate,üandüspecicationsüthatüputütheücomposerüintoütheüposition toü decideü whatü canü beü composedü underü whichü conditions.ü Theseü needsü raiseü open 1.üTheüworkshopüreaderücontainsüshortüversionsüofütheüworkshopüpapers.üFullülengthüpapersühave beenüpublishedüinütheüTUCSüGeneralüPublicationsüSeries,üVol.ü5,üISBNü952-12-0039-1,ü1997. (http://www.tucs.abo.fi/publications/general/G5.html).

researchü questionsü likeü whatü kindü ofü standardsü areü neededü andü howü theyü shouldü be dened.üOrüwhatüinformationüspecicationsüneedütoügive,ühowüthisüinformationüshould beüprovided,üandühowücorrectüimplementationüandüusageüofüspecicationsücouldübeüveriedüorüenforced. 16ü positionü papersü wereü submittedü toü theü workshopü andü formallyü reviewed.ü 12 papersüwereüacceptedüforüpresentationüatütheüworkshopüandüpublicationüwithütheüproceedings.üStill,ü25üparticipantsüfromü13ücountriesüwereücountedüatütheüworkshop. Duringü theü morningü session,ü participantsü presentedü theirü work,ü whichü coveredü a wideürangeüofütopics.üAümajorüthemeüwasühowütoüselectücomponentsüforücompositionüin aüspecicüsituation.üSuchüaüselectionümustürestüonütwoüpillars.üFirstly,ütheüselectedücomponentsümustübeücompatibleüwithüeachüother.üSecondly,ücharacteristicsüthatüareünotüpart ofü theü standardizedücomponentüinterfaceü mayüdecideü whichü componentü toü picküfrom otherwiseü equalü ones.ü Examplesü areü timeü orü resourceü requirements,ü faultü tolerance, degreeüofüdistribution,üetc. Toüaddressütheücompatibilityüofücomponents,üvariousüapproachesüandüphilosophies wereüpresented.üAnüimportantüpropertyüofücomponent-orientedüprogrammingüisüthatüa singleü specicationü mayü beü supportedü byü multipleü implementations.ü However,ü problemsümayüariseüifüindividualüimplementationsüdependüonütheüimplementationüofüother components.ü Theseü dependenciesü mayü causeü conicts,ü whichü canü oftenü onlyü be detectedüwhenütheücomposedüsystemüisüanalysedüasüaüwhole. Oneüsolutionüisüthatüdependenciesüonüotherücomponentsüasüwellüasüknownüconicts withüotherücomponentsübecomeüpartüofüaücomponent'süspecication.ü ReuseüContracts [deüHondtüetüal.]ühaveübeenüproposedüasüaütoolüforüthis.üTheyüalsoüallowütheücomposerüto decideüquicklyüwhetherüaügivenüsetüofücomponentsümayüconict. [Mikhajlovü&üSekerinski]üsuggestü toü deneürulesüthat,ü ifübeingüfollowed,üexclude conictsüinüprinciple.üTheseürulesüaffectütheüdesignüofüspecications,ütheüimplementationüofücomponents,üandütheüimplementationüofüaücomponent'süclients.üForüinheritance betweenüclassesüofüobjects,üsuchürulesücanübeüderivedüformally. Aüthirdüapproachüisütoüacceptüthatücomponentsüwillühaveüsomeüdependenciesüthatüare notüpartüofüaüspecicationüandühenceücannotübeücheckedübyütheücomposer.üTheücomponentücreators,ühowever,üareüawareüofütheseüdependencies.üThus,üthisüknowledge,üavailableü duringü componentü creationü time,ü hasü toü beü maintainedü andü madeü accessibleü to systemücomposers.ü[Murer]üsuggestsüthatüthisürequiresütoolüsupport. Finally,üaücomponentümayünotübeüapplicableüinüaüspecicüsituationüasüitüis.üInüthese cases,ü itü needsü toü beüadapted,ü whichü canü beü doneü eitherü byümodifyingü theü program's sourceücodeüorübyüwrappingüit.üBothüapproachesühaveütheirüdisadvantages.üAlternatives onü aü middleü groundü areü needed.ü [Bosch]ü proposesü theü useü ofü componentü adaptation typesüthatücanübeüsuperimposedüonücomponents. Oneüaspectüofüspecicationsüisüthatütheyüembodyüaücontractübetweenüprogrammers ofüserviceüprovidingücomponentsüandüserviceüclients.üBecauseüitüisüimpossibleütoütestüa providerücomponentüagainstüallüclientsüandüvice-versa,üitümustübeüdecidedüwithoutütestingübothüwhetherüaüspecicationüisüimplementedücorrectlyüandüwhetherüaüclientüusesüit correctly.üForüthis,üformalümethodsüareühelpful,übutüneedütoübeümadeüapplicableüinüpractice.ü [BŸchiü &ü Sekerinski]ü addressü theü problemü ofü poorü scalabilityü byü specication statements,üwhichüareüusedüinürenementücalculus.

Theüsecondümayorüthemeüofütheüpresentedüworküwereüpropertiesüofücomponentsüthat areünotüpartüofütheü(functional)üstandardüinterface.üOneümayüwantütoüaddüsuchüproperties toüexistingücomponentsüwhenüputtingüthemütogetherütoüaücompleteüsystem.üThisüallows theüsystem'sücomposerütoüpicküthoseüpropertiesüthatüareüactuallyüneededüinütheüspecic situation.ü [Troyaü&ü Vallecillo]üdiscussüsomeütechnicalüprecautionsüforüthis,ü suchüasüa specicücommunicationümechanism.üAnüexampleüofüsuchüadd-onüpropertiesüareümechanismsü forü run-timeü faultü managementü inü distributedü systems.ü [Baggioliniü &ü Harms] proposeütoüuseüwrappersüforüprovidingümonitoring,üdiagnosis,üorüfailureücorrection. Componentsü thatü areü otherwiseü interchangeableü willü distinguishü themselvesü by someü importantü (unchangeable)ü properties,ü suchü asü resourceü requirements.ü Itü isü an importantütaskütoüselectütheürightücomponents,ümeetingüpossibleüconstraintsüimposedüby theüdeployingüsystemüorütheüproblemütoübeüsolved.ü[Lalanda]üsuggestsüthatüthisüselectionümayübeübestümadeüatürun-time,üandüproposesüaüspecialüarchitecture. Someü ofütheüworküaddressedüotherütopicsüthanütheseütwoü mainüthemes.üWorkow systemsü seemü toü lendü themselvesü toü component-orientedü software,ü becauseü ofü their congurabilityüandübuilding-block-likeüstructure.ü[Schreyjak]üproposesüaüspecialücomponentüframeworkütoüsupportücomponent-basedüworkowüsystems.üOneüwayüofücomposingü systemsüisü byüexpressingü relationsüandü cooperationü betweenücomponentsü inüa specialü language.ü [Steensgaardü Madsen]ü proposesü anü interpretedü language,ü inü which theü commandsü areü components.ü Suchü languageü interpretersü areü specializedü forü an applicationüdomainüandüneedütoübeügeneratedüautomatically.ü[Weck]üdiscussesütheüproblemsü ofü codeü inheritanceü acrossü componentü boundaries,ü suchü asü theü dangerü for unwantedü dependencies.ü Instead,ü inheritingü classesü needü toü referü toü specicationsü of baseüclasses.üWithüthis,üinheritanceücanübeüreplacedübyüobjectücompositionüwithoutüsacricingütheüpossibilityüofüstaticüanalysis,üyetübeingümoreüexible. Becauseüofütheümanyüparticipants,üduringütheüafternoonüsessionütheüworkshopüwas splitüupüintoüdiscussionügroups.üTheüparticipantsüexpressedüinterestüinüfourüareas:üComponents,ü Architectures,ü Non-Functionalü Requirements,ü andü Glue.ü Theü followingü are shortüsummaries,übasedüonüpresentationsüandünotesüprovidedübyüdifferentüparticipants ofütheüdiscussionügroups. Components:üAsüaüstart,üitüwasürecognizedüthatüwhatümakesüsomethingüaücomponentüisüneitherüaüspecicüapplicationünorüaüspecicüimplementationütechnology.üInüthis sense,ü“anything”ümayübeücastüintoüaücomponent.üToüprovideüaccessütoüsomethingüabout whichüsoülittleüisüknown,üanüinterfaceüneedsütoübeüprovided.üInterfacesüareümainlyüseen asüaücollectionüofü“ServiceüAccessüPoints”,üeachüofüthemüincludingüaüsemanticsüspecication.üTheümainüpurposeüofücomponentsüisüreuseüofübothüimplementationsüandüinterfaces.ü Forü effectiveü implementationü reuse,ü theü aforementionedü independenceü from implementationütechnologyüisüparticularlyüimportant.üTwoükindsüofülifeücyclesüareütoübe distinguished:üthatüofütheüinterfaceüandüthatüofütheücomponentüitself.üTheülatterüisüshorter thanütheüformer,übecauseütheüinterfaceüexistsüasülongüasüanyüimplementationüisüaround. Forüinterfaces,üformalizationüofüsemanticsüisünecessary.üEvenümoreüimportant,ütheüinteroperationübetweenücomponentsümustübeüdescribed.üOnütheütechnicalülevel,üoneüneedsüa binaryü interoperationü standardü andü aü mechanismü toü mapü semanticsü specicationsü to implementationsüusingüthisübinaryüstandard.

Architecture:ü Architectureü describesü compositionsü ofü components,ü andütherefore relationshipsübetweenüthem.üThisürequiresüconsiderationüofütheücomponent'süinterfaces. Architectureüisütoübeüstatedüinütermsüofüinterfacesüratherüthanücomponentüimplementations.üInücontrast,üifüarchitectureüwouldübeüseenüjustüasüdesignüpatternsüforücomposition, aüconcreteüarchitectureümayünotübeürealizableübecauseütheücomponentsüatühandümayünot tütogetherü(architecturalümismatch).üOnütheüotherühand,üinüaügivenüarchitecture,ücomponentsüareüreplaceableübyüothersüimplementingütheüsameüinterface.üThus,üarchitecture representsü theü longerü lastingü andü slowerü changingü designü asü opposedü toü component implementations.üMoreüprecisely,üanüarchitectureüconsistsüofüaücollectionüofüinterfaces thatürepresentüslotsütoübeülledü(orürolesütoübeüplayed)übyücomponents.üSomeüsupporting white-boxüimplementation,üforüinstance,üaükernel,ümayübeübundledüwithüaügivenüarchitecture. Non-Functionalü Requirements:ü Examplesü ofü systemsü currentlyü underü constructionü wereü collectedü togetherü withü theirü specicü non-functionalü requirements.ü For instance,üanüavionicsüsystemüthatüplansütrajectoriesüofüaüplaneüandümustüreactütoüroute problemsü (suchü asü aü stormü orü beingü lowü onü fuel)ü mustü beü fastü (2-3ü secondü response time)üandümustüadaptüitselfütoümanyüdifferentüsituationsüthatümightüarise.üSecondly,üa systemüforünumericalücomputingüonüparallelüprocessorsümustürunüfastüonüaügivenüparallelümachine.üItüalsoümustübeüquicklyüportableütoürunüonüaünewümachine.üThirdly,üsoftwareü forü controllingü aü kidneyü dialysisü machineü mustü beü responsiveü (quicklyü read variousüsensorsüandüupdatesüactuators),üexibleü(toüadaptüeasyüandüreliablyütoüchanges inühardware,üsuchüasüaünewüpumpümodel,üorümedicalüpractice,üsuchüasüaünewüprotocol forüdialysis),üandüdemonstratableü(toübeüshownütoüaüregulatoryüagencyütoüconvinceüthem ofüitsüsafetyüandübenet).üThereüareüdifferentüwaysüofümeetingünon-functionalürequirements,üdependingüonütheütypeüofürequirement.üSomeüareüautomaticallyüsatisedüifüeach componentüofütheüsystemüisüproperlyüdesigned.üOthersüariseüoutüofütheüinteractionüof components,üandücanüonlyübeüaddressedüatüthatülevel,ünotüatütheülevelüofüindividualücomponents.ü Fourü waysü ofü providingü non-functionalüpropertiesü couldü beüfound.ü Oneü can parameterizeücomponentsüsoüthatüspecicüpropertiesücanübeürequestedüofüthem;üorüone canüreorganizeütheücomponentsütoüdealüwithütheüproperty;üorüoneücanüdesignüanüoverall architectureüthatüisüresponsibleüforütheüpropertyüandüthatücanüprovideüitüifütheücomponentsüadhereütoütheüarchitecture;üor,ünally,üaümeta-levelümechanismücanüprovideüaccess toütheücomponentüinteractionütoüdealüwithütheüproperty.üTheülatterüisüsimilarütoüaspectorientedüprogramming. Glue:ü Byü glue,ü theü participantsü understoodü middlewareü thatü isü usedü toü connect existingü components.ü Examplesü areü Tcl/Tk,ü scriptingü mechanisms,ü evenü makeü les. Someüsupportüforütypingüwouldübeüniceütoühaveübutühardütoüachieveüdueütoütheüvastüvarietyüofütypesücomponentsümayüintroduce.üInügeneral,ütheüglueüisümoreüexibleüthanüthe componentsü gluedü together,ü andü thusü shouldü useü aü dynamicü language.ü Inü connection withü theü discussionü onü architecture,ü itü turnsü outü thatü componentsü areü sandwiched betweenüarchitectureüandüglue.üToübeüaccessibleüfromüwithinüaügivenüscriptingüenvironment,ütheücomponentsümustümeetüsomeüarchitecturalürequirements,ülikeüacceptingümessagesüsentübyütheüscriptüinterpreter.üThus,ütheüscriptü(glue)übuildsüonücomponentsüthatüin turnüareübuiltüforütheüscriptingüarchitecture.





     The Renement Calculus Perspective                  @abo.

 We exhibit the benets of using formal methods for constructing and documenting component software. Formal specications provide concise and com            encapsulation. Specications using abstract statements scale up better than prepostconditions and allow for ‘relative’ specications because they may refer to other components. Nondeterminism in specications permits enhancements and alternate implementations. A formally veriable renement relationship between specication and implementation of a component ensures compliance with the published specication. Unambiguous and complete contracts are the foundation    

  The separation of specications/interfaces and implementations of components is a pre                       specication. Overspecication basically prohibits future enhancements and alternate implementations. Furthermore, separate specications enable the component integrator            The lack of easily and quickly understandable, concise, and complete specications is the chief reason, why the advantages of the separation between specications and                                   ents which is usually given as incomplete, ambiguous, partly overspecic, and often                                      mysterious errors. Overspecication unnecessarily restricts future enhancements. Incompleteness, ambiguity, and overspecication hinder alternate implementations — the       Formal specications can solve these problems. The creator of a component can test, whether based solely on the specication the component may be appropriately 

                behavioral specication.

used. Ambiguities can be detected by consistency proofs. Overspecication can more easily be detected in a concise formal language. Formal verication, here in the form of renement proofs, guarantees that the implementation actually behaves as specied. Furthermore, a specication which is created before the component is implemented,             efcient components and often also helps to save costs. The adaptation of formal specications has been slow because of difcult notations which differ too much from                Section 2 makes a plea for formal specications as contracts, Sect. 3 shows why nondeterminism is also relevant for practitioners. Renement between specications and implementations to ensure compliance and renement between different versions of a specications are the topics of Sect. 4. Section 5 points to related work and Sect. 6   

                   able specication in form of a VHDL program. They describe all relevant information                                                                                   and error to nd out how the component must be used. He relies on testing of a few cases as the only way to gain condence. Nobody and nothing guarantee that he uses                                                                                  compared to hardware, the immaturity of the eld, the difculties in automated verication, and the — partly unnecessary — complexity and ill-denedness of common programming languages, which further complicates verication.                  reuse specication error. A poorly documented limitation in a component originally de                                                                                       

                                                   these runtime checks are often removed from the nal version for efciency reasons. A                 Because of the deciencies of run-time only checking, programmers are not inclined to use specications at all.                           the wheel afresh for each method, rather than being able to build upon other specications. Specications in form of abstract statements are not affected by this scalability problem. Consider the partial specication of component                                        have to expand the denition of the base type       of disadvantages. The specication of how                                               with a more deterministic specication. Prepostcondition specications contradict encapsulation and specialization. Specications by abstract statements come close to contracts as proposed by Helm                                                              Changes to the specication of the       ing nondeterminism, are not automatically reected in the specication of   postconditions do not support ‘relative’ specications in the sense of relying on previous specications. The loss of self-containedness of abstract statement specications can easily be compensated by a specication browser supporting in place expansion or hypertext-like facilities. Abstract statements also lend themselves to grey-box specic           The process of writing a formal specication often leads to more generally use            anomalies resulting from implementation difculties and lack of overview during implementation can often be detected and eliminated by a specication. For example, the above specication of                         

                                                . The specication                                          base component which satises a certain contract [1,11]. The component integrator can                can ‘shop’ for the desired component at runtime. Formal specications of required and        

3 Nondeterminism: Avoiding Overspecication                                       nondeterminism is a fundamental tool for specications to avoid laying down unneces  A nondeterministic specication leaves more choice for the implementation, which                  aged rst implementation, it greatly increases the likelihood that future enhancements and alternate implementations can be made compliant with the specication. The earlier specication of the component     Nondeterminism often enhances the comprehensibility of specications because the                               be acknowledged and specied as such.                                     turns an arbitrary value satisfying the specied precision. Both implementations are                             no way be inuenced from the outside. Writing a combined specication consisting of                                                            the rules of which are given by the specication [2]. Demonic choices are moves made               bined specication is correct, if we can make moves such that we can achieve the desired goal, no matter what the opponent does. Hence, such a combined specication can              

4 Renement: Ensuring Compliance with Specication Employing formal specications, we want to make sure that the implementation actually complies with its specication or, more precisely, is a renement thereof [2]. A   renes a statement                          of nondeterminism into account, we formally dene that    is rened by    



   

  

                                       Renement is reexive, transitive, and antisymmetric. Assume that we have specications S1 and S2, where                            renement relationship holds between two implementations of the same specication. Hence, it is important that clients only rely on properties guaranteed by the specication. Testing cannot uncover reliance on unspecied implementation features, only   

   Related work includes the Interface Specication Language developed at CSTaR Soft                                              

  We have argued that only formal contracts paired with renement can guarantee full                                      Nondeterminism is a necessity for providing freedom of implementation. Renement guarantees that implementations adhere to their specications and that new ver            pre-postcondition specications because they allow for external calls.                                                 

The paper presented at the workshop (http://www.abo./˜mbuechi/) contains more material on renement and also includes sections on the specication of invariants and temporal properties and on the design of specication languages, which are left out of                    

                                           Renement Calculus: A Systematic Introduction                                                             5. W. Kozaczynski and J. O. Ning. Concern-driven design for a specication language. In Proceedings of the 8th International Workshop on Software Specication and Design                                             9. Clemens A. Szyperski and Cuno Pster. Component-oriented programming: WCOP’96                                     , 1997. http://www.abo./˜mbuechi/. 11. Amy M. Zaremsky and Jeannette M. Wing. Specication matching of software components.          

   



  



 

    



  

 

 

          



  

 

 

            



 

  

      













 

  

    

 

  

  

   

    

 

 

      

 



 



 

 





 



 

                                    





     



    

                                      



      











   









 





















   











 

   

   

 



  



 



 

 

 



 

  





   

 

  

        



 









 





 











Object-OrientedüReal-TimeüSoftwareüinütheüEuropeanüSpace Agency JorgeüAmadorüMonteverde SoftwareüEngineeringüandüStandardisationüSection ESA-ESTEC Keplerlaanü1ü-ü2200üAGüNoordwijkü-üTheüNetherlands Tel.:ü(31)ü71ü565ü4388 Fax:ü(31)ü71ü565ü5420 E-mail:ü[email protected]

Introduction:üOverviewüofüESAüon-boardüsoftwareüsystems development ESAü on-boardü softwareü isü mostlyü real-timeü andü embedded,ü performingü aü varietyü of tasksütoücontrolüandümonitorütheüfunctioningüofüaüsatellite.üTypically,üitücanübeüdivided intoütheüfollowingücategories: On-boardüDataüHandlingü(OBDH):ümissionücritical,üusuallyühardüreal-time,üwith bothücyclicüandüsporadicüactivities,üwithüdifferentüdeadlinesüandüpriorities. AttitudeüandüOrbitüControlüSoftwareü(AOCS):ümissionücritical,übutüisüusuallyüsoft real-time.üItüisüessentiallyücyclicüsoftware. Payloadüsoftware:üItüisü(usually)ünotümissionücritical,üandüitsüreal-timeüfeatures dependüveryümuchüonütheüspecicücase. Theümajorityüofüon-boardüsoftwareübeingüdevelopedüinüESAüprojectsüisüdesignedüwith theüHOODümethod,üandücodedüinüAda. HOOD1ü (Hierarchicalü Object-Orientedü Design)ü wasü developedü underü ESAü contract, andüisübasedüonüBooch’süOOD.üItüisümainlyüorientedütoütheüdesignüofüembeddedüAda software.üItüprovidesügoodüsupportüforütheüdesignüofüconcurrentüsystems,üalthoughüitüis weakerüonütheümodellingüofüreal-timeüproperties. TheüAdaü RTSü (i.e.ütasking)üisühardlyü used,ü RTü operatingü systemsü beingü preferred.ü It wasü mainlyü dueü toü theü bigü overheadsü (bothü inü performanceü andü memory)ü ofü the commercialüAdaüRTSs,üalthoughüthisüsituationühasüchangedü(betterüRTSsüandüalsoüthe introductionüofütheüATACüchip,üwhichüprovidesüAdaütaskingüsupportüonüchipülevel). Resourceübudgetsühaveütoübeüdenedüandüadheredütoüthroughoutütheüproject,ühowever, validationüofüreal-timeü(andüinügeneral,ünonüfunctional)ürequirementsüisüusuallyüdoneüat testing,üwithülittleüorünoüeffortüinütheüearlyüphases.

R&Düforüon-boardüsoftware:üOORTütechnology Obviously,ütheüsituationüpresentedüaboveüleadsütoühighüdevelopmentücostsüandühighürisk inü ESA’sü projects.ü Therefore,ü aü numberü ofü R&Dü activitiesü haveü beenü andü areü being carriedüoutütoüimproveüthatüsituation. Asüitüwasüseenüthatüreal-timeürequirementsüwereünotümodelledünorüvalidatedüproperly duringütheüearlyüdevelopmentüphases,üexplicitüactionsüwereütakenüatübothümethodüand toolü level,ü toü provideü aü comprehensiveü setü ofü techniquesü andü toolsü forü real-time embeddedüsoftwareüdevelopmentüandüearlyüvalidation.üThisüwasüdoneüinütheüframeüof OOütechniquesüwhichüwereüalreadyüinüuseü(i.e.üHOOD). Theüfollowingüisüaüsummaryüofütheümostürelevantüresults. HRT-HOOD2ü(‘93) Itü isü anü extensionü toü theü HOODü methodü speciallyü wellü suitedü forü hardü real-time systems.üItüprovides: explicitürecognitionüofütheütypesüofütypicalühardüreal-timeüsystems’üactivitiesü(i.e. cyclic,üsporadic,üresourceümonitors), theüintegrationüofüschedulingüparadigmsüinütheüdesignüprocess, explicitüdenitionüofütheüapplication’sütimingürequirementsüandücriticalityüforüeach activity, decompositionütoüaüsoftwareüarchitectureüthatüeasilyüallowütheüprocessorüallocation, schedulabilityüandütimingüanalysis, facilitiesüandütoolsütoüallowüstaticüvericationüofüreal-timeüpropertiesüearlyüinüthe designüprocess. HRT-HOODü supportsü computationalü modelsü thatü allow:ü co-existenceü ofü bothü cyclic andüsporadicüactivities,üinteractionsübetweenüconcurrentüactivities,üaüblockingüapproach suitableü toü avoidü unboundedü delaysü andü preventü priorityü inversions,ü off-line schedulabilityüanalysis.üAlthoughüitüisüopenütoüanyüschedulingümodel,üworkühasüfocused onütheüRMSüandüDMSüalgorithms.üTheüHRT-HOODümethodüextendsüHOOD’süobject modelü(whichühasüPassiveüandüActiveüobjectsüasütheümainübuildingüblocks)ütoüinclude Protected,ü Sporadicü andü Cyclicü objects,ü andü denesü rulesü forü theirü usage.ü Aü formal mappingütoüAda95,üallowingüautomaticücodeügeneration,üisüalsoüdened. HRT-HOODüprovidesü aüveryügoodü integrationü ofüstate-of-the-artütechniquesüforü realtimeüsystemsüdesignüandüvalidationü(e.g.üDMS)üwithüanüindustrialüdesignümethod,üand thatüwithoutüimposingüaügivenücomputationalümodel.üThatüisüaüstrengthüofüHRT-HOOD comparedü toü otherü methodsü likeü ROOM,ü whichü imposesü aü reactiveü computational model. Onü theü otherü hand,ü HOODü andü HRT-HOODü provideü aü clearü separationü betweenü an object’süinterfaceü(itsüoperationsüandütheücallingüconstraintsüonüitsüoperations)üandüits internalsü (i.e.ü attributesü andü operationsü implementation).ü Thisü allowsü toü performü the

real-timeü analysesü basedü onlyü onü theü objects’ü interfaces,ü asü wellü asü automaticü code generationüforüthoseü(validated)üinterfaces. 3(‘96) HRTüSupportüTools

AüsetüofütoolsüsupportingütheüHRT-HOODümethodüandütheüoff-lineüstaticüvericationüof hardüreal-timeüpropertiesühaveübeenüdenedüandüproduced: WorstüCaseüExecutionüTimeü(WCET)üanalyser:üitüisüintegratedüwithüanüAdaücompilerü(Aonix’süAdaWorld)üforüESA’süSPARCüprocessorsü(ERC32) SchedulabilityüAnalyser,üandüSchedulabilityüSimulator,üfreewareüavailableüfrom Spacebel,üinüBelgium. HRT-HOODütool4:üitüisüanüextensionüofüanüexistingüHOODütoolütoüsupportütheüHRTHOODümethod.üItüalsoüintegratesütheüthreeütoolsüdenedüabove,üprovidingüaücompleteüandüintegratedüenvironmentüforüHRTüsystemsüdesign.üItüalsoügeneratesüAda95 codeüautomaticallyüoutüofütheüveriedüsystem.

Implementationüexperience:ütheüEuropeanüRoboticüArmü(ERA) ERAü isü intendedü toü beü usedü inü theü constructionü ofü theü Russianü segmentü ofü the Internationalü Spaceü Stationü Alpha.ü Theü ERAü projectü selectedü HRT-HOODü asü the designümethodüforütheüERAüControlüComputerü(ECC)üSoftware.üItüisübeingüwrittenüin Adaüwithüanüestimatedüsizeüofü60000üSLOC.üItüisüaühardüreal-timeüsystem,üwithüaround 30üconcurrentüobjectsü (includingü cyclic,ü sporadicüandüprotectedüobjects).ü Itühasüthree mainücomponents,üdevelopedübyüthreeüindependentücompanies,üoneüthemücentralising theüreal-timeüvericationüactivitiesü(i.e.üschedulabilityüanalysis)üofütheüwholeüsystem. Itsüdevelopmentüfollowsüanüincrementalüapproach,üwithü4üconsecutiveüversions,üwhere theüphysicalüarchitectureüandüaüminimalüfunctionalityüisüxedüinüV0,üincludingütheürealtimeüfeasibilityüverication,üandüfurtherüversionsüaddümoreüfunctionalityütoüthatüxed structure.üThisüapproachüisüpossibleüthanksütoüHRT-HOOD’süclearüdistinctionübetween theüobject’süinterfaceüandüimplementation,üdescribedüabove. Theüearlyüvericationüapproachüforüreal-timeühasübeenü(andüis)üofügreatühelpütoütheüECC SWü development.ü Itü hasü allowedü toü assessü howü changesü bothü inü theü real-time requirementsüandüinütheüexecutionüenvironmentü(includingüaüchangeüinütheüprocessor) impactedütheüdesign,üandüthatüinüaüminimumüamountüofütimeü(usuallyülessüthanühalfüa day).

Currentüandüfutureüdirections Reusableüon-boardüreal-timeüsoftwareücomponents SpaceüsoftwareüarchitecturesüatüESAüareüveryüsimilarübetweenümissions.üItüisüclearüthat reusableücomponentsüareünotüonlyücode,übutüalsoüdesignüandüanalysisüobjects.üTheümain problemü nowü isü theü reuseü granularity.ü Althoughü genericü architecturesü lookü very promisingüfromüaü‘static’üpointüofüview,üitüisüveryüdifcultütoüincludeüdynamicüaspects,

speciallyü real-timeü inü suchü architecturesü inü aü genericü way.ü Itü isü preferredü toü have librariesü ofü smallü componentsü withü wellü denedü staticü andü dynamicü (includingü realtime)üproperties,üwhichücanüthenübeücombinedütoübuildütheünalüsystem.üTheüuseüofüfull OOPüfeaturesülikeüinheritanceüandüdynamicübindingüisüconsideredüaükeyüfeatureüforüthe extensibilityü andü adaptabilityü ofü thoseü componentsü toü changingü requirements,ü andü is currentlyüunderüinvestigation. IntegrationüofüHRT-HOODüandüFormalümethods Formalümethodsüareüseenüasüanüexcellentütoolüforüfunctionalürequirementsüspecication andüvalidation,übutünotüsoümuchüforüreal-timeürequirements,üwhereüspecicütechniques areüavailableü(e.g.üDMSütheory).üTheüintegrationüofüformalümethodsüandütoolsü(SDL) forü functionalü requirementsü specicationü withü HRT-HOODü technologyü forü real-time designüisücurrentlyüunderüdevelopment.

References 1. HOODüTechnicalüGroup,ü“HOODüReferenceüManualüreleaseü4”,üSeptemberü1995. 2. “HRT-HOODü--üAüStructuredüDesignüMethodüforüHRTüAdaüSystems”,üReference ManualüVersionü2.0üUniversityüofüYork,üSeptemberü1993. 3. T.üVardanega,ü“ToolüSupportüforütheüConstructionüofüStaticallyüAnalysableüHard Real-TimeüSystemsüinüAda”,üProceedingsüofütheü17thüReal-TimeüSystemsüSymposium,üIEEE,üDecemberü1996. 4. “HRT-HoodNICE:üAüHardüReal-TimeüSoftwareüdesignüSupportüTool”,üFinal Report,üESTECüContractüNo.ü11234/94/NL/FM(SC),üIntecsüSistemi,üMarchü1996.

     

                                                                                  

                                                                                                          

                   

                                                              

                                                                                                                                                                   

                                                                        



   

 

  





  

                                                                                          

                                                                             





   

 

 

 



                   

                                                         

                                                                        

                                                                                                                                          

   

       

                        

     



        

          



                    



           

       



                                                                                          

                                                                       

                                                                                  

                                                                                                                                  

                                                                                                                                                                       

            

                                                                    

                                   



   

   

                          

     

                                                                                    

                                                                                                                                                 

                                                                                                                                    

                                            

                                                                                                                                                                                                                                                            

          

                                                                                                                                                                                                                                                                                                            

     







                                            

                                                                                                                                                                                                                                                                                                                                                                                                                                                      



                                                                                                                                                                                                                                                                                                                                                          

           

                                                                                                                                                                                               

                                                                                                                                         

                                                      

                                                                                     

                                                                                                                              

                                                                               

                                

                                                                                                 

                                                                       

                             

                                                                                     

 































                                                

                                                                

                    



                    



    





                                                

                                                 

                                                                                                                                                              

                                                                                                            

                             

                          

                                                            

                                                                                                                                                                                                

       

                                   





               





            

                                                            



 



    

                                

                                                                                                                                                                           

      



                       

 

            



 







   





                 

  



                                                                     



          





                                                                   



                                                       



 

                   





                     





                                   

                     

                                                                                                  





  











      

                                         

                                                                                                                

                                                                                                                            

                                                                    

                                             











                                                                     

                                                                                                            

                

                                                                                                                                           

                                                          

                                                                                                 













  

    

                                                 

                                              

          

 

            

                                                                                                                                                   

                       

                           

    

   

  

          

                                                                                            

                          

                                                                                        

                                                                                                                                                          













 

  



 

                     

                     