mirror of
https://github.com/Z3Prover/z3
synced 2025-05-03 22:05:45 +00:00
Z3 sources
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
3f9edad676
commit
e9eab22e5c
1186 changed files with 381859 additions and 0 deletions
50
lib/expr_stat.h
Normal file
50
lib/expr_stat.h
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
expr_stat.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Expression statistics (symbol count, var count, depth, ...)
|
||||
|
||||
All functions in these module assume expressions do not contain
|
||||
nested quantifiers.
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-02-05.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _EXPR_STAT_H_
|
||||
#define _EXPR_STAT_H_
|
||||
|
||||
class expr;
|
||||
|
||||
struct expr_stat {
|
||||
unsigned m_sym_count; // symbol count
|
||||
unsigned m_depth; // depth
|
||||
unsigned m_const_count; // constant count
|
||||
unsigned m_max_var_idx;
|
||||
bool m_ground;
|
||||
expr_stat():m_sym_count(0), m_depth(0), m_const_count(0), m_max_var_idx(0), m_ground(true) {}
|
||||
};
|
||||
|
||||
/**
|
||||
\brief Collect statistics regarding the given expression.
|
||||
|
||||
\warning This function traverses the dag as a tree.
|
||||
*/
|
||||
void get_expr_stat(expr * n, expr_stat & r);
|
||||
|
||||
/**
|
||||
\brief Return the number of symbols in \c n.
|
||||
|
||||
\warning This function traverses the dag as a tree.
|
||||
*/
|
||||
unsigned get_symbol_count(expr * n);
|
||||
|
||||
#endif /* _EXPR_STAT_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue