|
SMTStabilizer API
Public API documentation for SMTStabilizer
|
#include <cstdlib>#include <cstring>#include <exception>#include <memory>#include <new>#include <stdexcept>#include <string>#include <utility>#include "api/stabilizer_api.h"#include "api/stabilizer_c_api.h"
Go to the source code of this file.
Classes | |
| struct | stabilizer_options |
| struct | stabilizer_handle |
Functions | |
| stabilizer_options * | stabilizer_options_create (void) |
| Allocate a new options object with default values. | |
| void | stabilizer_options_destroy (stabilizer_options *options) |
| Release an options object created by stabilizer_options_create. | |
| void | stabilizer_options_set_rewrite (stabilizer_options *options, bool value) |
| Enable or disable parser rewrite normalization. | |
| bool | stabilizer_options_get_rewrite (const stabilizer_options *options) |
| Query parser rewrite normalization flag. | |
| void | stabilizer_options_set_context_propagation (stabilizer_options *options, bool value) |
| Enable or disable kernel context propagation. | |
| bool | stabilizer_options_get_context_propagation (const stabilizer_options *options) |
| Query kernel context propagation flag. | |
| void | stabilizer_options_set_subgraph_pruning (stabilizer_options *options, bool value) |
| Enable or disable kernel subgraph pruning/tie-breaking behavior. | |
| bool | stabilizer_options_get_subgraph_pruning (const stabilizer_options *options) |
| Query kernel subgraph pruning/tie-breaking behavior. | |
| stabilizer_handle * | stabilizer_create (const stabilizer_options *options) |
| Create a stabilizer instance. | |
| void | stabilizer_destroy (stabilizer_handle *handle) |
| Destroy a stabilizer instance and associated internal state. | |
| void | stabilizer_set_rewrite (stabilizer_handle *handle, bool value) |
| Update rewrite normalization on a live stabilizer. | |
| bool | stabilizer_get_rewrite (const stabilizer_handle *handle) |
| Query rewrite normalization on a live stabilizer. | |
| void | stabilizer_set_context_propagation (stabilizer_handle *handle, bool value) |
| Update context propagation on a live stabilizer. | |
| bool | stabilizer_get_context_propagation (const stabilizer_handle *handle) |
| Query context propagation on a live stabilizer. | |
| void | stabilizer_set_subgraph_pruning (stabilizer_handle *handle, bool value) |
| Update subgraph pruning/tie-breaking behavior on a live stabilizer. | |
| bool | stabilizer_get_subgraph_pruning (const stabilizer_handle *handle) |
| Query subgraph pruning/tie-breaking behavior on a live stabilizer. | |
| stabilizer_status | stabilizer_apply_file (stabilizer_handle *handle, const char *file_path, char **output) |
| Apply stabilization pipeline to an SMT-LIB2 file. | |
| stabilizer_status | stabilizer_apply_text (stabilizer_handle *handle, const char *smt2_text, char **output) |
| Apply stabilization pipeline to SMT-LIB2 text. | |
| const char * | stabilizer_last_error (const stabilizer_handle *handle) |
| Return the last diagnostic message associated with a handle. | |
| void | stabilizer_free_string (char *value) |
| Release strings returned through stabilizer_apply_*. | |
| stabilizer_status stabilizer_apply_file | ( | stabilizer_handle * | handle, |
| const char * | file_path, | ||
| char ** | output | ||
| ) |
Apply stabilization pipeline to an SMT-LIB2 file.
| handle | Stabilizer handle, must not be null. |
| file_path | Input file path, must not be null/empty. |
| output | Output pointer for heap-allocated UTF-8 result string. |
On success, *output receives memory that must be released with stabilizer_free_string(). The handle remains valid after the call.
Definition at line 179 of file c_api.cpp.
References stabilizer::api::SMTStabilizer::apply_file(), stabilizer_handle::last_error, stabilizer_handle::stabilizer, and STABILIZER_STATUS_INVALID_ARGUMENT.
| stabilizer_status stabilizer_apply_text | ( | stabilizer_handle * | handle, |
| const char * | smt2_text, | ||
| char ** | output | ||
| ) |
Apply stabilization pipeline to SMT-LIB2 text.
| handle | Stabilizer handle, must not be null. |
| smt2_text | Full SMT-LIB2 script text, must not be null/empty. |
| output | Output pointer for heap-allocated UTF-8 result string. |
On success, *output receives memory that must be released with stabilizer_free_string(). The handle remains valid after the call.
Definition at line 192 of file c_api.cpp.
References stabilizer::api::SMTStabilizer::apply_text(), stabilizer_handle::last_error, stabilizer_handle::stabilizer, and STABILIZER_STATUS_INVALID_ARGUMENT.
| stabilizer_handle * stabilizer_create | ( | const stabilizer_options * | options | ) |
| void stabilizer_destroy | ( | stabilizer_handle * | handle | ) |
| void stabilizer_free_string | ( | char * | value | ) |
| bool stabilizer_get_context_propagation | ( | const stabilizer_handle * | handle | ) |
Query context propagation on a live stabilizer.
| handle | Stabilizer handle, must not be null. |
Definition at line 162 of file c_api.cpp.
References stabilizer::api::SMTStabilizerOptions::get_context_propagation(), stabilizer::api::SMTStabilizer::options(), and stabilizer_handle::stabilizer.
| bool stabilizer_get_rewrite | ( | const stabilizer_handle * | handle | ) |
Query rewrite normalization on a live stabilizer.
| handle | Stabilizer handle, must not be null. |
Definition at line 149 of file c_api.cpp.
References stabilizer::api::SMTStabilizerOptions::get_rewrite(), stabilizer::api::SMTStabilizer::options(), and stabilizer_handle::stabilizer.
| bool stabilizer_get_subgraph_pruning | ( | const stabilizer_handle * | handle | ) |
Query subgraph pruning/tie-breaking behavior on a live stabilizer.
| handle | Stabilizer handle, must not be null. |
Definition at line 175 of file c_api.cpp.
References stabilizer::api::SMTStabilizerOptions::get_subgraph_pruning(), stabilizer::api::SMTStabilizer::options(), and stabilizer_handle::stabilizer.
| const char * stabilizer_last_error | ( | const stabilizer_handle * | handle | ) |
Return the last diagnostic message associated with a handle.
| handle | Stabilizer handle. |
Definition at line 205 of file c_api.cpp.
References stabilizer_handle::last_error.
| stabilizer_options * stabilizer_options_create | ( | void | ) |
| void stabilizer_options_destroy | ( | stabilizer_options * | options | ) |
| bool stabilizer_options_get_context_propagation | ( | const stabilizer_options * | options | ) |
Query kernel context propagation flag.
| options | Options handle, must not be null. |
Definition at line 118 of file c_api.cpp.
References stabilizer::api::SMTStabilizerOptions::get_context_propagation(), and stabilizer_options::value.
| bool stabilizer_options_get_rewrite | ( | const stabilizer_options * | options | ) |
Query parser rewrite normalization flag.
| options | Options handle, must not be null. |
Definition at line 108 of file c_api.cpp.
References stabilizer::api::SMTStabilizerOptions::get_rewrite(), and stabilizer_options::value.
| bool stabilizer_options_get_subgraph_pruning | ( | const stabilizer_options * | options | ) |
Query kernel subgraph pruning/tie-breaking behavior.
| options | Options handle, must not be null. |
Definition at line 128 of file c_api.cpp.
References stabilizer::api::SMTStabilizerOptions::get_subgraph_pruning(), and stabilizer_options::value.
| void stabilizer_options_set_context_propagation | ( | stabilizer_options * | options, |
| bool | value | ||
| ) |
Enable or disable kernel context propagation.
| options | Options handle, must not be null. |
| value | New context propagation flag. |
Definition at line 112 of file c_api.cpp.
References stabilizer::api::SMTStabilizerOptions::set_context_propagation(), and stabilizer_options::value.
| void stabilizer_options_set_rewrite | ( | stabilizer_options * | options, |
| bool | value | ||
| ) |
Enable or disable parser rewrite normalization.
| options | Options handle, must not be null. |
| value | New rewrite flag. |
Definition at line 102 of file c_api.cpp.
References stabilizer::api::SMTStabilizerOptions::set_rewrite(), and stabilizer_options::value.
| void stabilizer_options_set_subgraph_pruning | ( | stabilizer_options * | options, |
| bool | value | ||
| ) |
Enable or disable kernel subgraph pruning/tie-breaking behavior.
| options | Options handle, must not be null. |
| value | New subgraph pruning flag. |
Definition at line 122 of file c_api.cpp.
References stabilizer::api::SMTStabilizerOptions::set_subgraph_pruning(), and stabilizer_options::value.
| void stabilizer_set_context_propagation | ( | stabilizer_handle * | handle, |
| bool | value | ||
| ) |
| void stabilizer_set_rewrite | ( | stabilizer_handle * | handle, |
| bool | value | ||
| ) |
| void stabilizer_set_subgraph_pruning | ( | stabilizer_handle * | handle, |
| bool | value | ||
| ) |