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

Monto: A Disintegrated Development Environment (WG 2.11 version)

61f8010a7249d7ec93e197e96999fe6c?s=47 Tony Sloane
January 26, 2015

Monto: A Disintegrated Development Environment (WG 2.11 version)

Talk from IFIP WG 2.11 meeting in Stellenbosch, Jan 2015. Updated version of talk of same name from SLE 2014.


Tony Sloane

January 26, 2015


  1. Monto: A Disintegrated Development Environment Anthony M. Sloane Matthew Roberts

    Scott Buckley Shaun Muscat Programming Languages Research Group Department of Computing Macquarie University Anthony.Sloane@mq.edu.au @inkytonik 1 / 16
  2. Context Kiama language processing library kiama.googlecode.com A collection of Scala-based

    internal domain-specific languages for solving problems in the domain of language processing. Problem Domain-specific language Text to structure Context-free grammars Structure representation Algebraic data types Transformation Term rewriting Analysis Attribute grammars Execution Abstract state machines Structure to text Pretty printing For more information. . . SCP 2013, GTTSE III, SLE 2012, 2014 papers 2 / 16
  3. Kiama Examples Strategy-based rewriting a’la Stratego topdown ( rule[Num] {

    case Num (i) => Num (i + 1) } ) Dynamically-scheduled attribute grammars val repmin : RepminTree => RepminTree = attr { case Fork (l, r) => Fork (repmin (l), repmin (r)) case t : Leaf => Leaf (globmin (t)) } 3 / 16
  4. Monto Motivation Difficulty of integrating new functionality into established IDEs

    Editor-based approaches to language-specific support Work on tool/component integration: e.g., ToolBus, Linda 4 / 16
  5. Approach Constraints Simplify, simplify, simplify Separate the components as much

    as possible Live updates on every change Design Simple broadcast process architecture Simple JSON messages Fast off-the-shelf messaging using ZeroMQ 5 / 16
  6. Monto Architecture Broker Sources Sinks Servers version version product product

    version User change display 3 2 4 5 3 1 6 interact 6 / 16
  7. Demo 1: Basics via the Command Line Source: any file

    Servers: reverse contents; calculate length of contents Sink: print product Broker reversed file contents file contents User reverse.py file contents send.py file print.py reversed file contents file length print length.py file length 7 / 16
  8. Demo 2: Wrapping Existing Commands Source: any file in editor

    Server: wrapped cloc command to calculate size Sink: display cloc output in editor Broker cloc output file contents User wrap cloc file contents change file editor editor cloc output show output in editor 8 / 16
  9. Demo 3: Compiler Server Source: MiniJava program in editor Server:

    Scala interface to existing MiniJava compiler Sink: errors, output and compiler AST in editor Broker AST, errors, output program User MiniJava compiler program edit MiniJava program editor editor show AST, errors, output in editor AST, errors, output 9 / 16
  10. Demo 4: HTML product, Web-based Sink Source: HTML code Server:

    reflect changes back as an identical product Sink: publish HTML via web-server Broker HTML HTML User Reflector HTML edit HTML code Web server editor display HTML HTML 10 / 16
  11. A Lightweight Approach (1) Language Lines Startup Python 146 Broker

    Python 32 Source Python 17 Server Python 34 Sink Python 10 Common Python 9 wrap.py Python 70 Server Scala 35 Kiama compiler wrapper Scala 43 Web server sink Python 110 11 / 16
  12. A Lightweight Approach (2) Role Language Lines print.py Sink Python

    5 reflect.py Server Python 37 reverse.py Server Python 4 send.py Source Python 62 Sublime Text plugin Source + Sink Python 309 cloc Server Perl 8014* Hoogle Server Haskell 5270* MiniJava Server Scala 12 Compiler Scala 2132* * existing code 12 / 16
  13. Work in progress Source-product coordinate mapping Project-based processing (e.g., build

    servers) Interactive applications: debugging, REPLs Network-based servers Other groups: Sven Keidel, Sebastian Erdweg (TU Darmstadt) Joey Ezechiels, Guido Wachsmuth, Eelco Visser (TU Delft) 13 / 16
  14. Monto and Eclipse (TU Darmstadt) 14 / 16

  15. Monto and Eclipse (TU Darmstadt) 15 / 16

  16. Summary A simple framework provides easy, general integration Performance is

    good enough for interactive use Proof-of-concept applications are already useful Modes of interaction not shown in the demo are possible (e.g., append to view, use and/or replace selection, context-menus) For more information. . . SLE 2014 paper https://bitbucket.org/inkytonik/monto https://bitbucket.org/inkytonik/sublimemonto 16 / 16