in external dsls
play

in External DSLs WGT 2011 Markus Voelter - PowerPoint PPT Presentation

The State of the Art in External DSLs WGT 2011 Markus Voelter Independent/itemis voelter@acm.org A li%le History DSLs Example: Fountains


  1. The ¡State ¡of ¡the ¡Art ¡ in ¡External ¡DSLs ¡ WGT ¡2011 ¡ Markus ¡Voelter ¡ Independent/itemis ¡ voelter@acm.org ¡

  2. Œ ¡A ¡li%le ¡History ¡  ¡DSLs ¡ Ž ¡Example: ¡Fountains ¡  ¡Programming ¡vs. ¡Modeling ¡  ¡ProjecAonal ¡EdiAng ¡ ‘ ¡Example: ¡Embedded ¡Development ¡

  3. Œ ¡ A ¡liGle ¡History ¡

  4. programming ¡ started ¡ close ¡to ¡the ¡hardware ¡ abstracLons ¡ ∼ ¡ ¡ ¡ ¡compuLng ¡ ¡ ¡ ¡chips ¡

  5. abstracLons ¡ ∼ ¡ ¡ ¡ ¡compuLng ¡ ¡ ¡ ¡bits ¡

  6. abstracLons ¡ ∼ ¡ ¡ ¡ ¡compuLng ¡ ¡ ¡ ¡C ¡

  7. abstracLons ¡ ∼ ¡ ¡ ¡ ¡compuLng? ¡ ¡ ¡ ¡Java ¡

  8. abstracLons ¡ ∼ ¡ ¡ ¡ ¡compuLng? ¡ ¡ ¡ ¡SQL ¡

  9. general ¡purpose ¡

  10. domain ¡specific ¡

  11. tailor ¡made ¡ effecLve++ ¡ specialized, ¡limited ¡ used ¡by ¡experts ¡ together ¡with ¡other ¡ ¡ ¡ ¡ ¡specialized ¡tools ¡

  12.  ¡ Domain ¡Specific ¡Languages ¡

  13. DSL ¡ A ¡DSL ¡is ¡a ¡ focussed , ¡ processable ¡ language ¡for ¡describing ¡a ¡specific ¡ concern ¡when ¡building ¡a ¡system ¡in ¡a ¡ specific ¡ domain . ¡The ¡ abstracLons ¡and ¡ notaLons ¡used ¡are ¡natural/suitable ¡ for ¡ the ¡ stakeholders ¡who ¡specify ¡that ¡ parAcular ¡concern. ¡

  14. map ¡

  15. DSL ¡Program ¡ (aka ¡Model) ¡ map ¡ automated! ¡ GPL ¡Program ¡

  16. map ¡ GeneraLon ¡ TransformaLon ¡ CompilaLon ¡ InterpretaLon ¡

  17. AcLviLes ¡ Analysing ¡Domains ¡ ¡ ¡ ¡Defining ¡Languages ¡ AdapLng/SelecLng ¡ ¡ ¡ ¡ ¡ ¡ ¡Building ¡Editors ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Transforming ¡Models ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Building ¡Generators ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Building ¡Frameworks ¡

  18. AcLviLes ¡ Analysing ¡Domains ¡ ¡ ¡ ¡Defining ¡Languages ¡ AdapLng/SelecLng ¡ ¡ ¡ ¡ ¡ ¡ ¡Building ¡Editors ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Transforming ¡Models ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Building ¡Generators ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡Building ¡Frameworks ¡ … ¡and ¡using ¡all ¡of ¡that ¡to ¡build ¡apps ¡ ¡

  19. Ž ¡ Example ¡1: ¡ Fountain ¡Control ¡

  20. ¡CONTEXT ¡

  21. Hardware ¡Structure ¡ ¡SOLUTION ¡

  22. Behaviour ¡ ¡SOLUTION ¡

  23. Plus: ¡ In-­‑IDE ¡Simulator ¡ Unit ¡Test ¡Support ¡ ¡SOLUTION ¡

  24. Eclipse ¡Modeling ¡ Eclipse ¡Xtext ¡ TOOLS ¡

  25.  ¡ Programming ¡ vs. ¡ Modeling ¡

  26. Different ¡Worlds ¡ Programming ¡Tools ¡ != ¡ Modeling ¡Tools ¡ ¡

  27. Different ¡Worlds ¡ Modeling ¡Tool ¡ != ¡ Modeling ¡Tool ¡

  28. Different ¡Worlds ¡ Mix ¡Models ¡and ¡Programs ¡

  29. Different ¡Worlds ¡ Mix ¡Models ¡and ¡Programs ¡ AST ¡NavigaLon ¡& ¡Query ¡

  30. Different ¡Worlds ¡ Mix ¡Models ¡and ¡Programs ¡ AST ¡NavigaLon ¡& ¡Query ¡ Code ¡Constraints ¡

  31. Why ¡ the ¡difference? ¡

  32. History? ¡

  33. Modeling ¡ Programming ¡ … ¡(Mostly) ¡Textual ¡ ¡ ¡ ¡ ¡ ¡NotaLons ¡ ¡ … ¡Concrete ¡Syntax ¡ ¡ ¡ ¡ ¡ ¡Storage ¡ ¡ … ¡(Fancy) ¡ASCII ¡Editors ¡ ¡ … ¡Read-­‑Only ¡ ¡ ¡ ¡ ¡ ¡VisualizaLons ¡ ¡

  34. Modeling ¡ Programming ¡ … ¡(Mostly) ¡Graphical ¡ … ¡(Mostly) ¡Textual ¡ ¡ ¡ ¡ ¡ ¡NotaLons ¡ ¡ ¡ ¡ ¡NotaLons ¡ ¡ ¡ … ¡Abstract ¡Syntax ¡ ¡ … ¡Concrete ¡Syntax ¡ ¡ ¡ ¡ ¡ ¡Storage ¡ ¡ ¡ ¡ ¡Storage ¡ ¡ ¡ … ¡ProjecLng ¡Editors ¡ … ¡(Fancy) ¡ASCII ¡Editors ¡ ¡ ¡ … ¡Different ¡editable ¡ … ¡Read-­‑Only ¡ ¡ ¡ ¡ ¡ ¡views ¡for ¡model ¡ ¡ ¡ ¡ ¡VisualizaLons ¡ ¡ ¡

  35. Why ¡ the ¡difference? ¡

  36. It ¡is ¡Lme ¡for ¡… ¡

  37. … ¡a ¡Different ¡PerspecLve ¡

  38. Programming ¡ the ¡way ¡we ¡do ¡ Modeling? ¡ Modeling ¡ the ¡way ¡we ¡do ¡ Programming? ¡

  39. == ¡ Modeling ¡ Programming ¡ == ¡ Programming ¡ Modeling ¡

  40. We ¡don‘t ¡want ¡to ¡ model, ¡ we ¡want ¡to ¡ program! ¡

  41. We ¡don‘t ¡want ¡to ¡ model, ¡ we ¡want ¡to ¡ program! ¡ … ¡at ¡different ¡levels ¡of ¡abstacLon ¡ … ¡from ¡different ¡viewpoints ¡ … ¡integrated! ¡

  42. We ¡don‘t ¡want ¡to ¡ model, ¡ we ¡want ¡to ¡ program! ¡ … ¡with ¡different ¡degrees ¡of ¡ ¡ domain-­‑specificity ¡ … ¡with ¡suitable ¡notaLons ¡ … ¡with ¡suitable ¡expressiveness ¡

  43. We ¡don‘t ¡want ¡to ¡ model, ¡ we ¡want ¡to ¡ program! ¡ And ¡always: ¡ precise ¡and ¡tool ¡processable ¡

  44. Programming ¡ ¡ Languages ¡ are ¡not ¡ MODULAR ¡ enough. ¡

  45. Programming ¡ ¡ Languages ¡ are ¡not ¡ COMPOSABLE ¡ enough. ¡

  46. Programming ¡ ¡ Languages ¡ are ¡not ¡ CONFIGURABLE ¡ enough. ¡

  47. Programming ¡ ¡ Languages ¡ are ¡not ¡ ADAPTABLE ¡ enough. ¡

  48. Programming ¡ ¡ Language ¡Syntax ¡ is ¡not ¡ FLEXIBLE ¡ enough. ¡

  49. Big ¡Language? ¡ a ¡ o ¡ b ¡ n ¡ c ¡ m ¡ d ¡ L ¡ k ¡ e ¡ j ¡ f ¡ i ¡ g ¡ h ¡ with ¡many ¡first ¡class ¡concepts! ¡

  50. Small ¡Language? ¡ α ¡ β ¡ δ ¡ L ¡ ω ¡ λ ¡ with ¡a ¡few, ¡orthogonal ¡ and ¡poweful ¡concepts ¡

  51. Modular ¡Language ¡ α ¡ a ¡ b ¡ c ¡ d ¡ e ¡ f ¡ my ¡L ¡ g ¡ h ¡ i ¡ j ¡ k ¡ l ¡ β ¡ with ¡many ¡opLonal, ¡ composable ¡ ¡concepts ¡

  52. Modular ¡Language ¡ Like ¡frameworks ¡ ¡ and ¡libraries, ¡ ¡ but ¡with ¡syntax ¡ and ¡IDE ¡support ¡

  53.  ¡ ProjecLonal ¡ EdiLng ¡

  54. Parser-­‑based ¡ text ¡ … ¡to ¡tree ¡ … ¡to ¡text ¡

  55. ProjecLonal ¡ tree ¡ … ¡to ¡text-­‑lookalike ¡(editor) ¡ … ¡to ¡other ¡trees ¡… ¡[*] ¡ … ¡to ¡text ¡ ¡

  56. Programming ¡as ¡Modeling ¡ … ¡(Mostly) ¡Graphical ¡ ¡ ¡ ¡ ¡NotaLons ¡ ¡ … ¡Abstract ¡Syntax ¡ ¡ ¡ ¡ ¡ ¡Storage ¡ ¡ … ¡ProjecLng ¡Editors ¡ ¡ … ¡Different ¡editable ¡ ¡ ¡ ¡ ¡views ¡for ¡model ¡ ¡

  57. Programming ¡as ¡Modeling ¡ … ¡(Mostly) ¡Graphical ¡Any ¡kind ¡of ¡ ¡ ¡ ¡ ¡NotaLons ¡ ¡ … ¡Abstract ¡Syntax ¡ ¡ ¡ ¡ ¡ ¡Storage ¡ ¡ … ¡ProjecLng ¡Editors ¡ ¡ … ¡Different ¡editable ¡ ¡ ¡ ¡ ¡views ¡for ¡model ¡ ¡

  58. Language ¡ ComposiLon ¡ There‘s ¡no ¡parsing. ¡ Unique ¡Language ¡Element ¡IdenLty. ¡ Unlimted ¡language ¡composiLon. ¡

  59. Flexible ¡ like ¡ASCII ¡ } ¡ NotaLons ¡ Textual ¡ treated ¡the ¡same ¡ Graphical ¡ can ¡be ¡mixed ¡ box ¡& ¡line ¡ Semi-­‑Graphical ¡ mathemaLcal ¡

  60. AutomaLc ¡ IDE ¡Extension ¡ tool ¡support ¡is ¡inherent ¡ for ¡languages ¡build ¡with ¡ projecLonal ¡tools ¡ language ¡definiLon ¡ implies ¡ IDE ¡definiLon ¡

  61. MulLple ¡ NotaLons ¡ … ¡for ¡the ¡same ¡concepts ¡ e.g. ¡in ¡different ¡contexts ¡ or ¡for ¡different ¡tasks ¡

  62. ParLal ¡ ProjecLons ¡ … ¡different ¡views ¡ … ¡for ¡different ¡roles/people ¡ … ¡only ¡a ¡parLcular ¡variant ¡

  63. Live ¡ Programs ¡ think: ¡spreadsheet ¡ a ¡change ¡to ¡one ¡part ¡of ¡program ¡ can ¡lead ¡to ¡(dependent) ¡changes ¡ in ¡other ¡parts ¡

  64. Tree ¡EdiLng ¡ … ¡is ¡different ¡from ¡ediLng ¡text ¡ … ¡try ¡to ¡make ¡it ¡feel ¡like ¡text ¡ … ¡takes ¡some ¡gelng ¡used ¡to ¡ but: ¡for ¡more ¡flexible ¡notaLons ¡ ¡ a ¡more ¡general ¡ediLng ¡paradigm ¡ ¡ is ¡needed ¡

  65. Infrastructure ¡ IntegraLon ¡ … ¡storage ¡is ¡not ¡text ¡ … ¡diff/merge ¡must ¡be ¡in ¡tool ¡ … ¡exisLng ¡text ¡tools ¡don‘t ¡work ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend