mirror of
https://github.com/Z3Prover/z3
synced 2025-07-29 15:37:58 +00:00
Add basic compiler support for min aggregation function
Signed-off-by: Alex Horn <t-alexh@microsoft.com>
This commit is contained in:
parent
c8a123b7dd
commit
8c097044e8
2 changed files with 66 additions and 0 deletions
|
@ -120,6 +120,22 @@ namespace datalog {
|
|||
instruction_observer m_instruction_observer;
|
||||
expr_free_vars m_free_vars;
|
||||
|
||||
/**
|
||||
\brief Finds all the min aggregation functions in the premise of a given rule.
|
||||
*/
|
||||
static void find_min_aggregates(const rule * r, ptr_vector<func_decl>& min_aggregates);
|
||||
|
||||
/**
|
||||
\brief Decides whether a predicate is subject to a min aggregation function.
|
||||
|
||||
If \c decl is subject to a min aggregation function, the output parameters are written
|
||||
with the neccessary information.
|
||||
|
||||
\returns true if the output paramaters have been written
|
||||
*/
|
||||
static bool prepare_min_aggregate(const func_decl * decl, const ptr_vector<func_decl>& min_aggregates,
|
||||
unsigned_vector & group_by_cols, unsigned & min_col);
|
||||
|
||||
/**
|
||||
If true, the union operation on the underlying structure only provides the information
|
||||
whether the updated relation has changed or not. In this case we do not get anything
|
||||
|
@ -146,6 +162,8 @@ namespace datalog {
|
|||
|
||||
void make_join(reg_idx t1, reg_idx t2, const variable_intersection & vars, reg_idx & result,
|
||||
bool reuse_t1, instruction_block & acc);
|
||||
void make_min(reg_idx source, reg_idx & target, const unsigned_vector & group_by_cols,
|
||||
const unsigned min_col, instruction_block & acc);
|
||||
void make_join_project(reg_idx t1, reg_idx t2, const variable_intersection & vars,
|
||||
const unsigned_vector & removed_cols, reg_idx & result, bool reuse_t1, instruction_block & acc);
|
||||
void make_filter_interpreted_and_project(reg_idx src, app_ref & cond,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue