mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 03:15:50 +00:00
factor out relation context for datalog
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
8425685ea3
commit
67183ea08a
24 changed files with 799 additions and 569 deletions
|
@ -569,10 +569,11 @@ namespace datalog {
|
|||
cost estimate_size(app * t) const {
|
||||
func_decl * pred = t->get_decl();
|
||||
unsigned n=pred->get_arity();
|
||||
if( (m_context.saturation_was_run() && m_context.get_rmanager().try_get_relation(pred))
|
||||
|| m_context.get_rmanager().is_saturated(pred)) {
|
||||
SASSERT(m_context.get_rmanager().try_get_relation(pred)); //if it is saturated, it should exist
|
||||
unsigned rel_size_int = m_context.get_relation(pred).get_size_estimate_rows();
|
||||
relation_manager& rm = m_context.get_rel_context().get_rmanager();
|
||||
if( (m_context.saturation_was_run() && rm.try_get_relation(pred))
|
||||
|| rm.is_saturated(pred)) {
|
||||
SASSERT(rm.try_get_relation(pred)); //if it is saturated, it should exist
|
||||
unsigned rel_size_int = m_context.get_rel_context().get_relation(pred).get_size_estimate_rows();
|
||||
if(rel_size_int!=0) {
|
||||
cost rel_size = static_cast<cost>(rel_size_int);
|
||||
cost curr_size = rel_size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue