erlang: implementing execution trace verification