CS 136: Elementary Algorithm Design and Data Abstraction

Software

In addition to Scheme/Racket, CS136 students will need access to a C compiler. Because programming in C is subject to many mysterious memory-related bugs, we strongly recommend the use of a tool named valgrind as you develop C code. Valgrind has been integrated into set of tools collectively known as RunC.

If your own computing environment is either Linux or Mac, you may try to get RunC running on your machine directly. You are on your own. It consists of the following tools:

  • gedit, an editor with a locally developed (by Gord Cormack) plugin named RunC
  • gcc, a C compiler
  • valgrind dynamic analysis tools

Getting all this software going is a daunting task (except, perhaps, on Linux). Therefore, we strongly suggest that you use a prepared virtual machine instead. The basic idea is to use the VirtualBox software to run a complete, pre-configured, computer system on whatever computer you have. This also has the advantage of making valgrind available (indirectly) for Windows users; there isn't a native version of valgrind for Windows.

The first tutorial will help you install and become acquainted with this software. Please do steps 1 and 2 before going to Tutorial. Tutorial leaders can help you with the remaining steps in tutorial. Of course, you can try them on your own as well.

  1. Go to http://www.virtualbox.org/wiki/Downloads. Download the version of VirtualBox that's appropriate for your computer. Install it.
  2. Download the Virtual Machine appliance for CS136. Right-click the link and choose "Save as...".
  3. Start VirtualBox.
    1. Choose "File->Import Appliance..."
    2. Click the "Choose.." button.
    3. Navigate to where you saved the download in step 2, select the file, and click the "Open" button.
    4. Click the "Continue" button. This takes you to an "Appliance Import Settings" page.
    5. Click the "Done" button. You'll need to wait a few minutes while the appliance is imported.
  4. Select the CS136 Virtual Machine in the left-hand panel of the "Oracle VM VirtualBox Manager" window. Click the green "Start" button.
  5. Read the "README.txt" file and explore the system!

NOTE: When you first run the virtual machine, it may prompt you to upgrade to the latest version of Ubuntu (11.04 - Natty Narwhal). Please do not perform this upgrade, as RunC hasn't been fully tested in the new enviroment.

There is a RunC tutorial available. Note that one of the screen shots shows an incorrect C program. The text says how to correct it.

Setting up RunC on your student.cs account

To set up RunC on your own account, log in to one of the Linux labs on the second floor of MC. From there, follow the instructions on this page to set up RunC.

Valid XHTML 1.0 Strict Valid CSS!

Last modified on Tuesday, 01 May 2012, at 13:18 hours.