Subsections

Crash Course

First Steps

Download the pre-compiled package for Windows or Linux from the web page and extract the package with tar xfz cubint_linux.tar.gz on Linux or your favourite tool (e.g. WinZip) on Windows respectively. Start the interpreter with a double click on the executable (or alternatively ./cubint on Linux). Type help;<RETURN> for information about available commands.

Untyped $\lambda$-Calculus

To switch to the untyped $\lambda$-calculus type switch tm u;<RETURN>. The syntax for untyped terms is as follows:


calculus interpreter input
$x$ x
$\lambda x.t$ \x.t
$t_1\;t_2$ t1 t2

Let's look at some examples:

Simply Typed $\lambda$-Calculus

At the end of the last section we saw that Cubint supports built-in integers. As you know from the lecture this extension is very error-prone in the untyped calculus, i.e. it is very simple to input terms whose evaluation get stuck (e.g. 3+(\x.x)). Therefore types are introduced. The syntax looks as follows:


$\lambda$calculus interpreter input
$x$ x
$\lambda x:\mathbf{T}.t$ \x:T.t
$t_1\:t_2$ t1 t2
$T\rightarrow T$ T->T
$Int$ Int

The $\lambda$-abstraction needs a type annotation. Types can be built with ->. Int is the base type for integers. For a full overview about the syntax look at 5.1.

The interpreter is started in simply typed mode at the beginning. You can also change the mode on-the-fly by typing switch tm s;<RETURN>.

Let's look at some basic examples:

This concludes the short overview about the base calculi. The following sections describe the usage of Cubint in more detail. All available interpreter commands and syntactic entities are listed. If you need more examples, use the tests library.

Christian Müller 2004-11-09