Using Pict (CSCI 6500)

Pict is installed in the directory /projects/wcl/software/bin/pict. You can login to a Linux machine by running:

 

$ ssh linux.cs.rpi.edu

 

To use Pict, you have to set the path of the compiler in your environment, by executing the following command (assuming your environment is bash):

 

linux00 ~ $ export PATH=$PATH:/projects/wcl/software/bin

 

Now you may want to try compiling some examples. The examples  directory is located in /projects/wcl/software/pict/Examples. You can copy some of the examples to your home directory. For example:

 

linux00 ~ $ cp /projects/wcl/software/pict/Examples/Simple/hello.pi ~
linux00$ cd ~
linux00$ pict hello.pi
Hello world

 

You can see the standard output shows "Hello world". Besides, the compiler also produces an executable file called a.out. You can try to execute a.out, and you will see the same result. Of course you can specify the output filename with the option -o. For example:

 

linux00 ~ $ pict hello.pi -o hello
linux00$ ./hello
Hello world

 

The tutorial is available in the directory /projects/wcl/software/pict/Doc. Take a look at it.


Last modified: Tue Oct 16 13:38:58 EDT 2012