The Pizza Compiler

The Pizza language is an extension to Java with three new features:
- Generics (aka Parametric polymorphism)
- Function pointers (aka First-class functions)
- Class cases and pattern matching (aka Algebraic types)

Pizza's Installation FAQ




The pizza compiler doesn't run. Help!

  Some general tips for getting Pizza to run:

First, make sure that Java runs. Try both

java <a Java program>
If Java doesn't work, check your Java installation or the installation guide provided by Sun.

If Java does run then there are two common problem sources. Make sure your CLASSPATH includes the Pizza classes, as a couple of questions below (one and another one) address.
To run the Pizza compiler you can use the executable jar feature:

java -jar pizza-x.x.jar
  • For Unix, you can use an alias:
    alias pizzac java -jar pizza-x.x.jar
  • For Win32, you can use a batch file pizzac.bat contained inside of some directory on your PATH. The file pizzac.bat should contain the following:
    java -jar pizza-x.x.jar %@

When I try to run Pizza I get: Can't find class net/sf/pizzacompiler/compiler/Main

  You did not setup your CLASSPATH correctly. On Unix systems, run setenv to find out the current value of your CLASSPATH. On Windows systems, run set instead. The Pizza jar file (pizza-x.x.jar) should be contained in the CLASSPATH. Make sure that this is the case.

I can compile a class, but when I try to run it I get java mypackage.MyClass can't find mypackage.MyClass

  Your generated classfile is somewhere where java can't find it. Run pizzac with the -verbose option to find out where your classfile goes. You need a directory, say `X', in your CLASSPATH such that X/mypackage/MyClass.class exists. To make sure that java always finds generated classfiles, include a -d X option in your compile command, where `X' is a directory in your CLASSPATH. It is often easiest just to make that part of the pc alias:
  • On UNIX, use:
      setenv CLASSPATH $HOME/classes:$HOME/pizza/classes
      alias pizzac	java -jar pizza-x.x.jar -d ~/classes
  • On Windows 95, the setup is:
      set CLASSPATH=c:\classes;c:\pizza\classes
    and in pizzac.bat:
      java -jar pizza-x.x.jar -d c:\classes %@

How can I install Pizza on OS/2,the Macintosh
OS, Windows 3.11, etc.?

  Unfortunately, we don't know. It's hard for us to support for these platforms since we don't have experience with them, or easy access to them.

Having said that, we would welcome an installation guides or suggestions for any of platform we do not directly support. If you've gotten Pizza to run on the Bizzarro Mark 23 (or even something with a less interesting name!), and you'd be willing to write up and take questions about an installation sheet, please get in touch with us.