Static Code Analyzer for Elixir

I am a final year undergraduate and I wish to develop static code analyzer for Elixir as my final year research project (Group project of 4). At the moment as our instructor says we have planned to find memory and concurrent issues. But we have no any idea how should my project arranged and what sort of things we should analyze using a analyzer. We want to do something new. But we have no any idea how to start. Could anyone suggest me how should we start. We have already started studying these stuffs.

  • Elixir language

  • Compiler designing

  • Advanced Operating Systems

But still I have no any idea what how to enter this project. Please help me !!!

Thank you!!!

  1. Do not operate on Elixir code per se, but on abstract terms (beam_lib, BEAM Wisdoms and The BEAM Book). This will not require expanding macros or other Elixir magic. Additionally it will allow you to use the same code for other BEAM languages.
  2. Check out Concuerror for concurrency testing; Elvis and Credo for static analysis (mostly linting in that case, but the same rules will mostly apply to other analysers). You can also check Dialyzer code and Gradualizer for type checkers.
  3. While I see possibilities in concurrency checkers I hardly see how you would be able to find “memory” issues in BEAM (unless you want to find them in the VM itself), as GC will mostly take care of it for you. The only “problems” I can see is in case if you would parse large binaries and then store the parts as the refs (see Jason.decode/2 :strings option for example). Other than that it is in reality finding long-running processes with large state.

You should understand Philip Wadler’s attempt to statically type Erlang in 2002.