3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-03 22:05:45 +00:00

working on new parameter framework

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-12-01 15:54:34 -08:00
parent be5f933201
commit 589f096e6e
36 changed files with 436 additions and 377 deletions

View file

@ -1233,25 +1233,82 @@ extern "C" {
#endif // CAMLIDL
#ifdef CorML3
/**
@name Configuration
*/
/*@{*/
/**
\brief Set a global (or module) parameter.
This setting is shared by all Z3 contexts.
When a Z3 module is initialized it will use the value of these parameters
when Z3_params objects are not provided.
The name of parameter can be composed of characters [a-z][A-Z], digits [0-9], '-' and '_'.
The character '.' is a delimiter (more later).
The parameter names are case-insensitive. The character '-' should be viewed as an "alias" for '_'.
Thus, the following parameter names are considered equivalent: "pp.decimal-precision" and "PP.DECIMAL_PRECISION".
This function can be used to set parameters for a specific Z3 module.
This can be done by using <module-name>.<parameter-name>.
For example:
Z3_global_param_set('pp.decimal', 'true')
will set the parameter "decimal" in the module "pp" to true.
def_API('Z3_global_param_set', VOID, (_in(STRING), _in(STRING)))
*/
void Z3_API Z3_global_param_set(__in Z3_string param_id, __in Z3_string param_value);
/**
\brief Get a global (or module) parameter.
Returns \mlonly \c None \endmlonly \conly \c Z3_FALSE
if the parameter value does not exist.
\sa Z3_global_param_set
The caller must invoke #Z3_global_param_del_value to delete the value returned at \c param_value.
\remark This function cannot be invoked simultaneously from different threads without synchronization.
The result string stored in param_value is stored in shared location.
def_API('Z3_global_param_get', BOOL, (_in(STRING), _out(STRING)))
*/
Z3_bool_opt Z3_API Z3_global_param_get(__in Z3_string param_id, __out_opt Z3_string_ptr param_value);
/*@}*/
/**
@name Create configuration
*/
/*@{*/
/**
\brief Create a configuration.
\brief Create a configuration object for the Z3 context object.
Configurations are created in order to assign parameters prior to creating
contexts for Z3 interaction. For example, if the users wishes to use model
contexts for Z3 interaction. For example, if the users wishes to use proof
generation, then call:
\ccode{Z3_set_param_value(cfg\, "MODEL"\, "true")}
\ccode{Z3_set_param_value(cfg\, "proof"\, "true")}
\mlonly \remark Consider using {!mk_context_x} instead of using
explicit configuration objects. The function {!mk_context_x}
receives an array of string pairs. This array represents the
configuration options. \endmlonly
\remark In previous versions of Z3, the \c Z3_config was used to store
global and module configurations. Now, we should use \c Z3_global_param_set.
The following parameters can be set:
- proof (Boolean) Enable proof generation
- debug_ref_count (Boolean) Enable debug support for Z3_ast reference counting
- trace (Boolean) Tracing support for VCC
- trace_file_name (String) Trace out file for VCC traces
\sa Z3_set_param_value
\sa Z3_del_config
@ -1271,18 +1328,14 @@ extern "C" {
/**
\brief Set a configuration parameter.
The list of all configuration parameters can be obtained using the Z3 executable:
\verbatim
z3.exe -ini?
\endverbatim
The following parameters can be set for
\sa Z3_mk_config
def_API('Z3_set_param_value', VOID, (_in(CONFIG), _in(STRING), _in(STRING)))
*/
void Z3_API Z3_set_param_value(__in Z3_config c, __in Z3_string param_id, __in Z3_string param_value);
/*@}*/
#endif
@ -1367,33 +1420,19 @@ extern "C" {
#endif
/**
\brief Update a mutable configuration parameter.
\brief This is a deprecated function. This is a NOOP in the current version of Z3.
The list of all configuration parameters can be obtained using the Z3 executable:
\verbatim
z3.exe -ini?
\endverbatim
Only a few configuration parameters are mutable once the context is created.
The error handler is invoked when trying to modify an immutable parameter.
\conly \sa Z3_set_param_value
\mlonly \sa Z3_mk_context \endmlonly
\deprecated Use #Z3_global_param_set.
def_API('Z3_update_param_value', VOID, (_in(CONTEXT), _in(STRING), _in(STRING)))
*/
void Z3_API Z3_update_param_value(__in Z3_context c, __in Z3_string param_id, __in Z3_string param_value);
/**
\brief Get a configuration parameter.
\brief This is a deprecated function. This is a NOOP in the current version of Z3.
It always return Z3_FALSE.
Returns \mlonly \c None \endmlonly \conly \c Z3_FALSE
if the parameter value does not exist.
\conly \sa Z3_mk_config
\conly \sa Z3_set_param_value
\mlonly \sa Z3_mk_context \endmlonly
\deprecated Use #Z3_global_param_get
def_API('Z3_get_param_value', BOOL, (_in(CONTEXT), _in(STRING), _out(STRING)))
*/