|
nuXmv API 126f6942
API for nuXmv
|
Functions for handling Modules. More...

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. | |
Functions for handling Modules.
This section lists all the functions related to module handling. They are grouped into two main categories:
| #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.
| #define NUXMV_VALID_MODULE | ( | module | ) | ((module).repr != NULL) |
Valid module.
This macro checks whether module is a valid nuxmv_module.
| [in] | module | The module to inspect. |
true if the option is valid, false otherwise. | nuxmv_module nuxmv_copy_module | ( | nuxmv_env | env, |
| nuxmv_module | module, | ||
| const char * | name | ||
| ) |
Copy a module.
| [in] | env | The environment to modify. |
| [in] | module | A module to copy from. |
| [in] | name | The name of the module as a null-terminated string. |
false.Requirements: 03.009
| 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().
| [in] | env | The environment to modify. |
| [in] | name | The name of the module as a null-terminated string. |
false.Requirements: 03.009.01
| 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.
| [in] | env | The environment to modify. |
| [in] | name | The name of the module as a null-terminated string. |
| [in] | property | The property to inspect. |
| [in] | opts | A 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_num | The number of options in the list. If no list shall be passed, use 0 as actual value of opt_num. |
false.Requirements: 02.007
| 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.
| [in] | env | The environment to modify. |
| [in] | module | A module to destroy. |
NUXMV_SUCCESS if the module was destroyed, NUXMV_FAILURE in case of error.Requirements: 03.009