 |
|
CISC/CMPE 422, CISC 835: Formal Methods in Software Engineering
Using NuSMV
|
Getting NuSMV
The NuSMV model-checker is available at
http://nusmv.fbk.eu.
Binaries are available for Linux and Windows. Sources are also
available. When you download it you are asked to register, but you do
not have to give your name if you don't want to (just click on "Do not
register"). The website also provides a User Manual and a Tutorial,
which are quite useful.
Once installed, you run NuSMV from the command line by
typing NuSMV -int your_smv_file.smv.
Editors with NuSMV support
The NuSMV code you will have to write is going to be quite modest in length,
so a smart editor with syntax-highlighting etc is not required at all.
If you really want editor support for NuSMV though, here are some options:
- In class, I have been using
GNU Emacs
together with the NuSMV mode provided
here.
- An NuSMV plugin for VIM is
here.
To install, follow the instructions below (thanks, Ally),
which assume you've SSH'd in already or have a terminal
open on a CASLAB Linux machine in the lab:
- In your home directory, run: git clone https://github.com/wannesm/wmnusmv.vim.
This will create a directory called wmnusmv.vim
- Now create a vim plugins folder, assuming you don't already have one, in your home folder (Note: the name HAS to be what is written below verbatim. That's the place where vim looks for plugins. It's just not there by default.): mkdir -p ~/.vim/plugin
- Now copy the syntax file to that folder:
cp ~/wmnusmv.vim/syntax/nusmv.vim ~/.vim/plugin/nusmv.vim
- That should do it. You can delete the wmnusmv.vim folder in your home directory. Now just open vim with a .smv file and it should work. You might have to turn syntax highlighting on with :syntax on in vim command mode.
- An Eclipse plugin for NuSMV with an editor
with syntax highlighting
here.
- Also, many editors such as ultraedit or scite can be customized
to a new language fairly easily. The list of NuSMV keywords
can be found on top of page 7 in the
NuSMV 2.6 User Manual.
Note that I only have tried the first option (emacs) myself, so use the other
options at your own risk (and let me know of positive/negative experiences).
Notes on using NuSMV
Last modified: Wed Nov 16 22:44:33 EST 2016