Upgrade to Pro — share decks privately, control downloads, hide ads and more …

JetBrains MPS: Create a programming language that the whole company can understand. Artem Tikhomirov, JetBrains, CEE-SECR 2017

CEE-SECR
October 21, 2017

JetBrains MPS: Create a programming language that the whole company can understand. Artem Tikhomirov, JetBrains, CEE-SECR 2017

Watch the benefits of creating a programming language that the whole company can understand. With MPS tool you can build powerful domain specific languages.

Preferred audience are IT consultants, Product & Project Managers, testers and decision makers.

CEE-SECR

October 21, 2017
Tweet

More Decks by CEE-SECR

Other Decks in Technology

Transcript

  1. JetBrains MPS
    Create a programming language
    that the whole company can
    understand
    Artem Tikhomirov
    Software Engineering Conference Russia
    October 2017, St. Petersburg

    View Slide

  2. Domain Specific Languages

    A DSL is a focused, processable language
    for describing a specific concern when building
    a system in a specific domain

    The abstractions and notations used are
    natural/suitable for the stakeholders who
    specify that particular concern.
    Markus Voelter

    View Slide

  3. Math

    View Slide

  4. How come?

    View Slide

  5. DSLs? Who cares?
    You! DSLs are ubiquitous!

    View Slide

  6. Buisness Processes

    View Slide

  7. View Slide


  8. Health and medicine
    ● Stakeholder integration, Scalable Business, Document Generation + Certification

    Finance
    ● Precise Specification and Implementation of Insurance Products („Rules“)

    Government
    ● Changing Regulations, Fast Implementation, End User Empowerment

    Automotive
    ● Code Complexity, Frameworks (Autosar), Product Lines

    Aerospace
    ● Reduction of Accidental Complexity in Code, Process Conformance (Docs)

    Robotics
    ● A powerful language and IDE for existing frameworks (Industry Robots, ROS)

    Embedded software
    ● Multi-Paradigm Programming, not just Simulink and C

    Science
    ● Consistent Derived Documents

    View Slide

  9. Most widely adopted DSM tool

    View Slide

  10. Too narrow view of programming?

    View Slide

  11. Demo

    Language to configure voice menu for an
    answering maching

    Jetbrains MPS as a Rich Client Platform

    Business value is negligible
    – Market share of your office assistant is small

    View Slide


  12. Health and medicine
    ● Stakeholder integration, Scalable Business, Document Generation + Certification

    Finance
    ● Precise Specification and Implementation of Insurance Products („Rules“)

    Government
    ● Changing Regulations, Fast Implementation, End User Empowerment

    Automotive
    ● Code Complexity, Frameworks (Autosar), Product Lines

    Aerospace
    ● Reduction of Accidental Complexity in Code, Process Conformance (Docs)

    Robotics
    ● A powerful language and IDE for existing frameworks (Industry Robots, ROS)

    Embedded software
    ● Multi-Paradigm Programming, not just Simulink and C

    Science
    ● Consistent Derived Documents

    View Slide

  13. Healthcare
    Software Medical Devices Accessible to Doctors
    Robustness and Correctness Required
    To be FDA-certified
    Needs to run on multiple target platforms

    IOS

    Android

    JavaScript

    View Slide

  14. Stakeholders driving the development
    Physicists
    Product Management
    System Engineering / R&D
    Customer Service
    Supply Chain Management
    Management (Business Cases) /
    Platform- & Release-Strategy

    View Slide

  15. SW Experts
    HW/ FW
    Software
    package
    System Engineering
    Physicists
    Product Management
    Customer Service
    Installed
    Software

    View Slide

  16. HW/ FW
    SW Experts
    Software
    package
    System Engineering
    Physicists
    Product Management
    Customer Service
    Installed
    Software
    Code generation space
    DSL
    DSL
    DSL
    DSL

    View Slide

  17. Domain Experts
    SW Experts
    Scanner
    Model / SW

    View Slide

  18. Domain Experts
    SW Experts
    On demand
    (automatically)
    Scanner
    Model / SW

    View Slide

  19. View Slide

  20. View Slide

  21. When to DSL?

    Complex domain knowledge

    Painful translation of expertise from a domain
    specialist to a programmer
    – Gap in abstraction level

    Not directly related to programming
    – biology, math, insurance
    – Verification, analysis, simulation.

    Classes of applications
    – Software factories

    View Slide

  22. Typical risks

    Language design takes effort
    – Adds to the cost of the project → need for reuse

    Language design skills
    – Steep learning curve
    – What goes into the language
    – How to make it elegant

    Proper tooling

    View Slide

  23. View Slide

  24. MPS is an open-source language
    workbench for DSL development

    View Slide

  25. DSM isn't new

    View Slide

  26. DSLs with MPS

    Abstract Syntax

    Concrete Syntax

    M2M, M2T

    Semantics: Typesystem, Dataflow

    IDE integration, UI

    Tooling: build, plugins

    Evolution/migration

    Deployment: custom IDE, RCP

    View Slide

  27. DSLs with MPS

    Abstract Syntax

    Concrete Syntax

    M2M, M2T

    Semantics: Typesystem, Dataflow

    IDE integration, UI

    Tooling: build, plugins

    Evolution/migration

    Deployment: custom IDE, RCP

    View Slide

  28. Textual editing
    R
    A B
    C D
    R R
    A B
    C D
    R R
    A B
    C D
    R
    Text Text
    Binary
    edit parse save
    editing
    compile
    parse
    Compiler

    View Slide

  29. Projectional editing
    R
    A B
    C D
    R R
    A B
    C D
    R R
    A B
    C D
    R
    Text
    Binary
    edit
    save
    editing
    compile
    parse
    Compiler
    R
    A B
    C D
    R
    generate

    View Slide

  30. Projectional editing
    R
    A B
    C D
    R R
    A B
    C D
    R R
    A B
    C D
    R
    Binary
    edit
    save
    editing
    compile
    Compiler
    R
    A B
    C D
    R
    generate

    View Slide

  31. Projectional editing

    View Slide

  32. by Jens Nerche @jensnerche
    Rich syntaxes

    View Slide

  33. Tabular notations

    View Slide

  34. Symbolic notations

    View Slide

  35. Positional notations




    View Slide

  36. Multiple switchable notations

    View Slide

  37. Combine languages

    View Slide

  38. View Slide

  39. Parsing is the bottleneck
    … of language expressiveness
    – Limits the possible syntaxes
    – Allows only one editable code visualization
    – Complicates combining languages

    View Slide

  40. DSLs with MPS

    Abstract Syntax

    Concrete Syntax

    M2M, M2T

    Semantics: Typesystem, Dataflow

    IDE integration, UI

    Tooling: build, plugins

    Evolution/migration

    Deployment: custom IDE, RCP

    View Slide

  41. Code generation
    R
    A B
    C D
    R R
    A B
    C D
    R R
    A B
    C D
    R
    Text
    Binary
    edit
    save
    editing
    compile
    parse
    Compiler
    R
    A B
    C D
    R
    generate

    View Slide

  42. Generators
    Map solutions from a problem domain to an
    implementation domain

    Transform models

    Output models or text

    View Slide

  43. Compiler analogy
    do {
    call();
    } while
    R := A
    MUL B
    01101
    10101
    Source code Intermediate presentation Machine code
    repeat
    turnLeft
    do {
    call();
    } while
    DSLs
    do {
    call();
    } while
    General-purpose language Source code
    repeat
    turnLeft
    do {
    call();
    } while
    DSLs Source code

    View Slide

  44. OMG/MOF Perspective
    A B
    C D
    R
    A B
    C D
    R
    A B
    C D
    R
    do {
    call();
    } while
    Model to Model Model to Text
    repeat
    turnLeft
    do {
    call();
    } while
    DSLs
    do {
    call();
    } while
    General-purpose language Source code
    A B
    C D
    R
    AST == Model

    View Slide

  45. View Slide

  46. jetbrains.com/mps
    Thank you
    for your attention
    __

    View Slide

  47. Books

    http://books.campagnelab.org

    http://dslbook.org
    https://www.jetbrains.com/mps/publications

    View Slide