mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 03:15:50 +00:00
Further refactoring ackermannization.
This commit is contained in:
parent
2679b74543
commit
f3240024e7
20 changed files with 1621 additions and 0 deletions
29
src/ackermannization/ackr_helper.cpp
Normal file
29
src/ackermannization/ackr_helper.cpp
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*++
|
||||
Copyright (c) 2016 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
ackr_helper.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
Author:
|
||||
|
||||
Mikolas Janota (MikolasJanota)
|
||||
|
||||
Revision History:
|
||||
--*/
|
||||
#include"ackr_helper.h"
|
||||
|
||||
double ackr_helper::calculate_lemma_bound(ackr_helper::fun2terms_map& occurrences) {
|
||||
fun2terms_map::iterator it = occurrences.begin();
|
||||
const fun2terms_map::iterator end = occurrences.end();
|
||||
double total = 0;
|
||||
for (; it != end; ++it) {
|
||||
const unsigned fsz = it->m_value->size();
|
||||
const double n2 = n_choose_2_chk(fsz);
|
||||
total += n2;
|
||||
}
|
||||
return total;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue