Erlang/OTP and SDL
Wed Sep 15 16:07:23 CEST 2004
Eranga> How good is the SDL support in Erlang? Are there any tools
Eranga> that can generate Erlang code from a SDL spec?
Ulf> In general, one can say that it's entirely straightforward
Ulf> to generate Erlang from SDL
Just as an example: MTP-2 is defined in about 50 pages of SDL
diagrams. Without knowing anything about MTP-2, I "brainlessly"
translated it into Erlang. By "brainlessly", I mean I used a process
whenever SDL had a process, sent a message whenever SDL sent a message
and sat in receive whenever SDL wanted me to wait for a message.
The result was just over 2000 lines of Erlang code. While doing that,
I found two bugs in the SDL in the MTP-2 standard, both of which have
been corrected in a later version. The Erlang code was hopelessly
slow, but that was OK: the goal was to build a reference
implementation to test the real (hardware-accelerated) implementation
I didn't use any tools.
More information about the erlang-questions