Model-Driven Development in the context of Software Product Lines

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Model-Driven Development in the context of Software Product Lines - Presentation Transcript

    1. Domain Specific Languages
      Using
      for
      Product Line Engineering
      SPLC 2009 Tutorial
      MarkusVoelter
      Independent/Itemis
      www.voelter.devoelter@acm.org
    2. Variability
      Configuration
      Customization
      MDD Intro
      MDD Tooling
      Model Variability
      Transformation Var.
      Summary & Wrapup
    3. Variability
      Configuration
      Customization
      MDD Intro
      MDD Tooling
      Model Variability
      Transformation Var.
      Summary & Wrapup
    4. Variability
      … differencesamong
      products in PL
    5. Variation Point
      … a pointwhere
      a variationcanoccur
      … must beboundfor
      eachproduct
      … bind when?
      … bind how?
    6. Binding Time
    7. VariabilityMechanisms
      Removal
      … optionallytakeaway
      fromoverallwhole
    8. VariabilityMechanisms
      Removal
      … optionallytakeaway
      from overall whole
      Challenge:
      overallwholecan
      get bigandunwieldy
    9. VariabilityMechanisms
      Injection
      … optionallyaddto
      minimal core
    10. VariabilityMechanisms
      Injection
      … optionallyaddto
      minimal core
      Challenge:
      howtopointintothecore
      andaddsomethingtoit
    11. VariabilityMechanisms
      Parametrization
      … definevaluesfor
      predefinedparams
    12. VariabilityMechanisms
      Parametrization
      … definevaluesfor
      predefined params
      Challenge:
      typesforparameterscan
      be non trivial (DSLs)
    13. Configuration vs. Customization
      Variability
    14. Variability
      Configuration
      Customization
      MDD Intro
      MDD Tooling
      Model Variability
      Transformation Var.
      Summary & Wrapup
    15. Configuration
      … selectingoptions
      … settingparamvalues
    16. Configuration
      Feature Models
    17. Configuration
      Feature Models
      Robin DR-400
      An aircraft with a low wing, piston engine and made of metal, wood and cloth
    18. Configuration
      Feature Models
      Airbus A 320
      An aircraft with low wing, jet engine(s) and made of metal.
    19. Configuration
      Feature Models
      Schleicher ASW 27
      An aircraft with shoulder wing, no engine and made of plastic
    20. Configuration
      Feature Models
    21. Configuration
      Feature Models
    22. Variability
      Configuration
      Customization
      MDD Intro
      MDD Tooling
      Model Variability
      Transformation Var.
      Summary & Wrapup
    23. Customization
      … „real languages“
      … instantiation
      … connections
    24. Customization
      Languages
    25. Customization
      Languages
    26. Customization
      Languages
    27. Customization
      Languages
    28. Variability
      Configuration
      Customization
      MDD Intro
      MDD Tooling
      Model Variability
      Transformation Var.
      Summary & Wrapup
    29. programming
      started
      closetothehardware
      abstractions

      computing
      chips
    30. abstractions

      computing
      bits
    31. abstractions

      computing
      C
    32. abstractions

      computing?
      Java
    33. abstractions

      computing?
      SQL
    34. ?
    35. generalpurpose
    36. domainspecific
    37. tailormade
      effective++
      specialized, limited
      usedbyexperts
      togetherwithother
      specializedtools
    38. DSL
      A DSL is a focussed, processablelanguage for describing a specific concern when building a system in a specific domain. The abstractions and notations used are natural/suitablefor the stakeholders who specify that particular concern.
    39. execute?
    40. map
    41. DSL Program
      (aka Model)
      map
      automated!
      GPL Program
    42. map
      Generation
      Transformation
      Compilation
      Interpretation
    43. Automation
      faster, deterministic
    44. Increased Quality
      well definedstructuresallthroughthesystem
    45. Meaningful Validation
      moresemantics in the model
    46. Capture
      Domain Knowledge
      formalizedintolanguagesandmodels
    47. SuitableNotations
      textual, graphical, tabular
    48. Technology Independence
      generate „technologygluecode“
    49. Abstraction w/o
      Runtime Overhead
      generator „optimizesaway“
    50. Capture
      ImplementationStrategy
      in thegenerators
    51. Everythingis a model
      includingforexamplehardware (some) hardware
    52. Variability
      Configuration
      Customization
      MDD Intro
      MDD Tooling
      Model Variability
      Transformation Var.
      Summary & Wrapup
    53. EMF
      Ecore meta meta model
      +
      Editing
      Transactions
      Validation
      Query
      Distribution/Persistence
    54. EMF
      Metamodel As Tree
      can also be editedas UML-like diagram
    55. EMF
      Constraints
      with OCLand dialects
    56. GMF
      Graphical Box/Line editors based on EMF
    57. TMF / Xtext
      Building Textual Editors
    58. TMF / Xtext
      Building Textual Editors
    59. M2M
      Model-to-Model Transformations
      INRIA’s ATL
      QVTXtend
    60. M2T
      Model-to-Text Transformations
      JET: Java Emitter TemplatesXpand: oAW’s
      template engine
    61. M2T
      Model-to-Text Transformations
      Extensions to modularize complex expressions
    62. openArchitectureWare
      www.openarchitectureware.org
      One Stop Toolkit for DSLs + X
      Version 5.0 is current
      Lively ecosystem of tools and extensions
      Proven track record in various domains & project contexts
      Stable, productive and helpful developer, support and user communities
      Integration with Eclipse:
      Part of Eclipse, Working Group
      Uses EMF as a basis
      Graphical editors based on GMF
      All editors and tooling based on Eclipse
    63. openArchitectureWare
    64. SpecifyGrammar
    65. AntlrGrammarandParserisgeneratedfromthisspecification
    66. Generated Metamodel
    67. SpecifyConstraints
    68. Generated Editor
    69. Generated Editor
      Code Completion
    70. Generated Editor
      Syntax Coloring
      Custom KeywordColoring
    71. Generated Editor
      RealtimeConstraintValidation
    72. Generated Editor
      Customizable
      Outlines
    73. Generated Editor
      Code Folding
    74. Generated Editor
      Goto Definition
      Find References
      Cross-File References
      Model as EMF
    75. Generated Editor
    76. XtextOverview
    77. DEMO
      Building a sample textual DSL and code generator for a simple domain using Eclipse TMF/openArchitectureWare
    78. Another Tool…?
      OSLO
    79. Another Tool…?
    80. also do…
      IntelliJ IDEA
      Resharper
    81. released in
      Q3 2009
      licensed under
      Apache 2.0
    82. Build new standalone DSLs
      Build DSLs that reuse parts
      of other languages
      Java++
      (MPS comes with BaseLanguage)
      extend base language
      build DSLs that reuse parts
      of BaseLanguage
    83. Language Extension Example
      Old
      New
      Java
      Java + Extension
      ReadWriteLock l = …
      l.readLock().lock();
      try {
      //code
      } finally {
      l.readLock().unlock();
      }
      ReadWriteLock l = …
      lock (l) {
      //code
      }
    84. Structure  Editor  Typesystem  Generator
    85. Structure  Editor  Typesystem  Generator
    86. Structure  Editor  Typesystem  Generator
    87. Structure  Editor  Typesystem  Generator
    88. Structure  Editor  Typesystem  Generator
    89. Structure  Editor  Typesystem  Generator
    90. Structure  Editor  Typesystem  Generator
    91. Structure  Editor  Typesystem  Generator
    92. Language Extension Example
      Result behaves like a native
      base language construct
    93. Language Extension Example
      Result behaves like a native
      base language construct
    94. Language Extension Example
      Translated to regular Java code
      based on the generator
      package jaxdemo.sandbox.sandbox;
      import java.util.concurrent.locks.Lock;
      public class DemoClass {
      private Lock lock;
      public DemoClass() {
      try {
      this.getLock().lock();
      SharedResouce.instance().doSomething();
      } finally {
      this.getLock().unlock();
      }
      }
      private Lock getLock() { return this.lock; }
      }
    95. Example Languages
      UI Language
    96. Example Languages
      HTML Templates
    97. Example Languages
      Persistent Classes
    98. Variability
      Configuration
      Customization
      MDD Intro
      MDD Tooling
      Model Variability
      Transformation Var.
      Summary & Wrapup
    99. Two Levels
      problemspace
      vs. softwarespace
      Problem Space:
      Configuration
      Software Space:
      Customization
    100. Two Levels
      problemspace
      vs. softwarespace
    101. Two Levels
      Removal
      #ifdefined (ACE_HAS_TLI)staticssize_tt_snd_n( ACE_HANDLE handle,constvoid *buf, size_tlen, int flags,ACE_Time_Value *timeout = 0,size_t *bytes_transferred = 0);
      #endif /* ACE_HAS_TLI */
    102. Model-Based
      Implementation
      … customization in
      problem space
      … Problem-Space DSL
    103. Model-Based
      Implementation
    104. Model-Based
      Implementation
    105. MDSD - Thumbnail
    106. MD-PLE - Thumbnail
      fewer!
    107. Two Levels
      Removal
    108. Two Levels
      Removal
    109. Two Levels
      Removal
    110. Two Levels
      Removal
    111. Two Levels
      Injection
    112. Two Levels
      Injection
      aspect (*) compnent {
      providesmon: IMonitoring
      }
    113. Two Levels
      Removal
      +
      Injection
    114. Manual Code
      Variability
      public class LightDriverImplementation extends LightDriverImplBase {
      @Override
      protected String getIdInternal() {
      return getConfigParamValueForId();
      }

      //# dimmableLights
      @Override
      protected int setLightLevelInternal(int level) {
      state().setEffectiveLightLevel(level);
      return level;
      }
      //~# dimmableLights
      }
    115. http://dslvariantmanagement.googlecode.com
    116. DEMO
      Extending the sample DSL to include feature-based variability connected to an external feature model
    117. Variability
      Configuration
      Customization
      MDD Intro
      MDD Tooling
      Model Variability
      Transformation Var.
      Summary & Wrapup
    118. MD-PLE – Thumbnail II
      moreoptions
    119. Transformation
      Variability
      create System transformPs2Cbd( Building building ):

      hasFeature("burglarAlarm") ? ( handleBurglarAlarm() -> this) : this;
      handleBurglarAlarm( System this ):
      let conf = createBurglarConfig(): (
      configurations.add( conf ) ->

      conf.connectors.add( connectSimToPanel( createSimulatorInstance(), createControlPanelInstance() ) ) ->
      hasFeature( "siren" ) ? conf.addAlarmDevice("AlarmSiren") : null ->
      hasFeature( "bell" ) ? conf.addAlarmDevice("AlarmBell") : null ->
      hasFeature( "light" ) ? conf.addAlarmDevice("AlarmLight") : null
      );
    120. Transformation
      Variability
    121. Generator
      Variability
    122. DEMO
      Introducing Variability into the Code Generator built before
    123. Variability
      Configuration
      Customization
      MDD Intro
      MDD Tooling
      Model Variability
      Transformation Var.
      Summary & Wrapup
    124. DSLs can be used to effectively
      describe customization variab.
      Transformation and Generation
      can be used to map PS to SS
      Configuration and Customization
      can be sensibly combined
      Various Tools are available,
      http://eclipse.org/modeling
      http://dslvariantmanagement.googlecode.com/
    125. Domain Specific Languages
      Using
      Variability
      Configuration
      Customization
      MDD Intro
      MDD Tooling
      Model Variability
      Transformation Var.
      Summary & Wrapup
      for
      Product Line Engineering
      THE END.
      Thankyou.
      Questions?
      MarkusVoelter
      Independent/Itemis
      www.voelter.devoelter@acm.org

    + Markus VoelterMarkus Voelter, 1 month ago

    custom

    189 views, 1 favs, 0 embeds more stats

    Domain specific languages, together with code gener more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 189
      • 189 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 0
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories