Language Implementations for CS 152

partial version
The languages Java, Scheme (a dialect of Lisp), and Prolog will be sufficient for at least four of the five programming assignments in CS 152, Fall 2005, Section 4. The fifth assignment may use one of these languages, may use one of the languages Ada, Haskell, C or C++, or may allow you a choice. In any case, you might want to experiment with the languages that you do not use on the programming assignments, since they will be covered to some extent in the lecture and on exams.

These languages are available as follows:

Through department facilities

The department maintains a microcomputer lab for student use in WSQ 1. For regular access to the department computing facilities, you need to register for 1 unit of CS 110L, or sign up for access at the department office, MH 208. This latter option requires a $45 fee. In either case, you get access to Windows, to Unix, and to the World Wide Web and thus to the class web site. All of the programming langauges mentioned above are available by using department facilities.

From non-department sources

Public domain Windows implementations of the languages to be used in this class are available as described below. A few additional installation hints are given through the CS department web site.

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 BlueJ download is less than 3 MB. As you might suspect, BlueJ is easier to use, but not as full-featured. In particular, the BlueJ debugger is missing some useful features. Note that in both cases you will need to download the Java IDE separately if you don't already have it. Both download sites give assistance on how to do this. BlueJ has a decent tutorial, while Eclipse has massive assistance available from its Help menu.

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 74MB 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.

When you first use the Dr. Scheme implementation, you will be asked which version of the language to use -- choose first PLT, and then Graphical.

Prolog
An implementation of SWI Prolog is available at: http://www.swi-prolog.org/. The download is about 4 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 may require version 5.0 in some of my classes. 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 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 later.

Other links

Several other useful links, including links to tutorials, are maintained by Prof. Louden at http://www.cs.sjsu.edu/faculty/louden/pltext/resources.htm