3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-15 11:35:42 +00:00
z3/src/ackermannization/ackr_helper.cpp
Nikolaj Bjorner f885fe953f cosmetics
2026-06-19 10:05:43 -07:00

30 lines
663 B
C++

/*++
Copyright (c) 2016 Microsoft Corporation
Module Name:
ackr_helper.cpp
Abstract:
Author:
Mikolas Janota (MikolasJanota)
Revision History:
--*/
#include "ackermannization/ackr_helper.h"
double ackr_helper::calculate_lemma_bound(fun2terms_map const& occs1, sel2terms_map const& occs2) {
double total = 0;
for (auto const &[k, v] : occs1) {
total += n_choose_2_chk(v->var_args.size());
total += v->const_args.size() * v->var_args.size();
}
for (auto const &[k, v] : occs2) {
total += n_choose_2_chk(v->var_args.size());
total += v->const_args.size() * v->var_args.size();
}
return total;
}