mirror of
https://github.com/Z3Prover/z3
synced 2025-10-19 22:00:31 +00:00
speed up parsing of large Datalog files, remove pinned
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
efe2a70f6f
commit
8d23b2b813
5 changed files with 79 additions and 63 deletions
|
@ -509,7 +509,7 @@ namespace datalog {
|
|||
}
|
||||
|
||||
bool sparse_table::add_fact(const char * data) {
|
||||
verbose_action _va("add_fact", 3);
|
||||
verbose_action _va("add_fact", 10);
|
||||
m_data.write_into_reserve(data);
|
||||
return add_reserve_content();
|
||||
}
|
||||
|
@ -829,7 +829,6 @@ namespace datalog {
|
|||
|
||||
virtual table_base * operator()(const table_base & tb1, const table_base & tb2) {
|
||||
|
||||
verbose_action _va("join_project");
|
||||
const sparse_table & t1 = get(tb1);
|
||||
const sparse_table & t2 = get(tb2);
|
||||
|
||||
|
|
|
@ -514,27 +514,13 @@ namespace datalog {
|
|||
SASSERT(m_last_result_relation);
|
||||
return m_last_result_relation->contains_fact(f);
|
||||
}
|
||||
|
||||
void rel_context::reset_tables() {
|
||||
get_rmanager().reset_saturated_marks();
|
||||
rule_set::decl2rules::iterator it = m_context.get_rules().begin_grouped_rules();
|
||||
rule_set::decl2rules::iterator end = m_context.get_rules().end_grouped_rules();
|
||||
for (; it != end; ++it) {
|
||||
func_decl* p = it->m_key;
|
||||
relation_base & rel = get_relation(p);
|
||||
rel.reset();
|
||||
}
|
||||
for (unsigned i = 0; i < m_table_facts.size(); ++i) {
|
||||
func_decl* pred = m_table_facts[i].first;
|
||||
relation_fact const& fact = m_table_facts[i].second;
|
||||
get_relation(pred).add_fact(fact);
|
||||
}
|
||||
}
|
||||
|
||||
void rel_context::add_fact(func_decl* pred, relation_fact const& fact) {
|
||||
get_rmanager().reset_saturated_marks();
|
||||
get_relation(pred).add_fact(fact);
|
||||
m_table_facts.push_back(std::make_pair(pred, fact));
|
||||
if (m_context.get_params().dump_aig().size()) {
|
||||
m_table_facts.push_back(std::make_pair(pred, fact));
|
||||
}
|
||||
}
|
||||
|
||||
void rel_context::add_fact(func_decl* pred, table_fact const& fact) {
|
||||
|
|
|
@ -48,8 +48,6 @@ namespace datalog {
|
|||
|
||||
relation_plugin & get_ordinary_relation_plugin(symbol relation_name);
|
||||
|
||||
void reset_tables();
|
||||
|
||||
lbool saturate(scoped_query& sq);
|
||||
|
||||
void set_cancel(bool f);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue