How to set up Mocha
You need to execute these commands from a Linux machine.
A fast linux machine that can be used for this class is
Lauhau, but you can use any machine of your choice, provided
it mounts the general departmental filesystems.
Follow these instructions:
- If you are using bash, then do
source bash_setup
If you are using csh or tcsh, then do
source csh_setup
Note: I updated these files on Saturday, October 2,
2004; you need to use the latest version.
- Run Mocha by mocha & or, if you want to do it in text
mode, mocha -t
- Notice that if you use Mocha in text mode, you can also write
scripts, and do: mocha -t < script > output
This is particularly convenient if you are running over and over the
same commands (for example, the read_module command when you try to
parse a module!)
Examples of Reactive Modules
Here are the
examples cited in the manual,
as well as additional examples.
Note: look for files with extension .rm: those are the
reactive modules files. The other files are the product of using
mocha on those files, or accessory scripts.
Oh, and don't complain that your browser believes those are music
files! Mocha predates such frivolous things :-)
Note: The version of Mocha I put here is slightly different
from the one you can find on the main Mocha webpage
http://www-cad.eecs.berkeley.edu/~mocha
For Homework 1, either version is fine.
For later assignments, you need to use the version set up here.
Luca de Alfaro
luca@soe.ucsc.edu