nuXmv API 126f6942
API for nuXmv
Loading...
Searching...
No Matches
Macros | Functions
Symbols

Functions for handling Symbols. More...

Macros

#define NUXMV_VALID_SYMBOL(symbol)   ((symbol).repr != NULL)
 Valid symbol.
 

Functions

nuxmv_symbol nuxmv_make_symbol (nuxmv_env env, const char *name)
 Create a new symbol.
 
nuxmv_symbol nuxmv_make_scoped_symbol (nuxmv_env env, const char *name, nuxmv_symbol scope)
 Create a new symbol with the given name and context.
 
size_t nuxmv_symbol_get_id (nuxmv_env env, nuxmv_symbol sym)
 Get the ID of a symbol.
 
const char * nuxmv_symbol_get_name (nuxmv_env env, nuxmv_symbol symbol)
 Get the name of a symbol.
 
int nuxmv_symbol_is_scoped (nuxmv_env env, nuxmv_symbol symbol)
 Test whether a symbol is scoped.
 
nuxmv_symbol nuxmv_symbol_get_scope (nuxmv_env env, nuxmv_symbol symbol)
 Get the scope of a symbol.
 

Detailed Description

Functions for handling Symbols.


Macro Definition Documentation

◆ NUXMV_VALID_SYMBOL

#define NUXMV_VALID_SYMBOL (   symbol)    ((symbol).repr != NULL)

Valid symbol.

This macro checks whether symbol is a valid nuxmv_symbol.

Parameters
[in]symbolThe symbol to inspect.
Returns
true if the option is valid, false otherwise.

Function Documentation

◆ nuxmv_make_scoped_symbol()

nuxmv_symbol nuxmv_make_scoped_symbol ( nuxmv_env  env,
const char *  name,
nuxmv_symbol  scope 
)

Create a new symbol with the given name and context.

Parameters
[in]envThe environment to modify.
[in]nameThe name of the scoped symbol as a null-terminated string.
[in]scopeA context the symbol belongs to.
Returns
The newly created symbol. In case of error, NUXMV_VALID_SYMBOL() evaluates to false.
See also

Requirements: 03.001.01

◆ nuxmv_make_symbol()

nuxmv_symbol nuxmv_make_symbol ( nuxmv_env  env,
const char *  name 
)

Create a new symbol.

Parameters
[in]envThe environment to modify.
[in]nameThe name of the symbol as a null-terminated string.
Returns
The newly created symbol. In case of error, NUXMV_VALID_SYMBOL() evaluates to false.
See also

Requirements: 03.001.01

◆ nuxmv_symbol_get_id()

size_t nuxmv_symbol_get_id ( nuxmv_env  env,
nuxmv_symbol  sym 
)

Get the ID of a symbol.

Parameters
[in]envThe environment to inspect.
[in]symThe symbol to extract the ID from.
Returns
The ID of the symbol, which is a positive integer that is unique in the given environment. 0 is returned in case of error.

◆ nuxmv_symbol_get_name()

const char * nuxmv_symbol_get_name ( nuxmv_env  env,
nuxmv_symbol  symbol 
)

Get the name of a symbol.

Parameters
[in]envThe environment to modify.
[in]symbolThe symbol to inspect.
Returns
The name as a null-terminated string or NULL in case of error.
See also

Requirements: 03.001.02

◆ nuxmv_symbol_get_scope()

nuxmv_symbol nuxmv_symbol_get_scope ( nuxmv_env  env,
nuxmv_symbol  symbol 
)

Get the scope of a symbol.

Parameters
[in]envThe environment to modify.
[in]symbolThe scoped symbol to inspect.
Returns
The symbol's context. In case of error, NUXMV_VALID_SYMBOL() evaluates to false.
Note
Passing a non-scoped symbol results in an error.
See also

Requirements: 03.001.02

◆ nuxmv_symbol_is_scoped()

int nuxmv_symbol_is_scoped ( nuxmv_env  env,
nuxmv_symbol  symbol 
)

Test whether a symbol is scoped.

Parameters
[in]envThe environment to modify.
[in]symbolThe symbol to test.
Returns
1 when the symbol belongs to a context, 0 if not, -1 in case of error.
See also

Requirements: 03.001.02