Search code examples
windowsbatch-filenusmv

Batch file doesn't execute completely after other .exe is executed


I'm trying to create batch file which should have this commands:

cd "c:\Program files\NuSMV\2.5.2\bin\"
NuSMV -int short.smv
go
pick_state -r
print_current_state -v
simulate -r 3
show_traces -t
show_traces -v

The problem I encounter is this: after the second line is executed, NuSMV.exe runs in cmd and rest of the commands don't execute until I exit NuSMV, but I want to run commands 3-8 in NuSMV. What do I need to change in my .bat file. Thanks.


Solution

  • Put commands 3-8 in a text file (eg., cmds.txt), then run NuSMV as follows:

    NuSMV -int short.smv -source cmds.txt
    

    From the manual (nusmv.pdf) p.48:

    It is also possible to make NUSMV read and execute a sequence of commands from a file, through the command line option -source: system prompt> NuSMV -source cmd file