SPIN – PC Installation Instructions
These instructions are for installation of SPIN on a
PC. See http://spinroot.com/spin/whatispin.html
for details on Linux installations.
You need to have a C-compiler and C-preprocessor installed
on your machine. In fact, SPIN relies
on your C-preprocessor being called ‘cpp’.
I recommend installing and using cygwin, which contains gcc and all the
needed libraries. These instructions
will therefore guide you through the installation of cygwin before installing
SPIN. You will run SPIN from inside the
cygwin environment.
- Download
the cygwin installer at http://unix.about.com/gi/dynamic/offsite.htm?site=http://www.cygwin.com/setup.exe
- Launch
the installer. Be sure to specify
a temp folder to hold the local package directory. You can erase this after the
install. Use all of cygwin’s
default configurations (that is, install to C:\cygwin, leave the default
text file type as Unix).
- When
you reach the screen that allows you to select which packages to install,
do the following. By default,
cygwin will NOT install the needed development tools. By default packages are organized by
category. Installation can be managed all at once, by individual
categories or by individual packages within each category. Click on the +
(plus sign) to expand or contract categories. The circle-arrows located in front of categories and packages
are used to select installation options. Clicking on a circle-arrow moves
through each installation option.
If you just want to use cygwin for this project, then toggle the
options from Default to Install for the packages called “Devel”,
“Editors”, “Libs” and “Math”. If
you want a full version of cygwin installed, then toggle all packages from
Default to Install. Note: if you
try to toggle the All package, the program hangs up. Therefore, do each one individually.
- Continue
with the installation until Setup is complete. The Setup should create a Desktop icon shortcut allowing you
to launch cygwin. Keep it, it’s
useful.
- Now,
download the PC package for SPIN located at http://spinroot.com/spin/Src/pc_spin407.zip
- Extract
the Zip file to a folder.
- Open
the folder and rename the executable ‘spin407’ to ‘spin’. Also, rename the xspin407.tcl file to
just ‘xspin’. Copy these 2 files
(spin and xspin) to the folder C:\cygwin\bin. This should add the programs to your cygwin environment’s
path.
- Launch
cygwin by using the Desktop icon.
It will bring up a command prompt, just like with a Unix
system. Your home directory is in
C:\cygwin\home\YOURNAME.
- Change
directories in cygwin to C:\cygwin\bin. In this directory, type the following from the command
prompt: chmod a+x xspin
- This
will change the file xspin so that it is executable.
- Now,
cd back to the directory containing the Promela file that you would like
to run/verify with spin.
- Type
‘xspin filename &’ from the command prompt in cygwin to load
‘filename’ into SPIN, bringing up the Xspin GUI.
- You’re
set to go!