At Oxford, we use Oberon as the second language we teach to our undergraduate students (the first one is Haskell). We chose it because of its cleanliness and simplicity, and because of the availability of books that emphasize clear reasoning about programs.
To support this teaching within our Unix-based software laboratory, I have developed from scratch a portable compiler that translates Oberon-2 into bytecode. This implementation is in use at Oxford on SparcStations and 386 PC's under Solaris, on 386 PC's under Linux, and on 386 PC's under Windows. There should be little difficulty in porting the system to other 32-bit Unix systems.
This implementation of the Oberon-2 language does not include a version of the Oberon-2 operating system and programming environment; instead, programs are edited with the tools of the host operating system and compiled into executables that run like other programs on the host system. The lab manual offered below contains exercises that rely on Oberon programs that work together with other Unix tools and utilities.
The compiler is written in Objective Caml, and the runtime system is written in C. It is not necessary to have Objective Caml installed in order to use the binary distributions listed below, but it is needed in order to build the system from the source distribution. The build process also uses some scripts written in Tcl. The binary distribution for DOS and Windows was built using MSYS/MinGW. It is not necessary to install either of these in order to use the Oberon compiler or run Oberon programs.
Click here to download:
Instructors who wish to use the practical exercises for teaching are welcome to enquire about obtaining the source materials of the exercises. I'd love to hear from you (E-mail: mike@comlab.ox.ac.uk); perhaps we can collaborate on extending the material.
GC_INIT to
initialise the Boehm garbage collector from the runtime system. This
is a no-op on many platforms, but is needed for the GC to work
properly on Macs.tmpnam in MinGW creates a file in the root directory of
the current drive, and Vista sensibly doesn't allow that.Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
This software is provided by the author "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the author be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
The binary distributions include the Objective Caml run-time system. The Objective Caml run-time system is covered by the GNU Library Public Licence. Objective Caml may be obtained from http://caml.inria.fr.
The binary distributions also include the conservative garbage collector of Hans-J. Boehm and others. The source code may be obtained from http://www.hpl.hp.com/personal/Hans_Boehm/gc.
Mike Spivey
mike@comlab.ox.ac.uk