A Lexical and Syntactical Analyzer for the Exporting of QNAP to the Performance Model Interchange Fo
- 格式:pdf
- 大小:1.21 MB
- 文档页数:12
ALexicalandSyntacticalAnalyzerfortheExportingofQNAP∗tothePerformanceModelInterchangeFormat(PMIF).
Jer`oniaRossell´o,CatalinaM.Llad´o,RamonPuigjanerUniversitatdelesIllesBalearsDepartamentdeMatem`atiquesiInform`atica07071,PalmadeMallorca,Spain.jeronia.rossello@vodafone.es,cllado@uib.es,putxi@uib.es.
ConnieU.SmithPerformanceEngineeringServicesPOBox2640SantaFeNewMexico,87504-2640USAwww.perfeng.com
AbstractAPerformanceModelInterchangeFormat(PMIF)providesamechanismwherebysystemmodelinforma-tionmaybetransferredamongperformancemodelingtools.ThePMIFallowsdiversetoolstoexchangeinformationandrequiresonlythattheimportingandexportingtoolseithersupportthePMIForprovideaninterfacethatreads/writesmodelspecificationsfrom/toafile.ThispaperpresentsthedevelopmentoftheQnapexportingmechanismtothePMIF.SinceaccesstoQnapinternalcodeisnotpossible,theonlywayofexportingQnapisbytranslatingQnapinputfiles,forwhichalexicalandsyntaxanalyzerneedstobedeveloped.
Keywords:SoftwarePerformanceEngineering,ToolInteroperability,PerformanceModel,XML,QueueingNetworkModel,InterchangeFormat,CompilerTechniques.
ResumenUnFormatodeIntercambiodeModelosdeRendimiento(PMIF,PerformanceModelInterchangeFormat)proporcionaunmecanismoparaelintercambiodeinformaci´ondemodelosderendimientoentrediferentesherramientasdemodelado.ElPMIFpermitequevariasherramientasintercambieninformaci´onsolore-quiriendoquelasherramientasqueexportaneimportanmodelossoportenelPMIFodispongandeunainterfazquelee/escribelasespecificacionesenPMIFdesde/aunfichero.Esteart´ıculopresentaeldesarrollodelmecanismodeexportaci´ondeQnapaPMIF.Dadoqueelaccesoalc´odigointernodelaherramientaQnapnoresultaviable,la´unicamaneradeexportarQnapestraduciendolosficherosdeentradadeQnap,porlocualsenecesitadesarrollarunanalizadorl´exicoysint´actico.
Palabrasclaves:Ingenier´ıadeRendimientodeSoftware,InteroperabilidaddeHerramientas,ModelosdeRendimiento,XML,RedesdeColas,FormatosdeIntercambio,T´ecnicasdeCompilaci´on.
1INTRODUCTION(PMIF)[10,7]isacommonrepresentationforQueuingNetworkModel(QNM)datathatcanbeusedtomovemodelsamongmodelingtools.Auserofseveraltoolsthatsupporttheformatcancreateamodelinonetool,andlatermovethemodeltoothertoolsforfurtherworkwithouttheneedtolaboriouslytranslatefromonetool’smodelrepresentationtotheother,andtheneedtovalidatetheresultingspecification.Toolsthat
∗QnapisacommercialtooldevelopedbySimulog[5]forqueueingnetworksmodelling.supportthePMIFformatonlyneedtoimplementtheexportandimportmechanismstothePMIFratherthanimplementcustomizedexportsandimportsforeveryothertoolthattheywanttoshareinformationwith1.PMIFuserscould,forexample,comparesolutionsfrommultipletools;createinputspecificationsinPMIForinafamiliartoolratherthanlearntheinterfacetomultipletools;migrateamodeltotemporarilyuseanothertooltostudymoredetailedmodels;andcreatesoftwareperformancemodelstostudyarchitectureanddesigntrade-offs,thenuseanothertooltostudydetailsofthecomputersystem.Dependingonthemodelingtoolandtheavailabilityofitssourcecode,itsexportingandimportingmechanismsto/fromPMIFcanvaryfromasimpleimplementationtoahugeengineeringproject.In[7]aprototypeisdescribedinwhichtheexportingtoolisSPE·EDandtheimportingtoolisQnap[2,6].Inthiscase,bothimportingandexportingmechanismswerequitestraightforward.Onthecontrary,whenthinkingabouttheexportingmechanismfromQnaptoPMIF,onefindsoutthatunfortunatelyitisnotsosimple.DuetothefactthatwedonothaveaccesstoQnap’sinternalcode,theQnaptoPMIFexportmechanismcanonlybeachievedbyusingtheQnapinputfilethatdefinestheQNMinQnap’sformat.Suchafileneedstobecarefullyanalyzedinordertobetranslated.Asaconsequence,thetranslationconsistsofamuchmorelaboriousprocess(comparedtoforinstancetheuseoftheDocumentObjectModel(DOM)intheexportmechanismfromSPE·ED[8])thatneedstobecarefullystudiedanddesigned.Thisprocessincludestheuseofcompilertechniquessuchaslexicalandsyntacticalanalysis(seetheAppendixforanoverviewofthesetechniques).Thispaperpresentstheanalysis,designandimplementationofsuchaprocess.Therestofthepaperisorganizedasfollows.Section2givesanoverviewofthePMIFformat,describingitsmaincomponentsandhowtheyrelate.Following,Section3considersthemostimportatissuesthathadtobeaddressedinthedesignoftheQnaptoPMIFexportingmechanismwhileSection4describesitsimplementation.Section5showsanexampleoftheapplicationofthetranslationprocessstepbystep.Finally,Section6reportssomefutureworkandconclusions.TheAppendixprovidesanoverviewofcompilertechniquesandtoolsforlexicalanalysisandsyntacticanalysis.
2PMIFOVERVIEWPMIFwasfirstdefinedusinganEIA/CDIF(ElectronicIndustriesAssociation/CASEDataInterchangeFormat)paradigmthatcallsfordefiningtheinformationrequirementsforaQueueingNetworkModel(QNM)withameta-model[9,10],thatis,itisamodeloftheinformationthatgoesintoconstructingaQNM.Atransferformatwasthencreatedfromthemeta-modelandusedtoexchangeinformation.ThePMIFallowsdiversetoolstoexchangeinformationandrequiresonlythattheimportingandexportingtoolseithersupportthePMIForprovideaninterfacethatreads/writesmodelspecificationsfrom/toafile.Anewversionofthemeta-modelhasbeenrecentlydefinedtogetherwithanewPMIFspecification(PMIF2.0)[7,8],whichisimplementedasanXML(ExtensibleMarkupLanguage)schema[12].ThediagramoftheXMLSchemaforPMIF2.0isinFigure1.ThediagramshowsthataQueueingNet-workModeliscomposedofoneormoreNodes,andoneormoreWorkloads.AServerprovidesserviceforoneormoreWorkloads.AWorkloadrepresentsacollectionoftransactionsorjobsthatmakesimilarServiceRequestsfromServers.TherearetwotypesofWorkloads:OpenWorkloadandClosedWorkload.AServiceRequestspecifiestheaverageTimeService,DemandServiceorWorkUnitServiceforeachWork-loadthatvisitstheServer.ATimeServiceRequestspecifiestheaverageservicetimeandnumberofvisits.ADemandServiceRequestspecifiestheaverageservicedemand(servicetimexnumberofvisits).AWorkU-nitServiceRequestspecifiestheaveragenumberofvisitsrequestedbyeachWorkloadthatvisitsaWorkU-nitServer.UponcompletionoftheServiceRequest,theWorkloadTransitstootherNodeswithaspecifiedprobability.MoredetailedinformationandthePMIFSchemadefinitioncanbefoundin[7,8].Inaddition,aprototypewasalsodeveloped,inwhichtheexportingtoolisSPE·EDandtheimportingtoolisQnap.SPE·EDusestheDocumentObjectModel(DOM)[12]toexportthepmif.xml.Ontheotherhand,sincetheaccesstoQnapsourcecodewasnotprovided,anXSLTspecificationthattransformsapmif.xmlfileintoafilethatisreadandexecutedbyQnapwasimplemented.Moreover,in[3]thedesignandimplementationofaPMIFWebserviceforthemodelingtoolQnapispresentedasafurtherstepofthetransformationfromPMIFtoQnap.