Iqazra
Iqazra

Reputation: 419

How to execute a .smv file from notepad++

I am currently learning NuSMV for LTL and CTL model checking.

I use notepad++ for my coding activities - mostly in python - and I know we can run a python script (.py files) using notepad++.

I am new to NuSMV and I wonder if there is any method to execute a .smv script in notepad++.

Here is an example of .smv code that I intend to run.

MODULE main
 VAR
  variable : boolean;
 ASSIGN
  init(variable) := true;
  next(variable) := !variable;
 LTLSPEC
  G (variable & X !variable)
 CTLSPEC
  EF (!variable & AX variable)

However, I also have some difficulty to run the above SMV script using NuSMV interactive shell. Suppose the above script name is test.smv. How am I supposed to run it using NuSMV interactive shell?

Upvotes: 2

Views: 1656

Answers (1)

miroxlav
miroxlav

Reputation: 12184

If you can figure out the command line to run your code, then the solution is:

  1. Install NPPExec plugin
  2. Figure out the command line you want to exec and test it
  3. In N++, press F6 or use equivalent menu item from NPPExec plugin menu
  4. Fill in the command line you need
  5. Replace file name in your command line by "$(FULL_CURRENT_PATH)" token - N++ will put filename of your current file here
  6. [optional] Press Save... button and save the command
  7. Press OK button to run your command
  8. For repeated run of the same command, just press Ctrl+F6

To display command output to console, press Ctrl+` (the key left of 1234567890).

NuSMV supports launching from the command line and has plenty of command line options found in Chapter 4 of the documentation (current version as of today). However, if they still do not fulfill your requirements and there is no way to run your code from command line, then you might need considering custom programmatic solution (if you have enough time and skills) - consider writing your own N++ plugin. Or write small tool controllable from command line which calls all necessary NuSMV methods using its API. Maybe this can be also done in Python. Then you simply call your tool from NPPExec.

Upvotes: 1

Related Questions