Language Implementations for CS 152

The languages Java and Scheme (a dialect of Lisp) will be sufficient for the five programming assignments in CS 152, Fall 2006, Sections 5 & 6. The fifth assignment will allow you a choice languages, including Prolog. Even if you do not use Prolog for Assignment 5, you might want to experiment with it anyway, since it will be covered to some extent in the lecture and on exams.

These languages are available as follows:

Through CS department facilities

Although the Computer Science department expects each of its majors to possess a laptop computer, it still maintains additional computing facilities, including a microcomputer lab for student use in WSQ 1. You may obtain access to these additional department computing facilities by either registering for 1 unit of CS 110L, or by signing up for access at the department office in MH 208. This latter option requires a $45 fee. Either option gives you access to Windows, to Unix, and to the internet and thus to the class web site.

Each of the programming langauges mentioned above has an implementation available for laptops, and in the microcomputer lab.

From non-department sources

Public domain Windows implementations of the languages to be used in this class are available as described below. Some of the old installation hints given on the CS department web site may still be helpful in the installation process. Some of the old links, including links to tutorials, maintained by Prof. Louden at http://www.cs.sjsu.edu/faculty/louden/pltext/resources.htm may also be helpful to you.

If you are interested in using any of the public domain implementations, please download and install them early, so that you have time to deal with any installation problems that may arise. In the worst case, you may need to use department facilities even though you hadn't originally planned to.

Java
The BlueJ implementation of Java is available at http://www.bluej.org/. The Eclipse implementation is available at http://www.eclipse.org/; you'll want the Java Development Tools. The Eclipse download is about 105MB??; the installed version takes about 200 MB. The BlueJ download is less than 3 MB; the installed version takes about 5.5MB.

As you might suspect, BlueJ is easier to use, but not as full-featured. In particular, the BlueJ debugger is missing some useful features. A new and perhaps useful compromise is the BlueJ edition of the NetBeans IDE, available at http://edu.netbeans.org/bluej. This download is about 31 MB; the installed version takes less than 100 MB.

Note that in each case you will need to download the Java IDE separately if you don't already have it. All three download sites give assistance on how to do this (for the NetBeans IDE / BlueJ Edition, click the Release Notes link). Eclipse has massive assistance available from its Help menu; the others have useful tutorials.

Scheme
The Dr. Scheme version of Scheme is available for free download. If you install it in the default C:\Program Files\PLT folder, the excecutable version will be at C:\Program Files\PLT\DrScheme.exe.

The download is less than 12MB; about 76MB is required for the installed version. You needn't download the documentation separately; the most useful documentation is available by choosing Manuals from the Help|HelpDesk menu once you run Scheme. This documentation includes the tour of Scheme (including a description of the interactive environment), the PLT MzScheme language manual, and the Revised^5 Report. Of these references, the Revised^5 Report is probably most useful. The useful tutorial "Teach Yourself Scheme in Fixnum Days" is also available from the Manuals section. Another text that's available online is Kent Dybvig's The Scheme Programming Language.

When you first use the Dr. Scheme implementation, you will be asked which version of the language to use. In the Language | Choose Language menu, choose PLT Graphical. Then click the Run button to enable your choice.

Prolog
An implementation of SWI Prolog is available at: http://www.swi-prolog.org/. The download is about 4.5 MB; the default installed version is about 28 MB.

 

From other sources

With the exception of Scheme and perhaps Java, it's probably okay to use any language implementations available at home, at work, or elsewhere for any of the languages mentioned above. For Scheme, I do ask that you use Dr. Scheme. For Java, I do ask that you use version 5.0. Otherwise, the differences between various versions of a language are unlikely to be important for our simple assignments.

 

Debugging

I strongly recommend that you get used to using debuggers for dealing with run-time errors, if you're not already. In particular, for Java I don't recommend the use of Textpad, or JDK by itself. If you're new to debugging, you might want to start with the BlueJ implementation, since both it and its debugger are easy to use and have helpful tutorials. Then if you feel you need more functionality in the debugger, you can switch to NetBeans IDE / BlueJ or to Eclipse.

Dr. Scheme has a mechanism for tracing that is useful for debugging. In Scheme, tracing provides a record of calls to, and returns and return values of, selected functions. Prolog and Haskell have somewhat similar facilities. I will say more about these facilities in class, as needed.