Extra credit: Erlang exercises

Due: Thursday, December 11, 11:59 PM


These are a bunch of exercises to get your feet wet with Erlang programming. This project will be worth 2% of extra credit. There is no late deadline.

You will almost certainly want to refer to the Erlang documentation. Links to tutorials, books, and manual pages are on the main course schedule page.

The Exercises

A Note About Running in Eclipse

There is an Eclipse plugin for Erlang, called Erlide. You can find detailed instructions about setting up Erlide, including integrating an Erlang runtime here.

You may find it useful to run your code using the Console. Once you have successfully provided an Erlang backend, look for the Console tab at the bottom of the screen. You can interact with the Console just as with the "erl" command-line tool, running your code with a command such as semaphore:test().

Running on Linuxlab

Erlang is installed on Linuxlab; to enable it you should simply log in and enter the command module add erlang. Then you can run the Erlang shell, erl, like we do in class.

What to Turn In

Every file you submit should have your name and UID. Each file should also have a no-argument function test in it that actually runs the code you've implemented. As such, I ought to be able to iterate through all of your files, compile them, and then run FILE:test() to see things work. Feel free to use helper functions in your tests that we have provided in sample code, or that you write yourself.

Submit your code on the Department's Submit Server. Contact the TA if you have any troubles submitting.

Web Accessibility