Erlang & Concurrency Dependent Types Example Compiler Conclusion
A Problematic Program
1 -module(lock_srv ).
-behaviour(gen_server ).
handle_call(lock , _From , unlocked) →
{reply , grant , locked};
6 handle_call(lock , _From , locked) →
{reply , wait , locked};
handle_call(unlock , _From , _) →
{reply , ok , unlocked}.
11 %% Other gen_server callbacks elided
Listing 1: Simple Concurrent Lock Service in Erlang using
gen_server.
Archibald Samuel Elliott, Edwin Brady Erlang meets Dependent Types