|
SMTStabilizer API
Public API documentation for SMTStabilizer
|
High-level facade for stabilizing SMT-LIB2 inputs. More...
#include <stabilizer_api.h>

Public Member Functions | |
| SMTStabilizer (SMTStabilizerOptions options={}) | |
| const SMTStabilizerOptions & | options () const noexcept |
| void | set_options (const SMTStabilizerOptions &options) noexcept |
| std::string | apply_file (const std::string &file_path) const |
| Apply the full pipeline to an SMT-LIB2 file. | |
| std::string | apply_text (const std::string &smt2_text) const |
| Apply the full pipeline to an SMT-LIB2 script provided as text. | |
Static Private Member Functions | |
| static void | configure_parser (stabilizer::parser::Parser &parser, const SMTStabilizerOptions &options) |
| static std::string | run_pipeline (stabilizer::parser::Parser &parser, const SMTStabilizerOptions &options) |
Private Attributes | |
| SMTStabilizerOptions | d_options |
High-level facade for stabilizing SMT-LIB2 inputs.
The facade accepts either a file path or an SMT-LIB2 script string, runs the existing parser/node/kernel pipeline, and returns the normalized SMT2 text.
API-to-kernel boundary:
Instances are cheap to copy and can be configured independently.
Definition at line 81 of file stabilizer_api.h.
|
explicit |
Definition at line 32 of file stabilizer_api.cpp.
| std::string stabilizer::api::SMTStabilizer::apply_file | ( | const std::string & | file_path | ) | const |
Apply the full pipeline to an SMT-LIB2 file.
| file_path | Path to an SMT-LIB2 input file. |
| std::invalid_argument | if the path is empty. |
| std::runtime_error | if parsing or normalization fails. |
Definition at line 57 of file stabilizer_api.cpp.
References d_options, stabilizer::parser::Parser::parse(), and run_pipeline().
Referenced by stabilizer_apply_file().
| std::string stabilizer::api::SMTStabilizer::apply_text | ( | const std::string & | smt2_text | ) | const |
Apply the full pipeline to an SMT-LIB2 script provided as text.
| smt2_text | Full SMT-LIB2 input text. |
| std::invalid_argument | if the text is empty. |
| std::runtime_error | if parsing or normalization fails. |
Definition at line 67 of file stabilizer_api.cpp.
References d_options, stabilizer::parser::Parser::parseStr(), and run_pipeline().
Referenced by stabilizer_apply_text().
|
staticprivate |
Configure parser-global options before pipeline execution.
Definition at line 38 of file stabilizer_api.cpp.
References stabilizer::api::SMTStabilizerOptions::get_rewrite(), stabilizer::parser::Parser::getOptions(), and options().
Referenced by run_pipeline().
|
noexcept |
Return the current API options.
Definition at line 34 of file stabilizer_api.cpp.
References d_options.
Referenced by configure_parser(), run_pipeline(), stabilizer_get_context_propagation(), stabilizer_get_rewrite(), and stabilizer_get_subgraph_pruning().
|
staticprivate |
Run parser -> node manager -> kernel pipeline and serialize final output.
Definition at line 45 of file stabilizer_api.cpp.
References stabilizer::kernel::Kernel::apply(), configure_parser(), stabilizer::api::SMTStabilizerOptions::get_context_propagation(), stabilizer::api::SMTStabilizerOptions::get_subgraph_pruning(), and options().
Referenced by apply_file(), and apply_text().
|
noexcept |
Replace the current API options.
Definition at line 36 of file stabilizer_api.cpp.
|
private |
Definition at line 109 of file stabilizer_api.h.
Referenced by apply_file(), apply_text(), and options().