mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
move to abstract symbols
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
78a1736bd2
commit
541658fe02
16 changed files with 117 additions and 93 deletions
|
@ -35,7 +35,7 @@ Notes:
|
|||
|
||||
|
||||
struct dl_context {
|
||||
smt_params m_fparams;
|
||||
scoped_ptr<smt_params> m_fparams;
|
||||
params_ref m_params_ref;
|
||||
fp_params m_params;
|
||||
cmd_context & m_cmd;
|
||||
|
@ -70,10 +70,15 @@ struct dl_context {
|
|||
}
|
||||
}
|
||||
|
||||
smt_params& fparams() {
|
||||
if (!m_fparams) m_fparams = alloc(smt_params);
|
||||
return *m_fparams.get();
|
||||
}
|
||||
|
||||
void init() {
|
||||
ast_manager& m = m_cmd.m();
|
||||
if (!m_context) {
|
||||
m_context = alloc(datalog::context, m, m_register_engine, m_fparams, m_params_ref);
|
||||
m_context = alloc(datalog::context, m, m_register_engine, fparams(), m_params_ref);
|
||||
}
|
||||
if (!m_decl_plugin) {
|
||||
symbol name("datalog_relation");
|
||||
|
|
|
@ -156,8 +156,8 @@ namespace datalog {
|
|||
TRACE("dl", m_context.display(tout););
|
||||
//IF_VERBOSE(3, m_context.display_smt2(0,0,verbose_stream()););
|
||||
|
||||
if (m_context.print_aig().size()) {
|
||||
const char *filename = static_cast<const char*>(m_context.print_aig().c_ptr());
|
||||
if (!m_context.print_aig().is_null()) {
|
||||
const char *filename = m_context.print_aig().bare_str();
|
||||
aig_exporter aig(m_context.get_rules(), get_context(), &m_table_facts);
|
||||
std::ofstream strm(filename, std::ios_base::binary);
|
||||
aig(strm);
|
||||
|
@ -549,7 +549,7 @@ namespace datalog {
|
|||
void rel_context::add_fact(func_decl* pred, relation_fact const& fact) {
|
||||
get_rmanager().reset_saturated_marks();
|
||||
get_relation(pred).add_fact(fact);
|
||||
if (m_context.print_aig().size()) {
|
||||
if (!m_context.print_aig().is_null()) {
|
||||
m_table_facts.push_back(std::make_pair(pred, fact));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3271,7 +3271,7 @@ bool context::is_reachable(pob &n)
|
|||
|
||||
void context::dump_json()
|
||||
{
|
||||
if (m_params.spacer_print_json().size()) {
|
||||
if (!m_params.spacer_print_json().is_null()) {
|
||||
std::ofstream of;
|
||||
of.open(m_params.spacer_print_json().bare_str());
|
||||
m_json_marshaller.marshal(of);
|
||||
|
@ -3950,7 +3950,7 @@ void context::add_constraint (expr *c, unsigned level)
|
|||
}
|
||||
|
||||
void context::new_lemma_eh(pred_transformer &pt, lemma *lem) {
|
||||
if (m_params.spacer_print_json().size())
|
||||
if (!m_params.spacer_print_json().is_null())
|
||||
m_json_marshaller.register_lemma(lem);
|
||||
bool handle=false;
|
||||
for (unsigned i = 0; i < m_callbacks.size(); i++) {
|
||||
|
@ -3974,7 +3974,7 @@ void context::new_lemma_eh(pred_transformer &pt, lemma *lem) {
|
|||
}
|
||||
|
||||
void context::new_pob_eh(pob *p) {
|
||||
if (m_params.spacer_print_json().size())
|
||||
if (!m_params.spacer_print_json().is_null())
|
||||
m_json_marshaller.register_pob(p);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue