A Bridge over Troubled Water: Synergies between Model Transformations and Software Maintenance Techniques

Embed Size (px)

DESCRIPTION

Invited talk at CSMR 2012, 16th European Conference on Software Maintenance and Reengineering

Text of A Bridge over Troubled Water: Synergies between Model Transformations and Software Maintenance...

  • 1.A Bridge over Troubled Water:Synergies betweenModel Transformation andSoftware Maintenance TechniquesDniel Varr Budapest University of Technology and EconomicsCSMR 2012Szeged, Hungary, March 29th, 2012Budapest University of Technology and EconomicsDepartment of Measurement and Information Systems

2. Song writing methods of Simon and Garfunkel 3. Paul Simons technique #1 Bridge Over Troubled Water When youre weary Feeling small When tears are in your eyes I will dry them all Im on your side When times get rough And friends just cant be found Like a bridge over troubled water I will lay me down Like a bridge over troubled water I will lay me down1. Create music first 2. Write lyrics accordingly3 4. Paul Simons technique #2The BoxerI am just a poor boyThough my storys seldom toldI have squandered my resistanceFor a pocket full of mumbles such are promisesAll lies and jestsStill a man hears what he wants to hearAnd disregards the restWhen I left my home and my familyI was no more than a boyIn the company of strangersIn the quiet of the railway station running scaredLaying low, seeking out the poorer quartersWhere the ragged people goLooking for the places only they would know1. Write lyrics first2. Compose music accordingly 4 5. A Combined TechniqueScarborough Fair (Folk Song) The Side of a Hill (P. Simon)Tell her to find me an acre of land, On the side of a hill, a little cloud weepsParsley, sage, rosemary and thyme; And waters the grave with its silent tearsBetween the salt water and the sea strand, While a soldier cleans and polishes a gunThen shell be a true love of mine.Canticle (rearranged by A. Garfunkel)On the side of a hill a sprinkling of leavesWashes the grave with silvery tearsA soldier cleans and polishes a gun 5 6. Naming These TechniquesBridge Over Troubled WaterWhen youre wearyFeeling small Music Driven Song DevelopmentWhen tears are in your eyesI will dry them all(MDSD)Im on your sideWhen times get roughAnd friends just cant be foundLike a bridge over troubled waterI will lay me downLike a bridge over troubled waterI will lay me down1. Create music first 2. Write lyrics accordinglyThe BoxerI am just a poor boyThough my storys seldom toldI have squandered my resistanceFor a pocket full of mumbles such are promises Lyrics Driven Song Development All lies and jestsStill a man hears what he wants to hearAnd disregards the restWhen I left my home and my familyI was no more than a boyIn the company of strangersIn the quiet of the railway station running scaredLaying low, seeking out the poorer quartersWhere the ragged people goLooking for the places only they would know1. Write lyrics first2. Compose music accordingly6 7. Applying the Principle to Software Systems Model Code Bridge Over Troubled Water When youre weary Feeling small When tears are in your eyes I will dry them all Im on your side When times get rough And friends just cant be found Like a bridge over troubled water I will lay me down Like a bridge over troubled water I will lay me down MusicLyrics 7 8. Some Well-known TransformationsCode generation Generative programming ModelCode Model Re-engineering Query Query Program comprehensionModelRefactoringRefactoring8 9. A Classification of TransformationsM2T: Model-to-TextModelCode T2M:Text-to- ModelModel Transformations:Topic of this talkM2M: Model-to-ModelT2T: Text-to-Text 9 10. Model-Driven Software DevelopmentM2T: Model-to-TextModel CodeConferences:M2M: Model-to-Model MODELS, ECMFA, ICMT10 11. Software Maintenance and Re-engineering Model CodeT2M: Text-to-ModelConferences:CSMR, ICSM T2T: Text-to-Text 11 12. Objectives: Build More Bridges for Roundtrips M2T: Model-to-Text ModelCodeT2M: Text-to-Model M2M: Model-to-ModelT2T: Text-to-Text 12 13. Talk OverviewOverview &Applications of MTBasicsApplications from own practiceA tool (MTSMR) to build your SMR tool increm. model queriesTargets (SMRMT) future research collaboration13 14. Model Transformations inModel Driven Software Development 15. Development Process for Critical SystemsUnique Development Process(Traditional V-Model)Critical Systems Design requires a certification process to develop justified evidence that the system is free of flawsSoftware Tool Qualification obtain certification credit for a software toolDO-178B used in critical system designIEC 61508Innovative Tool Better SystemQualified Tool Certified Output 16. Model-Driven Engineering of Critical Systems Traditional V-ModelModel-Driven EngineeringMain ideas of MDE DO-178B/C: Software Considerations in Airborne Systems and early validation of system modelsEquipment Certification (RTCA, EUROCAE) Steven P. Miller: Certification Issues in Model Based Development automatic source code generation(Rockwell Collins) quality++ tools ++ development cost-- 17. Models and Transformations in Critical SystemsHorizontal Model TransformationsModel generation System Design System V&V ModelModel Refine Back-AnnotationUse Design Model generationFormalVertical Model Transformations rules ArchitectureArchitecture methods Design ModelV&V Model Refine Back-Annotation UseDesignModel generationFormalrules ComponentComponentmethods Design ModelV&V ModelBack-Annotation Design rules CodeModel Transformations Test systematic foundation of GenerationGeneration knowledge transfer: Related projectstheoretical resultstools Design + V&V Artifacts CESAR, SAVI, bridge / integrate(Source code, Glue code, HIDE, DECOS, DIANA,Config. Tables, Test Cases,existing languages&tools MOGENTES, CERTIMOT,Monitors, Fault Trees, etc.) GENESYS, SENSORIA 18. Modeling Languages andModel Transformations 19. Overview: Foundations of Model Transformations Horizontal Model Transformations Model generationSystem DesignSystem V&VModel ModelBack-Annotation RefineUse Design Model generation Formal rules ArchitectureVertical Model TransformationsArchitecture V&V methodsDesign ModelModel Refine Back-Annotation UseDesignModel generation FormalrulesComponent Component methods Design V&V Model ModelBack-AnnotationDesignrulesCode Test GenerationGeneration Foundations ofmodel transformations Design + V&V Artifacts (Source code, Glue code,Config. Tables, Test Cases, Monitors,Fault Trees, etc.) 20. Domain Specific Modeling LanguagesConcrete syntax Abstract syntaxWell-formedness(Graphical/Textual)(Metamodel) constraints Behavioural semantics,Simulation Mapping Code generation Domain-Specific Modeling Languages (DSML):Concrete syntax: Foundations of many modern tool Source Code View How the designer sees it (design, analysis, V&V) (Documentation, Graphical/textual/both Domains: avionics, automotive, Configuration file) business modeling 21. Domain Specific Modeling LanguagesConcrete syntaxAbstract syntax Well-formedness(Graphical/Textual) (Metamodel)constraints Behavioural semantics,SimulationMappingCode generationAbstract syntax: Source CodeView Internal graph representation(Documentation, Defined by a metamodel Configuration file) 22. Domain Specific Modeling LanguagesConcrete syntaxAbstract syntax Well-formedness(Graphical/Textual) (Metamodel)constraints Behavioural semantics,Simulation Mapping Code generationWell-formedness constraints: Source Code View REQs for valid static models (Documentation, Captured declaratively (OCL) Configuration file) 23. Domain Specific Modeling LanguagesConcrete syntaxAbstract syntax Well-formedness(Graphical/Textual) (Metamodel)constraints Behavioural semantics,Simulation Mapping Code generationBehavioural Semantics: Source Code View For dynamic MLs only (Documentation,(statecharts, business processes)Configuration file) Enables model simulation/execution 24. Domain Specific Modeling LanguagesConcrete syntax Abstract syntax Well-formedness(Graphical/Textual)(Metamodel)constraintsBehavioural semantics, SimulationMapping CodegenerationView/Compile/Map: Source CodeView View / code generation(Documentation, Model transformation exercise Configuration file) 25. Model Transformation Overview: MetamodelsMetamodel: Precise spec ofa modeling language Modeling toolSourceTarget MT rule metamodel metamodel Source Target modelmodel 26. Model Transformation Overview: ModelsEclipse Modeling Framework (EMF): De facto modeling standard forEclipse based modeling tools Design metamodel auto-generate toolModelinginterface, implementation, tree editor Examples:Source MT rule TargetUML, AADL, SysML, metamodel BPMN, AUTOSARmetamodel>30 in a single IBM toolSource Model: DescriptionTargetmodelof a concrete systemmodel a1:PTArca2:TPArc t1:Transitionp1:Placetk:Tokenp2:Placet2:Transition a4:TPArca3:PTArc 27. Model Transformation Overview: Rules Model Transformation: How to generate a target equivalent of an arbitrary source model Modeling toolSourceTargetMT rule metamodel metamodel Source Target modelmodel LHS RHS a1:inarc a2:outarc a1:inarc a2:outarc PlaceTran. Place PlaceTran.Planttn1:tokens tkn2:tokens TokenToken 28. Model Transformation Overview: Rule Execution Eclipse FrameworkModel Transformation Tool Modeling tool Source Target MT rulemetamodelmetamodelSourceTarget MT enginemodel model Transformation engine: Support for querying and manipulating large models ATL VIATRA2: http://www.eclipse.org/gmt/VIATRA2/ QVT 29. Model Transformation by Graph Transfromation Eclipse FrameworkModel Transformation ToolModeling toolSource TargetMT rule metamodelmetamodel SourceTargetMT engine model modelquery/match update LHSRHS a1:inarc a2:outarca1:inarc a2:outarc PlaceTran. PlacePlaceTran.Planttn1:tokenstkn2:tokens Token Token 30. Overview of Model Transformations Eclipse Framework Model Transformation Tool Modeling toolSource TargetMT rulemetamodel metamodelNative source models:Native target models: EMF EMF XML Sourcedocuments App source code Target Databasesmodel MT engine XML deployment descript. model Domain-specific models Databases UML Analysis toolsNative Native source model target model 3rd Party Tool 31. Standalone Model Transformations Plugins Eclipse Framewor