Concuerror and Elixir

I am attempting to get Concuerror working on my elixir project. After creating a test file, Concuerror was silently failing to process the file. After modifying the source code to print out the error, it seems that elixir_erl.debug_info is not defined.

I have attempted to turn on debugging for both elixir and erlang compilers, but no luck yet. I have also used the following snippet to confirm the compiled file in fact does not have the debugging information present.

At this point, I don’t know where else to look. Any thoughts would be appreciated.


Confirm no debug information present.

$> erl -noinput -eval 'io:format("~s\n",
[case beam_lib:chunks(hd(init:get_plain_arguments()), ["Abst"]) of
    {ok,{_,[{"Abst",A}]}} when byte_size(A) /= 0 -> "yes";
    _ -> "no" end])' -s init stop -- _build/test/lib/concuerror_playground/ebin/Elixir.PingPong.ConcurrencyTest.beam

My test file:

Code.require_file("../test/test_helper.exs", __DIR__)

defmodule PingPong.ConcurrencyTest do
  import PingPong

  def test do
    ping_pid = spawn(fn -> ping() end)
    spawn(fn -> pong(ping_pid) end)

Mix file:

# ...
  def project do
      app: :concuerror_playground,
      version: "0.1.0",
      elixir: "~> 1.9.1-otp-21",
      start_permanent: Mix.env() == :prod,
      elixir_paths: elixirc_paths(Mix.env()),
      elixirc_options: [debug_info: true, verbose: true, all_warnings: true],
      erlc_options: [debug_info: true], 
      test_pattern: "*_test.ex",
      warn_test_pattern: nil,
      deps: deps()
# ...

I have been working on supporting Concuerror in Elixir, and the main problem is that you cannot use modules defined in .exs files as Concuerror entrypoints. It do not work as there is no .beam file for such modules and by extension - no metadata. There is workaround possible that I can publish later, but it is very hacky. Maybe finally I will sit and publish library that will provide seamless integration between Elixir and Concuerror, but for now I do not have time to spare on such project ;(

1 Like