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

Functions for handling Modules. More...

Collaboration diagram for Modules:

Modules

 Module Adders
 Functions for adding objects to a Module.
 
 Module Getters
 Functions for getting objects from a Module.
 

Macros

#define NUXMV_MAKE_INVALID_MODULE()   ((nuxmv_module){.repr = NULL})
 
#define NUXMV_VALID_MODULE(module)   ((module).repr != NULL)
 Valid module.
 

Functions

nuxmv_module nuxmv_create_module (nuxmv_env env, const char *name)
 Create a new module.
 
nuxmv_module nuxmv_create_module_from_property (nuxmv_env env, const char *name, nuxmv_property property, const nuxmv_opt *opts, size_t opt_num)
 Create a new module out of a property.
 
nuxmv_status_code nuxmv_destroy_module (nuxmv_env env, nuxmv_module module)
 Destroy a module.
 
nuxmv_module nuxmv_copy_module (nuxmv_env env, nuxmv_module module, const char *name)
 Copy a module.
 

Detailed Description

Functions for handling Modules.


This section lists all the functions related to module handling. They are grouped into two main categories:

Macro Definition Documentation

◆ NUXMV_MAKE_INVALID_MODULE

#define NUXMV_MAKE_INVALID_MODULE ( )    ((nuxmv_module){.repr = NULL})

Make an invalid module object

This macro is useful where a function argument requires an optional module object.

See also

◆ NUXMV_VALID_MODULE

#define NUXMV_VALID_MODULE (   module)    ((module).repr != NULL)

Valid module.

This macro checks whether module is a valid nuxmv_module.

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

Function Documentation

◆ nuxmv_copy_module()

nuxmv_module nuxmv_copy_module ( nuxmv_env  env,
nuxmv_module  module,
const char *  name 
)

Copy a module.

Parameters
[in]envThe environment to modify.
[in]moduleA module to copy from.
[in]nameThe name of the module as a null-terminated string.
Returns
The newly copied module. In case of error, NUXMV_VALID_MODULE() evaluates to false.
See also

Requirements: 03.009

◆ nuxmv_create_module()

nuxmv_module nuxmv_create_module ( nuxmv_env  env,
const char *  name 
)

Create a new module.

The created module belongs to the environment. It can be freed using nuxmv_destroy_module(), otherwise it is automatically deleted by using nuxmv_destroy_env().

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

Requirements: 03.009.01

◆ nuxmv_create_module_from_property()

nuxmv_module nuxmv_create_module_from_property ( nuxmv_env  env,
const char *  name,
nuxmv_property  property,
const nuxmv_opt opts,
size_t  opt_num 
)

Create a new module out of a property.

Parameters
[in]envThe environment to modify.
[in]nameThe name of the module as a null-terminated string.
[in]propertyThe property to inspect.
[in]optsA list of options for creating the module. If no list shall be used it is safe to use NULL or the result of malloc(0), provided that opt_num=0.
[in]opt_numThe number of options in the list. If no list shall be passed, use 0 as actual value of opt_num.
Returns
The newly created module. In case of error, NUXMV_VALID_MODULE() evaluates to false.
See also

Requirements: 02.007

Attention
This function has not been implemented, yet.

◆ nuxmv_destroy_module()

nuxmv_status_code nuxmv_destroy_module ( nuxmv_env  env,
nuxmv_module  module 
)

Destroy a module.

With this function, the user notifies the environment that the selected module is no more needed. Note that destroying a module has no effect on its submodules. Coversely, destroying a module that was added as a submodule will leave a dangling reference, leading to an error (undefined behaviour) if such submodule is ever accessed. It is therefore recommended to not destroy modules explicitly (and rely on nuxmv_destroy_env() instead) unless the user is sure that no dangling references are left.

Parameters
[in]envThe environment to modify.
[in]moduleA module to destroy.
Returns
NUXMV_SUCCESS if the module was destroyed, NUXMV_FAILURE in case of error.
See also

Requirements: 03.009