mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
merge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
commit
df492e200f
99 changed files with 1659 additions and 702 deletions
|
@ -119,7 +119,6 @@ namespace datalog {
|
|||
virtual expr_ref try_get_formula(func_decl * pred) const = 0;
|
||||
virtual void display_output_facts(rule_set const& rules, std::ostream & out) const = 0;
|
||||
virtual void display_facts(std::ostream & out) const = 0;
|
||||
virtual void display_profile(std::ostream& out) = 0;
|
||||
virtual void restrict_predicates(func_decl_set const& predicates) = 0;
|
||||
virtual bool result_contains_fact(relation_fact const& f) = 0;
|
||||
virtual void add_fact(func_decl* pred, relation_fact const& fact) = 0;
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace datalog {
|
|||
}
|
||||
|
||||
virtual void reset_statistics() {}
|
||||
virtual void display_profile(std::ostream& out) const {}
|
||||
virtual void display_profile(std::ostream& out) {}
|
||||
virtual void collect_statistics(statistics& st) const {}
|
||||
virtual unsigned get_num_levels(func_decl* pred) {
|
||||
throw default_exception(std::string("get_num_levels is not supported for ") + m_name);
|
||||
|
|
|
@ -220,6 +220,8 @@ namespace datalog {
|
|||
*/
|
||||
class mutator_fn : public base_fn {
|
||||
public:
|
||||
virtual ~mutator_fn() {}
|
||||
|
||||
virtual void operator()(base_object & t) = 0;
|
||||
|
||||
virtual bool supports_attachment(base_object& other) { return false; }
|
||||
|
@ -869,6 +871,7 @@ namespace datalog {
|
|||
|
||||
class table_row_mutator_fn {
|
||||
public:
|
||||
virtual ~table_row_mutator_fn() {}
|
||||
/**
|
||||
\brief The function is called for a particular table row. The \c func_columns contains
|
||||
a pointer to an array of functional column values that can be modified. If the function
|
||||
|
@ -882,6 +885,7 @@ namespace datalog {
|
|||
|
||||
class table_row_pair_reduce_fn {
|
||||
public:
|
||||
virtual ~table_row_pair_reduce_fn() {}
|
||||
/**
|
||||
\brief The function is called for pair of table rows that became duplicit due to projection.
|
||||
The values that are in the first array after return from the function will be used for the
|
||||
|
|
|
@ -255,7 +255,7 @@ namespace datalog {
|
|||
table_plugin & tplugin = rmgr.get_appropriate_plugin(tsig);
|
||||
relation_plugin & inner_plugin = rmgr.get_table_relation_plugin(tplugin);
|
||||
|
||||
return sieve_relation_plugin::get_plugin(rmgr).mk_full(p, sig, inner_plugin);
|
||||
return sieve_relation_plugin::get_plugin(rmgr).full(p, sig, inner_plugin);
|
||||
}
|
||||
|
||||
void init(relation_signature const& r1_sig, unsigned num_rels1, relation_base const* const* r1,
|
||||
|
@ -294,7 +294,7 @@ namespace datalog {
|
|||
rel2 = r1_plugin.mk_full(p, r2_sig, r1_kind);
|
||||
}
|
||||
else {
|
||||
rel2 = sieve_relation_plugin::get_plugin(rmgr).mk_full(p, r2_sig, r1_plugin);
|
||||
rel2 = sieve_relation_plugin::get_plugin(rmgr).full(p, r2_sig, r1_plugin);
|
||||
}
|
||||
m_offset1.push_back(i);
|
||||
m_kind1.push_back(T_INPUT);
|
||||
|
@ -318,7 +318,7 @@ namespace datalog {
|
|||
rel1 = r2_plugin.mk_full(p, r1_sig, r2_kind);
|
||||
}
|
||||
else {
|
||||
rel1 = sieve_relation_plugin::get_plugin(rmgr).mk_full(p, r1_sig, r2_plugin);
|
||||
rel1 = sieve_relation_plugin::get_plugin(rmgr).full(p, r1_sig, r2_plugin);
|
||||
}
|
||||
m_offset1.push_back(m_full.size());
|
||||
m_kind1.push_back(T_FULL);
|
||||
|
|
|
@ -1622,6 +1622,8 @@ namespace datalog {
|
|||
m_union_fn = plugin.mk_union_fn(t, *m_aux_table, static_cast<table_base *>(0));
|
||||
}
|
||||
|
||||
virtual ~default_table_map_fn() {}
|
||||
|
||||
virtual void operator()(table_base & t) {
|
||||
SASSERT(t.get_signature()==m_aux_table->get_signature());
|
||||
if(!m_aux_table->empty()) {
|
||||
|
@ -1678,6 +1680,8 @@ namespace datalog {
|
|||
m_former_row.resize(get_result_signature().size());
|
||||
}
|
||||
|
||||
virtual ~default_table_project_with_reduce_fn() {}
|
||||
|
||||
virtual void modify_fact(table_fact & f) const {
|
||||
unsigned ofs=1;
|
||||
unsigned r_i=1;
|
||||
|
|
|
@ -253,7 +253,7 @@ namespace datalog {
|
|||
return mk_from_inner(s, inner_cols, inner);
|
||||
}
|
||||
|
||||
sieve_relation * sieve_relation_plugin::mk_full(func_decl* p, const relation_signature & s, relation_plugin & inner_plugin) {
|
||||
sieve_relation * sieve_relation_plugin::full(func_decl* p, const relation_signature & s, relation_plugin & inner_plugin) {
|
||||
SASSERT(!inner_plugin.is_sieve_relation()); //it does not make sense to make a sieve of a sieve
|
||||
svector<bool> inner_cols(s.size());
|
||||
extract_inner_columns(s, inner_plugin, inner_cols);
|
||||
|
|
|
@ -104,8 +104,7 @@ namespace datalog {
|
|||
sieve_relation * mk_empty(const relation_signature & s, relation_plugin & inner_plugin);
|
||||
|
||||
virtual relation_base * mk_full(func_decl* p, const relation_signature & s);
|
||||
sieve_relation * mk_full(func_decl* p, const relation_signature & s, relation_plugin & inner_plugin);
|
||||
|
||||
sieve_relation * full(func_decl* p, const relation_signature & s, relation_plugin & inner_plugin);
|
||||
|
||||
sieve_relation * mk_from_inner(const relation_signature & s, const bool * inner_columns,
|
||||
relation_base * inner_rel);
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace datalog {
|
|||
return alloc(table_relation, *this, s, t);
|
||||
}
|
||||
|
||||
relation_base * table_relation_plugin::mk_full(const relation_signature & s, func_decl* p, family_id kind) {
|
||||
relation_base * table_relation_plugin::mk_full_relation(const relation_signature & s, func_decl* p, family_id kind) {
|
||||
table_signature tsig;
|
||||
if(!get_manager().relation_signature_to_table(s, tsig)) {
|
||||
return 0;
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace datalog {
|
|||
virtual bool can_handle_signature(const relation_signature & s);
|
||||
|
||||
virtual relation_base * mk_empty(const relation_signature & s);
|
||||
virtual relation_base * mk_full(const relation_signature & s, func_decl* p, family_id kind);
|
||||
virtual relation_base * mk_full_relation(const relation_signature & s, func_decl* p, family_id kind);
|
||||
relation_base * mk_from_table(const relation_signature & s, table_base * t);
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue