mirror of
https://github.com/Z3Prover/z3
synced 2025-04-10 19:27:06 +00:00
shortcircuit stats functions on ground terms
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
b303fd59c0
commit
8aee7129f6
|
@ -879,6 +879,9 @@ namespace smt {
|
|||
*/
|
||||
void get_stats_core(app * n, unsigned & sz, unsigned & num_unbound_vars) {
|
||||
sz++;
|
||||
if (n->is_ground()) {
|
||||
return;
|
||||
}
|
||||
unsigned num_args = n->get_num_args();
|
||||
for (unsigned i = 0; i < num_args; i++) {
|
||||
expr * arg = n->get_arg(i);
|
||||
|
@ -901,7 +904,7 @@ namespace smt {
|
|||
void get_stats(app * n, unsigned & sz, unsigned & num_unbound_vars) {
|
||||
sz = 0;
|
||||
num_unbound_vars = 0;
|
||||
return get_stats_core(n, sz, num_unbound_vars);
|
||||
get_stats_core(n, sz, num_unbound_vars);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1032,6 +1035,9 @@ namespace smt {
|
|||
*/
|
||||
unsigned get_num_bound_vars_core(app * n, bool & has_unbound_vars) {
|
||||
unsigned r = 0;
|
||||
if (n->is_ground()) {
|
||||
return 0;
|
||||
}
|
||||
unsigned num_args = n->get_num_args();
|
||||
for (unsigned i = 0; i < num_args; i++) {
|
||||
expr * arg = n->get_arg(i);
|
||||
|
|
Loading…
Reference in a new issue