set - Sets an environment variable


set [-h] [<name>] [<value>]

A variable environment is maintained by the command interpreter. The "set" command sets a variable to a particular value, and the "unset" command removes the definition of a variable. If "set" is given no arguments, it prints the current value of all variables.

Command options:

-h
Prints the command usage.
<name>
Variable name
<value>
Value to be assigned to the variable.

Interpolation of variables is allowed when using the set command. The variables are referred to with the prefix of '$'. So for example, what follows can be done to check the value of a set variable:
NuSMV> set foo bar
NuSMV> echo $foo
bar
The last line "bar" will be the output produced by NuSMV.

Variables can be extended by using the character ':' to concatenate values. For example:
NuSMV> set foo bar
NuSMV> set foo $foo:foobar
NuSMV> echo $foo
bar:foobar
The variable foo is extended with the value foobar .

Whitespace characters may be present within quotes. However, variable interpolation lays the restriction that the characters ':' and '/' may not be used within quotes. This is to allow for recursive interpolation. So for example, the following is allowed
NuSMV> set "foo bar" this
NuSMV> echo $"foo bar"
this
The last line will be the output produced by NuSMV.
But in the following, the value of the variable foo/bar will not be interpreted correctly:

NuSMV> set "foo/bar" this
NuSMV> echo $"foo/bar"
foo/bar
If a variable is not set by the "set" command, then the variable is returned unchanged.

Different commands use environment information for different purposes. The command interpreter makes use of the following parameters:

autoexec
Defines a command string to be automatically executed after every command processed by the command interpreter. This is useful for things like timing commands, or tracing the progress of optimization.
open_path
"open_path" (in analogy to the shell-variable PATH) is a list of colon-separated strings giving directories to be searched whenever a file is opened for read. Typically the current directory (.) is the first item in this list. The standard system library (typically $NuSMV_LIBRARY_PATH) is always implicitly appended to the current path. This provides a convenient short-hand mechanism for reaching standard library files.
nusmv_stderr
Standard error (normally stderr) can be re-directed to a file by setting the variable nusmv_stderr.
nusmv_stdout
Standard output (normally stdout) can be re-directed to a file by setting the variable nusmv_stdout.

Last updated on 2009/03/04 12h:51