ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
neurosym_conv.h
Go to the documentation of this file.
1#ifndef _ESBMC_SOLVERS_NEUROSYM_NEUROSYM_CONV_H
2#define _ESBMC_SOLVERS_NEUROSYM_NEUROSYM_CONV_H
3
5
6#include <map>
7#include <optional>
8
31{
32public:
34 ~neurosym_convt() override;
35
36 smt_resultt dec_solve() override;
37 const std::string solver_text() override;
38 std::string dump_smt() override;
39
40 bool has_model() const override
41 {
42 return !local_model.empty() || smtlib_convt::has_model();
43 }
44
45 tvt get_bool(smt_astt a) override;
46 tvt l_get(smt_astt a) override;
47 BigInt get_bv(smt_astt a, bool is_signed) override;
48
49private:
51 const namespacet &ns,
52 const optionst &options,
53 const std::string &formula_path);
54
57 void parse_model_block(const std::string &output);
58
61 std::map<std::string, std::string> local_model;
62
65 std::optional<BigInt> local_lookup(const std::string &symname) const;
66
71 std::optional<BigInt> local_eval_bv(smt_astt a) const;
72
74 std::optional<bool> local_eval_bool(smt_astt a) const;
75
77 std::optional<bool> local_lookup_bool(const std::string &symname) const;
78 std::optional<bool>
79 eval_bool_fold(smt_func_kind kind, const smtlib_smt_ast *ast) const;
80 std::optional<bool> eval_bool_eq(const smtlib_smt_ast *ast) const;
81
86 std::optional<BigInt>
87 local_eval_array_at(smt_astt array_term, const BigInt &index) const;
88
92 bool ensure_model_prog_ready();
93 bool model_prog_response_read = false;
94
95 std::string formula_path;
96 bool solved = false;
97};
98
99#endif /* _ESBMC_SOLVERS_NEUROSYM_NEUROSYM_CONV_H */
Definition bigint.hh:58
Definition namespace.h:10
const std::string solver_text() override
Solver name fetcher.
Definition neurosym_conv.cpp:918
bool has_model() const override
Whether a satisfiable result can be turned into a model.
Definition neurosym_conv.h:40
tvt get_bool(smt_astt a) override
Extract the assignment to a boolean variable from the SMT solver's model.
Definition neurosym_conv.cpp:849
std::string dump_smt() override
Method to dump the SMT formula.
Definition neurosym_conv.cpp:730
~neurosym_convt() override
Definition neurosym_conv.cpp:724
tvt l_get(smt_astt a) override
Fetch the value of a boolean sorted smt_ast.
Definition neurosym_conv.cpp:854
neurosym_convt(const namespacet &ns, const optionst &options)
Definition neurosym_conv.cpp:702
BigInt get_bv(smt_astt a, bool is_signed) override
Extract the assignment to a bitvector from the SMT solver's model.
Definition neurosym_conv.cpp:888
smt_resultt dec_solve() override
Solve the formula given to the solver.
Definition neurosym_conv.cpp:744
Definition options.h:11
const optionst & options
Definition smt_solver.h:1130
const namespacet & ns
A namespace containing all the types in the program.
Definition smt_solver.h:1128
bool has_model() const override
get_value() reads from the interactive pipe, so without it the solver can still answer sat/unsat but ...
Definition smtlib_conv.h:293
smtlib_convt(const namespacet &_ns, const optionst &options)
Definition smtlib_conv.cpp:380
Definition smtlib_conv.h:160
Definition threeval.h:10
const smt_ast * smt_astt
Definition smt_ast.h:30
smt_resultt
Result of a call to dec_solve.
Definition smt_result.h:7
smt_func_kind
Identifiers for SMT functions.
Definition smtlib_conv.h:25