conferences | speakers | series

IntelliJ Elixir - Elixir Plugin for JetBrains IDEs

home

IntelliJ Elixir - Elixir Plugin for JetBrains IDEs
FOSDEM 2020

Using Java, Kotlin, and GrammarKit to reimplement to Erlang, Yecc grammars, and Elixir for static analysis for Elixir source and BEAM bytecode. How decompiling and disassembly tools can quickly answer optimization arguments.

IntelliJ Elixir is the Elixir plugin for JetBrains IDEs like IntelliJ and Rubymine. It uses JetBrains OpenAP, JFlexI and GrammarKit to reimplement the Elixir grammar, which is natively implemented as bespoke Erlang lexer and YECC LALR parser. This meant translating a recursive Erlang lexer into a strict regular expression state machine used by JFlex with some interesting needed extension. Porting the grammar from LALR Yecc to the LL Pratt Parser generated by Grammar Kit involved understanding the non-universality of BNF. Reimplementing and extensive testing of the plugin led to finding bugs in native Elixir, showing that alternative implementations of languages in editors and tools can find bugs in the original implementations. The BEAM bytecode decompiler and disassembler has led to better understanding of how the VM optimizes different Elixir code.

Speakers: Luke Imhoff